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:
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "adjointOutletPressureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
@ -49,7 +49,7 @@ adjointOutletPressureFvPatchScalarField
|
||||
const adjointOutletPressureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper)
|
||||
|
||||
@ -73,7 +73,7 @@ public:
|
||||
const adjointOutletPressureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
|
||||
@ -26,8 +26,8 @@ License
|
||||
#include "adjointOutletVelocityFvPatchVectorField.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +49,7 @@ adjointOutletVelocityFvPatchVectorField
|
||||
const adjointOutletVelocityFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf, p, iF, mapper)
|
||||
|
||||
@ -73,7 +73,7 @@ public:
|
||||
const adjointOutletVelocityFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::alphaOneFvPatchScalarField::alphaOneFvPatchScalarField
|
||||
const alphaOneFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper, false) // Don't map
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
const alphaOneFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -45,7 +45,7 @@ Foam::filmContactAngleFvPatchScalarField::filmContactAngleFvPatchScalarField
|
||||
const filmContactAngleFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchScalarField(psf, p, iF, mapper),
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
const filmContactAngleFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -66,7 +66,7 @@ filmSurfaceVelocityFvPatchVectorField
|
||||
const filmSurfaceVelocityFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(ptf, p, iF, mapper),
|
||||
|
||||
@ -116,7 +116,7 @@ public:
|
||||
const filmSurfaceVelocityFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::mappedFilmPressureFvPatchScalarField::mappedFilmPressureFvPatchScalarField
|
||||
const mappedFilmPressureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
const mappedFilmPressureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -81,7 +81,7 @@ JohnsonJacksonParticleSlipFvPatchVectorField
|
||||
const JohnsonJacksonParticleSlipFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
partialSlipFvPatchVectorField(ptf, p, iF, mapper),
|
||||
|
||||
@ -94,7 +94,7 @@ public:
|
||||
const JohnsonJacksonParticleSlipFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -97,7 +97,7 @@ JohnsonJacksonParticleThetaFvPatchScalarField
|
||||
const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
const JohnsonJacksonParticleThetaFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "alphatPhaseChangeWallFunctionBase.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "phaseInterface.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
@ -687,7 +687,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
const alphatWallBoilingWallFunctionFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, p, iF, mapper),
|
||||
@ -752,7 +752,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
void alphatWallBoilingWallFunctionFvPatchScalarField::map
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::map(ptf, mapper);
|
||||
|
||||
@ -317,7 +317,7 @@ public:
|
||||
const alphatWallBoilingWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -394,11 +394,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchScalarField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "coupledMultiphaseTemperatureFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "phaseSystem.H"
|
||||
#include "compressibleMomentumTransportModel.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
@ -190,7 +190,7 @@ coupledMultiphaseTemperatureFvPatchScalarField
|
||||
const coupledMultiphaseTemperatureFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
coupledTemperatureFvPatchScalarField(psf, p, iF, mapper)
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
const coupledMultiphaseTemperatureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -111,7 +111,7 @@ multiphaseExternalTemperatureFvPatchScalarField
|
||||
const multiphaseExternalTemperatureFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
externalTemperatureFvPatchScalarField(psf, p, iF, mapper)
|
||||
|
||||
@ -99,7 +99,7 @@ public:
|
||||
const multiphaseExternalTemperatureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "smoluchowskiJumpTFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "mathematicalConstants.H"
|
||||
@ -85,7 +85,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
const smoluchowskiJumpTFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
@ -117,7 +117,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::map
|
||||
(
|
||||
const fvPatchField<scalar>& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
mixedFvPatchField<scalar>::map(ptf, mapper);
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
const smoluchowskiJumpTFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
@ -125,11 +125,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchScalarField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
#include "maxwellSlipUFvPatchVectorField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "fvcGrad.H"
|
||||
|
||||
@ -90,7 +90,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
const maxwellSlipUFvPatchVectorField& mspvf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
|
||||
@ -128,7 +128,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
void Foam::maxwellSlipUFvPatchVectorField::map
|
||||
(
|
||||
const fvPatchVectorField& pvf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
mixedFixedValueSlipFvPatchVectorField::map(pvf, mapper);
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
const maxwellSlipUFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
@ -130,11 +130,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchVectorField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchVectorField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -61,7 +61,7 @@ Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
|
||||
const mixedFixedValueSlipFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
transformFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
@ -89,7 +89,7 @@ template<class Type>
|
||||
void Foam::mixedFixedValueSlipFvPatchField<Type>::map
|
||||
(
|
||||
const fvPatchField<Type>& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
transformFvPatchField<Type>::map(ptf, mapper);
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
const mixedFixedValueSlipFvPatchField<Type>&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -139,11 +139,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchField<Type>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchField<Type>&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "fixedRhoFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -48,7 +48,7 @@ Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
const fixedRhoFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
|
||||
@ -111,7 +111,7 @@ public:
|
||||
const fixedRhoFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Copy constructor setting internal field reference
|
||||
|
||||
@ -50,7 +50,7 @@ hydrostaticDisplacementFvPatchVectorField
|
||||
const hydrostaticDisplacementFvPatchVectorField& tdpvf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
tractionDisplacementFvPatchVectorField(tdpvf, p, iF, mapper),
|
||||
|
||||
@ -87,7 +87,7 @@ public:
|
||||
const hydrostaticDisplacementFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -67,7 +67,7 @@ tractionDisplacementFvPatchVectorField
|
||||
const tractionDisplacementFvPatchVectorField& tdpvf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchVectorField(tdpvf, p, iF, mapper),
|
||||
@ -94,7 +94,7 @@ tractionDisplacementFvPatchVectorField
|
||||
void Foam::tractionDisplacementFvPatchVectorField::map
|
||||
(
|
||||
const fvPatchVectorField& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
fixedGradientFvPatchVectorField::map(ptf, mapper);
|
||||
|
||||
@ -95,7 +95,7 @@ public:
|
||||
const tractionDisplacementFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -142,11 +142,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchVectorField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchVectorField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -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]
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
|
||||
#include "fvMesh.H"
|
||||
#include "HashTable.H"
|
||||
#include "fvPatchMapper.H"
|
||||
#include "generalFieldMapper.H"
|
||||
#include "scalarList.H"
|
||||
#include "className.H"
|
||||
|
||||
@ -179,7 +179,7 @@ public:
|
||||
//- Patch-field interpolation class
|
||||
class patchFieldInterpolator
|
||||
:
|
||||
public generalFvPatchFieldMapper
|
||||
public generalFieldMapper
|
||||
{
|
||||
const labelList& directAddressing_;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "CONSTRUCT.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
@ -84,7 +84,7 @@ CONSTRUCT
|
||||
const CLASS& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<TYPE, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
PARENT(ptf, p, iF, mapper),
|
||||
@ -123,7 +123,7 @@ template<class Type>
|
||||
void Foam::CLASS::map
|
||||
(
|
||||
const FVPATCHF& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
PARENT::map(ptf, mapper);
|
||||
|
||||
@ -147,7 +147,7 @@ public:
|
||||
const CLASS&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<TYPE, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -185,11 +185,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const FVPATCHF&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const FVPATCHF&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "codedFixedValueFvPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
@ -107,7 +107,7 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "codedFixedValuePointPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "pointPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "pointFields.H"
|
||||
#include "unitConversion.H"
|
||||
//{{{ begin codeInclude
|
||||
@ -106,7 +106,7 @@ ${typeName}FixedValuePointPatch${FieldType}
|
||||
const ${typeName}FixedValuePointPatch${FieldType}& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
const ${typeName}FixedValuePointPatch${FieldType}&,
|
||||
const pointPatch&,
|
||||
const DimensionedField<${TemplateType}, pointMesh>&,
|
||||
const pointPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,6 @@ License
|
||||
|
||||
#include "codedFvModelTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "codedMixedFvPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
@ -107,7 +107,7 @@ ${typeName}MixedValueFvPatch${FieldType}
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "turbulentMixingLengthDissipationRateInletFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "volFields.H"
|
||||
#include "momentumTransportModel.H"
|
||||
@ -65,7 +65,7 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
||||
const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
const turbulentMixingLengthDissipationRateInletFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "turbulentMixingLengthFrequencyInletFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "volFields.H"
|
||||
#include "momentumTransportModel.H"
|
||||
@ -65,7 +65,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
const turbulentMixingLengthFrequencyInletFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "fixedShearStressFvPatchVectorField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "momentumTransportModel.H"
|
||||
@ -51,7 +51,7 @@ Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField
|
||||
const fixedShearStressFvPatchVectorField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
const fixedShearStressFvPatchVectorField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<vector, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
||||
const porousBafflePressureFvPatchField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||
|
||||
@ -146,7 +146,7 @@ public:
|
||||
const porousBafflePressureFvPatchField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -263,7 +263,7 @@ epsilonWallFunctionFvPatchScalarField
|
||||
const epsilonWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||
|
||||
@ -169,7 +169,7 @@ public:
|
||||
const epsilonWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -54,7 +54,7 @@ fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField
|
||||
const fWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
|
||||
@ -93,7 +93,7 @@ public:
|
||||
const fWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -52,7 +52,7 @@ kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
|
||||
const kLowReWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||
|
||||
@ -103,7 +103,7 @@ public:
|
||||
const kLowReWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
|
||||
const kqRWallFunctionFvPatchField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
const kqRWallFunctionFvPatchField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutLowReWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -60,7 +60,7 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
|
||||
const nutLowReWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
const nutLowReWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutURoughWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -227,7 +227,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
|
||||
const nutURoughWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutUWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
@ -253,7 +253,7 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
|
||||
void nutURoughWallFunctionFvPatchScalarField::map
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
nutUWallFunctionFvPatchScalarField::map(ptf, mapper);
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
const nutURoughWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -191,11 +191,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchScalarField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutUSpaldingWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -137,7 +137,7 @@ nutUSpaldingWallFunctionFvPatchScalarField
|
||||
const nutUSpaldingWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
const nutUSpaldingWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutUWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -131,7 +131,7 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
|
||||
const nutUWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
|
||||
@ -99,7 +99,7 @@ public:
|
||||
const nutUWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -87,7 +87,7 @@ Foam::nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
const nutWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
const nutWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutkRoughWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -144,7 +144,7 @@ nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
|
||||
const nutkRoughWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
@ -170,7 +170,7 @@ nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
|
||||
void nutkRoughWallFunctionFvPatchScalarField::map
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
{
|
||||
nutkWallFunctionFvPatchScalarField::map(ptf, mapper);
|
||||
|
||||
@ -133,7 +133,7 @@ public:
|
||||
const nutkRoughWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
@ -195,11 +195,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map the given fvPatchField onto this fvPatchField
|
||||
virtual void map
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void map(const fvPatchScalarField&, const fieldMapper&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "nutkWallFunctionFvPatchScalarField.H"
|
||||
#include "momentumTransportModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "fieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -89,7 +89,7 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
|
||||
const nutkWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
|
||||
@ -96,7 +96,7 @@ public:
|
||||
const nutkWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -305,7 +305,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||
const omegaWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||
|
||||
@ -177,7 +177,7 @@ public:
|
||||
const omegaWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -53,7 +53,7 @@ v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField
|
||||
const v2WallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
|
||||
@ -95,7 +95,7 @@ public:
|
||||
const v2WallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -55,7 +55,7 @@ epsilonmWallFunctionFvPatchScalarField
|
||||
const epsilonmWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
const fieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
const epsilonmWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
const fieldMapper&
|
||||
);
|
||||
|
||||
//- Disallow copy without setting internal field reference
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,38 @@ License
|
||||
|
||||
#include "directFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::directFieldMapper::map
|
||||
(
|
||||
Field<Type>& f,
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
if (notNull(addressing_) && addressing_.size())
|
||||
{
|
||||
f.map(mapF, addressing_);
|
||||
}
|
||||
else
|
||||
{
|
||||
f.setSize(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::directFieldMapper::map
|
||||
(
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tf(new Field<Type>(addressing_.size()));
|
||||
map(tf.ref(), mapF);
|
||||
return tf;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
FOR_ALL_FIELD_TYPES(IMPLEMENT_FIELD_MAPPER_OPERATOR, directFieldMapper)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,13 +45,24 @@ namespace Foam
|
||||
|
||||
class directFieldMapper
|
||||
:
|
||||
virtual public fieldMapper
|
||||
public fieldMapper
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Addressing from new back to old
|
||||
const labelUList& addressing_;
|
||||
|
||||
//- Does map contain any unmapped values
|
||||
bool hasUnmapped_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Map a field in-place
|
||||
template<class Type>
|
||||
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||
|
||||
//- Map a field and return the result
|
||||
template<class Type>
|
||||
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||
|
||||
@ -60,9 +71,17 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
directFieldMapper()
|
||||
{}
|
||||
//- Construct given addressing
|
||||
directFieldMapper(const labelUList& addressing)
|
||||
:
|
||||
addressing_(addressing),
|
||||
hasUnmapped_(false)
|
||||
{
|
||||
if (addressing_.size() && min(addressing_) < 0)
|
||||
{
|
||||
hasUnmapped_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -72,12 +91,11 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Are there unmapped values? I.e. do all size() elements get
|
||||
// get value
|
||||
virtual bool hasUnmapped() const = 0;
|
||||
|
||||
//- Access to the direct map addressing
|
||||
virtual const labelUList& addressing() const = 0;
|
||||
//- Are there unmapped values? Do all elements get get a value?
|
||||
virtual bool hasUnmapped() const
|
||||
{
|
||||
return hasUnmapped_;
|
||||
}
|
||||
|
||||
|
||||
// Member Operators
|
||||
@ -96,12 +114,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "directFieldMapperTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,8 +63,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Are there unmapped values? I.e. do all size() elements get
|
||||
// get value
|
||||
//- Are there unmapped values? Do all elements get get a value?
|
||||
virtual bool hasUnmapped() const = 0;
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,58 @@ License
|
||||
|
||||
#include "generalFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::generalFieldMapper::map
|
||||
(
|
||||
Field<Type>& f,
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
if (direct())
|
||||
{
|
||||
if (notNull(directAddressing()) && directAddressing().size())
|
||||
{
|
||||
f.map(mapF, directAddressing());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.setSize(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (notNull(addressing()) && addressing().size())
|
||||
{
|
||||
f.map(mapF, addressing(), weights());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.setSize(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::generalFieldMapper::map
|
||||
(
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tf
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
direct() ? directAddressing().size() : addressing().size()
|
||||
)
|
||||
);
|
||||
map(tf.ref(), mapF);
|
||||
return tf;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::labelUList& Foam::generalFieldMapper::directAddressing() const
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,13 +45,15 @@ namespace Foam
|
||||
|
||||
class generalFieldMapper
|
||||
:
|
||||
virtual public fieldMapper
|
||||
public fieldMapper
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Map a field in-place
|
||||
template<class Type>
|
||||
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||
|
||||
//- Map a field and return the result
|
||||
template<class Type>
|
||||
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||
|
||||
@ -72,16 +74,19 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Is the mapper direct?
|
||||
virtual bool direct() const = 0;
|
||||
|
||||
//- Are there unmapped values? I.e. do all size() elements get
|
||||
// get value
|
||||
//- Are there unmapped values? Do all elements get get a value?
|
||||
virtual bool hasUnmapped() const = 0;
|
||||
|
||||
//- Access the direct addressing
|
||||
virtual const labelUList& directAddressing() const;
|
||||
|
||||
//- Access the general addressing
|
||||
virtual const labelListList& addressing() const;
|
||||
|
||||
//- Access the general weights
|
||||
virtual const scalarListList& weights() const;
|
||||
|
||||
|
||||
@ -101,12 +106,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "generalFieldMapperTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "generalFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::generalFieldMapper::map
|
||||
(
|
||||
Field<Type>& f,
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
if (direct())
|
||||
{
|
||||
if (notNull(directAddressing()) && directAddressing().size())
|
||||
{
|
||||
f.map(mapF, directAddressing());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.setSize(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (notNull(addressing()) && addressing().size())
|
||||
{
|
||||
f.map(mapF, addressing(), weights());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.setSize(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::generalFieldMapper::map
|
||||
(
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tf
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
direct() ? directAddressing().size() : addressing().size()
|
||||
)
|
||||
);
|
||||
map(tf.ref(), mapF);
|
||||
return tf;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,6 +25,29 @@ License
|
||||
|
||||
#include "identityFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::identityFieldMapper::map
|
||||
(
|
||||
Field<Type>& f,
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
f = mapF;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::identityFieldMapper::map
|
||||
(
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
return mapF;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
FOR_ALL_FIELD_TYPES(IMPLEMENT_FIELD_MAPPER_OPERATOR, identityFieldMapper)
|
||||
|
||||
@ -45,13 +45,15 @@ namespace Foam
|
||||
|
||||
class identityFieldMapper
|
||||
:
|
||||
virtual public fieldMapper
|
||||
public fieldMapper
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Map a field in-place
|
||||
template<class Type>
|
||||
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||
|
||||
//- Map a field and return the result
|
||||
template<class Type>
|
||||
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||
|
||||
@ -72,8 +74,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Are there unmapped values? I.e. do all size() elements get
|
||||
// get value
|
||||
//- Are there unmapped values? Do all elements get get a value?
|
||||
virtual bool hasUnmapped() const
|
||||
{
|
||||
return false;
|
||||
@ -96,12 +97,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "identityFieldMapperTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -25,6 +25,33 @@ License
|
||||
|
||||
#include "reverseFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::reverseFieldMapper::map
|
||||
(
|
||||
Field<Type>& f,
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
if (notNull(addressing_) && addressing_.size())
|
||||
{
|
||||
f.rmap(mapF, addressing_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::reverseFieldMapper::map
|
||||
(
|
||||
const Field<Type>& mapF
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<Field<Type>>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
FOR_ALL_FIELD_TYPES(IMPLEMENT_FIELD_MAPPER_OPERATOR, reverseFieldMapper)
|
||||
|
||||
@ -45,13 +45,24 @@ namespace Foam
|
||||
|
||||
class reverseFieldMapper
|
||||
:
|
||||
virtual public fieldMapper
|
||||
public fieldMapper
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Addressing from new back to old
|
||||
const labelUList& addressing_;
|
||||
|
||||
//- Does map contain any unmapped values
|
||||
bool hasUnmapped_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Map a field in-place
|
||||
template<class Type>
|
||||
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||
|
||||
//- Map a field and return the result
|
||||
template<class Type>
|
||||
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||
|
||||
@ -60,9 +71,17 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
reverseFieldMapper()
|
||||
{}
|
||||
//- Construct given addressing
|
||||
reverseFieldMapper(const labelUList& addressing)
|
||||
:
|
||||
addressing_(addressing),
|
||||
hasUnmapped_(false)
|
||||
{
|
||||
if (addressing_.size() && min(addressing_) < 0)
|
||||
{
|
||||
hasUnmapped_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -72,12 +91,11 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Are there unmapped values? I.e. do all size() elements get
|
||||
// get value
|
||||
virtual bool hasUnmapped() const = 0;
|
||||
|
||||
//- Access to the reverse map addressing
|
||||
virtual const labelUList& addressing() const = 0;
|
||||
//- Are there unmapped values? Do all elements get get a value?
|
||||
virtual bool hasUnmapped() const
|
||||
{
|
||||
return hasUnmapped_;
|
||||
}
|
||||
|
||||
|
||||
// Member Operators
|
||||
@ -96,12 +114,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "reverseFieldMapperTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,12 +25,23 @@ License
|
||||
|
||||
#include "setSizeFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::setSizeFieldMapper::setSizeFieldMapper(const label size)
|
||||
:
|
||||
size_(size)
|
||||
{}
|
||||
template<class Type>
|
||||
void Foam::setSizeFieldMapper::map(Field<Type>& f, const Field<Type>&) const
|
||||
{
|
||||
f.setSize(size_);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::setSizeFieldMapper::map
|
||||
(
|
||||
const Field<Type>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type>>(new Field<Type>(size_));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user