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.timeName(),
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 }
47 
lagrangianVectorNames
static List< word > lagrangianVectorNames
Definition: globalFoam.H:48
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:41
nVar
nVar
Definition: getLagrangianVector.H:4
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Num_variables
static int Num_variables
Definition: globalFoam.H:20
n
label n
Definition: TABSMDCalcMethod2.H:31
lagrangianScalarNames
static List< word > lagrangianScalarNames
Definition: globalFoam.H:47
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
nSprayVariables
static label nSprayVariables
Definition: globalFoam.H:24
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47