diff --git a/applications/utilities/parallelProcessing/redistributePar/Make/options b/applications/utilities/parallelProcessing/redistributePar/Make/options
index d400986ff5..b9ad1a5c17 100644
--- a/applications/utilities/parallelProcessing/redistributePar/Make/options
+++ b/applications/utilities/parallelProcessing/redistributePar/Make/options
@@ -1,7 +1,9 @@
EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
+ -I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
@@ -9,8 +11,11 @@ EXE_INC = \
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
EXE_LIBS = \
- -lfiniteVolume \
+ -lfileFormats \
+ -lsurfMesh \
-lmeshTools \
+ -lfiniteVolume \
+ -lfiniteArea \
-llagrangian \
-ldynamicMesh \
-lsnappyHexMesh \
diff --git a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H b/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H
deleted file mode 100644
index fe90a568f6..0000000000
--- a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H
+++ /dev/null
@@ -1,124 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | www.openfoam.com
- \\/ M anipulation |
--------------------------------------------------------------------------------
- Copyright (C) 2015 OpenFOAM Foundation
- Copyright (C) 2019 OpenCFD Ltd.
--------------------------------------------------------------------------------
-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 .
-
-Class
- Foam::distributedUnallocatedDirectFieldMapper
-
-Description
- FieldMapper with direct mapping from remote quantities.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef distributedUnallocatedDirectFieldMapper_H
-#define distributedUnallocatedDirectFieldMapper_H
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
- Class distributedUnallocatedDirectFieldMapper Declaration
-\*---------------------------------------------------------------------------*/
-
-class distributedUnallocatedDirectFieldMapper
-:
- public FieldMapper
-{
- const labelUList& directAddressing_;
-
- const mapDistributeBase& distMap_;
-
- bool hasUnmapped_;
-
-public:
-
- // Constructors
-
- //- Construct given addressing
- distributedUnallocatedDirectFieldMapper
- (
- const labelUList& directAddressing,
- const mapDistributeBase& distMap
- )
- :
- directAddressing_(directAddressing),
- distMap_(distMap),
- hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0)
- {}
-
-
- //- Destructor
- virtual ~distributedUnallocatedDirectFieldMapper() = default;
-
-
- // Member Functions
-
- virtual label size() const
- {
- return
- (
- notNull(directAddressing_)
- ? directAddressing_.size()
- : distMap_.constructSize()
- );
- }
-
- virtual bool direct() const
- {
- return true;
- }
-
- virtual bool distributed() const
- {
- return true;
- }
-
- virtual const mapDistributeBase& distributeMap() const
- {
- return distMap_;
- }
-
- virtual bool hasUnmapped() const
- {
- return hasUnmapped_;
- }
-
- virtual const labelUList& directAddressing() const
- {
- return directAddressing_;
- }
-};
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.C b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.C
index 2f28615932..45acf1bf56 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.C
@@ -27,7 +27,6 @@ License
#include "parFvFieldReconstructor.H"
-
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::parFvFieldReconstructor::createPatchFaceMaps()
@@ -96,9 +95,8 @@ Foam::parFvFieldReconstructor::parFvFieldReconstructor
void Foam::parFvFieldReconstructor::reconstructPoints()
{
- // Reconstruct the points for moving mesh cases and write
- // them out
- distributedUnallocatedDirectFieldMapper mapper
+ // Reconstruct the points for moving mesh cases and write them out
+ distributedFieldMapper mapper
(
labelUList::null(),
distMap_.pointMap()
diff --git a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorFields.C b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorFields.C
index 9301333276..4a31401764 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorFields.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorFields.C
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015 OpenFOAM Foundation
- Copyright (C) 2016-2018 OpenCFD Ltd.
+ Copyright (C) 2016-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -37,9 +37,8 @@ License
#include "mapDistributePolyMesh.H"
#include "processorFvPatch.H"
-#include "directFvPatchFieldMapper.H"
-#include "distributedUnallocatedDirectFieldMapper.H"
-#include "distributedUnallocatedDirectFvPatchFieldMapper.H"
+#include "distributedFieldMapper.H"
+#include "distributedFvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@@ -50,7 +49,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
const DimensionedField& fld
) const
{
- distributedUnallocatedDirectFieldMapper mapper
+ distributedFieldMapper mapper
(
labelUList::null(),
distMap_.cellMap()
@@ -113,7 +112,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
// Create the internalField by remote mapping
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- distributedUnallocatedDirectFieldMapper mapper
+ distributedFieldMapper mapper
(
labelUList::null(),
distMap_.cellMap()
@@ -138,7 +137,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
// Clone local patch field
patchFields.set(patchI, bfld[patchI].clone());
- distributedUnallocatedDirectFvPatchFieldMapper mapper
+ distributedFvPatchFieldMapper mapper
(
labelUList::null(),
patchFaceMaps_[patchI]
@@ -256,7 +255,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
// Create the internalField by remote mapping
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- distributedUnallocatedDirectFieldMapper mapper
+ distributedFieldMapper mapper
(
labelUList::null(),
distMap_.faceMap()
@@ -301,7 +300,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
// Clone local patch field
patchFields.set(patchI, bfld[patchI].clone());
- distributedUnallocatedDirectFvPatchFieldMapper mapper
+ distributedFvPatchFieldMapper mapper
(
labelUList::null(),
patchFaceMaps_[patchI]
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
index d86e33a5d9..61dd46724c 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
- Copyright (C) 2015-2019 OpenCFD Ltd.
+ Copyright (C) 2015-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/
-#ifndef FieldMapper_H
-#define FieldMapper_H
+#ifndef Foam_FieldMapper_H
+#define Foam_FieldMapper_H
#include "mapDistributeBase.H"
#include "nullObject.H"
@@ -49,14 +49,12 @@ namespace Foam
class FieldMapper
{
-
public:
// Constructors
- //- Null constructor
- FieldMapper()
- {}
+ //- Default construct
+ FieldMapper() = default;
//- Destructor
@@ -65,28 +63,23 @@ public:
// Member Functions
+ //- The size of the mapper
virtual label size() const = 0;
+ //- Is it a direct (non-interpolating) mapper?
virtual bool direct() const = 0;
+ //- Does the mapper have remote contributions?
virtual bool distributed() const
{
return false;
}
- virtual const mapDistributeBase& distributeMap() const
- {
- FatalErrorInFunction
- << "attempt to access null distributeMap"
- << abort(FatalError);
-
- return NullObjectRef();
- }
-
- //- Are there unmapped values? I.e. do all size() elements get
- // get value
+ //- Any unmapped values?
+ // I.e. do all size() elements get value
virtual bool hasUnmapped() const = 0;
+ //- Return the direct addressing values
virtual const labelUList& directAddressing() const
{
FatalErrorInFunction
@@ -96,6 +89,17 @@ public:
return labelUList::null();
}
+ //- Return the distribution map
+ virtual const mapDistributeBase& distributeMap() const
+ {
+ FatalErrorInFunction
+ << "attempt to access null distributeMap"
+ << abort(FatalError);
+
+ return NullObjectRef();
+ }
+
+ //- Return the interpolation addressing
virtual const labelListList& addressing() const
{
FatalErrorInFunction
@@ -105,6 +109,7 @@ public:
return labelListList::null();
}
+ //- Return the interpolation weights
virtual const scalarListList& weights() const
{
FatalErrorInFunction
@@ -117,10 +122,11 @@ public:
// Member Operators
+ //- Perform mapping on the given field
template
- tmp> operator()(const Field& f) const
+ tmp> operator()(const Field& fld) const
{
- return tmp>::New(f, *this);
+ return tmp>::New(fld, *this);
}
};
diff --git a/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H b/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H
index 7555481a5a..fc19dec748 100644
--- a/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H
+++ b/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H
@@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2013-2018 OpenFOAM Foundation
- Copyright (C) 2019 OpenCFD Ltd.
+ Copyright (C) 2013 OpenFOAM Foundation
+ Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -25,72 +25,129 @@ License
along with OpenFOAM. If not, see .
Class
- Foam::directFieldMapper
+ Foam::DirectFieldMapper
Description
- FieldMapper with direct mapping.
+ A templated direct mapper for the given FieldMapper type
\*---------------------------------------------------------------------------*/
-#ifndef directFieldMapper_H
-#define directFieldMapper_H
+#ifndef Foam_directFieldMapper_H
+#define Foam_directFieldMapper_H
+
+#include "FieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
+// Forward Declarations
+template class DirectFieldMapper;
+
+// Standard Types
+
+//- A FieldMapper with direct mapping
+typedef DirectFieldMapper directFieldMapper;
+
+
/*---------------------------------------------------------------------------*\
- Class directFieldMapper Declaration
+ Class DirectFieldMapper Declaration
\*---------------------------------------------------------------------------*/
-class directFieldMapper
+template
+class DirectFieldMapper
:
- public FieldMapper
+ public FieldMapperType
{
- const labelUList& directAddressing_;
+ // Private Data
- bool hasUnmapped_;
+ //- Addressing from new back to old
+ const labelUList& directAddressing_;
+
+ //- Does map contain any unmapped values
+ bool hasUnmapped_;
+
+
+ // Private Member Functions
+
+ //- Any negative (unmapped) values in the addressing?
+ static bool hasUnmappedEntry(const labelUList& directAddr)
+ {
+ for (const label val : directAddr)
+ {
+ if (val < 0) return true; // early exit
+ }
+ return false;
+ }
public:
+ // Public Types
+
+ //- The base mapper type
+ typedef FieldMapperType mapper_type;
+
+
// Constructors
- //- Construct given addressing
- directFieldMapper(const labelUList& directAddressing)
+ //- Construct given addressing, check for unmapped (negative) values
+ explicit DirectFieldMapper
+ (
+ const labelUList& directAddr,
+ const bool checkUnmapped = true
+ )
:
- directAddressing_(directAddressing),
- hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0)
+ FieldMapperType(),
+ directAddressing_(directAddr),
+ hasUnmapped_(checkUnmapped && hasUnmappedEntry(directAddr))
{}
//- Destructor
- virtual ~directFieldMapper() = default;
+ virtual ~DirectFieldMapper() = default;
// Member Functions
- label size() const
+ //- True if directAddressing is not the null object (unallocated)
+ virtual bool hasDirectAddressing() const
+ {
+ return notNull(directAddressing_);
+ }
+
+ //- The mapper size is given by the size of the direct addressing
+ virtual label size() const
{
return directAddressing_.size();
}
- bool direct() const
+ //- It is a direct mapper
+ virtual bool direct() const
{
return true;
}
- bool hasUnmapped() const
+ //- Any unmapped values?
+ virtual bool hasUnmapped() const
{
return hasUnmapped_;
}
- const labelUList& directAddressing() const
+ //- Allow modification
+ virtual bool& hasUnmapped()
+ {
+ return hasUnmapped_;
+ }
+
+ //- Return the direct addressing values
+ virtual const labelUList& directAddressing() const
{
return directAddressing_;
}
};
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
diff --git a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H b/src/OpenFOAM/fields/Fields/Field/distributedFieldMapper.H
similarity index 60%
rename from applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H
rename to src/OpenFOAM/fields/Fields/Field/distributedFieldMapper.H
index 7ce892a060..ec7cd5aa62 100644
--- a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H
+++ b/src/OpenFOAM/fields/Fields/Field/distributedFieldMapper.H
@@ -5,8 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2015 OpenFOAM Foundation
- Copyright (C) 2019 OpenCFD Ltd.
+ Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -25,96 +24,102 @@ License
along with OpenFOAM. If not, see .
Class
- Foam::distributedUnallocatedDirectFvPatchFieldMapper
+ Foam::DistributedFieldMapper
Description
- FieldMapper with direct mapping from remote quantities.
+ A templated field mapper
+ with direct mapping from local or remote quantities.
\*---------------------------------------------------------------------------*/
-#ifndef distributedUnallocatedDirectFvPatchFieldMapper_H
-#define distributedUnallocatedDirectFvPatchFieldMapper_H
+#ifndef Foam_distributedFieldMapper_H
+#define Foam_distributedFieldMapper_H
-#include "fvPatchFieldMapper.H"
+#include "directFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
+// Forward Declarations
+template class DistributedFieldMapper;
+
+// Standard Types
+
+//- A directFieldMapper with distributed (with local or remote) quantities
+typedef DistributedFieldMapper distributedFieldMapper;
+
+
/*---------------------------------------------------------------------------*\
- Class distributedUnallocatedDirectFvPatchFieldMapper Declaration
+ Class DistributedFieldMapper Declaration
\*---------------------------------------------------------------------------*/
-class distributedUnallocatedDirectFvPatchFieldMapper
+template
+class DistributedFieldMapper
:
- public fvPatchFieldMapper
+ public DirectFieldMapperType
{
- const labelUList& directAddressing_;
+ // Private Data
- const mapDistributeBase& distMap_;
+ //- The distributed map
+ const mapDistributeBase& distMap_;
- bool hasUnmapped_;
public:
+ // Public Types
+
+ //- The base direct mapper type
+ typedef DirectFieldMapperType mapper_type;
+
+
// Constructors
- //- Construct given addressing
- distributedUnallocatedDirectFvPatchFieldMapper
+ //- Construct with addressing and distribute map
+ DistributedFieldMapper
(
- const labelUList& directAddressing,
+ const labelUList& directAddr,
const mapDistributeBase& distMap
)
:
- directAddressing_(directAddressing),
- distMap_(distMap),
- hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0)
+ DirectFieldMapperType(directAddr),
+ distMap_(distMap)
{}
//- Destructor
- virtual ~distributedUnallocatedDirectFvPatchFieldMapper() = default;
+ virtual ~DistributedFieldMapper() = default;
// Member Functions
+ //- The mapper size is given by the direct addressing size (if valid)
+ //- or from the distributeMap construct size.
virtual label size() const
{
return
(
- notNull(directAddressing_)
- ? directAddressing_.size()
+ DirectFieldMapperType::hasDirectAddressing()
+ ? DirectFieldMapperType::size()
: distMap_.constructSize()
);
}
- virtual bool direct() const
- {
- return true;
- }
-
+ //- It is a distributed mapper
virtual bool distributed() const
{
return true;
}
+ //- Return the distribution map
virtual const mapDistributeBase& distributeMap() const
{
return distMap_;
}
-
- virtual bool hasUnmapped() const
- {
- return hasUnmapped_;
- }
-
- virtual const labelUList& directAddressing() const
- {
- return directAddressing_;
- }
};
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H
index 89a7aa3a5a..a019f95ff1 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H
@@ -5,8 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2013 OpenFOAM Foundation
- Copyright (C) 2019 OpenCFD Ltd.
+ Copyright (C) 2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -24,17 +23,18 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
-Class
+Typedef
Foam::directPointPatchFieldMapper
Description
- direct pointPatchFieldMapper
+ A direct pointPatchFieldMapper
\*---------------------------------------------------------------------------*/
-#ifndef directPointPatchFieldMapper_H
-#define directPointPatchFieldMapper_H
+#ifndef Foam_directPointPatchFieldMapper_H
+#define Foam_directPointPatchFieldMapper_H
+#include "directFieldMapper.H"
#include "pointPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -42,65 +42,11 @@ Description
namespace Foam
{
-/*---------------------------------------------------------------------------*\
- Class directPointPatchFieldMapper Declaration
-\*---------------------------------------------------------------------------*/
+typedef
+ DirectFieldMapper
+ directPointPatchFieldMapper;
-class directPointPatchFieldMapper
-:
- public pointPatchFieldMapper
-{
-
- //- Addressing from new back to old
- const labelUList& directAddressing_;
-
- //- Does map contain any unmapped values
- bool hasUnmapped_;
-
-
-public:
-
- // Constructors
-
- //- Construct given addressing
- directPointPatchFieldMapper(const labelUList& directAddressing)
- :
- directAddressing_(directAddressing),
- hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0)
- {}
-
-
- //- Destructor
- virtual ~directPointPatchFieldMapper() = default;
-
-
- // Member Functions
-
- label size() const
- {
- return directAddressing_.size();
- }
-
- bool direct() const
- {
- return true;
- }
-
- bool hasUnmapped() const
- {
- return hasUnmapped_;
- }
-
- const labelUList& directAddressing() const
- {
- return directAddressing_;
- }
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/distributedPointPatchFieldMapper.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/distributedPointPatchFieldMapper.H
new file mode 100644
index 0000000000..2203becd5f
--- /dev/null
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/distributedPointPatchFieldMapper.H
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 .
+
+Typedef
+ Foam::distributedPointPatchFieldMapper
+
+Description
+ A directPointPatchFieldMapper
+ with direct mapping from local or remote quantities.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Foam_distributedPointPatchFieldMapper_H
+#define Foam_distributedPointPatchFieldMapper_H
+
+#include "distributedFieldMapper.H"
+#include "directPointPatchFieldMapper.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+typedef
+ DistributedFieldMapper
+ distributedPointPatchFieldMapper;
+
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldMapper.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldMapper.H
index 74da4d4290..02a4a56483 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldMapper.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldMapper.H
@@ -31,11 +31,10 @@ Description
\*---------------------------------------------------------------------------*/
-#ifndef pointPatchFieldMapper_H
-#define pointPatchFieldMapper_H
+#ifndef Foam_pointPatchFieldMapper_H
+#define Foam_pointPatchFieldMapper_H
#include "primitiveFields.H"
-#include "FieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -50,14 +49,12 @@ class pointPatchFieldMapper
:
public FieldMapper
{
-
public:
// Constructors
- //- Null constructor
- pointPatchFieldMapper()
- {}
+ //- Default construct
+ pointPatchFieldMapper() = default;
};
diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H
index a44826132b..6c155b5401 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H
+++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H
@@ -50,7 +50,15 @@ class pointBoundaryMeshMapper
:
public PtrList
{
- // Private Member Functions
+public:
+
+ // Public Types
+
+ //- The patch mapper type
+ typedef pointPatchMapper mapper_type;
+
+
+ // Generated Methods
//- No copy construct
pointBoundaryMeshMapper(const pointBoundaryMeshMapper&) = delete;
@@ -59,8 +67,6 @@ class pointBoundaryMeshMapper
void operator=(const pointBoundaryMeshMapper&) = delete;
-public:
-
// Constructors
//- Construct from components
diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
index 3ee1c907e6..e9a18985c0 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
@@ -200,13 +200,4 @@ const Foam::scalarListList& Foam::pointPatchMapper::weights() const
}
-// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
-
-
// ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
index f3f86cc68c..54abd9460c 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
- Copyright (C) 2015-2018 OpenCFD Ltd.
+ Copyright (C) 2015-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -33,7 +33,7 @@ License
void Foam::mapDistributePolyMesh::calcPatchSizes()
{
- oldPatchSizes_.setSize(oldPatchStarts_.size());
+ oldPatchSizes_.resize_nocopy(oldPatchStarts_.size());
if (oldPatchStarts_.size())
{
@@ -192,6 +192,12 @@ Foam::mapDistributePolyMesh::mapDistributePolyMesh(Istream& is)
void Foam::mapDistributePolyMesh::transfer(mapDistributePolyMesh& rhs)
{
+ if (this == &rhs)
+ {
+ // Self-assignment is a no-op
+ return;
+ }
+
nOldPoints_ = rhs.nOldPoints_;
nOldFaces_ = rhs.nOldFaces_;
nOldCells_ = rhs.nOldCells_;
@@ -283,6 +289,12 @@ void Foam::mapDistributePolyMesh::distributePatchIndices(labelList& lst) const
void Foam::mapDistributePolyMesh::operator=(const mapDistributePolyMesh& rhs)
{
+ if (this == &rhs)
+ {
+ // Self-assignment is a no-op
+ return;
+ }
+
nOldPoints_ = rhs.nOldPoints_;
nOldFaces_ = rhs.nOldFaces_;
nOldCells_ = rhs.nOldCells_;
@@ -298,7 +310,11 @@ void Foam::mapDistributePolyMesh::operator=(const mapDistributePolyMesh& rhs)
void Foam::mapDistributePolyMesh::operator=(mapDistributePolyMesh&& rhs)
{
- transfer(rhs);
+ if (this != &rhs)
+ {
+ // Avoid self assignment
+ transfer(rhs);
+ }
}
@@ -327,9 +343,10 @@ Foam::Istream& Foam::operator>>(Istream& is, mapDistributePolyMesh& map)
Foam::Ostream& Foam::operator<<(Ostream& os, const mapDistributePolyMesh& map)
{
- os << map.nOldPoints_
- << token::SPACE << map.nOldFaces_
- << token::SPACE << map.nOldCells_ << token::NL
+ os << map.nOldPoints_ << token::SPACE
+ << map.nOldFaces_ << token::SPACE
+ << map.nOldCells_ << token::NL
+
<< map.oldPatchSizes_ << token::NL
<< map.oldPatchStarts_ << token::NL
<< map.oldPatchNMeshPoints_ << token::NL
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.H
index 35636e4c88..01947ed580 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.H
@@ -41,8 +41,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
-#ifndef mapDistributePolyMesh_H
-#define mapDistributePolyMesh_H
+#ifndef Foam_mapDistributePolyMesh_H
+#define Foam_mapDistributePolyMesh_H
#include "mapDistribute.H"
@@ -51,7 +51,7 @@ SourceFiles
namespace Foam
{
-// Forward declarations
+// Forward Declarations
class mapPolyMesh;
class polyMesh;
class mapDistributePolyMesh;
@@ -66,7 +66,7 @@ Ostream& operator<<(Ostream&, const mapDistributePolyMesh&);
class mapDistributePolyMesh
{
- // Private data
+ // Private Data
//- Number of old live points
label nOldPoints_;
@@ -112,7 +112,7 @@ public:
// Constructors
- //- Construct null
+ //- Default construct
mapDistributePolyMesh();
//- Move construct
@@ -165,7 +165,7 @@ public:
);
//- Construct from Istream
- mapDistributePolyMesh(Istream& is);
+ explicit mapDistributePolyMesh(Istream& is);
// Member Functions
@@ -173,61 +173,61 @@ public:
// Access
//- Number of points in mesh before distribution
- label nOldPoints() const
+ label nOldPoints() const noexcept
{
return nOldPoints_;
}
//- Number of faces in mesh before distribution
- label nOldFaces() const
+ label nOldFaces() const noexcept
{
return nOldFaces_;
}
//- Number of cells in mesh before distribution
- label nOldCells() const
+ label nOldCells() const noexcept
{
return nOldCells_;
}
//- List of the old patch sizes
- const labelList& oldPatchSizes() const
+ const labelList& oldPatchSizes() const noexcept
{
return oldPatchSizes_;
}
//- List of the old patch start labels
- const labelList& oldPatchStarts() const
+ const labelList& oldPatchStarts() const noexcept
{
return oldPatchStarts_;
}
//- List of numbers of mesh points per old patch
- const labelList& oldPatchNMeshPoints() const
+ const labelList& oldPatchNMeshPoints() const noexcept
{
return oldPatchNMeshPoints_;
}
//- Point distribute map
- const mapDistribute& pointMap() const
+ const mapDistribute& pointMap() const noexcept
{
return pointMap_;
}
//- Face distribute map
- const mapDistribute& faceMap() const
+ const mapDistribute& faceMap() const noexcept
{
return faceMap_;
}
//- Cell distribute map
- const mapDistribute& cellMap() const
+ const mapDistribute& cellMap() const noexcept
{
return cellMap_;
}
//- Patch distribute map
- const mapDistribute& patchMap() const
+ const mapDistribute& patchMap() const noexcept
{
return patchMap_;
}
@@ -240,30 +240,30 @@ public:
//- Distribute list of point data
template
- void distributePointData(List& lst) const
+ void distributePointData(List& values) const
{
- pointMap_.distribute(lst);
+ pointMap_.distribute(values);
}
//- Distribute list of face data
template
- void distributeFaceData(List& lst) const
+ void distributeFaceData(List& values) const
{
- faceMap_.distribute(lst);
+ faceMap_.distribute(values);
}
//- Distribute list of cell data
template
- void distributeCellData(List& lst) const
+ void distributeCellData(List& values) const
{
- cellMap_.distribute(lst);
+ cellMap_.distribute(values);
}
//- Distribute list of patch data
template
- void distributePatchData(List& lst) const
+ void distributePatchData(List& values) const
{
- patchMap_.distribute(lst);
+ patchMap_.distribute(values);
}
@@ -294,12 +294,11 @@ public:
// IOstream operators
- //- Read dictionary from Istream
+ //- Read content (not dictionary) from Istream
friend Istream& operator>>(Istream&, mapDistributePolyMesh&);
- //- Write dictionary to Ostream
+ //- Write content (not dictionary) to Ostream
friend Ostream& operator<<(Ostream&, const mapDistributePolyMesh&);
-
};
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H
index 6574f830ae..7aba3073ca 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H
@@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/
-#ifndef morphFieldMapper_H
-#define morphFieldMapper_H
+#ifndef Foam_morphFieldMapper_H
+#define Foam_morphFieldMapper_H
#include "Field.H"
#include "Map.H"
@@ -51,14 +51,12 @@ class morphFieldMapper
:
public FieldMapper
{
-
public:
// Constructors
- //- Null constructor
- morphFieldMapper()
- {}
+ //- Default construct
+ morphFieldMapper() = default;
//- Destructor
@@ -75,7 +73,6 @@ public:
//- Return list of inserted objects
virtual const labelList& insertedObjectLabels() const = 0;
-
};
diff --git a/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H b/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H
index 07ade39d6e..8cb95b3358 100644
--- a/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H
+++ b/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H
@@ -50,7 +50,15 @@ class faBoundaryMeshMapper
:
public PtrList
{
- // Private Member Functions
+public:
+
+ // Public Types
+
+ //- The patch mapper type
+ typedef faPatchMapper mapper_type;
+
+
+ // Generated Methods
//- No copy construct
faBoundaryMeshMapper(const faBoundaryMeshMapper&) = delete;
@@ -59,8 +67,6 @@ class faBoundaryMeshMapper
void operator=(const faBoundaryMeshMapper&) = delete;
-public:
-
// Constructors
//- Construct from components
@@ -74,14 +80,14 @@ public:
{
const faBoundaryMesh& patches = mesh.boundary();
- forAll(patches, patchI)
+ forAll(patches, patchi)
{
set
(
- patchI,
+ patchi,
new faPatchMapper
(
- patches[patchI],
+ patches[patchi],
mpm
)
);
diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/directFaPatchFieldMapper.H b/src/finiteArea/fields/faPatchFields/faPatchField/directFaPatchFieldMapper.H
new file mode 100644
index 0000000000..9b1108e4ef
--- /dev/null
+++ b/src/finiteArea/fields/faPatchFields/faPatchField/directFaPatchFieldMapper.H
@@ -0,0 +1,55 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 .
+
+Typedef
+ Foam::directFaPatchFieldMapper
+
+Description
+ A direct faPatchFieldMapper
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Foam_directFaPatchFieldMapper_H
+#define Foam_directFaPatchFieldMapper_H
+
+#include "directFieldMapper.H"
+#include "faPatchFieldMapper.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+typedef
+ DirectFieldMapper
+ directFaPatchFieldMapper;
+
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/distributedFaPatchFieldMapper.H b/src/finiteArea/fields/faPatchFields/faPatchField/distributedFaPatchFieldMapper.H
new file mode 100644
index 0000000000..9976a9a9c6
--- /dev/null
+++ b/src/finiteArea/fields/faPatchFields/faPatchField/distributedFaPatchFieldMapper.H
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 .
+
+Typedef
+ Foam::distributedFaPatchFieldMapper
+
+Description
+ A directFaPatchFieldMapper
+ with direct mapping from local or remote quantities.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Foam_distributedFaPatchFieldMapper_H
+#define Foam_distributedFaPatchFieldMapper_H
+
+#include "distributedFieldMapper.H"
+#include "directFaPatchFieldMapper.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+typedef
+ DistributedFieldMapper
+ distributedFaPatchFieldMapper;
+
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H
index ebffab54a4..4e006fc265 100644
--- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H
+++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H
@@ -26,10 +26,13 @@ License
Class
Foam::faPatchFieldMapper
+Description
+ A FieldMapper for finite-area patch fields
+
\*---------------------------------------------------------------------------*/
-#ifndef faPatchFieldMapper_H
-#define faPatchFieldMapper_H
+#ifndef Foam_faPatchFieldMapper_H
+#define Foam_faPatchFieldMapper_H
#include "primitiveFields.H"
@@ -46,14 +49,12 @@ class faPatchFieldMapper
:
public FieldMapper
{
-
public:
// Constructors
- //- Null constructor
- faPatchFieldMapper()
- {}
+ //- Default construct
+ faPatchFieldMapper() = default;
};
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H
index b969c6390d..cab36edcdc 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H
@@ -5,8 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
- Copyright (C) 2013 OpenFOAM Foundation
- Copyright (C) 2019 OpenCFD Ltd.
+ Copyright (C) 2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -24,17 +23,18 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
-Class
+Typedef
Foam::directFvPatchFieldMapper
Description
- direct fvPatchFieldMapper
+ A fvPatchFieldMapper with direct mapping
\*---------------------------------------------------------------------------*/
-#ifndef directFvPatchFieldMapper_H
-#define directFvPatchFieldMapper_H
+#ifndef Foam_directFvPatchFieldMapper_H
+#define Foam_directFvPatchFieldMapper_H
+#include "directFieldMapper.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -42,70 +42,11 @@ Description
namespace Foam
{
-/*---------------------------------------------------------------------------*\
- Class directFvPatchFieldMapper Declaration
-\*---------------------------------------------------------------------------*/
+typedef
+ DirectFieldMapper
+ directFvPatchFieldMapper;
-class directFvPatchFieldMapper
-:
- public fvPatchFieldMapper
-{
-
- //- Addressing from new back to old
- const labelUList& directAddressing_;
-
- //- Does map contain any unmapped values
- bool hasUnmapped_;
-
-
-public:
-
- // Constructors
-
- //- Construct given addressing
- directFvPatchFieldMapper(const labelUList& directAddressing)
- :
- directAddressing_(directAddressing),
- hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0)
- {}
-
-
- //- Destructor
- virtual ~directFvPatchFieldMapper() = default;
-
-
- // Member Functions
-
- label size() const
- {
- return directAddressing_.size();
- }
-
- bool direct() const
- {
- return true;
- }
-
- bool hasUnmapped() const
- {
- return hasUnmapped_;
- }
-
- bool& hasUnmapped()
- {
- return hasUnmapped_;
- }
-
- const labelUList& directAddressing() const
- {
- return directAddressing_;
- }
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/distributedFvPatchFieldMapper.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/distributedFvPatchFieldMapper.H
new file mode 100644
index 0000000000..c65a5daea7
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/distributedFvPatchFieldMapper.H
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2022 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 .
+
+Typedef
+ Foam::distributedFvPatchFieldMapper
+
+Description
+ A directFvPatchFieldMapper
+ with direct mapping from local or remote quantities.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Foam_distributedFvPatchFieldMapper_H
+#define Foam_distributedFvPatchFieldMapper_H
+
+#include "distributedFieldMapper.H"
+#include "directFvPatchFieldMapper.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+typedef
+ DistributedFieldMapper
+ distributedFvPatchFieldMapper;
+
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldMapper.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldMapper.H
index 8864d011ee..d1877f75b2 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldMapper.H
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldMapper.H
@@ -27,12 +27,12 @@ Class
Foam::fvPatchFieldMapper
Description
- Foam::fvPatchFieldMapper
+ A FieldMapper for finite-volume patch fields
\*---------------------------------------------------------------------------*/
-#ifndef fvPatchFieldMapper_H
-#define fvPatchFieldMapper_H
+#ifndef Foam_fvPatchFieldMapper_H
+#define Foam_fvPatchFieldMapper_H
#include "primitiveFields.H"
@@ -49,14 +49,12 @@ class fvPatchFieldMapper
:
public FieldMapper
{
-
public:
// Constructors
- //- Null constructor
- fvPatchFieldMapper()
- {}
+ //- Default construct
+ fvPatchFieldMapper() = default;
};
diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H b/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H
index 6ac290b9fd..e533354e4d 100644
--- a/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H
+++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H
@@ -50,7 +50,15 @@ class fvBoundaryMeshMapper
:
public PtrList
{
- // Private Member Functions
+public:
+
+ // Public Types
+
+ //- The patch mapper type
+ typedef fvPatchMapper mapper_type;
+
+
+ // Generated Methods
//- No copy construct
fvBoundaryMeshMapper(const fvBoundaryMeshMapper&) = delete;
@@ -59,8 +67,6 @@ class fvBoundaryMeshMapper
void operator=(const fvBoundaryMeshMapper&) = delete;
-public:
-
// Constructors
//- Construct from components