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"
91 centreNormal_.normalise();
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
146 centreNormal_(
vector::rootMax),
160 const word& patchType
165 centreNormal_(
vector::rootMax),
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_),
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const Field< point_type > & faceNormals() const
Return face unit normals for patch.
const Field< point_type > & faceCentres() const
Return face centres for patch.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void calcGeometry()
Calculate the geometry for the patches.
static const complex rootMax
complex (ROOTVGREAT, ROOTVGREAT)
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
A patch is a list of labels that address the faces in the global face list.
Wedge front and back plane patch.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sign(const dimensionedScalar &ds)
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Type gAverage(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.