Go to the documentation of this file.
39 const word& fieldName,
45 if (Pstream::parRun())
49 gatheredValues[Pstream::myProcNo()] = values;
50 Pstream::gatherList(gatheredValues);
52 if (Pstream::master())
65 if (mergeList_[surfI].pointsMap.size() == allValues.size())
68 allValues.setSize(mergeList_[surfI].
points.size());
73 if (mergeList_[surfI].faces.size())
79 mergeList_[surfI].points,
80 mergeList_[surfI].faces,
126 const word& fieldName = vField.name();
127 const fileName outputDir = outputPath_/vField.time().timeName();
137 if (interpolatorPtr.
empty())
141 interpolationScheme_,
146 values =
s.interpolate(interpolatorPtr());
150 values =
s.sample(vField);
153 writeSurface<Type>(values, surfI, fieldName, outputDir);
164 const word& fieldName = sField.name();
165 const fileName outputDir = outputPath_/sField.time().timeName();
171 writeSurface<Type>(values, surfI, fieldName, outputDir);
176 template<
class GeoField>
185 names = fieldObjects.
names();
189 names =
mesh.thisDb().names<GeoField>();
198 const word& fieldName = iter.key();
202 Pout<<
"sampleAndWrite: " << fieldName <<
endl;
212 mesh.time().timeName(),
225 mesh.thisDb().lookupObject<GeoField>(fieldName)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
const objectRegistry & obr_
Const reference to database.
bool empty() const
Return true if the autoPtr is empty (ie, no pointer set).
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
wordList names() const
Return the list of names of the IOobjects.
A HashTable with keys but without contents.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
List< word > wordList
A List of words.
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOdictionary propsDict(IOobject("particleTrackProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED))
An abstract class for surfaces with sampling.
void writeSurface(const Field< Type > &values, const label surfI, const word &fieldName, const fileName &outputDir)
Write sampled fieldName on surface and on outputDir path.
A list of keyword definitions, which are a keyword followed by any number of values (e....
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Mesh data needed to do the Finite Volume discretisation.
IOobjectList lookupClass(const word &className) const
Return the list for all IOobjects of a given class.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
List of IOobjects with searching and retrieving facilities.
static bool master(const label communicator=0)
Am I the master process.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
const bool loadFromFiles_
Load fields from files (not from objectRegistry)
prefixOSstream Pout(cout, "Pout")
wordList fieldNames(const IOobjectList &objects, const bool syncPar)
Get sorted names of fields of type. If syncPar and running in parallel.
static bool verbose_
Output verbosity.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Operations on lists of strings.
void sampleAndWrite(const GeometricField< Type, fvPatchField, volMesh > &)
Sample and write a particular volume field.
Generic GeometricField class.
wordReList fieldSelection_
Names of fields to sample.