64 vector d = centres[nei[facei]] - centres[own[facei]];
71 result[own[facei]] =
max(cosDDotS, result[own[facei]]);
73 result[nei[facei]] =
max(cosDDotS, result[nei[facei]]);
89 vector d = faceCentres[facei] - centres[faceCells[facei]];
96 result[faceCells[facei]] =
max(cosDDotS, result[faceCells[facei]]);
106 tmp<scalarField> tresult
121 const labelList& own = mesh_.faceOwner();
122 const labelList& nei = mesh_.faceNeighbour();
128 (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
133 (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
136 point faceIntersection =
138 + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
141 mag(faceCtrs[facei] - faceIntersection)
142 /(
mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
144 result[own[facei]] =
max(skewness, result[own[facei]]);
146 result[nei[facei]] =
max(skewness, result[nei[facei]]);
149 forAll(mesh_.boundaryMesh(), patchi)
152 mesh_.boundaryMesh()[patchi].faceCells();
155 mesh_.boundaryMesh()[patchi].faceCentres();
158 mesh_.boundaryMesh()[patchi].faceAreas();
160 forAll(faceCentres, facei)
162 vector n = faceAreas[facei]/
mag(faceAreas[facei]);
164 point faceIntersection =
165 cellCtrs[faceCells[facei]]
166 + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&
n)*
n;
169 mag(faceCentres[facei] - faceIntersection)
171 mag(faceCentres[facei] - cellCtrs[faceCells[facei]])
175 result[faceCells[facei]] =
max(skewness, result[faceCells[facei]]);
185 tmp<scalarField> tresult
198 const labelList& own = mesh_.faceOwner();
199 const labelList& nei = mesh_.faceNeighbour();
203 vector d = centres[nei[facei]] - centres[own[facei]];
205 scalar magS =
mag(
s);
210 result[facei] = cosDDotS;
213 label globalFacei = mesh_.nInternalFaces();
215 forAll(mesh_.boundaryMesh(), patchi)
218 mesh_.boundaryMesh()[patchi].faceCells();
221 mesh_.boundaryMesh()[patchi].faceCentres();
224 mesh_.boundaryMesh()[patchi].faceAreas();
226 forAll(faceCentres, facei)
228 vector d = faceCentres[facei] - centres[faceCells[facei]];
230 scalar magS =
mag(
s);
235 result[globalFacei++] = cosDDotS;
245 tmp<scalarField> tresult
259 const labelList& own = mesh_.faceOwner();
260 const labelList& nei = mesh_.faceNeighbour();
266 (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
271 (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
274 point faceIntersection =
276 + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
279 mag(faceCtrs[facei] - faceIntersection)
280 /(
mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
284 label globalFacei = mesh_.nInternalFaces();
286 forAll(mesh_.boundaryMesh(), patchi)
289 mesh_.boundaryMesh()[patchi].faceCells();
292 mesh_.boundaryMesh()[patchi].faceCentres();
295 mesh_.boundaryMesh()[patchi].faceAreas();
297 forAll(faceCentres, facei)
299 vector n = faceAreas[facei]/
mag(faceAreas[facei]);
301 point faceIntersection =
302 cellCtrs[faceCells[facei]]
303 + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&
n)*
n;
305 result[globalFacei++] =
306 mag(faceCentres[facei] - faceIntersection)
308 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.
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.
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)