INMOST
A toolkit for distributed mathematical modeling
|
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. | |
typedef INMOST_DATA_INTEGER_TYPE | integer |
Storage type for representing integer values. | |
typedef INMOST_DATA_BULK_TYPE | bulk |
Storage type for representing one byte of abstract data. | |
typedef INMOST_DATA_ENUM_TYPE | enumerator |
type for representing unsigned integer values. | |
typedef HandleType | reference |
Storage type for representing references to Element. | |
typedef RemoteHandleType | remote_reference |
Storage type for representing references to Element in another Mesh. | |
typedef shell< real > | real_array |
Storage type for representing arrays of real values. | |
typedef shell< integer > | integer_array |
Storage type for representing arrays of integer values. | |
typedef shell< bulk > | bulk_array |
Storage type for representing abstract data as a series of bytes. | |
typedef variable | var |
Storage type for representing real value with vector of variations. | |
typedef shell< variable > | var_array |
Storage type for representing array of values with vectors of variations. | |
Public Member Functions | |
Element (Mesh *m, HandleType h) | |
Element (Mesh *m, HandleType *h) | |
Element (const Element &other) | |
Element & | operator= (Element const &other) |
Element * | operator-> () |
const Element * | operator-> () const |
Element & | self () |
const Element & | self () const |
virtual enumerator | nbAdjElements (ElementType etype) const |
Retrieve number of adjacent elements. More... | |
virtual ElementArray< Element > | getAdjElements (ElementType etype) const |
Retrieve unordered array of adjacent elements. More... | |
virtual enumerator | nbAdjElements (ElementType etype, MarkerType mask, bool invert_mask=false) const |
Retrieve number of adjacent elements with marker. More... | |
virtual ElementArray< Element > | getAdjElements (ElementType etype, MarkerType mask, bool invert_mask=false) const |
Retrieve unordered array of adjacent elements with marker. More... | |
ElementArray< Element > | BridgeAdjacencies (ElementType Bridge, ElementType Dest, MarkerType bridge_mask=0, bool bridge_invert=false, MarkerType target_mask=0, bool target_invert=false) const |
ElementArray< Node > | BridgeAdjacencies2Node (ElementType Bridge, MarkerType bridge_mask=0, bool bridge_invert=false, MarkerType target_mask=0, bool target_invert=false) const |
ElementArray< Edge > | BridgeAdjacencies2Edge (ElementType Bridge, MarkerType bridge_mask=0, bool bridge_invert=false, MarkerType target_mask=0, bool target_invert=false) const |
ElementArray< Face > | BridgeAdjacencies2Face (ElementType Bridge, MarkerType bridge_mask=0, bool bridge_invert=false, MarkerType target_mask=0, bool target_invert=false) const |
ElementArray< Cell > | BridgeAdjacencies2Cell (ElementType Bridge, MarkerType bridge_mask=0, bool bridge_invert=false, MarkerType target_mask=0, bool target_invert=false) const |
virtual ElementArray< Node > | getNodes () const |
Retrieve all the nodes of the element. More... | |
virtual ElementArray< Edge > | getEdges () const |
Retrieve all the edges of the element. More... | |
virtual ElementArray< Face > | getFaces () const |
Retrieve all the faces of the element. More... | |
virtual ElementArray< Cell > | getCells () const |
Return all the cells of the element. More... | |
virtual ElementArray< Node > | getNodes (MarkerType mask, bool invert_mask=false) const |
virtual ElementArray< Edge > | getEdges (MarkerType mask, bool invert_mask=false) const |
virtual ElementArray< Face > | getFaces (MarkerType mask, bool invert_mask=false) const |
virtual ElementArray< Cell > | getCells (MarkerType mask, bool invert_mask=false) const |
GeometricType | GetGeometricType () const |
unsigned int | GetElementDimension () const |
Status | GetStatus () const |
void | SetStatus (Status status) const |
Storage::integer & | GlobalID () const |
bool | CheckElementConnectivity () const |
void | PrintElementConnectivity () const |
void | CastRay (const real *pos, const real *dir, std::map< HandleType, real > &hits) const |
void | ComputeGeometricType () const |
void | Centroid (real *cnt) const |
void | Barycenter (real *cnt) const |
Storage::real | Mean (const MeanFunc &f, real time) const |
Storage::real | Mean (real(*func)(real *x, real t), real time) const |
bool | Boundary () const |
Determine that the element is on the boundary. More... | |
bool | Planarity () const |
bool | Hide () const |
If the function returns true then element was hidden, works only inside BeginModification and EndModification, on EndModification all Hidden elements are deleted. More... | |
bool | Show () const |
If the function returns true then element was recovered from hidden state, works only inside BeginModification and EndModification. More... | |
bool | Delete () |
Remove element from mesh. More... | |
bool | Hidden () const |
bool | New () const |
void | Disconnect (bool delete_upper_adjacent) const |
void | Disconnect (const HandleType *adjacent, INMOST_DATA_ENUM_TYPE num) const |
Disconnect element. More... | |
void | Connect (const HandleType *adjacent, INMOST_DATA_ENUM_TYPE num) const |
Connects lower adjacencies to current element. More... | |
void | SendTo (std::set< Storage::integer > &procs) const |
Update geometric data for element, calls RecomputeGeometricData from Mesh. More... | |
void | SendTo (std::vector< Storage::integer > &procs) const |
void | SendTo (Storage::integer_array procs) const |
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. | |
Storage & | operator= (Storage const &other) |
If there is a link to handle provided (automatically by ElementArray and reference_array), then remote handle value will be modified. | |
__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 bool | operator!= (const Storage &other) const |
__INLINE Storage * | operator-> () |
__INLINE const Storage * | operator-> () const |
__INLINE Storage & | self () |
__INLINE const Storage & | self () const |
__INLINE real & | Real (const Tag &tag) const |
Retrieve real value associated with Tag. More... | |
__INLINE integer & | Integer (const Tag &tag) const |
Retrieve integer value associated with Tag. More... | |
__INLINE bulk & | Bulk (const Tag &tag) const |
Retrieve one byte of abstract data associated with Tag. More... | |
__INLINE reference & | Reference (const Tag &tag) const |
Retrieve Element reference associated with Tag. More... | |
__INLINE remote_reference & | RemoteReference (const Tag &tag) const |
Retrieve remote Element reference associated with Tag. More... | |
__INLINE real_array | RealArray (const Tag &tag) const |
Retrieve array of real values associated with Tag. More... | |
__INLINE integer_array | IntegerArray (const Tag &tag) const |
Retrieve array of integer values associated with Tag. More... | |
__INLINE bulk_array | BulkArray (const Tag &tag) const |
Retrieve abstract data associated with Tag as a series of bytes. More... | |
__INLINE reference_array | ReferenceArray (const Tag &tag) const |
Retrieve array of Element references associated with Tag. More... | |
__INLINE remote_reference_array | RemoteReferenceArray (const Tag &tag) const |
Retrieve array of Element references associated with Tag. More... | |
__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 real & | RealDF (const Tag &tag) const |
__INLINE integer & | IntegerDF (const Tag &tag) const |
__INLINE bulk & | BulkDF (const Tag &tag) const |
__INLINE reference & | ReferenceDF (const Tag &tag) const |
__INLINE remote_reference & | RemoteReferenceDF (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 real & | RealDV (const Tag &tag) const |
__INLINE integer & | IntegerDV (const Tag &tag) const |
__INLINE bulk & | BulkDV (const Tag &tag) const |
__INLINE reference & | ReferenceDV (const Tag &tag) const |
__INLINE remote_reference & | RemoteReferenceDV (const Tag &tag) const |
__INLINE var & | Variable (const Tag &tag) const |
Retrieve variable reference associated with Tag. | |
__INLINE var & | VariableDF (const Tag &tag) const |
__INLINE var & | VariableDV (const Tag &tag) const |
__INLINE var_array | VariableArray (const Tag &tag) const |
Retrieve array of variables associated with Tag. | |
__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 |
Return the data length associated with Tag. More... | |
__INLINE INMOST_DATA_ENUM_TYPE | GetDataCapacity (const Tag &tag) const |
Return the size of the structure required to represent the data on current element. More... | |
__INLINE void | SetDataSize (const Tag &tag, INMOST_DATA_ENUM_TYPE new_size) const |
Set the length of data associated with Tag. More... | |
__INLINE void | GetData (const Tag &tag, INMOST_DATA_ENUM_TYPE shift, INMOST_DATA_ENUM_TYPE size, void *data) const |
Extract part of the data associated with Tag. More... | |
__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 bool | DelSparseData (const Tag &tag) const |
Deallocates space allocated for sparse data, frees variable array if necessary. | |
__INLINE void | DelDenseData (const Tag &tag) const |
Frees variable array or fills field with zeroes. | |
__INLINE bool | HaveData (const Tag &tag) const |
Check if any data is associated with Tag. | |
__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 |
This number is guaranteed to be between 0 and Mesh::NumberOf(type of element) after Mesh::ReorderEmpty. | |
__INLINE bool | isValid () const |
__INLINE Mesh * | GetMeshLink () 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) |
Protected Member Functions | |
void | SetGeometricType (GeometricType t) |
Additional Inherited Members | |
Protected Attributes inherited from INMOST::Storage | |
HandleType | handle |
HandleType * | handle_link |
Definition at line 289 of file inmost_mesh.h.
bool INMOST::Element::Boundary | ( | ) | const |
Determine that the element is on the boundary.
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.
bool INMOST::Element::Delete | ( | ) |
Remove element from mesh.
If you call this function inside modification phase, see Mesh::BeginModification and Mesh::EndModification, and the element was not created during modification phase (not marked as Element::New), then the element will not be actually destroyed but hidden. You can restore all the hidden elements by using Mesh::ToggleModification.
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.
|
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.
etype | bitwise mask of element types |
Reimplemented in INMOST::ElementSet.
|
virtual |
Retrieve unordered array of adjacent elements with marker.
etype | bitwise mask of element types |
mask | marker to be set |
invert_mask | if true then those are selected on wich marker is not set |
Reimplemented in INMOST::ElementSet.
|
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 opposite direction otherwise.
For a cell returns itself.
Reimplemented in INMOST::ElementSet, INMOST::Face, INMOST::Edge, and INMOST::Node.
|
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.
Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Face, and INMOST::Node.
|
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.
Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Edge, and INMOST::Node.
|
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_order 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.
Reimplemented in INMOST::ElementSet, INMOST::Cell, INMOST::Face, and INMOST::Edge.
bool INMOST::Element::Hide | ( | ) | const |
If the function returns true then element was hidden, works only inside BeginModification and EndModification, on EndModification all Hidden elements are deleted.
|
virtual |
Retrieve number of adjacent elements.
For etype you can either pass one type as CELL, or several types as bitwise mask: NODE | CELL.
etype | bitwise mask of element types |
Reimplemented in INMOST::ElementSet.
|
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
etype | bitwise mask of element types |
mask | marker to be set |
invert_mask | if true then those are selected on wich marker is not set |
Reimplemented in INMOST::ElementSet.
void INMOST::Element::SendTo | ( | std::set< Storage::integer > & | procs | ) | const |
Update geometric data for element, calls RecomputeGeometricData from Mesh.
Marks element to be sent to remote processors that current processor don't belong to. Call Mesh::ExchangeMarked to perform the exchange.
bool INMOST::Element::Show | ( | ) | const |
If the function returns true then element was recovered from hidden state, works only inside BeginModification and EndModification.