37 #ifndef oversetFvMeshBase_H 38 #define oversetFvMeshBase_H 50 class lduPrimitiveProcessorInterface;
51 class GAMGAgglomeration;
126 const bool setHoleCellValue,
140 template<
class GeoField>
206 void active(
const bool f)
const 212 DebugInfo<<
"Switching to extended addressing with nFaces:" 219 DebugInfo<<
"Switching to base addressing with nFaces:" 220 <<
mesh_.fvMesh::lduAddr().lowerAddr().
size()
221 <<
" nInterfaces:" <<
mesh_.fvMesh::interfaces().
size()
236 const bool setHoleCellValue,
237 const Type& holeCellValue
255 template<
class GeoField>
260 template<
class GeoField,
class PatchType>
263 typename GeoField::Boundary& bfld,
void size(const label n)
Older name for setAddressableSize.
TypeName("oversetFvMeshBase")
Runtime type information.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static void checkCoupledBC(const GeoField &fld)
Debug: check halo swap is ok.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fvMeshPrimitiveLduAddressing & primitiveLduAddr() const
Return extended ldu addressing.
lduInterfacePtrsList allInterfaces_
Interfaces for above mesh. Contains both original and above added processorLduInterfaces.
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.
label size() const noexcept
The number of elements in table.
A simple container for options an IOstream can normally have.
tmp< scalarField > normalisation(const fvMatrix< Type > &m) const
Determine normalisation for interpolation. This equals the original diagonal except stabilised for ze...
static void correctCoupledBoundaryConditions(GeoField &fld)
Debug: correct coupled bc.
SolverPerformance< Type > solveOverset(fvMatrix< Type > &m, const dictionary &) const
Solve given dictionary with settings.
labelList reverseFaceMap_
From old to new face labels.
labelListList stencilFaces_
Corresponding faces (in above lduPtr) to the stencil.
virtual const labelUList & lowerAddr() const noexcept
Return lower addressing (i.e. lower label = upper triangle)
Generic templated field type.
bool active() const
Return true if using extended addressing.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void addInterpolation(fvMatrix< Type > &m, const scalarField &normalisation, const bool setHoleCellValue, const Type &holeCellValue) const
Manipulate the matrix to add the interpolation/set hole.
label size() const noexcept
The number of elements in the list.
scalar cellAverage(const labelList &types, const labelList &nbrTypes, const scalarField &norm, const scalarField &nbrNorm, const label celli, bitSet &isFront) const
Average norm of valid neighbours.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
#define DebugInfo
Report an information message using Foam::Info.
static void correctBoundaryConditions(typename GeoField::Boundary &bfld, const bool typeOnly)
Correct boundary conditions of certain type (typeOnly = true)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool interpolateFields()
Update fields when mesh is updated.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Support for overset functionality.
virtual bool update()
Update the mesh for both mesh motion and topology change.
autoPtr< fvMeshPrimitiveLduAddressing > lduPtr_
Extended addressing (extended with local interpolation stencils)
labelListList stencilPatches_
Corresponding patches (in above lduPtr) to the stencil.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
virtual const lduAddressing & lduAddr() const
Return ldu addressing. If active: is (extended)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
PtrList< const lduPrimitiveProcessorInterface > remoteStencilInterfaces_
Added (processor)lduInterfaces for remote bits of stencil.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
void writeAgglomeration(const GAMGAgglomeration &agglom) const
Debug: dump agglomeration.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
The class contains the addressing required by the lduMatrix: upper, lower and losort.
const labelList & reverseFaceMap() const
Return old to new face addressing.
virtual ~oversetFvMeshBase()
Destructor.
A class for managing temporary objects.
void write(Ostream &, const fvMatrix< Type > &, const lduAddressing &, const lduInterfacePtrsList &) const
Debug: print matrix.
virtual bool updateAddressing() const
Calculate the extended lduAddressing.
Geometric agglomerated algebraic multigrid agglomeration class.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
bool active_
Select base addressing (false) or locally stored extended.
const fvMesh & mesh_
Reference to mesh.
Variant of fvMeshLduAddressing that contains addressing instead of slices.