A quadrilateral in the topology. More...

#include <topology.hh>

Inheritance diagram for concepts::Quad:
concepts::Connector2 concepts::Connector concepts::OutputOperator

Public Member Functions

const Attributeattrib () const
 Returns the attribute of the connector. More...
 
virtual const Quadchild (uint i) const
 
virtual Quadchild (uint i, bool mode=0)
 Returns a child. More...
 
Quadclone (Edge &edg0, Edge &edg1, Edge &edg2, Edge &edg3) const
 Returns the pointer of a new Quad with the same attribute, the same key and the same rho but NO children and sibling. More...
 
Edgeedge (uint i) const
 Returns a 1D component: edge. More...
 
const QuadSubdivisiongetStrategy () const
 Returns the subdivision strategy of this quad. More...
 
const Keykey () const
 Returns the key of the connector. More...
 
int numEdges () const
 
int numVertices () const
 
int operator== (const Connector &cntr) const
 Comparison operator. More...
 
 Quad (const Quad &quad, uint i)
 Creating of intermediate cells through coalescing of two of the four childs (only for subdivision in four quadrilaterials) More...
 
 Quad (Edge &edg0, Edge &edg1, Edge &edg2, Edge &edg3, const Attribute attrib=Attribute())
 Constructor. More...
 
bool regular () const
 
int related (const Connector &conn) const
 Checks if this connector is related to conn. More...
 
Z2 rho (int i) const
 Returns the orientation of an edge. More...
 
void setAttrib (uint attrb)
 
void setStrategy (const QuadSubdivision *strategy=0) throw (StrategyChange)
 Sets the subdivision strategy of this quad. More...
 
Vertexvertex (uint i) const
 Returns a 0D component: vertex A 2D element consists of 1D and 0D elements, the vertices can be queried here. More...
 
virtual ~Quad ()
 Destructor. More...
 

Protected Member Functions

Scan< Quad > * children_ () const
 Scanner over the children. More...
 
void edgeAssertion_ () const
 Assert, that the vertices of the four edges match properly. More...
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 
 Quad (Edge &edg0, Edge &edg1, Edge &edg2, Edge &edg3, const Attribute attrib, const Key &key, const Z2 rho[])
 Constructor used by clone() More...
 

Protected Attributes

Attribute attrib_
 Attribute. More...
 
concepts::Joiner< Quad *, 1 > * chld_
 List of Pointers to the children. More...
 
Edgeedg_ [4]
 Array of the edges. More...
 
Key key_
 Unique key of the connector. More...
 
bool regular_
 Regular Cell, deleting of children possible. More...
 
Z2 rho_ [4]
 Array of the orientation flags for the edges. More...
 
const QuadSubdivisionsubdivStrategy_
 Subdivision strategy for the quadrilateral. More...
 

Static Protected Attributes

static uint cnt_
 Counter for the connectors. More...
 
static std::map< Key, Z2rhoTriv_
 orientation of trivial edges (with idential vertices) More...
 

Friends

class QuadSubdiv2H
 
class QuadSubdiv2V
 
class QuadSubdiv4
 

Detailed Description

A quadrilateral in the topology.

Implements the abstract methods from the parent classes to query the children, the vertices and the edges of the quadrilateral.

Every edge can have two different orientations in the quadrilateral, this orientation is stored in the array rho.

Examples
meshes.cc.

Definition at line 272 of file topology.hh.

Constructor & Destructor Documentation

◆ Quad() [1/3]

concepts::Quad::Quad ( Edge edg0,
Edge edg1,
Edge edg2,
Edge edg3,
const Attribute  attrib = Attribute() 
)

Constructor.

Creates a quadrilateral out of four edges. The edges must form a quadrilateral: the 1st and the 2nd edge, the 2nd and the 3rd edge, the 3rd and the 4th edge and the 4th and the 1st edge must have a common vertex. The edges can have an arbitrary orientation. The orientation is detected and stored in rho_.

Parameters
edg01st edge.
edg12nd edge.
edg23rd edge.
edg34th edge.
attribAttribute of the edge

◆ Quad() [2/3]

concepts::Quad::Quad ( const Quad quad,
uint  i 
)

Creating of intermediate cells through coalescing of two of the four childs (only for subdivision in four quadrilaterials)

New cell is not regular, children are not deleted in its destructor

◆ ~Quad()

virtual concepts::Quad::~Quad ( )
virtual

Destructor.

◆ Quad() [3/3]

concepts::Quad::Quad ( Edge edg0,
Edge edg1,
Edge edg2,
Edge edg3,
const Attribute  attrib,
const Key key,
const Z2  rho[] 
)
protected

Constructor used by clone()

Member Function Documentation

◆ attrib()

const Attribute& concepts::Connector::attrib ( ) const
inlineinherited

Returns the attribute of the connector.

Definition at line 108 of file connector.hh.

◆ child() [1/2]

virtual const Quad* concepts::Quad::child ( uint  i) const
virtual

Implements concepts::Connector2.

◆ child() [2/2]

virtual Quad* concepts::Quad::child ( uint  i,
bool  mode = 0 
)
virtual

Returns a child.

If children are created, four new children are created (with the same attributes as this one). All edges of the quadrilateral are refined and four new edges introduced.

Parameters
iIndex of the child to be returned.
modemode = 1: No children are created
mode = 0: If no childs exist, four new children are created. setStrategy() is called before creating the children.

Implements concepts::Connector2.

