45 auto& result = tresult.ref();
57 vector d = centres[nei[facei]] - centres[own[facei]];
64 result[own[facei]] =
max(cosDDotS, result[own[facei]]);
66 result[nei[facei]] =
max(cosDDotS, result[nei[facei]]);
82 vector d = faceCentres[facei] - centres[faceCells[facei]];
89 result[faceCells[facei]] =
max(cosDDotS, result[faceCells[facei]]);
100 auto& result = tresult.
ref();
108 const labelList& own = mesh_.faceOwner();
109 const labelList& nei = mesh_.faceNeighbour();
115 (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
120 (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
123 point faceIntersection =
125 + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
128 mag(faceCtrs[facei] - faceIntersection)
129 /(
mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
131 result[own[facei]] =
max(skewness, result[own[facei]]);
133 result[nei[facei]] =
max(skewness, result[nei[facei]]);
136 forAll(mesh_.boundaryMesh(), patchi)
139 mesh_.boundaryMesh()[patchi].faceCells();
142 mesh_.boundaryMesh()[patchi].faceCentres();
145 mesh_.boundaryMesh()[patchi].faceAreas();
147 forAll(faceCentres, facei)
149 vector n = faceAreas[facei]/
mag(faceAreas[facei]);
151 point faceIntersection =
152 cellCtrs[faceCells[facei]]
153 + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&
n)*
n;
156 mag(faceCentres[facei] - faceIntersection)
158 mag(faceCentres[facei] - cellCtrs[faceCells[facei]])
162 result[faceCells[facei]] =
max(skewness, result[faceCells[facei]]);
173 auto& result = tresult.ref();
178 const labelList& own = mesh_.faceOwner();
179 const labelList& nei = mesh_.faceNeighbour();
183 vector d = centres[nei[facei]] - centres[own[facei]];
185 scalar magS =
mag(
s);
190 result[facei] = cosDDotS;
193 label globalFacei = mesh_.nInternalFaces();
195 forAll(mesh_.boundaryMesh(), patchi)
198 mesh_.boundaryMesh()[patchi].faceCells();
201 mesh_.boundaryMesh()[patchi].faceCentres();
204 mesh_.boundaryMesh()[patchi].faceAreas();
206 forAll(faceCentres, facei)
208 vector d = faceCentres[facei] - centres[faceCells[facei]];
210 scalar magS =
mag(
s);
215 result[globalFacei++] = cosDDotS;
226 auto& result = tresult.ref();
232 const labelList& own = mesh_.faceOwner();
233 const labelList& nei = mesh_.faceNeighbour();
239 (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
244 (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
247 point faceIntersection =
249 + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
252 mag(faceCtrs[facei] - faceIntersection)
253 /(
mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
257 label globalFacei = mesh_.nInternalFaces();
259 forAll(mesh_.boundaryMesh(), patchi)
262 mesh_.boundaryMesh()[patchi].faceCells();
265 mesh_.boundaryMesh()[patchi].faceCentres();
268 mesh_.boundaryMesh()[patchi].faceAreas();
270 forAll(faceCentres, facei)
272 vector n = faceAreas[facei]/
mag(faceAreas[facei]);
274 point faceIntersection =
275 cellCtrs[faceCells[facei]]
276 + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&
n)*
n;
278 result[globalFacei++] =
279 mag(faceCentres[facei] - faceIntersection)
281 mag(faceCentres[facei] - cellCtrs[faceCells[facei]])
dimensionedScalar acos(const dimensionedScalar &ds)
tmp< scalarField > nonOrthogonality() const
Return cell non-orthogonality.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual const labelList & faceNeighbour() const
Return face neighbour.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Unit conversion functions.
tmp< scalarField > faceSkewness() const
Return face skewness.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
tmp< scalarField > faceNonOrthogonality() const
Return face non-orthogonality.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelList & faceOwner() const
Return face owner.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const vectorField & cellCentres() const
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
vector point
Point is a vector.
label nCells() const noexcept
Number of mesh cells.
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
const vectorField & faceAreas() const
SubField< vector > subField
Declare type of subField.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
A class for managing temporary objects.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
tmp< scalarField > skewness() const
Return cell skewness.
static constexpr const zero Zero
Global zero (0)