Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the subMesh) with mapping lists for points, faces, and cells. More...
Public Member Functions | |
fvMeshSubset (const fvMesh &baseMesh) | |
Construct using the entire mesh (no subset) More... | |
fvMeshSubset (const fvMesh &baseMesh, const Foam::zero) | |
Construct a zero-sized subset mesh, non-processor patches only. More... | |
fvMeshSubset (const fvMesh &baseMesh, const bitSet &selectedCells, const label patchID=-1, const bool syncPar=true) | |
Construct for a cell-subset of the given mesh. More... | |
fvMeshSubset (const fvMesh &baseMesh, const labelUList &selectedCells, const label patchID=-1, const bool syncPar=true) | |
Construct for a cell-subset of the given mesh. More... | |
fvMeshSubset (const fvMesh &baseMesh, const labelHashSet &selectedCells, const label patchID=-1, const bool syncPar=true) | |
Construct for a cell-subset of the given mesh. More... | |
fvMeshSubset (const fvMesh &baseMesh, const label regioni, const labelUList ®ions, const label patchID=-1, const bool syncPar=true) | |
Construct for a cell-subset of the given mesh. More... | |
const fvMesh & | baseMesh () const noexcept |
Original mesh. More... | |
const fvMesh & | mesh () const noexcept |
Return baseMesh or subMesh, depending on the current state. More... | |
bool | hasSubMesh () const noexcept |
Have subMesh? More... | |
const fvMesh & | subMesh () const |
Return reference to subset mesh. More... | |
fvMesh & | subMesh () |
Return reference to subset mesh. More... | |
const labelList & | pointMap () const |
Return point map. More... | |
const labelList & | faceMap () const |
Return face map. More... | |
const labelList & | faceFlipMap () const |
Return face map with sign to encode flipped faces. More... | |
const labelList & | cellMap () const |
Return cell map. More... | |
const labelList & | patchMap () const |
Return patch map. More... | |
void | clear () |
Reset subMesh and all maps. More... | |
void | reset () |
Reset subMesh and all maps. Same as clear() More... | |
void | reset (const Foam::zero) |
Reset to a zero-sized subset mesh, non-processor patches only. More... | |
void | reset (autoPtr< fvMesh > &&subMeshPtr, labelList &&pointMap, labelList &&faceMap, labelList &&cellMap, labelList &&patchMap) |
Reset from components. More... | |
void | reset (const bitSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. More... | |
void | reset (const labelUList &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. More... | |
void | reset (const labelHashSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. More... | |
void | reset (const label regioni, const labelUList ®ions, const label patchID=-1, const bool syncCouples=true) |
Use the cells of cells corresponding to where region == regioni. More... | |
void | setCellSubset (const bitSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. Same as reset() More... | |
void | setCellSubset (const labelUList &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. Same as reset() More... | |
void | setCellSubset (const labelHashSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. Same as reset() More... | |
void | setCellSubset (const label regioni, const labelUList ®ions, const label patchID=-1, const bool syncPar=true) |
Use the specified subset of cells. Same as reset() More... | |
template<class Type > | |
tmp< DimensionedField< Type, volMesh > > | interpolate (const DimensionedField< Type, volMesh > &, const bool allowUnmapped=false) const |
template<class Type > | |
tmp< GeometricField< Type, fvPatchField, volMesh > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &, const bool allowUnmapped=false) const |
Map volume field. More... | |
template<class Type > | |
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > | interpolate (const GeometricField< Type, fvsPatchField, surfaceMesh > &, const bool allowUnmapped=false) const |
Map surface field. More... | |
template<class Type > | |
tmp< GeometricField< Type, pointPatchField, pointMesh > > | interpolate (const GeometricField< Type, pointPatchField, pointMesh > &, const bool allowUnmapped=false) const |
Map point field. More... | |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &vf, const fvMesh &sMesh, const labelUList &patchMap, const labelUList &cellMap, const labelUList &faceMap, const bool allowUnmapped) |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &vf, const bool allowUnmapped) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > | interpolate (const GeometricField< Type, fvsPatchField, surfaceMesh > &vf, const fvMesh &sMesh, const labelUList &patchMap, const labelUList &cellMap, const labelUList &faceMap) |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > | interpolate (const GeometricField< Type, fvsPatchField, surfaceMesh > &sf, const bool allowUnmapped) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > | interpolate (const GeometricField< Type, pointPatchField, pointMesh > &vf, const pointMesh &sMesh, const labelUList &patchMap, const labelUList &pointMap) |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > | interpolate (const GeometricField< Type, pointPatchField, pointMesh > &sf, const bool allowUnmapped) const |
template<class Type > | |
Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > | interpolate (const DimensionedField< Type, volMesh > &df, const fvMesh &sMesh, const labelUList &cellMap) |
template<class Type > | |
Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > | interpolate (const DimensionedField< Type, volMesh > &df, const bool allowUnmapped) const |
Static Public Member Functions | |
template<class Type > | |
static tmp< DimensionedField< Type, volMesh > > | interpolate (const DimensionedField< Type, volMesh > &, const fvMesh &sMesh, const labelUList &cellMap) |
Map volume internal (dimensioned) field. More... | |
template<class Type > | |
static tmp< GeometricField< Type, fvPatchField, volMesh > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &, const fvMesh &sMesh, const labelUList &patchMap, const labelUList &cellMap, const labelUList &faceMap, const bool allowUnmapped=false) |
Map volume field. More... | |
template<class Type > | |
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > | interpolate (const GeometricField< Type, fvsPatchField, surfaceMesh > &, const fvMesh &sMesh, const labelUList &patchMap, const labelUList &cellMap, const labelUList &faceMap) |
Map surface field. More... | |
template<class Type > | |
static tmp< GeometricField< Type, pointPatchField, pointMesh > > | interpolate (const GeometricField< Type, pointPatchField, pointMesh > &, const pointMesh &sMesh, const labelUList &patchMap, const labelUList &pointMap) |
Map point field. More... | |
Static Public Attributes | |
static word | exposedPatchName |
Name for exposed internal faces (default: oldInternalFaces) More... | |
Protected Member Functions | |
bool | checkHasSubMesh () const |
FatalError if subset has not been performed. More... | |
fvMeshSubset (const fvMeshSubset &)=delete | |
No copy construct. More... | |
void | operator= (const fvMeshSubset &)=delete |
No copy assignment. More... | |
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the subMesh) with mapping lists for points, faces, and cells.
Can be constructed or reset to subset on the list of selected cells, which it creates as subMesh consisting only of the desired cells, with the mapping list for points, faces, and cells.
Places all exposed internal faces into either
Definition at line 79 of file fvMeshSubset.H.
|
protecteddelete |
No copy construct.
|
explicit |
Construct using the entire mesh (no subset)
Definition at line 402 of file fvMeshSubset.C.
fvMeshSubset | ( | const fvMesh & | baseMesh, |
const Foam::zero | |||
) |
Construct a zero-sized subset mesh, non-processor patches only.
Definition at line 414 of file fvMeshSubset.C.
References fvMeshSubset::reset().
fvMeshSubset | ( | const fvMesh & | baseMesh, |
const bitSet & | selectedCells, | ||
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Construct for a cell-subset of the given mesh.
See reset() for more details.
Definition at line 422 of file fvMeshSubset.C.
References patchID, and fvMeshSubset::reset().
fvMeshSubset | ( | const fvMesh & | baseMesh, |
const labelUList & | selectedCells, | ||
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Construct for a cell-subset of the given mesh.
See reset() for more details.
Definition at line 436 of file fvMeshSubset.C.
References patchID, and fvMeshSubset::reset().
fvMeshSubset | ( | const fvMesh & | baseMesh, |
const labelHashSet & | selectedCells, | ||
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Construct for a cell-subset of the given mesh.
See reset() for more details.
Definition at line 450 of file fvMeshSubset.C.
References patchID, and fvMeshSubset::reset().
fvMeshSubset | ( | const fvMesh & | baseMesh, |
const label | regioni, | ||
const labelUList & | regions, | ||
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Construct for a cell-subset of the given mesh.
See reset() for more details.
Definition at line 464 of file fvMeshSubset.C.
References patchID, and fvMeshSubset::reset().
|
protected |
FatalError if subset has not been performed.
Definition at line 113 of file fvMeshSubset.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
protecteddelete |
No copy assignment.
|
inlinenoexcept |
Original mesh.
Definition at line 30 of file fvMeshSubsetI.H.
Referenced by zoneSubSet::baseMesh(), zoneSubSet::mapToZone(), vtkWrite::writeVolFields(), and ensightWrite::writeVolFields().
|
inlinenoexcept |
Return baseMesh or subMesh, depending on the current state.
Definition at line 36 of file fvMeshSubsetI.H.
|
inlinenoexcept |
Have subMesh?
Definition at line 42 of file fvMeshSubsetI.H.
References bool.
Referenced by fvMeshSubsetProxy::interpolate(), and fvMeshSubsetProxy::interpolateInternal().
|
inline |
Return reference to subset mesh.
Definition at line 48 of file fvMeshSubsetI.H.
Referenced by structuredDecomp::decompose(), fvMeshDistribute::distribute(), fvMeshSubsetProxy::mesh(), structuredRenumber::renumber(), and momentumError::write().
|
inline |
Return reference to subset mesh.
Definition at line 56 of file fvMeshSubsetI.H.
|
inline |
Return point map.
Definition at line 64 of file fvMeshSubsetI.H.
Referenced by fvMeshDistribute::distribute().
|
inline |
Return face map.
Definition at line 72 of file fvMeshSubsetI.H.
Referenced by fvMeshDistribute::distribute(), and fvMeshSubset::interpolate().
|
inline |
Return face map with sign to encode flipped faces.
Definition at line 80 of file fvMeshSubsetI.H.
Referenced by fvMeshDistribute::distribute().
|
inline |
Return cell map.
Definition at line 91 of file fvMeshSubsetI.H.
Referenced by structuredDecomp::decompose(), fvMeshDistribute::distribute(), fvMeshSubset::interpolate(), zoneSubSet::mapToZone(), and structuredRenumber::renumber().
|
inline |
Return patch map.
Definition at line 99 of file fvMeshSubsetI.H.
Referenced by fvMeshDistribute::distribute(), and fvMeshSubset::interpolate().
void clear | ( | ) |
Reset subMesh and all maps.
Definition at line 481 of file fvMeshSubset.C.
void reset | ( | ) |
Reset subMesh and all maps. Same as clear()
Definition at line 493 of file fvMeshSubset.C.
References clear().
Referenced by fvMeshSubset::fvMeshSubset(), and fvMeshSubset::setCellSubset().
void reset | ( | const Foam::zero | ) |
Reset to a zero-sized subset mesh, non-processor patches only.
Definition at line 524 of file fvMeshSubset.C.
References clear(), forAll, Foam::identity(), polyBoundaryMesh::nNonProcessor(), IOobject::NO_READ, IOobject::NO_WRITE, PtrList< T >::set(), and UPtrList< T >::size().
void reset | ( | autoPtr< fvMesh > && | subMeshPtr, |
labelList && | pointMap, | ||
labelList && | faceMap, | ||
labelList && | cellMap, | ||
labelList && | patchMap | ||
) |
Reset from components.
subMeshPtr | Mesh subset |
pointMap | Point mapping |
faceMap | Face mapping |
cellMap | Cell mapping |
patchMap | Patch mapping |
Definition at line 499 of file fvMeshSubset.C.
References clear(), and Foam::faceMap().
Use the specified subset of cells.
Definition at line 582 of file fvMeshSubset.C.
References Foam::abort(), Pstream::allGatherList(), UList< T >::begin(), clear(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, Foam::identity(), Foam::labelMax, Pstream::listCombineAllGather(), processorFaPatch::myProcNo(), polyBoundaryMesh::names(), Time::New(), IOobject::NO_READ, IOobject::NO_WRITE, PstreamBuffers::nProcs(), UPstream::parRun(), patchID, patchNames(), Foam::reduce(), List< T >::resize(), PtrList< T >::resize(), PtrList< T >::set(), List< T >::setSize(), UPtrList< T >::size(), UList< T >::size(), bitSet::sortedToc(), polyPatch::start(), bitSet::test(), ensightPTraits< Type >::typeName, and Foam::Zero.
void reset | ( | const labelUList & | selectedCells, |
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Use the specified subset of cells.
Definition at line 1239 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
void reset | ( | const labelHashSet & | selectedCells, |
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Use the specified subset of cells.
Definition at line 1255 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
void reset | ( | const label | regioni, |
const labelUList & | regions, | ||
const label | patchID = -1 , |
||
const bool | syncCouples = true |
||
) |
Use the cells of cells corresponding to where region == regioni.
Definition at line 1271 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
|
inline |
Use the specified subset of cells. Same as reset()
Definition at line 294 of file fvMeshSubset.H.
References patchID, and fvMeshSubset::reset().
|
inline |
Use the specified subset of cells. Same as reset()
Definition at line 305 of file fvMeshSubset.H.
References patchID, and fvMeshSubset::reset().
|
inline |
Use the specified subset of cells. Same as reset()
Definition at line 316 of file fvMeshSubset.H.
References patchID, and fvMeshSubset::reset().
|
inline |
Use the specified subset of cells. Same as reset()
Definition at line 327 of file fvMeshSubset.H.
References patchID, and fvMeshSubset::reset().
|
static |
Map volume internal (dimensioned) field.
Referenced by momentumError::calcMomentError(), momentumError::divDevRhoReff(), and fvMeshSubsetProxy::interpolate().
|
static |
Map volume field.
Optionally allow unmapped faces not to produce a warning
|
static |
Map surface field.
Optionally negates value if flipping a face (from exposing an internal face)
|
static |
Map point field.
tmp< DimensionedField< Type, volMesh > > interpolate | ( | const DimensionedField< Type, volMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
Map volume internal (dimensioned) field Optional unmapped argument (currently unused)
tmp< GeometricField< Type, fvPatchField, volMesh > > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
Map volume field.
Optionally allow unmapped faces not to produce a warning
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
Map surface field.
Optionally allow unmapped faces not to produce a warning (currently unused)
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate | ( | const GeometricField< Type, pointPatchField, pointMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
Map point field.
Optionally allow unmapped points not to produce a warning (currently unused)
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | vf, |
const fvMesh & | sMesh, | ||
const labelUList & | patchMap, | ||
const labelUList & | cellMap, | ||
const labelUList & | faceMap, | ||
const bool | allowUnmapped | ||
) |
Definition at line 44 of file fvMeshSubsetTemplates.C.
References fvMesh::boundary(), faMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvMeshSubset::cellMap(), DimensionedField< Type, GeoMesh >::dimensions(), fvMeshSubset::faceMap(), fld(), forAll, DirectFieldMapper< FieldMapperType >::hasUnmapped(), DimensionedField< Type, GeoMesh >::mesh(), IOobject::name(), Foam::New(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::oriented(), fvMeshSubset::patchMap(), GeometricField< Type, PatchField, GeoMesh >::primitiveField(), PtrList< T >::set(), fvPatch::size(), UList< T >::size(), fvPatch::start(), fvMesh::time(), and Time::timeName().
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | vf, |
const bool | allowUnmapped | ||
) | const |
Definition at line 201 of file fvMeshSubsetTemplates.C.
References Foam::faceMap(), and Foam::interpolate().
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > interpolate | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | vf, |
const fvMesh & | sMesh, | ||
const labelUList & | patchMap, | ||
const labelUList & | cellMap, | ||
const labelUList & | faceMap | ||
) |
Definition at line 226 of file fvMeshSubsetTemplates.C.
References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), DimensionedField< Type, GeoMesh >::dimensions(), Foam::faceMap(), forAll, GeometricField< Type, PatchField, GeoMesh >::internalField(), DimensionedField< Type, GeoMesh >::mesh(), IOobject::name(), Foam::New(), primitiveMesh::nInternalFaces(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::oriented(), fvPatch::patch(), GeometricField< Type, PatchField, GeoMesh >::primitiveField(), PtrList< T >::set(), List< T >::set(), fvPatch::size(), UList< T >::size(), fvPatch::start(), fvMesh::time(), Time::timeName(), and polyPatch::whichFace().
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > interpolate | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | sf, |
const bool | allowUnmapped | ||
) | const |
Definition at line 390 of file fvMeshSubsetTemplates.C.
References Foam::faceMap(), and Foam::interpolate().
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > interpolate | ( | const GeometricField< Type, pointPatchField, pointMesh > & | vf, |
const pointMesh & | sMesh, | ||
const labelUList & | patchMap, | ||
const labelUList & | pointMap | ||
) |
Definition at line 414 of file fvMeshSubsetTemplates.C.
References pointMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), HashTable< T, Key, Hash >::cfind(), DimensionedField< Type, GeoMesh >::dimensions(), forAll, HashTable< T, Key, Hash >::insert(), DimensionedField< Type, GeoMesh >::mesh(), pointPatch::meshPoints(), IOobject::name(), Foam::New(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::oriented(), GeometricField< Type, PatchField, GeoMesh >::primitiveField(), PtrList< T >::set(), List< T >::set(), pointPatch::size(), UList< T >::size(), pointMesh::thisDb(), pointMesh::time(), and Time::timeName().
Foam::tmp< Foam::GeometricField< Type, Foam::pointPatchField, Foam::pointMesh > > interpolate | ( | const GeometricField< Type, pointPatchField, pointMesh > & | sf, |
const bool | allowUnmapped | ||
) | const |
Definition at line 547 of file fvMeshSubsetTemplates.C.
References Foam::interpolate(), and Time::New().
Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > interpolate | ( | const DimensionedField< Type, volMesh > & | df, |
const fvMesh & | sMesh, | ||
const labelUList & | cellMap | ||
) |
Definition at line 570 of file fvMeshSubsetTemplates.C.
References DimensionedField< Type, GeoMesh >::dimensions(), IOobject::name(), Foam::New(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::oriented(), fvMesh::time(), and Time::timeName().
Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > interpolate | ( | const DimensionedField< Type, volMesh > & | df, |
const bool | allowUnmapped | ||
) | const |
Definition at line 604 of file fvMeshSubsetTemplates.C.
References Foam::interpolate().
|
static |
Name for exposed internal faces (default: oldInternalFaces)
Definition at line 140 of file fvMeshSubset.H.