INMOST
Mathematical Modelling Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
INMOST::Element Class Reference

#include <inmost_mesh.h>

Inheritance diagram for INMOST::Element:
Collaboration diagram for INMOST::Element:

Public Types

typedef INMOST_DATA_BULK_TYPE GeometricType
 
typedef INMOST_DATA_BULK_TYPE Status
 
typedef inner_reference_array adj_type
 
typedef adj_type::iterator adj_iterator
 
typedef adj_type::const_iterator const_adj_iterator
 
typedef adj_type::reverse_iterator adj_reverse_iterator
 
typedef
adj_type::const_reverse_iterator 
const_adj_reverse_iterator
 
- Public Types inherited from INMOST::Storage
typedef INMOST_DATA_REAL_TYPE real
 Storage type for representing real values. More...
 
typedef INMOST_DATA_INTEGER_TYPE integer
 Storage type for representing integer values. More...
 
typedef INMOST_DATA_BULK_TYPE bulk
 Storage type for representing one byte of abstact data. More...
 
typedef INMOST_DATA_ENUM_TYPE enumerator
 type for representing unsigned integer values. More...
 
typedef HandleType reference
 Storage type for representing references to Element. More...
 
typedef RemoteHandleType remote_reference
 Storage type for representing references to Element in another Mesh. More...
 
typedef shell< realreal_array
 Storage type for representing arrays of real values. More...
 
typedef shell< integerinteger_array
 Storage type for representing arrays of integer values. More...
 
typedef shell< bulkbulk_array
 Storage type for representing abstact data as a series of bytes. More...
 
typedef variable var
 Storage type for representing real value with vector of variations. More...
 
typedef shell< variablevar_array
 Storage type for representing array of values with vectors of variations. More...
 

Public Member Functions

 Element ()
 
 Element (Mesh *m, HandleType h)
 
 Element (Mesh *m, HandleType *h)
 
 Element (const Element &other)
 
Elementoperator= (Element const &other)
 
Elementoperator-> ()
 
const Elementoperator-> () const
 
Elementself ()
 
const Elementself () const
 
virtual ~Element ()
 
virtual enumerator nbAdjElements (ElementType etype) const
 
virtual ElementArray< ElementgetAdjElements (ElementType etype) const
 
virtual enumerator nbAdjElements (ElementType etype, MarkerType mask, bool invert_mask=false) const
 
virtual ElementArray< ElementgetAdjElements (ElementType etype, MarkerType mask, bool invert_mask=false) const
 
ElementArray< ElementBridgeAdjacencies (ElementType Bridge, ElementType Dest, MarkerType mask=0, bool invert_mask=false) const
 
ElementArray< NodeBridgeAdjacencies2Node (ElementType Bridge, MarkerType mask=0, bool invert_mask=false) const
 
ElementArray< EdgeBridgeAdjacencies2Edge (ElementType Bridge, MarkerType mask=0, bool invert_mask=false) const
 
ElementArray< FaceBridgeAdjacencies2Face (ElementType Bridge, MarkerType mask=0, bool invert_mask=false) const
 
ElementArray< CellBridgeAdjacencies2Cell (ElementType Bridge, MarkerType mask=0, bool invert_mask=false) const
 
virtual ElementArray< NodegetNodes () const
 
virtual ElementArray< EdgegetEdges () const
 
virtual ElementArray< FacegetFaces () const
 
virtual ElementArray< CellgetCells () const
 
virtual ElementArray< NodegetNodes (MarkerType mask, bool invert_mask=false) const
 
virtual ElementArray< EdgegetEdges (MarkerType mask, bool invert_mask=false) const
 
virtual ElementArray< FacegetFaces (MarkerType mask, bool invert_mask=false) const
 
virtual ElementArray< CellgetCells (MarkerType mask, bool invert_mask=false) const
 
GeometricType GetGeometricType () const
 
unsigned int GetElementDimension () const
 
Status GetStatus () const
 
void SetStatus (Status status) const
 
Storage::integerGlobalID () const
 
bool CheckElementConnectivity () const
 
