diff --git a/src/OpenFOAM/fields/GeometricFields/pointFields/pointFields.C b/src/OpenFOAM/fields/GeometricFields/pointFields/pointFields.C index 01e4fb91b2..690068f82a 100644 --- a/src/OpenFOAM/fields/GeometricFields/pointFields/pointFields.C +++ b/src/OpenFOAM/fields/GeometricFields/pointFields/pointFields.C @@ -57,6 +57,7 @@ defineTemplateTypeNameAndDebug(pointTensorField, 0); const Foam::wordList Foam::fieldTypes::point ({ + "pointLabelField", "pointScalarField", "pointVectorField", "pointSphericalTensorField", diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C index 6ec8dce45e..6018cc816f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C @@ -28,7 +28,6 @@ License #include "wedgePointPatchField.H" #include "transformField.H" - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -101,12 +100,18 @@ Foam::wedgePointPatchField::wedgePointPatchField template void Foam::wedgePointPatchField::evaluate(const Pstream::commsTypes) { + // label, scalar, sphericalTensor are rotationally invariant + if (pTraits::rank == 0 || std::is_same::value) + { + return; + } + // In order to ensure that the wedge patch is always flat, take the // normal vector from the first point - const vector& nHat = this->patch().pointNormals()[0]; - tmp> tvalues = - transform(I - nHat*nHat, this->patchInternalField()); + symmTensor rot(I - sqr(this->patch().pointNormals()[0])); + + tmp> tvalues = transform(rot, this->patchInternalField()); // Get internal field to insert values into Field& iF = const_cast&>(this->primitiveField()); diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.C index 3c095c616a..050f3b2f8f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -29,17 +30,13 @@ License #include "pointPatchFields.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + makePointPatchFields(wedge); + makePointPatchFieldType(label, wedge); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makePointPatchFields(wedge); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam // ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.H index 7ae6e7b40a..e2814dd04c 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchFields.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,11 +26,10 @@ License \*---------------------------------------------------------------------------*/ -#ifndef wedgePointPatchFields_H -#define wedgePointPatchFields_H +#ifndef Foam_wedgePointPatchFields_H +#define Foam_wedgePointPatchFields_H #include "wedgePointPatchField.H" -#include "fieldTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -39,6 +39,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePointPatchFieldTypedefs(wedge); +makePointPatchFieldTypedef(label, wedge); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.C index bdfc682294..5156eda1b1 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -29,17 +30,12 @@ License #include "pointPatchFields.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makePointPatchFields(slip); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makePointPatchFields(slip); + makePointPatchFieldType(label, slip); +} // ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.H b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.H index f037d147e4..89443155c2 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchFields.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,11 +26,10 @@ License \*---------------------------------------------------------------------------*/ -#ifndef slipPointPatchFields_H -#define slipPointPatchFields_H +#ifndef Foam_slipPointPatchFields_H +#define Foam_slipPointPatchFields_H #include "slipPointPatchField.H" -#include "fieldTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -39,6 +39,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePointPatchFieldTypedefs(slip); +makePointPatchFieldTypedef(label, slip); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //