78 const scalar startStepFraction,
79 const scalar endStepFraction,
111 const vector& displacement,
117 scalar& stepFraction,
118 scalar& stepFractionBehind,
119 label& nTracksBehind,
120 const string& debugPrefix = NullObjectRef<string>()
133 scalar& stepFraction,
134 scalar& stepFractionBehind,
135 label& nTracksBehind,
136 const string& debugPrefix = NullObjectRef<string>()
143 const vector& displacement,
149 scalar& stepFraction,
150 scalar& stepFractionBehind,
151 label& nTracksBehind,
152 const string& debugPrefix = NullObjectRef<string>()
165 scalar& stepFraction,
166 scalar& stepFractionBehind,
167 label& nTracksBehind,
168 const string& debugPrefix = NullObjectRef<string>()
176 template<
class Displacement>
180 const Displacement& displacement,
186 scalar& stepFraction,
187 scalar& stepFractionBehind,
188 label& nTracksBehind,
189 const string& debugPrefix = NullObjectRef<string>()
247 const label faceTrii,
263 detA = ab & (ac ^ ad);
280 const label faceTrii,
281 const scalar startStepFraction,
282 const scalar endStepFraction,
305 centre[0] =
A[0].a();
306 centre[1] =
A[1].a();
308 detA[0] = ab[0] & (ac[0] ^ ad[0]);
310 (ab[1] & (ac[0] ^ ad[0]))
311 + (ab[0] & (ac[1] ^ ad[0]))
312 + (ab[0] & (ac[0] ^ ad[1]));
314 (ab[0] & (ac[1] ^ ad[1]))
315 + (ab[1] & (ac[0] ^ ad[1]))
316 + (ab[1] & (ac[1] ^ ad[0]));
317 detA[3] = ab[1] & (ac[1] ^ ad[1]);
328 (bd[0] ^ bc[1]) + (bd[1] ^ bc[0]),
329 (ac[0] ^ ad[1]) + (ac[1] ^ ad[0]),
330 (ad[0] ^ ab[1]) + (ad[1] ^ ab[0]),
331 (ab[0] ^ ac[1]) + (ab[1] ^ ac[0])
346 const vector& displacement,
352 scalar& stepFraction,
353 scalar& stepFractionBehind,
354 label& nTracksBehind,
355 const string& debugPrefix
358 const bool debug =
notNull(debugPrefix);
359 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
363 const vector& x1 = displacement;
367 << debugPrefix.c_str() <<
": Tracking from " << x0
368 <<
" along " << x1 <<
" to " << x0 + x1 <<
nl;
401 <<
", v1=" << v1 <<
", v2=" << v2 <<
nl
410 <<
debugIndent <<
"Local displacement = " << Tx1 <<
"/" << detA <<
nl;
414 scalar muH = detA > vSmall ? 1/detA : vGreat;
415 for (
label i = 0; i < 4; ++ i)
417 if (Tx1[i] < - vSmall && Tx1[i] < -
mag(detA)*small)
419 scalar
mu = -
y0[i]/Tx1[i];
423 <<
" at local coordinate " <<
y0 +
mu*Tx1 <<
", "
424 <<
mu*detA*100 <<
"% of the " <<
"way along the track"
427 if (0 <=
mu &&
mu < muH)
438 if (iH == -1 && muH == vGreat)
448 for (
label i = 0; i < 4; ++ i)
481 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
482 <<
debugIndent << muH*detA*100 <<
"% of the step from "
483 << stepFraction -
fraction*muH*detA <<
" to "
485 <<
" completed" <<
nl <<
endl;
489 if (muH*detA < small || nTracksBehind > 0)
493 if (stepFractionBehind > rootSmall)
495 stepFractionBehind = 0;
519 scalar& stepFraction,
520 scalar& stepFractionBehind,
521 label& nTracksBehind,
522 const string& debugPrefix
525 const bool debug =
notNull(debugPrefix);
526 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
535 << debugPrefix.c_str() <<
": Tracking from " << x0
536 <<
" along " << x1 <<
',' << x2 <<
" to " << x0 + x1 + x2 <<
nl;
569 <<
", v1=" << v1 <<
", v2=" << v2 <<
nl
587 for (
label i = 0; i < 4; ++ i)
590 << i <<
" = " << hitEqn[i] <<
nl;
596 scalar muH = detA > vSmall ? 1/detA : vGreat;
597 for (
label i = 0; i < 4; ++ i)
601 for (
label j = 0; j < 2; ++ j)
605 mu.type(j) == rootType::real
606 && hitEqn[i].derivative(
mu[j]) < - vSmall
607 && hitEqn[i].derivative(
mu[j]) < -
mag(detA)*small
614 hitEqn[0].value(
mu[j]),
615 hitEqn[1].value(
mu[j]),
616 hitEqn[2].value(
mu[j]),
617 hitEqn[3].value(
mu[j])
622 <<
" at local coordinate " << yH <<
", "
623 <<
mu*detA*100 <<
"% of the " <<
"way along the track"
627 if (0 <=
mu[j] &&
mu[j] < muH)
639 if (iH == -1 && muH == vGreat)
648 hitEqn[0].value(muH),
649 hitEqn[1].value(muH),
650 hitEqn[2].value(muH),
655 for (
label i = 0; i < 4; ++ i)
688 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
689 <<
debugIndent << muH*detA*100 <<
"% of the step from "
690 << stepFraction -
fraction*muH*detA <<
" to "
692 <<
" completed" <<
nl <<
endl;
696 if (muH*detA < small || nTracksBehind > 0)
700 if (stepFractionBehind > rootSmall)
702 stepFractionBehind = 0;
720 const vector& displacement,
726 scalar& stepFraction,
727 scalar& stepFractionBehind,
728 label& nTracksBehind,
729 const string& debugPrefix
732 const bool debug =
notNull(debugPrefix);
733 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
737 const vector& x1 = displacement;
741 << debugPrefix.c_str() <<
": Tracking from " << x0
742 <<
" along " << x1 <<
" to " << x0 + x1 <<
nl;
779 <<
", v1=" << v1[0] <<
", v2=" << v2[0] <<
nl
785 const vector x0Rel = x0 - centre[0];
786 const vector x1Rel = x1 - centre[1];
789 cubicEqn detAEqn(
sqr(detA[0])*detA[3], detA[0]*detA[2], detA[1], 1);
792 ((x1Rel &
T[2]) + detA[3]*yC)*
sqr(detA[0]);
794 ((x1Rel &
T[1]) + (x0Rel &
T[2]) + detA[2]*yC)*detA[0];
796 ((x1Rel &
T[0]) + (x0Rel &
T[1]) + detA[1]*yC);
801 hitEqn[i] =
cubicEqn(hitEqnA[i], hitEqnB[i], hitEqnC[i], hitEqnD[i]);
806 for (
label i = 0; i < 4; ++ i)
809 << i <<
" = " << hitEqn[i] <<
nl;
816 scalar muH = detA[0] > vSmall ? 1/detA[0] : vGreat;
817 for (
label i = 0; i < 4; ++ i)
821 for (
label j = 0; j < 3; ++ j)
825 mu.type(j) == rootType::real
826 && hitEqn[i].derivative(
mu[j]) < - vSmall
827 && hitEqn[i].derivative(
mu[j]) < -
mag(detA[0])*small
834 hitEqn[0].value(
mu[j]),
835 hitEqn[1].value(
mu[j]),
836 hitEqn[2].value(
mu[j]),
837 hitEqn[3].value(
mu[j])
839 const scalar detAH = detAEqn.
value(
mu[j]);
842 <<
" at local coordinate "
843 << (
mag(detAH) > vSmall ?
name(yH/detAH) :
"???")
844 <<
", " <<
mu[j]*detA[0]*100 <<
"% of the "
845 <<
"way along the track" <<
nl;
848 if (0 <=
mu[j] &&
mu[j] < muH)
860 if (iH == -1 && muH == vGreat)
869 hitEqn[0].value(muH),
870 hitEqn[1].value(muH),
871 hitEqn[2].value(muH),
881 const scalar detAH = detAEqn.
value(muH);
882 if (
mag(detAH) < vSmall)
885 <<
"A moving tet collapsed onto a track. This is not supported. "
886 <<
"The mesh is too poor, or the motion too severe, for tracking "
892 for (
label i = 0; i < 4; ++ i)
907 stepFraction +=
fraction*muH*detA[0];
925 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
926 <<
debugIndent << muH*detA[0]*100 <<
"% of the step from "
927 << stepFraction -
fraction*muH*detA[0] <<
" to "
929 <<
" completed" <<
nl <<
endl;
933 if (muH*detA[0] < small || nTracksBehind > 0)
937 if (stepFractionBehind > rootSmall)
939 stepFractionBehind = 0;
963 scalar& stepFraction,
964 scalar& stepFractionBehind,
965 label& nTracksBehind,
966 const string& debugPrefix
970 <<
"Second-order tracking through moving meshes is not supported"
977 template<
class Displacement>
981 const Displacement& displacement,
987 scalar& stepFraction,
988 scalar& stepFractionBehind,
989 label& nTracksBehind,
990 const string& debugPrefix
999 stepFractionBehind, nTracksBehind,
1005 coordinates, celli, facei, faceTrii, stepFraction,
1006 stepFractionBehind, nTracksBehind,
1021 f*displacement.first() + 2*
f*(1 -
f)*displacement.second(),
1022 f*
f*displacement.second()
1055 const label tetTrii,
1064 const label firstTetPti = 1;
1071 else if (tetTrii == 2)
1075 if (faceTrii == lastTetPti)
1087 if (faceTrii == firstTetPti)
1098 else if (tetTrii == 3)
1102 if (faceTrii == firstTetPti)
1114 if (faceTrii == lastTetPti)
1128 <<
"Changing tet without changing cell should only happen when the "
1129 <<
"track is on triangle 1, 2 or 3."
1138 const label tetTrii,
1152 sharedEdge =
edge(triOldIs[1], triOldIs[2]);
1154 else if (tetTrii == 2)
1156 sharedEdge =
edge(triOldIs[2], triOldIs[0]);
1158 else if (tetTrii == 3)
1160 sharedEdge =
edge(triOldIs[0], triOldIs[1]);
1165 <<
"Changing face without changing cell should only happen when the"
1166 <<
" track is on triangle 1, 2 or 3."
1169 sharedEdge =
edge(-1, -1);
1182 if (facei == newFacei)
1188 const label edgeComp = newOwner == celli ? -1 : +1;
1193 edgei < newFace.
size()
1194 && edge::compare(sharedEdge, newFace.
faceEdge(edgei)) != edgeComp;
1199 if (edgei >= newFace.
size())
1206 edgei = (edgei - newBasei + newFace.
size()) % newFace.
size();
1211 edgei =
min(
max(1, edgei), newFace.
size() - 2);
1224 <<
"The search for an edge-connected face and tet-point failed."
1233 else if (sharedEdge.
otherVertex(triOldIs[2]) == -1)
1249 else if (sharedEdge.
otherVertex(triNewIs[2]) == -1)
1263 const label faceTrii,
1264 const scalar stepFraction
1277 celli, facei, faceTrii, stepFraction, 0,
1281 return o + ((
position - centre[0]) &
T[0]/detA[0]);
1291 celli, facei, faceTrii,
1295 return o + ((
position - centre) &
T/detA);
1306 const label faceTrii,
1307 const scalar stepFraction
1332 triPointRef(base[0], vertex1[0], vertex2[0]).normal(),
1340 vector centre, base, vertex1, vertex2;
1363 template<
class Displacement>
1367 const Displacement& displacement,
1373 scalar& stepFraction,
1374 scalar& stepFractionBehind,
1375 label& nTracksBehind,
1376 const string& debugPrefix
1388 coordinates, celli, facei, faceTrii, stepFraction,
1389 stepFractionBehind, nTracksBehind,
1402 else if (tetTrii == 0)
1405 return Tuple2<bool, scalar>(
true,
f);
1420 <<
"Track got stuck at "
1426 stepFractionBehind = 0;
1429 return Tuple2<bool, scalar>(
false, 0);
1434 Foam::tracking::toFace<Foam::vector>
1436 const polyMesh&
mesh,
1439 scalar& stepFraction,
1440 scalar& stepFractionBehind,
label& nTracksBehind,
1441 const string& debugPrefix
1446 Foam::tracking::toFace<Foam::Pair<Foam::vector>>
1448 const polyMesh&
mesh,
1449 const Pair<vector>& displacement,
const scalar
fraction,
1451 scalar& stepFraction,
1452 scalar& stepFractionBehind,
label& nTracksBehind,
1453 const string& debugPrefix
1457 template<
class Displacement>
1460 const polyMesh&
mesh,
1461 const Displacement& displacement,
1467 scalar& stepFraction,
1468 scalar& stepFractionBehind,
1469 label& nTracksBehind,
1470 const string& debugPrefix
1473 const Tuple2<bool, scalar> onFaceAndF =
1477 coordinates, celli, facei, faceTrii, stepFraction,
1478 stepFractionBehind, nTracksBehind,
1482 const bool onInternalFace =
1490 return Tuple2<bool, scalar>(onInternalFace, onFaceAndF.second());
1495 Foam::tracking::toCell<Foam::vector>
1497 const polyMesh&
mesh,
1500 scalar& stepFraction,
1501 scalar& stepFractionBehind,
label& nTracksBehind,
1502 const string& debugPrefix
1507 Foam::tracking::toCell<Foam::Pair<Foam::vector>>
1509 const polyMesh&
mesh,
1510 const Pair<vector>& displacement,
const scalar
fraction,
1512 scalar& stepFraction,
1513 scalar& stepFractionBehind,
label& nTracksBehind,
1514 const string& debugPrefix
1518 template<
class Displacement>
1521 const polyMesh&
mesh,
1522 const Displacement& displacement,
const scalar
fraction,
1527 scalar& stepFraction,
1528 scalar& stepFractionBehind,
1529 label& nTracksBehind,
1530 const string& debugPrefix
1538 const Tuple2<bool, scalar> onFaceAndF =
1542 coordinates, celli, facei, faceTrii, stepFraction,
1543 stepFractionBehind, nTracksBehind,
1547 f *= onFaceAndF.second();
1549 const bool onInternalFace =
1558 const bool onBoundaryFace =
1561 return Tuple2<bool, scalar>(onBoundaryFace, onBoundaryFace ?
f : 0);
1568 Foam::tracking::toBoundary<Foam::vector>
1570 const polyMesh&
mesh,
1573 scalar& stepFraction,
1574 scalar& stepFractionBehind,
label& nTracksBehind,
1575 const string& debugPrefix
1580 Foam::tracking::toBoundary<Foam::Pair<Foam::vector>>
1582 const polyMesh&
mesh,
1583 const Pair<vector>& displacement,
const scalar
fraction,
1585 scalar& stepFraction,
1586 scalar& stepFractionBehind,
label& nTracksBehind,
1587 const string& debugPrefix
1599 const scalar stepFraction,
1600 const string& debugPrefix
1606 <<
"Cell not found for position " <<
position <<
"."
1617 scalar minF = vGreat;
1618 label minFacei = -1, minFaceTrii = -1;
1622 for (
label tetPti = 1; tetPti <
f.size() - 1; ++ tetPti)
1625 facei =
c[cellFacei];
1627 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1628 label nTracksBehind = 0;
1633 mesh, displacement, 0,
1634 coordinates, celli, facei, faceTrii, stepFractionCopy,
1635 stepFractionBehind, nTracksBehind,
1639 if (tetTriiAndF.
first() == -1)
1644 if (tetTriiAndF.
second() < minF)
1646 minF = tetTriiAndF.
second();
1648 minFaceTrii = faceTrii;
1657 faceTrii = minFaceTrii;
1658 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1659 label nTracksBehind = 0;
1663 mesh, displacement, 0,
1664 coordinates, celli, facei, faceTrii, stepFractionCopy,
1665 stepFractionBehind, nTracksBehind,
1670 return !onBoundaryAndF.
first();
1682 const scalar stepFraction,
1683 const string& debugPrefix
1696 searchEngine.
mesh(),
1719 const bool isOwner = celli == ownerCelli;
1734 const scalar stepFraction
1745 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1746 label nTracksBehind = 0;
1800 facei -= inPatch.
start();
1818 facei += outPatch.
start();
#define forAll(list, i)
Loop across all elements in list.
Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transfo...
const Mesh & mesh() const
A 1D vector of objects of type <T> with a fixed size <Size>.
void size(const label)
Override size to be inconsistent with allocated storage.
An ordered pair of two objects of type <Type> with first() and second() elements.
const Type & second() const
Return second.
const Type & first() const
Return first.
Templated storage for the roots of polynomial equations, plus flags to indicate the nature of the roo...
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
void replace(const direction, const Cmpt &)
scalar mag() const
The magnitude of the bounding box span.
A cell is defined as a list of faces with extra functionality.
Cubic equation of the form a*x^3 + b*x^2 + c*x + d = 0.
scalar value(const scalar x) const
Evaluate at x.
const cyclicPolyPatch & nbrPatch() const
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
label otherVertex(const label a) const
Given one vertex, return the other.
A face is a list of labels corresponding to mesh vertices.
edge faceEdge(const label n) const
Return n-th face edge.
Mesh object that implements searches within the local cells and faces.
label findCell(const point &p, const pointInCellShapes=pointInCellShapes::tets) const
Find the cell containing the given point.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const boundBox & bounds() const
Return mesh bounding box.
bool moving() const
Is the mesh moving?
const polyMesh & mesh() const
Return mesh reference.
label start() const
Return start label of this patch in the polyMesh face list.
const labelUList & faceCells() const
Return face-cell addressing.
const vectorField & cellCentres() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
const cellList & cells() const
Neighbour processor patch.
Quadratic equation of the form a*x^2 + b*x + c = 0.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
A triangular face using a FixedList of labels corresponding to mesh vertices.
Wedge front and back plane patch.
const vector & centreNormal() const
Return plane normal between the wedge boundaries.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInfo
Report an information message using Foam::Info.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar mu
Atomic mass unit.
const dimensionedScalar c
Speed of light in a vacuum.
static const coefficient A("A", dimPressure, 611.21)
void reflect(barycentric &coordinates)
Reflection transform. Corrects the coordinates when the track moves.
void stationaryTetReverseTransform(const polyMesh &mesh, const label celli, const label facei, const label faceTrii, vector ¢re, scalar &detA, barycentricTensor &T)
Get the reverse transform associated with the current tet. The.
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.
Tuple2< bool, scalar > toCell(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
As toFace, except that if the track ends on an internal face then this.
Pair< vector > faceNormalAndDisplacement(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the normal of the corresponding point on the associated face and.
void stationaryTetGeometry(const polyMesh &mesh, const label celli, const label facei, const label faceTrii, vector ¢re, vector &base, vector &vertex1, vector &vertex2)
Get the vertices of the current tet.
Tuple2< bool, scalar > toBoundary(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
As toFace, except that the track continues across multiple cells until.
barycentricTensor stationaryTetTransform(const polyMesh &mesh, const label celli, const label facei, const label faceTrii)
Get the transformation associated with the current tet. This.
Tuple2< label, scalar > toMovingTri(const polyMesh &mesh, const vector &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
See toTri. For a moving mesh.
void movingTetGeometry(const polyMesh &mesh, const label celli, const label facei, const label faceTrii, const scalar startStepFraction, const scalar endStepFraction, Pair< vector > ¢re, Pair< vector > &base, Pair< vector > &vertex1, Pair< vector > &vertex2)
Get the vertices of the current moving tet. Two values are.
void changeFace(const polyMesh &mesh, const label tetTrii, barycentric &coordinates, const label celli, label &facei, label &faceTrii)
Change face within a cell. Called (if necessary) by changeFaceTri.
void crossInternalFace(const polyMesh &mesh, barycentric &coordinates, label &celli, label &facei, label &faceTrii)
Cross an internal face.
static const label maxNTracksBehind
The counter nTracksBehind is the number of tracks carried out that.
Pair< barycentricTensor > movingTetTransform(const polyMesh &mesh, const label celli, const label facei, const label faceTrii, const scalar startStepFraction, const scalar endStepFraction)
Get the transformation associated with the current, moving, tet.
void rotate(const bool reverse, barycentric &coordinates)
Rotation transform. Corrects the coordinates when the track moves.
void changeFaceTri(const polyMesh &mesh, const label tetTrii, barycentric &coordinates, const label celli, label &facei, label &faceTrii)
Change face-triangle within a cell. Called after a tet-triangle is hit.
void crossCyclic(const cyclicPolyPatch &inPatch, barycentric &coordinates, label &celli, label &facei, label &faceTrii)
Cross a cyclic patch.
void outProcessor(const processorPolyPatch &outPatch, barycentric &coordinates, label &celli, label &facei, label &faceTrii)
Complete crossing of a processor patch. Restore the topology.
Pair< vector > operator*(const scalar f, const Pair< vector > &displacement)
Scale a second-order displacement.
void inProcessor(const processorPolyPatch &inPatch, label &celli, label &facei)
Initialise crossing of a processor patch. Breaks the topology in order.
void crossWedge(const wedgePolyPatch &inPatch, barycentric &coordinates, label &celli, label &facei, label &faceTrii, const scalar stepFraction)
Cross a wedge patch.
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.
void movingTetReverseTransform(const polyMesh &mesh, const label celli, const label facei, const label faceTrii, const scalar startStepFraction, const scalar endStepFraction, Pair< vector > ¢re, FixedList< scalar, 4 > &detA, FixedList< barycentricTensor, 3 > &T)
Get the reverse transformation associated with the current,.
Tuple2< label, scalar > toStationaryTri(const polyMesh &mesh, const Pair< vector > &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
See toTri. Second order. For a stationary mesh.
Tuple2< label, scalar > toTri(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
Track along the displacement for a given fraction of the overall.
Tuple2< label, scalar > toMovingTri(const polyMesh &mesh, const Pair< vector > &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
See toTri. Second order. For a moving mesh. Not implemented.
Tuple2< bool, scalar > toFace(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
Track along the displacement for a given fraction of the overall.
bool locate(const polyMesh &mesh, const point &position, barycentric &coordinates, label &celli, label &facei, label &faceTrii, const scalar stepFraction, const string &debugPrefix=NullObjectRef< string >())
Initialise the location at the given position. Returns whether or not a.
Tuple2< label, scalar > toStationaryTri(const polyMesh &mesh, const vector &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
See toTri. For a stationary mesh.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar y0(const dimensionedScalar &ds)
void reverse(UList< T > &, const label n)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Vector< scalar > vector
A scalar version of the templated Vector.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
triangle< point, const point & > triPointRef
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
BarycentricTensor< scalar > barycentricTensor
A scalar version of the templated BarycentricTensor.
Cmpt cmptSum(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)