void PrintElementConnectivity () const
 
void CastRay (real *pos, real *dir, dynarray< std::pair< Element, real >, 16 > &hits) const
 
void ComputeGeometricType () const
 
void Centroid (real *cnt) const
 
void Barycenter (real *cnt) const
 
Storage::real Mean (real(*func)(real *x, real t), real time) const
 
bool Boundary () const
 
bool Planarity () const
 
bool Hide () const
 
bool Show () const
 
bool Delete ()
 
bool Hidden () const
 
bool New () const
 
void Disconnect (bool delete_upper_adjacent) const
 
void Disconnect (const HandleType *adjacent, INMOST_DATA_ENUM_TYPE num) const
 
void Connect (const HandleType *adjacent, INMOST_DATA_ENUM_TYPE num) const
 Connects lower adjacencies to current element. Geometric data and cell nodes are updated automatically. More...
 
void UpdateGeometricData () const
 Update geometric data for element, calls RecomputeGeometricData from Mesh. More...
 
- Public Member Functions inherited from INMOST::Storage
 Storage (const Storage &other)
 
 Storage (Mesh *mesh, HandleType handle)
 
 Storage (Mesh *mesh, HandleType *handle)
 This constructor allows for remote handle modification. More...
 
Storageoperator= (Storage const &other)
 
__INLINE bool operator< (const Storage &other) const
 Inline functions for class Storage //. More...
 
__INLINE bool operator> (const Storage &other) const
 
__INLINE bool operator<= (const Storage &other) const
 
__INLINE bool operator>= (const Storage &other) const
 
__INLINE bool operator== (const Storage &other) const
 
__INLINE bool operator!= (const Storage &other) const
 
__INLINE Storageoperator-> ()
 
__INLINE const Storageoperator-> () const
 
__INLINE Storageself ()
 
__INLINE const Storageself () const
 
virtual ~Storage ()
 
__INLINE realReal (const Tag &tag) const
 
__INLINE integerInteger (const Tag &tag) const
 
__INLINE bulkBulk (const Tag &tag) const
 
__INLINE referenceReference (const Tag &tag) const
 
__INLINE remote_referenceRemoteReference (const Tag &tag) const
 
__INLINE real_array RealArray (const Tag &tag) const
 
__INLINE integer_array IntegerArray (const Tag &tag) const
 
__INLINE bulk_array BulkArray (const Tag &tag) const
 
__INLINE reference_array ReferenceArray (const Tag &tag) const
 
__INLINE remote_reference_array RemoteReferenceArray (const Tag &tag) const
 
__INLINE real_array RealArrayDF (const Tag &tag) const
 
__INLINE integer_array IntegerArrayDF (const Tag &tag) const
 
__INLINE bulk_array BulkArrayDF (const Tag &tag) const
 
__INLINE reference_array ReferenceArrayDF (const Tag &tag) const
 
__INLINE remote_reference_array RemoteReferenceArrayDF (const Tag &tag) const
 
__INLINE realRealDF (const Tag &tag) const
 
__INLINE integerIntegerDF (const Tag &tag) const
 
__INLINE bulkBulkDF (const Tag &tag) const
 
__INLINE referenceReferenceDF (const Tag &tag) const
 
__INLINE remote_referenceRemoteReferenceDF (const Tag &tag) const
 
__INLINE real_array RealArrayDV (const Tag &tag) const
 
__INLINE integer_array IntegerArrayDV (const Tag &tag) const
 
__INLINE bulk_array BulkArrayDV (const Tag &tag) const
 
__INLINE reference_array ReferenceArrayDV (const Tag &tag) const
 
__INLINE remote_reference_array RemoteReferenceArrayDV (const Tag &tag) const
 
__INLINE realRealDV (const Tag &tag) const
 
__INLINE integerIntegerDV (const Tag &tag) const
 
__INLINE bulkBulkDV (const Tag &tag) const
 
__INLINE referenceReferenceDV (const Tag &tag) const
 
__INLINE remote_referenceRemoteReferenceDV (const Tag &tag) const
 
