Commit 5e4c5c94 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: macros for non-templated boundary conditions

parent f729c75b
......@@ -501,80 +501,85 @@ const pointPatchField<Type>& operator+
#define makePointPatchTypeFieldTypeName(type) \
\
defineNamedTemplateTypeNameAndDebug(type, 0);
defineNamedTemplateTypeNameAndDebug(type, 0);
#define makePointPatchFieldsTypeName(type) \
\
makePointPatchTypeFieldTypeName(type##PointPatchScalarField); \
makePointPatchTypeFieldTypeName(type##PointPatchVectorField); \
makePointPatchTypeFieldTypeName(type##PointPatchSphericalTensorField); \
makePointPatchTypeFieldTypeName(type##PointPatchSymmTensorField); \
makePointPatchTypeFieldTypeName(type##PointPatchTensorField);
makePointPatchTypeFieldTypeName(type##PointPatchScalarField); \
makePointPatchTypeFieldTypeName(type##PointPatchVectorField); \
makePointPatchTypeFieldTypeName(type##PointPatchSphericalTensorField); \
makePointPatchTypeFieldTypeName(type##PointPatchSymmTensorField); \
makePointPatchTypeFieldTypeName(type##PointPatchTensorField);
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
\
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
\
addToRunTimeSelectionTable \
( \
PatchTypeField, typePatchTypeField, pointPatch \
); \
\
addToRunTimeSelectionTable \
( \
PatchTypeField, \
typePatchTypeField, \
patchMapper \
); \
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
\
addToRunTimeSelectionTable \
( \
PatchTypeField, typePatchTypeField, dictionary \
);
addToRunTimeSelectionTable \
( \
PatchTypeField, \
typePatchTypeField, \
pointPatch \
); \
addToRunTimeSelectionTable \
( \
PatchTypeField, \
typePatchTypeField, \
patchMapper \
); \
addToRunTimeSelectionTable \
( \
PatchTypeField, \
typePatchTypeField, \
dictionary \
);
// for non-templated patch fields
#define makeNonTemplatedPointPatchTypeField(PatchTypeField,typePatchTypeField)\
defineTypeNameAndDebug(typePatchTypeField, 0); \
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
// for templated patch fields
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
#define makePointPatchFields(type) \
\
makePointPatchTypeField \
( \
pointPatchScalarField, \
type##PointPatchScalarField \
); \
\
makePointPatchTypeField \
( \
pointPatchVectorField, \
type##PointPatchVectorField \
); \
\
makePointPatchTypeField \
( \
pointPatchSphericalTensorField, \
type##PointPatchSphericalTensorField \
); \
\
makePointPatchTypeField \
( \
pointPatchSymmTensorField, \
type##PointPatchSymmTensorField \
); \
\
makePointPatchTypeField \
( \
pointPatchTensorField, \
type##PointPatchTensorField \
makePointPatchTypeField \
( \
pointPatchScalarField, \
type##PointPatchScalarField \
); \
makePointPatchTypeField \
( \
pointPatchVectorField, \
type##PointPatchVectorField \
); \
makePointPatchTypeField \
( \
pointPatchSphericalTensorField, \
type##PointPatchSphericalTensorField \
); \
makePointPatchTypeField \
( \
pointPatchSymmTensorField, \
type##PointPatchSymmTensorField \
); \
makePointPatchTypeField \
( \
pointPatchTensorField, \
type##PointPatchTensorField \
);
#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;
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;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -164,7 +164,7 @@ void Foam::SRFVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
SRFVelocityFvPatchVectorField
......
......@@ -310,11 +310,12 @@ void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
activeBaffleVelocityFvPatchVectorField
);
}
// ************************************************************************* //
......@@ -145,7 +145,7 @@ void Foam::buoyantPressureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
buoyantPressureFvPatchScalarField
......
......@@ -162,7 +162,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
cylindricalInletVelocityFvPatchVectorField
......
......@@ -264,7 +264,7 @@ void Foam::directMappedVelocityFluxFixedValueFvPatchField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
directMappedVelocityFluxFixedValueFvPatchField
......
......@@ -172,7 +172,7 @@ void Foam::fixedFluxPressureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
fixedFluxPressureFvPatchScalarField
......
......@@ -137,7 +137,7 @@ void Foam::fixedPressureCompressibleDensityFvPatchScalarField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
fixedPressureCompressibleDensityFvPatchScalarField
......
......@@ -168,7 +168,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
flowRateInletVelocityFvPatchVectorField
......
......@@ -152,7 +152,7 @@ void Foam::fluxCorrectedVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
fluxCorrectedVelocityFvPatchVectorField
......
......@@ -144,7 +144,7 @@ void Foam::freestreamPressureFvPatchScalarField::updateCoeffs()
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
freestreamPressureFvPatchScalarField
......
......@@ -203,7 +203,7 @@ const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
inletOutletTotalTemperatureFvPatchScalarField
......
......@@ -146,7 +146,7 @@ void Foam::movingWallVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
movingWallVelocityFvPatchVectorField
......
......@@ -218,7 +218,7 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureDirectedInletOutletVelocityFvPatchVectorField
......
......@@ -204,7 +204,7 @@ void Foam::pressureDirectedInletVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureDirectedInletVelocityFvPatchVectorField
......
......@@ -213,7 +213,7 @@ void Foam::pressureInletOutletVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureInletOutletVelocityFvPatchVectorField
......
......@@ -117,7 +117,7 @@ void Foam::pressureInletUniformVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureInletUniformVelocityFvPatchVectorField
......
......@@ -166,7 +166,7 @@ void Foam::pressureInletVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureInletVelocityFvPatchVectorField
......
......@@ -187,7 +187,7 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::operator=
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
pressureNormalInletOutletVelocityFvPatchVectorField
......
......@@ -134,7 +134,7 @@ void Foam::rotatingPressureInletOutletVelocityFvPatchVectorField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
rotatingPressureInletOutletVelocityFvPatchVectorField
......
......@@ -124,7 +124,7 @@ void Foam::rotatingTotalPressureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
rotatingTotalPressureFvPatchScalarField
......
......@@ -140,7 +140,7 @@ void Foam::rotatingWallVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
rotatingWallVelocityFvPatchVectorField
......
......@@ -305,7 +305,7 @@ void Foam::supersonicFreestreamFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
supersonicFreestreamFvPatchVectorField
......
......@@ -134,7 +134,7 @@ void Foam::surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
surfaceNormalFixedValueFvPatchVectorField
......
......@@ -189,7 +189,7 @@ void Foam::swirlFlowRateInletVelocityFvPatchVectorField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
swirlFlowRateInletVelocityFvPatchVectorField
......
......@@ -247,7 +247,7 @@ void Foam::syringePressureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
syringePressureFvPatchScalarField
......
......@@ -121,7 +121,7 @@ write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
timeVaryingFlowRateInletVelocityFvPatchVectorField
......
......@@ -232,7 +232,7 @@ write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
timeVaryingUniformTotalPressureFvPatchScalarField
......
......@@ -241,7 +241,7 @@ void Foam::totalPressureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
totalPressureFvPatchScalarField
......
......@@ -190,7 +190,7 @@ void Foam::totalTemperatureFvPatchScalarField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
totalTemperatureFvPatchScalarField
......
......@@ -124,7 +124,7 @@ void Foam::translatingWallVelocityFvPatchVectorField::write(Ostream& os) const
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchVectorField,
translatingWallVelocityFvPatchVectorField
......
......@@ -147,7 +147,7 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
turbulentIntensityKineticEnergyInletFvPatchScalarField
......
......@@ -155,7 +155,7 @@ void Foam::uniformDensityHydrostaticPressureFvPatchScalarField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
uniformDensityHydrostaticPressureFvPatchScalarField
......
......@@ -196,7 +196,7 @@ void angularOscillatingDisplacementPointPatchVectorField::write
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
pointPatchVectorField,
angularOscillatingDisplacementPointPatchVectorField
......
......@@ -201,7 +201,7 @@ void angularOscillatingVelocityPointPatchVectorField::write
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
pointPatchVectorField,
angularOscillatingVelocityPointPatchVectorField
......
......@@ -127,7 +127,7 @@ void oscillatingDisplacementPointPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
pointPatchVectorField,
oscillatingDisplacementPointPatchVectorField
......
......@@ -171,7 +171,7 @@ void oscillatingVelocityPointPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
pointPatchVectorField,
oscillatingVelocityPointPatchVectorField
......
......@@ -499,7 +499,7 @@ void surfaceDisplacementPointPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
fixedValuePointPatchVectorField,
surfaceDisplacementPointPatchVectorField
......
......@@ -448,7 +448,7 @@ void surfaceSlipDisplacementPointPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField
makeNonTemplatedPointPatchTypeField
(
pointPatchVectorField,
surfaceSlipDisplacementPointPatchVectorField
......
......@@ -268,7 +268,7 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchTypeField