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;
27 for (
label indx=0;indx<mesh.nCells();indx++)
29 gmvFile <<
fld[indx] <<
" ";
34 if (fieldTypes[i] ==
"volVectorField")
36 if (fieldName ==
vComp)
39 gmvFile <<
"velocity 0" <<
nl;
40 for (
label indx=0;indx<mesh.nCells();indx++)
42 gmvFile <<
fld[indx].x() <<
" ";
44 for (
label indx=0;indx<mesh.nCells();indx++)
46 gmvFile <<
fld[indx].y() <<
" ";
48 for (
label indx=0;indx<mesh.nCells();indx++)
50 gmvFile <<
fld[indx].z() <<
" ";
56 if (fieldTypes[i] ==
"surfaceScalarField")
63 if (fieldTypes[i] == cloud::prefix)
65 IOobject lagrangianHeader
74 if (lagrangianHeader.headerOk())
76 Cloud<passiveParticle> particles(mesh, cloud::defaultName);
78 IOobjectList
objects(mesh, runTime.name(), cloud::prefix);
90 if (fieldTypes[i] ==
"volScalarField")
92 gmvFile <<
"endvars" <<
nl;
#define forAll(list, i)
Loop across all elements in list.
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(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(), 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"))