__INLINE varVariable (const Tag &tag) const
 Retrieve variable reference associated with Tag. More...
 
__INLINE varVariableDF (const Tag &tag) const
 
__INLINE varVariableDV (const Tag &tag) const
 
__INLINE var_array VariableArray (const Tag &tag) const
 Retrieve array of variables associated with Tag. More...
 
__INLINE var_array VariableArrayDF (const Tag &tag) const
 
__INLINE var_array VariableArrayDV (const Tag &tag) const
 
__INLINE INMOST_DATA_ENUM_TYPE GetDataSize (const Tag &tag) const
 
__INLINE INMOST_DATA_ENUM_TYPE GetDataCapacity (const Tag &tag) const
 
__INLINE void SetDataSize (const Tag &tag, INMOST_DATA_ENUM_TYPE new_size) const
 
__INLINE void GetData (const Tag &tag, INMOST_DATA_ENUM_TYPE shift, INMOST_DATA_ENUM_TYPE size, void *data) const
 
__INLINE void SetData (const Tag &tag, INMOST_DATA_ENUM_TYPE shift, INMOST_DATA_ENUM_TYPE size, const void *data) const
 
__INLINE void DelData (const Tag &tag) const
 
__INLINE void DelSparseData (const Tag &tag) const
 Deallocates space allocated for sparse data, frees variable array if necessary. More...
 
__INLINE void DelDenseData (const Tag &tag) const
 Frees variable array or fills field with zeroes. More...
 
__INLINE bool HaveData (const Tag &tag) const
 Check if any data is associated with Tag. More...
 
__INLINE ElementType GetElementType () const
 
__INLINE integer GetElementNum () const
 
__INLINE void SetMarker (MarkerType n) const
 
__INLINE bool GetMarker (MarkerType n) const
 
__INLINE void RemMarker (MarkerType n) const
 
__INLINE void SetPrivateMarker (MarkerType n) const
 
__INLINE bool GetPrivateMarker (MarkerType n) const
 
__INLINE void RemPrivateMarker (MarkerType n) const
 
__INLINE void ClearMarkerSpace () const
 
__INLINE void GetMarkerSpace (bulk copy[MarkerFields]) const
 
__INLINE void SetMarkerSpace (bulk source[MarkerFields]) const
 
__INLINE integer LocalID () const
 
__INLINE integer DataLocalID () const
 
__INLINE bool isValid () const
 
__INLINE MeshGetMeshLink () const
 
__INLINE HandleType GetHandle () const
 
__INLINE Element getAsElement () const
 
__INLINE Node getAsNode () const
 
__INLINE Edge getAsEdge () const
 
__INLINE Face getAsFace () const
 
__INLINE Cell getAsCell () const
 
__INLINE ElementSet getAsSet () const
 

Static Public Member Functions

static const char * GeometricTypeName (GeometricType t)
 
static integer GetGeometricDimension (GeometricType m_type)
 
static const char * StatusName (Status s)
 
static bool CheckConnectivity (Mesh *m)
 

Static Public Attributes

static const GeometricType Unset = 0
 
static const GeometricType Vertex = 1
 
static const GeometricType Line = 2
 
static const GeometricType MultiLine = 3
 
static const GeometricType Tri = 4
 
static const GeometricType Quad = 5
 
static const GeometricType Polygon = 6
 
static const GeometricType MultiPolygon = 7
 
static const GeometricType Tet = 8
 
static const GeometricType Hex = 9
 
static const GeometricType Prism = 10
 
static const GeometricType Pyramid = 11
 
static const GeometricType Polyhedron = 12
 
static const GeometricType Set = 253
 
static const GeometricType MeshPart = 254
 
static const GeometricType MaxType = 255
 
static const Status Owned = 1
 
static const Status Shared = 2
 
static const Status Ghost = 4
 
static const Status Any = 0
 

Protected Member Functions

void SetGeometricType (GeometricType t)
 

Additional Inherited Members

- Protected Attributes inherited from INMOST::Storage
HandleType handle
 
HandleTypehandle_link
 

Detailed Description

