38 template<
class GeoField>
39 void Foam::parFaFieldDistributorCache::redistributeAndWrite
41 const faMeshDistributor& distributor,
43 const bool isWriteProc
48 tmp<GeoField> tfld = distributor.distributeField(
fld);
62 const Time& baseRunTime,
63 const fileName& proc0CaseName,
67 const fileName& areaMeshInstance,
74 autoPtr<faMeshSubset> subsetterPtr;
77 if (areaMeshOnProc.found(
false))
81 subsetterPtr.reset(
new faMeshSubset(
mesh, zero{}));
84 auto& obr =
const_cast<objectRegistry&
> 86 subsetterPtr->subMesh().thisDb()
89 obr.checkOut(faMesh::typeName);
90 obr.checkOut(
"faBoundaryMesh");
91 obr.checkOut(
"faSchemes");
92 obr.checkOut(
"faSolution");
110 <<
" mesh:" <<
mesh.mesh().objectRegistry::objectRelPath()
111 <<
" have objects:" << objects.
names() <<
endl;
119 #undef doFieldReading 120 #define doFieldReading(Storage) \ 121 fieldsDistributor::readFields \ 123 areaMeshOnProc, mesh, subsetterPtr, objects, Storage, \ 128 doFieldReading(scalarAreaFields_);
129 doFieldReading(vectorAreaFields_);
130 doFieldReading(sphericalTensorAreaFields_);
131 doFieldReading(symmTensorAreaFields_);
132 doFieldReading(tensorAreaFields_);
135 doFieldReading(scalarEdgeFields_);
136 doFieldReading(vectorEdgeFields_);
137 doFieldReading(tensorEdgeFields_);
138 doFieldReading(sphericalTensorEdgeFields_);
139 doFieldReading(symmTensorEdgeFields_);
140 #undef doFieldReading 144 void Foam::parFaFieldDistributorCache::redistributeAndWrite
146 const faMeshDistributor& distributor,
147 const bool isWriteProc
150 redistributeAndWrite(distributor, scalarAreaFields_, isWriteProc);
151 redistributeAndWrite(distributor, vectorAreaFields_, isWriteProc);
152 redistributeAndWrite(distributor, sphericalTensorAreaFields_, isWriteProc);
153 redistributeAndWrite(distributor, symmTensorAreaFields_, isWriteProc);
154 redistributeAndWrite(distributor, tensorAreaFields_, isWriteProc);
156 redistributeAndWrite(distributor, scalarEdgeFields_, isWriteProc);
157 redistributeAndWrite(distributor, vectorEdgeFields_, isWriteProc);
158 redistributeAndWrite(distributor, sphericalTensorEdgeFields_, isWriteProc);
159 redistributeAndWrite(distributor, symmTensorEdgeFields_, isWriteProc);
160 redistributeAndWrite(distributor, tensorEdgeFields_, isWriteProc);
const fileName & caseName() const noexcept
Return case name.
wordList names() const
The unsorted names of all objects.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Time & time() const
Return the top-level database.
bool processorCase() const noexcept
Return true if this is a processor case.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
void read(const Time &baseRunTime, const fileName &proc0CaseName, const bool decompose, const boolList &areaMeshOnProc, const fileName &areaMeshInstance, faMesh &mesh)
Read distributed fields.
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< bool > boolList
A List of bools.