Go to the documentation of this file.
31 #include "primitiveMesh.H"
55 Info <<
"Finding new vertices" <<
endl;
60 newVertexLabel_.setSize(
points.size());
63 vertexDistance_.setSize(
points.size());
65 vertexTypes_.setSize(
points.size());
77 vertexDistance_[pI] = ((
p - rp) &
n);
79 if( vertexDistance_[pI] > tol_ )
82 newVertexLabel_[pI] = origNumVertices_++;
83 vertexTypes_[pI] |= KEEP;
85 else if( vertexDistance_[pI] >= -tol_ )
88 newVertexLabel_[pI] = origNumVertices_++;
89 vertexTypes_[pI] |= INPLANE;
90 vertexDistance_[pI] = 0.0;
95 Info <<
"tolerance " << tol_ <<
endl;
96 Info <<
"New number of vertices is " << origNumVertices_ <<
endl;
98 Info <<
"Original vertex " << pI <<
" is " <<
points[pI]
99 <<
". Vertex distance from plane is " << vertexDistance_[pI]
100 <<
" and its new label is " << newVertexLabel_[pI] <<
endl;
103 if( origNumVertices_ <
points.size() )
121 newLabelForPoint = -1;
126 if( newLabelForPoint[pI] != -1 )
continue;
131 Info <<
"Vertices " << pI <<
" and " << pJ
132 <<
" are too close" <<
endl;
135 newLabelForPoint[pJ] = pI;
146 if( newLabelForPoint[
e.start()] != -1 )
147 e.start() = newLabelForPoint[
e.start()];
148 if( newLabelForPoint[
e.end()] != -1 )
149 e.end() = newLabelForPoint[
e.end()];
158 if( edges[eI].start() != edges[eI].end() )
const vector & normal() const
Return plane normal.
#define forAll(list, i)
Loop across all elements in list.
DynList< DynList< label, 8 >, 64 > * facesPtr_
Template functions to aid in the implementation of demand driven data.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
DynList< edge, 128 > * edgesPtr_
const DynList< point, 64 > & points() const
return the vertices of the feasible region
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
void removeCoincidentVertices()
remove coincident vertices to improve tie breaking
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
DynList< DynList< label, 8 >, 64 > * cFacesPtr_
DynList< label, 128 > newEdgeLabel_
const double e
Elementary charge.
DynList< edge, 128 > * cEdgesPtr_
bool findNewVertices(const plane &plane)
void setSize(const label)
Reset size of List.
const point & refPoint() const
Return or return plane base point.
DynList< point, 64 > * pointsPtr_
void append(const T &e)
Append an element at the end of the list.