Definition at line 280 of file inmost_mesh.h.

Member Typedef Documentation

Definition at line 311 of file inmost_mesh.h.

Definition at line 313 of file inmost_mesh.h.

Definition at line 310 of file inmost_mesh.h.

Definition at line 312 of file inmost_mesh.h.

Definition at line 314 of file inmost_mesh.h.

Definition at line 283 of file inmost_mesh.h.

Definition at line 303 of file inmost_mesh.h.

Constructor & Destructor Documentation

INMOST::Element::Element ( )
inline

Definition at line 321 of file inmost_mesh.h.

Here is the caller graph for this function:

INMOST::Element::Element ( Mesh m,
HandleType  h 
)
inline

Definition at line 322 of file inmost_mesh.h.

INMOST::Element::Element ( Mesh m,
HandleType h 
)
inline

Definition at line 323 of file inmost_mesh.h.

INMOST::Element::Element ( const Element other)
inline

Definition at line 324 of file inmost_mesh.h.

virtual INMOST::Element::~Element ( )
inlinevirtual

Definition at line 330 of file inmost_mesh.h.

Member Function Documentation

void INMOST::Element::Barycenter ( real cnt) const
bool INMOST::Element::Boundary ( ) const
ElementArray<Element> INMOST::Element::BridgeAdjacencies ( ElementType  Bridge,
ElementType  Dest,
MarkerType  mask = 0,
bool  invert_mask = false 
) const
ElementArray<Cell> INMOST::Element::BridgeAdjacencies2Cell ( ElementType  Bridge,
MarkerType  mask = 0,
bool  invert_mask = false 
) const
ElementArray<Edge> INMOST::Element::BridgeAdjacencies2Edge ( ElementType  Bridge,
MarkerType  mask = 0,
bool  invert_mask = false 
) const
ElementArray<Face> INMOST::Element::BridgeAdjacencies2Face ( ElementType  Bridge,
MarkerType  mask = 0,
bool  invert_mask = false 
) const
ElementArray<Node> INMOST::Element::BridgeAdjacencies2Node ( ElementType  Bridge,
MarkerType  mask = 0,
bool  invert_mask = false 
) const
void INMOST::Element::CastRay ( real pos,
real dir,
dynarray< std::pair< Element, real >, 16 > &  hits 
) const
void INMOST::Element::Centroid ( real cnt) const
static bool INMOST::Element::CheckConnectivity ( Mesh m)
static
bool INMOST::Element::CheckElementConnectivity ( ) const
void INMOST::Element::ComputeGeometricType ( ) const
void INMOST::Element::Connect ( const HandleType adjacent,
INMOST_DATA_ENUM_TYPE  num 
) const

Connects lower adjacencies to current element. Geometric data and cell nodes are updated automatically.

Todo:
  1. Asserts in this function should be replaced by Topography checks.
  2. This function should be used for construction of elements instead of current implementation.
  3. Should correctly account for order of edges (may be implemented through CheckEdgeOrder, FixEdgeOrder).
bool INMOST::Element::Delete ( )
Warning
This function will not resolve an ierarchical strucutre of ElementSet, use ElemnetSet::DeleteSet instead
void INMOST::Element::Disconnect ( bool  delete_upper_adjacent) const
void INMOST::Element::Disconnect ( const HandleType adjacent,
INMOST_DATA_ENUM_TYPE  num 
) const

Disconnect element. Disconnects nodes from this edge, edges from this face, faces from this cell, cannot disconnect cells from this node;
Disconnects edges from this node, faces from this edge, cells from this face, cannot disconnect nodes from this cell;
Updates geometric data and cell nodes automatically.

static const char* INMOST::Element::GeometricTypeName ( GeometricType  t)
static
virtual ElementArray<Element> INMOST::Element::getAdjElements ( ElementType  etype) const
virtual

Retrieve unordered array of adjacent elements. If you care about orderness of nodes for face you should you Face::getNodes() instead. If you want faster access you may use direct access to handles stored in memory through Mesh::HighConn for upper adjacencies and Mesh::LowConn for lower adjacencies.

