WIP ENH: base infrastructure for label point fields
This commit is contained in:
@ -57,6 +57,7 @@ defineTemplateTypeNameAndDebug(pointTensorField, 0);
|
||||
|
||||
const Foam::wordList Foam::fieldTypes::point
|
||||
({
|
||||
"pointLabelField",
|
||||
"pointScalarField",
|
||||
"pointVectorField",
|
||||
"pointSphericalTensorField",
|
||||
|
||||
@ -28,7 +28,6 @@ License
|
||||
#include "wedgePointPatchField.H"
|
||||
#include "transformField.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
@ -101,12 +100,18 @@ Foam::wedgePointPatchField<Type>::wedgePointPatchField
|
||||
template<class Type>
|
||||
void Foam::wedgePointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
// label, scalar, sphericalTensor are rotationally invariant
|
||||
if (pTraits<Type>::rank == 0 || std::is_same<sphericalTensor, Type>::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<Field<Type>> tvalues =
|
||||
transform(I - nHat*nHat, this->patchInternalField());
|
||||
symmTensor rot(I - sqr(this->patch().pointNormals()[0]));
|
||||
|
||||
tmp<Field<Type>> tvalues = transform(rot, this->patchInternalField());
|
||||
|
||||
// Get internal field to insert values into
|
||||
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user