39namespace functionObjects
66 scalar minDistSqr =
sqr(GREAT);
67 point nearestPt(GREAT, GREAT, GREAT);
69 for (label facei : cFaces)
71 if (isWallPatch[facei])
78 for (label i = 2; i <
f.
size(); i++)
84 const triPointRef tri(basePoint, thisPoint, nextPoint);
88 const scalar d2 = nearInfo.
distance();
128 return (1.0 - ROOTSMALL)*pt + ROOTSMALL*tri.
centre();
157 const sampledSet& seedPoints = sampledSetPoints();
161 const label celli = seedPoints.
cells()[seedi];
165 const point& seedPt = seedPoints[seedi];
168 findNearestTet(isWallPatch, seedPt, celli)
172 if (ids.
face() != -1 && isWallPatch[ids.
face()])
194 (trackDir_ == trackDirType::FORWARD),
199 if (trackDir_ == trackDirType::BIDIRECTIONAL)
222 Pout<<
type() <<
" : ignoring seed " << seedPt
223 <<
" since not in wall cell." <<
endl;
231 Log <<
type() <<
" : seeded " << nSeeds <<
" particles." <<
endl;
274 particles.
move(particles, td, trackTime);
317 faceSet faces(mesh_,
"lowQualityTetFaces", mesh_.nFaces()/100+1);
334 <<
" faces with low quality or negative volume "
335 <<
"decomposition tets. Writing to faceSet " << faces.
name()
341 for (
const cell& cFaces : mesh_.cells())
343 numFacesPerEdge.
clear();
345 for (
const label facei : cFaces)
347 const face&
f = mesh_.faces()[facei];
350 const edge e(
f[fp],
f.nextLabel(fp));
352 ++(numFacesPerEdge(
e, 0));
361 <<
"problem cell:" << cFaces
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime)
Move the particles.
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
Map from edge (expressed as its endpoints) to value. For easier forward declaration it is currently i...
label size() const noexcept
The number of elements in table.
void clear()
Clear all entries from table.
Template class for intrusive linked lists.
const word & name() const noexcept
Return the object name.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
const point_type & rawPoint() const noexcept
The point, no checks.
scalar distance() const noexcept
Return distance to hit.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
const T2 & second() const noexcept
Return second.
void size(const label n)
Older name for setAddressableSize.
label fcIndex(const label i) const noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Like polyPatch but without reference to mesh. Used in boundaryMesh to hold data on patches....
A cell is defined as a list of faces with extra functionality.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A face is a list of labels corresponding to mesh vertices.
Abstract base-class for Time/database function objects.
Watches for presence of the named trigger file in the case directory and signals a simulation stop (o...
const fvMesh & mesh_
Reference to the fvMesh.
dictionary dict_
Input dictionary.
Generates streamline data by sampling a set of user-specified fields along a particle track,...
Tuple2< tetIndices, point > findNearestTet(const bitSet &isWallPatch, const point &seedPt, const label celli) const
Find wall tet on cell.
point pushIn(const triPointRef &tri, const point &pt) const
virtual void track()
Do the actual tracking to fill the track data.
virtual bool read(const dictionary &)
Read settings.
static const scalar minTetQuality
Minimum tetrahedron quality.
static bool checkFaceTets(const polyMesh &mesh, scalar tol=minTetQuality, const bool report=false, labelHashSet *setPtr=nullptr)
Check face-decomposition tet volume.
virtual const faceList & faces() const
Return raw faces.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
virtual const pointField & points() const
Return raw points.
const cellList & cells() const
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const labelList & cells() const noexcept
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
label face() const noexcept
Return the face index.
triPointRef faceTri(const polyMesh &mesh) const
label tetPt() const noexcept
Return the characterising tet point index.
label cell() const noexcept
Return the cell index.
A triangle primitive used to calculate face normals and swept volumes.
Point centre() const
Return centre (centroid)
pointHit nearestPoint(const point &p) const
Return nearest point to p on triangle.
A Cloud of streamLine particles.
Class used to pass tracking data to the trackToEdge function.
Particle class that samples fields as it passes through. Used in streamline calculation.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
#define WarningInFunction
Report a warning using Foam::Warning.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.