This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H

48 lines
919 B
C++
Raw Normal View History

// 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(),
2010-08-26 14:22:03 +00:00
cloud::prefix,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
2010-08-26 14:22:03 +00:00
if (v.size())
{
2010-08-26 14:22:03 +00:00
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
{
2010-08-26 14:22:03 +00:00
// Info<< "getLagrangianVector: nVar = " << nVar << endl;
return Z_UNDEF;
}