Go to the documentation of this file.
68 out[i] = in[i].second();
70 if (
mag(in[i].first()) > VSMALL)
72 out[i] /= in[i].
first();
87 out[i].second() = out[i].first()*in[i];
98 x.first() +=
y.first();
99 x.second() +=
y.second();
103 void Foam::weightedPosition::operator()
111 getPoints(
fld, pfld);
122 setPoints(pfld,
fld);
126 void Foam::weightedPosition::operator()
135 operator()(vt, forward,
fld);
140 void Foam::weightedPosition::operator()
147 getPoints(
fld, pfld);
151 setPoints(pfld,
fld);
164 <<
" does not correspond to the number of points in the mesh "
186 if (
fld.size() != meshPoints.
size())
189 <<
" does not correspond to the number of points supplied "
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))
T & first()
Return the first element of the list.
weightedPosition()
Construct null.
static void syncPoints(const polyMesh &mesh, List< weightedPosition > &)
Synchronisation for mesh point positions.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
static void setPoints(const UList< point > &in, List< weightedPosition > &out)
Set points.
Mesh consisting of general polyhedral cells.
label nPoints() const noexcept
Number of mesh points.
#define forAll(list, i)
Loop across all elements in list.
void setSize(const label n)
Alias for resize()
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Wrapper for position + weight to be used in e.g. averaging.
static void plusEqOp(weightedPosition &x, const weightedPosition &y)
Summation operator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void getPoints(const UList< weightedPosition > &in, List< point > &out)
Get points.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const Vector< Cmpt > zero
void size(const label n)
Older name for setAddressableSize.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...