Go to the documentation of this file.
43 template<
class ReadGeoField,
class MappedGeoField>
50 const typename MappedGeoField::value_type& nullValue,
54 typedef typename MappedGeoField::value_type Type;
59 tetFields.
setSize(fieldObjects.size());
64 Info<<
"Converting " << ReadGeoField::typeName <<
' ' << iter.key()
97 fld.setSize(map.
size(), nullValue);
100 label index = map[pointI];
104 label cellI = index-1;
109 label faceI = -index-1;
118 fld[pointI] =
readField.boundaryField()[patchI][localFaceI];
136 tetFields[i].correctBoundaryConditions();
145 int main(
int argc,
char *argv[])
162 Info<<
"Create tetDualMesh for time = "
163 << runTime.timeName() <<
nl <<
endl;
180 "pointDualAddressing",
188 if (pointDualAddressing.size() != tetDualMesh.
nPoints())
191 <<
"Size " << pointDualAddressing.size()
192 <<
" of addressing map " << pointDualAddressing.objectPath()
193 <<
" differs from number of points in mesh "
201 label nPatchFaces = 0;
203 forAll(pointDualAddressing, pointI)
205 label index = pointDualAddressing[pointI];
217 label faceI = -index-1;
221 <<
"Face " << faceI <<
" from index " << index
222 <<
" is not a boundary face."
236 Info<<
"tetDualMesh points : " << tetDualMesh.
nPoints()
237 <<
" of which mapped to" <<
nl
238 <<
" cells : " << nCells <<
nl
239 <<
" patch faces : " << nPatchFaces <<
nl
240 <<
" not mapped : " << nUnmapped <<
nl
249 ReadAndMapFields<volScalarField, pointScalarField>
260 ReadAndMapFields<volVectorField, pointVectorField>
271 ReadAndMapFields<volSphericalTensorField, pointSphericalTensorField>
282 ReadAndMapFields<volSymmTensorField, pointSymmTensorField>
293 ReadAndMapFields<volTensorField, pointTensorField>
303 tetDualMesh.objectRegistry::write();
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define forAll(list, i)
Loop across all elements in list.
void readField(const IOobject &io, const fvMesh &mesh, const label i, PtrList< GeoField > &fields)
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
const fileName & facesInstance() const
Return the current instance directory for faces.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const pointMesh & New(const polyMesh &mesh)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const labelList & patchID() const
Per boundary face label the patch index.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
bool set(const label) const
Is element set.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
int main(int argc, char *argv[])
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label nInternalFaces() const
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Mesh data needed to do the Finite Volume discretisation.
IOobjectList lookupClass(const word &className) const
Return the list for all IOobjects of a given class.
List of IOobjects with searching and retrieving facilities.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Traits class for primitives.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
void size(const label)
Override size to be inconsistent with allocated storage.