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),
63 if ((layer_ + 1) % 2 != 0)
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>
107 template<
class TrackingData>
111 const label patchFacei,
118 template<
class TrackingData>
122 const label thisCelli,
123 const label nbrFacei,
129 const bool o = thisCelli == mesh.
faceOwner()[nbrFacei];
131 if (o == (nbrInfo.direction_ < 0))
133 if (
valid(td) && prevFace_ != nbrFacei) collide();
137 prevFace_ = nbrFacei;
148 template<
class TrackingData>
152 const label thisFacei,
153 const label nbrCelli,
160 const label prevFacei = nbrInfo.prevFace_;
161 const label nextFacei =
c.opposingFaceLabel(prevFacei, mesh.
faces());
163 if (nextFacei == thisFacei)
166 mesh.
faceOwner()[thisFacei] == nbrCelli ? +1 : -1;
183 template<
class TrackingData>
187 const label thisFacei,
205 template<
class TrackingData>
220 return layer_ == rhs.layer_;
226 return !(*
this == rhs);
240 return is >> l.layer_ >> l.direction_;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A cell is defined as a list of faces with extra functionality.
Class to be used with FaceCellWave which enumerates layers of cells.
layerInfo()
Construct null.
bool operator==(const layerInfo &) const
label faceLayer() const
Return the face layer index.
bool updateCell(const polyMesh &, const label thisCelli, const label nbrFacei, const layerInfo &nbrInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
bool updateFace(const polyMesh &, const label thisFacei, const label nbrCelli, const layerInfo &nbrInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
bool operator!=(const layerInfo &) const
label cellLayer() const
Return the cell layer index.
bool valid(TrackingData &td) const
Check whether the layerInfo has been changed at all or still.
void transform(const polyPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
bool sameGeometry(const polyMesh &, const layerInfo &, const scalar, TrackingData &td) const
Check for identical geometrical data. Used for checking.
bool equal(const layerInfo &, TrackingData &td) const
Test equality.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
A patch is a list of labels that address the faces in the global face list.
const cellList & cells() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
const dimensionedScalar c
Speed of light in a vacuum.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Istream & operator>>(Istream &, pistonPointEdgeData &)
dimensionSet transform(const dimensionSet &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
static const label labelMax