| 115 | |
| 116 | |
| 117 | bool Foam::functionObjects::cloudInfo::write() |
| 118 | { |
| 119 | logFiles::write(); |
| 120 | |
| 121 | forAll(names(), i) |
| 122 | { |
| 123 | const word& cloudName = names()[i]; |
| 124 | |
| 125 | const kinematicCloud& cloud = |
| 126 | obr_.lookupObject<kinematicCloud>(cloudName); |
| 127 | |
| 128 | label nParcels = returnReduce(cloud.nParcels(), sumOp<label>()); |
| 129 | scalar massInSystem = |
| 130 | returnReduce(cloud.massInSystem(), sumOp<scalar>()); |
| 131 | |
| 132 | if (Pstream::master()) |
| 133 | { |
| 134 | writeTime(file(i)); |
| 135 | file(i) |
| 136 | << token::TAB |
| 137 | << nParcels << token::TAB |
| 138 | << massInSystem << endl; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | return true; |
| 143 | } |
| 144 | |
| 145 | |
| 146 | // ************************************************************************* // |
nothing calls this directly
no test coverage detected