40 template<
class FieldType>
41 bool Foam::fvFieldReconstructor::reconstructs
44 const HashSet<word>& selectedFields
47 IOobjectList
fields =
objects.lookupClass(FieldType::typeName);
49 if (
fields.size() && selectedFields.empty())
56 if (selectedFields.found(fieldIter()->
name()))
67 void Foam::fvFieldReconstructor::rmapFaceToFace
70 const Field<Type>& fromField,
77 toField[
mag(addressing[i]) - 1] =
78 (
isFlux && addressing[i] < 0 ? -1 : +1)*fromField[i];
103 fieldIoObject.
name(),
104 procMeshes_[proci].time().name(),
118 forAll(procMeshes_, proci)
126 cellProcAddressing_[proci]
136 fieldIoObject.
name(),
137 completeMesh_.time().name(),
144 procFields[0].dimensions(),
160 forAll(procMeshes_, proci)
169 fieldIoObject.
name(),
170 procMeshes_[proci].time().name(),
196 cellProcAddressing_[proci]
203 procMeshes_[proci].boundary()[procPatchi];
205 const label completePatchi = completePatchID(proci, procPatchi);
207 if (completePatchi == procPatchi)
209 if (!patchFields(completePatchi))
217 completeMesh_.boundary()[completePatchi],
221 completeMesh_.boundary()[completePatchi].size()
227 patchFields[completePatchi].map
232 faceProcAddressingBf_[proci][procPatchi] - 1
236 else if (isA<processorCyclicFvPatch>(procPatch))
238 if (!patchFields(completePatchi))
245 completeMesh_.boundary()[completePatchi].type(),
246 completeMesh_.boundary()[completePatchi],
252 if (patchFields[completePatchi].overridesConstraint())
255 str <<
"\nThe field \"" << procFields[0].name()
256 <<
"\" on cyclic patch \""
257 << patchFields[completePatchi].patch().name()
258 <<
"\" cannot be reconstructed as it is not a cyclic "
259 <<
"patch field. A \"patchType cyclic;\" setting has "
260 <<
"been used to override the cyclic patch type.\n\n"
261 <<
"Cyclic patches like this with non-cyclic boundary "
262 <<
"conditions should be confined to a single "
263 <<
"processor using decomposition constraints.";
269 patchFields[completePatchi].map
274 faceProcAddressingBf_[proci][procPatchi] - 1
288 fieldIoObject.
name(),
289 completeMesh_.time().name(),
296 procFields[0].dimensions(),
299 procFields[0].sources().table()
314 forAll(procMeshes_, proci)
323 fieldIoObject.
name(),
324 procMeshes_[proci].time().name(),
336 Field<Type> internalField(completeMesh_.nInternalFaces());
341 forAll(procMeshes_, proci)
353 faceProcAddressing_[proci],
354 procMeshes_[proci].nInternalFaces()
363 procMeshes_[proci].boundary()[procPatchi];
365 const label completePatchi = completePatchID(proci, procPatchi);
367 if (completePatchi == procPatchi)
369 if (!patchFields(completePatchi))
377 completeMesh_.boundary()[completePatchi],
381 completeMesh_.boundary()[completePatchi].size()
387 patchFields[completePatchi].map
392 faceProcAddressingBf_[proci][procPatchi] - 1
396 else if (isA<processorCyclicFvPatch>(procPatch))
398 if (!patchFields(completePatchi))
405 completeMesh_.boundary()[completePatchi].type(),
406 completeMesh_.boundary()[completePatchi],
412 patchFields[completePatchi].map
417 faceProcAddressingBf_[proci][procPatchi] - 1
421 else if (isA<processorFvPatch>(procPatch))
427 faceProcAddressingBf_[proci][procPatchi],
441 fieldIoObject.
name(),
442 completeMesh_.time().name(),
449 procFields[0].dimensions(),
470 Info<<
nl <<
" Reconstructing " << fieldClassName <<
"s"
477 selectedFields.
empty()
478 || selectedFields.
found(fieldIter()->
name())
481 Info<<
" " << fieldIter()->name() <<
endl;
483 reconstructVolInternalField<Type>(*fieldIter())().
write();
497 const word& fieldClassName =
504 Info<<
nl <<
" Reconstructing " << fieldClassName <<
"s"
511 selectedFields.
empty()
512 || selectedFields.
found(fieldIter()->
name())
515 Info<<
" " << fieldIter()->name() <<
endl;
517 reconstructVolField<Type>(*fieldIter())().
write();
531 const word& fieldClassName =
538 Info<<
nl <<
" Reconstructing " << fieldClassName <<
"s"
545 selectedFields.
empty()
546 || selectedFields.
found(fieldIter()->
name())
549 Info<<
" " << fieldIter()->name() <<
endl;
551 reconstructFvSurfaceField<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.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const PrimitiveField< Type > & primitiveField() const
Return a const-reference to the primitive field.
Pre-declare SubField and related Field type.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
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.
Output to memory buffer stream.
string str() const
Return the string.
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.
A List obtained as a section of another List.
tmp< VolField< Type > > reconstructVolField(const IOobject &fieldIoObject) const
Read and reconstruct a volume field.
tmp< DimensionedField< Type, volMesh > > reconstructVolInternalField(const IOobject &fieldIoObject) const
Read and reconstruct a volume internal field.
void reconstructVolInternalFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Read, reconstruct and write all/selected volume internal fields.
void reconstructVolFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Read, reconstruct and write all/selected volume fields.
tmp< SurfaceField< Type > > reconstructFvSurfaceField(const IOobject &fieldIoObject) const
Read and reconstruct a surface field.
void reconstructFvSurfaceFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Read, reconstruct and write all/selected surface fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Mapper which sets the field size. It does not actually map values.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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
string breakIntoIndentedLines(const string &str, const string::size_type nLength=80, const string::size_type nIndent=0)
Break a string up into indented lines.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
bool isFlux(const DimensionedField< Type, surfaceMesh > &df)
Check if surfaceField is a flux.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
UList< label > labelUList