Parameters
etypebitwise mask of element types
Returns
array of elements

Reimplemented in INMOST::ElementSet.

virtual ElementArray<Element> INMOST::Element::getAdjElements ( ElementType  etype,
MarkerType  mask,
bool  invert_mask = false 
) const
virtual

Retrieve unordered array of adjacent elements with marker.

Parameters
etypebitwise mask of element types
maskmarker to be set
invert_maskif true then those are selected on wich marker is not set
Returns
array of elements

Reimplemented in INMOST::ElementSet.

virtual ElementArray<Cell> INMOST::Element::getCells ( ) const
virtual

Return all the cells of the element.

For a node returns unordered set of cells.

For an edge returns unordered set of cells.

For a face returns a pair of cells. In the case Face::CheckNormalOrientation returns true then the normal points from the first cell to the second and in oppisite direction otherwise.

For a cell returns itself.

Returns
array of elements
See Also
Face::FaceOrientedOutside

Reimplemented in INMOST::ElementSet, INMOST::Face, INMOST::Edge, and INMOST::Node.

virtual ElementArray<Cell> INMOST::Element::getCells ( MarkerType  mask,
bool  invert_mask = false 
) const
virtual
virtual ElementArray<Edge> INMOST::Element::getEdges ( ) const
virtual

Retrieve all the edges of the element.

For a node returns unordered set of edges.

For an edge returns itself.

For a face returns ordered set of edges.

For a cell returns unordered set of edges.

Returns
array of elements

Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Face, and INMOST::Node.

virtual ElementArray<Edge> INMOST::Element::getEdges ( MarkerType  mask,
bool  invert_mask = false 
) const
virtual
unsigned int INMOST::Element::GetElementDimension ( ) const
inline

Definition at line 426 of file inmost_mesh.h.

Here is the call graph for this function:

virtual ElementArray<Face> INMOST::Element::getFaces ( ) const
virtual

Retrieve all the faces of the element.

For a node returns unordered set of faces.

For an edge returns unordered set of faces.

For a face returns itself.

For a cell return ordered set of faces. The order of faces in the cell is preserved from the first construction.

Returns
array of elements

Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Edge, and INMOST::Node.

virtual ElementArray<Face> INMOST::Element::getFaces ( MarkerType  mask,
bool  invert_mask = false 
) const
virtual
static integer INMOST::Element::GetGeometricDimension ( GeometricType  m_type)
static

Here is the caller graph for this function:

GeometricType INMOST::Element::GetGeometricType ( ) const

Here is the caller graph for this function:

virtual ElementArray<Node> INMOST::Element::getNodes ( ) const
virtual

Retrieve all the nodes of the element.

For a node returns itself.

For an edge returns ordered pair of nodes. The order of nodes in the edge is preserved from the first construction.

For a face returns ordered set of nodes. In the case Face::CheckNormalOrientation returns true the order of nodes will follow right hand side rule with respect to normal vector, otherwise it follows left hand side rule with respect to normal vector.

For a cell returns the same order that was provided through suggest_nodes_oreder in Mesh::CreateCell. In the case suggest_nodes_order was not provided, the order of nodes follows VTK format for known types of elements such as Element::Tet, Element::Prism, Element::Hex, Element::Pyramid. For a general polyhedron the order is unspecified.

Returns
array of elements
See Also
Face::CheckNormalOrientation
Face::FaceOrientedOutside

Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Face, and INMOST::Edge.

virtual ElementArray<Node> INMOST::Element::getNodes ( MarkerType  mask,
bool  invert_mask = false 
) const
virtual
Status INMOST::Element::GetStatus ( ) const
Storage::integer& INMOST::Element::GlobalID ( ) const
bool INMOST::Element::Hidden ( ) const
bool INMOST::Element::Hide ( ) const
Storage::real INMOST::Element::Mean ( real(*)(real *x, real t)  func,
real  time 
) const
virtual enumerator INMOST::Element::nbAdjElements ( ElementType  etype) const
virtual

