openfoam/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H
mattijs e424059208 ENH: glboal file handling: initial commit
Moved file path handling to regIOobject and made it type specific so
now every object can have its own rules. Examples:
- faceZones are now processor local (and don't search up anymore)
- timeStampMaster is now no longer hardcoded inside IOdictionary
  (e.g. uniformDimensionedFields support it as well)
- the distributedTriSurfaceMesh is properly processor-local; no need
  for fileModificationChecking manipulation.
2016-01-25 13:03:15 +00:00

77 lines
1.3 KiB
C

label patchi = which_part - 2;
if (nVar >= Num_variables - nSprayVariables)
{
return Z_UNDEF;
}
IOobject fieldObjectPtr
(
fieldNames[var2field[nVar]],
runTime.timeName(),
mesh,
IOobject::NO_READ
);
if (!fieldObjectPtr.typeHeaderOk<volVectorField>(true))
{
return Z_UNDEF;
}
IOobject fieldObject
(
fieldNames[var2field[nVar]],
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
);
volVectorField sf
(
fieldObject,
mesh
);
const vectorField& sfb = sf.boundaryField()[patchi];
const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
if (which_type == Z_TRI03)
{
label counter = 1;
forAll(sfb, facei)
{
label nPoints = bMesh[patchi][facei].size();
if (nPoints == 3)
{
var_array[counter++] = sfb[facei][component];
}
}
}
if (which_type == Z_QUA04)
{
label counter = 1;
forAll(sfb, facei)
{
label nPoints = bMesh[patchi][facei].size();
if (nPoints == 4)
{
var_array[counter++] = sfb[facei][component];
}
}
}
if (which_type == Z_NSIDED)
{
label counter = 1;
forAll(sfb, facei)
{
label nPoints = bMesh[patchi][facei].size();
if ((nPoints != 3) && (nPoints != 4))
{
var_array[counter++] = sfb[facei][component];
}
}
}