38 const polyMesh&
mesh = this->
template mesh<polyMesh>();
42 if (pointEventNo_ <
points.eventNo())
44 pointEventNo_ =
points.eventNo();
46 celli_ =
mesh.findCell(position_);
51 <<
"Sample cell could not be found at position " 58 Pout<<
"Position: " << position_
59 <<
" celli:" << celli_
60 <<
" eventNo:" << pointEventNo_
61 <<
" points eventNo:" <<
points.eventNo()
73 const word& entryName,
83 dict.getOrDefault<
word>(
"interpolationScheme",
"cell")
94 fieldName_(
s.fieldName_),
95 position_(
s.position_),
96 interpolationScheme_(
s.interpolationScheme_),
98 pointEventNo_(
s.pointEventNo_)
107 const auto&
mesh = this->
template mesh<fvMesh>();
109 const auto* fieldPtr =
110 mesh.template cfindObject<VolumeField<Type>>(fieldName_);
115 <<
"Unable to find field " << fieldName_ <<
" on the mesh database" 117 <<
mesh.template sortedNames<VolumeField<Type>>()
135 result = interpolator().interpolate(position_, celli_, -1);
138 reduce(result, maxOp<Type>());
162 os.writeEntry(
"field", fieldName_);
163 os.writeEntry(
"position", position_);
165 os.writeEntryIfDifferent<
word>
167 "interpolationScheme",
"cell", interpolationScheme_
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
vectorIOField pointIOField
pointIOField is a vectorIOField.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A traits class, which is primarily used for primitives and vector-space.
Generic GeometricField class.
virtual void writeData(Ostream &os) const
Write in dictionary format.
bool returnReduceAnd(const bool value, const label comm=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
virtual Type value(const scalar x) const
Return Sample value.
#define DebugInfo
Report an information message using Foam::Info.
virtual void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
Abstract base class for volume field interpolation.
virtual void writeData(Ostream &os) const
Write as primitive (inline) format.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Registry of regIOobjects.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Sample(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name, dictionary and optional registry.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
static constexpr const zero Zero
Global zero (0)