Retrieve number of adjacent elements. For etype you can either pass one type as CELL, or several types as bitwise mask: NODE | CELL.

Parameters
etypebitwise mask of element types
Returns
number of adjacent elements.

Reimplemented in INMOST::ElementSet.

virtual enumerator INMOST::Element::nbAdjElements ( ElementType  etype,
MarkerType  mask,
bool  invert_mask = false 
) const
virtual

Retrieve number of adjacent elements with marker. As etype you can either pass one type as CELL, or several types as bitwise mask: NODE | CELL

Parameters
etypebitwise mask of element types
maskmarker to be set
invert_maskif true then those are selected on wich marker is not set
Returns
number of adjacent elements.

Reimplemented in INMOST::ElementSet.

bool INMOST::Element::New ( ) const
Element* INMOST::Element::operator-> ( )
inline

Definition at line 326 of file inmost_mesh.h.

const Element* INMOST::Element::operator-> ( ) const
inline

Definition at line 327 of file inmost_mesh.h.

Element& INMOST::Element::operator= ( Element const &  other)
inline

Definition at line 325 of file inmost_mesh.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool INMOST::Element::Planarity ( ) const
void INMOST::Element::PrintElementConnectivity ( ) const
Element& INMOST::Element::self ( )
inline

Definition at line 328 of file inmost_mesh.h.

const Element& INMOST::Element::self ( ) const
inline

Definition at line 329 of file inmost_mesh.h.

void INMOST::Element::SetGeometricType ( GeometricType  t)
protected
void INMOST::Element::SetStatus ( Status  status) const
bool INMOST::Element::Show ( ) const
static const char* INMOST::Element::StatusName ( Status  s)
static
void INMOST::Element::UpdateGeometricData ( ) const

Update geometric data for element, calls RecomputeGeometricData from Mesh.

Member Data Documentation

const Status INMOST::Element::Any = 0
static

Definition at line 307 of file inmost_mesh.h.

const Status INMOST::Element::Ghost = 4
static

Definition at line 306 of file inmost_mesh.h.

const GeometricType INMOST::Element::Hex = 9
static

Definition at line 293 of file inmost_mesh.h.

const GeometricType INMOST::Element::Line = 2
static

Definition at line 286 of file inmost_mesh.h.

const GeometricType INMOST::Element::MaxType = 255
static

Definition at line 299 of file inmost_mesh.h.

const GeometricType INMOST::Element::MeshPart = 254
static

Definition at line 298 of file inmost_mesh.h.

const GeometricType INMOST::Element::MultiLine = 3
static

Definition at line 287 of file inmost_mesh.h.

const GeometricType INMOST::Element::MultiPolygon = 7
static

Definition at line 291 of file inmost_mesh.h.

const Status INMOST::Element::Owned = 1
static

Definition at line 304 of file inmost_mesh.h.

const GeometricType INMOST::Element::Polygon = 6
static

Definition at line 290 of file inmost_mesh.h.

const GeometricType INMOST::Element::Polyhedron = 12
static

Definition at line 296 of file inmost_mesh.h.

const GeometricType INMOST::Element::Prism = 10
static

Definition at line 294 of file inmost_mesh.h.

const GeometricType INMOST::Element::Pyramid = 11
static

Definition at line 295 of file inmost_mesh.h.

const GeometricType INMOST::Element::Quad = 5
static

Definition at line 289 of file inmost_mesh.h.

const GeometricType INMOST::Element::Set = 253
static

Definition at line 297 of file inmost_mesh.h.

const Status INMOST::Element::Shared = 2
static

Definition at line 305 of file inmost_mesh.h.

const GeometricType INMOST::Element::Tet = 8
static

Definition at line 292 of file inmost_mesh.h.

const GeometricType INMOST::Element::Tri = 4
static

Definition at line 288 of file inmost_mesh.h.

const GeometricType INMOST::Element::Unset = 0
static

Definition at line 284 of file inmost_mesh.h.

const GeometricType INMOST::Element::Vertex = 1
static

Definition at line 285 of file inmost_mesh.h.


The documentation for this class was generated from the following file: