Mesh converter. More...

#include <meshConverter.hh>

Inheritance diagram for concepts::ConvertMeshQuads:
concepts::Mesh2 concepts::Mesh concepts::OutputOperator

Classes

class  S
 Scanner class for ConvertMeshQuads. More...
 

Public Member Functions

 ConvertMeshQuads (Mesh2 &m, const uint level)
 Constructor. More...
 
virtual uint ncell () const
 Returns the number of cells in the mesh. More...
 
virtual Scan2scan ()
 Returns a scanner over the cells of the mesh. More...
 
 ~ConvertMeshQuads ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Member Functions

void convertCell_ (Cell2 &c, const uint level)
 Handles a cell if it is on the correct level, otherwise, recurses. More...
 
void deleteStuff_ ()
 

Private Attributes

Joiner< Edge *, 1 > * edgeList_
 List of new edges. More...
 
bool hasQuads
 Checks for a mixed mesh. More...
 
bool hasTris
 
Mesh2m_
 Original mesh. More...
 
Joiner< Quad2d *, 1 > * newQuadList_
 List of new quads. More...
 
std::list< Quad2d * > quadList_
 List of quads in the new mesh. More...
 
Joiner< Vertex *, 1 > * vertexList_
 List of new vertices (centers of gravity of the triangles) More...
 

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 35 of file meshConverter.hh.

Constructor & Destructor Documentation

◆ ConvertMeshQuads()

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

◆ ~ConvertMeshQuads()

concepts::ConvertMeshQuads::~ConvertMeshQuads ( )

Member Function Documentation

◆ convertCell_()

void concepts::ConvertMeshQuads::convertCell_ ( Cell2 c,
const uint  level 
)
private

Handles a cell if it is on the correct level, otherwise, recurses.

◆ deleteStuff_()

void concepts::ConvertMeshQuads::deleteStuff_ ( )
private

◆ info()

virtual std::ostream& concepts::ConvertMeshQuads::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::Mesh.

◆ ncell()

virtual uint concepts::ConvertMeshQuads::ncell ( ) const
inlinevirtual

Returns the number of cells in the mesh.

Implements concepts::Mesh.

Definition at line 45 of file meshConverter.hh.

◆ scan()

virtual Scan2* concepts::ConvertMeshQuads::scan ( )
inlinevirtual

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 46 of file meshConverter.hh.

Member Data Documentation

◆ edgeList_

Joiner<Edge*, 1>* concepts::ConvertMeshQuads::edgeList_
private

List of new edges.

Definition at line 55 of file meshConverter.hh.

◆ hasQuads

bool concepts::ConvertMeshQuads::hasQuads
private

Checks for a mixed mesh.

Definition at line 61 of file meshConverter.hh.

◆ hasTris

bool concepts::ConvertMeshQuads::hasTris
private

Definition at line 61 of file meshConverter.hh.

◆ m_

Mesh2& concepts::ConvertMeshQuads::m_
private

Original mesh.

Definition at line 51 of file meshConverter.hh.

◆ newQuadList_

Joiner<Quad2d*, 1>* concepts::ConvertMeshQuads::newQuadList_
private

List of new quads.

Definition at line 57 of file meshConverter.hh.

◆ quadList_

std::list<Quad2d*> concepts::ConvertMeshQuads::quadList_
private

List of quads in the new mesh.

Definition at line 59 of file meshConverter.hh.

◆ vertexList_

Joiner<Vertex*, 1>* concepts::ConvertMeshQuads::vertexList_
private

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

Definition at line 53 of file meshConverter.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich