Go to the documentation of this file.
38 const scalar distSqr =
magSqr(pt-origin_);
41 scalar levelSize = level0Size_/(1<<originLevel_);
45 for (
label level = originLevel_; level >= 0; --level)
63 template<
class TrackingData>
64 inline bool Foam::refinementDistanceData::update
74 if (!neighbourInfo.
valid(td))
79 operator=(neighbourInfo);
89 if (nbrLevel > cellLevel)
91 operator=(neighbourInfo);
94 else if (nbrLevel == cellLevel)
98 scalar
diff = myDistSqr - nbrDistSqr;
106 if ((
diff < SMALL) || ((myDistSqr > SMALL) && (
diff/myDistSqr < tol)))
114 operator=(neighbourInfo);
135 const scalar level0Size,
137 const label originLevel
140 level0Size_(level0Size),
142 originLevel_(originLevel)
148 template<
class TrackingData>
151 return level0Size_ != -1;
156 template<
class TrackingData>
169 template<
class TrackingData>
174 const label patchFacei,
175 const point& faceCentre,
179 origin_ -= faceCentre;
183 template<
class TrackingData>
196 template<
class TrackingData>
201 const label patchFacei,
202 const point& faceCentre,
207 origin_ += faceCentre;
212 template<
class TrackingData>
216 const label thisCelli,
217 const label neighbourFacei,
225 return update(
pos, neighbourInfo, tol, td);
230 template<
class TrackingData>
234 const label thisFacei,
235 const label neighbourCelli,
243 return update(
pos, neighbourInfo, tol, td);
248 template<
class TrackingData>
252 const label thisFacei,
260 return update(
pos, neighbourInfo, tol, td);
264 template<
class TrackingData>
273 return (!rhs.
valid(td));
284 inline bool Foam::refinementDistanceData::operator==
290 level0Size_ == rhs.level0Size_
291 && origin_ == rhs.origin_
292 && originLevel_ == rhs.originLevel_;
296 inline bool Foam::refinementDistanceData::operator!=
301 return !(*
this == rhs);
bool sameGeometry(const polyMesh &, const refinementDistanceData &, const scalar, TrackingData &) const
Check for identical geometrical data. Used for cyclics checking.
bool updateCell(const polyMesh &, const label thisCelli, const label neighbourFacei, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
Influence of neighbouring face.
bool valid(TrackingData &) const
Check whether origin has been changed at all or.
refinementDistanceData()
Construct null.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Mesh consisting of general polyhedral cells.
Transfers refinement levels such that slow transition between levels is maintained....
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
bool updateFace(const polyMesh &, const label thisFacei, const label neighbourCelli, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
Influence of neighbouring cell.
A patch is a list of labels that address the faces in the global face list.
errorManip< error > abort(error &err)
void enterDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &)
Reverse of leaveDomain.
void transform(const polyMesh &, const tensor &, TrackingData &)
Apply rotation matrix to any coordinates.
bool equal(const refinementDistanceData &, TrackingData &) const
Same (like operator==)
const vectorField & cellCentres() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const std::string patch
OpenFOAM patch number as a std::string.
const vectorField & faceCentres() const
void leaveDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &)
Convert any absolute coordinates into relative to (patch)face.
const point & origin() const
label wantedLevel(const point &pt) const
Calculates the wanted level at a given point. Walks out from.
dimensionedScalar pos(const dimensionedScalar &ds)