fvMeshStitcher Class Referenceabstract

Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to create non-conformal finite volume interfaces. More...

Inheritance diagram for fvMeshStitcher:

Public Member Functions

 TypeName ("fvMeshStitcher")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, fvMeshStitcher, fvMesh,(fvMesh &mesh),(mesh))
 
 fvMeshStitcher (fvMesh &)
 Construct from fvMesh. More...
 
 fvMeshStitcher (const fvMeshStitcher &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~fvMeshStitcher ()
 Destructor. More...
 
fvMeshmesh ()
 Return the fvMesh. More...
 
bool stitches () const
 Does this stitcher do anything? More...
 
virtual void updateMesh (const polyTopoChangeMap &)
 Update local data for topology changes. More...
 
virtual void movePoints ()
 Update local data for mesh motion. More...
 
virtual bool disconnect (const bool changing, const bool geometric)
 Disconnect the mesh by removing faces from the nonConformalCyclics. More...
 
virtual bool connect (const bool changing, const bool geometric, const bool load)
 Connect the mesh by adding faces into the nonConformalCyclics. More...
 
void reconnect (const bool geometric) const
 Re-compute the connection. Topology is preserved. Permits a change. More...
 
virtual bool write (const bool write=true) const
 Write the mover state. More...
 
void operator= (const fvMeshStitcher &)=delete
 Disallow default bitwise assignment. More...
 
template<class NonConformalFvPatch >
void createNonConformalStabilisationGeometry (const surfaceLabelField::Boundary &polyFacesBf, surfaceVectorField &SfSf, surfaceVectorField &CfSf) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > fieldRMapSum (const Field< Type > &f, const label size, const labelUList &addr)
 
template<class Type >
Foam::tmp< Foam::Field< Type > > fieldRMapSum (const tmp< Field< Type >> &f, const label size, const labelUList &addr)
 
template<class Type >
Foam::tmp< Foam::fvMeshStitcher::SurfaceFieldBoundary< Type > > conformalNccBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 
template<class Type >
Foam::tmp< Foam::fvMeshStitcher::SurfaceFieldBoundary< Type > > conformalOrigBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 
template<class Type >
Foam::tmp< Foam::fvMeshStitcher::SurfaceFieldBoundary< Type > > nonConformalBoundaryField (const SurfaceFieldBoundary< Type > &nccFieldb, const SurfaceFieldBoundary< Type > &origFieldb) const
 
template<class Type >
Foam::tmp< Foam::fvMeshStitcher::SurfaceFieldBoundary< Type > > synchronisedBoundaryField (const SurfaceFieldBoundary< Type > &fieldb, const bool flip, const scalar ownerWeight, const scalar neighbourWeight) const
 
template<class Type >
Foam::tmp< Foam::fvMeshStitcher::SurfaceFieldBoundary< Type > > synchronisedBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 

Static Public Member Functions

static autoPtr< fvMeshStitcherNew (fvMesh &, bool changing)
 Select, construct and return the fvMeshStitcher. More...
 

Protected Types

template<class Type >
using SurfaceFieldBoundary = GeometricBoundaryField< Type, fvsPatchField, surfaceMesh >
 Alias for surface boundary fields to reduce verbosity of method. More...
 
using part = patchToPatches::intersection::part
 Alias the patchToPatch intersection part struct. More...
 
using couple = patchToPatches::intersection::couple
 Alias the patchToPatch intersection couple struct. More...
 

Protected Member Functions

template<class GeoBoundaryField >
void resizeBoundaryFieldPatchFields (const SurfaceFieldBoundary< label > &polyFacesBf, GeoBoundaryField &fieldBf)
 Resize the patch field of a given field to match the mesh. More...
 
template<class GeoField >
void resizeFieldPatchFields (const SurfaceFieldBoundary< label > &polyFacesBf, GeoField &field)
 Resize the patch field of a given field to match the mesh. More...
 
tmp< SurfaceFieldBoundary< scalar > > getOrigNccMagSfb () const
 Return the total non-conformal area associated with each. More...
 
template<class Type >
tmp< SurfaceFieldBoundary< Type > > conformalNccBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 Extract the non-conformal-coupled parts of the boundary field. More...
 
template<class Type >
tmp< SurfaceFieldBoundary< Type > > conformalOrigBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 Extract the original parts of the boundary field and store it. More...
 
template<class Type >
tmp< SurfaceFieldBoundary< Type > > nonConformalBoundaryField (const SurfaceFieldBoundary< Type > &nccFieldb, const SurfaceFieldBoundary< Type > &origFieldb) const
 Combine non-conformal-coupled and original parts of the. More...
 
template<class Type >
tmp< SurfaceFieldBoundary< Type > > synchronisedBoundaryField (const SurfaceFieldBoundary< Type > &fieldb, const bool flip, const scalar ownerWeight, const scalar neighbourWeight) const
 Synchronise the boundary field by combining corresponding. More...
 
template<class Type >
tmp< SurfaceFieldBoundary< Type > > synchronisedBoundaryField (const SurfaceFieldBoundary< Type > &fieldb) const
 Synchronise the boundary field by combining corresponding. More...
 
bool geometric () const
 Is the connection "geometric", or has the topology just been. More...
 
tmp< DimensionedField< scalar, volMesh > > openness () const
 Return the non-dimensional cell openness for debugging/checking. More...
 
tmp< DimensionedField< scalar, volMesh > > volumeConservationError (const label n) const
 Return the non-dimensional old-time volume conservation error. More...
 

Static Protected Member Functions

template<class Type >
static tmp< Field< Type > > fieldRMapSum (const Field< Type > &f, const label size, const labelUList &addr)
 Reverse-map sum the values of a field. More...
 
template<class Type >
static tmp< Field< Type > > fieldRMapSum (const tmp< Field< Type >> &f, const label size, const labelUList &addr)
 Reverse-map sum the values of a field. More...
 

Detailed Description

Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to create non-conformal finite volume interfaces.

Source files

Definition at line 53 of file fvMeshStitcher.H.

Member Typedef Documentation

◆ SurfaceFieldBoundary

Alias for surface boundary fields to reduce verbosity of method.

definitions below

Definition at line 63 of file fvMeshStitcher.H.

◆ part

Alias the patchToPatch intersection part struct.

Definition at line 66 of file fvMeshStitcher.H.

◆ couple

Alias the patchToPatch intersection couple struct.

Definition at line 69 of file fvMeshStitcher.H.

Constructor & Destructor Documentation

◆ fvMeshStitcher() [1/2]

fvMeshStitcher ( fvMesh mesh)
explicit

Construct from fvMesh.

Definition at line 1157 of file fvMeshStitcher.C.

◆ fvMeshStitcher() [2/2]

fvMeshStitcher ( const fvMeshStitcher )
delete

Disallow default bitwise copy construction.

◆ ~fvMeshStitcher()

~fvMeshStitcher ( )
virtual

Destructor.

Definition at line 1165 of file fvMeshStitcher.C.

Member Function Documentation

◆ resizeBoundaryFieldPatchFields()

void resizeBoundaryFieldPatchFields ( const SurfaceFieldBoundary< label > &  polyFacesBf,
GeoBoundaryField &  fieldBf 
)
protected

Resize the patch field of a given field to match the mesh.

Definition at line 346 of file fvMeshStitcherTemplates.C.

References forAll, and fvMeshStitcher::resizeFieldPatchFields().

Referenced by fvMeshStitcher::resizeFieldPatchFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeFieldPatchFields()

void resizeFieldPatchFields ( const SurfaceFieldBoundary< label > &  polyFacesBf,
GeoField &  field 
)
protected

Resize the patch field of a given field to match the mesh.

Definition at line 376 of file fvMeshStitcherTemplates.C.

References fvMeshStitcher::fieldRMapSum(), and fvMeshStitcher::resizeBoundaryFieldPatchFields().

Referenced by fvMeshStitcher::resizeBoundaryFieldPatchFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fieldRMapSum() [1/4]

static tmp<Field<Type> > fieldRMapSum ( const Field< Type > &  f,
const label  size,
const labelUList addr 
)
staticprotected

Reverse-map sum the values of a field.

Referenced by fvMeshStitcher::conformalNccBoundaryField(), fvMeshStitcher::fieldRMapSum(), fvMeshStitcher::getOrigNccMagSfb(), and fvMeshStitcher::resizeFieldPatchFields().

Here is the caller graph for this function:

◆ fieldRMapSum() [2/4]

static tmp<Field<Type> > fieldRMapSum ( const tmp< Field< Type >> &  f,
const label  size,
const labelUList addr 
)
staticprotected

Reverse-map sum the values of a field.

◆ getOrigNccMagSfb()

◆ conformalNccBoundaryField() [1/2]

tmp<SurfaceFieldBoundary<Type> > conformalNccBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb) const
protected

