57 Info<<
"Patch " <<
name() <<
" calculated average normal " 65 if (
magSqr(n_ - nf[facei]) > SMALL)
70 <<
"Wedge patch '" <<
name() <<
"' is not planar." <<
nl 71 <<
"At local face at " 73 <<
" the normal " << nf[facei]
74 <<
" differs from the average normal " << n_
75 <<
" by " <<
magSqr(n_ - nf[facei]) <<
nl 76 <<
"Either correct the patch or split it into planar parts" 88 centreNormal_ /=
mag(centreNormal_);
90 cosAngle_ = centreNormal_ & n_;
92 const scalar cnCmptSum =
93 centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
95 if (
mag(cnCmptSum) < (1 - SMALL))
99 <<
" centre plane does not align with a coordinate plane by " 100 << 1 -
mag(cnCmptSum)
104 axis_ = centreNormal_ ^ n_;
105 scalar magAxis =
mag(axis_);
110 <<
"wedge " <<
name()
111 <<
" plane aligns with a coordinate plane." <<
nl 112 <<
" The wedge plane should make a small angle (~2.5deg)" 113 " with the coordinate plane" <<
nl 114 <<
" and the the pair of wedge planes should be symmetric" 115 <<
" about the coordinate plane." <<
nl 116 <<
" Normal of wedge plane is " << n_
117 <<
" , implied coordinate plane direction is " << centreNormal_
124 cellT_ = faceT_ & faceT_;
138 const word& patchType
141 polyPatch(name, size, start, index, bm, patchType),
157 const word& patchType
160 polyPatch(name, dict, index, bm, patchType),
178 centreNormal_(pp.centreNormal_),
180 cosAngle_(pp.cosAngle_),
195 polyPatch(pp, bm, index, newSize, newStart),
197 centreNormal_(pp.centreNormal_),
199 cosAngle_(pp.cosAngle_),
214 polyPatch(pp, bm, index, mapAddressing, newStart),
216 centreNormal_(pp.centreNormal_),
218 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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const Vector< scalar > rootMax
Vector< scalar > vector
A scalar version of the templated Vector.
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.
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)
const Field< PointType > & faceCentres() const
Return face centres for patch.
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.
#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.