Go to the documentation of this file.
38 const polyMesh&
mesh = this->
template mesh<polyMesh>();
42 if (pointEventNo_ <
points.eventNo())
44 pointEventNo_ =
points.eventNo();
46 celli_ = this->
template mesh<fvMesh>().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_)
109 const auto&
mesh = this->
template mesh<fvMesh>();
111 const auto* fieldPtr =
mesh.template cfindObject<VolFieldType>(fieldName_);
116 <<
"Unable to find field " << fieldName_ <<
" on the mesh database"
117 <<
". Valid " << VolFieldType::typeName <<
" fields are:"
118 <<
mesh.names(VolFieldType::typeName)
136 result = interpolator().interpolate(position_, celli_, -1);
163 os.writeEntry(
"field", fieldName_);
164 os.writeEntry(
"position", position_);
166 os.writeEntryIfDifferent<
word>
168 "interpolationScheme",
"cell", interpolationScheme_
int debug
Static debugging option.
Sample(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name, dictionary and optional registry.
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
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))
static constexpr const zero Zero
Global zero (0)
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Registry of regIOobjects.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
vectorIOField pointIOField
pointIOField is a vectorIOField.
virtual Type value(const scalar x) const
Return Sample value.
virtual void writeData(Ostream &os) const
Write in dictionary format.
Abstract base class for interpolation.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInfo
Report an information message using Foam::Info.
virtual void writeData(Ostream &os) const
Write as primitive (inline) format.
A traits class, which is primarily used for primitives.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...