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 62 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 1160 of file fvMeshStitcher.C.

◆ fvMeshStitcher() [2/2]

fvMeshStitcher ( const fvMeshStitcher )
delete

Disallow default bitwise copy construction.

◆ ~fvMeshStitcher()

~fvMeshStitcher ( )
virtual

Destructor.

Definition at line 1168 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 313 of file fvMeshStitcherTemplates.C.

References forAll.

◆ 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 333 of file fvMeshStitcherTemplates.C.

◆ 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.

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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 1089 of file fvMeshStitcher.C.

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

Here is the call 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 1124 of file fvMeshStitcher.C.

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

Here is the call 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 1137 of file fvMeshStitcher.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, n, GeometricField< Type, PatchField, GeoMesh >::oldTime(), and Foam::fvc::surfaceIntegrate().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "fvMeshStitcher"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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

◆ New()

◆ mesh()

fvMesh& mesh ( )
inline

Return the fvMesh.

Definition at line 369 of file fvMeshStitcher.H.

Referenced by fvMeshStitcher::New().

Here is the caller graph for this function:

◆ stitches()

bool stitches ( ) const

Does this stitcher do anything?

Definition at line 1174 of file fvMeshStitcher.C.

References forAll, and patchi.

◆ updateMesh()

void updateMesh ( const polyTopoChangeMap )
virtual

Update local data for topology changes.

Definition at line 1188 of file fvMeshStitcher.C.

◆ movePoints()

void movePoints ( )
virtual

Update local data for mesh motion.

Definition at line 1192 of file fvMeshStitcher.C.

◆ disconnect()

bool disconnect ( const bool  changing,
const bool  geometric 
)
virtual

Disconnect the mesh by removing faces from the nonConformalCyclics.

Definition at line 1196 of file fvMeshStitcher.C.

References Foam::decrIndent(), Foam::endl(), Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::incrIndent(), Foam::indent(), Foam::Info, and UPstream::parRun().

Here is the call graph for this function:

◆ connect()

◆ 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 1533 of file fvMeshStitcher.C.

References GeometricField< Type, PatchField, GeoMesh >::null().

Here is the call graph for this function:

◆ write()

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

Write the mover state.

Definition at line 403 of file fvMeshStitcher.H.

◆ operator=()

void operator= ( const fvMeshStitcher )
delete

Disallow default bitwise assignment.

◆ 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 351 of file fvMeshStitcherTemplates.C.

References f(), 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 368 of file fvMeshStitcherTemplates.C.

References List< T >::clear(), and f().

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 769 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: