87 Info<<
"Wrote decomposition as volScalarField::Internal to "
88 << cellProc.name() <<
" for use in postprocessing."
98 int main(
int argc,
char *argv[])
102 "Reconstruct fields of a parallel case"
114 "write cell processor indices as a volScalarField::Internal for "
121 "specify a list of fields to be reconstructed. Eg, '(U T p)' - "
122 "regular expressions not currently supported"
127 "skip reconstructing fields"
133 "specify a list of lagrangian fields to be reconstructed. Eg, '(U d)' -"
134 "regular expressions not currently supported, "
135 "positions always included."
140 "skip reconstructing lagrangian positions and fields"
145 "skip reconstructing cellSets, faceSets, pointSets"
150 "only reconstruct new times (i.e. that do not exist already)"
167 Info<<
"Skipping reconstructing fields"
175 Info<<
"Skipping reconstructing lagrangian positions and fields"
181 if (noReconstructSets)
183 Info<<
"Skipping reconstructing cellSets, faceSets and pointSets"
193 <<
"Cannot specify noLagrangian and lagrangianFields "
194 <<
"options together."
208 const Time& runTime = runTimes.procTimes()[0];
224 <<
"No processor* directories found"
247 masterTimeDirs = runTimes.completeTime().times();
252 masterTimeDirSet.
insert(masterTimeDirs[i].
name());
259 && haveAllTimes(masterTimeDirSet, times)
262 Info<<
"All times already reconstructed.\n\nEnd\n" <<
endl;
271 const word& regionDir =
281 writeDecomposition(meshes);
288 if (newTimes && masterTimeDirSet.
found(times[timei].name()))
290 Info<<
"Skipping time " << times[timei].name()
296 runTimes.setTime(times[timei], timei);
298 Info<<
"Time = " << runTimes.completeTime().userTimeName()
316 == runTimes.completeTime().
name()
319 writeDecomposition(meshes);
327 runTimes.procTimes()[0].name()
333 Info<<
"Reconstructing FV fields" <<
nl <<
endl;
344 fvReconstructor.reconstructFvVolumeInternalFields<scalar>
349 fvReconstructor.reconstructFvVolumeInternalFields<
vector>
354 fvReconstructor.reconstructFvVolumeInternalFields
360 fvReconstructor.reconstructFvVolumeInternalFields<
symmTensor>
365 fvReconstructor.reconstructFvVolumeInternalFields<
tensor>
371 fvReconstructor.reconstructFvVolumeFields<scalar>
376 fvReconstructor.reconstructFvVolumeFields<
vector>
386 fvReconstructor.reconstructFvVolumeFields<
symmTensor>
391 fvReconstructor.reconstructFvVolumeFields<
tensor>
397 fvReconstructor.reconstructFvSurfaceFields<scalar>
402 fvReconstructor.reconstructFvSurfaceFields<
vector>
412 fvReconstructor.reconstructFvSurfaceFields<
symmTensor>
417 fvReconstructor.reconstructFvSurfaceFields<
tensor>
423 if (fvReconstructor.nReconstructed() == 0)
431 Info<<
"Reconstructing point fields" <<
nl <<
endl;
443 pointReconstructor.reconstructFields<scalar>
448 pointReconstructor.reconstructFields<
vector>
458 pointReconstructor.reconstructFields<
symmTensor>
463 pointReconstructor.reconstructFields<
tensor>
469 if (pointReconstructor.nReconstructed() == 0)
487 forAll(runTimes.procTimes(), proci)
493 runTimes.procTimes()[proci].timePath()
500 if (!lagrangianDir.empty())
514 cloudObjects.
find(cloudDirs[i]);
516 if (iter == cloudObjects.
end())
522 runTimes.procTimes()[proci].name(),
527 sprayObjs.lookup(
word(
"positions"));
531 cloudObjects.
insert(cloudDirs[i], sprayObjs);
537 if (cloudObjects.
size())
543 string::validate<word>(iter.
key());
548 Info<<
"Reconstructing lagrangian fields for cloud "
559 reconstructLagrangianFields<label>
565 selectedLagrangianFields
567 reconstructLagrangianFieldFields<label>
573 selectedLagrangianFields
575 reconstructLagrangianFields<scalar>
581 selectedLagrangianFields
583 reconstructLagrangianFieldFields<scalar>
589 selectedLagrangianFields
591 reconstructLagrangianFields<vector>
597 selectedLagrangianFields
599 reconstructLagrangianFieldFields<vector>
605 selectedLagrangianFields
607 reconstructLagrangianFields<sphericalTensor>
613 selectedLagrangianFields
615 reconstructLagrangianFieldFields<sphericalTensor>
621 selectedLagrangianFields
623 reconstructLagrangianFields<symmTensor>
629 selectedLagrangianFields
631 reconstructLagrangianFieldFields<symmTensor>
637 selectedLagrangianFields
639 reconstructLagrangianFields<tensor>
645 selectedLagrangianFields
647 reconstructLagrangianFieldFields<tensor>
653 selectedLagrangianFields
670 runTimes.procTimes()[0].timePath()/regionDir/
"uniform"
679 runTimes.completeTime().timePath()/regionDir
692 runTimes.procTimes()[0].timePath()/
"uniform"
701 runTimes.completeTime().timePath()
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static pointMesh & New(const polyMesh &mesh)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A HashTable with keys but without contents.
bool insert(const Key &key)
Insert a new entry.
An STL-conforming const_iterator.
const Key & key() const
Return the Key corresponding to the iterator.
An STL-conforming hash table.
label size() const
Return number of elements in table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
bool found(const Key &) const
Return true if hashedEntry is found in table.
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void size(const label)
Override size to be inconsistent with allocated storage.
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word controlDictName
The default control dictionary name (normally "controlDict")
bool empty() const
Return true if the UList is empty (ie, size() is zero)
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
static void noParallel()
Remove the parallel options.
fileName path() const
Return the path to the caseName.
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.
static const word prefix
The prefix to local: lagrangian.
const word & name() const
Return const reference to name.
Automatic domain decomposition class for finite-volume meshes.
const labelListList & procPointAddressing() const
Access the labels of points for each processor.
const PtrList< fvMesh > & procMeshes() const
Access the processor meshes.
void writeComplete(const bool doSets) const
Write the decomposed meshes and associated data.
bool readReconstruct(const bool doSets)
Read in the processor meshes. Read the complete mesh if it is.
const labelListList & procFaceAddressing() const
Access the labels of faces for each processor (see notes above)
const PtrList< surfaceLabelField::Boundary > & procFaceAddressingBf() const
Access the labels of faces for each processor (see notes above)
const labelList & cellProc() const
Return the distribution as an FV field for writing.
const labelListList & procCellAddressing() const
Access the labels of cells for each processor.
const fvMesh & completeMesh() const
Access the global mesh.
fvMesh::readUpdateState readUpdateReconstruct()
Read-update for reconstruction.
A class for handling file names.
word name() const
Return file name (part beyond last /)
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const =0
Copy, recursively if necessary, the source to the destination.
virtual fileNameList readDir(const fileName &, const fileType=fileType::file, const bool filterVariants=true, const bool followLink=true) const =0
Read a directory and return the entries as a string list.
virtual label nProcs(const fileName &dir, const fileName &local="") const
Get number of processor directories/results. Used for e.g.
Finite volume reconstructor for volume and surface fields.
const Time & time() const
Return the top-level database.
Point field reconstructor.
Mesh representing a set of points created from polyMesh.
const fileName & facesInstance() const
Return the current instance directory for faces.
static word defaultRegion
Return the default region name.
readUpdateState
Enumeration defining the state of the mesh after a read update.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
static instantList timeDirs
#define WarningInFunction
Report a warning using Foam::Warning.
const fileOperation & fileHandler()
Get current file handler.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void reconstructLagrangianPositions(const polyMesh &mesh, const word &cloudName, const PtrList< fvMesh > &meshes, const labelListList &faceProcAddressing, const labelListList &cellProcAddressing)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
List< scalar > scalarList
A List of scalars.
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
const Foam::wordList regionNames(args.optionFound("allRegions") ? runTime .controlDict().subDict("regionSolvers").toc() :wordList(1, args.optionFound("region") ? args.optionRead< word >("region") :polyMesh::defaultRegion))
Foam::argList args(argc, argv)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
const word cloudName(propsDict.lookup("cloudName"))