32 template<
class GeoField>
33 bool Foam::LagrangianFieldReconstructor::reconstructs
36 const HashSet<word>& selectedFields
39 IOobjectList
fields =
objects.lookupClass(GeoField::typeName);
41 if (
fields.size() && selectedFields.empty())
48 if (selectedFields.found(fieldIter()->
name()))
61 template<
class>
class PrimitiveField,
62 template<
class,
class,
template<
class>
class>
class GeoField
64 Foam::tmp<PrimitiveField<Type>>
65 Foam::LagrangianFieldReconstructor::reconstructLagrangianPrimitiveField
67 const PtrList<GeoField<Type, LagrangianMesh, PrimitiveField>>&
73 new PrimitiveField<Type>(completeMesh_.size())
75 PrimitiveField<Type>& result = tresult.
ref();
78 result.setSize(completeMesh_.size());
84 procFields[proci].primitiveField();
86 i0 += procMeshes_[proci].
size();
93 template<
class Type,
template<
class>
class PrimitiveField>
95 Foam::LagrangianFieldReconstructor::reconstructLagrangianField
108 procFields[0].
name(),
109 completeMesh_.time().name(),
115 procFields[0].dimensions(),
116 reconstructLagrangianPrimitiveField(procFields)()
122 template<
class Type,
template<
class>
class PrimitiveField>
124 Foam::LagrangianFieldReconstructor::reconstructLagrangianField
137 completeMesh_.boundary().size()
139 forAll(completeMesh_.boundary(), completePatchi)
141 completePatchFields.
set
144 procFields[0].boundaryField()[completePatchi].
clone
159 procFields[0].
name(),
160 completeMesh_.time().name(),
166 procFields[0].dimensions(),
167 reconstructLagrangianPrimitiveField(procFields)(),
169 procFields[0].sources().table()
177 template<
class GeoField>
186 forAll(procMeshes_, proci)
196 procMeshes_[proci].time().name(),
208 return reconstructLagrangianField(procFields);
212 template<
class GeoField>
223 Info<<
nl <<
" Reconstructing " << GeoField::typeName <<
"s"
230 selectedFields.
empty()
231 || selectedFields.
found(fieldIter()->
name())
234 Info<<
" " << fieldIter()->name() <<
endl;
236 reconstructField<GeoField>(*fieldIter())().
write();
#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.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
A HashTable with keys but without contents.
bool empty() const
Return true if the hash table is empty.
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...
const word & name() const
Return name.
tmp< GeoField > reconstructField(const IOobject &) const
Read and reconstruct a field.
void reconstructFields(const IOobjectList &objects, const HashSet< word > &selectedFields) const
Read, reconstruct and write all/selected Lagrangian fields.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
label size() const
Return the number of elements in the UList.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
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.