STYLE: remove old/fragile volSurfaceMapping mappings

This commit is contained in:
Mark Olesen
2022-09-16 11:57:59 +02:00
parent a00997f32f
commit b1a8bb1b12
2 changed files with 0 additions and 89 deletions

View File

@ -488,72 +488,4 @@ void Foam::volSurfaceMapping::mapToVolumePatch
}
// These are fragile/wrong. To be removed (2022-09)
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
(
const Field<Type>& f
) const
{
const labelList& faceLabels = mesh_.faceLabels();
auto tresult = tmp<Field<Type>>::New(faceLabels.size(), Zero);
auto& result = tresult.ref();
const polyMesh& pMesh = mesh_.mesh();
const polyBoundaryMesh& bm = pMesh.boundaryMesh();
label patchID, faceID;
forAll(faceLabels, i)
{
if (faceLabels[i] < pMesh.nFaces())
{
patchID = bm.whichPatch(faceLabels[i]);
faceID = bm[patchID].whichFace(faceLabels[i]);
result[i] = f[faceID];
}
}
return tresult;
}
template<class Type>
void Foam::volSurfaceMapping::mapToField
(
const GeometricField<Type, faPatchField, areaMesh>& af,
Field<Type>& f
) const
{
mapToField(af.primitiveField(), f);
}
template<class Type>
void Foam::volSurfaceMapping::mapToField
(
const Field<Type>& af,
Field<Type>& f
) const
{
const labelList& faceLabels = mesh_.faceLabels();
const polyMesh& pMesh = mesh_.mesh();
const polyBoundaryMesh& bm = pMesh.boundaryMesh();
label patchID, faceID;
forAll(faceLabels, i)
{
if (faceLabels[i] < pMesh.nFaces())
{
patchID = bm.whichPatch(faceLabels[i]);
faceID = bm[patchID].whichFace(faceLabels[i]);
f[faceID] = af[i];
}
}
}
// ************************************************************************* //

View File

@ -336,27 +336,6 @@ public:
Field<Type>& dest,
const label destPatchi
) const;
// Deprecated (to be removed)
//- Map vol Field to surface Field
template<class Type>
tmp<Field<Type>> mapToSurface(const Field<Type>&) const;
//- Map surface field to field
// Assumes Field faces in the same order as Boundary
template<class Type>
void mapToField
(
const GeometricField<Type, faPatchField, areaMesh>& af,
Field<Type>&
) const;
//- Map surface field to volume field
// Assumes Field faces in the same order as Boundary
template<class Type>
void mapToField(const Field<Type>& af, Field<Type>&) const;
};