Extract the non-conformal-coupled parts of the boundary field.

and store it on the conformal faces

Referenced by fvMeshStitcher::getOrigNccMagSfb().

Here is the caller graph for this function:

◆ conformalOrigBoundaryField() [1/2]

tmp<SurfaceFieldBoundary<Type> > conformalOrigBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb) const
protected

Extract the original parts of the boundary field and store it.

on the conformal faces

Referenced by fvMeshStitcher::conformalNccBoundaryField().

Here is the caller graph for this function:

◆ nonConformalBoundaryField() [1/2]

tmp<SurfaceFieldBoundary<Type> > nonConformalBoundaryField ( const SurfaceFieldBoundary< Type > &  nccFieldb,
const SurfaceFieldBoundary< Type > &  origFieldb 
) const
protected

Combine non-conformal-coupled and original parts of the.

boundary field from the conformal faces to construct the complete non-conformal boundary field

Referenced by fvMeshStitcher::conformalOrigBoundaryField().

Here is the caller graph for this function:

◆ synchronisedBoundaryField() [1/4]

tmp<SurfaceFieldBoundary<Type> > synchronisedBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb,
const bool  flip,
const scalar  ownerWeight,
const scalar  neighbourWeight 
) const
protected

Synchronise the boundary field by combining corresponding.

