49 if (axis_ != vector::rootMax)
61 Info<<
"Patch " <<
name() <<
" calculated average normal " 69 if (
magSqr(n_ - nf[facei]) > SMALL)
74 <<
"Wedge patch '" <<
name() <<
"' is not planar." <<
nl 75 <<
"At local face at " 77 <<
" the normal " << nf[facei]
78 <<
" differs from the average normal " << n_
79 <<
" by " <<
magSqr(n_ - nf[facei]) <<
nl 80 <<
"Either correct the patch or split it into planar parts" 92 centreNormal_.normalise();
94 cosAngle_ = centreNormal_ & n_;
96 const scalar cnCmptSum =
97 centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
99 if (
mag(cnCmptSum) < (1 - SMALL))
102 <<
"wedge " <<
name()
103 <<
" centre plane does not align with a coordinate plane by " 104 << 1 -
mag(cnCmptSum)
108 axis_ = centreNormal_ ^ n_;
109 scalar magAxis =
mag(axis_);
114 <<
"wedge " <<
name()
115 <<
" plane aligns with a coordinate plane." <<
nl 116 <<
" The wedge plane should make a small angle (~2.5deg)" 117 " with the coordinate plane" <<
nl 118 <<
" and the pair of wedge planes should be symmetric" 119 <<
" about the coordinate plane." <<
nl 120 <<
" Normal of wedge plane is " << n_
121 <<
" , implied coordinate plane direction is " << centreNormal_
128 cellT_ = faceT_ & faceT_;
141 const polyBoundaryMesh& bm,
142 const word& patchType
145 polyPatch(
name, size, start, index, bm, patchType),
147 centreNormal_(
vector::rootMax),
161 const word& patchType
166 centreNormal_(
vector::rootMax),
182 centreNormal_(
pp.centreNormal_),
184 cosAngle_(
pp.cosAngle_),
201 centreNormal_(
pp.centreNormal_),
203 cosAngle_(
pp.cosAngle_),
220 centreNormal_(
pp.centreNormal_),
222 cosAngle_(
pp.cosAngle_),
dimensionedScalar sign(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
const Field< point_type > & faceNormals() const
Return face unit normals for patch.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
wedgePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
const Field< point_type > & faceCentres() const
Return face centres for patch.
Wedge front and back plane patch.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const word & name() const noexcept
The patch name.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
#define WarningInFunction
Report a warning using Foam::Warning.
Type gAverage(const FieldField< Field, Type > &f)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
A patch is a list of labels that address the faces in the global face list.
bool returnReduceOr(const bool value, const label comm=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)