STYLE: foamyHexMesh: Do not output point insertion failure to screen by default.

- Write some comments
This commit is contained in:
laurence
2013-07-30 12:55:55 +01:00
parent 056246c95f
commit 1269eb2e97
2 changed files with 70 additions and 48 deletions

View File

@ -219,7 +219,7 @@ void Foam::DelaunayMesh<Triangulation>::insertPoints(const List<Vb>& vertices)
( (
vertices.begin(), vertices.begin(),
vertices.end(), vertices.end(),
true false
); );
} }

View File

@ -90,6 +90,7 @@ public:
FixedList<label, 2>::Hash<> FixedList<label, 2>::Hash<>
> labelTolabelPairHashTable; > labelTolabelPairHashTable;
private: private:
// Private data // Private data
@ -184,62 +185,83 @@ public:
// Member Functions // Member Functions
inline const Time& time() const; // Access
inline void timeCheck //- Return a reference to the Time object
( inline const Time& time() const;
const string& description,
const bool check = true
) const;
inline label getNewVertexIndex() const;
inline label getNewCellIndex() const;
inline label cellCount() const;
inline void resetCellCount();
inline label vertexCount() const;
inline void resetVertexCount();
//- Remove the entire triangulation // Check
void reset();
void insertPoints(const List<Vb>& vertices); //- Write the cpuTime to screen
inline void timeCheck
//- Function inserting points into a triangulation and setting the (
// index and type data of the point in the correct order. This is const string& description,
// faster than inserting points individually. const bool check = true
// ) const;
// Adapted from a post on the CGAL lists: 2010-01/msg00004.html by
// Sebastien Loriot (Geometry Factory).
template<class PointIterator>
void rangeInsertWithInfo
(
PointIterator begin,
PointIterator end,
bool printErrors = true
);
// Queries // Indexing functions
void printInfo(Ostream& os) const; //- Create a new unique cell index and return
inline label getNewCellIndex() const;
void printVertexInfo(Ostream& os) const; //- Create a new unique vertex index and return
inline label getNewVertexIndex() const;
//- Create an fvMesh from the triangulation. //- Return the cell count (the next unique cell index)
// The mesh is not parallel consistent - only used for viewing inline label cellCount() const;
autoPtr<polyMesh> createMesh
( //- Return the vertex count (the next unique vertex index)
const fileName& name, inline label vertexCount() const;
labelTolabelPairHashTable& vertexMap,
labelList& cellMap, //- Set the cell count to zero
const bool writeDelaunayData = true inline void resetCellCount();
) const;
//- Set the vertex count to zero
inline void resetVertexCount();
// Triangulation manipulation functions
//- Clear the entire triangulation
void reset();
//- Insert the list of vertices (calls rangeInsertWithInfo)
void insertPoints(const List<Vb>& vertices);
//- Function inserting points into a triangulation and setting the
// index and type data of the point in the correct order. This is
// faster than inserting points individually.
//
// Adapted from a post on the CGAL lists: 2010-01/msg00004.html by
// Sebastien Loriot (Geometry Factory).
template<class PointIterator>
void rangeInsertWithInfo
(
PointIterator begin,
PointIterator end,
bool printErrors = false
);
// Write
//- Write mesh statistics to stream
void printInfo(Ostream& os) const;
//- Write vertex statistics in the form of a table to stream
void printVertexInfo(Ostream& os) const;
//- Create an fvMesh from the triangulation.
// The mesh is not parallel consistent - only used for viewing
autoPtr<polyMesh> createMesh
(
const fileName& name,
labelTolabelPairHashTable& vertexMap,
labelList& cellMap,
const bool writeDelaunayData = true
) const;
}; };