Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Friends
directionInfo Class Reference

Holds direction in which to split cell (in fact a local coordinate axes). Information is a label and a direction. More...

Collaboration diagram for directionInfo:
Collaboration graph
[legend]

Public Member Functions

 directionInfo ()
 Construct null. More...
 
 directionInfo (const label, const vector &n)
 Construct from components. More...
 
 directionInfo (const directionInfo &)
 Construct as copy. More...
 
label index () const
 
const vectorn () const
 
template<class TrackingData >
bool valid (TrackingData &td) const
 Check whether origin has been changed at all or. More...
 
template<class TrackingData >
bool sameGeometry (const polyMesh &, const directionInfo &, const scalar, TrackingData &td) 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 &td)
 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 &td)
 Reverse of leaveDomain. More...
 
template<class TrackingData >
void transform (const polyMesh &, const tensor &, TrackingData &td)
 Apply rotation matrix to any coordinates. More...
 
template<class TrackingData >
bool updateCell (const polyMesh &, const label thisCellI, const label neighbourFaceI, const directionInfo &neighbourInfo, const scalar tol, TrackingData &td)
 Influence of neighbouring face. More...
 
template<class TrackingData >
bool updateFace (const polyMesh &, const label thisFaceI, const label neighbourCellI, const directionInfo &neighbourInfo, const scalar tol, TrackingData &td)
 Influence of neighbouring cell. More...
 
template<class TrackingData >
bool updateFace (const polyMesh &, const label thisFaceI, const directionInfo &neighbourInfo, const scalar tol, TrackingData &td)
 Influence of different value on same face. More...
 
template<class TrackingData >
bool equal (const directionInfo &, TrackingData &td) const
 Same (like operator==) More...
 
bool operator== (const directionInfo &) const
 
bool operator!= (const directionInfo &) const
 

Static Public Member Functions

static label edgeToFaceIndex (const primitiveMesh &mesh, const label cellI, const label faceI, const label edgeI)
 Given edge on hex cell find corresponding edge on face. Is either. More...
 

Static Private Member Functions

static label findEdge (const primitiveMesh &mesh, const labelList &edgeLabels, const label v1, const label v0)
 Find edge among edgeLabels that uses v0 and v1. More...
 
static label lowest (const label size, const label a, const label b)
 Return 'lowest' of a,b in face of size. More...
 

Private Attributes

label index_
 
vector n_
 

Friends

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

Detailed Description

Holds direction in which to split cell (in fact a local coordinate axes). Information is a label and a direction.

The direction is the normal direction to cut in. The label's meaning depends on whether the info is on a cell or on a face:

The rule is that if the label is set (-1 or higher) it is used (topological information only), otherwise the vector is used. This makes sure that we use topological information as much as possible and so a hex mesh is cut purely topologically. All other shapes are cut geometrically.

Source files

Definition at line 75 of file directionInfo.H.

Constructor & Destructor Documentation

◆ directionInfo() [1/3]

directionInfo ( )
inline

Construct null.

Definition at line 33 of file directionInfoI.H.

◆ directionInfo() [2/3]

directionInfo ( const label  index,
const vector n 
)
inline

Construct from components.

Definition at line 42 of file directionInfoI.H.

◆ directionInfo() [3/3]

directionInfo ( const directionInfo w2)
inline

Construct as copy.

Definition at line 53 of file directionInfoI.H.

Member Function Documentation

◆ findEdge()

Foam::label findEdge ( const primitiveMesh mesh,
const labelList edgeLabels,
const label  v1,
const label  v0 
)
staticprivate

Find edge among edgeLabels that uses v0 and v1.

Definition at line 33 of file directionInfo.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, and mesh.

Here is the call graph for this function:

◆ lowest()

Foam::label lowest ( const label  size,
const label  a,
const label  b 
)
staticprivate

Return 'lowest' of a,b in face of size.

Definition at line 61 of file directionInfo.C.

References Foam::abort(), Foam::constant::physicoChemical::b, Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ edgeToFaceIndex()

Foam::label edgeToFaceIndex ( const primitiveMesh mesh,
const label  cellI,
const label  faceI,
const label  edgeI 
)
static

Given edge on hex cell find corresponding edge on face. Is either.

index in face or -1 (cut tangential to face). Public since is needed to fill in seed faces in meshWave.

Definition at line 93 of file directionInfo.C.

References Foam::abort(), Foam::constant::electromagnetic::e, edge::end(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), Foam::meshTools::getEdgeFaces(), mesh, edge::start(), and Foam::meshTools::walkFace().

Referenced by directions::propagateDirection().

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

◆ index()

label index ( ) const
inline

Definition at line 140 of file directionInfo.H.

References directionInfo::index_.

Referenced by directionInfo::operator==(), directionInfo::updateCell(), and directionInfo::updateFace().

Here is the caller graph for this function:

◆ n()

const vector& n ( ) const
inline

Definition at line 145 of file directionInfo.H.

References directionInfo::n_.

Referenced by directionInfo::operator==(), directionInfo::updateCell(), and directionInfo::updateFace().

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 63 of file directionInfoI.H.

◆ sameGeometry()

bool sameGeometry ( const polyMesh ,
const directionInfo w2,
const scalar  tol,
TrackingData &  td 
) const
inline

Check for identical geometrical data. Used for cyclics checking.

Definition at line 72 of file directionInfoI.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 87 of file directionInfoI.H.

◆ enterDomain()

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

Reverse of leaveDomain.

Definition at line 103 of file directionInfoI.H.

References f(), and List::size().

Here is the call graph for this function:

◆ transform()

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

Apply rotation matrix to any coordinates.

Definition at line 123 of file directionInfoI.H.

◆ updateCell()

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

◆ updateFace() [1/2]

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

Influence of neighbouring cell.

Definition at line 215 of file directionInfoI.H.

References directionInfo::index(), mesh, and directionInfo::n().

Here is the call graph for this function:

◆ updateFace() [2/2]

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

Influence of different value on same face.

Definition at line 264 of file directionInfoI.H.

References directionInfo::index(), and directionInfo::n().

Here is the call graph for this function:

◆ equal()

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

Same (like operator==)

Definition at line 290 of file directionInfoI.H.

References Foam::operator==().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const directionInfo rhs) const
inline

Definition at line 301 of file directionInfoI.H.

References directionInfo::index(), n, and directionInfo::n().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const directionInfo rhs) const
inline

Definition at line 308 of file directionInfoI.H.

Friends And Related Function Documentation

◆ operator<<

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

◆ operator>>

Istream& operator>> ( Istream ,
directionInfo  
)
friend

Field Documentation

◆ index_

label index_
private

Definition at line 80 of file directionInfo.H.

Referenced by directionInfo::index().

◆ n_

vector n_
private

Definition at line 83 of file directionInfo.H.

Referenced by directionInfo::n().


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