Geophysical Inversion and Modeling Library  v1.0.11-38-g7483f4dd
GIMLI::Node Class Reference

3D Node More...

+ Inheritance diagram for GIMLI::Node:
+ Collaboration diagram for GIMLI::Node:

Public Member Functions

 Node ()
 
 Node (double x, double y, double z=0.0)
 
 Node (const RVector3 &pos)
 
 Node (const RVector3 &pos, int marker, int id=-1)
 
 Node (const Node &node)
 
Nodeoperator= (const Node &node)
 
 ~Node ()
 
double & operator[] (const Index i)
 
const double & operator[] (const Index i) const
 
uint rtti () const
 
void setPos (const RVector3 &pos)
 
const RVector3pos () const
 
RVector3pos ()
 
void insertBoundary (Boundary &bound)
 
void eraseBoundary (Boundary &bound)
 
void insertCell (Cell &cell)
 
void eraseCell (Cell &cell)
 
const std::set< Boundary *> & boundSet () const
 
std::set< Boundary *> & boundSet ()
 
const std::set< Cell *> & cellSet () const
 
std::set< Cell *> & cellSet ()
 
void scale (const RVector3 &s)
 
void translate (const RVector3 &t)
 
void rotate (const RVector3 &r)
 
const double & x () const
 
const double & y () const
 
const double & z () const
 
double & at (Index i)
 
const double & at (Index i) const
 
double dist (const Node &n) const
 
void smooth (uint function)
 
- 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

void copy_ (const Node &node)
 
void changed_ ()
 
void init_ ()
 

Protected Attributes

RVector3 pos_
 
std::set< Boundary *> boundSet_
 
std::set< Cell *> cellSet_
 
- Protected Attributes inherited from GIMLI::BaseEntity
int id_
 
bool valid_
 
int marker_
 
bool tagged_
 

Detailed Description

3D Node

Node is a basic entity of a mesh at a 3D position x/y/z (a vertex), which owns a marker, an id, and information about connected boundarys and cells. For a 2D node ignore $z$ or let $z$-coord = 0.0.

Constructor & Destructor Documentation

◆ Node() [1/5]

GIMLI::Node::Node ( )

Construct node with non valid position and marker = 0

◆ Node() [2/5]

GIMLI::Node::Node ( double  x,
double  y,
double  z = 0.0 
)

Construct node from coordinates $x,y,[z]$ with marker = 0

◆ Node() [3/5]

GIMLI::Node::Node ( const RVector3 pos)

Construct node from RVector3

◆ Node() [4/5]

GIMLI::Node::Node ( const RVector3 pos,
int  marker,
int  id = -1 
)

Construct node from RVector3 with marker and optional id

References GIMLI::BaseEntity::setId().

◆ Node() [5/5]

GIMLI::Node::Node ( const Node node)

Copy constructor

◆ ~Node()

GIMLI::Node::~Node ( )

Destruct the node and all containing informations

References GIMLI::commonNodes(), GIMLI::BaseEntity::id(), and GIMLI::BaseEntity::setId().

Member Function Documentation

◆ operator=()

Node & GIMLI::Node::operator= ( const Node node)

Assignement operator

◆ operator[]() [1/2]

double& GIMLI::Node::operator[] ( const Index  i)
inline

Unchecked index operator to pos

◆ operator[]() [2/2]

const double& GIMLI::Node::operator[] ( const Index  i) const
inline

Unchecked index operator to pos

◆ rtti()

uint GIMLI::Node::rtti ( ) const
inlinevirtual

Return entity rtti value.

Reimplemented from GIMLI::BaseEntity.

References GIMLI::str(), GIMLI::x(), GIMLI::y(), and GIMLI::z().