Go to the documentation of this file.
54 const short next = (eI+1) %
f_.
size();
58 const vector prod = (ev ^ evn);
60 if( (prod &
n) < -SMALL )
62 if( concaveVrt != -1 )
66 "label faceDecomposition::concaveVertex(const label faceI) const"
67 ) <<
"Face " <<
f_ <<
" has more than one concave vertex."
71 label vrtIndex = edges[eI].commonVertex(edges[next]);
78 concaveVrt = vrtIndex;
121 # ifdef DEBUG_faceDecomposition
122 Info <<
"Face is not planar " <<
endl;
222 if( storage.
size() > 2 )
225 # ifdef DEBUG_faceDecomposition
229 Info <<
"Storage " << storage <<
endl;
252 for(
short eI=1;eI<edg.
size()-1;eI++)
254 const short i = (eI+start) %
f_.
size();
257 add[1] = edg[i].start();
258 add[2] = edg[i].end();
265 # ifdef DEBUG_faceDecomposition
266 Info <<
"face " << faceNo <<
" " <<
f_
267 <<
" is decomposed into " << fcs <<
endl;
bool isFacePlanar() const
check if the face is planar
vector normal(const pointField &) const
Vector normal; magnitude is equal to area of face.
~faceDecomposition()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
faceList decomposeFaceIntoTriangles() const
decompose face into triangles
T & newElmt(const label)
Return subscript-checked element of UList.
point centre(const pointField &) const
Centre point of face.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool isFaceConvex() const
check if the face is convex
dimensioned< scalar > mag(const dimensioned< Type > &)
faceList decomposeFace() const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
faceDecomposition(const faceDecomposition &)
copy constructor
face mergeTwoFaces(const faceType1 &f1, const faceType2 &f2)
returns a merged face
edgeList edges() const
Return edges in face point ordering,.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
label concaveVertex() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const pointField & points_
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.