51 const bool allowUnmapped
57 forAll(patchFields, patchi)
104 auto& result = tresult.ref();
111 auto& bf = result.boundaryFieldRef();
115 const label basePatchId =
patchMap[patchi];
117 if (basePatchId != -1)
122 const label baseStart = basePatch.
start();
123 const label baseSize = basePatch.
size();
127 forAll(directAddressing, i)
131 if (baseFacei >= baseStart && baseFacei < baseStart+baseSize)
133 directAddressing[i] = baseFacei-baseStart;
139 directAddressing[i] = -1;
167 if (allowUnmapped && hasUnmapped)
178 forAll(directAddressing, i)
180 if (directAddressing[i] == -1)
185 bf[patchi].fvPatchField<Type>::operator=(value);
204 const bool allowUnmapped
238 forAll(patchFields, patchi)
243 if (patchMap[patchi] == -1)
290 auto& result = tresult.ref();
297 auto& bf = result.boundaryFieldRef();
301 if (patchMap[patchi] != -1)
305 const fvPatch& basePatch = vf.
mesh().boundary()[patchMap[patchi]];
306 const label baseStart = basePatch.
start();
307 const label baseSize = basePatch.
size();
311 forAll(directAddressing, i)
315 if (baseFacei >= baseStart && baseFacei < baseStart+baseSize)
317 directAddressing[i] = baseFacei-baseStart;
324 directAddressing[i] = -1;
344 const labelUList& fc = bf[patchi].patch().faceCells();
354 if (cellMap[fc[i]] == own[baseFacei] || !vf.
oriented()())
367 label patchi = vf.
mesh().boundaryMesh().whichPatch
371 const fvPatch& otherPatch = vf.
mesh().boundary()[patchi];
393 const bool allowUnmapped
425 forAll(patchFields, patchi)
430 if (patchMap[patchi] == -1)
473 auto& result = tresult.ref();
480 auto& bf = result.boundaryFieldRef();
487 if (patchMap[patchi] != -1)
491 vf.
mesh().boundary()[patchMap[patchi]];
497 forAll(meshPoints, localI)
499 meshPointMap.
insert(meshPoints[localI], localI);
509 forAll(subMeshPoints, localI)
512 label meshPointi = pointMap[subMeshPoints[localI]];
514 const auto iter = meshPointMap.
cfind(meshPointi);
518 directAddressing[localI] = *iter;
550 const bool allowUnmapped
591 tresult.ref().oriented() = df.
oriented();
607 const bool allowUnmapped
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
const orientedType & oriented() const noexcept
Return oriented type.
A templated direct mapper for the given FieldMapper type.
virtual bool hasUnmapped() const
Any unmapped values?
Generic templated field type.
Generic GeometricField class.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
A HashTable to objects of type <T> with a label key.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
A List obtained as a section of another List.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
void size(const label n)
Older name for setAddressableSize.
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
Foam::calculatedFvsPatchField.
A calculated boundary condition for pointField.
This boundary condition provides an 'empty' condition for reduced dimensions cases,...
Foam::emptyFvsPatchField.
An empty boundary condition for pointField.
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
const labelList & faceMap() const
Return face map.
const labelList & cellMap() const
Return cell map.
const labelList & patchMap() const
Return patch map.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const Time & time() const
Return the top-level database.
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.
virtual label size() const
Return size.
virtual label start() const
Return start label of this patch in the polyMesh face list.
const polyPatch & patch() const
Return the polyPatch.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Mesh representing a set of points created from polyMesh.
const Time & time() const
Return Time from polyMesh.
const objectRegistry & thisDb() const
Return database. For now is its polyMesh.
const pointBoundaryMesh & boundary() const
Return reference to boundary mesh.
Abstract base class for point-mesh patch fields.
Basic pointPatch represents a set of points from the mesh.
virtual const labelList & meshPoints() const =0
Return mesh points.
virtual label size() const =0
Return size.
label whichFace(const label l) const
Return label of face in patch from global face label.
label nInternalFaces() const noexcept
Number of internal faces.
bool interpolate() const noexcept
Same as isPointData()
A class for managing temporary objects.
DirectFieldMapper< fvPatchFieldMapper > directFvPatchFieldMapper
A fvPatchFieldMapper with direct mapping.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
DirectFieldMapper< pointPatchFieldMapper > directPointPatchFieldMapper
A direct pointPatchFieldMapper.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define forAll(list, i)
Loop across all elements in list.
Functor to negate primitives. Dummy for most other types.