57 n_ =
gSum(areas).normalise(ROOTVSMALL);
61 Info<<
"Patch " <<
name() <<
" calculated average normal "
69 const scalar a =
mag(areas[facei]);
74 const vector nf(areas[facei]/a);
76 if (
magSqr(n_ - nf) > SMALL)
79 <<
"Symmetry plane '" <<
name()
80 <<
"' is not planar." <<
endl
81 <<
"At local face at "
83 <<
" the normal " << nf
84 <<
" differs from the average normal " << n_
86 <<
"Either split the patch into planar parts"
87 <<
" or use the " << symmetryPolyPatch::typeName
107 const word& patchType
121 const word& patchType
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const Field< point_type > & faceCentres() const
Buffers for inter-processor communications streams (UOPstream, UIPstream).
label size() const noexcept
static const Form rootMax
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
A patch is a list of labels that address the faces in the global face list.
const vectorField::subField faceAreas() const
Return face normals.
friend class polyBoundaryMesh
polyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
label start() const noexcept
Return start label of this patch in the polyMesh face list.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
symmetryPlanePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Namespace for handling debugging switches.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
Type gSum(const FieldField< Field, Type > &f)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.