db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
54 lines
979 B
C
54 lines
979 B
C
|
|
// Not sure if this is necessary anymore
|
|
|
|
nVar -= Num_variables - nSprayVariables + lagrangianScalarNames.size();
|
|
|
|
if (nVar >= 0)
|
|
{
|
|
|
|
word name = lagrangianVectorNames[nVar];
|
|
|
|
IOField<vector> v
|
|
(
|
|
IOobject
|
|
(
|
|
name,
|
|
runTime.timeName(),
|
|
"lagrangian",
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
)
|
|
);
|
|
|
|
if (v.size() != 0)
|
|
{
|
|
for
|
|
(
|
|
label n = 0;
|
|
n < v.size();
|
|
n++
|
|
)
|
|
{
|
|
|
|
if (component == 0)
|
|
{
|
|
var_array[n+1] = v[n].x();
|
|
}
|
|
else if (component == 1)
|
|
{
|
|
var_array[n+1] = v[n].y();
|
|
}
|
|
else if (component == 2)
|
|
{
|
|
var_array[n+1] = v[n].z();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Info << "getLagrangianVector: nVar = " << nVar << endl;
|
|
return Z_UNDEF;
|
|
}
|
|
|