31 template<
class Po
intField>
37 return (1.0/2.0)*((ps[1] - ps[0])^(ps[2] - ps[0]));
59 const vector a = (pNext -
p)^(pAvg -
p);
64 return (1.0/2.0)*sumA;
68 template<
class Po
intField>
74 return areaAndCentre(ps).second();
78 template<
class Po
intField>
90 (1.0/2.0)*((ps[1] - ps[0])^(ps[2] - ps[0])),
91 (1.0/3.0)*(ps[0] + ps[1] + ps[2])
114 const vector a = (pNext -
p)^(pAvg -
p);
131 const vector a = (pNext -
p)^(pAvg -
p);
134 const scalar an = a & sumAHat;
147 sumAn > vSmall ? (1.0/3.0)*sumAnc/sumAn : pAvg
152 template<
class Po
intField>
162 return areaAndCentre(ps);
199 const point c =
p + pNext + pAvg;
210 if (sumAn.
value >= vSmall)
213 result.
second() = (1 -
f)*(1.0/3.0)*sumAnc/sumAn.
value +
f*pAvg;
248 pAvg += ps[operator[](
pi)];
249 fldAvg +=
fld[operator[](
pi)];
260 const point&
p = ps[operator[](
pi)];
261 const point& pNext = ps[operator[](fcIndex(
pi))];
263 const vector a = (pNext -
p)^(pAvg -
p);
275 const point&
p = ps[operator[](
pi)];
276 const point& pNext = ps[operator[](fcIndex(
pi))];
278 const vector a = (pNext -
p)^(pAvg -
p);
281 +
fld[operator[](fcIndex(
pi))]
284 const scalar an = a & sumAHat;
295 return (1.0/3.0)*sumAnf/sumAn;
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
static vector centre(const PointField &ps)
Return centre point given face points.
Type average(const pointField &, const Field< Type > &) const
Calculate average value at centroid of face.
static Tuple2< vector, point > areaAndCentreStabilised(const PointField &)
Return vector area and centre point given face points. Stabilised.
static vector area(const PointField &ps)
Return vector area given face points.
static Tuple2< vector, point > areaAndCentre(const PointField &)
Return vector area and centre point given face points.
Class to encapsulate a scalar value and an associated round-off error. The error is tracked through o...
Vector of scalarAndError-s.
Vector< scalar > value() const
Return the value.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar c
Speed of light in a vacuum.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionSet normalised(const dimensionSet &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)