62 Pout<<
"basicFvGeometryScheme::movePoints() : "
63 <<
"recalculating primitiveMesh centres" <<
endl;
75 Pout<<
"basicFvGeometryScheme::weights() : "
76 <<
"Constructing weighting factors for face interpolation"
86 mesh_.pointsInstance(),
96 auto& weights = tweights.ref();
97 weights.setOriented();
104 const labelUList& neighbour = mesh_.neighbour();
120 scalar SfdOwn =
mag(Sf[facei] & (Cf[facei] -
C[owner[facei]]));
121 scalar SfdNei =
mag(Sf[facei] & (
C[neighbour[facei]] - Cf[facei]));
123 if (
mag(SfdOwn + SfdNei) > ROOTVSMALL)
125 w[facei] = SfdNei/(SfdOwn + SfdNei);
133 auto& wBf = weights.boundaryFieldRef();
135 forAll(mesh_.boundary(), patchi)
137 mesh_.boundary()[patchi].makeWeights(wBf[patchi]);
142 Pout<<
"basicFvGeometryScheme::weights : "
143 <<
"Finished constructing weighting factors for face interpolation"
155 Pout<<
"basicFvGeometryScheme::deltaCoeffs() : "
156 <<
"Constructing differencing factors array for face gradient"
162 (void)mesh_.weights();
170 mesh_.pointsInstance(),
180 auto& deltaCoeffs = tdeltaCoeffs.ref();
181 deltaCoeffs.setOriented();
187 const labelUList& neighbour = mesh_.neighbour();
191 deltaCoeffs[facei] = 1.0/
mag(
C[neighbour[facei]] -
C[owner[facei]]);
194 auto& deltaCoeffsBf = deltaCoeffs.boundaryFieldRef();
196 forAll(deltaCoeffsBf, patchi)
198 const fvPatch&
p = mesh_.boundary()[patchi];
199 deltaCoeffsBf[patchi] = 1.0/
mag(
p.delta());
202 p.makeDeltaCoeffs(deltaCoeffsBf[patchi]);
214 Pout<<
"basicFvGeometryScheme::nonOrthDeltaCoeffs() : "
215 <<
"Constructing differencing factors array for face gradient"
223 auto tnonOrthDeltaCoeffs =
228 "nonOrthDeltaCoeffs",
229 mesh_.pointsInstance(),
239 auto& nonOrthDeltaCoeffs = tnonOrthDeltaCoeffs.ref();
240 nonOrthDeltaCoeffs.setOriented();
246 const labelUList& neighbour = mesh_.neighbour();
253 vector unitArea = Sf[facei]/magSf[facei];
268 auto& nonOrthDeltaCoeffsBf = nonOrthDeltaCoeffs.boundaryFieldRef();
270 forAll(nonOrthDeltaCoeffsBf, patchi)
276 const vectorField patchDeltas(mesh_.boundary()[patchi].delta());
286 patchDeltaCoeffs[patchFacei] =
291 p.makeNonOrthoDeltaCoeffs(patchDeltaCoeffs);
293 return tnonOrthDeltaCoeffs;
302 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : "
303 <<
"Constructing non-orthogonal correction vectors"
307 auto tnonOrthCorrectionVectors =
312 "nonOrthCorrectionVectors",
313 mesh_.pointsInstance(),
323 auto& corrVecs = tnonOrthCorrectionVectors.ref();
324 corrVecs.setOriented();
329 const labelUList& neighbour = mesh_.neighbour();
337 vector unitArea(Sf[facei]/magSf[facei]);
340 corrVecs[facei] = unitArea -
delta*NonOrthDeltaCoeffs[facei];
349 forAll(corrVecsBf, patchi)
357 patchCorrVecs =
Zero;
361 const auto& patchNonOrthDeltaCoeffs =
364 const vectorField patchDeltas(mesh_.boundary()[patchi].delta());
374 patchCorrVecs[patchFacei] =
375 unitArea -
delta*patchNonOrthDeltaCoeffs[patchFacei];
380 p.makeNonOrthoCorrVectors(patchCorrVecs);
385 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : "
386 <<
"Finished constructing non-orthogonal correction vectors"
389 return tnonOrthCorrectionVectors;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Graphite solid properties.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Default geometry calculation scheme. Slight stabilisation for bad meshes.
virtual tmp< surfaceScalarField > nonOrthDeltaCoeffs() const
Return non-orthogonal cell-centre difference coefficients.
virtual tmp< surfaceVectorField > nonOrthCorrectionVectors() const
Return non-orthogonality correction vectors.
virtual void movePoints()
Do what is necessary if the mesh has moved.
virtual tmp< surfaceScalarField > weights() const
Return linear difference weighting factors.
virtual tmp< surfaceScalarField > deltaCoeffs() const
Return cell-centre difference coefficients.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for geometry calculation schemes.
virtual void movePoints()
Update basic geometric properties from provided points.
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual bool coupled() const
Return true if this patch field is coupled.
const fvPatch & patch() const
Return patch.
virtual void updateGeom()
Update all geometric data.
A class for managing temporary objects.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
#define forAll(list, i)
Loop across all elements in list.