Public Member Functions | Private Member Functions | Private Attributes | Friends
refinementDistanceData Class Reference

Transfers refinement levels such that slow transition between levels is maintained. Used in FaceCellWave. More...

Collaboration diagram for refinementDistanceData:
Collaboration graph
[legend]

Public Member Functions

 refinementDistanceData ()
 Construct null. More...
 
 refinementDistanceData (const scalar level0Size, const point &origin, const label level)
 Construct from count. More...
 
scalar level0Size () const
 
scalar & level0Size ()
 
const pointorigin () const
 
pointorigin ()
 
label originLevel () const
 
labeloriginLevel ()
 
label wantedLevel (const point &pt) const
 Calculates the wanted level at a given point. Walks out from. More...
 
template<class TrackingData >
bool valid (TrackingData &) const
 Check whether origin has been changed at all or. More...
 
template<class TrackingData >
bool sameGeometry (const polyMesh &, const refinementDistanceData &, const scalar, TrackingData &) const
 Check for identical geometrical data. Used for cyclics checking. More...
 
template<class TrackingData >
void leaveDomain (const polyMesh &, const polyPatch &, const label patchFaceI, const point &faceCentre, TrackingData &)
 Convert any absolute coordinates into relative to (patch)face. More...
 
template<class TrackingData >
void enterDomain (const polyMesh &, const polyPatch &, const label patchFaceI, const point &faceCentre, TrackingData &)
 Reverse of leaveDomain. More...
 
template<class TrackingData >
void transform (const polyMesh &, const tensor &, TrackingData &)
 Apply rotation matrix to any coordinates. More...
 
