Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
concepts::ConvertMeshQuads Class Reference

Mesh converter. More...

#include <meshConverter.hh>

Inheritance diagram for concepts::ConvertMeshQuads:
Inheritance graph
[legend]
Collaboration diagram for concepts::ConvertMeshQuads:
Collaboration graph
[legend]

List of all members.

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 Scan2scan ()
 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
Mesh2m_
 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)

Detailed Description

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.

Todo:
Implement methods to handle mixed meshes (quads and triangles)
Author:
Philipp Frauenfelder, 2004
Test:
test::ConvertMeshQuads

Definition at line 34 of file meshConverter.hh.


Constructor & Destructor Documentation

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

Parameters:
mOriginal mesh
levelLevel in m which should be converted
concepts::ConvertMeshQuads::~ConvertMeshQuads ( )

Member Function Documentation

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.

Postcondition:
The scanner must be deleted after usage. This has to be done by the user.

Implements concepts::Mesh2.

Definition at line 45 of file meshConverter.hh.


Member Data Documentation

List of new edges.

Definition at line 54 of file meshConverter.hh.

Checks for a mixed mesh.

Definition at line 60 of file meshConverter.hh.

Definition at line 60 of file meshConverter.hh.

Original mesh.

Definition at line 50 of file meshConverter.hh.

List of new quads.

Definition at line 56 of file meshConverter.hh.

List of quads in the new mesh.

Definition at line 58 of file meshConverter.hh.

List of new vertices (centers of gravity of the triangles)

Definition at line 52 of file meshConverter.hh.


The documentation for this class was generated from the following file:

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)