31 inline void Foam::layerInfo::collide()
const 34 <<
"Layer extrusions collided. Check the patches/zones from which " 35 <<
"layers are being extruded and ensure that they do not point " 36 <<
"in opposite directions." 53 layer_(2*faceLayer - 1),
54 direction_(direction),
66 <<
"Face layer index requested from cell layer info" 70 return (layer_ + 1)/2;
79 <<
"Cell layer index requested from face layer info" 87 template<
class TrackingData>
94 template<
class TrackingData>
103 return layer_ == l.layer_;
107 template<
class TrackingData>
111 const label patchFacei,
118 template<
class TrackingData>
122 const label thisCelli,
123 const label neighbourFacei,
129 const bool o = thisCelli == mesh.
faceOwner()[neighbourFacei];
131 if (o == (neighbourLayerInfo.direction_ < 0))
133 if (
valid(td) && prevFace_ != neighbourFacei) collide();
135 layer_ =
valid(td) ? -
labelMax : neighbourLayerInfo.layer_ + 1;
137 prevFace_ = neighbourFacei;
148 template<
class TrackingData>
152 const label thisFacei,
153 const label neighbourCelli,
160 const label prevFacei = neighbourLayerInfo.prevFace_;
163 if (nextFacei == thisFacei)
166 mesh.
faceOwner()[thisFacei] == neighbourCelli ? +1 : -1;
168 if (
valid(td) && direction != direction_) collide();
170 layer_ =
valid(td) ? -
labelMax : neighbourLayerInfo.layer_ + 1;
183 template<
class TrackingData>
187 const label thisFacei,
195 if (
valid(td) && direction != direction_) collide();
205 template<
class TrackingData>
220 return layer_ == rhs.layer_;
226 return !(*
this == rhs);
240 return is >> l.layer_ >> l.direction_;
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool sameGeometry(const polyMesh &, const layerInfo &, const scalar, TrackingData &td) const
Check for identical geometrical data. Used for checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label faceLayer() const
Return the face layer index.
void transform(const polyPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
layerInfo()
Construct null.
label cellLayer() const
Return the face layer index.
const cellList & cells() const
const dimensionedScalar c
Speed of light in a vacuum.
label opposingFaceLabel(const label masterFaceLabel, const faceUList &meshFaces) const
Return index of opposite face.
bool valid(TrackingData &td) const
Check whether the layerInfo has been changed at all or still.
bool updateCell(const polyMesh &, const label thisCelli, const label neighbourFacei, const layerInfo &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
Istream & operator>>(Istream &, directionInfo &)
virtual const labelList & faceOwner() const
Return face owner.
Class to be used with FaceCellWave which enumerates layers of cells.
static const label labelMax
virtual const faceList & faces() const
Return raw faces.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool equal(const layerInfo &, TrackingData &td) const
Test equality.
A cell is defined as a list of faces with extra functionality.
Ostream & operator<<(Ostream &, const ensightPart &)
bool operator!=(const layerInfo &) const
bool updateFace(const polyMesh &, const label thisFacei, const label neighbourCelli, const layerInfo &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
bool operator==(const layerInfo &) const