33 template<
class FieldType>
34 bool Foam::lagrangianFieldReconstructor::reconstructs
37 const HashSet<word>& selectedFields
40 IOobjectList
fields =
objects.lookupClass(FieldType::typeName);
42 if (
fields.size() && selectedFields.empty())
49 if (selectedFields.found(fieldIter()->
name()))
62 template<
class>
class ReadIOContainer,
63 template<
class>
class IOContainer
65 void Foam::lagrangianFieldReconstructor::reconstructFields
68 const HashSet<word>& selectedFields
71 const word& fieldClassName = ReadIOContainer<Type>::typeName;
77 Info<<
nl <<
" Reconstructing lagrangian "
78 << fieldClassName <<
"s" <<
nl <<
endl;
84 selectedFields.empty()
85 || selectedFields.found(fieldIter()->
name())
88 Info<<
" " << fieldIter()->name() <<
endl;
90 reconstructField<Type, ReadIOContainer, IOContainer>
105 template<
class>
class ReadIOContainer,
106 template<
class>
class IOContainer
117 new IOContainer<Type>
121 fieldIoObject.
name(),
122 completeMesh_.time().name(),
134 forAll(procMeshes_, proci)
138 fieldIoObject.
name(),
139 procMeshes_[proci].time().name(),
148 IOContainer<Type> fieldi(localIOobject);
155 field[
offset + j] = fieldi[j];
165 void Foam::lagrangianFieldReconstructor::reconstructFields
171 reconstructFields<Type, IOField, IOField>(o,
sf);
#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.
A Field of objects of type <Type> with automated input and output using a compact storage....
Pre-declare SubField and related Field type.
A HashTable with keys but without contents.
A primitive field of type <Type> with automated input and output.
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
tmp< IOContainer< Type > > reconstructField(const IOobject &fieldIoObject) const
Read and reconstruct a field.
static const word prefix
The prefix to local: lagrangian.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
volScalarField sf(fieldObject, mesh)
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
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 LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void offset(label &lst, const label o)