MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / write

Function write

src/functionObjects/lagrangian/cloudInfo/cloudInfo.C:117–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117bool 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// ************************************************************************* //

Callers

nothing calls this directly

Calls 6

namesFunction · 0.85
returnReduceFunction · 0.85
writeTimeFunction · 0.85
nParcelsMethod · 0.80
forAllFunction · 0.50
massInSystemMethod · 0.45

Tested by

no test coverage detected