fieldMapper: Simplification
The patch-specific mapper interfaces, fvPatchFieldMapper and pointPatchFieldMapper, have been removed as they did not do anything. Patch mapping constructors and functions now take a basic fieldMapper reference. An fvPatchFieldMapper.H header has been provided to aid backwards compatability so that existing custom boundary conditions continue to compile.
This commit is contained in:
@ -58,7 +58,7 @@ Foam::fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
)
|
||||
:
|
||||
labelList(mag(addressing) - 1),
|
||||
directFvPatchFieldMapper(static_cast<const labelList&>(*this))
|
||||
directFieldMapper(static_cast<const labelList&>(*this))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
#include "IOobjectList.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "directFvPatchFieldMapper.H"
|
||||
#include "directFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,7 +63,7 @@ public:
|
||||
class patchFieldDecomposer
|
||||
:
|
||||
public labelList,
|
||||
public directFvPatchFieldMapper
|
||||
public directFieldMapper
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@ -35,11 +35,7 @@ Foam::pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
const labelList& directAddr
|
||||
)
|
||||
:
|
||||
pointPatchFieldMapperPatchRef
|
||||
(
|
||||
completeMeshPatch,
|
||||
procMeshPatch
|
||||
),
|
||||
generalFieldMapper(),
|
||||
directAddressing_(procMeshPatch.size(), -1),
|
||||
hasUnmapped_(false)
|
||||
{
|
||||
|
||||
@ -38,7 +38,7 @@ SourceFiles
|
||||
|
||||
#include "pointMesh.H"
|
||||
#include "pointFields.H"
|
||||
#include "pointPatchFieldMapperPatchRef.H"
|
||||
#include "generalFieldMapper.H"
|
||||
#include "IOobjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -61,15 +61,17 @@ public:
|
||||
//- Point patch field decomposer class
|
||||
class patchFieldDecomposer
|
||||
:
|
||||
public pointPatchFieldMapperPatchRef
|
||||
public generalFieldMapper
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- ...
|
||||
labelList directAddressing_;
|
||||
|
||||
//- Does map contain any unmapped values
|
||||
//- Does map contain any unmapped values?
|
||||
bool hasUnmapped_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
@ -39,8 +39,6 @@ SourceFiles
|
||||
#include "PtrList.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "IOobjectList.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "setSizeFvPatchFieldMapper.H"
|
||||
#include "labelIOList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -31,7 +31,8 @@ License
|
||||
#include "emptyFvPatchField.H"
|
||||
#include "emptyFvsPatchField.H"
|
||||
#include "processorCyclicFvPatch.H"
|
||||
#include "reverseFvPatchFieldMapper.H"
|
||||
#include "reverseFieldMapper.H"
|
||||
#include "setSizeFieldMapper.H"
|
||||
#include "stringOps.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -213,7 +214,7 @@ Foam::fvFieldReconstructor::reconstructVolField
|
||||
procField.boundaryField()[procPatchi],
|
||||
completeMesh_.boundary()[completePatchi],
|
||||
DimensionedField<Type, volMesh>::null(),
|
||||
setSizeFvPatchFieldMapper
|
||||
setSizeFieldMapper
|
||||
(
|
||||
completeMesh_.boundary()[completePatchi].size()
|
||||
)
|
||||
@ -224,7 +225,7 @@ Foam::fvFieldReconstructor::reconstructVolField
|
||||
patchFields[completePatchi].map
|
||||
(
|
||||
procField.boundaryField()[procPatchi],
|
||||
reverseFvPatchFieldMapper
|
||||
reverseFieldMapper
|
||||
(
|
||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||
)
|
||||
@ -266,7 +267,7 @@ Foam::fvFieldReconstructor::reconstructVolField
|
||||
patchFields[completePatchi].map
|
||||
(
|
||||
procField.boundaryField()[procPatchi],
|
||||
reverseFvPatchFieldMapper
|
||||
reverseFieldMapper
|
||||
(
|
||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||
)
|
||||
@ -373,7 +374,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
||||
procField.boundaryField()[procPatchi],
|
||||
completeMesh_.boundary()[completePatchi],
|
||||
DimensionedField<Type, surfaceMesh>::null(),
|
||||
setSizeFvPatchFieldMapper
|
||||
setSizeFieldMapper
|
||||
(
|
||||
completeMesh_.boundary()[completePatchi].size()
|
||||
)
|
||||
@ -384,7 +385,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
||||
patchFields[completePatchi].map
|
||||
(
|
||||
procField.boundaryField()[procPatchi],
|
||||
reverseFvPatchFieldMapper
|
||||
reverseFieldMapper
|
||||
(
|
||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||
)
|
||||
@ -409,7 +410,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
||||
patchFields[completePatchi].map
|
||||
(
|
||||
procField.boundaryField()[procPatchi],
|
||||
reverseFvPatchFieldMapper
|
||||
reverseFieldMapper
|
||||
(
|
||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||
)
|
||||
|
||||
@ -38,8 +38,6 @@ SourceFiles
|
||||
|
||||
#include "pointMesh.H"
|
||||
#include "pointFields.H"
|
||||
#include "pointPatchFieldMapper.H"
|
||||
#include "setSizePointPatchFieldMapper.H"
|
||||
#include "IOobjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -25,7 +25,8 @@ License
|
||||
|
||||
#include "pointFieldReconstructor.H"
|
||||
#include "fvMesh.H"
|
||||
#include "reversePointPatchFieldMapper.H"
|
||||
#include "reverseFieldMapper.H"
|
||||
#include "setSizeFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -123,7 +124,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
procField.boundaryField()[patchi],
|
||||
completeMesh_.boundary()[curBPatch],
|
||||
DimensionedField<Type, pointMesh>::null(),
|
||||
setSizePointPatchFieldMapper
|
||||
setSizeFieldMapper
|
||||
(
|
||||
completeMesh_.boundary()[curBPatch].size()
|
||||
)
|
||||
@ -134,7 +135,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
patchFields[curBPatch].map
|
||||
(
|
||||
procField.boundaryField()[patchi],
|
||||
reversePointPatchFieldMapper
|
||||
reverseFieldMapper
|
||||
(
|
||||
patchPointAddressing_[proci][patchi]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user