Given the original mesh and the list of selected cells, it creates the mesh consisting only of the desired cells, with the mapping list for points, faces, and cells. More...
Public Member Functions | |
fvMeshSubset (const fvMesh &baseMesh) | |
Construct given a mesh to subset. 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 maps and subsetting. More... | |
void | setCellSubset (const bitSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
Define cell subset based on the selectedCells. More... | |
void | setCellSubset (const labelUList &selectedCells, const label patchID=-1, const bool syncPar=true) |
void | setCellSubset (const labelHashSet &selectedCells, const label patchID=-1, const bool syncPar=true) |
void | setCellSubset (const label regioni, const labelUList ®ions, const label patchID=-1, const bool syncCouples=true) |
Define cell subset, using the cells for which region == regioni. More... | |
labelList | getExposedFaces (const bitSet &selectedCells, const bool syncCouples=true) const |
Get labels of exposed faces. More... | |
labelList | getExposedFaces (const label regioni, const labelUList ®ions, const bool syncCouples=true) const |
Get labels of exposed faces. More... | |
void | setCellSubset (const bitSet &selectedCells, const labelList &exposedFaces, const labelList &patchIDs, const bool syncCouples=true) |
For every exposed face (from above getExposedFaces) More... | |
void | setCellSubset (const label regioni, const labelList ®ions, const labelList &exposedFaces, const labelList &patchIDs, const bool syncCouples=true) |
For every exposed face (from above getExposedFaces) More... | |
template<class Type > | |
tmp< GeometricField< Type, fvPatchField, volMesh > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &, const bool allowUnmapped=false) const |
template<class Type > | |
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. More... | |
template<class Type > | |
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. More... | |
template<class Type > | |
tmp< DimensionedField< Type, volMesh > > | interpolate (const DimensionedField< Type, volMesh > &, const bool allowUnmapped=false) const |
Map Dimensioned. Optional unmapped argument not used. More... | |
void | setLargeCellSubset (const labelUList ®ion, const label currentRegion, const label patchID=-1, const bool syncCouples=true) |
Deprecated(2018-07) old method name and old parameter ordering. More... | |
void | setLargeCellSubset (const labelHashSet &globalCellMap, const label patchID=-1, const bool syncPar=true) |
Deprecated(2018-07) old method name. More... | |
void | setLargeCellSubset (const labelList ®ions, const label regioni, const labelList &exposedFaces, const labelList &patchIDs, const bool syncCouples=true) |
Deprecated(2018-07) method. More... | |
Static Public Member Functions | |
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. Optionally allow unmapped faces not to produce. 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. Optionally negates value if flipping. 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... | |
template<class Type > | |
static tmp< DimensionedField< Type, volMesh > > | interpolate (const DimensionedField< Type, volMesh > &, const fvMesh &sMesh, const labelUList &cellMap) |
Map dimensioned field. More... | |
Static Public Attributes | |
static word | exposedPatchName |
Name for exposed internal faces (default: oldInternalFaces) More... | |
Given the original mesh and the list of selected cells, it creates the mesh consisting only of the desired cells, with the mapping list for points, faces, and cells.
Puts all exposed internal faces into either
Definition at line 73 of file fvMeshSubset.H.
|
explicit |
Construct given a mesh to subset.
Definition at line 474 of file fvMeshSubset.C.
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 setCellSubset() for more details.
Definition at line 487 of file fvMeshSubset.C.
References patchID.
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 setCellSubset() for more details.
Definition at line 515 of file fvMeshSubset.C.
References patchID.
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 setCellSubset() for more details.
Definition at line 501 of file fvMeshSubset.C.
References patchID.
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 setCellSubset() for more details.
Definition at line 529 of file fvMeshSubset.C.
References patchID.
|
inlinenoexcept |
Original mesh.
Definition at line 30 of file fvMeshSubsetI.H.
Referenced by zoneSubSet::baseMesh(), 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().
|
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(), and structuredRenumber::renumber().
|
inline |
Return patch map.
Definition at line 99 of file fvMeshSubsetI.H.
Referenced by fvMeshDistribute::distribute().
void clear | ( | ) |
Reset maps and subsetting.
Definition at line 545 of file fvMeshSubset.C.
void setCellSubset | ( | const bitSet & | selectedCells, |
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Define cell subset based on the selectedCells.
Create "oldInternalFaces" patch for exposed internal faces (patchID==-1) or use supplied patch. Handles coupled patches if necessary by making coupled patch face part of patchID (so uncoupled)
Definition at line 558 of file fvMeshSubset.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cells(), clear(), PtrList< T >::clone(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, Pstream::gatherList(), Foam::identity(), primitiveMesh::isInternalFace(), Foam::labelMax, Pstream::listCombineGather(), Pstream::listCombineScatter(), UPstream::myProcNo(), Foam::name(), polyBoundaryMesh::names(), autoPtr< T >::New(), primitiveMesh::nInternalFaces(), IOobject::NO_READ, IOobject::NO_WRITE, UPstream::nProcs(), UPstream::parRun(), patchID, patchNames(), polyMesh::points(), Foam::reduce(), List< T >::resize(), Pstream::scatterList(), List< T >::setSize(), bitSet::sortedToc(), polyPatch::start(), bitSet::test(), timeName, and Foam::Zero.
Referenced by fvMeshSubset::setLargeCellSubset().
void setCellSubset | ( | const labelUList & | selectedCells, |
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Define cell subset, using the specified cells to define the selection
Definition at line 1196 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
void setCellSubset | ( | const labelHashSet & | selectedCells, |
const label | patchID = -1 , |
||
const bool | syncPar = true |
||
) |
Define cell subset, using the specified cells labelHashSet to define the selection
Definition at line 1212 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
void setCellSubset | ( | const label | regioni, |
const labelUList & | regions, | ||
const label | patchID = -1 , |
||
const bool | syncCouples = true |
||
) |
Define cell subset, using the cells for which region == regioni.
Definition at line 1228 of file fvMeshSubset.C.
References Foam::BitSetOps::create(), and patchID.
Foam::labelList getExposedFaces | ( | const bitSet & | selectedCells, |
const bool | syncCouples = true |
||
) | const |
Get labels of exposed faces.
These are
Definition at line 1245 of file fvMeshSubset.C.
References removeCells::getExposedFaces().
Foam::labelList getExposedFaces | ( | const label | regioni, |
const labelUList & | regions, | ||
const bool | syncCouples = true |
||
) | const |
Get labels of exposed faces.
These are
Definition at line 1257 of file fvMeshSubset.C.
References removeCells::getExposedFaces().
void setCellSubset | ( | const bitSet & | selectedCells, |
const labelList & | exposedFaces, | ||
const labelList & | patchIDs, | ||
const bool | syncCouples = true |
||
) |
For every exposed face (from above getExposedFaces)
used supplied (existing!) patch
Definition at line 1270 of file fvMeshSubset.C.
void setCellSubset | ( | const label | regioni, |
const labelList & | regions, | ||
const labelList & | exposedFaces, | ||
const labelList & | patchIDs, | ||
const bool | syncCouples = true |
||
) |
For every exposed face (from above getExposedFaces)
used supplied (existing!) patch
Definition at line 1288 of file fvMeshSubset.C.
|
static |
Map volume field. Optionally allow unmapped faces not to produce.
a warning
Referenced by momentumError::calcMomentError(), momentumError::divDevRhoReff(), and fvMeshSubsetProxy::interpolate().
tmp<GeometricField<Type, fvPatchField, volMesh> > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
|
static |
Map surface field. Optionally negates value if flipping.
a face (from exposing an internal face)
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 (not currently used)
|
static |
Map point field.
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 (not currently used)
|
static |
Map dimensioned field.
tmp<DimensionedField<Type, volMesh> > interpolate | ( | const DimensionedField< Type, volMesh > & | , |
const bool | allowUnmapped = false |
||
) | const |
Map Dimensioned. Optional unmapped argument not used.
|
inline |
Deprecated(2018-07) old method name and old parameter ordering.
Definition at line 432 of file fvMeshSubset.H.
References Foam::Info, Foam::nl, patchID, and fvMeshSubset::setCellSubset().
|
inline |
Deprecated(2018-07) old method name.
Definition at line 455 of file fvMeshSubset.H.
References Foam::Info, Foam::nl, patchID, and fvMeshSubset::setCellSubset().
|
inline |
Deprecated(2018-07) method.
For every exposed face (from getExposedFaces) use supplied (existing!) patch ids
Definition at line 473 of file fvMeshSubset.H.
References Foam::Info, Foam::nl, and fvMeshSubset::setCellSubset().
|
static |
Name for exposed internal faces (default: oldInternalFaces)
Definition at line 161 of file fvMeshSubset.H.