values across couplings with the given weightings

Referenced by fvMeshStitcher::nonConformalBoundaryField(), and fvMeshStitcher::synchronisedBoundaryField().

Here is the caller graph for this function:

◆ synchronisedBoundaryField() [2/4]

tmp<SurfaceFieldBoundary<Type> > synchronisedBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb) const
protected

Synchronise the boundary field by combining corresponding.

values across couplings with equal weightings

◆ geometric()

bool geometric ( ) const
protected

Is the connection "geometric", or has the topology just been.

loaded and stabilisation geometry applied?

Definition at line 1086 of file fvMeshStitcher.C.

References forAll, polyPatch::magFaceAreas(), Foam::max(), patchi, Foam::reduce(), Foam::returnReduce(), and polyPatch::start().

Referenced by fvMeshStitcher::mesh(), and fvMeshStitcher::reconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openness()

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > openness ( ) const
protected

Return the non-dimensional cell openness for debugging/checking.

Definition at line 1121 of file fvMeshStitcher.C.

References Foam::cbrt(), Foam::cmptMag(), Foam::mag(), Foam::max(), Foam::sqr(), Foam::fvc::surfaceIntegrate(), and Foam::fvc::surfaceSum().

Referenced by fvMeshStitcher::connect(), and fvMeshStitcher::disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ volumeConservationError()

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > volumeConservationError ( const label  n) const
protected

Return the non-dimensional old-time volume conservation error.

for a specified old-time index for debugging/checking

Definition at line 1134 of file fvMeshStitcher.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, phi, and Foam::fvc::surfaceIntegrate().

