52 mesh.time().timeName(),
64 polyMeshTetDecomposition::cellTetIndices(
mesh, cI);
68 forAll(cellTetIs, cellTetI)
70 const triFace triIs = cellTetIs[cellTetI].faceTriIs(
mesh);
75 mesh.cellCentres()[cI],
76 mesh.points()[triIs[0]],
77 mesh.points()[triIs[1]],
78 mesh.points()[triIs[2]]
110 const fvPatch&
patch,
121 const face&
f =
patch.patch().localFaces()[fI];
126 for (label edgei = 0; edgei <
f.nEdges(); ++edgei)
128 const edge
e =
f.edge(edgei);
130 const FixedList<point, 3>
133 patch.patch().faceCentres()[fI],
134 patch.patch().localPoints()[
e[0]],
135 patch.patch().localPoints()[
e[1]]
137 const FixedList<scalar, 3>
145 a += cut::areaOp()(tri);
149 r +=
triCut(tri, level, cut::areaOp(), cut::noOp());
153 r +=
triCut(tri, level, cut::noOp(), cut::areaOp());
157 result[fI] = a/
magSqr(a) & r;
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
cut::opAddResult< AboveOp, BelowOp >::type tetCut(const FixedList< point, 4 > &tet, const FixedList< scalar, 4 > &level, const AboveOp &aboveOp, const BelowOp &belowOp)
As triCut, but for a tetrahedron.
const dimensionSet dimless
Dimensionless.
cut::opAddResult< AboveOp, BelowOp >::type triCut(const FixedList< point, 3 > &tri, const FixedList< scalar, 3 > &level, const AboveOp &aboveOp, const BelowOp &belowOp)
Cut a triangle along the zero plane defined by the given levels.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar e
Elementary charge.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A triangular face using a FixedList of labels corresponding to mesh vertices.
tmp< DimensionedField< scalar, volMesh > > levelSetFraction(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const bool above)
Calculate the volume-fraction that a level set occupies. This gives the the.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)