1 for (
label i=0; i < nTypes; i++)
5 if (fieldTypes[i] ==
"volScalarField")
7 gmvFile <<
"variable" <<
nl;
23 if (fieldTypes[i] ==
"volScalarField")
26 gmvFile << fieldName <<
" 0" <<
nl;
29 gmvFile <<
fld[indx] <<
" ";
34 if (fieldTypes[i] ==
"volVectorField")
36 if (fieldName ==
vComp)
39 gmvFile <<
"velocity 0" <<
nl;
42 gmvFile <<
fld[indx].x() <<
" ";
46 gmvFile <<
fld[indx].y() <<
" ";
50 gmvFile <<
fld[indx].z() <<
" ";
56 if (fieldTypes[i] ==
"surfaceScalarField")
63 if (fieldTypes[i] == lagrangian::cloud::prefix)
65 IOobject lagrangianHeader
69 lagrangian::cloud::prefix,
74 if (lagrangianHeader.headerOk())
76 lagrangian::Cloud<passiveParticle> particles
79 lagrangian::cloud::defaultName
86 lagrangian::cloud::prefix
99 if (fieldTypes[i] ==
"volScalarField")
101 gmvFile <<
"endvars" <<
nl;
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return reference to name.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
IOobject fieldObject(fieldNames[var2field[nVar]], runTime.name(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE)
static List< word > lagrangianScalarNames
static List< word > lagrangianVectorNames
static List< word > fieldNames
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))
List< word > wordList
A List of words.
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
VolField< scalar > volScalarField
word vComp(conversionProperties.lookup("vector"))