57 Info<<
"Patch " <<
name() <<
" calculated average normal " 65 if (
magSqr(n_ - nf[faceI]) > SMALL)
71 "wedgePolyPatch::calcGeometry(PstreamBuffers&)" 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" 91 centreNormal_ /=
mag(centreNormal_);
93 cosAngle_ = centreNormal_ & n_;
95 const scalar cnCmptSum =
96 centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
98 if (
mag(cnCmptSum) < (1 - SMALL))
100 FatalErrorIn(
"wedgePolyPatch::calcGeometry(PstreamBuffers&)")
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_);
112 FatalErrorIn(
"wedgePolyPatch::calcGeometry(PstreamBuffers&)")
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 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
144 polyPatch(name, size, start, index, bm, patchType),
160 const word& patchType
163 polyPatch(name, dict, index, bm, 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_),
Buffers for inter-processor communications streams (UOPstream, UIPstream).
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensioned< scalar > mag(const dimensioned< Type > &)
Wedge front and back plane patch.
word name(const complex &)
Return a string representation of a complex.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
A class for handling words, derived from string.
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)
dimensionedScalar sign(const dimensionedScalar &ds)
static const Vector rootMax
wedgePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A patch is a list of labels that address the faces in the global face list.
const Field< PointType > & faceCentres() const
Return face centres for patch.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Macros for easy insertion into run-time selection tables.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Type gAverage(const FieldField< Field, Type > &f)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
3D tensor transformation operations.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Vector< scalar > vector
A scalar version of the templated Vector.
tensor rotationTensor(const vector &n1, const vector &n2)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)