Support for overset functionality. More...
#include <oversetFvMeshBase.H>


Public Member Functions | |
| TypeName ("oversetFvMeshBase") | |
| Runtime type information. | |
| oversetFvMeshBase (const fvMesh &mesh, const bool doInit=true) | |
| Construct from IOobject. | |
| virtual | ~oversetFvMeshBase () |
| Destructor. | |
| const fvMeshPrimitiveLduAddressing & | primitiveLduAddr () const |
| Return extended ldu addressing. | |
| virtual const lduAddressing & | lduAddr () const |
| Return ldu addressing. If active: is (extended). | |
| virtual lduInterfacePtrsList | interfaces () const |
| Return a list of pointers for each patch. | |
| const labelList & | reverseFaceMap () const |
| Return old to new face addressing. | |
| bool | active () const |
| Return true if using extended addressing. | |
| void | active (const bool f) const |
| Enable/disable extended addressing. | |
| template<class Type> | |
| void | addInterpolation (fvMatrix< Type > &m, const scalarField &normalisation, const bool setHoleCellValue, const Type &holeCellValue) const |
| Manipulate the matrix to add the interpolation/set hole. | |
| void | clearOut () |
| Clear out local storage. | |
| virtual bool | update () |
| Update the mesh for both mesh motion and topology change. | |
| virtual bool | interpolateFields () |
| Update fields when mesh is updated. | |
| virtual bool | writeObject (IOstreamOption streamOpt, const bool writeOnProc) const |
| Write using stream options. | |
| template<class Type> | |
| tmp< scalarField > | normalisation (const fvMatrix< Type > &m) const |
| Determine normalisation for interpolation. This equals the original diagonal except stabilised for zero diagonals (possible in hole cells). | |
| template<class Type> | |
| Foam::tmp< Foam::scalarField > | normalisation (const fvMatrix< Type > &m) const |
| template<class Type> | |
| Foam::SolverPerformance< Type > | solveOverset (fvMatrix< Type > &m, const dictionary &dict) const |
Static Public Member Functions | |
| template<class GeoField> | |
| static void | checkCoupledBC (const GeoField &fld) |
| Debug: check halo swap is ok. | |
| template<class GeoField, class PatchType, bool TypeOnly> | |
| static void | correctBoundaryConditions (typename GeoField::Boundary &bfld) |
| Correct boundary conditions of certain type (TypeOnly = true) or explicitly not of the type (TypeOnly = false). | |
Protected Member Functions | |
| virtual bool | updateAddressing () const |
| Calculate the extended lduAddressing. | |
| template<class Type> | |
| void | write (Ostream &, const fvMatrix< Type > &, const lduAddressing &, const lduInterfacePtrsList &) const |
| Debug: print matrix. | |
| template<class Type> | |
| void | scaleConnection (Field< Type > &coeffs, const labelUList &types, const scalarList &factor, const bool setHoleCellValue, const label celli, const label facei) const |
| Freeze values at holes. | |
| template<class Type> | |
| SolverPerformance< Type > | solveOverset (fvMatrix< Type > &m, const dictionary &) const |
| Solve given dictionary with settings. | |
| scalar | cellAverage (const labelUList &types, const labelUList &nbrTypes, const scalarField &norm, const scalarField &nbrNorm, const label celli, bitSet &isFront) const |
| Average norm of valid neighbours. | |
| void | writeAgglomeration (const GAMGAgglomeration &agglom) const |
| Debug: dump agglomeration. | |
Static Protected Member Functions | |
| template<class GeoField> | |
| static void | correctCoupledBoundaryConditions (GeoField &fld) |
| Debug: correct coupled bc. | |
Protected Attributes | |
| const fvMesh & | mesh_ |
| Reference to mesh. | |
| bool | active_ |
| Select base addressing (false) or locally stored extended. | |
| autoPtr< fvMeshPrimitiveLduAddressing > | lduPtr_ |
| Extended addressing (extended with local interpolation stencils). | |
| PtrList< const lduPrimitiveProcessorInterface > | remoteStencilInterfaces_ |
| Added (processor)lduInterfaces for remote bits of stencil. | |
| lduInterfacePtrsList | allInterfaces_ |
| Interfaces for above mesh. Contains both original and above added processorLduInterfaces. | |
| labelListList | stencilFaces_ |
| Corresponding faces (in above lduPtr) to the stencil. | |
| labelListList | stencilPatches_ |
| Corresponding patches (in above lduPtr) to the stencil. | |
| labelList | reverseFaceMap_ |
| From old to new face labels. | |
| oversetFvMeshBase | ( | const fvMesh & | mesh, |
| const bool | doInit = true ) |
Construct from IOobject.
Definition at line 514 of file oversetFvMeshBase.C.
References active_, mesh, mesh_, and MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New().

