Class for holding a general mutable mesh of 2D cell where cells and other 2D meshes can be added. More...

#include <mutableMesh.hh>

Inheritance diagram for concepts::MutableMesh2:
concepts::Mesh2 concepts::MutableMeshBase concepts::Mesh concepts::OutputOperator concepts::ConnectTwoMeshes

Public Member Functions

virtual void addCell (Cell *cell, bool holding=true)
 Adds a cell to the mesh, which is by default hold by this object and will be deleted by its destructor. More...
 
void addMesh (Mesh2 &msh)
 Adds cells of another mesh. More...
 
void connectOppositeEdges (const Edge2d *edge1, const Edge2d *edge2, const Attribute attrib=Attribute(), const Quad2dSubdivision *strategy=0)
 Adds a quadrilateral connecting the two edges. More...
 
void connectOppositeEdges (const Sequence< Edge2d * > edges1, const Sequence< Edge2d * > edges2, const Attribute attrib=Attribute(), const Quad2dSubdivision *strategy=0)
 Adds quadrilateral connecting respective two edges of the two sequences (with same number of edges). More...
 
Cell2lastCell () const
 Return the latest added cell. More...
 
 MutableMesh2 ()
 
uint ncell () const
 Returns the number of cells in the mesh. More...
 
const Sequence< Connector0 * > & ownConnectors0 () const
 
const Sequence< Connector1 * > & ownConnectors1 () const
 
const Sequence< Connector2 * > & ownConnectors2 () const
 
const Sequence< Connector3 * > & ownConnectors3 () const
 
EdgeownEdge (Vertex *vtx1, Vertex *vtx2)
 Returns the own edge with the two vertices. More...
 
void replaceCell (Cell2 *cell, bool holding=true)
 Replaces by cell the cell with the same connector. More...
 
Scan2scan ()
 Returns a scanner over the cells of the mesh. More...
 
virtual ~MutableMesh2 ()
 

Protected Member Functions

void addCell_ (Cell *cell, bool holding=true)
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 
void replaceCell_ (Cell *cell, bool holding=true)
 Replaces by cell the cell with the same connector. More...
 

Protected Attributes

MultiArray< 2, Edge * > mapEdges_
 Maps from vertices to connectors. More...
 
Sequence< const Cell * > ownCells_
 Stored cells. More...
 
Sequence< Connector0 * > ownConnectors0_
 Stored connectors. More...
 
Sequence< Connector1 * > ownConnectors1_
 
Sequence< Connector2 * > ownConnectors2_
 
Sequence< Connector3 * > ownConnectors3_
 

Private Attributes

Sequence< Cell2 * > cells_
 Cells of the mesh. More...
 
uint ncell_
 Number of cells. More...
 

Detailed Description

Class for holding a general mutable mesh of 2D cell where cells and other 2D meshes can be added.

Author
Kersten Schmidt, 2009

Definition at line 142 of file mutableMesh.hh.

Constructor & Destructor Documentation

◆ MutableMesh2()

concepts::MutableMesh2::MutableMesh2 ( )
inline

Definition at line 144 of file mutableMesh.hh.

◆ ~MutableMesh2()

virtual concepts::MutableMesh2::~MutableMesh2 ( )
virtual

Member Function Documentation

◆ addCell()

virtual void concepts::MutableMesh2::addCell ( Cell cell,
bool  holding = true 
)
virtual

Adds a cell to the mesh, which is by default hold by this object and will be deleted by its destructor.

Implements concepts::MutableMeshBase.

◆ addCell_()

void concepts::MutableMeshBase::addCell_ ( Cell cell,
bool  holding = true 
)
protectedinherited

◆ addMesh()

void concepts::MutableMesh2::addMesh ( Mesh2 msh)

Adds cells of another mesh.

The cells will not be deleted internally.

◆ connectOppositeEdges() [1/2]

void concepts::MutableMesh2::connectOppositeEdges ( const Edge2d edge1,
const Edge2d edge2,
const Attribute  attrib = Attribute(),
const Quad2dSubdivision strategy = 0 
)

Adds a quadrilateral connecting the two edges.

New entities, as stored only internally, will be deleted internally.

