58 Info<<
"Patch " <<
name() <<
" calculated average normal " 66 if (
magSqr(n_ - nf[facei]) > small)
71 <<
"Wedge patch '" <<
name() <<
"' is not planar." <<
nl 72 <<
"At local face at " 74 <<
" the normal " << nf[facei]
75 <<
" differs from the average normal " << n_
76 <<
" by " <<
magSqr(n_ - nf[facei]) <<
nl 77 <<
"Either correct the patch or split it into planar parts" 89 centreNormal_ /=
mag(centreNormal_);
91 cosAngle_ = centreNormal_ & n_;
93 const scalar cnCmptSum =
94 centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
96 if (
mag(cnCmptSum) < (1 - small))
100 <<
" centre plane does not align with a coordinate plane by " 101 << 1 -
mag(cnCmptSum)
105 axis_ = centreNormal_ ^ n_;
106 scalar magAxis =
mag(axis_);
111 <<
"wedge " <<
name()
112 <<
" plane aligns with a coordinate plane." <<
nl 113 <<
" The wedge plane should make a small angle (~2.5deg)" 114 " with the coordinate plane" <<
nl 115 <<
" and the pair of wedge planes should be symmetric" 116 <<
" about the coordinate plane." <<
nl 117 <<
" Normal of wedge plane is " << n_
118 <<
" , implied coordinate plane direction is " << centreNormal_
125 cellT_ = faceT_ & faceT_;
139 const word& patchType
142 polyPatch(name, size, start, index, bm, patchType),
158 const word& patchType
161 polyPatch(name, dict, index, bm, patchType),
179 centreNormal_(pp.centreNormal_),
181 cosAngle_(pp.cosAngle_),
196 polyPatch(pp, bm, index, newSize, newStart),
198 centreNormal_(pp.centreNormal_),
200 cosAngle_(pp.cosAngle_),
215 polyPatch(pp, bm, index, mapAddressing, newStart),
217 centreNormal_(pp.centreNormal_),
219 cosAngle_(pp.cosAngle_),
dimensionedScalar sign(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Field< PointType > & faceCentres() const
Return face centres for patch.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from unit vector n1 to n2.
Macros for easy insertion into run-time selection tables.
A class for handling words, derived from string.
wedgePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Wedge front and back plane patch.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
word name(const complex &)
Return a string representation of a complex.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
static const Vector< scalar > rootMax
#define WarningInFunction
Report a warning using Foam::Warning.
Type gAverage(const FieldField< Field, Type > &f)
dimensioned< scalar > mag(const dimensioned< Type > &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A patch is a list of labels that address the faces in the global face list.