34 #ifndef MeshToMeshMapGeometricFields_H 35 #define MeshToMeshMapGeometricFields_H 69 tgtField.type() == tgtField.
patch().
patch().type()
93 tgtField.type() == tgtField.
patch().
patch().type()
104 fld.
mesh().globalData().patchSchedule();
106 forAll(patchSchedule, patchEvali)
113 tgtField.type() == tgtField.
patch().
patch().type()
117 if (patchSchedule[patchEvali].init)
139 mapper.
srcRegion().objectRegistry::template
140 lookupClass<GeometricField<Type, fvPatchField, volMesh>>()
147 iterator fieldIter = fields.
begin();
148 fieldIter != fields.
end();
161 mapper.
srcRegion().objectRegistry::template
162 lookupClass<GeometricField<Type, fvPatchField, volMesh>>()
168 iterator fieldIter = fields.
begin();
169 fieldIter != fields.
end();
177 if (meshToMesh::debug)
193 template<
class>
class PatchField,
205 class patchFieldResizeMapper
215 patchFieldResizeMapper(
const label size)
223 mapper.
srcRegion().objectRegistry::template lookupClass<Gfield>()
230 iterator fieldIter = fields.
begin();
231 fieldIter != fields.
end();
235 Gfield&
field =
const_cast<Gfield&
>(*fieldIter());
236 field.clearOldTimes();
240 mapper.
srcRegion().objectRegistry::template lookupClass<Gfield>();
244 for (
direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
246 setComponent(NaN, cmpt) = std::numeric_limits<scalar>::signaling_NaN();
252 fieldIter != fields.
end();
256 Gfield&
field =
const_cast<Gfield&
>(*fieldIter());
258 if (meshToMesh::debug)
260 Info<<
"Setting to NaN " << field.typeName <<
' ' << field.name()
264 const typename Gfield::Mesh&
mesh = field.mesh();
266 field.primitiveFieldRef().setSize(GeoMesh::size(mesh));
267 field.primitiveFieldRef() = NaN;
269 field.boundaryFieldRef().setSize(mesh.boundary().size());
273 if (isA<processorPolyPatch>(
mesh().boundaryMesh()[
patchi]))
275 field.boundaryFieldRef().set
288 typename Gfield::Patch& pf = field.boundaryFieldRef()[
patchi];
289 pf.autoMap(patchFieldResizeMapper(pf.patch().size()));
292 field.boundaryFieldRef()[
patchi] == NaN;
295 field.instance() = field.time().timeName();
Field sizing mapper which sets the field size and does not map values.
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
static const char *const typeName
void clearOldTimes()
Delete old time and previous iteration fields.
const polyMesh & srcRegion() const
Return const access to the source mesh.
void MeshToMeshMapVolFields(const meshToMesh &mapper)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field.
static label nRequests()
Get number of outstanding requests.
Generic GeometricField class.
Class to calculate the cell-addressing between two overlapping meshes.
void mapSrcToTgt(const UList< Type > &srcFld, List< Type > &result) const
Map field from src to tgt mesh with defined operation.
void evaluateConstraintTypes(GeometricField< Type, fvPatchField, volMesh > &fld)
static bool constraintType(const word &pt)
Return true if the given type is a constraint type.
An STL-conforming iterator.
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))
void reset(const tmp< GeometricField< Type, PatchField, GeoMesh >> &)
Reset the field contents to the given field.
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
const polyPatch & patch() const
Return the polyPatch.
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
iterator begin()
Iterator set to the beginning of the HashTable.
An STL-conforming hash table.
const fvPatch & patch() const
Return patch.
void NaNGeometricFields(const meshToMesh &mapper)
const Mesh & mesh() const
Return mesh.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets Updated to false.
static commsTypes defaultCommsType
Default commsType.
static bool & parRun()
Is this a parallel run?
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, p_rgh, pimple.dict(), thermo.incompressible());mesh.schemes().setFluxRequired(p_rgh.name());hydrostaticInitialisation(p_rgh, p, rho, U, gh, ghf, pRef, thermo, pimple.dict());Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));dimensionedScalar initialMass=fvc::domainIntegrate(rho);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const Time & time() const
Return time.
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
label & setComponent(label &l, const direction)