![]() |
libgenua
Basic Geometry, Numerical Algorithms and Interfaces
|
Base class for mesh elements.
Class Element and childs have been used to implement support for object- oriented mesh interfaces such as the one for NASTRAN interfacing and for structural mesh generation. The OO design turned out not to be suitable for this problem, as it introduces indirection and additional complexity.
Prefer to use MxMesh for new code.
#include <element.h>
Public Member Functions | |
Element () | |
constructs an undefined element | |
Element (uint *p) | |
construct with pointer to actual data storage | |
virtual | ~Element () |
destructor | |
uint | id () const |
access element id number | |
void | id (uint i) |
access element id number | |
const uint * | vertices () const |
access vertices | |
uint * | vertices () |
access vertices | |
const uint * | begin () const |
algorithm interface | |
uint * | begin () |
algorithm interface | |
const uint * | end () const |
algorithm interface | |
uint * | end () |
algorithm interface | |
uint | nvertices () const |
number of vertices | |
void | nvertices (uint nv) const |
change number of vertices (below nmax) | |
bool | valid () const |
is element defined or not | |
virtual uint | edges (uint ep[]) const |
copy edges into ep (default implementation does nothing) | |
virtual uint | faces (uint ep[]) const |
copy faces into ep (default implementation does nothing) | |
void | irotate () |
rotates indices so that smallest index comes first | |
void | translate (const Indices &perm) |
apply permutation to vertex indices | |
void | offset (int off) |
apply constant offset to vertex indices | |
uint32_t | hash () const |
compute hash value | |
bool | vless (const Element &a) const |
comparison by vertex indices | |
bool | vequal (const Element &a) const |
equivalence by vertex indices | |
virtual uint | idtype () const |
return an ordering id (needed for sorting) | |
virtual uint | add2viz (MeshFields &) const |
add entry to visualization object | |
virtual void | nstwrite (std::ostream &) const |
write to file (nastran) | |
virtual void | abqwrite (std::ostream &) const |
write to file (abaqus/calculix) | |
Static Public Member Functions | |
static uint | maxedges () |
maximum number of edges in any one element | |
static uint | maxfaces () |
maximum number of faces in any one element | |
static uint | maxvertices () |
maximum number of edges in any one element | |
Protected Member Functions | |
void | changeBase (uint *p) |
set vertex array pointer | |
Private Attributes | |
uint * | bvi |
pointer to vertex indices | |
uint | elemid |
element id for sorting | |