33inline void Foam::wallPointAddressing::setNull
35 const globalIndexAndTransform& gt
40 const label proci = 0;
41 const label index = -1;
44 data_ = gt.encode(proci, index, gt.nullTransformIndex());
50template<
class TrackingData>
51inline bool Foam::wallPointAddressing::update
59 const scalar dist2 =
magSqr(pt -
w2.origin());
63 const scalar
diff = distSqr() - dist2;
71 if ((
diff < SMALL) || ((distSqr() > SMALL) && (
diff/distSqr() < tol)))
82 origin() =
w2.origin();
113template<
class TrackingData>
118 const label patchFacei,
119 const point& faceCentre,
123 const auto& gt =
mesh.globalData().globalTransforms();
131 const label transformi = gt.transformIndex(data_);
132 const label proci = gt.processor(data_);
133 const label index = gt.index(data_);
136 const label newTransformi = gt.addToTransformIndex
141 data_ = gt.encode(proci, index, newTransformi);
163template<
class TrackingData>
167 const label thisCelli,
168 const label neighbourFacei,
174 setNull(
mesh.globalData().globalTransforms());
180 cellCentres[thisCelli],
189template<
class TrackingData>
193 const label thisFacei,
200 setNull(
mesh.globalData().globalTransforms());
206 faceCentres[thisFacei],
215template<
class TrackingData>
219 const label thisFacei,
225 setNull(
mesh.globalData().globalTransforms());
231 faceCentres[thisFacei],
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
Holds information (coordinate and origin) regarding nearest wall point.
bool updateCell(const polyMesh &mesh, const label thisCelli, const label neighbourFacei, const wallPointAddressing &neighbourWallInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
bool updateFace(const polyMesh &mesh, const label thisFacei, const label neighbourCelli, const wallPointAddressing &neighbourWallInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
const labelPair & data() const
wallPointAddressing()
Default construct.
void leaveDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Convert any absolute coordinates into relative to (patch)face centre.
Holds information regarding nearest wall point. Used in wall distance calculation.
const point & origin() const
wallPoint()
Default construct.
void leaveDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Convert any absolute coordinates into relative to (patch)face centre.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Pair< label > labelPair
A pair of labels.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)