Loading...
Searching...
No Matches
directionInfo Class Reference

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

#include <directionInfo.H>

Public Member Functions

 directionInfo ()
 Default construct, index=-1, vector::zero.
 directionInfo (const label index, const vector &n)
 Construct from components.
label index () const
const vectorn () const
template<class TrackingData>
bool valid (TrackingData &td) const
 Changed or contains original (invalid) value.
template<class TrackingData>
bool sameGeometry (const polyMesh &, const directionInfo &, const scalar, TrackingData &td) const
 Check for identical geometrical data (eg, cyclics checking).
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.
template<class TrackingData>
void enterDomain (const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
 Reverse of leaveDomain.
template<class TrackingData>
void transform (const polyMesh &, const tensor &, TrackingData &td)
 Apply rotation matrix to any coordinates.
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.
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.
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.
template<class TrackingData>
bool equal (const directionInfo &, TrackingData &td) const
 Test for equality, with TrackingData.
template<class TrackingData>
bool interpolate (const polyMesh &, const point &pt, const label i0, const directionInfo &f0, const label i1, const directionInfo &f1, const scalar weight, const scalar tol, TrackingData &td)
 Interpolate between two values (lerp). Returns true if causes changes. Not sure if needs to be specialised between face and cell and what index is needed...
bool operator== (const directionInfo &) const
 Test for equality.
bool operator!= (const directionInfo &) const
 Test for inequality.

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.

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

Constructor & Destructor Documentation

◆ directionInfo() [1/2]

directionInfo ( )
inline

Default construct, index=-1, vector::zero.

Definition at line 28 of file directionInfoI.H.

References Foam::Zero.

Referenced by equal(), interpolate(), operator!=(), operator<<, operator==(), operator>>, sameGeometry(), updateCell(), updateFace(), and updateFace().

Here is the caller graph for this function:

◆ directionInfo() [2/2]

directionInfo ( const label index,
const vector & n )
inline

Construct from components.

Definition at line 35 of file directionInfoI.H.

References index(), and n().

Here is the call graph for this function:

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

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

Referenced by updateFace().

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

◆ index()

label index ( ) const
inline

Definition at line 157 of file directionInfo.H.

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

Here is the caller graph for this function:

◆ n()

const vector & n ( ) const
inline

Definition at line 162 of file directionInfo.H.

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

Here is the caller graph for this function:

◆ valid()

template<class TrackingData>
bool valid ( TrackingData & td) const
inline

Changed or contains original (invalid) value.

Definition at line 49 of file directionInfoI.H.

References td().

Referenced by interpolate().

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

◆ sameGeometry()

template<class TrackingData>
bool sameGeometry ( const polyMesh & ,
const directionInfo & w2,
const scalar tol,
TrackingData & td ) const
inline

Check for identical geometrical data (eg, cyclics checking).

Definition at line 57 of file directionInfoI.H.

References directionInfo(), td(), and w2.

Here is the call graph for this function:

◆ leaveDomain()

template<class TrackingData>
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 71 of file directionInfoI.H.

References td().

Here is the call graph for this function:

◆ enterDomain()

template<class TrackingData>
void enterDomain ( const polyMesh & ,
const polyPatch & patch,
const label patchFacei,
const point & faceCentre,
TrackingData & td )
inline

Reverse of leaveDomain.

Definition at line 87 of file directionInfoI.H.

References f(), and td().

Here is the call graph for this function:

◆ transform()

template<class TrackingData>
void transform ( const polyMesh & ,
const tensor & rotTensor,
TrackingData & td )
inline

Apply rotation matrix to any coordinates.

Definition at line 107 of file directionInfoI.H.

References td().

Here is the call graph for this function:

◆ updateCell()

template<class TrackingData>
bool updateCell ( const polyMesh & mesh,
const label thisCelli,
const label neighbourFacei,
const directionInfo & neighbourInfo,
const scalar tol,
TrackingData & td )
inline

Influence of neighbouring face.

Definition at line 118 of file directionInfoI.H.

References directionInfo(), e, f(), index(), mesh, n(), Foam::meshTools::otherEdge(), Foam::meshTools::otherFace(), td(), and hexMatcher::test().

Here is the call graph for this function:

◆ updateFace() [1/2]

template<class TrackingData>
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 199 of file directionInfoI.H.

References directionInfo(), edgeToFaceIndex(), index(), mesh, n(), and td().

Referenced by interpolate().

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

◆ updateFace() [2/2]

template<class TrackingData>
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 247 of file directionInfoI.H.

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

Here is the call graph for this function:

◆ equal()

template<class TrackingData>
bool equal ( const directionInfo & rhs,
TrackingData & td ) const
inline

Test for equality, with TrackingData.

Definition at line 273 of file directionInfoI.H.

References directionInfo(), Foam::operator==(), Foam::rhs(), and td().

Here is the call graph for this function:

◆ interpolate()

template<class TrackingData>
bool interpolate ( const polyMesh & mesh,
const point & pt,
const label i0,
const directionInfo & f0,
const label i1,
const directionInfo & f1,
const scalar weight,
const scalar tol,
TrackingData & td )
inline

Interpolate between two values (lerp). Returns true if causes changes. Not sure if needs to be specialised between face and cell and what index is needed...

Definition at line 284 of file directionInfoI.H.

References directionInfo(), mesh, td(), updateFace(), and valid().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const directionInfo & rhs) const
inline

Test for equality.

Definition at line 314 of file directionInfoI.H.

References directionInfo(), and Foam::rhs().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const directionInfo & rhs) const
inline

Test for inequality.

Definition at line 323 of file directionInfoI.H.

References directionInfo(), and Foam::rhs().

Here is the call graph for this function:

◆ operator<<

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

References directionInfo().

◆ operator>>

Istream & operator>> ( Istream & ,
directionInfo &  )
friend

References directionInfo().


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