Go to the documentation of this file.
33 #include "triSurface.H"
175 # pragma omp parallel for schedule(dynamic, 100)
179 const point&
p = pts[pointI];
184 # pragma omp critical
189 "void triSurf::topologyCheck()"
190 ) <<
"Point " << pointI <<
" has invalid coordinates "
199 # pragma omp parallel for schedule(dynamic, 100)
207 if( ltri[pI] < 0 || (ltri[pI] >= pts.size()) )
210 # pragma omp critical
214 "void triSurf::topologyCheck()"
215 ) <<
"Point " << ltri[pI] <<
" in triangle " << ltri
219 if( ltri[pI] == ltri[(pI+1)%3] || ltri[pI] == ltri[(pI+2)%3] )
222 # pragma omp critical
226 "void triSurf::topologyCheck()"
227 ) <<
"Triangle " << ltri <<
" has duplicated points. "
228 <<
"This may cause problems in the meshing process!" <<
endl;
237 # pragma omp parallel for schedule(dynamic, 100)
245 if( fe[pI] < 0 || (fe[pI] >= pts.size()) )
248 # pragma omp critical
252 "void triSurf::topologyCheck()"
253 ) <<
"Feature edge " << fe <<
" point " << fe[pI]
261 # pragma omp critical
265 "void triSurf::topologyCheck()"
266 ) <<
"Feature edge " << fe <<
" has duplicated points. "
267 <<
"This may cause problems in the meshing process!" <<
endl;
281 const label elI = elmts[elmtI];
283 if( elI < 0 || elI >= pts.size() )
286 # pragma omp critical
290 "void triSurf::topologyCheck()"
291 ) <<
"Point " << elI <<
" in point subset "
308 const label elI = elmts[elmtI];
310 if( elI < 0 || elI >= trias.
size() )
313 # pragma omp critical
317 "void triSurf::topologyCheck()"
318 ) <<
"Triangle " << elI <<
" in facet subset "
335 const label elI = elmts[elmtI];
340 # pragma omp critical
344 "void triSurf::topologyCheck()"
345 ) <<
"Feature edge " << elI <<
" in edge subset "
403 if( fName.
ext() ==
"fms" || fName.
ext() ==
"FMS" )
407 else if( fName.
ext() ==
"ftr" || fName.
ext() ==
"FTR" )
432 if( fName.
ext() ==
"fms" || fName.
ext() ==
"FMS" )
436 else if( fName.
ext() ==
"ftr" || fName.
ext() ==
"FTR" )
448 newTrias[tI] =
facets[tI];
451 newSurf.
write(fName);
void pointsInSubset(const label, ListType &) const
const Field< PointType > & points() const
Return reference to global points.
word pointSubsetName(const label) const
A class for handling file names.
LongList< labelledTri > triangles_
list of triangles
geometricSurfacePatchList patches_
list of boundary patches and their properties
bool isnan(const ListType &)
check if a list has nan entries
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
const pointField & points() const
access to points
void edgesInSubset(const label, ListType &) const
void readSurface(const fileName &)
read and write the surface
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void writeToFMS(const fileName &) const
A HashTable to objects of type <T> with a label key.
void readFromFTR(const fileName &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label size() const
Size of the active part of the list.
const geometricSurfacePatchList & patches() const
const edgeLongList & featureEdges() const
access to feature edges
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool isinf(const ListType &)
check if a list has inf entries
label end() const
Return end vertex label.
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.
Triangulated surface description with patch information.
const geometricSurfacePatchList & patches() const
access to patches
void writeToFTR(const fileName &) const
word ext() const
Return file name extension (part after last .)
Map< meshSubset > pointSubsets_
map of point subsets
Map< meshSubset > featureEdgeSubsets_
map of edge subsets
void pointSubsetIndices(DynList< label > &) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setSize(const label)
Reset size of List.
label start() const
Return start vertex label.
void edgeSubsetIndices(DynList< label > &) const
void facetSubsetIndices(DynList< label > &) const
label size() const
return the number of triangles
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Map< meshSubset > facetSubsets_
map of point subsets
triSurf()
Default construct.
Triangle with additional region number.
void writeSurface(const fileName &) const
const LongList< labelledTri > & facets() const
access to facets
word facetSubsetName(const label) const
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
void facetsInSubset(const label, ListType &) const
void size(const label)
Override size to be inconsistent with allocated storage.
word edgeSubsetName(const label) const
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
void readFromFMS(const fileName &)
edgeLongList featureEdges_
list of feature edges
void clear()
Clear the list, i.e. set next free to zero.
pointField points_
list of vertices