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 63 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 1157 of file fvMeshStitcher.C.
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 1165 of file fvMeshStitcher.C.
|
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().
|
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().
|
staticprotected |
Reverse-map sum the values of a field.
Referenced by fvMeshStitcher::conformalNccBoundaryField(), fvMeshStitcher::fieldRMapSum(), fvMeshStitcher::getOrigNccMagSfb(), and fvMeshStitcher::resizeFieldPatchFields().
|
staticprotected |
Reverse-map sum the values of a field.
|
inlineprotected |
Return the total non-conformal area associated with each.
original face
Definition at line 424 of file fvMeshStitcherTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvMeshStitcher::conformalNccBoundaryField(), fvMeshStitcher::fieldRMapSum(), forAll, fvMesh::magSf(), fvBoundaryMesh::mesh(), DimensionedField< Type, GeoMesh >::null(), nonConformalFvPatch::origPatch(), nonConformalFvPatch::origPatchID(), nonConformalFvPatch::polyFaces(), tmp< T >::ref(), fvPatch::size(), and fvPatch::start().
Referenced by fvMeshStitcher::conformalNccBoundaryField(), fvMeshStitcher::conformalOrigBoundaryField(), and fvMeshStitcher::nonConformalBoundaryField().
|
protected |
Extract the non-conformal-coupled parts of the boundary field.
and store it on the conformal faces
Referenced by fvMeshStitcher::getOrigNccMagSfb().
|
protected |
Extract the original parts of the boundary field and store it.
on the conformal faces
Referenced by fvMeshStitcher::conformalNccBoundaryField().
|
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().
|
protected |
Synchronise the boundary field by combining corresponding.
values across couplings with the given weightings
Referenced by fvMeshStitcher::nonConformalBoundaryField(), and fvMeshStitcher::synchronisedBoundaryField().
|
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 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().
|
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().
|
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().
TypeName | ( | "fvMeshStitcher" | ) |
Runtime type information.
|
static |
Select, construct and return the fvMeshStitcher.
Definition at line 31 of file fvMeshStitcherNew.C.
References TimePaths::constant(), polyMesh::dbDir(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAllConstIter, typeIOobject< Type >::headerOk(), Foam::libs, mesh, Foam::nl, dlLibraryTable::open(), and fvMesh::time().
|
inline |
Return the fvMesh.
Definition at line 377 of file fvMeshStitcher.H.
References fvMeshStitcher::connect(), fvMeshStitcher::disconnect(), fvMeshStitcher::geometric(), fvMeshStitcher::movePoints(), fvMeshStitcher::reconnect(), fvMeshStitcher::stitches(), and fvMeshStitcher::updateMesh().
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().
|
virtual |
Update local data for topology changes.
Definition at line 1185 of file fvMeshStitcher.C.
Referenced by fvMeshStitcher::mesh().
|
virtual |
Update local data for mesh motion.
Definition at line 1189 of file fvMeshStitcher.C.
References fvMeshStitcher::disconnect().
Referenced by fvMeshStitcher::mesh().
Disconnect the mesh by removing faces from the nonConformalCyclics.
Definition at line 1194 of file fvMeshStitcher.C.
References fvMesh::conform(), fvMeshStitcher::connect(), Foam::decrIndent(), surfaceInterpolation::deltaCoeffs(), fvMesh::dynamic(), Foam::endl(), Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::incrIndent(), Foam::indent(), Foam::Info, polyMesh::moving(), GeometricField< Type, PatchField, GeoMesh >::nOldTimes(), fvMeshStitcher::openness(), UPstream::parRun(), phi, fvMesh::phi(), TimePaths::processorCase(), fvMeshStitcher::stitches(), fvMesh::time(), and fvMeshStitcher::volumeConservationError().
Referenced by fvMeshStitcher::mesh(), and fvMeshStitcher::movePoints().
Connect the mesh by adding faces into the nonConformalCyclics.
Definition at line 1274 of file fvMeshStitcher.C.
References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricBoundaryField< Type, PatchField, GeoMesh >::boundaryNeighbourField(), fvMesh::Cf(), GeometricField< Type, PatchField, GeoMesh >::cloneUnSliced(), Foam::decrIndent(), surfaceInterpolation::deltaCoeffs(), fvMesh::dynamic(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fileHandler(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::incrIndent(), Foam::indent(), Foam::Info, nonConformalCyclicPolyPatch::intersection(), fileOperation::isFile(), Foam::max(), Foam::min(), polyMesh::moving(), IOobject::MUST_READ, fvPatch::name(), GeometricField< Type, PatchField, GeoMesh >::nOldTimes(), nonConformalCyclicFvPatch::nonConformalCyclicPatch(), DimensionedField< Type, GeoMesh >::null(), GeometricField< Type, PatchField, GeoMesh >::null(), fvMeshStitcher::openness(), cyclicFvPatch::owner(), UPstream::parRun(), patchi, phi, fvMesh::phi(), fvMesh::polyFacesBf(), fvMesh::polyFacesBfIO(), TimePaths::processorCase(), Foam::reduce(), fvMesh::Sf(), List< T >::size(), fvMeshStitcher::stitches(), Foam::sum(), fvMesh::time(), fvMesh::unconform(), and fvMeshStitcher::volumeConservationError().
Referenced by fvMeshStitcher::disconnect(), and fvMeshStitcher::mesh().
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().
Write the mover state.
Definition at line 411 of file fvMeshStitcher.H.
References fvMeshStitcher::operator=().
|
delete |
Disallow default bitwise assignment.
Referenced by fvMeshStitcher::write().
|
inline |
Definition at line 1048 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 394 of file fvMeshStitcherTemplates.C.
References fvMeshStitcher::fieldRMapSum(), 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 411 of file fvMeshStitcherTemplates.C.
References List< Type >::clear(), f(), and fvMeshStitcher::fieldRMapSum().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > conformalNccBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb | ) | const |
Definition at line 477 of file fvMeshStitcherTemplates.C.
References nonConformalBoundary::allOrigPatchIDs(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvMeshStitcher::conformalOrigBoundaryField(), fvMeshStitcher::fieldRMapSum(), forAll, fvMeshStitcher::getOrigNccMagSfb(), Foam::isFlux(), fvMesh::magSf(), Foam::max(), fvBoundaryMesh::mesh(), MeshObject< 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 585 of file fvMeshStitcherTemplates.C.
References nonConformalBoundary::allOrigPatchIDs(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, fvMeshStitcher::getOrigNccMagSfb(), Foam::isFlux(), fvMesh::magSf(), Foam::max(), fvBoundaryMesh::mesh(), MeshObject< polyMesh, MoveableMeshObject, nonConformalBoundary >::New(), fvMeshStitcher::nonConformalBoundaryField(), 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 641 of file fvMeshStitcherTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, fvMeshStitcher::getOrigNccMagSfb(), Foam::isFlux(), fvMesh::magSf(), fvBoundaryMesh::mesh(), DimensionedField< Type, GeoMesh >::null(), nonConformalFvPatch::origPatch(), nonConformalFvPatch::origPatchID(), patchi, nonConformalErrorFvPatch::polyFaces(), nonConformalFvPatch::polyFaces(), tmp< T >::ref(), fvPatch::start(), fvMeshStitcher::synchronisedBoundaryField(), 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 763 of file fvMeshStitcherTemplates.C.
References GeometricBoundaryField< Type, PatchField, GeoMesh >::boundaryNeighbourField(), fvPatch::coupled(), forAll, coupledFvPatch::owner(), patchi, tmp< T >::ref(), and fvMeshStitcher::synchronisedBoundaryField().
Foam::tmp<Foam::fvMeshStitcher::SurfaceFieldBoundary<Type> > synchronisedBoundaryField | ( | const SurfaceFieldBoundary< Type > & | fieldb | ) | const |
Definition at line 812 of file fvMeshStitcherTemplates.C.
References Foam::isFlux().