getLagrangianVector.H
Go to the documentation of this file.
1 
2 // Not sure if this is necessary anymore
3 
5 
6 if (nVar >= 0)
7 {
9 
10  IOField<vector> v
11  (
12  IOobject
13  (
14  name,
15  runTime.name(),
16  cloud::prefix,
17  mesh,
18  IOobject::MUST_READ,
19  IOobject::NO_WRITE
20  )
21  );
22 
23  if (v.size())
24  {
25  forAll(v, n)
26  {
27  if (component == 0)
28  {
29  var_array[n+1] = v[n].x();
30  }
31  else if (component == 1)
32  {
33  var_array[n+1] = v[n].y();
34  }
35  else if (component == 2)
36  {
37  var_array[n+1] = v[n].z();
38  }
39  }
40  }
41 }
42 else
43 {
44  // Info<< "getLagrangianVector: nVar = " << nVar << endl;
45  return Z_UNDEF;
46 }
label n
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
static int Num_variables
Definition: globalFoam.H:20
static List< word > lagrangianScalarNames
Definition: globalFoam.H:47
static List< word > lagrangianVectorNames
Definition: globalFoam.H:48
static label nSprayVariables
Definition: globalFoam.H:24
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)