◆ connectOppositeEdges() [2/2]

void concepts::MutableMesh2::connectOppositeEdges ( const Sequence< Edge2d * >  edges1,
const Sequence< Edge2d * >  edges2,
const Attribute  attrib = Attribute(),
const Quad2dSubdivision strategy = 0 
)

Adds quadrilateral connecting respective two edges of the two sequences (with same number of edges).

The edges in each sequence have to be connected.

It will be searched for the edge pair of smalled distance and the rest if connected in the order of the given edges, i.e. they have to have matching order (e.g. both counter-clockwise).

New entities, as stored only internally, will be deleted internally.

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::Mesh.

◆ lastCell()

Cell2* concepts::MutableMesh2::lastCell ( ) const
inline

Return the latest added cell.

Definition at line 161 of file mutableMesh.hh.

◆ ncell()

uint concepts::MutableMesh2::ncell ( ) const
inlinevirtual

Returns the number of cells in the mesh.

Implements concepts::Mesh.

Definition at line 146 of file mutableMesh.hh.

◆ ownConnectors0()

const Sequence<Connector0*>& concepts::MutableMeshBase::ownConnectors0 ( ) const
inlineinherited

Definition at line 36 of file mutableMesh.hh.

◆ ownConnectors1()

const Sequence<Connector1*>& concepts::MutableMeshBase::ownConnectors1 ( ) const
inlineinherited

Definition at line 38 of file mutableMesh.hh.

◆ ownConnectors2()

const Sequence<Connector2*>& concepts::MutableMeshBase::ownConnectors2 ( ) const
inlineinherited

Definition at line 40 of file mutableMesh.hh.

◆ ownConnectors3()

const Sequence<Connector3*>& concepts::MutableMeshBase::ownConnectors3 ( ) const
inlineinherited

Definition at line 42 of file mutableMesh.hh.

◆ ownEdge()

Edge* concepts::MutableMeshBase::ownEdge ( Vertex vtx1,
Vertex vtx2 
)
inherited

Returns the own edge with the two vertices.

If it does not exist the new edge will be created, stored and added it to maps from vertices

◆ replaceCell()

void concepts::MutableMesh2::replaceCell ( Cell2 cell,
bool  holding = true 
)

Replaces by cell the cell with the same connector.

This is good to replace the element map while holding the connectivity.

◆ replaceCell_()

void concepts::MutableMeshBase::replaceCell_ ( Cell cell,
bool  holding = true 
)
protectedinherited

Replaces by cell the cell with the same connector.

This is good to replace the element map while holding the connectivity.

◆ scan()

Scan2* concepts::MutableMesh2::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 147 of file mutableMesh.hh.

Member Data Documentation

◆ cells_

Sequence<Cell2*> concepts::MutableMesh2::cells_
private

Cells of the mesh.

Definition at line 203 of file mutableMesh.hh.

◆ mapEdges_

MultiArray<2, Edge*> concepts::MutableMeshBase::mapEdges_
protectedinherited

Maps from vertices to connectors.

Definition at line 53 of file mutableMesh.hh.

◆ ncell_

uint concepts::MutableMesh2::ncell_
private

Number of cells.

Definition at line 201 of file mutableMesh.hh.

◆ ownCells_

Sequence<const Cell*> concepts::MutableMeshBase::ownCells_
protectedinherited

Stored cells.

Definition at line 46 of file mutableMesh.hh.

◆ ownConnectors0_

Sequence<Connector0*> concepts::MutableMeshBase::ownConnectors0_
protectedinherited

Stored connectors.

Definition at line 48 of file mutableMesh.hh.

◆ ownConnectors1_

Sequence<Connector1*> concepts::MutableMeshBase::ownConnectors1_
protectedinherited

Definition at line 49 of file mutableMesh.hh.

◆ ownConnectors2_

Sequence<Connector2*> concepts::MutableMeshBase::ownConnectors2_
protectedinherited

Definition at line 50 of file mutableMesh.hh.

◆ ownConnectors3_

Sequence<Connector3*> concepts::MutableMeshBase::ownConnectors3_
protectedinherited

Definition at line 51 of file mutableMesh.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