|
virtual |
Destructor.
Definition at line 526 of file oversetFvMeshBase.C.
|
protectedvirtual |
Calculate the extended lduAddressing.
Definition at line 39 of file oversetFvMeshBase.C.
References fvMeshPrimitiveLduAddressing::addAddressing(), allInterfaces_, List< T >::append(), boundary, Foam::endl(), Pstream::exchange(), forAll, interface(), lduPtr_, lduAddressing::lowerAddr(), mesh_, UPstream::msgType(), UPstream::myProcNo(), MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), lduPrimitiveMesh::nonBlockingSchedule(), UPstream::nProcs(), overlap, lduAddressing::patchAddr(), patches, Foam::Pout, pp(), remoteStencilInterfaces_, reverseFaceMap_, UPtrList< T >::set(), UPtrList< T >::setSize(), lduAddressing::size(), UList< T >::size(), UPtrList< T >::size(), stencilFaces_, stencilPatches_, globalIndex::toGlobal(), globalIndex::toLocal(), lduAddressing::upperAddr(), and globalIndex::whichProcID().
Referenced by interfaces(), lduAddr(), and update().


|
protected |
Debug: print matrix.
Definition at line 849 of file oversetFvMeshBaseTemplates.C.
References List< T >::append(), fvMatrix< Type >::boundaryCoeffs(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), Foam::diag(), lduMatrix::diag(), Foam::endl(), forAll, interfaces(), fvMatrix< Type >::internalCoeffs(), Foam::isA(), lduAddressing::losortAddr(), lduAddressing::losortStartAddr(), lduMatrix::lower(), lduAddressing::lowerAddr(), processorLduInterface::myProcNo(), processorLduInterface::neighbProcNo(), os(), lduAddressing::ownerStartAddr(), lduAddressing::patchAddr(), fvMatrix< Type >::psi(), Foam::refCast(), GeometricBoundaryField< Type, PatchField, GeoMesh >::scalarInterfaces(), UPtrList< T >::set(), lduAddressing::size(), UList< T >::size(), fvMatrix< Type >::source(), lduMatrix::upper(), and lduAddressing::upperAddr().

|
protected |
Freeze values at holes.
template<class Type> void freezeHoles(fvMatrix<Type>&) const;
Scale coefficient depending on cell type
Definition at line 32 of file oversetFvMeshBaseTemplates.C.
References f(), cellCellStencil::HOLE, cellCellStencil::INTERPOLATED, and cellCellStencil::SPECIAL.
Referenced by addInterpolation().


|
protected |
Solve given dictionary with settings.
References fld().
Referenced by dynamicOversetFvMesh::solve(), dynamicOversetFvMesh::solve(), dynamicOversetFvMesh::solve(), dynamicOversetFvMesh::solve(), staticOversetFvMesh::solve(), staticOversetFvMesh::solve(), staticOversetFvMesh::solve(), and staticOversetFvMesh::solve().


|
staticprotected |
Debug: correct coupled bc.
Definition at line 976 of file oversetFvMeshBaseTemplates.C.
References fld().
Referenced by checkCoupledBC().


|
protected |
Average norm of valid neighbours.
Definition at line 353 of file oversetFvMeshBase.C.
References mesh_, and bitSet::set().
Referenced by normalisation().


|
protected |
Debug: dump agglomeration.
Definition at line 411 of file oversetFvMeshBase.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), correctBoundaryConditions(), Foam::dimless, Foam::endl(), fld(), forAll, Foam::identity(), Foam::Info, Foam::invertOneToMany(), Foam::max(), mesh_, Foam::name(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), GAMGAgglomeration::restrictAddressing(), Foam::returnReduce(), GAMGAgglomeration::size(), UList< T >::size(), regIOobject::write(), and Foam::Zero.

| TypeName | ( | "oversetFvMeshBase" | ) |
Runtime type information.
References mesh.
| const Foam::fvMeshPrimitiveLduAddressing & primitiveLduAddr | ( | ) | const |
Return extended ldu addressing.
Definition at line 564 of file oversetFvMeshBase.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and lduPtr_.
Referenced by active().


|
virtual |
Return ldu addressing. If active: is (extended).
primitiveLduAddr
Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.
Definition at line 532 of file oversetFvMeshBase.C.
References active_, lduPtr_, mesh_, and updateAddressing().
Referenced by addInterpolation(), dynamicOversetFvMesh::lduAddr(), and staticOversetFvMesh::lduAddr().


|
virtual |
Return a list of pointers for each patch.
with only those pointing to interfaces being set. If active: return additional remoteStencilInterfaces_
Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.
Definition at line 548 of file oversetFvMeshBase.C.
References active_, allInterfaces_, lduPtr_, mesh_, and updateAddressing().
Referenced by addInterpolation(), dynamicOversetFvMesh::interfaces(), staticOversetFvMesh::interfaces(), and write().


|
inline |
Return old to new face addressing.
Definition at line 242 of file oversetFvMeshBase.H.
References reverseFaceMap_.
|
inline |
Return true if using extended addressing.
Definition at line 250 of file oversetFvMeshBase.H.
References active_.
Referenced by solveOverset().

|
inline |
Enable/disable extended addressing.
Definition at line 258 of file oversetFvMeshBase.H.
References active_, allInterfaces_, DebugInfo, Foam::endl(), f(), fvMeshPrimitiveLduAddressing::lowerAddr(), mesh_, primitiveLduAddr(), and UList< T >::size().

| void addInterpolation | ( | fvMatrix< Type > & | m, |
| const scalarField & | normalisation, | ||
| const bool | setHoleCellValue, | ||
| const Type & | holeCellValue ) const |
Manipulate the matrix to add the interpolation/set hole.
values
Definition at line 281 of file oversetFvMeshBaseTemplates.C.
References allInterfaces_, fvMatrix< Type >::boundaryCoeffs(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), GeometricField< Type, PatchField, GeoMesh >::constCast(), Foam::diag(), lduMatrix::diag(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, cellCellStencil::HOLE, Foam::inplaceReorder(), interfaces(), fvMatrix< Type >::internalCoeffs(), cellCellStencil::INTERPOLATED, Foam::isA(), lduAddr(), lduMatrix::lower(), lduAddressing::lowerAddr(), mesh_, MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), normalisation(), overlap, lduAddressing::patchAddr(), fvMatrix< Type >::psi(), reverseFaceMap_, s(), scaleConnection(), PtrList< T >::setSize(), UList< T >::size(), fvMatrix< Type >::source(), cellCellStencil::SPECIAL, stencilFaces_, stencilPatches_, lduMatrix::upper(), lduAddressing::upperAddr(), and Foam::Zero.

| void clearOut | ( | ) |
Clear out local storage.
Definition at line 576 of file oversetFvMeshBase.C.
References lduPtr_.
Referenced by cellCellStencilObject::movePoints().

|
virtual |
Update the mesh for both mesh motion and topology change.
Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.
Definition at line 584 of file oversetFvMeshBase.C.
References interpolateFields(), and updateAddressing().
Referenced by staticOversetFvMesh::staticOversetFvMesh(), dynamicOversetFvMesh::update(), and staticOversetFvMesh::update().


|
virtual |
Update fields when mesh is updated.
Definition at line 602 of file oversetFvMeshBase.C.
References HashSet< Key, Hash >::insert(), mesh_, MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), overlap, and dictionary::toc().
Referenced by update().


|
virtual |
Write using stream options.
Do not correctBoundaryConditions since re-interpolates!
volDonorZoneID.correctBoundaryConditions();
Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.
Definition at line 629 of file oversetFvMeshBase.C.
References cellTypes, cellCellStencil::correctBoundaryConditions(), GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), Foam::dimless, Foam::endl(), forAll, GeometricField< Type, PatchField, GeoMesh >::internalField(), mesh_, MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, overlap, UList< T >::size(), WarningInFunction, regIOobject::writeObject(), Foam::Zero, and fvPatchFieldBase::zeroGradientType().
Referenced by dynamicOversetFvMesh::writeObject(), and staticOversetFvMesh::writeObject().


|
static |
Debug: check halo swap is ok.
Definition at line 984 of file oversetFvMeshBaseTemplates.C.
References correctCoupledBoundaryConditions(), Foam::endl(), fld(), forAll, and Foam::Pout.

