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);
162 os.writeEntry(
"field", fieldName_);
163 os.writeEntry(
"position", position_);
165 os.writeEntryIfDifferent<
word>
167 "interpolationScheme",
"cell", interpolationScheme_
virtual void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for volume field interpolation.
Registry of regIOobjects.
A traits class, which is primarily used for primitives.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
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 DebugInfo
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
vectorIOField pointIOField
pointIOField is a vectorIOField.
static constexpr const zero Zero
Global zero (0)
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)