31 void Foam::particle::stationaryTetGeometry
45 vertex1 = pts[triIs[1]];
46 vertex2 = pts[triIs[2]];
52 vector centre, base, vertex1, vertex2;
53 stationaryTetGeometry(centre, base, vertex1, vertex2);
59 inline void Foam::particle::movingTetGeometry
61 const scalar fraction,
64 Pair<vector>& vertex1,
83 const scalar f0 = s[0] + stepFraction_*s[1],
f1 = fraction*s[1];
85 centre[0] = ccOld + f0*(ccNew - ccOld);
86 base[0] = ptsOld[triIs[0]] + f0*(ptsNew[triIs[0]] - ptsOld[triIs[0]]);
87 vertex1[0] = ptsOld[triIs[1]] + f0*(ptsNew[triIs[1]] - ptsOld[triIs[1]]);
88 vertex2[0] = ptsOld[triIs[2]] + f0*(ptsNew[triIs[2]] - ptsOld[triIs[2]]);
90 centre[1] = f1*(ccNew - ccOld);
91 base[1] = f1*(ptsNew[triIs[0]] - ptsOld[triIs[0]]);
92 vertex1[1] = f1*(ptsNew[triIs[1]] - ptsOld[triIs[1]]);
93 vertex2[1] = f1*(ptsNew[triIs[2]] - ptsOld[triIs[2]]);
102 Pair<vector> centre, base, vertex1, vertex2;
103 movingTetGeometry(fraction, centre, base, vertex1, vertex2);
106 Pair<barycentricTensor>
123 <<
"Particle counter has overflowed. This might cause problems" 124 <<
" when reconstructing particle tracks." <<
endl;
168 return stepFraction_;
174 return stepFraction_;
230 return s[0] + stepFraction_*s[1];
236 return tetIndices(celli_, tetFacei_, tetPti_);
244 return movingTetTransform(0)[0];
248 return stationaryTetTransform();
294 <<
"Patch data was requested for a particle that isn't on a patch" 301 movingTetGeometry(1, centre, base, vertex1, vertex2);
303 n =
triPointRef(base[0], vertex1[0], vertex2[0]).normal();
308 coordinates_.
b()*base[1]
309 + coordinates_.
c()*vertex1[1]
310 + coordinates_.
d()*vertex2[1];
318 vector centre, base, vertex1, vertex2;
319 stationaryTetGeometry(centre, base, vertex1, vertex2);
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label origProc() const
Return the originating processor ID.
const polyMesh & mesh() const
Return the mesh database.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool moving() const
Is mesh moving.
errorManipArg< error, int > exit(error &err, const int errNo=1)
The time value with time-stepping information, user-defined remapping, etc.
bool onBoundaryFace() const
Is the particle on a boundary face?
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
triPointRef faceTri(const polyMesh &mesh) const
Return the geometry corresponding to the tri on the face for.
bool subCycling() const
Return true if time currently being sub-cycled, otherwise false.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const cellList & cells() const
Pair< scalar > stepFractionSpan() const
Return the step fraction change within the overall time-step.
Vector< scalar > vector
A scalar version of the templated Vector.
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
label tetPt() const
Return current tet face particle is in.
virtual const pointField & points() const
Return raw points.
vector normal() const
Return the normal of the tri on tetFacei_ for the.
label cell() const
Return current cell particle is in.
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))
vectorField pointField
pointField is a vectorField.
An ordered pair of two objects of type <T> with first() and second() elements.
void patchData(vector &n, vector &U) const
Get the normal and velocity of the current patch location.
label face() const
Return current face particle is on otherwise -1.
scalar deltaTValue() const
Return time step value.
virtual const pointField & oldPoints() const
Return old points for mesh motion.
const Type & value() const
Return const reference to value.
static const label labelMax
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
barycentricTensor currentTetTransform() const
Return the current tet transformation tensor.
virtual const faceList & faces() const
Return raw faces.
const vectorField & cellCentres() const
vector normal() const
Return unit normal.
label origId() const
Return the particle ID on the originating processor.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
bool onFace() const
Is the particle on a face?
label tetFace() const
Return current tet face particle is in.
label getNewParticleID() const
Get unique particle creation id.
const Time & time() const
Return time.
BarycentricTensor< scalar > barycentricTensor
A scalar version of the templated BarycentricTensor.
scalar stepFraction() const
Return the fraction of time-step completed.
tetIndices currentTetIndices() const
Return the indices of the current tet that the.
#define WarningInFunction
Report a warning using Foam::Warning.
triangle< point, const point & > triPointRef
Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transfo...
const barycentric & coordinates() const
Return current particle coordinates.
static label particleCount_
Cumulative particle counter - used to provode unique ID.
Field< vector > vectorField
Specialisation of Field<T> for vector.
bool onInternalFace() const
Is the particle on an internal face?
Mesh consisting of general polyhedral cells.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
vector position() const
Return current particle position.
label patch() const
Return the index of patch that the particle is on.
scalar currentTimeFraction() const
Return the current fraction within the timestep. This differs.