33 template<
class FieldType>
34 bool Foam::pointFieldReconstructor::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()))
61 Foam::pointFieldReconstructor::reconstructField(
const IOobject& fieldIoObject)
64 PtrList<PointField<Type>> procFields(procMeshes_.size());
76 procMeshes_[proci].time().name(),
87 Field<Type> internalField(completeMesh_.size());
90 PtrList<pointPatchField<Type>> patchFields(completeMesh_.boundary().size());
94 const PointField<Type>&
95 procField = procFields[proci];
98 const labelList& procToGlobalAddr = pointProcAddressing_[proci];
103 procField.primitiveField(),
111 const label curBPatch =
117 if (!patchFields(curBPatch))
124 procField.boundaryField()[
patchi],
125 completeMesh_.boundary()[curBPatch],
129 completeMesh_.boundary()[curBPatch].size()
135 patchFields[curBPatch].map
137 procField.boundaryField()[
patchi],
140 patchPointAddressing_[proci][
patchi]
148 return tmp<PointField<Type>>
154 fieldIoObject.name(),
155 completeMesh_().time().
name(),
175 const HashSet<word>& selectedFields
187 Info<<
nl <<
" Reconstructing " << fieldClassName <<
"s"
194 !selectedFields.size()
195 || selectedFields.found(fieldIter()->
name())
198 Info<<
" " << fieldIter()->name() <<
endl;
200 reconstructField<Type>(*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.
static pointMesh & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
static const DimensionedField< Type, GeoMesh > & null()
Return a null DimensionedField.
static const char *const typeName
void reconstructFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Reconstruct and write all fields.
static autoPtr< pointPatchField< Type > > New(const word &, const pointPatch &, const DimensionedField< Type, pointMesh > &)
Return a pointer to a new patchField created on freestore given.
A class for managing temporary objects.
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.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.