1 for (
label i=0; i < nTypes; i++)
5 if (fieldTypes[i] ==
"volScalarField")
7 gmvFile <<
"variable" <<
nl;
12 const word& fieldName = fieldNames[j];
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.timeName(), cloud::prefix);
90 if (fieldTypes[i] ==
"volScalarField")
92 gmvFile <<
"endvars" <<
nl;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static List< word > lagrangianScalarNames
IOobject fieldObject(fieldNames[var2field[nVar]], runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE)
GeometricField< vector, fvPatchField, volMesh > volVectorField
static List< word > fieldNames
word vComp(conversionProperties.lookup("vector"))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static List< word > lagrangianVectorNames
List< word > wordList
A List of words.