1 gmvFile <<
"tracers " << particles.size() <<
nl;
9 positions[particlei ++] = iter().position(
mesh);
12 for (i = 0; i < pTraits<point>::nComponents; i ++)
14 forAll(positions, particlei)
16 gmvFile <<
component(positions[particlei], i) <<
' ';
32 lagrangian::cloud::prefix,
45 gmvFile <<
fld[
n] << token::SPACE;
61 lagrangian::cloud::prefix,
70 gmvFile <<
name +
"x" <<
nl;
74 gmvFile <<
fld[
n].x() << token::SPACE;
78 gmvFile <<
name +
"y" <<
nl;
82 gmvFile <<
fld[
n].y() << token::SPACE;
86 gmvFile <<
name +
"z" <<
nl;
90 gmvFile <<
fld[
n].z() << token::SPACE;
98 gmvFile <<
"endtrace"<<
nl;
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
static List< word > lagrangianScalarNames
static List< word > lagrangianVectorNames
forAll(lagrangianVectorNames, i)
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
vectorField pointField
pointField is a vectorField.
void component(LagrangianPatchField< typename LagrangianPatchField< Type >::cmptType > &sf, const LagrangianPatchField< Type > &f, const direction d)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.