#include <meshConverter.hh>


Classes | |
| class | S |
| Scanner class for ConvertMeshQuads. More... | |
Public Member Functions | |
| ConvertMeshQuads (Mesh2 &m, const uint level) | |
| Constructor. | |
| virtual uint | ncell () const |
| Returns the number of cells in the mesh. | |
| virtual Scan2 * | scan () |
| Returns a scanner over the cells of the mesh. | |
| ~ConvertMeshQuads () | |
Protected Member Functions | |
| virtual std::ostream & | info (std::ostream &os) const |
| Returns information in an output stream. | |
Private Member Functions | |
| void | convertCell_ (Cell2 &c, const uint level) |
| Handles a cell if it is on the correct level, otherwise, recurses. | |
| void | deleteStuff_ () |
Private Attributes | |
| Joiner< Edge *, 1 > * | edgeList_ |
| List of new edges. | |
| bool | hasQuads |
| Checks for a mixed mesh. | |
| bool | hasTris |
| Mesh2 & | m_ |
| Original mesh. | |
| Joiner< Quad2d *, 1 > * | newQuadList_ |
| List of new quads. | |
| std::list< Quad2d * > | quadList_ |
| List of quads in the new mesh. | |
| Joiner< Vertex *, 1 > * | vertexList_ |
| List of new vertices (centers of gravity of the triangles) | |
Mesh converter.
Converts a mesh with triangles into a mesh with quadrilaterals only. Each triangle is split into three quads by joining the edge midpoints and the center of gravity.
If the attribute of a triangle which is subdivided is 0, the newly created middle vertex, the edges and the quads inherit the key of the triangle as attribute. Otherwise, they inherit the attribute of the triangle.
This class can handle triangular and quadrilateral input meshes. If a quad is met, there is nothing to do. At the moment, mixed meshes cannot be handled.
Definition at line 34 of file meshConverter.hh.
| concepts::ConvertMeshQuads::ConvertMeshQuads | ( | Mesh2 & | m, |
| const uint | level | ||
| ) |
Constructor.
Takes the original mesh m and converts all triangles to quadrilaterals to build a new mesh
| m | Original mesh |
| level | Level in m which should be converted |
| concepts::ConvertMeshQuads::~ConvertMeshQuads | ( | ) |
| void concepts::ConvertMeshQuads::convertCell_ | ( | Cell2 & | c, |
| const uint | level | ||
| ) | [private] |
Handles a cell if it is on the correct level, otherwise, recurses.
| void concepts::ConvertMeshQuads::deleteStuff_ | ( | ) | [private] |
| virtual std::ostream& concepts::ConvertMeshQuads::info | ( | std::ostream & | os | ) | const [protected, virtual] |
Returns information in an output stream.
Reimplemented from concepts::Mesh.
| virtual uint concepts::ConvertMeshQuads::ncell | ( | ) | const [inline, virtual] |
Returns the number of cells in the mesh.
Implements concepts::Mesh.
Definition at line 44 of file meshConverter.hh.
| virtual Scan2* concepts::ConvertMeshQuads::scan | ( | ) | [inline, virtual] |
Returns a scanner over the cells of the mesh.
Implements concepts::Mesh2.
Definition at line 45 of file meshConverter.hh.
Joiner<Edge*, 1>* concepts::ConvertMeshQuads::edgeList_ [private] |
List of new edges.
Definition at line 54 of file meshConverter.hh.
bool concepts::ConvertMeshQuads::hasQuads [private] |
Checks for a mixed mesh.
Definition at line 60 of file meshConverter.hh.
bool concepts::ConvertMeshQuads::hasTris [private] |
Definition at line 60 of file meshConverter.hh.
Mesh2& concepts::ConvertMeshQuads::m_ [private] |
Original mesh.
Definition at line 50 of file meshConverter.hh.
Joiner<Quad2d*, 1>* concepts::ConvertMeshQuads::newQuadList_ [private] |
List of new quads.
Definition at line 56 of file meshConverter.hh.
std::list<Quad2d*> concepts::ConvertMeshQuads::quadList_ [private] |
List of quads in the new mesh.
Definition at line 58 of file meshConverter.hh.
Joiner<Vertex*, 1>* concepts::ConvertMeshQuads::vertexList_ [private] |
List of new vertices (centers of gravity of the triangles)
Definition at line 52 of file meshConverter.hh.