61 detA = ba & (bc ^ bd);
95 const vector bc_bd = bc ^ bd;
99 const vector n = detA != 0 ? bc_bd/detA : vector::zero;
125 ? polyMeshTetDecomposition::cellTetIndices
130 : polyMeshTetDecomposition::faceTetIndices
134 this->mesh_.faceOwner()[facei]
142 tetTransform(tetIss[teti], x0, detA,
T);
146 tetFaceTriTransform(tetIss[teti], x0, detA,
T);
149 if (detA <= 0)
continue;
153 if (
cmptMin(detAY) + detA*small > 0)
166 ? tetIss[teti].tet(this->mesh_).nearestPoint(
x).distance()
167 : tetIss[teti].faceTri(this->mesh_).nearestPoint(
x).distance();
179 tetTransform(tetIss[minTeti], x0, detA,
T);
183 tetFaceTriTransform(tetIss[minTeti], x0, detA,
T);
186 return tetIss[minTeti];
211 ? barycentric::uniform(0.25)
253 const Type& psia = this->psi_[tetIs.
cell()];
254 const Type& psib = this->psip_[triIs[0]];
255 const Type& psic = this->psip_[triIs[1]];
256 const Type& psid = this->psip_[triIs[2]];
261 T.x().a()*psia +
T.x().b()*psib +
T.x().c()*psic +
T.x().d()*psid,
262 T.y().a()*psia +
T.y().b()*psib +
T.y().c()*psic +
T.y().d()*psid,
263 T.z().a()*psia +
T.z().b()*psib +
T.z().c()*psic +
T.z().d()*psid
283 return interpolateGrad(tetIs, detA,
T);
300 this->tetTransform(tetIs, x0, detA,
T);
302 return interpolateGrad(tetIs, detA,
T);
#define forAll(list, i)
Loop across all elements in list.
Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transfo...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
barycentric y0() const
Return the barycentric origin for the above transforms.
void tetFaceTriTransform(const tetIndices &tetIs, vector &x0, scalar &detA, barycentricTensor &T) const
Return the transform associated with the face-triangle of the given.
tetIndices findTet(const point &x, const label celli, const label facei, vector &x0, scalar &detA, barycentricTensor &T) const
Find the tetrahedron (or triangle) containing the given point, and.
Type interpolate(const vector &position, const label celli, const label facei=-1) const
Interpolate to the given point in the given cell.
void tetTransform(const tetIndices &tetIs, vector &x0, scalar &detA, barycentricTensor &T) const
Return the transform associated with the given tetrahedron.
interpolationGradType< Type > interpolateGrad(const tetIndices &tetIs, const scalar detA, const barycentricTensor T) const
Interpolate the gradient to the given point in the given cell.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
label cell() const
Return the cell.
triFace faceTriIs(const polyMesh &mesh) const
Return the indices corresponding to the tri on the face for.
A triangular face using a FixedList of labels corresponding to mesh vertices.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
static const coefficient A("A", dimPressure, 611.21)
barycentric coordinates(const polyMesh &mesh, const point &position, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the coordinates given the position and tet topology.
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
scalar minDist(const List< pointIndexHit > &hitList)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar y0(const dimensionedScalar &ds)
typename outerProduct< Type, vector >::type interpolationGradType
void cmptMin(Field< typename Field< Type >::cmptType > &res, const UList< Type > &f)
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
BarycentricTensor< scalar > barycentricTensor
A scalar version of the templated BarycentricTensor.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)