mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: remove old/fragile volSurfaceMapping mappings
This commit is contained in:
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user