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
80 lines
1.3 KiB
C
80 lines
1.3 KiB
C
label patchi = which_part - 2;
|
|
|
|
if
|
|
(
|
|
nVar >= Num_variables - nSprayVariables
|
|
- nSecondMeshVariables - nFaMeshVariables
|
|
)
|
|
{
|
|
return Z_UNDEF;
|
|
}
|
|
|
|
IOobject fieldObjectPtr
|
|
(
|
|
fieldNames[var2field[nVar]],
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ
|
|
);
|
|
|
|
if (!fieldObjectPtr.headerOk())
|
|
{
|
|
return Z_UNDEF;
|
|
}
|
|
|
|
IOobject fieldObject
|
|
(
|
|
fieldNames[var2field[nVar]],
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
);
|
|
|
|
volTensorField sf
|
|
(
|
|
fieldObject,
|
|
mesh
|
|
);
|
|
|
|
const tensorField& tf = sf.boundaryField()[patchi];
|
|
const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
|
|
|
|
if (which_type == Z_TRI03)
|
|
{
|
|
label counter = 1;
|
|
for (label n=0; n<tf.size(); n++)
|
|
{
|
|
label nPoints = bMesh[patchi][n].size();
|
|
if (nPoints == 3)
|
|
{
|
|
# include "tensorConversion.H"
|
|
}
|
|
}
|
|
}
|
|
|
|
if (which_type == Z_QUA04)
|
|
{
|
|
label counter = 1;
|
|
for (label n=0; n<tf.size(); n++)
|
|
{
|
|
label nPoints = bMesh[patchi][n].size();
|
|
if (nPoints == 4)
|
|
{
|
|
# include "tensorConversion.H"
|
|
}
|
|
}
|
|
}
|
|
|
|
if (which_type == Z_NSIDED)
|
|
{
|
|
label counter = 1;
|
|
for (label n=0; n<tf.size(); n++)
|
|
{
|
|
label nPoints = bMesh[patchi][n].size();
|
|
if ((nPoints != 3) && (nPoints != 4))
|
|
{
|
|
# include "tensorConversion.H"
|
|
}
|
|
}
|
|
}
|