mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
builds again
This commit is contained in:
@ -25,7 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "processorPointPatchField.H"
|
||||
#include "transformField.H"
|
||||
//#include "transformField.H"
|
||||
#include "processorPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -131,125 +131,7 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
|
||||
|
||||
if (doTransform())
|
||||
{
|
||||
const processorPolyPatch& ppp = procPatch_.procPolyPatch();
|
||||
const labelList& nonGlobalPatchPoints =
|
||||
procPatch_.nonGlobalPatchPoints();
|
||||
|
||||
// Mark patch that transformed point:
|
||||
// -3 : global patch point so handled in different patch
|
||||
// -2 : nonGlobalPatchPoints, initial value
|
||||
// -1 : originating from internal face, no transform necessary
|
||||
// >=0 : originating from coupled patch
|
||||
labelList hasTransformed(ppp.nPoints(), -3);
|
||||
forAll(nonGlobalPatchPoints, i)
|
||||
{
|
||||
hasTransformed[nonGlobalPatchPoints[i]] = -2;
|
||||
}
|
||||
|
||||
forAll(ppp.patchIDs(), subI)
|
||||
{
|
||||
label patchI = ppp.patchIDs()[subI];
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
for
|
||||
(
|
||||
label faceI = ppp.starts()[subI];
|
||||
faceI < ppp.starts()[subI+1];
|
||||
faceI++
|
||||
)
|
||||
{
|
||||
const face& f = ppp.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label pointI = f[fp];
|
||||
|
||||
if (hasTransformed[pointI] == -3)
|
||||
{
|
||||
// special point, handled elsewhere
|
||||
}
|
||||
else if (hasTransformed[pointI] == -2)
|
||||
{
|
||||
// first visit. Just mark.
|
||||
hasTransformed[pointI] = patchI;
|
||||
}
|
||||
else if (hasTransformed[pointI] == patchI)
|
||||
{
|
||||
// already done
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"processorPointPatchField<Type>::"
|
||||
"swapAdd(Field<Type>& pField) const"
|
||||
) << "Point " << pointI
|
||||
<< " on patch " << ppp.name()
|
||||
<< " already transformed by patch "
|
||||
<< hasTransformed[pointI]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if
|
||||
(
|
||||
!refCast<const coupledPolyPatch>
|
||||
(
|
||||
ppp.boundaryMesh()[patchI]
|
||||
).parallel()
|
||||
)
|
||||
{
|
||||
const tensor& T = refCast<const coupledPolyPatch>
|
||||
(
|
||||
ppp.boundaryMesh()[patchI]
|
||||
).forwardT();
|
||||
|
||||
for
|
||||
(
|
||||
label faceI = ppp.starts()[subI];
|
||||
faceI < ppp.starts()[subI+1];
|
||||
faceI++
|
||||
)
|
||||
{
|
||||
const face& f = ppp.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label pointI = f[fp];
|
||||
|
||||
if (hasTransformed[pointI] == -3)
|
||||
{
|
||||
// special point, handled elsewhere
|
||||
}
|
||||
else if (hasTransformed[pointI] == -2)
|
||||
{
|
||||
pnf[pointI] = transform(T, pnf[pointI]);
|
||||
|
||||
hasTransformed[pointI] = patchI;
|
||||
}
|
||||
else if (hasTransformed[pointI] == patchI)
|
||||
{
|
||||
// already done
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"processorPointPatchField<Type>::"
|
||||
"swapAdd(Field<Type>& pField) const"
|
||||
) << "Point " << pointI
|
||||
<< " on patch " << ppp.name()
|
||||
<< " subPatch " << patchI
|
||||
<< " already transformed by patch "
|
||||
<< hasTransformed[pointI]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
procPatch_.procPolyPatch().transform(pnf);
|
||||
}
|
||||
|
||||
addToInternalField(pField, pnf);
|
||||
|
||||
Reference in New Issue
Block a user