directionInfo Class Reference

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

Public Member Functions

 directionInfo ()
 Construct null. More...
 
 directionInfo (const label, const vector &n)
 Construct from components. 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 transform (const polyPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
 Transform across an interface. 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...
 

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:

  • in cell: edge that is being cut. (determines for hex how cut is)
  • in face: local face point that is being cut or -1.

    1. (-1) : cut is tangential to plane
    2. (>= 0): edge fp..fp+1 is cut

    (has to be facepoint, not vertex since vertex not valid across processors whereas f[0] should correspond to f[0] on other side)

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 85 of file directionInfo.H.

Constructor & Destructor Documentation

◆ directionInfo() [1/2]

directionInfo ( )
inline

Construct null.

Definition at line 32 of file directionInfoI.H.

◆ directionInfo() [2/2]

directionInfo ( const label  index,
const vector n 
)
inline

Construct from components.

Definition at line 39 of file directionInfoI.H.

Member Function Documentation

◆ 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 92 of file directionInfo.C.

References Foam::abort(), Foam::e, primitiveMesh::edges(), edge::end(), Foam::endl(), f(), primitiveMesh::faces(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), Foam::meshTools::getEdgeFaces(), primitiveMesh::nEdges(), List< T >::size(), edge::start(), and Foam::meshTools::walkFace().

Here is the call graph for this function:

◆ index()

label index ( ) const
inline

Definition at line 147 of file directionInfo.H.

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

Here is the caller graph for this function:

◆ n()

const vector& n ( ) const
inline

Definition at line 152 of file directionInfo.H.

Referenced by 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 53 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 60 of file directionInfoI.H.

◆ transform()

void transform ( const polyPatch patch,
const label  patchFacei,
const transformer transform,
TrackingData &  td 
)
inline

Transform across an interface.

Definition at line 74 of file directionInfoI.H.

References f(), and List< T >::size().

Here is the call graph for this function:

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

References directionInfo::index(), 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 219 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 245 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 257 of file directionInfoI.H.

References n.

◆ operator!=()

bool operator!= ( const directionInfo rhs) const
inline

Definition at line 266 of file directionInfoI.H.

Friends And Related Function Documentation

◆ operator<<

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

◆ operator>>

Istream& operator>> ( Istream ,
directionInfo  
)
friend

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