Galeri::grid::Element Class Reference

Basic class for grid elements. More...

#include <Galeri_grid_Element.h>

Inheritance diagram for Galeri::grid::Element:
Inheritance graph
Collaboration diagram for Galeri::grid::Element:
Collaboration graph

List of all members.

Public Member Functions

 Element ()
 Default constructor.
 Element (const Element &rhs)
 Copy constructor.
virtual Elementoperator= (const Element &rhs)
 operator =
 ~Element ()

void setNumVertices (const int numVertices)
 Sets the number of vertices in this object.
int getNumVertices () const
 Gets the number of vertices associated with this object.
void setNumComponents (const int numComponents)
 Sets the number of components in this object.
int getNumComponents () const
 Gets the number of components associated with this object.
void setComponent (const int which, const Element &what)
 Sets the element type for component which.
const ElementgetComponent (const int which) const
 Gets the element type of the specified component.

virtual void print (ostream &os) const
 Prints the output on os.

Detailed Description

Basic class for grid elements.

Class Galeri::grid::Element specifies the interface for a generic 1D, 2D or 3D grid element. This class is a semi-virtual class.

In Galeri/pfem, an element is defined as a geometric object, composed by vertices and components. The former are easy to define; the latter, instead, define the sub-entities of the element, and they are either segments (for 2D elements) or faces (for 3D elements).

The idea is that you can define an object by deriving this class, and set the correct number of vertices and components. You also have to decide the local ID of each of the components. Mixed components are perfectly legal. Since a component is nothing but an Element-derived class, you can recursively assemble components and create the object you need for your discretization.

This class is derived by Galeri::grid::Point, Galeri::grid::Segment, Galeri::grid::Triangle, Galeri::grid::Quad, Galeri::grid::Tet and Galeri::grid::Hex. New elements can be easily if required.

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables
Generated on Wed Apr 13 10:08:44 2011 for Galeri by  doxygen 1.6.3