79 const scalar startStepFraction,
80 const scalar endStepFraction,
112 const vector& displacement,
113 const scalar fraction,
118 scalar& stepFraction,
119 scalar& stepFractionBehind,
120 label& nTracksBehind,
121 const string& debugPrefix = NullObjectRef<string>()
129 const scalar fraction,
134 scalar& stepFraction,
135 scalar& stepFractionBehind,
136 label& nTracksBehind,
137 const string& debugPrefix = NullObjectRef<string>()
144 const vector& displacement,
145 const scalar fraction,
150 scalar& stepFraction,
151 scalar& stepFractionBehind,
152 label& nTracksBehind,
153 const string& debugPrefix = NullObjectRef<string>()
161 const scalar fraction,
166 scalar& stepFraction,
167 scalar& stepFractionBehind,
168 label& nTracksBehind,
169 const string& debugPrefix = NullObjectRef<string>()
177 template<
class Displacement>
181 const Displacement& displacement,
182 const scalar fraction,
187 scalar& stepFraction,
188 scalar& stepFractionBehind,
189 label& nTracksBehind,
190 const string& debugPrefix = NullObjectRef<string>()
248 const label faceTrii,
264 detA = ab & (ac ^ ad);
281 const label faceTrii,
282 const scalar startStepFraction,
283 const scalar endStepFraction,
306 centre[0] =
A[0].a();
307 centre[1] =
A[1].a();
309 detA[0] = ab[0] & (ac[0] ^ ad[0]);
311 (ab[1] & (ac[0] ^ ad[0]))
312 + (ab[0] & (ac[1] ^ ad[0]))
313 + (ab[0] & (ac[0] ^ ad[1]));
315 (ab[0] & (ac[1] ^ ad[1]))
316 + (ab[1] & (ac[0] ^ ad[1]))
317 + (ab[1] & (ac[1] ^ ad[0]));
318 detA[3] = ab[1] & (ac[1] ^ ad[1]);
329 (bd[0] ^ bc[1]) + (bd[1] ^ bc[0]),
330 (ac[0] ^ ad[1]) + (ac[1] ^ ad[0]),
331 (ad[0] ^ ab[1]) + (ad[1] ^ ab[0]),
332 (ab[0] ^ ac[1]) + (ab[1] ^ ac[0])
347 const vector& displacement,
348 const scalar fraction,
353 scalar& stepFraction,
354 scalar& stepFractionBehind,
355 label& nTracksBehind,
356 const string& debugPrefix
359 const bool debug =
notNull(debugPrefix);
360 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
364 const vector& x1 = displacement;
368 << debugPrefix.c_str() <<
": Tracking from " << x0
369 <<
" along " << x1 <<
" to " << x0 + x1 <<
nl;
402 <<
", v1=" << v1 <<
", v2=" << v2 <<
nl
411 <<
debugIndent <<
"Local displacement = " << Tx1 <<
"/" << detA <<
nl;
415 scalar muH = detA > vSmall ? 1/detA : vGreat;
416 for (
label i = 0; i < 4; ++ i)
418 if (Tx1[i] < - vSmall && Tx1[i] < -
mag(detA)*small)
420 scalar
mu = -
y0[i]/Tx1[i];
424 <<
" at local coordinate " <<
y0 +
mu*Tx1 <<
", "
425 <<
mu*detA*100 <<
"% of the " <<
"way along the track"
428 if (0 <=
mu &&
mu < muH)
439 if (iH == -1 && muH == vGreat)
441 stepFraction += fraction;
449 for (
label i = 0; i < 4; ++ i)
464 stepFraction += fraction*muH*detA;
482 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
483 <<
debugIndent << muH*detA*100 <<
"% of the step from "
484 << stepFraction - fraction*muH*detA <<
" to "
485 << stepFraction - fraction*muH*detA + fraction
486 <<
" completed" <<
nl <<
endl;
490 if (muH*detA < small || nTracksBehind > 0)
492 stepFractionBehind += (fraction != 0 ? fraction : 1)*muH*detA;
494 if (stepFractionBehind > rootSmall)
496 stepFractionBehind = 0;
515 const scalar fraction,
520 scalar& stepFraction,
521 scalar& stepFractionBehind,
522 label& nTracksBehind,
523 const string& debugPrefix
526 const bool debug =
notNull(debugPrefix);
527 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
536 << debugPrefix.c_str() <<
": Tracking from " << x0
537 <<
" along " << x1 <<
',' << x2 <<
" to " << x0 + x1 + x2 <<
nl;
570 <<
", v1=" << v1 <<
", v2=" << v2 <<
nl
588 for (
label i = 0; i < 4; ++ i)
591 << i <<
" = " << hitEqn[i] <<
nl;
597 scalar muH = detA > vSmall ? 1/detA : vGreat;
598 for (
label i = 0; i < 4; ++ i)
602 for (
label j = 0; j < 2; ++ j)
606 mu.type(j) == rootType::real
607 && hitEqn[i].derivative(
mu[j]) < - vSmall
608 && hitEqn[i].derivative(
mu[j]) < -
mag(detA)*small
615 hitEqn[0].value(
mu[j]),
616 hitEqn[1].value(
mu[j]),
617 hitEqn[2].value(
mu[j]),
618 hitEqn[3].value(
mu[j])
623 <<
" at local coordinate " << yH <<
", "
624 <<
mu*detA*100 <<
"% of the " <<
"way along the track"
628 if (0 <=
mu[j] &&
mu[j] < muH)
640 if (iH == -1 && muH == vGreat)
642 stepFraction += fraction;
649 hitEqn[0].value(muH),
650 hitEqn[1].value(muH),
651 hitEqn[2].value(muH),
656 for (
label i = 0; i < 4; ++ i)
671 stepFraction += fraction*muH*detA;
689 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
690 <<
debugIndent << muH*detA*100 <<
"% of the step from "
691 << stepFraction - fraction*muH*detA <<
" to "
692 << stepFraction - fraction*muH*detA + fraction
693 <<
" completed" <<
nl <<
endl;
697 if (muH*detA < small || nTracksBehind > 0)
699 stepFractionBehind += (fraction != 0 ? fraction : 1)*muH*detA;
701 if (stepFractionBehind > rootSmall)
703 stepFractionBehind = 0;
721 const vector& displacement,
722 const scalar fraction,
727 scalar& stepFraction,
728 scalar& stepFractionBehind,
729 label& nTracksBehind,
730 const string& debugPrefix
733 const bool debug =
notNull(debugPrefix);
734 #define debugIndent string(debugPrefix.size(), ' ').c_str() << ": "
738 const vector& x1 = displacement;
742 << debugPrefix.c_str() <<
": Tracking from " << x0
743 <<
" along " << x1 <<
" to " << x0 + x1 <<
nl;
780 <<
", v1=" << v1[0] <<
", v2=" << v2[0] <<
nl
786 const vector x0Rel = x0 - centre[0];
787 const vector x1Rel = x1 - centre[1];
790 cubicEqn detAEqn(
sqr(detA[0])*detA[3], detA[0]*detA[2], detA[1], 1);
793 ((x1Rel &
T[2]) + detA[3]*yC)*
sqr(detA[0]);
795 ((x1Rel &
T[1]) + (x0Rel &
T[2]) + detA[2]*yC)*detA[0];
797 ((x1Rel &
T[0]) + (x0Rel &
T[1]) + detA[1]*yC);
802 hitEqn[i] =
cubicEqn(hitEqnA[i], hitEqnB[i], hitEqnC[i], hitEqnD[i]);
807 for (
label i = 0; i < 4; ++ i)
810 << i <<
" = " << hitEqn[i] <<
nl;
817 scalar muH = detA[0] > vSmall ? 1/detA[0] : vGreat;
818 for (
label i = 0; i < 4; ++ i)
822 for (
label j = 0; j < 3; ++ j)
826 mu.type(j) == rootType::real
827 && hitEqn[i].derivative(
mu[j]) < - vSmall
828 && hitEqn[i].derivative(
mu[j]) < -
mag(detA[0])*small
835 hitEqn[0].value(
mu[j]),
836 hitEqn[1].value(
mu[j]),
837 hitEqn[2].value(
mu[j]),
838 hitEqn[3].value(
mu[j])
840 const scalar detAH = detAEqn.
value(
mu[j]);
843 <<
" at local coordinate "
844 << (
mag(detAH) > vSmall ?
name(yH/detAH) :
"???")
845 <<
", " <<
mu[j]*detA[0]*100 <<
"% of the "
846 <<
"way along the track" <<
nl;
849 if (0 <=
mu[j] &&
mu[j] < muH)
861 if (iH == -1 && muH == vGreat)
863 stepFraction += fraction;
870 hitEqn[0].value(muH),
871 hitEqn[1].value(muH),
872 hitEqn[2].value(muH),
882 const scalar detAH = detAEqn.
value(muH);
883 if (
mag(detAH) < vSmall)
886 <<
"A moving tet collapsed onto a track. This is not supported. "
887 <<
"The mesh is too poor, or the motion too severe, for tracking "
893 for (
label i = 0; i < 4; ++ i)
908 stepFraction += fraction*muH*detA[0];
926 <<
debugIndent <<
"Tracking displacement = " << xH - x0 <<
nl
927 <<
debugIndent << muH*detA[0]*100 <<
"% of the step from "
928 << stepFraction - fraction*muH*detA[0] <<
" to "
929 << stepFraction - fraction*muH*detA[0] + fraction
930 <<
" completed" <<
nl <<
endl;
934 if (muH*detA[0] < small || nTracksBehind > 0)
936 stepFractionBehind += (fraction != 0 ? fraction : 1)*muH*detA[0];
938 if (stepFractionBehind > rootSmall)
940 stepFractionBehind = 0;
959 const scalar fraction,
964 scalar& stepFraction,
965 scalar& stepFractionBehind,
966 label& nTracksBehind,
967 const string& debugPrefix
971 <<
"Second-order tracking through moving meshes is not supported"
978 template<
class Displacement>
982 const Displacement& displacement,
983 const scalar fraction,
988 scalar& stepFraction,
989 scalar& stepFractionBehind,
990 label& nTracksBehind,
991 const string& debugPrefix
995 mesh.
moving() && (stepFraction != 1 || fraction != 0)
998 mesh, displacement, fraction,
1000 stepFractionBehind, nTracksBehind,
1005 mesh, displacement, fraction,
1006 coordinates, celli, facei, faceTrii, stepFraction,
1007 stepFractionBehind, nTracksBehind,
1022 f*displacement.first() + 2*
f*(1 -
f)*displacement.second(),
1023 f*
f*displacement.second()
1056 const label tetTrii,
1065 const label firstTetPti = 1;
1072 else if (tetTrii == 2)
1076 if (faceTrii == lastTetPti)
1088 if (faceTrii == firstTetPti)
1099 else if (tetTrii == 3)
1103 if (faceTrii == firstTetPti)
1115 if (faceTrii == lastTetPti)
1129 <<
"Changing tet without changing cell should only happen when the "
1130 <<
"track is on triangle 1, 2 or 3."
1139 const label tetTrii,
1153 sharedEdge =
edge(triOldIs[1], triOldIs[2]);
1155 else if (tetTrii == 2)
1157 sharedEdge =
edge(triOldIs[2], triOldIs[0]);
1159 else if (tetTrii == 3)
1161 sharedEdge =
edge(triOldIs[0], triOldIs[1]);
1166 <<
"Changing face without changing cell should only happen when the"
1167 <<
" track is on triangle 1, 2 or 3."
1170 sharedEdge =
edge(-1, -1);
1183 if (facei == newFacei)
1189 const label edgeComp = newOwner == celli ? -1 : +1;
1194 edgei < newFace.
size()
1195 && edge::compare(sharedEdge, newFace.
faceEdge(edgei)) != edgeComp;
1200 if (edgei >= newFace.
size())
1207 edgei = (edgei - newBasei + newFace.
size()) % newFace.
size();
1212 edgei =
min(
max(1, edgei), newFace.
size() - 2);
1225 <<
"The search for an edge-connected face and tet-point failed."
1234 else if (sharedEdge.
otherVertex(triOldIs[2]) == -1)
1250 else if (sharedEdge.
otherVertex(triNewIs[2]) == -1)
1264 const label faceTrii,
1265 const scalar stepFraction
1278 celli, facei, faceTrii, stepFraction, 0,
1282 return o + ((
position - centre[0]) &
T[0]/detA[0]);
1292 celli, facei, faceTrii,
1296 return o + ((
position - centre) &
T/detA);
1307 const label faceTrii,
1308 const scalar stepFraction
1333 triPointRef(base[0], vertex1[0], vertex2[0]).normal(),
1341 vector centre, base, vertex1, vertex2;
1364 template<
class Displacement>
1368 const Displacement& displacement,
1369 const scalar fraction,
1374 scalar& stepFraction,
1375 scalar& stepFractionBehind,
1376 label& nTracksBehind,
1377 const string& debugPrefix
1388 mesh,
f*displacement,
f*fraction,
1389 coordinates, celli, facei, faceTrii, stepFraction,
1390 stepFractionBehind, nTracksBehind,
1403 else if (tetTrii == 0)
1406 return Tuple2<bool, scalar>(
true,
f);
1421 <<
"Track got stuck at "
1425 stepFraction +=
f*fraction;
1427 stepFractionBehind = 0;
1430 return Tuple2<bool, scalar>(
false, 0);
1435 Foam::tracking::toFace<Foam::vector>
1437 const polyMesh&
mesh,
1438 const vector& displacement,
const scalar fraction,
1440 scalar& stepFraction,
1441 scalar& stepFractionBehind,
label& nTracksBehind,
1442 const string& debugPrefix
1447 Foam::tracking::toFace<Foam::Pair<Foam::vector>>
1449 const polyMesh&
mesh,
1450 const Pair<vector>& displacement,
const scalar fraction,
1452 scalar& stepFraction,
1453 scalar& stepFractionBehind,
label& nTracksBehind,
1454 const string& debugPrefix
1458 template<
class Displacement>
1461 const polyMesh&
mesh,
1462 const Displacement& displacement,
1463 const scalar fraction,
1468 scalar& stepFraction,
1469 scalar& stepFractionBehind,
1470 label& nTracksBehind,
1471 const string& debugPrefix
1474 const Tuple2<bool, scalar> onFaceAndF =
1477 mesh, displacement, fraction,
1478 coordinates, celli, facei, faceTrii, stepFraction,
1479 stepFractionBehind, nTracksBehind,
1483 const bool onInternalFace =
1491 return Tuple2<bool, scalar>(onInternalFace, onFaceAndF.second());
1496 Foam::tracking::toCell<Foam::vector>
1498 const polyMesh&
mesh,
1499 const vector& displacement,
const scalar fraction,
1501 scalar& stepFraction,
1502 scalar& stepFractionBehind,
label& nTracksBehind,
1503 const string& debugPrefix
1508 Foam::tracking::toCell<Foam::Pair<Foam::vector>>
1510 const polyMesh&
mesh,
1511 const Pair<vector>& displacement,
const scalar fraction,
1513 scalar& stepFraction,
1514 scalar& stepFractionBehind,
label& nTracksBehind,
1515 const string& debugPrefix
1519 template<
class Displacement>
1522 const polyMesh&
mesh,
1523 const Displacement& displacement,
const scalar fraction,
1528 scalar& stepFraction,
1529 scalar& stepFractionBehind,
1530 label& nTracksBehind,
1531 const string& debugPrefix
1539 const Tuple2<bool, scalar> onFaceAndF =
1542 mesh,
f*displacement,
f*fraction,
1543 coordinates, celli, facei, faceTrii, stepFraction,
1544 stepFractionBehind, nTracksBehind,
1548 f *= onFaceAndF.second();
1550 const bool onInternalFace =
1559 const bool onBoundaryFace =
1562 return Tuple2<bool, scalar>(onBoundaryFace, onBoundaryFace ?
f : 0);
1569 Foam::tracking::toBoundary<Foam::vector>
1571 const polyMesh&
mesh,
1572 const vector& displacement,
const scalar fraction,
1574 scalar& stepFraction,
1575 scalar& stepFractionBehind,
label& nTracksBehind,
1576 const string& debugPrefix
1581 Foam::tracking::toBoundary<Foam::Pair<Foam::vector>>
1583 const polyMesh&
mesh,
1584 const Pair<vector>& displacement,
const scalar fraction,
1586 scalar& stepFraction,
1587 scalar& stepFractionBehind,
label& nTracksBehind,
1588 const string& debugPrefix
1600 const scalar stepFraction,
1601 const string& debugPrefix
1612 <<
"Cell not found for position " <<
position <<
"."
1623 scalar minF = vGreat;
1624 label minFacei = -1, minFaceTrii = -1;
1628 for (
label tetPti = 1; tetPti <
f.size() - 1; ++ tetPti)
1631 facei =
c[cellFacei];
1633 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1634 label nTracksBehind = 0;
1639 mesh, displacement, 0,
1640 coordinates, celli, facei, faceTrii, stepFractionCopy,
1641 stepFractionBehind, nTracksBehind,
1645 if (tetTriiAndF.
first() == -1)
1650 if (tetTriiAndF.
second() < minF)
1652 minF = tetTriiAndF.
second();
1654 minFaceTrii = faceTrii;
1663 faceTrii = minFaceTrii;
1664 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1665 label nTracksBehind = 0;
1669 mesh, displacement, 0,
1670 coordinates, celli, facei, faceTrii, stepFractionCopy,
1671 stepFractionBehind, nTracksBehind,
1676 return !onBoundaryAndF.
first();
1691 const bool isOwner = celli == ownerCelli;
1706 const scalar stepFraction
1717 scalar stepFractionCopy = stepFraction, stepFractionBehind = 0;
1718 label nTracksBehind = 0;
1772 facei -= inPatch.
start();
1790 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...
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.
const polyMesh & mesh() const
Return the mesh reference.
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 indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
const boundBox & bounds() const
Return mesh bounding box.
bool moving() const
Is mesh moving.
label start() const
Return start label of this patch in the polyMesh face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
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 T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void reverse(UList< T > &, const label n)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
triangle< point, const point & > triPointRef
BarycentricTensor< scalar > barycentricTensor
A scalar version of the templated BarycentricTensor.
Cmpt cmptSum(const VectorSpace< Form, Cmpt, Ncmpts > &vs)