INMOST
A toolkit for distributed mathematical modeling
|
Classes | |
class | iterator |
Public Types | |
typedef INMOST_DATA_BULK_TYPE | ComparatorType |
Public Types inherited from INMOST::Element | |
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 | |
ElementSet (Mesh *m, HandleType h) | |
ElementSet (Mesh *m, HandleType *h) | |
ElementSet (const ElementSet &other) | |
__INLINE ElementSet & | operator= (ElementSet const &other) |
__INLINE ElementSet * | operator-> () |
__INLINE const ElementSet * | operator-> () const |
__INLINE ElementSet & | self () |
__INLINE const ElementSet & | self () const |
std::string | GetName () const |
Get name of the set. | |
ElementSet | GetParent () const |
Retrieve parent of the set. | |
ElementSet | GetSibling () const |
Retrieve sibling set of the set, this will be next child for the parent. | |
ElementSet | GetChild () const |
Retrieve child set of the set. More... | |
void | AddSibling (const ElementSet &sibling) const |
This will create new child for the parent. | |
void | AddChild (const ElementSet &child) const |
Add child to current set. | |
void | RemSibling (const ElementSet &sibling) const |
This will erase sibling or parent's child. | |
void | RemChild (const ElementSet &child) const |
This will erase my child. | |
enumerator | CountSiblings () const |
How many there are siblings to the right of me including me. | |
enumerator | CountChildren () const |
How many children I have. | |
bool | HaveSibling () const |
bool | HaveParent () const |
bool | HaveChild () const |
HandleType * | getHandles () const |
Direct raw access to stored elements, no copy involved. More... | |
enumerator | nbHandles () const |
Retrieve number of stored handles, including invalid. More... | |
enumerator | nbSorted () const |
Retrieve position after last sorted element. More... | |
enumerator | nbAdjElements (ElementType etype) const |
Retrieve all elements by type. | |
enumerator | nbAdjElements (ElementType etype, MarkerType select, bool invert=false) const |
Retrieve number of adjacent elements with marker. More... | |
ElementArray< Element > | getAdjElements (ElementType etype) const |
Retrieve all elements by type. | |
ElementArray< Element > | getAdjElements (ElementType etype, MarkerType select, bool invert=false) const |
Retrieve unordered array of adjacent elements with marker. More... | |
ElementArray< Node > | getNodes () const |
Retrieve only nodes. | |
ElementArray< Node > | getNodes (MarkerType select, bool invert=false) const |
ElementArray< Edge > | getEdges () const |
Retrieve only edges. | |
ElementArray< Edge > | getEdges (MarkerType select, bool invert=false) const |
ElementArray< Face > | getFaces () const |
Retrieve only faces. | |
ElementArray< Face > | getFaces (MarkerType select, bool invert=false) const |
ElementArray< Cell > | getCells () const |
Retrieve only cells. | |
ElementArray< Cell > | getCells (MarkerType select, bool invert=false) const |
void | PutElement (HandleType e) const |
Put one element without checking of the existence of duplicate. More... | |
void | PutElement (const Storage &e) const |
Put one element without checking of the existence of duplicate. More... | |
void | PutElements (const HandleType *handles, enumerator num) const |
Put multiple handles without checking of the existence of duplicate. | |
void | PutElements (const ElementSet &other) const |
Put multiple handles of the other set without checking of the existence of duplicate. | |
template<typename EType > | |
void | PutElements (const ElementArray< EType > &elems) const |
Put multiple handles without checking. | |
void | AddElement (HandleType e) const |
Put one element with checking of the existence of duplicate. More... | |
void | AddElement (const Storage &e) const |
Put one element with checking of the existence of duplicate. More... | |
void | AddElements (const HandleType *handles, enumerator num) const |
Add multiple elements with checking of the existence of duplicate. More... | |
void | AddElements (const ElementSet &other) |
Add elements of other set. | |
template<typename EType > | |
void | AddElements (const ElementArray< EType > &elems) const |
Add multiple elements with checking of the existence of duplicate. | |
void | RemoveElement (const Storage &e) const |
void | RemoveElements (const HandleType *handles, enumerator num) const |
template<typename EType > | |
void | RemoveElements (const ElementArray< EType > &elems) const |
Remove multiple elements from the set. | |
ElementArray< Element > | Union (const ElementSet &other) const |
Compute and return union with other set. More... | |
ElementArray< Element > | Union (const HandleType *handles, enumerator num) const |
Compute and return union with raw handles. More... | |
template<typename EType > | |
ElementArray< Element > | Union (const ElementArray< EType > &elems) const |
Compute and return union with elements. | |
ElementArray< Element > | Difference (const ElementSet &other) const |
ElementArray< Element > | Difference (const HandleType *handles, enumerator num) const |
Compute and return difference with raw handles. More... | |
template<typename EType > | |
ElementArray< Element > | Difference (const ElementArray< EType > &elems) const |
Compute and return difference with elements. | |
ElementArray< Element > | Intersection (const ElementSet &other) const |
ElementArray< Element > | Intersection (const HandleType *handles, enumerator num) const |
Compute and return intersection with raw handles. More... | |
template<typename EType > | |
ElementArray< Element > | Intersection (const ElementArray< EType > &elems) const |
Compute and return intersection with elements. | |
void | Unite (const ElementSet &other) const |
Compute and store union with raw handles. | |
void | Unite (const HandleType *handles, enumerator num) const |
Compute and store union with raw handles. | |
template<typename EType > | |
void | Unite (const ElementArray< EType > &elems) const |
Compute and store union with elements. | |
void | Subtract (const ElementSet &other) const |
Compute and store difference with raw handles. More... | |
void | Subtract (const HandleType *handles, enumerator num) const |
Compute and store difference with raw handles. | |
template<typename EType > | |
void | Subtract (const ElementArray< EType > &elems) const |
Compute and store difference with elements. | |
void | Intersect (const ElementSet &other) const |
Compute and store intersection with raw handles. | |
void | Intersect (const HandleType *handles, enumerator num) const |
Compute and store intersection with raw handles. | |
template<typename EType > | |
void | Intersect (const ElementArray< EType > &elems) const |
Compute and store intersection with elements. | |
void | SortSet (ComparatorType comp) const |
Performs sort of the set of elements. More... | |
Element | FindElementByGlobalID (integer global_id) const |
Sets the synchronization regime for set elements. More... | |
Element | FindElementByCentroid (real *centroid) const |
Perform binary search by centroid. More... | |
bool | FindHandle (HandleType h, bool use_comparator) const |
Performs linear search in unsorted set. More... | |
void | SetMarkerElements (MarkerType m, ElementType etype=ESET|CELL|FACE|EDGE|NODE) const |
Set markers on all the elements of given type. | |
void | SetPrivateMarkerElements (MarkerType m, ElementType etype=ESET|CELL|FACE|EDGE|NODE) const |
void | RemMarkerElements (MarkerType m, ElementType etype=ESET|CELL|FACE|EDGE|NODE) const |
Remove markers from all the elements of given type. | |
void | RemPrivateMarkerElements (MarkerType m, ElementType etype=ESET|CELL|FACE|EDGE|NODE) const |
iterator | Begin () const |
Provides forward iterator that skips deleted and hidden elements within set. More... | |
iterator | End () const |
Provides end for forward iterator to stop the loop. More... | |
iterator | EndSorted () const |
Provides iterator that points to element located after the last element that belong to presorted part of the set as well as on the first element of unsorted part. More... | |
iterator | Erase (iterator pos) const |
Erase one element pointed by iterator and return next valid element. | |
void | Erase (iterator beg, iterator end) const |
Erase set of elements pointed by iterators. | |
ComparatorType | GetComparator () const |
Retrieve current set comparator. | |
void | ReorderEmpty () const |
Retrieve current set exchange type. More... | |
bool | Empty () const |
Is there any elements in the set. | |
enumerator | Size () const |
Get total number of elements. | |
void | Clear () |
Remove all elements, clear all data, removes sorted marker. | |
bool | DeleteSet () |
Remove the set and resolve it's hierarchical structure. More... | |
bool | DeleteSetTree () |
Remove the set and all it's children. More... | |
void | SynchronizeSetElements () |
Asks all the elements to be sent to other processors. More... | |
void | SynchronizeSetElementsWithOwner () |
Asks all the elements of ghost sets to be sent to the owner processors. More... | |
void | SynchronizeSetChildren () |
Asks all the children to be sent to other processors. More... | |
void | SynchronizeSetParents () |
Asks all the parents upwards to be sent to other processors. More... | |
Public Member Functions inherited from INMOST::Element | |
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 |
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 |
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 __INLINE HandleType & | hParent (Element::adj_type &arr) |
static __INLINE HandleType & | hSibling (Element::adj_type &arr) |
static __INLINE HandleType & | hChild (Element::adj_type &arr) |
static __INLINE HandleType & | hSorted (Element::adj_type &arr) |
Static Public Member Functions inherited from INMOST::Element | |
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 enumerator | high_conn_reserved = 4 |
Number of reserved positions in HighConn array. More... | |
static const ComparatorType | UNSORTED_COMPARATOR = 0 |
static const ComparatorType | GLOBALID_COMPARATOR = 1 |
static const ComparatorType | CENTROID_COMPARATOR = 2 |
static const ComparatorType | HIERARCHY_COMPARATOR = 3 |
static const ComparatorType | HANDLE_COMPARATOR = 4 |
Static Public Attributes inherited from INMOST::Element | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from INMOST::Element | |
void | SetGeometricType (GeometricType t) |
Protected Attributes inherited from INMOST::Storage | |
HandleType | handle |
HandleType * | handle_link |
Definition at line 960 of file inmost_mesh.h.
|
inline |
Put one element with checking of the existence of duplicate.
Preserves order for sorted set, thus may be expensive.
Definition at line 1081 of file inmost_mesh.h.
void INMOST::ElementSet::AddElement | ( | HandleType | e | ) | const |
Put one element with checking of the existence of duplicate.
Preserves order for sorted set, thus may be expensive.
void INMOST::ElementSet::AddElements | ( | const HandleType * | handles, |
enumerator | num | ||
) | const |
Add multiple elements with checking of the existence of duplicate.
Preserves order for sorted set, thus may be expensive. This will also remove any duplicates in unsorted part of the set. If you inserted duplicated elements through PutElements into previously sorted array then this operation does not guarantee that those duplications will be stored.
iterator INMOST::ElementSet::Begin | ( | ) | const |
Provides forward iterator that skips deleted and hidden elements within set.
The iterator will be valid during removal or insertion of elements. While that may seem useful, many functions like AddElements, SortSet, Union will internally reorder handles thus making iterators useless. To correctly resolve situation when size of array shrink due to removal of elements use less than (<) instead of not equal (!=) operator to check for end of the loop. Note that iterators would not let you change underlying handles, you can use getHandles for that instead.
bool INMOST::ElementSet::DeleteSet | ( | ) |
Remove the set and resolve it's hierarchical structure.
This will not remove childrens of the tree. To remove set as a tree, see ElementSet::DeleteSetTree.
bool INMOST::ElementSet::DeleteSetTree | ( | ) |
Remove the set and all it's children.
ElementArray<Element> INMOST::ElementSet::Difference | ( | const HandleType * | handles, |
enumerator | num | ||
) | const |
Compute and return difference with raw handles.
If initial set was ordered, result will preserve the order. All elements will be unique.
iterator INMOST::ElementSet::End | ( | ) | const |
Provides end for forward iterator to stop the loop.
iterator INMOST::ElementSet::EndSorted | ( | ) | const |
Provides iterator that points to element located after the last element that belong to presorted part of the set as well as on the first element of unsorted part.
Perform binary search by centroid.
In set sorted with CENTROID_COMPARATOR in O(log(n)) time otherwise search needs O(n) comparisons
Sets the synchronization regime for set elements.
comp | one of the synchronization types from description. Perform binary search by global id. In set sorted with GLOBALID_COMPARATOR in O(log(n)) time otherwise search needs O(n) comparisons |
bool INMOST::ElementSet::FindHandle | ( | HandleType | h, |
bool | use_comparator | ||
) | const |
Performs linear search in unsorted set.
If you have a lot of elements to test against set, then you'd better first put marker on elements of the set by SetMarkerElements then test which of your elements have marker and then remove markers by RemMarkerElements. This will consume only O(n+m) operations where n is the number of my elements and m is the size of the test set.
h | handle of element |
use_comparator | use information about current comparator or perform linear search |
|
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 from INMOST::Element.
ElementSet INMOST::ElementSet::GetChild | ( | ) | const |
Retrieve child set of the set.
Following example shows how to iterate through children of current set: for(ElementSet it = set->GetChild(); it->isValid(); it = it->GetSibling()) ...
HandleType* INMOST::ElementSet::getHandles | ( | ) | const |
Direct raw access to stored elements, no copy involved.
The actual pointer may change when you add new elements due to reallocation of memory. Modify at your own risk.
ElementArray<Element> INMOST::ElementSet::Intersection | ( | const HandleType * | handles, |
enumerator | num | ||
) | const |
Compute and return intersection with raw handles.
If initial set was ordered, result will preserve the order. All elements will be unique.
|
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 from INMOST::Element.
enumerator INMOST::ElementSet::nbHandles | ( | ) | const |
Retrieve number of stored handles, including invalid.
If you want to get number of valid elements use ElementSet::Size
enumerator INMOST::ElementSet::nbSorted | ( | ) | const |
Retrieve position after last sorted element.
This does not correctly represent total number of sorted elements, since some of them may be deleted
|
inline |
Put one element without checking of the existence of duplicate.
For sorted set new element will appear at unsorted part
Definition at line 1068 of file inmost_mesh.h.
void INMOST::ElementSet::PutElement | ( | HandleType | e | ) | const |
Put one element without checking of the existence of duplicate.
For sorted set new element will appear at unsorted part.
void INMOST::ElementSet::ReorderEmpty | ( | ) | const |
Retrieve current set exchange type.
Compact holes in inner representation
void INMOST::ElementSet::SortSet | ( | ComparatorType | comp | ) | const |
Performs sort of the set of elements.
If the set was previously sorted but have unsorted part, then unsorted part will be sorted and two parts will be merged. If you need all the set to be resorted (for example in the case global ids were changed) then invoke SortSet with UNSORTED_COMPARATOR first and then with needed comparator.
Internally it uses:
After the set was sorted all the invalid handles should appear at the end of the set and then removed from array, so it will implicitly work as ReorderEmpty function. No checks that elements are hidden performed (Maybe this checks should be done in comparators) In the case you formed the set by running over all mesh elements from NODE to ESET in increasing order then your set will be automatically sorted by handles, in this case you are encouraged to override Mesh::SetComparatorTag with HANDLE_COMPARATOR on the set without invoking SortSet, so that SortSet does not redundantly perform any work. You are encouraged to do so even if you are not going to use this information - some internal algorithms may benefit from it.
comp | one of the comparators from description. |
void INMOST::ElementSet::Subtract | ( | const ElementSet & | other | ) | const |
Compute and store difference with raw handles.
void INMOST::ElementSet::SynchronizeSetChildren | ( | ) |
Asks all the children to be sent to other processors.
Call ExchangeMarked afterwards.
void INMOST::ElementSet::SynchronizeSetElements | ( | ) |
Asks all the elements to be sent to other processors.
Call ExchangeMarked afterwards.
void INMOST::ElementSet::SynchronizeSetElementsWithOwner | ( | ) |
Asks all the elements of ghost sets to be sent to the owner processors.
Call ExchangeMarked afterwards.
void INMOST::ElementSet::SynchronizeSetParents | ( | ) |
Asks all the parents upwards to be sent to other processors.
This function does not ask children of the parents to be synchronized, for this traverse to the uppermost parent and call ElementSet::SynchronizeSetChildren Call ExchangeMarked afterwards.
ElementArray<Element> INMOST::ElementSet::Union | ( | const ElementSet & | other | ) | const |
Compute and return union with other set.
Result is unordered. All elements will be unique.
ElementArray<Element> INMOST::ElementSet::Union | ( | const HandleType * | handles, |
enumerator | num | ||
) | const |
Compute and return union with raw handles.
Result is unordered. All elements will be unique.
|
static |
Number of reserved positions in HighConn array.
The first position is the handle to parent set. The second position is handle to sibling set. The third position is handle to child set. The fourth position is number of sorted elements in the set. All the rest are positions of deleted elements.
Definition at line 969 of file inmost_mesh.h.