Geophysical Inversion and Modelling Library  v1.5.0
GIMLI::Cell Class Reference

A abstract cell. More...

Inherits GIMLI::MeshEntity.

Inherited by GIMLI::EdgeCell, GIMLI::Hexahedron, GIMLI::Pyramid, GIMLI::Quadrangle, GIMLI::Tetrahedron, GIMLI::TriPrism, and GIMLI::Triangle.

+ Collaboration diagram for GIMLI::Cell:

Public Member Functions

 Cell ()
 Cell (const std::vector< Node * > &nodes)
virtual ~Cell ()
bool operator== (const Cell &cell)
virtual uint rtti () const
virtual uint parentType () const
virtual uint neighborCellCount () const
uint boundaryCount () const
void cleanNeighborInfos ()
CellneighborCell (const RVector &sf)
CellneighborCell (uint i)
virtual void findNeighborCell (uint i)
double attribute () const
void setAttribute (double attr)
NodeoppositeTo (const Boundary &bound)
BoundaryboundaryTo (const RVector &sf)
Boundaryboundary (Index i)
virtual std::vector< Node * > boundaryNodes (Index i) const
- Public Member Functions inherited from GIMLI::MeshEntity
 MeshEntity ()
virtual ~MeshEntity ()
virtual uint dim () const
virtual void setNodes (const std::vector< Node * > &nodes)
const std::vector< Node * > & nodes () const
Nodenode (uint i)
Nodenode (uint i) const
uint nodeCount () const
Shapeshape ()
Shapeshape () const
ShapepShape ()
RVector3 rst (uint i) const
RVector3 center () const
double size () const
IndexArray ids () const
virtual std::vector< PolynomialFunction< double > > createShapeFunctions () const
virtual RVector N (const RVector3 &rst) const
virtual void N (const RVector3 &rst, RVector &n) const
virtual RVector dNdL (const RVector3 &rst, uint i) const
virtual RMatrix dNdL (const RVector3 &rst) const
double pot (const RVector3 &p, const RVector &u) const
RVector3 vec (const RVector3 &p, const R3Vector &v) const
RVector3 grad (const RVector3 &p, const RVector &u) const
void setUxCache (const RMatrix &mat) const
const RMatrixuxCache () const
ElementMatrix< double > & uCache ()
ElementMatrix< double > & gradUCache ()
void changed ()
void addSecondaryNode (Node *n)
void delSecondaryNode (Node *n)
const std::vector< Node * > & secondaryNodes () const
const std::vector< Node * > allNodes () const
Index allNodeCount () const
virtual bool enforcePositiveDirection ()
- Public Member Functions inherited from GIMLI::BaseEntity
 BaseEntity (const BaseEntity &ent)
BaseEntityoperator= (const BaseEntity &ent)
virtual bool valid () const
virtual void setValid (bool valid)
int id () const
void setId (int id)
void setMarker (int marker)
int marker () const
void setTagged (bool tagged)
void untag ()
void tag ()
bool tagged () const

Protected Member Functions

virtual void registerNodes_ ()
virtual void deRegisterNodes_ ()
virtual void registerSecNode_ (Node *n)
virtual void deRegisterSecNode_ (Node *n)
 Cell (const Cell &cell)
Celloperator= (const Cell &cell)
- Protected Member Functions inherited from GIMLI::MeshEntity
void fillShape_ ()
 MeshEntity (const MeshEntity &ent)
MeshEntityoperator= (const MeshEntity &ent)

Protected Attributes

std::vector< Cell * > neighborCells_
double attribute_
- Protected Attributes inherited from GIMLI::MeshEntity
std::vector< Node * > nodeVector_
std::vector< Node * > secondaryNodes_
ElementMatrix< double > uCache_
ElementMatrix< double > gradUCache_
RMatrix uxCache_
- Protected Attributes inherited from GIMLI::BaseEntity
int id_
bool valid_
int marker_
bool tagged_


DLLEXPORT friend std::ostream & operator<< (std::ostream &str, const Cell &c)

Detailed Description

A abstract cell.

Interface class for all cells.

Constructor & Destructor Documentation

◆ Cell() [1/3]

GIMLI::Cell::Cell ( )

Default constructor.

◆ Cell() [2/3]

GIMLI::Cell::Cell ( const std::vector< Node * > &  nodes)

Construct cell from vector of nodes.

◆ ~Cell()

GIMLI::Cell::~Cell ( )

Default destructor.

◆ Cell() [3/3]

GIMLI::Cell::Cell ( const Cell cell)

Don't call this class directly

Member Function Documentation

◆ boundary()

Boundary * GIMLI::Cell::boundary ( Index  i)

Return the i-th boundary. Experimental!

References boundaryNodes().

Referenced by GIMLI::Mesh::findCellsAlongRay().

◆ boundaryNodes()

virtual std::vector< Node * > GIMLI::Cell::boundaryNodes ( Index  i) const

◆ boundaryTo()

Boundary * GIMLI::Cell::boundaryTo ( const RVector sf)

Find the nearest boundary to be crossed in direction to the point responsible for the shape function.

References GIMLI::find(), and rtti().

◆ findNeighborCell()

void GIMLI::Cell::findNeighborCell ( uint  i)

Find neighbor cell regarding to the i-th Boundary and store them in neighborCells_.

References boundaryNodes().

Referenced by GIMLI::Mesh::createNeighborInfosCell_().

◆ neighborCell()

Cell* GIMLI::Cell::neighborCell ( uint  i)

Return the direct neighbor cell corresponding to local node i. The cell will be searched and stored by the virtual method findNeighborCell. All neighboring relationships have to be initialized ones by calling Mesh::createNeighborInfos(). If no cell can be found NULL is returned.

◆ operator=()

Cell& GIMLI::Cell::operator= ( const Cell cell)

Don't call this class directly

◆ operator==()

bool GIMLI::Cell::operator== ( const Cell cell)

For pygimli bindings to allow simple check

◆ oppositeTo()

Node * GIMLI::Cell::oppositeTo ( const Boundary bound)

DEPRECATED???? Find the node of this cell which is in opposite position to the given boundary. Returns a pointer to the node. The boundary must be part of the cell otherwise, a NULL pointer returns. Works for triangle/edge and tetrahedron/triangleFace

Referenced by GIMLI::Edge::swap().

◆ parentType()

virtual uint GIMLI::Cell::parentType ( ) const

To separate between major MeshEntity families e.g. Cell and Boundary.

Reimplemented from GIMLI::MeshEntity.

◆ rtti()