gmvOutputSpray.H
Go to the documentation of this file.
1 gmvFile << "tracers " << particles.size() << nl;
2 forAllConstIter(Cloud<passiveParticle>, particles, iter)
3 {
4  gmvFile << iter().position().x() << " ";
5 }
6 gmvFile << nl;
7 
8 forAllConstIter(Cloud<passiveParticle>, particles, iter)
9 {
10  gmvFile << iter().position().y() << " ";
11 }
12 gmvFile << nl;
13 
14 forAllConstIter(Cloud<passiveParticle>, particles, iter)
15 {
16  gmvFile << iter().position().z() << " ";
17 }
18 gmvFile << nl;
19 
21 {
22  word name = lagrangianScalarNames[i];
23 
24  IOField<scalar> s
25  (
26  IOobject
27  (
28  name,
29  runTime.name(),
30  cloud::prefix,
31  mesh,
32  IOobject::MUST_READ,
33  IOobject::NO_WRITE
34  )
35  );
36 
37  if (s.size())
38  {
39  gmvFile << name << nl;
40 
41  forAll(s, n)
42  {
43  gmvFile << s[n] << token::SPACE;
44  }
45  gmvFile << nl;
46  }
47 
48 }
49 
50 gmvFile << "endtrace"<< nl;
label n
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:477
static List< word > lagrangianScalarNames
Definition: globalFoam.H:47
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){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
static const char nl
Definition: Ostream.H:266