template<class TrackingData >
bool updateCell (const polyMesh &, const label thisCellI, const label neighbourFaceI, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
 Influence of neighbouring face. More...
 
template<class TrackingData >
bool updateFace (const polyMesh &, const label thisFaceI, const label neighbourCellI, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
 Influence of neighbouring cell. More...
 
template<class TrackingData >
bool updateFace (const polyMesh &, const label thisFaceI, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
 Influence of different value on same face. More...
 
template<class TrackingData >
bool equal (const refinementDistanceData &, TrackingData &) const
 Same (like operator==) More...
 
bool operator== (const refinementDistanceData &) const
 
bool operator!= (const refinementDistanceData &) const
 

Private Member Functions

template<class TrackingData >
bool update (const point &, const refinementDistanceData &neighbourInfo, const scalar tol, TrackingData &)
 Updates with neighbouring data. Returns true if something changed. More...
 

Private Attributes

scalar level0Size_
 Unrefined (level0) buffer size (nBufferLayers*level0Size) More...
 
point origin_
 Nearest point with highest level. More...
 
label originLevel_
 

Friends

Ostreamoperator<< (Ostream &, const refinementDistanceData &)
 
Istreamoperator>> (Istream &, refinementDistanceData &)
 

Detailed Description

Transfers refinement levels such that slow transition between levels is maintained. Used in FaceCellWave.

Source files

Definition at line 54 of file refinementDistanceData.H.

Constructor & Destructor Documentation

◆ refinementDistanceData() [1/2]

Construct null.

Definition at line 125 of file refinementDistanceDataI.H.

◆ refinementDistanceData() [2/2]

refinementDistanceData ( const scalar  level0Size,
const point origin,
const label  level 
)
inline

Construct from count.

Definition at line 133 of file refinementDistanceDataI.H.

Member Function Documentation

◆ update()

bool update ( const point pos,
const refinementDistanceData neighbourInfo,
const scalar  tol,
TrackingData &  td 
)
inlineprivate

Updates with neighbouring data. Returns true if something changed.

Definition at line 62 of file refinementDistanceDataI.H.

References Foam::abort(), Foam::diff(), Foam::FatalError, FatalErrorInFunction, Foam::magSqr(), refinementDistanceData::origin(), Foam::pos(), refinementDistanceData::valid(), and refinementDistanceData::wantedLevel().

Here is the call graph for this function:

◆ level0Size() [1/2]

scalar level0Size ( ) const
inline

Definition at line 99 of file refinementDistanceData.H.

References refinementDistanceData::level0Size_.

◆ level0Size() [2/2]

scalar& level0Size ( )
inline

Definition at line 104 of file refinementDistanceData.H.

References refinementDistanceData::level0Size_.

◆ origin() [1/2]

const point& origin ( ) const
inline

Definition at line 109 of file refinementDistanceData.H.

References refinementDistanceData::origin_.

Referenced by refinementDistanceData::update().

Here is the caller graph for this function:

◆ origin() [2/2]

point& origin ( )
inline

Definition at line 114 of file refinementDistanceData.H.

References refinementDistanceData::origin_.

◆ originLevel() [1/2]

label originLevel ( ) const
inline

Definition at line 119 of file refinementDistanceData.H.

References refinementDistanceData::originLevel_.

◆ originLevel() [2/2]

label& originLevel ( )
inline

Definition at line 124 of file refinementDistanceData.H.

References refinementDistanceData::originLevel_.

◆ wantedLevel()

Foam::label wantedLevel ( const point pt) const
inline

Calculates the wanted level at a given point. Walks out from.

the origin.

Definition at line 32 of file refinementDistanceDataI.H.

References refinementDistanceData::level0Size_, Foam::magSqr(), refinementDistanceData::origin_, refinementDistanceData::originLevel_, and Foam::sqr().

Referenced by refinementDistanceData::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

bool valid ( TrackingData &  td) const
inline

Check whether origin has been changed at all or.

still contains original (invalid) value.

Definition at line 148 of file refinementDistanceDataI.H.

Referenced by refinementDistanceData::equal(), and refinementDistanceData::update().

Here is the caller graph for this function:

◆ sameGeometry()

bool sameGeometry ( const polyMesh ,
const refinementDistanceData ,
const  scalar,
TrackingData &  td 
) const
inline

Check for identical geometrical data. Used for cyclics checking.

Definition at line 157 of file refinementDistanceDataI.H.

◆ leaveDomain()

void leaveDomain ( const polyMesh ,
const polyPatch patch,
const label  patchFaceI,
const point faceCentre,
TrackingData &  td 
)
inline

Convert any absolute coordinates into relative to (patch)face.

centre

Definition at line 170 of file refinementDistanceDataI.H.

◆ enterDomain()

void enterDomain ( const polyMesh ,
const polyPatch patch,
const label  patchFaceI,
const point faceCentre,
TrackingData &  td 
)
inline

Reverse of leaveDomain.

Definition at line 197 of file refinementDistanceDataI.H.

◆ transform()

void transform ( const polyMesh ,
const tensor rotTensor,
TrackingData &  td 
)
inline

Apply rotation matrix to any coordinates.

Definition at line 184 of file refinementDistanceDataI.H.

References Foam::transform().

Here is the call graph for this function:

◆ updateCell()

bool updateCell ( const polyMesh mesh,
const label  thisCellI,
const label  neighbourFaceI,
const refinementDistanceData neighbourInfo,
const scalar  tol,
TrackingData &  td 
)
inline

Influence of neighbouring face.

Definition at line 213 of file refinementDistanceDataI.H.

References primitiveMesh::cellCentres(), mesh, and Foam::pos().

Here is the call graph for this function:

◆ updateFace() [1/2]

bool updateFace ( const polyMesh mesh,
const label  thisFaceI,
const label  neighbourCellI,
const refinementDistanceData neighbourInfo,
const scalar  tol,
TrackingData &  td 
)
inline

Influence of neighbouring cell.

Definition at line 231 of file refinementDistanceDataI.H.

References primitiveMesh::faceCentres(), mesh, and Foam::pos().

Here is the call graph for this function:

◆ updateFace() [2/2]

bool updateFace ( const polyMesh mesh,
const label  thisFaceI,
const refinementDistanceData neighbourInfo,
const scalar  tol,
TrackingData &  td 
)
inline

Influence of different value on same face.

Definition at line 249 of file refinementDistanceDataI.H.

References primitiveMesh::faceCentres(), mesh, and Foam::pos().

Here is the call graph for this function:

◆ equal()

bool equal ( const refinementDistanceData rhs,
TrackingData &  td 
) const
inline

Same (like operator==)

Definition at line 265 of file refinementDistanceDataI.H.

References Foam::operator==(), and refinementDistanceData::valid().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const refinementDistanceData rhs) const
inline

◆ operator!=()

bool operator!= ( const refinementDistanceData rhs) const
inline

Definition at line 304 of file refinementDistanceDataI.H.

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const refinementDistanceData  
)
friend

◆ operator>>

Istream& operator>> ( Istream ,
refinementDistanceData  
)
friend

Field Documentation

◆ level0Size_

scalar level0Size_
private

Unrefined (level0) buffer size (nBufferLayers*level0Size)

Definition at line 60 of file refinementDistanceData.H.

Referenced by refinementDistanceData::level0Size(), refinementDistanceData::operator==(), and refinementDistanceData::wantedLevel().

◆ origin_

point origin_
private

Nearest point with highest level.

Definition at line 63 of file refinementDistanceData.H.

Referenced by refinementDistanceData::operator==(), refinementDistanceData::origin(), and refinementDistanceData::wantedLevel().

◆ originLevel_

label originLevel_
private

The documentation for this class was generated from the following files: