Basic class for grid elements. More...
#include <Galeri_grid_Element.h>
Public Member Functions | |
Element () | |
Default constructor. | |
Element (const Element &rhs) | |
Copy constructor. | |
virtual Element & | operator= (const Element &rhs) |
operator = | |
~Element () | |
destructor. | |
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 Element & | getComponent (const int which) const |
Gets the element type of the specified component. | |
virtual void | print (ostream &os) const |
Prints the output on os . | |
Public Member Functions inherited from Galeri::core::Object | |
Object (const std::string &Label="Galeri::core::Object", const int ID=0) | |
Object (const Object &rhs) | |
Copy constructor. | |
Object & | operator= (const Object &rhs) |
Copies the object from rhs . | |
virtual | ~Object () |
Virtual dtor. | |
virtual void | setLabel (const std::string &label) |
Sets the label associated with this object. More... | |
virtual std::string | getLabel () const |
Gets the label associated with this object. | |
virtual void | setID (const int &ID) |
Sets the ID associated with this object. | |
virtual int | getID () const |
Gets the ID associated with this object. | |
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.