|
static |
Correct boundary conditions of certain type (TypeOnly = true) or explicitly not of the type (TypeOnly = false).
Definition at line 70 of file oversetFvMeshBaseTemplates.C.
References Foam::isA().
Referenced by solveOverset(), cellVolumeWeight::update(), inverseDistance::update(), trackingInverseDistance::update(), and writeAgglomeration().


| tmp< scalarField > normalisation | ( | const fvMatrix< Type > & | m | ) | const |
Determine normalisation for interpolation. This equals the original diagonal except stabilised for zero diagonals (possible in hole cells).
Referenced by addInterpolation(), and solveOverset().

| Foam::tmp< Foam::scalarField > normalisation | ( | const fvMatrix< Type > & | m | ) | const |
Definition at line 99 of file oversetFvMeshBaseTemplates.C.
References cellAverage(), Field< Type >::component(), lduMatrix::diag(), Foam::endl(), forAll, cellCellStencil::HOLE, fvMatrix< Type >::internalCoeffs(), Foam::magSqr(), mesh_, n, IOobject::name(), MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), tmp< T >::New(), overlap, Foam::Pout, fvMatrix< Type >::psi(), tmp< T >::ref(), Foam::returnReduce(), Foam::returnReduceOr(), bitSet::set(), Foam::sqr(), syncTools::swapBoundaryCellList(), syncTools::syncFaceList(), and List< T >::transfer().

| Foam::SolverPerformance< Type > solveOverset | ( | fvMatrix< Type > & | m, |
| const dictionary & | dict ) const |
Definition at line 690 of file oversetFvMeshBaseTemplates.C.
References active(), fvMatrix< Type >::boundaryCoeffs(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), fvMatrix< Type >::boundaryManipulate(), cellCellStencil::CALCULATED, GeometricField< Type, PatchField, GeoMesh >::constCast(), correctBoundaryConditions(), lduMatrix::diag(), dict, Foam::dimless, Foam::endl(), DimensionedField< Type, GeoMesh >::field(), forAll, cellCellStencil::HOLE, fvMatrix< Type >::internalCoeffs(), Foam::isA(), lduMatrix::lower(), mesh_, IOobject::name(), MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, normalisation(), overlap, Foam::Pout, fvMatrix< Type >::psi(), psi, GeometricField< Type, PatchField, GeoMesh >::ref(), s(), fvMatrix< Type >::source(), List< T >::transfer(), lduMatrix::upper(), regIOobject::write(), and Foam::Zero.

|
protected |
Reference to mesh.
Definition at line 73 of file oversetFvMeshBase.H.
Referenced by active(), addInterpolation(), cellAverage(), interfaces(), interpolateFields(), lduAddr(), normalisation(), oversetFvMeshBase(), solveOverset(), updateAddressing(), writeAgglomeration(), and writeObject().
|
mutableprotected |
Select base addressing (false) or locally stored extended.
lduAddressing (true)
Definition at line 80 of file oversetFvMeshBase.H.
Referenced by active(), active(), interfaces(), lduAddr(), and oversetFvMeshBase().
|
mutableprotected |
Extended addressing (extended with local interpolation stencils).
Definition at line 85 of file oversetFvMeshBase.H.
Referenced by clearOut(), interfaces(), lduAddr(), primitiveLduAddr(), and updateAddressing().
|
mutableprotected |
Added (processor)lduInterfaces for remote bits of stencil.
Definition at line 91 of file oversetFvMeshBase.H.
Referenced by updateAddressing().
|
mutableprotected |
Interfaces for above mesh. Contains both original and above added processorLduInterfaces.
Definition at line 97 of file oversetFvMeshBase.H.
Referenced by active(), addInterpolation(), interfaces(), and updateAddressing().
|
mutableprotected |
Corresponding faces (in above lduPtr) to the stencil.
Definition at line 102 of file oversetFvMeshBase.H.
Referenced by addInterpolation(), and updateAddressing().
|
mutableprotected |
Corresponding patches (in above lduPtr) to the stencil.
Definition at line 107 of file oversetFvMeshBase.H.
Referenced by addInterpolation(), and updateAddressing().
|
mutableprotected |
From old to new face labels.
Definition at line 112 of file oversetFvMeshBase.H.
Referenced by addInterpolation(), reverseFaceMap(), and updateAddressing().