46 skewCorrectionVectors_
50 "skewCorrectionVectors",
51 mesh_.pointsInstance(),
61 calcSkewCorrectionVectors();
69void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
79 const labelUList& neighbour = mesh_.neighbour();
83 label own = owner[facei];
84 label nei = neighbour[facei];
87 vector Cpf = Cf[facei] -
C[own];
89 skewCorrectionVectors_[facei] =
90 Cpf - ((Sf[facei] & Cpf)/(Sf[facei] & d))*d;
94 skewCorrectionVectors_.boundaryFieldRef();
96 forAll(skewCorrVecsBf, patchi)
100 if (!patchSkewCorrVecs.coupled())
102 patchSkewCorrVecs =
Zero;
106 const fvPatch&
p = patchSkewCorrVecs.patch();
115 patchFaceCentres[patchFacei] -
C[faceCells[patchFacei]];
117 patchSkewCorrVecs[patchFacei] =
120 (patchSf[patchFacei] & Cpf)/
121 (patchSf[patchFacei] & patchD[patchFacei])
122 )*patchD[patchFacei];
127 scalar skewCoeff = 0.0;
132 max(
mag(skewCorrectionVectors_)*mesh_.deltaCoeffs()).value();
137 if (skewCoeff < 1
e-5)
148 Info<<
" Finished constructing skew correction vectors" <<
endl;
155 calcSkewCorrectionVectors();
Graphite solid properties.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
GeometricBoundaryField< vector, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
void size(const label n)
Older name for setAddressableSize.
Mesh data needed to do the Finite Volume discretisation.
Skew-correction vectors for the skewness-corrected interpolation scheme.
virtual bool movePoints()
Update the correction vectors when the mesh moves.
virtual ~skewCorrectionVectors()
Destructor.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInFunction
Report an information message using Foam::Info.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0)
UList< label > labelUList
A UList of labels.
fvsPatchField< vector > fvsPatchVectorField
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.