Referenced by fvMeshStitcher::connect(), and fvMeshStitcher::disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "fvMeshStitcher"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
fvMeshStitcher  ,
fvMesh  ,
(fvMesh &mesh ,
(mesh  
)

◆ New()

Foam::autoPtr< Foam::fvMeshStitcher > New ( fvMesh mesh,
bool  changing 
)
static

◆ mesh()

◆ stitches()

bool stitches ( ) const

Does this stitcher do anything?

Definition at line 1171 of file fvMeshStitcher.C.

References fvMesh::boundary(), forAll, and patchi.

Referenced by fvMeshStitcher::connect(), fvMeshStitcher::disconnect(), and fvMeshStitcher::mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMesh()

void updateMesh ( const polyTopoChangeMap )
virtual

Update local data for topology changes.

Definition at line 1185 of file fvMeshStitcher.C.

Referenced by fvMeshStitcher::mesh().

Here is the caller graph for this function:

◆ movePoints()

void movePoints ( )
virtual

Update local data for mesh motion.

Definition at line 1189 of file fvMeshStitcher.C.

References fvMeshStitcher::disconnect().

Referenced by fvMeshStitcher::mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnect()

◆ connect()

bool connect ( const bool  changing,
const bool  geometric,
const bool  load 
)
virtual

◆ reconnect()

void reconnect ( const bool  geometric) const

Re-compute the connection. Topology is preserved. Permits a change.

in whether or not the connection is "geometric".

Definition at line 1541 of file fvMeshStitcher.C.

References fvMesh::Cf(), GeometricField< Type, PatchField, GeoMesh >::cloneUnSliced(), fvMesh::conform(), fvMesh::conformal(), surfaceInterpolation::deltaCoeffs(), fvMeshStitcher::geometric(), GeometricField< Type, PatchField, GeoMesh >::null(), fvMesh::polyFacesBf(), fvMesh::Sf(), and fvMesh::unconform().

Referenced by fvMeshStitcher::mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

virtual bool write ( const bool  write = true) const
inlinevirtual

Write the mover state.

Definition at line 411 of file fvMeshStitcher.H.

References fvMeshStitcher::operator=().

Here is the call graph for this function:

◆ operator=()

void operator= ( const fvMeshStitcher )
delete

Disallow default bitwise assignment.

Referenced by fvMeshStitcher::write().

Here is the caller graph for this function:

◆ createNonConformalStabilisationGeometry()

void createNonConformalStabilisationGeometry ( const surfaceLabelField::Boundary polyFacesBf,
surfaceVectorField SfSf,
surfaceVectorField CfSf 
) const
inline

◆ fieldRMapSum() [3/4]

Foam::tmp<Foam::Field<Type> > fieldRMapSum ( const Field< Type > &  f,
const label  size,
const labelUList addr 
)

Definition at line 394 of file fvMeshStitcherTemplates.C.

References fvMeshStitcher::fieldRMapSum(), forAll, tmp< T >::ref(), and Foam::Zero.

Here is the call graph for this function:

◆ fieldRMapSum() [4/4]

Foam::tmp<Foam::Field<Type> > fieldRMapSum ( const tmp< Field< Type >> &  f,
const label  size,
const labelUList addr 
)

Definition at line 411 of file fvMeshStitcherTemplates.C.

References List< Type >::clear(), f(), and fvMeshStitcher::fieldRMapSum().

Here is the call graph for this function:

◆ conformalNccBoundaryField() [2/2]

◆ conformalOrigBoundaryField() [2/2]

◆ nonConformalBoundaryField() [2/2]

◆ synchronisedBoundaryField() [3/4]

Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > synchronisedBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb,
const bool  flip,
const scalar  ownerWeight,
const scalar  neighbourWeight 
) const

◆ synchronisedBoundaryField() [4/4]

Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > synchronisedBoundaryField ( const SurfaceFieldBoundary< Type > &  fieldb) const

Definition at line 812 of file fvMeshStitcherTemplates.C.

References Foam::isFlux().

Here is the call graph for this function:

The documentation for this class was generated from the following files: