48 IOobject::NO_REGISTER,
52 auto& result = tResult.ref();
57 polyMeshTetDecomposition::cellTetIndices(
mesh, cI);
61 forAll(cellTetIs, cellTetI)
63 const triFace triIs = cellTetIs[cellTetI].faceTriIs(
mesh);
68 mesh.cellCentres()[cI],
69 mesh.points()[triIs[0]],
70 mesh.points()[triIs[1]],
71 mesh.points()[triIs[2]]
103 const fvPatch&
patch,
110 auto& result = tResult.ref();
114 const face&
f =
patch.patch().localFaces()[fI];
119 for (label edgei = 0; edgei <
f.nEdges(); ++edgei)
121 const edge
e =
f.edge(edgei);
123 const FixedList<point, 3>
126 patch.patch().faceCentres()[fI],
127 patch.patch().localPoints()[
e[0]],
128 patch.patch().localPoints()[
e[1]]
130 const FixedList<scalar, 3>
138 a += cut::areaOp()(tri);
142 r +=
triCut(tri, level, cut::areaOp(), cut::noOp());
146 r +=
triCut(tri, level, cut::noOp(), cut::areaOp());
150 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...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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.
const std::string patch
OpenFOAM patch number as a std::string.
A class for managing temporary objects.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)