43 parallelFvGeometryScheme,
50 void Foam::parallelFvGeometryScheme::adjustGeometry()
59 syncedBCentres = SubField<vector>
72 syncedBAreas = SubField<vector>
87 for (
const auto&
pp :
pbm)
89 const auto* ppp = isA<coupledPolyPatch>(
pp);
106 if (ppp && !ppp->owner())
109 const_cast<coupledPolyPatch&
> 114 SubField<point> patchFc
120 patchFc = SubField<vector>
127 SubField<vector> patchArea
133 patchArea = SubField<vector>
160 forAll(faceCentres, facei)
163 const auto& newFc = faceCentres[facei];
165 const auto& newFa = faceAreas[facei];
167 if (oldFc != newFc || oldFa != newFa)
174 <<
"Different geometry for internal face:" << facei
175 <<
" oldFc:" << oldFc <<
nl 176 <<
" newFc:" << newFc <<
nl 177 <<
" oldFa:" << oldFa <<
nl 178 <<
" newFa:" << newFa <<
nl 185 forAll(cellCentres, celli)
188 const auto& newCc = cellCentres[celli];
190 const auto& newCv = cellVolumes[celli];
192 if (oldCc != newCc || oldCv != newCv)
204 Info<<
"parallelFvGeometryScheme::movePoints() : " 205 <<
"adjusted geometry of faces:" 213 std::move(faceCentres),
214 std::move(faceAreas),
215 std::move(cellCentres),
216 std::move(cellVolumes)
223 Foam::parallelFvGeometryScheme::parallelFvGeometryScheme
230 dict_(
dict.subOrEmptyDict(
"geometry"))
242 Pout<<
"parallelFvGeometryScheme::geometry() : " 243 <<
"constructing underlying scheme from " << dict_
250 basicFvGeometryScheme::typeName
253 return geometryPtr_();
261 Pout<<
"parallelFvGeometryScheme::movePoints() : " 262 <<
"recalculating primitiveMesh centres" <<
endl;
282 return geometry().weights();
289 return geometry().deltaCoeffs();
296 return geometry().nonOrthDeltaCoeffs();
303 return geometry().nonOrthCorrectionVectors();
const polyBoundaryMesh & pbm
const fvMesh & mesh_
Hold reference to mesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Macros for easy insertion into run-time selection tables.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
#define forAll(list, i)
Loop across all elements in list.
void resetGeometry(pointField &&faceCentres, pointField &&faceAreas, pointField &&cellCentres, scalarField &&cellVolumes)
Reset the local geometry.
vectorField pointField
pointField is a vectorField.
virtual tmp< surfaceVectorField > nonOrthCorrectionVectors() const
Return non-orthogonality correction vectors.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label nInternalFaces() const noexcept
Number of internal faces.
virtual tmp< surfaceScalarField > weights() const
Return linear difference weighting factors.
const vectorField & cellCentres() const
static tmp< fvGeometryScheme > New(const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
Return new tmp interpolation scheme.
virtual tmp< surfaceScalarField > deltaCoeffs() const
Return cell-centre difference coefficients.
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
virtual void movePoints()
Do what is necessary if the mesh has moved.
const vectorField & faceCentres() const
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh for topology changes.
label nCells() const noexcept
Number of mesh cells.
Mesh data needed to do the Finite Volume discretisation.
const vectorField & faceAreas() const
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
virtual tmp< surfaceScalarField > nonOrthDeltaCoeffs() const
Return non-orthogonal cell-centre difference coefficients.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Abstract base class for geometry calculation schemes.
const fvGeometryScheme & geometry() const
Construct underlying fvGeometryScheme.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
const scalarField & cellVolumes() const