Class documentation of Concepts

Loading...
Searching...
No Matches

#include <topology.hh>

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

Public Member Functions

 Triangle (Edge &edg0, Edge &edg1, Edge &edg2, const Attribute attrib=Attribute())
 
virtual Trianglechild (uint i, bool mode=0)
 
virtual const Trianglechild (uint i) const
 
Edgeedge (uint i) const
 
Vertexvertex (uint i) const
 
Z2 rho (int i) const
 
Triangleclone (Edge &edg0, Edge &edg1, Edge &edg2) const
 
int operator== (const Connector &cntr) const
 Comparison operator.
 
const Keykey () const
 Returns the key of the connector.
 
const Attributeattrib () const
 Returns the attribute of the connector.
 
void setAttrib (uint attrb)
 
int related (const Connector &conn) const
 

Protected Member Functions

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

Protected Attributes

Key key_
 Unique key of the connector.
 
Attribute attrib_
 Attribute.
 

Static Protected Attributes

static uint cnt_
 

Detailed Description

A triangle in the topology. Implements the abstract methods from the parent classes to query the children, the vertices and the edges of the triangle.

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

Examples
meshes.cc.

Definition at line 193 of file topology.hh.

Constructor & Destructor Documentation

◆ Triangle()

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

Constructor. Creates a triangle out of three edges. The edges must form a triangle: the 1st and the 2nd edge, the 2nd and the 3rd edge and the 3rd 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.
attribAttribute of the triangle

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 Triangle * concepts::Triangle::child ( uint  i) const
virtual

Implements concepts::Connector2.

◆ child() [2/2]

virtual Triangle * concepts::Triangle::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). The triangle is cut into four new triangles by joining the midpoints of its edges.

Parameters
iIndex of the child to be returned.
modemode = 1: No children are created
mode = 0: If no children exist, four new children are created.

Implements concepts::Connector2.

◆ clone()

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

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

Definition at line 258 of file topology.hh.

◆ edge()

Edge * concepts::Triangle::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 224 of file topology.hh.

◆ info()

virtual std::ostream & concepts::Triangle::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.

◆ operator==()

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

Comparison operator.

Definition at line 102 of file connector.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::Triangle::rho ( int  i) const
inline

Returns the orientation of an edge.

Parameters
iIndex of the edge.

Definition at line 230 of file topology.hh.

◆ setAttrib()

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

Definition at line 111 of file connector.hh.

◆ vertex()

Vertex * concepts::Triangle::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 225 of file topology.hh.

Member Data Documentation

◆ attrib_

Attribute concepts::Connector::attrib_
protectedinherited

Attribute.

Definition at line 132 of file connector.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.

◆ key_

Key concepts::Connector::key_
protectedinherited

Unique key of the connector.

Definition at line 129 of file connector.hh.


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