Go to the documentation of this file.
60 Info<<
"Patch " <<
name() <<
" calculated average normal "
68 if (
magSqr(n_ - nf[facei]) > SMALL)
73 <<
"Wedge patch '" <<
name() <<
"' is not planar." <<
nl
74 <<
"At local face at "
76 <<
" the normal " << nf[facei]
77 <<
" differs from the average normal " << n_
78 <<
" by " <<
magSqr(n_ - nf[facei]) <<
nl
79 <<
"Either correct the patch or split it into planar parts"
93 cosAngle_ = centreNormal_ & n_;
95 const scalar cnCmptSum =
96 centreNormal_.
x() + centreNormal_.
y() + centreNormal_.
z();
98 if (
mag(cnCmptSum) < (1 - SMALL))
101 <<
"wedge " <<
name()
102 <<
" centre plane does not align with a coordinate plane by "
103 << 1 -
mag(cnCmptSum)
107 axis_ = centreNormal_ ^ n_;
108 scalar magAxis =
mag(axis_);
113 <<
"wedge " <<
name()
114 <<
" plane aligns with a coordinate plane." <<
nl
115 <<
" The wedge plane should make a small angle (~2.5deg)"
116 " with the coordinate plane" <<
nl
117 <<
" and the pair of wedge planes should be symmetric"
118 <<
" about the coordinate plane." <<
nl
119 <<
" Normal of wedge plane is " << n_
120 <<
" , implied coordinate plane direction is " << centreNormal_
127 cellT_ = faceT_ & faceT_;
141 const word& patchType
160 const word& patchType
181 centreNormal_(pp.centreNormal_),
183 cosAngle_(pp.cosAngle_),
198 polyPatch(pp, bm, index, newSize, newStart),
200 centreNormal_(pp.centreNormal_),
202 cosAngle_(pp.cosAngle_),
217 polyPatch(pp, bm, index, mapAddressing, newStart),
219 centreNormal_(pp.centreNormal_),
221 cosAngle_(pp.cosAngle_),
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
static const Vector< scalar > rootMax
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
const Cmpt & x() const
Access to the vector x component.
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Wedge front and back plane patch.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
static constexpr const zero Zero
Global zero (0)
Type gAverage(const FieldField< Field, Type > &f)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< Cmpt > & normalise()
Normalise the vector by its magnitude.
dimensionedScalar sign(const dimensionedScalar &ds)
const Cmpt & z() const
Access to the vector z component.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
messageStream Info
Information stream (stdout output on master, null elsewhere)
A patch is a list of labels that address the faces in the global face list.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const Cmpt & y() const
Access to the vector y component.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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 INVALID.
const word & name() const noexcept
The patch name.
wedgePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
const Field< point_type > & faceCentres() const
Return face centres for patch.