ENH: more consistent convenience macros for creating patchFields
This commit is contained in:
parent
fe4688c27f
commit
0767e21d8c
@ -35,15 +35,18 @@ Description
|
||||
#include "vector2D.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef GeometricField<vector2D, fvPatchField, volMesh> volVector2DField;
|
||||
typedef fvPatchField<vector2D> fvPatchVector2DField;
|
||||
|
||||
defineTemplateTypeNameAndDebug(volVector2DField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(volVector2DField, 0);
|
||||
|
||||
typedef fvPatchField<vector2D> fvPatchVector2DField;
|
||||
makeFvPatchField(fvPatchVector2DField)
|
||||
defineTemplateRunTimeSelectionTable(fvPatchVector2DField, patch);
|
||||
defineTemplateRunTimeSelectionTable(fvPatchVector2DField, patchMapper);
|
||||
defineTemplateRunTimeSelectionTable(fvPatchVector2DField, dictionary);
|
||||
}
|
||||
|
||||
|
||||
|
@ -589,90 +589,8 @@ const pointPatchField<Type>& operator+
|
||||
#include "zeroGradientPointPatchField.H"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// for non-templated patch fields
|
||||
#define makePointPatchTypeField(PatchTypeField,typePatchTypeField) \
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||
|
||||
|
||||
// for templated patch fields
|
||||
#define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||
|
||||
|
||||
#define makePointPatchFields(type) \
|
||||
makeTemplatePointPatchTypeField \
|
||||
( \
|
||||
pointPatchScalarField, \
|
||||
type##PointPatchScalarField \
|
||||
); \
|
||||
makeTemplatePointPatchTypeField \
|
||||
( \
|
||||
pointPatchVectorField, \
|
||||
type##PointPatchVectorField \
|
||||
); \
|
||||
makeTemplatePointPatchTypeField \
|
||||
( \
|
||||
pointPatchSphericalTensorField, \
|
||||
type##PointPatchSphericalTensorField \
|
||||
); \
|
||||
makeTemplatePointPatchTypeField \
|
||||
( \
|
||||
pointPatchSymmTensorField, \
|
||||
type##PointPatchSymmTensorField \
|
||||
); \
|
||||
makeTemplatePointPatchTypeField \
|
||||
( \
|
||||
pointPatchTensorField, \
|
||||
type##PointPatchTensorField \
|
||||
);
|
||||
|
||||
|
||||
#define makePointPatchFieldsTypeName(type) \
|
||||
defineNamedTemplateTypeNameAndDebug(type##PointPatchScalarField, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(type##PointPatchVectorField, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
type##PointPatchSphericalTensorField, 0 \
|
||||
); \
|
||||
defineNamedTemplateTypeNameAndDebug(type##PointPatchSymmTensorField, 0); \
|
||||
defineNamedTemplateTypeNameAndDebug(type##PointPatchTensorField, 0)
|
||||
|
||||
|
||||
#define makePointPatchFieldTypedefs(type) \
|
||||
typedef type##PointPatchField<scalar> type##PointPatchScalarField; \
|
||||
typedef type##PointPatchField<vector> type##PointPatchVectorField; \
|
||||
typedef type##PointPatchField<sphericalTensor> \
|
||||
type##PointPatchSphericalTensorField; \
|
||||
typedef type##PointPatchField<symmTensor> type##PointPatchSymmTensorField;\
|
||||
typedef type##PointPatchField<tensor> type##PointPatchTensorField;
|
||||
|
||||
#include "pointPatchFieldMacros.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -0,0 +1,143 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Macros for creating pointPatchField types.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_pointPatchFieldMacros_H
|
||||
#define Foam_pointPatchFieldMacros_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
#include "pointPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToPointPatchFieldRunTimeSelection\
|
||||
(PatchTypeField, typePatchTypeField)\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// For non-templated (or typedef) patch fields.
|
||||
//- Define a concrete pointPatchField type and add to run-time tables
|
||||
//- Example, (pointPatchScalarField, calculatedPointPatchScalarField)
|
||||
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField);
|
||||
|
||||
//- Define a pointPatchField type for a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define makePointPatchFieldTypeName(fieldType, bcType) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(bcType, PointPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
//- Add runTime selection for pointPatchField type of a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define addPointPatchFieldTypeRunTime(fieldType, bcType) \
|
||||
addToPointPatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(pointPatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(bcType, PointPatch, CAPITALIZE(fieldType), Field) \
|
||||
);
|
||||
|
||||
// For templated patch fields
|
||||
#define makePointPatchFieldType(fieldType, bcType) \
|
||||
makePointPatchFieldTypeName(fieldType, bcType) \
|
||||
addPointPatchFieldTypeRunTime(fieldType, bcType)
|
||||
|
||||
//- Declare a typedef for a pointPatchField.
|
||||
//- Example, (scalar, calculated)
|
||||
#define makePointPatchFieldTypedef(fieldType, bcType) \
|
||||
typedef \
|
||||
bcType##PointPatchField<fieldType> \
|
||||
CAT4(bcType, PointPatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- For all standard field types:
|
||||
//- define a pointPatchField type and add to run-time tables
|
||||
#define makePointPatchFields(bcType) \
|
||||
\
|
||||
makePointPatchFieldType(scalar, bcType); \
|
||||
makePointPatchFieldType(vector, bcType); \
|
||||
makePointPatchFieldType(sphericalTensor, bcType); \
|
||||
makePointPatchFieldType(symmTensor, bcType); \
|
||||
makePointPatchFieldType(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define a pointPatchField type
|
||||
//- Example, (calculated)
|
||||
#define makePointPatchFieldsTypeName(bcType) \
|
||||
\
|
||||
makePointPatchFieldTypeName(scalar, bcType); \
|
||||
makePointPatchFieldTypeName(vector, bcType); \
|
||||
makePointPatchFieldTypeName(sphericalTensor, bcType); \
|
||||
makePointPatchFieldTypeName(symmTensor, bcType); \
|
||||
makePointPatchFieldTypeName(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define typedefs for the pointPatchField
|
||||
//- Example, (calculated)
|
||||
#define makePointPatchFieldTypedefs(bcType) \
|
||||
\
|
||||
makePointPatchFieldTypedef(scalar, bcType); \
|
||||
makePointPatchFieldTypedef(vector, bcType); \
|
||||
makePointPatchFieldTypedef(sphericalTensor, bcType); \
|
||||
makePointPatchFieldTypedef(symmTensor, bcType); \
|
||||
makePointPatchFieldTypedef(tensor, bcType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -27,27 +27,21 @@ License
|
||||
|
||||
#include "pointPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
#define makePointPatchField(PatchTypeField) \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
#define makePointPatchField(pointPatchTypeField) \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable(pointPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(pointPatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(pointPatchTypeField, dictionary);
|
||||
|
||||
makePointPatchField(pointPatchScalarField)
|
||||
makePointPatchField(pointPatchVectorField)
|
||||
makePointPatchField(pointPatchSphericalTensorField)
|
||||
makePointPatchField(pointPatchSymmTensorField)
|
||||
makePointPatchField(pointPatchTensorField)
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
makePointPatchField(pointPatchScalarField);
|
||||
makePointPatchField(pointPatchVectorField);
|
||||
makePointPatchField(pointPatchSphericalTensorField);
|
||||
makePointPatchField(pointPatchSymmTensorField);
|
||||
makePointPatchField(pointPatchTensorField);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicSymmetryFaPatchFields_H
|
||||
#define basicSymmetryFaPatchFields_H
|
||||
#ifndef Foam_basicSymmetryFaPatchFields_H
|
||||
#define Foam_basicSymmetryFaPatchFields_H
|
||||
|
||||
#include "basicSymmetryFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(basicSymmetry)
|
||||
makeFaPatchTypeFieldTypedefs(basicSymmetry);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -23,22 +23,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::calculatedFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
calculatedFaPatchFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef calculatedFaPatchFields_H
|
||||
#define calculatedFaPatchFields_H
|
||||
#ifndef Foam_calculatedFaPatchFields_H
|
||||
#define Foam_calculatedFaPatchFields_H
|
||||
|
||||
#include "calculatedFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(calculated)
|
||||
makeFaPatchTypeFieldTypedefs(calculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef coupledFaPatchFields_H
|
||||
#define coupledFaPatchFields_H
|
||||
#ifndef Foam_coupledFaPatchFields_H
|
||||
#define Foam_coupledFaPatchFields_H
|
||||
|
||||
#include "coupledFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(coupled)
|
||||
makeFaPatchTypeFieldTypedefs(coupled);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -23,22 +23,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fixedGradientFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
fixedGradientFaPatchFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedGradientFaPatchFields_H
|
||||
#define fixedGradientFaPatchFields_H
|
||||
#ifndef Foam_fixedGradientFaPatchFields_H
|
||||
#define Foam_fixedGradientFaPatchFields_H
|
||||
|
||||
#include "fixedGradientFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(fixedGradient)
|
||||
makeFaPatchTypeFieldTypedefs(fixedGradient);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedValueFaPatchFields_H
|
||||
#define fixedValueFaPatchFields_H
|
||||
#ifndef Foam_fixedValueFaPatchFields_H
|
||||
#define Foam_fixedValueFaPatchFields_H
|
||||
|
||||
#include "fixedValueFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(fixedValue)
|
||||
makeFaPatchTypeFieldTypedefs(fixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef mixedFaPatchFields_H
|
||||
#define mixedFaPatchFields_H
|
||||
#ifndef Foam_mixedFaPatchFields_H
|
||||
#define Foam_mixedFaPatchFields_H
|
||||
|
||||
#include "mixedFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(mixed)
|
||||
makeFaPatchTypeFieldTypedefs(mixed);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -23,21 +23,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::transformFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
transformFaPatchFields.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef transformFaPatchFields_H
|
||||
#define transformFaPatchFields_H
|
||||
#ifndef Foam_transformFaPatchFields_H
|
||||
#define Foam_transformFaPatchFields_H
|
||||
|
||||
#include "transformFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -46,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(transform)
|
||||
makeFaPatchTypeFieldTypedefs(transform);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -23,19 +23,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
zeroGradientFaPatchFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef zeroGradientFaPatchFields_H
|
||||
#define zeroGradientFaPatchFields_H
|
||||
#ifndef Foam_zeroGradientFaPatchFields_H
|
||||
#define Foam_zeroGradientFaPatchFields_H
|
||||
|
||||
#include "zeroGradientFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -44,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(zeroGradient)
|
||||
makeFaPatchTypeFieldTypedefs(zeroGradient);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef cyclicFaPatchFields_H
|
||||
#define cyclicFaPatchFields_H
|
||||
#ifndef Foam_cyclicFaPatchFields_H
|
||||
#define Foam_cyclicFaPatchFields_H
|
||||
|
||||
#include "cyclicFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(cyclic)
|
||||
makeFaPatchTypeFieldTypedefs(cyclic);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -23,18 +23,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
emptyFaPatchFields.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef emptyFaPatchFields_H
|
||||
#define emptyFaPatchFields_H
|
||||
#ifndef Foam_emptyFaPatchFields_H
|
||||
#define Foam_emptyFaPatchFields_H
|
||||
|
||||
#include "emptyFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -43,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(empty)
|
||||
makeFaPatchTypeFieldTypedefs(empty);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -29,7 +29,6 @@ License
|
||||
#define Foam_processorFaPatchFields_H
|
||||
|
||||
#include "processorFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(processor)
|
||||
makeFaPatchTypeFieldTypedefs(processor);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef symmetryFaPatchFields_H
|
||||
#define symmetryFaPatchFields_H
|
||||
#ifndef Foam_symmetryFaPatchFields_H
|
||||
#define Foam_symmetryFaPatchFields_H
|
||||
|
||||
#include "symmetryFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(symmetry)
|
||||
makeFaPatchTypeFieldTypedefs(symmetry);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wedgeFaPatchFields_H
|
||||
#define wedgeFaPatchFields_H
|
||||
#ifndef Foam_wedgeFaPatchFields_H
|
||||
#define Foam_wedgeFaPatchFields_H
|
||||
|
||||
#include "wedgeFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(wedge)
|
||||
makeFaPatchTypeFieldTypedefs(wedge);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef clampedPlateFaPatchFields_H
|
||||
#define clampedPlateFaPatchFields_H
|
||||
#ifndef Foam_clampedPlateFaPatchFields_H
|
||||
#define Foam_clampedPlateFaPatchFields_H
|
||||
|
||||
#include "clampedPlateFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(clampedPlate)
|
||||
makeFaPatchTypeFieldTypedefs(clampedPlate);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedValueOutflowFaPatchFields_H
|
||||
#define fixedValueOutflowFaPatchFields_H
|
||||
#ifndef Foam_fixedValueOutflowFaPatchFields_H
|
||||
#define Foam_fixedValueOutflowFaPatchFields_H
|
||||
|
||||
#include "fixedValueOutflowFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(fixedValueOutflow)
|
||||
makeFaPatchTypeFieldTypedefs(fixedValueOutflow);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef inletOutletFaPatchFields_H
|
||||
#define inletOutletFaPatchFields_H
|
||||
#ifndef Foam_inletOutletFaPatchFields_H
|
||||
#define Foam_inletOutletFaPatchFields_H
|
||||
|
||||
#include "inletOutletFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(inletOutlet)
|
||||
makeFaPatchTypeFieldTypedefs(inletOutlet);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef slipFaPatchFields_H
|
||||
#define slipFaPatchFields_H
|
||||
#ifndef Foam_slipFaPatchFields_H
|
||||
#define Foam_slipFaPatchFields_H
|
||||
|
||||
#include "slipFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(slip)
|
||||
makeFaPatchTypeFieldTypedefs(slip);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -26,11 +26,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef timeVaryingUniformFixedValueFaPatchFields_H
|
||||
#define timeVaryingUniformFixedValueFaPatchFields_H
|
||||
#ifndef Foam_timeVaryingUniformFixedValueFaPatchFields_H
|
||||
#define Foam_timeVaryingUniformFixedValueFaPatchFields_H
|
||||
|
||||
#include "timeVaryingUniformFixedValueFaPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,7 +38,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(timeVaryingUniformFixedValue)
|
||||
makeFaPatchTypeFieldTypedefs(timeVaryingUniformFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -52,6 +52,7 @@ SourceFiles
|
||||
#include "faPatch.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "fieldTypes.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -66,6 +67,7 @@ class areaMesh;
|
||||
|
||||
template<class Type> class faPatchField;
|
||||
template<class Type> class calculatedFaPatchField;
|
||||
template<class Type> class zeroGradientFaPatchField;
|
||||
|
||||
template<class Type>
|
||||
Ostream& operator<<(Ostream&, const faPatchField<Type>&);
|
||||
@ -383,10 +385,10 @@ public:
|
||||
|
||||
//- Return a pointer to a new calculatedFaPatchField created on
|
||||
//- freestore without setting patchField values
|
||||
template<class Type2>
|
||||
template<class AnyType>
|
||||
static tmp<faPatchField<Type>> NewCalculatedType
|
||||
(
|
||||
const faPatchField<Type2>&
|
||||
const faPatchField<AnyType>& pf
|
||||
);
|
||||
|
||||
|
||||
@ -589,93 +591,8 @@ public:
|
||||
#include "zeroGradientFaPatchField.H"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToFaPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, patch \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makeFaPatchTypeFieldTypeName(typePatchTypeField) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);
|
||||
|
||||
|
||||
#define makeFaPatchFieldsTypeName(typePatchField) \
|
||||
\
|
||||
makeFaPatchTypeFieldTypeName(typePatchField##FaPatchScalarField); \
|
||||
makeFaPatchTypeFieldTypeName(typePatchField##FaPatchVectorField); \
|
||||
makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSphericalTensorField); \
|
||||
makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSymmTensorField); \
|
||||
makeFaPatchTypeFieldTypeName(typePatchField##FaPatchTensorField);
|
||||
|
||||
|
||||
#define makeFaPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
\
|
||||
addToFaPatchFieldRunTimeSelection \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField \
|
||||
);
|
||||
|
||||
#define makeTemplateFaPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
\
|
||||
addToFaPatchFieldRunTimeSelection \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField \
|
||||
);
|
||||
|
||||
|
||||
#define makeFaPatchFields(type) \
|
||||
\
|
||||
makeTemplateFaPatchTypeField(faPatchScalarField, type##FaPatchScalarField); \
|
||||
makeTemplateFaPatchTypeField(faPatchVectorField, type##FaPatchVectorField); \
|
||||
makeTemplateFaPatchTypeField \
|
||||
( \
|
||||
faPatchSphericalTensorField, \
|
||||
type##FaPatchSphericalTensorField \
|
||||
); \
|
||||
makeTemplateFaPatchTypeField \
|
||||
( \
|
||||
faPatchSymmTensorField, \
|
||||
type##FaPatchSymmTensorField \
|
||||
); \
|
||||
makeTemplateFaPatchTypeField \
|
||||
( \
|
||||
faPatchTensorField, \
|
||||
type##FaPatchTensorField \
|
||||
);
|
||||
|
||||
|
||||
#define makeFaPatchTypeFieldTypedefs(type) \
|
||||
\
|
||||
typedef type##FaPatchField<scalar> type##FaPatchScalarField; \
|
||||
typedef type##FaPatchField<vector> type##FaPatchVectorField; \
|
||||
typedef type##FaPatchField<sphericalTensor> \
|
||||
type##FaPatchSphericalTensorField; \
|
||||
typedef type##FaPatchField<symmTensor> type##FaPatchSymmTensorField; \
|
||||
typedef type##FaPatchField<tensor> type##FaPatchTensorField;
|
||||
|
||||
#include "faPatchFieldMacros.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -0,0 +1,142 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 Wikki Ltd
|
||||
Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Macros for creating faPatchField types.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_faPatchFieldMacros_H
|
||||
#define Foam_faPatchFieldMacros_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
#include "faPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToFaPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// For non-templated (or typedef) patch fields.
|
||||
//- Define a concrete faPatchField type and add to run-time tables
|
||||
//- Example, (faPatchScalarField, calculatedFaPatchScalarField)
|
||||
#define makeFaPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToFaPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField);
|
||||
|
||||
//- Define a faPatchField type for a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define makeFaPatchFieldTypeName(fieldType, bcType) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(bcType, FaPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
//- Add runTime selection for faPatchField type of a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define addFaPatchFieldTypeRunTime(fieldType, bcType) \
|
||||
addToFaPatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(faPatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(bcType, FaPatch, CAPITALIZE(fieldType), Field) \
|
||||
);
|
||||
|
||||
// For templated patch fields
|
||||
#define makeFaPatchFieldType(fieldType, bcType) \
|
||||
makeFaPatchFieldTypeName(fieldType, bcType) \
|
||||
addFaPatchFieldTypeRunTime(fieldType, bcType) \
|
||||
|
||||
//- Declare a typedef for a faPatchField. Example, (scalar, calculated)
|
||||
#define makeFaPatchFieldTypedef(fieldType, bcType) \
|
||||
typedef \
|
||||
bcType##FaPatchField<fieldType> \
|
||||
CAT4(bcType, FaPatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- For all standard field types:
|
||||
//- define a faPatchField type and add to run-time tables
|
||||
#define makeFaPatchFields(bcType) \
|
||||
\
|
||||
makeFaPatchFieldType(scalar, bcType); \
|
||||
makeFaPatchFieldType(vector, bcType); \
|
||||
makeFaPatchFieldType(sphericalTensor, bcType); \
|
||||
makeFaPatchFieldType(symmTensor, bcType); \
|
||||
makeFaPatchFieldType(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define a faPatchField type.
|
||||
//- Example, (calculated)
|
||||
#define makeFaPatchFieldsTypeName(bcType) \
|
||||
\
|
||||
makeFaPatchFieldTypeName(scalar, bcType); \
|
||||
makeFaPatchFieldTypeName(vector, bcType); \
|
||||
makeFaPatchFieldTypeName(sphericalTensor, bcType); \
|
||||
makeFaPatchFieldTypeName(symmTensor, bcType); \
|
||||
makeFaPatchFieldTypeName(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define typedefs for the faPatchField.
|
||||
//- Example, (calculated)
|
||||
#define makeFaPatchTypeFieldTypedefs(bcType) \
|
||||
\
|
||||
makeFaPatchFieldTypedef(scalar, bcType); \
|
||||
makeFaPatchFieldTypedef(vector, bcType); \
|
||||
makeFaPatchFieldTypedef(sphericalTensor, bcType); \
|
||||
makeFaPatchFieldTypedef(symmTensor, bcType); \
|
||||
makeFaPatchFieldTypedef(tensor, bcType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -28,26 +28,21 @@ License
|
||||
#include "faPatchFields.H"
|
||||
#include "areaFaMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
#define makeFaPatchField(PatchTypeField) \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
#define makeFaPatchField(faPatchTypeField) \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable(faPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(faPatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(faPatchTypeField, dictionary);
|
||||
|
||||
makeFaPatchField(faPatchScalarField)
|
||||
makeFaPatchField(faPatchVectorField)
|
||||
makeFaPatchField(faPatchSphericalTensorField)
|
||||
makeFaPatchField(faPatchSymmTensorField)
|
||||
makeFaPatchField(faPatchTensorField)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
makeFaPatchField(faPatchScalarField);
|
||||
makeFaPatchField(faPatchVectorField);
|
||||
makeFaPatchField(faPatchSphericalTensorField);
|
||||
makeFaPatchField(faPatchSymmTensorField);
|
||||
makeFaPatchField(faPatchTensorField);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
@ -23,6 +23,9 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Declarations for faPatchField types
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_faPatchFields_H
|
||||
@ -31,8 +34,6 @@ License
|
||||
#include "faPatchField.H"
|
||||
#include "faPatchFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -23,10 +23,13 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Forward declarations for faPatchField types
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef faPatchFieldsFwd_H
|
||||
#define faPatchFieldsFwd_H
|
||||
#ifndef Foam_faPatchFieldsFwd_H
|
||||
#define Foam_faPatchFieldsFwd_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef calculatedFaePatchFields_H
|
||||
#define calculatedFaePatchFields_H
|
||||
#ifndef Foam_calculatedFaePatchFields_H
|
||||
#define Foam_calculatedFaePatchFields_H
|
||||
|
||||
#include "calculatedFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(calculated)
|
||||
makeFaePatchTypeFieldTypedefs(calculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -29,17 +29,13 @@ License
|
||||
#include "coupledFaePatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchFieldsTypeName(coupled);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef coupledFaePatchFields_H
|
||||
#define coupledFaePatchFields_H
|
||||
#ifndef Foam_coupledFaePatchFields_H
|
||||
#define Foam_coupledFaePatchFields_H
|
||||
|
||||
#include "coupledFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(coupled)
|
||||
makeFaePatchTypeFieldTypedefs(coupled);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedValueFaePatchFields_H
|
||||
#define fixedValueFaePatchFields_H
|
||||
#ifndef Foam_fixedValueFaePatchFields_H
|
||||
#define Foam_fixedValueFaePatchFields_H
|
||||
|
||||
#include "fixedValueFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(fixedValue)
|
||||
makeFaePatchTypeFieldTypedefs(fixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef cyclicFaePatchFields_H
|
||||
#define cyclicFaePatchFields_H
|
||||
#ifndef Foam_cyclicFaePatchFields_H
|
||||
#define Foam_cyclicFaePatchFields_H
|
||||
|
||||
#include "cyclicFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(cyclic)
|
||||
makeFaePatchTypeFieldTypedefs(cyclic);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef emptyFaePatchFields_H
|
||||
#define emptyFaePatchFields_H
|
||||
#ifndef Foam_emptyFaePatchFields_H
|
||||
#define Foam_emptyFaePatchFields_H
|
||||
|
||||
#include "emptyFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(empty)
|
||||
makeFaePatchTypeFieldTypedefs(empty);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef processorFaePatchFields_H
|
||||
#define processorFaePatchFields_H
|
||||
#ifndef Foam_processorFaePatchFields_H
|
||||
#define Foam_processorFaePatchFields_H
|
||||
|
||||
#include "processorFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(processor)
|
||||
makeFaePatchTypeFieldTypedefs(processor);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef symmetryFaePatchFields_H
|
||||
#define symmetryFaePatchFields_H
|
||||
#ifndef Foam_symmetryFaePatchFields_H
|
||||
#define Foam_symmetryFaePatchFields_H
|
||||
|
||||
#include "symmetryFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(symmetry)
|
||||
makeFaePatchTypeFieldTypedefs(symmetry);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -25,11 +25,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wedgeFaePatchFields_H
|
||||
#define wedgeFaePatchFields_H
|
||||
#ifndef Foam_wedgeFaePatchFields_H
|
||||
#define Foam_wedgeFaePatchFields_H
|
||||
|
||||
#include "wedgeFaePatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaePatchTypeFieldTypedefs(wedge)
|
||||
makeFaePatchTypeFieldTypedefs(wedge);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -472,67 +472,8 @@ public:
|
||||
#include "calculatedFaePatchField.H"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define makeFaePatchTypeFieldTypeName(typePatchTypeField) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);
|
||||
|
||||
#define makeFaePatchFieldsTypeName(typePatchField) \
|
||||
\
|
||||
makeFaePatchTypeFieldTypeName(typePatchField##FaePatchScalarField); \
|
||||
makeFaePatchTypeFieldTypeName(typePatchField##FaePatchVectorField); \
|
||||
makeFaePatchTypeFieldTypeName(typePatchField##FaePatchSphericalTensorField); \
|
||||
makeFaePatchTypeFieldTypeName(typePatchField##FaePatchSymmTensorField); \
|
||||
makeFaePatchTypeFieldTypeName(typePatchField##FaePatchTensorField);
|
||||
|
||||
|
||||
#define makeFaePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, patch \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makeFaePatchFields(type) \
|
||||
\
|
||||
makeFaePatchTypeField(faePatchScalarField, type##FaePatchScalarField); \
|
||||
makeFaePatchTypeField(faePatchVectorField, type##FaePatchVectorField); \
|
||||
makeFaePatchTypeField \
|
||||
( \
|
||||
faePatchSphericalTensorField, \
|
||||
type##FaePatchSphericalTensorField \
|
||||
); \
|
||||
makeFaePatchTypeField(faePatchSymmTensorField, type##FaePatchSymmTensorField); \
|
||||
makeFaePatchTypeField(faePatchTensorField, type##FaePatchTensorField);
|
||||
|
||||
|
||||
#define makeFaePatchTypeFieldTypedefs(type) \
|
||||
\
|
||||
typedef type##FaePatchField<scalar> type##FaePatchScalarField; \
|
||||
typedef type##FaePatchField<vector> type##FaePatchVectorField; \
|
||||
typedef type##FaePatchField<sphericalTensor> \
|
||||
type##FaePatchSphericalTensorField; \
|
||||
typedef type##FaePatchField<symmTensor> type##FaePatchSymmTensorField; \
|
||||
typedef type##FaePatchField<tensor> type##FaePatchTensorField;
|
||||
|
||||
#include "faePatchFieldMacros.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -0,0 +1,142 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 Wikki Ltd
|
||||
Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Macros for creating faePatchField types.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_faePatchFieldMacros_H
|
||||
#define Foam_faePatchFieldMacros_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
#include "faePatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToFaePatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)\
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// For non-templated (or typedef) patch fields.
|
||||
//- Define a concrete faePatchField type and add to run-time tables
|
||||
//- Example, (faePatchScalarField, calculatedFaePatchScalarField)
|
||||
#define makeFaePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToFaePatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField);
|
||||
|
||||
//- Define a faePatchField type for a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define makeFaePatchFieldTypeName(fieldType, bcType) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(bcType, FaePatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
//- Add runTime selection for faePatchField type of a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define addFaePatchFieldTypeRunTime(fieldType, bcType) \
|
||||
addToFaePatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(faePatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(bcType, FaePatch, CAPITALIZE(fieldType), Field) \
|
||||
);
|
||||
|
||||
// For templated patch fields
|
||||
#define makeFaePatchFieldType(fieldType, bcType) \
|
||||
makeFaePatchFieldTypeName(fieldType, bcType) \
|
||||
addFaePatchFieldTypeRunTime(fieldType, bcType)
|
||||
|
||||
//- Declare a typedef for a faePatchField. Example, (scalar, calculated)
|
||||
#define makeFaePatchFieldTypedef(fieldType, bcType) \
|
||||
typedef \
|
||||
bcType##FaePatchField<fieldType> \
|
||||
CAT4(bcType, FaePatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- For all standard field types:
|
||||
//- define a faePatchField type and add to run-time tables
|
||||
#define makeFaePatchFields(bcType) \
|
||||
\
|
||||
makeFaePatchFieldType(scalar, bcType); \
|
||||
makeFaePatchFieldType(vector, bcType); \
|
||||
makeFaePatchFieldType(sphericalTensor, bcType); \
|
||||
makeFaePatchFieldType(symmTensor, bcType); \
|
||||
makeFaePatchFieldType(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define a faePatchField type
|
||||
//- Example, (calculated)
|
||||
#define makeFaePatchFieldsTypeName(bcType) \
|
||||
\
|
||||
makeFaePatchFieldTypeName(scalar, bcType); \
|
||||
makeFaePatchFieldTypeName(vector, bcType); \
|
||||
makeFaePatchFieldTypeName(sphericalTensor, bcType); \
|
||||
makeFaePatchFieldTypeName(symmTensor, bcType); \
|
||||
makeFaePatchFieldTypeName(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define typedefs for the faePatchField
|
||||
//- Example, (calculated)
|
||||
#define makeFaePatchTypeFieldTypedefs(bcType) \
|
||||
\
|
||||
makeFaePatchFieldTypedef(scalar, bcType); \
|
||||
makeFaePatchFieldTypedef(vector, bcType); \
|
||||
makeFaePatchFieldTypedef(sphericalTensor, bcType); \
|
||||
makeFaePatchFieldTypedef(symmTensor, bcType); \
|
||||
makeFaePatchFieldTypedef(tensor, bcType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -28,27 +28,21 @@ License
|
||||
#include "faePatchFields.H"
|
||||
#include "edgeFaMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
#define makeFaePatchField(PatchTypeField) \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
#define makeFaePatchField(faePatchTypeField) \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable(faePatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(faePatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(faePatchTypeField, dictionary);
|
||||
|
||||
makeFaePatchField(faePatchScalarField)
|
||||
makeFaePatchField(faePatchVectorField)
|
||||
makeFaePatchField(faePatchSphericalTensorField)
|
||||
makeFaePatchField(faePatchSymmTensorField)
|
||||
makeFaePatchField(faePatchTensorField)
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
makeFaePatchField(faePatchScalarField);
|
||||
makeFaePatchField(faePatchVectorField);
|
||||
makeFaePatchField(faePatchSphericalTensorField);
|
||||
makeFaePatchField(faePatchSymmTensorField);
|
||||
makeFaePatchField(faePatchTensorField);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
@ -23,11 +23,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::faePatchField
|
||||
|
||||
Description
|
||||
Finite area edge-based patch fields
|
||||
Declarations for faePatchField types
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -37,8 +34,6 @@ Description
|
||||
#include "faePatchField.H"
|
||||
#include "faePatchFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -23,15 +23,13 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::faePatchField
|
||||
|
||||
Description
|
||||
Forward declarations for faePatchField types
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef faePatchFieldsFwd_H
|
||||
#define faePatchFieldsFwd_H
|
||||
#ifndef Foam_faePatchFieldsFwd_H
|
||||
#define Foam_faePatchFieldsFwd_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
|
||||
|
@ -31,6 +31,14 @@ License
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchFieldType(scalar, fan);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
@ -102,12 +110,4 @@ void Foam::fanFvPatchField<Foam::scalar>::calcFanJump()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeTemplatePatchTypeField(scalar, fan);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -29,18 +29,12 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeTemplatePatchTypeField(vector, fixedNormalSlip);
|
||||
makeTemplatePatchTypeField(tensor, fixedNormalSlip);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
makePatchFieldType(vector, fixedNormalSlip);
|
||||
makePatchFieldType(tensor, fixedNormalSlip);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -36,7 +36,6 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
//makeTemplatePatchTypeField(scalar, mappedMixedField);
|
||||
makePatchFields(mappedMixedField);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -36,7 +36,6 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
//makeTemplatePatchTypeField(scalar, mappedMixed);
|
||||
makePatchFields(mappedMixed);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -36,8 +36,8 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeTemplatePatchTypeField(scalar, turbulentDigitalFilterInlet);
|
||||
makeTemplatePatchTypeField(vector, turbulentDigitalFilterInlet);
|
||||
makePatchFieldType(scalar, turbulentDigitalFilterInlet);
|
||||
makePatchFieldType(vector, turbulentDigitalFilterInlet);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -716,106 +716,8 @@ public:
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define makeFvPatchField(fvPatchTypeField) \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(fvPatchTypeField, dictionary);
|
||||
|
||||
|
||||
#undef addToPatchFieldRunTimeSelection
|
||||
#define addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// Use with caution
|
||||
#undef addRemovableToPatchFieldRunTimeSelection
|
||||
#define addRemovableToPatchFieldRunTimeSelection\
|
||||
(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// For non-templated patch fields
|
||||
#define makePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||
|
||||
// For non-templated patch fields - use with caution
|
||||
#define makeRemovablePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addRemovableToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||
|
||||
// For templated patch fields
|
||||
#define makeTemplatePatchTypeField(fieldType, type) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(type, FvPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
); \
|
||||
addToPatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(fvPatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(type, FvPatch, CAPITALIZE(fieldType), Field) \
|
||||
)
|
||||
|
||||
#define makePatchFields(type) \
|
||||
FOR_ALL_FIELD_TYPES(makeTemplatePatchTypeField, type)
|
||||
|
||||
#define makePatchFieldTypeName(fieldType, type) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(type, FvPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
#define makePatchFieldTypeNames(type) \
|
||||
FOR_ALL_FIELD_TYPES(makePatchFieldTypeName, type)
|
||||
|
||||
#define makePatchTypeFieldTypedef(fieldType, type) \
|
||||
typedef type##FvPatchField<fieldType> \
|
||||
CAT4(type, FvPatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
#define makePatchTypeFieldTypedefs(type) \
|
||||
FOR_ALL_FIELD_TYPES(makePatchTypeFieldTypedef, type)
|
||||
#include "fvPatchFieldMacros.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -0,0 +1,180 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Macros for creating fvPatchField types.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_fvPatchFieldMacros_H
|
||||
#define Foam_fvPatchFieldMacros_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
#include "fvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#undef addToPatchFieldRunTimeSelection
|
||||
#define addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// Use with caution
|
||||
#undef addRemovableToPatchFieldRunTimeSelection
|
||||
#define addRemovableToPatchFieldRunTimeSelection\
|
||||
(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addRemovableToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// For non-templated (or typedef) patch fields.
|
||||
//- Define a concrete fvPatchField type and add to run-time tables
|
||||
//- Example, (fvPatchScalarField, calculatedFvPatchScalarField)
|
||||
#define makePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField);
|
||||
|
||||
// For non-templated patch fields - use with caution
|
||||
#define makeRemovablePatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addRemovableToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||
|
||||
|
||||
//- Define a fvPatchField type for a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define makePatchFieldTypeName(fieldType, bcType) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(bcType, FvPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
//- Add runTime selection for fvPatchField type of a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define addPatchFieldTypeRunTime(fieldType, bcType) \
|
||||
addToPatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(fvPatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(bcType, FvPatch, CAPITALIZE(fieldType), Field) \
|
||||
);
|
||||
|
||||
// For templated patch fields
|
||||
#define makePatchFieldType(fieldType, bcType) \
|
||||
makePatchFieldTypeName(fieldType, bcType) \
|
||||
addPatchFieldTypeRunTime(fieldType, bcType)
|
||||
|
||||
//- Declare a typedef for a fvPatchField. Example, (scalar, calculated)
|
||||
#define makePatchTypeFieldTypedef(fieldType, bcType) \
|
||||
typedef \
|
||||
bcType##FvPatchField<fieldType> \
|
||||
CAT4(bcType, FvPatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- For all standard field types:
|
||||
//- define a faPatchField type and add to run-time tables
|
||||
#define makePatchFields(bcType) \
|
||||
\
|
||||
makePatchFieldType(scalar, bcType); \
|
||||
makePatchFieldType(vector, bcType); \
|
||||
makePatchFieldType(sphericalTensor, bcType); \
|
||||
makePatchFieldType(symmTensor, bcType); \
|
||||
makePatchFieldType(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define a faPatchField type.
|
||||
//- Example, (calculated)
|
||||
#define makePatchFieldTypeNames(bcType) \
|
||||
\
|
||||
makePatchFieldTypeName(scalar, bcType); \
|
||||
makePatchFieldTypeName(vector, bcType); \
|
||||
makePatchFieldTypeName(sphericalTensor, bcType); \
|
||||
makePatchFieldTypeName(symmTensor, bcType); \
|
||||
makePatchFieldTypeName(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define typedefs for the faPatchField
|
||||
//- Example, (calculated)
|
||||
#define makePatchTypeFieldTypedefs(bcType) \
|
||||
\
|
||||
makePatchTypeFieldTypedef(scalar, bcType); \
|
||||
makePatchTypeFieldTypedef(vector, bcType); \
|
||||
makePatchTypeFieldTypedef(sphericalTensor, bcType); \
|
||||
makePatchTypeFieldTypedef(symmTensor, bcType); \
|
||||
makePatchTypeFieldTypedef(tensor, bcType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Compatibility: OpenFOAM-v2212 and earlier
|
||||
|
||||
#define makeTemplatePatchTypeField(fldType, bcType) \
|
||||
makePatchFieldType(fldType, bcType)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -27,20 +27,21 @@ License
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
#define makeFvPatchField(PatchTypeField) \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
makeFvPatchField(fvPatchScalarField)
|
||||
makeFvPatchField(fvPatchVectorField)
|
||||
makeFvPatchField(fvPatchSphericalTensorField)
|
||||
makeFvPatchField(fvPatchSymmTensorField)
|
||||
makeFvPatchField(fvPatchTensorField)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
makeFvPatchField(fvPatchScalarField);
|
||||
makeFvPatchField(fvPatchVectorField);
|
||||
makeFvPatchField(fvPatchSphericalTensorField);
|
||||
makeFvPatchField(fvPatchSymmTensorField);
|
||||
makeFvPatchField(fvPatchTensorField);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
@ -473,66 +473,8 @@ public:
|
||||
#include "calculatedFvsPatchField.H"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define makeFvsPatchTypeFieldTypeName(type) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(type, 0);
|
||||
|
||||
#define makeFvsPatchFieldsTypeName(type) \
|
||||
\
|
||||
makeFvsPatchTypeFieldTypeName(type##FvsPatchScalarField); \
|
||||
makeFvsPatchTypeFieldTypeName(type##FvsPatchVectorField); \
|
||||
makeFvsPatchTypeFieldTypeName(type##FvsPatchSphericalTensorField); \
|
||||
makeFvsPatchTypeFieldTypeName(type##FvsPatchSymmTensorField); \
|
||||
makeFvsPatchTypeFieldTypeName(type##FvsPatchTensorField);
|
||||
|
||||
#define makeFvsPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, patch \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, typePatchTypeField, dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makeFvsPatchFields(type) \
|
||||
\
|
||||
makeFvsPatchTypeField(fvsPatchScalarField, type##FvsPatchScalarField); \
|
||||
makeFvsPatchTypeField(fvsPatchVectorField, type##FvsPatchVectorField); \
|
||||
makeFvsPatchTypeField \
|
||||
( \
|
||||
fvsPatchSphericalTensorField, \
|
||||
type##FvsPatchSphericalTensorField \
|
||||
); \
|
||||
makeFvsPatchTypeField(fvsPatchSymmTensorField, type##FvsPatchSymmTensorField); \
|
||||
makeFvsPatchTypeField(fvsPatchTensorField, type##FvsPatchTensorField);
|
||||
|
||||
|
||||
#define makeFvsPatchTypeFieldTypedefs(type) \
|
||||
\
|
||||
typedef type##FvsPatchField<scalar> type##FvsPatchScalarField; \
|
||||
typedef type##FvsPatchField<vector> type##FvsPatchVectorField; \
|
||||
typedef type##FvsPatchField<sphericalTensor> \
|
||||
type##FvsPatchSphericalTensorField; \
|
||||
typedef type##FvsPatchField<symmTensor> type##FvsPatchSymmTensorField; \
|
||||
typedef type##FvsPatchField<tensor> type##FvsPatchTensorField;
|
||||
|
||||
#include "fvsPatchFieldMacros.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -0,0 +1,143 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Macros for creating fvsPatchField types.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_fvsPatchFieldMacros_H
|
||||
#define Foam_fvsPatchFieldMacros_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
#include "fvsPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Runtime selection macros
|
||||
|
||||
#define addToFvsPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)\
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patch \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
patchMapper \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
PatchTypeField, \
|
||||
typePatchTypeField, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// For non-templated (or typedef) patch fields.
|
||||
//- Define a concrete fvsPatchField type and add to run-time tables
|
||||
//- Example, (fvsPatchScalarField, calculatedFvsPatchScalarField)
|
||||
#define makeFvsPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||
\
|
||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||
addToFvsPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField);
|
||||
|
||||
|
||||
//- Define a fvsPatchField type for a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define makeFvsPatchFieldTypeName(fieldType, bcType) \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
CAT4(bcType, FvsPatch, CAPITALIZE(fieldType), Field), \
|
||||
0 \
|
||||
);
|
||||
|
||||
//- Add runTime selection for fvsPatchField type of a specific field type
|
||||
//- Example, (scalar, calculated)
|
||||
#define addFvsPatchFieldTypeRunTime(fieldType, bcType) \
|
||||
addToFvsPatchFieldRunTimeSelection \
|
||||
( \
|
||||
CAT3(fvsPatch, CAPITALIZE(fieldType), Field), \
|
||||
CAT4(bcType, FvsPatch, CAPITALIZE(fieldType), Field) \
|
||||
);
|
||||
|
||||
// For templated patch fields
|
||||
#define makeFvsPatchFieldType(fieldType, bcType) \
|
||||
makeFvsPatchFieldTypeName(fieldType, bcType) \
|
||||
addFvsPatchFieldTypeRunTime(fieldType, bcType)
|
||||
|
||||
//- Declare a typedef for a fvsPatchField. Example, (scalar, calculated)
|
||||
#define makeFvsPatchFieldTypedef(fieldType, bcType) \
|
||||
typedef \
|
||||
bcType##FvsPatchField<fieldType> \
|
||||
CAT4(bcType, FvsPatch, CAPITALIZE(fieldType), Field);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- For all standard field types:
|
||||
//- define a fvsPatchField type and add to run-time tables
|
||||
#define makeFvsPatchFields(bcType) \
|
||||
\
|
||||
makeFvsPatchFieldType(scalar, bcType); \
|
||||
makeFvsPatchFieldType(vector, bcType); \
|
||||
makeFvsPatchFieldType(sphericalTensor, bcType); \
|
||||
makeFvsPatchFieldType(symmTensor, bcType); \
|
||||
makeFvsPatchFieldType(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define a fvsPatchField type
|
||||
//- Example, (calculated)
|
||||
#define makeFvsPatchFieldsTypeName(bcType) \
|
||||
\
|
||||
makeFvsPatchFieldTypeName(scalar, bcType); \
|
||||
makeFvsPatchFieldTypeName(vector, bcType); \
|
||||
makeFvsPatchFieldTypeName(sphericalTensor, bcType); \
|
||||
makeFvsPatchFieldTypeName(symmTensor, bcType); \
|
||||
makeFvsPatchFieldTypeName(tensor, bcType);
|
||||
|
||||
|
||||
//- For all standard field types: define typedefs for the fvsPatchField
|
||||
//- Example, (calculated)
|
||||
#define makeFvsPatchTypeFieldTypedefs(bcType) \
|
||||
\
|
||||
makeFvsPatchFieldTypedef(scalar, bcType); \
|
||||
makeFvsPatchFieldTypedef(vector, bcType); \
|
||||
makeFvsPatchFieldTypedef(sphericalTensor, bcType); \
|
||||
makeFvsPatchFieldTypedef(symmTensor, bcType); \
|
||||
makeFvsPatchFieldTypedef(tensor, bcType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -27,26 +27,21 @@ License
|
||||
|
||||
#include "fvsPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
#define makeFvsPatchField(PatchTypeField) \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
#define makeFvsPatchField(fvsPatchTypeField) \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, dictionary);
|
||||
|
||||
makeFvsPatchField(fvsPatchScalarField)
|
||||
makeFvsPatchField(fvsPatchVectorField)
|
||||
makeFvsPatchField(fvsPatchSphericalTensorField)
|
||||
makeFvsPatchField(fvsPatchSymmTensorField)
|
||||
makeFvsPatchField(fvsPatchTensorField)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
makeFvsPatchField(fvsPatchScalarField);
|
||||
makeFvsPatchField(fvsPatchVectorField);
|
||||
makeFvsPatchField(fvsPatchSphericalTensorField);
|
||||
makeFvsPatchField(fvsPatchSymmTensorField);
|
||||
makeFvsPatchField(fvsPatchTensorField);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user