◆ children_()

Scan<Quad>* concepts::Quad::children_ ( ) const
inlineprotected

Scanner over the children.

Definition at line 389 of file topology.hh.

◆ clone()

Quad * concepts::Quad::clone ( Edge edg0,
Edge edg1,
Edge edg2,
Edge edg3 
) const
inline

Returns the pointer of a new Quad with the same attribute, the same key and the same rho but NO children and sibling.

Definition at line 397 of file topology.hh.

◆ edge()

Edge* concepts::Quad::edge ( uint  i) const
inlinevirtual

Returns a 1D component: edge.

A 2D element consists of 1D and 0D elements, the edges can be queried here.

Parameters
iIndex of the edge

Implements concepts::Connector2.

Definition at line 316 of file topology.hh.

◆ edgeAssertion_()

void concepts::Quad::edgeAssertion_ ( ) const
protected

Assert, that the vertices of the four edges match properly.

◆ getStrategy()

const QuadSubdivision* concepts::Quad::getStrategy ( ) const
inline

Returns the subdivision strategy of this quad.

If you want to find check against another strategy use

quad.getStrategy() == QuadSubdiv2V::instance()

Definition at line 362 of file topology.hh.

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::Connector.

◆ key()

const Key& concepts::Connector::key ( ) const
inlineinherited

Returns the key of the connector.

Definition at line 105 of file connector.hh.

◆ numEdges()

int concepts::Quad::numEdges ( ) const
inline

Definition at line 323 of file topology.hh.

◆ numVertices()

int concepts::Quad::numVertices ( ) const
inline

Definition at line 319 of file topology.hh.

◆ operator==()

int concepts::Connector::operator== ( const Connector cntr) const
inlineinherited

Comparison operator.

Definition at line 102 of file connector.hh.

◆ regular()

bool concepts::Quad::regular ( ) const
inline

Definition at line 336 of file topology.hh.

◆ related()

int concepts::Connector::related ( const Connector conn) const
inherited

Checks if this connector is related to conn.

It is being checked if one of the two is an ancestor of the other.

Parameters
connOther connector
Returns
An integer i.
i=0 if there is no relationship or the connectors are identical
i>0 if conn is an ancestor of this connector
i<0 if conn is a descendant of this connector
|i| gives the number of generations between the connectors

◆ rho()

Z2 concepts::Quad::rho ( int  i) const
inline

Returns the orientation of an edge.

rho = 0 : Edge is oriented counter-clockwise in the quadrilateral. rho = 1 : Edge is oriented clockwise in the quadrilateral.

Parameters
iIndex of the edge.

Definition at line 334 of file topology.hh.

◆ setAttrib()

void concepts::Connector::setAttrib ( uint  attrb)
inlineinherited

Definition at line 111 of file connector.hh.

◆ setStrategy()

void concepts::Quad::setStrategy ( const QuadSubdivision strategy = 0)
throw (StrategyChange
)

Sets the subdivision strategy of this quad.

If the parameter is set to 0 (or if the method is called without parameter) the strategy is set to the default (if not already set). The default subdivision strategy is subdivision into 4 children.

Parameters
strategyPointer to an instance of a subdivision strategy.
Exceptions
StrategyChangeif the change is not allowed (the change is not allowed if there are children present)

◆ vertex()

Vertex* concepts::Quad::vertex ( uint  i) const
inlinevirtual

Returns a 0D component: vertex A 2D element consists of 1D and 0D elements, the vertices can be queried here.

Parameters
iIndex of the vertex

Implements concepts::Connector2.

Definition at line 317 of file topology.hh.

Friends And Related Function Documentation

◆ QuadSubdiv2H

friend class QuadSubdiv2H
friend

Definition at line 274 of file topology.hh.

◆ QuadSubdiv2V

friend class QuadSubdiv2V
friend

Definition at line 275 of file topology.hh.

◆ QuadSubdiv4

friend class QuadSubdiv4
friend

Definition at line 273 of file topology.hh.

Member Data Documentation

◆ attrib_

Attribute concepts::Connector::attrib_
protectedinherited

Attribute.

Definition at line 132 of file connector.hh.

◆ chld_

concepts::Joiner<Quad*, 1>* concepts::Quad::chld_
protected

List of Pointers to the children.

Definition at line 371 of file topology.hh.

◆ cnt_

uint concepts::Connector2::cnt_
staticprotectedinherited

Counter for the connectors.

This counter is used to create the unique key of the connector.

Definition at line 263 of file connector.hh.

◆ edg_

Edge* concepts::Quad::edg_[4]
protected

Array of the edges.

Definition at line 377 of file topology.hh.

◆ key_

Key concepts::Connector::key_
protectedinherited

Unique key of the connector.

Definition at line 129 of file connector.hh.

◆ regular_

bool concepts::Quad::regular_
protected

Regular Cell, deleting of children possible.

Definition at line 374 of file topology.hh.

◆ rho_

Z2 concepts::Quad::rho_[4]
protected

Array of the orientation flags for the edges.

Definition at line 380 of file topology.hh.

◆ rhoTriv_

std::map<Key, Z2> concepts::Quad::rhoTriv_
staticprotected

orientation of trivial edges (with idential vertices)

Definition at line 383 of file topology.hh.

◆ subdivStrategy_

const QuadSubdivision* concepts::Quad::subdivStrategy_
protected

Subdivision strategy for the quadrilateral.

Definition at line 386 of file topology.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