30 const std::size_t Foam::wallBoundedParticle::sizeofFields_
32 sizeof(wallBoundedParticle) -
sizeof(particle)
45 <<
"cannot both be on a mesh edge and a face-diagonal edge." 62 return edge(f[faceBasePtI], f[diagPtI]);
90 if (f[fpMin1] == meshEdge[1])
102 <<
" meshEdge:" << meshEdge
111 if (eNew != meshEdge)
156 <<
"tetPt:" <<
tetPt()
167 const vector& endPosition,
181 edge currentE(-1, -1);
197 if (
edge(tri[i], tri[j]) == currentE)
204 vector edgeNormal = (pt1-pt0)^n;
206 edgeNormal /=
mag(edgeNormal)+VSMALL;
209 scalar sEnd = (endPosition-pt0)&edgeNormal;
214 scalar sStart = (
position()-pt0)&edgeNormal;
215 if (
mag(sEnd-sStart) > VSMALL)
217 scalar
s = sStart/(sStart-sEnd);
219 if (s >= 0 && s < minS)
250 const point& endPosition
260 currentE[0] == currentE[1]
261 ||
findIndex(triVerts, currentE[0]) == -1
262 ||
findIndex(triVerts, currentE[1]) == -1
266 <<
"Edge " << currentE <<
" not on triangle " << triVerts
285 if (
edge(triVerts[i], triVerts[j]) == currentE)
287 vector edgeNormal = (pt1-pt0)^n;
288 return (dir&edgeNormal) < 0;
306 const label tetFacei,
308 const label meshEdgeStart,
312 particle(mesh, position, celli, tetFacei, tetPtI),
347 "wallBoundedParticle::wallBoundedParticle" 348 "(const Cloud<wallBoundedParticle>&, Istream&, bool)" 374 os << static_cast<const particle&>(
p)
380 os << static_cast<const particle&>(
p);
384 wallBoundedParticle::sizeofFields_
label meshEdgeStart_
Particle is on mesh edge:
label & tetPt()
Return current tet face particle is in.
#define forAll(list, i)
Loop across all elements in list.
streamFormat format() const
Return current stream format.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void crossEdgeConnectedFace(const label &celli, label &tetFacei, label &tetPtI, const edge &e)
Cross the from the given face across the given edge of the.
tetIndices currentTetIndices() const
Return the indices of the current tet that the.
edge currentEdge() const
Construct current edge.
particle(const polyMesh &mesh, const vector &position, const label celli, const label tetFacei, const label tetPtI)
Construct from components.
virtual const pointField & points() const
Return raw points.
vector normal(const pointField &) const
Vector normal; magnitude is equal to area of face.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
tetPointRef currentTet() const
Return the geometry of the current tet that the.
const vector & position() const
Return current particle position.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual Istream & read(token &)=0
Return next token from stream.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A triangular face using a FixedList of labels corresponding to mesh vertices.
const polyMesh & mesh_
Reference to the polyMesh database.
label diagEdge_
Particle is on diagonal edge:
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
errorManip< error > abort(error &err)
Particle class that tracks on triangles of boundary faces. Use trackToEdge similar to trackToFace on ...
bool isTriAlongTrack(const point &endPosition) const
Is current triangle in the track direction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label & face()
Return current face particle is on otherwise -1.
const labelList & tetBasePtIs() const
Return the tetBasePtIs.
void crossDiagonalEdge()
Cross diagonal edge into different triangle on same face,cell.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
void crossEdgeConnectedFace(const edge &meshEdge)
Check if inside current tet.
A helper class for outputting values to Ostream.
wallBoundedParticle(const polyMesh &c, const vector &position, const label celli, const label tetFacei, const label tetPtI, const label meshEdgeStart, const label diagEdge)
Construct from components.
scalar trackFaceTri(const vector &endPosition, label &minEdgeI)
Track through single triangle.
label & cell()
Return current cell particle is in.
dimensioned< scalar > mag(const dimensioned< Type > &)
label nextLabel(const label i) const
Next vertex on face.
virtual Ostream & write(const token &)=0
Write next token to stream.
Mesh consisting of general polyhedral cells.
label & tetFace()
Return current tet face particle is in.
virtual const faceList & faces() const
Return raw faces.
InfoProxy< wallBoundedParticle > info() const
Return info proxy.