Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to create non-conformal finite volume interfaces. More...
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... | |
fvMesh & | mesh () |
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< fvMeshStitcher > | New (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... | |
Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to create non-conformal finite volume interfaces.
Definition at line 53 of file fvMeshStitcher.H.
|
protected |
Alias for surface boundary fields to reduce verbosity of method.
definitions below
Definition at line 62 of file fvMeshStitcher.H.
|
protected |
Alias the patchToPatch intersection part struct.
Definition at line 66 of file fvMeshStitcher.H.
|
protected |
Alias the patchToPatch intersection couple struct.
Definition at line 69 of file fvMeshStitcher.H.
|
explicit |
Construct from fvMesh.
Definition at line 1160 of file fvMeshStitcher.C.
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 1168 of file fvMeshStitcher.C.
|
protected |
Resize the patch field of a given field to match the mesh.
Definition at line 313 of file fvMeshStitcherTemplates.C.
References forAll.
|
protected |
Resize the patch field of a given field to match the mesh.
Definition at line 333 of file fvMeshStitcherTemplates.C.
|
staticprotected |
Reverse-map sum the values of a field.
|
staticprotected |
Reverse-map sum the values of a field.
|
inlineprotected |
Return the total non-conformal area associated with each.
original face
Definition at line 382 of file fvMeshStitcherTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, fvMesh::magSf(), fvBoundaryMesh::mesh(), DimensionedField< Type, GeoMesh >::null(), nonConformalFvPatch::origPatch(), nonConformalFvPatch::origPatchID(), nonConformalFvPatch::polyFaces(), tmp< T >::ref(), fvPatch::size(), and fvPatch::start().
|
protected |
Extract the non-conformal-coupled parts of the boundary field.
and store it on the conformal faces
|
protected |
Extract the original parts of the boundary field and store it.
on the conformal faces
|
protected |
Combine non-conformal-coupled and original parts of the.
boundary field from the conformal faces to construct the complete non-conformal boundary field
|
protected |
Synchronise the boundary field by combining corresponding.
values across couplings with the given weightings
|
protected |
Synchronise the boundary field by combining corresponding.
values across couplings with equal weightings
|
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().
|
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().
|
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().
TypeName | ( | "fvMeshStitcher" | ) |
Runtime type information.
|
static |
Select, construct and return the fvMeshStitcher.
Definition at line 30 of file fvMeshStitcherNew.C.
References TimePaths::constant(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAllConstIter, typeIOobject< Type >::headerOk(), Foam::libs, fvMeshStitcher::mesh(), Foam::nl, IOobject::NO_WRITE, dlLibraryTable::open(), IOobject::READ_IF_PRESENT, and fvMesh::time().
|
inline |
Return the fvMesh.
Definition at line 369 of file fvMeshStitcher.H.
Referenced by fvMeshStitcher::New().
bool stitches | ( | ) | const |
Does this stitcher do anything?
Definition at line 1174 of file fvMeshStitcher.C.
|
virtual |
Update local data for topology changes.
Definition at line 1188 of file fvMeshStitcher.C.
|
virtual |
Update local data for mesh motion.
Definition at line 1192 of file fvMeshStitcher.C.
|
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().
|
virtual |
Connect the mesh by adding faces into the nonConformalCyclics.
Definition at line 1279 of file fvMeshStitcher.C.
References GeometricBoundaryField< Type, PatchField, GeoMesh >::boundaryNeighbourField(), Foam::decrIndent(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fileHandler(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::incrIndent(), Foam::indent(), fvPatch::index(), Foam::Info, nonConformalCyclicPolyPatch::intersection(), Foam::isFile(), Foam::max(), Foam::min(), IOobject::MUST_READ, fvPatch::name(), nonConformalCyclicFvPatch::nonConformalCyclicPatch(), DimensionedField< Type, GeoMesh >::null(), GeometricField< Type, PatchField, GeoMesh >::null(), IOobject::objectPath(), nonConformalCyclicFvPatch::owner(), UPstream::parRun(), patchi, Foam::reduce(), GeometricBoundaryField< Type, PatchField, GeoMesh >::reset(), UPtrList< T >::size(), and Foam::sum().
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().
|
inlinevirtual |
Write the mover state.
Definition at line 403 of file fvMeshStitcher.H.
|
delete |
Disallow default bitwise assignment.
|
inline |
Definition at line 1050 of file fvMeshStitcher.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), polyPatch::faceAreas(), polyPatch::faceCentres(), forAll, patchi, and polyPatch::start().
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.
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().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > conformalNccBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb | ) | const |
Definition at line 434 of file fvMeshStitcherTemplates.C.
References nonConformalBoundary::allOrigPatchIDs(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, Foam::isFlux(), fvMesh::magSf(), Foam::max(), fvBoundaryMesh::mesh(), DemandDrivenMeshObject< polyMesh, MoveableMeshObject, nonConformalBoundary >::New(), DimensionedField< Type, GeoMesh >::null(), nonConformalFvPatch::origPatch(), nonConformalFvPatch::origPatchID(), nonConformalFvPatch::polyFaces(), tmp< T >::ref(), fvPatch::size(), and fvPatch::start().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > conformalOrigBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb | ) | const |
Definition at line 542 of file fvMeshStitcherTemplates.C.
References nonConformalBoundary::allOrigPatchIDs(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, Foam::isFlux(), fvMesh::magSf(), Foam::max(), fvBoundaryMesh::mesh(), DemandDrivenMeshObject< polyMesh, MoveableMeshObject, nonConformalBoundary >::New(), DimensionedField< Type, GeoMesh >::null(), and tmp< T >::ref().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > nonConformalBoundaryField | ( | const SurfaceFieldBoundary< Type > & | nccFieldb, |
const SurfaceFieldBoundary< Type > & | origFieldb | ||
) | const |
Definition at line 598 of file fvMeshStitcherTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, Foam::isFlux(), fvMesh::magSf(), fvBoundaryMesh::mesh(), DimensionedField< Type, GeoMesh >::null(), nonConformalFvPatch::origPatch(), nonConformalFvPatch::origPatchID(), patchi, nonConformalFvPatch::polyFaces(), nonConformalErrorFvPatch::polyFaces(), tmp< T >::ref(), fvPatch::start(), and Foam::Zero.
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > synchronisedBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb, |
const bool | flip, | ||
const scalar | ownerWeight, | ||
const scalar | neighbourWeight | ||
) | const |
Definition at line 720 of file fvMeshStitcherTemplates.C.
References GeometricBoundaryField< Type, PatchField, GeoMesh >::boundaryNeighbourField(), fvPatch::coupled(), forAll, coupledFvPatch::owner(), patchi, and tmp< T >::ref().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > synchronisedBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb | ) | const |
Definition at line 769 of file fvMeshStitcherTemplates.C.
References Foam::isFlux().