INMOST
A toolkit for distributed mathematical modeling
|
Classes | |
class | base_iterator |
class | BulkComparator |
class | BulkDFComparator |
class | CentroidComparator |
class | elements_by_type |
struct | exch_recv_reqs_t |
class | exchange_data |
class | GlobalIDComparator |
class | HierarchyComparator |
class | IntegerComparator |
class | IntegerDFComparator |
class | MarkerComparator |
class | MeasureComparator |
class | PrivateMarkerComparator |
class | RealComparator |
class | RealDFComparator |
class | SetNameComparator |
Public Types | |
enum | MeshState { Serial , Parallel } |
enum | Action { AGhost , AMigrate } |
enum | Prepare { UnknownSize , UnknownSource } |
typedef chunk_array< integer, chunk_bits_empty > | empty_container |
typedef chunk_array< integer, chunk_bits_elems > | links_container |
typedef TagManager::sparse_sub_type | sparse_type |
typedef TagManager::sparse_sub_record | sparse_rec |
typedef sparse_type::size_type | senum |
typedef void(* | ReduceOperation) (const Tag &tag, const Element &element, const INMOST_DATA_BULK_TYPE *recv_data, INMOST_DATA_ENUM_TYPE recv_size) |
typedef std::vector< Tag > | tag_set |
typedef std::vector< HandleType > | element_set |
typedef std::vector< INMOST_DATA_BULK_TYPE > | buffer_type |
typedef std::map< int, element_set > | proc_elements |
typedef std::pair< int, buffer_type > | proc_buffer_type |
typedef std::vector< proc_buffer_type > | exch_buffer_type |
typedef std::vector< INMOST_MPI_Request > | exch_reqs_type |
typedef struct INMOST::Mesh::exch_recv_reqs_t | exch_recv_reqs_type |
typedef std::map< int, elements_by_type > | parallel_storage |
typedef std::map< int, elements_by_type > | proc_elements_by_type |
typedef base_iterator< Storage > | iteratorStorage |
typedef base_iterator< Element > | iteratorElement |
typedef base_iterator< ElementSet > | iteratorSet |
typedef base_iterator< Cell > | iteratorCell |
typedef base_iterator< Face > | iteratorFace |
typedef base_iterator< Edge > | iteratorEdge |
typedef base_iterator< Node > | iteratorNode |
typedef std::map< GeometricData, ElementType > | GeomParam |
Public Types inherited from INMOST::TagManager | |
typedef tag_array_type::iterator | iteratorTag |
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 | |
void | AddOrientedTag (Tag t) |
Add a data tag that follows normal orientation. | |
void | RemOrientedTag (Tag t) |
Remove a data tag that follows normal orientation. | |
void | OrientTags (Face f) |
Swap sign for oriented data. | |
void | OrientTag (Face f, Tag t) |
Swap sign for oriented data of a single tag. | |
void | ReportConnection (HandleType h) |
Go through all elements and detect presence of prescribed element in any reference data tag. | |
bool | HaveGlobalID (ElementType types) const |
Test whether global identificator was set on certain type of elements. More... | |
void | Clear () |
Remove all data and all elements from the mesh Reset geometry service and topology check flags. | |
enumerator | MemoryUsage (HandleType h) |
For parmetis return total number in bytes of occupied memory by element and its data. | |
Mesh (std::string name) | |
Mesh (const Mesh &other) | |
Mesh & | operator= (Mesh const &other) |
MarkerType | CreateMarker () |
Allocate a new marker. More... | |
MarkerType | CreatePrivateMarker () |
void | ReleaseMarker (MarkerType n, ElementType cleanup=NONE) |
Release marker back for reuse. More... | |
void | ReleasePrivateMarker (MarkerType n, ElementType cleanup=NONE) |
__INLINE void | SetEpsilon (real e) |
Set tolerance for coordinates comparison. More... | |
__INLINE real | GetEpsilon () const |
Retrieve tolerance for coordinates comparison. More... | |
void | SetDimensions (integer dim) |
Set number of dimensions for mesh. More... | |
__INLINE integer | GetDimensions () const |
Get number of dimensions of mesh. More... | |
__INLINE MeshState | GetMeshState () const |
Get parallel state of the mesh. More... | |
__INLINE const Tag & | GlobalIDTag () const |
__INLINE const Tag & | CoordsTag () const |
__INLINE const Tag & | LowConnTag () const |
__INLINE const Tag & | HighConnTag () const |
__INLINE const Tag & | MarkersTag () const |
__INLINE const Tag & | GeomTypeTag () const |
__INLINE const Tag & | SendtoTag () const |
__INLINE const Tag & | SharedTag () const |
__INLINE const Tag & | OwnerTag () const |
__INLINE const Tag & | LayersTag () const |
__INLINE const Tag & | BridgeTag () const |
__INLINE const Tag & | ProcessorsTag () const |
__INLINE const Tag & | SetNameTag () const |
__INLINE const Tag & | SetComparatorTag () const |
__INLINE Tag | RedistributeTag () |
Don't put this shortcut to any function directly, as it creates tag inside assign to other object of type Tag and put this object to functions. | |
Tag | CreateTag (std::string name, DataType dtype, ElementType etype, ElementType sparse, INMOST_DATA_ENUM_TYPE size=ENUMUNDEF) |
Create the tag by name, type and size. More... | |
Tag | DeleteTag (Tag tag, ElementType mask=NODE|EDGE|FACE|CELL|ESET|MESH) |
Remove the data that is represented by the tag from elements of selected type. More... | |
__INLINE iteratorTag | BeginTag () |
Returns the first tag defined on the mesh. More... | |
__INLINE enumerator | NumberOfTags () const |
Retrieve the total number of valid tags. More... | |
__INLINE iteratorTag | EndTag () |
Returns the indicator for loop to end iteration over tags. More... | |
Node | CreateNode (const real *coords) |
Create node by given coordinates. More... | |
std::pair< Edge, bool > | CreateEdge (const ElementArray< Node > &nodes) |
std::pair< Face, bool > | CreateFace (const ElementArray< Edge > &edges) |
std::pair< Face, bool > | CreateFace (const ElementArray< Node > &nodes) |
std::pair< Cell, bool > | CreateCell (const ElementArray< Face > &faces, const ElementArray< Node > &suggest_nodes=ElementArray< Node >(NULL)) |
std::pair< Cell, bool > | CreateCell (const ElementArray< Node > &c_f_nodes, const integer *c_f_numnodes, integer num_c_faces, const ElementArray< Node > &suggest_nodes=ElementArray< Node >(NULL)) |
std::pair< Cell, bool > | CreateCell (const ElementArray< Node > &c_nodes, const integer *c_f_nodeinds, const integer *c_f_numnodes, integer num_c_faces, const ElementArray< Node > &suggest_nodes=ElementArray< Node >(NULL)) |
std::pair< ElementSet, bool > | CreateSet (std::string name) |
std::pair< ElementSet, bool > | CreateSetUnique (std::string name) |
Same as Mesh::CreateSet without checking existence of the set. | |
ElementSet | GetSet (std::string name) |
Retrieve set by name. More... | |
ElementArray< ElementSet > | GetSetsByPrefix (std::string prefix) |
Retrieve all the sets whose names start with given prefix. | |
HandleType | LastCreated () const |
bool | isValidHandleRange (HandleType h) const |
bool | isValidElementNum (integer etypenum, integer lid) const |
bool | isValidElement (ElementType etype, integer lid) const |
bool | isValidCell (integer lid) const |
bool | isValidFace (integer lid) const |
bool | isValidEdge (integer lid) const |
bool | isValidNode (integer lid) const |
bool | isValidElementSet (integer lid) const |
bool | isValidElement (HandleType h) const |
HandleType | FindSharedAdjacency (const HandleType *arr, enumerator num) const |
Retrieve upper adjacent that is shared by multiple lower adjacencies. More... | |
void | ReorderEmpty (ElementType reordertypes) |
void | ReorderApply (Tag index, ElementType mask) |
void | RestoreCellNodes (HandleType hc, ElementArray< Node > &ret) |
real & | Real (HandleType h, const Tag &tag) |
Returns a reference to inner memory location of the first element of the array of real values. More... | |
integer & | Integer (HandleType h, const Tag &tag) |
Returns a reference to inner memory location of the first element of the array of integer values. More... | |
bulk & | Bulk (HandleType h, const Tag &tag) |
Returns a reference in inner representation to the first element of array of bytes. More... | |
reference & | Reference (HandleType h, const Tag &tag) |
Returns a reference in an inner representation to the first element of array of element handles. More... | |
remote_reference & | RemoteReference (HandleType h, const Tag &tag) |
Returns a reference in an inner representation to the first element of array of element remote handles. More... | |
real_array | RealArray (HandleType h, const Tag &tag) |
Returns an array of real values. More... | |
integer_array | IntegerArray (HandleType h, const Tag &tag) |
Returns an array of integer values. More... | |
bulk_array | BulkArray (HandleType h, const Tag &tag) |
Returns an array of bytes. More... | |
reference_array | ReferenceArray (HandleType h, const Tag &tag) |
Returns an array of element handles. More... | |
remote_reference_array | RemoteReferenceArray (HandleType h, const Tag &tag) |
Returns an array of element remote handles. More... | |
real & | RealDF (HandleType h, const Tag &tag) |
Returns a reference to inner memory location of the first element of the array of real values. More... | |
integer & | IntegerDF (HandleType h, const Tag &tag) |
Returns a reference to inner memory location of the first element of the array of integer values. More... | |
bulk & | BulkDF (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of constant size array of bytes. More... | |
reference & | ReferenceDF (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of constant size array of element handles. More... | |
remote_reference & | RemoteReferenceDF (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of constant size array of element remote handles. More... | |
real_array | RealArrayDF (HandleType h, const Tag &tag) |
Returns an array of real values in dense array. More... | |
integer_array | IntegerArrayDF (HandleType h, const Tag &tag) |
Returns an array of integer values in dense array. More... | |
bulk_array | BulkArrayDF (HandleType h, const Tag &tag) |
Returns an array of bytes in dense array. More... | |
reference_array | ReferenceArrayDF (HandleType h, const Tag &tag) |
Returns an array of element handles in dense array. More... | |
remote_reference_array | RemoteReferenceArrayDF (HandleType h, const Tag &tag) |
Returns an array of element remote handles in dense array. More... | |
real & | RealDV (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of variable size array of real values. More... | |
integer & | IntegerDV (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of variable size array of integer values. More... | |
bulk & | BulkDV (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of variable size array of bytes. More... | |
reference & | ReferenceDV (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of variable size array of element handles. More... | |
remote_reference & | RemoteReferenceDV (HandleType h, const Tag &tag) |
Returns a reference in dense array to the first element of variable size array of element remote handles. More... | |
real_array | RealArrayDV (HandleType h, const Tag &tag) |
Returns an array of real values in dense array of variable size. More... | |
integer_array | IntegerArrayDV (HandleType h, const Tag &tag) |
Returns an array of integer values in dense array of variable size. More... | |
bulk_array | BulkArrayDV (HandleType h, const Tag &tag) |
Returns an array of bytes in dense array of variable size. More... | |
reference_array | ReferenceArrayDV (HandleType h, const Tag &tag) |
Returns an array of element handles in dense array of variable size. More... | |
remote_reference_array | RemoteReferenceArrayDV (HandleType h, const Tag &tag) |
Returns an array of element remote handles in dense array of variable size. More... | |
var & | Variable (HandleType h, const Tag &tag) |
var & | VariableDF (HandleType h, const Tag &tag) |
var & | VariableDV (HandleType h, const Tag &tag) |
var_array | VariableArray (HandleType h, const Tag &tag) |
var_array | VariableArrayDF (HandleType h, const Tag &tag) |
var_array | VariableArrayDV (HandleType h, const Tag &tag) |
__INLINE void | SetMarker (HandleType h, MarkerType n) |
Set a marker on the element represented by handle. More... | |
void | SetPrivateMarker (HandleType h, MarkerType n) |
__INLINE void | SetAnyMarker (HandleType h, MarkerType n) |
__INLINE void | SetMarkerArray (const HandleType *h, enumerator n, MarkerType m) |
Set a marker on the set of handles. More... | |
__INLINE void | SetPrivateMarkerArray (const HandleType *h, enumerator n, MarkerType m) |
__INLINE void | SetAnyMarkerArray (const HandleType *h, enumerator n, MarkerType m) |
__INLINE bool | GetMarker (HandleType h, MarkerType n) const |
Check whether the marker is set one the element. More... | |
bool | GetPrivateMarker (HandleType h, MarkerType n) const |
__INLINE bool | GetAnyMarker (HandleType h, MarkerType n) const |
__INLINE void | RemMarker (HandleType h, MarkerType n) |
Remove the marker from the element. More... | |
void | RemPrivateMarker (HandleType h, MarkerType n) |
__INLINE void | RemAnyMarker (HandleType h, MarkerType n) |
void | RemMarkerArray (const HandleType *h, enumerator n, MarkerType m) |
Remove the marker from the set of handles. More... | |
void | RemPrivateMarkerArray (const HandleType *h, enumerator n, MarkerType m) |
void | ClearMarkerSpace (HandleType h) |
Remove all the markers from the element. | |
void | GetMarkerSpace (HandleType h, bulk copy[MarkerFields]) const |
Get a copy of the bytes that store markers on the element. More... | |
void | SetMarkerSpace (HandleType h, bulk source[MarkerFields]) |
Overwrite the bytes that store markers on the element. More... | |
Element::adj_type & | HighConn (HandleType h) |
Access directly higher order adjacencies of current element with right of modification. More... | |
ElementType | HaveUpperAdjacencies () const |
Check that upper adjacencies are stored. | |
void | RemoveUpperAdjacencies (ElementType mask=(NODE|EDGE|FACE)) |
Delete all upper adjacencies, access to HighConn should fire assertion and retrieval of upper adjacencies is no longer valid. | |
void | RestoreUpperAdjacencies (ElementType mask=(NODE|EDGE|FACE)) |
Restore all upper adjacencies. | |
ElementType | HaveLowerAdjacencies () const |
Check that upper adjacencies are stored. | |
void | RemoveLowerAdjacencies (ElementType mask=(EDGE|FACE|CELL)) |
Delete all upper adjacencies, access to HighConn should fire assertion and retrieval of upper adjacencies is no longer valid. | |
void | RestoreLowerAdjacencies (ElementType mask=(EDGE|FACE|CELL)) |
Restore all upper adjacencies. | |
Element::adj_type const & | HighConn (HandleType h) const |
Access directly higher order adjacencies of current element without right of modification. | |
Element::adj_type & | LowConn (HandleType h) |
Access directly lower order adjacencies of current element with right of modification. More... | |
Element::adj_type const & | LowConn (HandleType h) const |
Access directly lower order adjacencies of current element without right of modification. | |
INMOST_DATA_ENUM_TYPE | GetDataSize (HandleType h, const Tag &tag) const |
Return the size of the array. More... | |
INMOST_DATA_ENUM_TYPE | GetDataCapacity (HandleType h, const Tag &tag) const |
Return the size of the structure in bytes required to represent the data on current element. More... | |
INMOST_DATA_ENUM_TYPE | GetDataCapacity (const INMOST_DATA_BULK_TYPE *data, INMOST_DATA_ENUM_TYPE size, const Tag &tag) const |
Returns the number of bytes in data used for given type of tag. More... | |
void | SetDataSize (HandleType h, const Tag &tag, enumerator new_size) |
Sets the size of the array for data of variable size. More... | |
void | GetData (HandleType h, const Tag &tag, enumerator shift, enumerator size, void *data) const |
Copy inner data array of size elements to provided array beginning from shift element. More... | |
void | SetData (HandleType h, const Tag &tag, enumerator shift, enumerator size, const void *data) |
Copy into inner data array of size elements from provided array beginning from shift element. More... | |
void | DelData (HandleType h, const Tag &tag) |
Remove tag data from given element. More... | |
void | DelDenseData (HandleType h, const Tag &tag) |
Removes data of variable size, clears to zero data of fixed size. More... | |
void | DelDenseData (void *data, const Tag &tag) |
Removes data of variable size, clears to zero data of fixed size. More... | |
bool | DelSparseData (HandleType h, const Tag &tag) |
Removes data of variable size and sparse tag data. More... | |
bool | HaveData (HandleType h, const Tag &tag) const |
Check whether data is present on given element. More... | |
Element::GeometricType | GetGeometricType (HandleType h) const |
void | SetGeometricType (HandleType h, Element::GeometricType type) |
integer & | GlobalID (HandleType h) |
Retrieve global id of the element with right of modification (dangerous to modify). More... | |
integer | GlobalID (HandleType h) const |
Retrieve global id of the element without right of modification. More... | |
integer | DataLocalID (HandleType h) const |
Retrieve position of the data position of current element. More... | |
Element::Status | GetStatus (HandleType h) const |
Retrieve parallel status of the element. More... | |
void | SetStatus (HandleType h, Element::Status s) |
Set parallel status of the element. More... | |
void | Destroy (HandleType h) |
Completely destroy element from mesh. More... | |
void | Destroy (const Storage &e) |
Shortcut for typed elements. | |
bool | Hide (HandleType h) |
Hide element from mesh. More... | |
bool | Show (HandleType h) |
Show element from mesh. More... | |
bool | Delete (HandleType h) |
This function will hide element in modification state (between BeginModification and EndModification) or call Destroy in non-modification state. More... | |
bool | Hidden (HandleType h) const |
Check whether element is hidden. More... | |
bool | New (HandleType h) const |
Check whether element is new. More... | |
void | ComputeGeometricType (HandleType h) |
Recompute geometrical type of current element and set it to element. More... | |
INMOST_DATA_ENUM_TYPE | GetArrayCapacity (integer etypenum) |
This function is needed by TagManager, may be made private in future follows definition of chunk_array to estimate current occupancy of arrays. | |
HandleType | FindSharedGhost (ElementType etype, Storage::integer global_id, int source_proc, int owner_proc) |
void | ClearFile () |
void | SetParallelFileStrategy (int strategy) |
Set parallel strategy for inner communications. More... | |
int | GetParallelFileStrategy () const |
Retrieve currently set parallel strategy for ".pmf" files. More... | |
int | GetProcessorRank () const |
Get rank of current processor. | |
int | GetProcessorsNumber () const |
Get number of processors. | |
int | GetLocalProcessorRank () const |
Get rank of current processor in shared environment (OpenMP) | |
int | GetLocalProcessorNumber () const |
Get number of processors in shared environment (OpenMP) | |
INMOST_MPI_Comm | GetCommunicator () const |
Retrieve MPI communicator. | |
INMOST_MPI_Group | GetGroup () const |
Retrieve MPI group corresponding to the communicator. | |
void | SetCommunicator (INMOST_MPI_Comm _comm) |
Set MPI communicator. | |
void | ResolveShared (bool only_new=false) |
Find elements that are common between processors. | |
void | ResolveSets () |
Find sets that are common between processors. | |
void | RemoveGhost (MarkerType marker=0) |
Delete all the ghost cells. | |
void | RemoveGhostElements (const HandleType *ghost, enumerator num) |
Delete some ghost cells provided in array. More... | |
template<typename EType > | |
void | RemoveGhostElements (const ElementArray< EType > &ghost) |
void | RemoveGhostElements (const ElementSet &ghost) |
void | AssignGlobalID (ElementType mask) |
Assign unique numbers to elements. More... | |
void | ExchangeData (const Tag &tag, ElementType mask, MarkerType select=0) |
Update data from Shared elements to Ghost elements. More... | |
void | ExchangeOrientedData (const Tag &tag, ElementType mask, MarkerType select=0, MarkerType orient=0) |
This function is similar to ExchangeData, except that it will change the orientation of recieved data upon completion for the exchanged tags, registered through AddOrientedTag. More... | |
void | ExchangeDataBegin (const Tag &tag, ElementType mask, MarkerType select, exchange_data &storage) |
Start asynchronous synchronization of data. More... | |
void | ExchangeDataEnd (const Tag &tag, ElementType mask, MarkerType select, exchange_data &storage) |
Complete asynchronous synchronization of data. More... | |
void | ExchangeData (const tag_set &tags, ElementType mask, MarkerType select=0) |
This function will perform exchange of multiple data tags. More... | |
void | ExchangeOrientedData (const tag_set &tags, ElementType mask, MarkerType select=0, MarkerType orient=0) |
This function is similar to ExchangeData, except that it will change the orientation of recieved data upon completion for the exchanged tags, registered through AddOrientedTag. More... | |
void | ExchangeDataBegin (const tag_set &tags, ElementType mask, MarkerType select, exchange_data &storage) |
This function will initialize exchange of multiple data tags. More... | |
void | ExchangeDataEnd (const tag_set &tags, ElementType mask, MarkerType select, exchange_data &storage) |
This function will finalize exchange of multiple data tags. More... | |
void | ReduceData (const Tag &tag, ElementType mask, MarkerType select, ReduceOperation op) |
Accumulation of data from ghost elements to shared elements. More... | |
void | ReduceDataBegin (const Tag &tag, ElementType mask, MarkerType select, exchange_data &storage) |
This function intializes data reduction. More... | |
void | ReduceDataEnd (const Tag &tag, ElementType mask, MarkerType select, ReduceOperation op, exchange_data &storage) |
This function completes data reduction. More... | |
void | ReduceData (const tag_set &tags, ElementType mask, MarkerType select, ReduceOperation op) |
This function will perform reduction of multiple data tags. More... | |
void | ReduceDataBegin (const tag_set &tags, ElementType mask, MarkerType select, exchange_data &storage) |
This function will initialize reduction of multiple data tags. More... | |
void | ReduceDataEnd (const tag_set &tags, ElementType mask, MarkerType select, ReduceOperation op, exchange_data &storage) |
This function will finalize exchange of multiple data tags. More... | |
void | ExchangeMarked (enum Action action=AGhost) |
This function realizes two algorithms: ghosting of elements and migration of elements. More... | |
void | ExchangeGhost (integer layers, ElementType bridge, MarkerType select=0, bool delete_ghost=true) |
Form several layers of ghost cells that are adjacent through bridge elements to current cells. More... | |
void | Redistribute () |
Migrate all the elements to the new owners prescribed in data corresponding to RedistributeTag. More... | |
integer | Enumerate (ElementType mask, Tag num_tag, integer start=0, bool define_sparse=false) |
Enumerate all elements beginning with start and put numeration to data associated with num_tag for all elements with given type mask. More... | |
integer | Enumerate (const HandleType *h, enumerator num, const Tag &num_tag, integer start=0, bool define_sparse=true) |
Enumerate all elements beginning with start and put numeration to data associated with num_tag. More... | |
template<typename EType > | |
integer | Enumerate (const ElementArray< EType > &elements, const Tag &num_tag, integer start=0, bool define_sparse=true) |
Enumerate all elements beginning with start and put numeration to data associated with num_tag. More... | |
integer | EnumerateSet (const ElementSet &set, const Tag &num_tag, integer start=0, bool define_sparse=true) |
Enumerate all elements in the set. More... | |
integer | TotalNumberOf (ElementType mask) |
Sum of all physical elements, it excludes ghost copies. More... | |
real | Integrate (real input) |
Integrate real value over all processors. More... | |
enumerator | Integrate (enumerator input) |
Integrate unsigned integer value over all processors. More... | |
integer | Integrate (integer input) |
Integrate integer value over all processors. More... | |
void | Integrate (real *input, integer size) |
Integrate an array of real values over all processors. More... | |
void | Integrate (enumerator *input, integer size) |
Integrate an array of unsigned integer values over all processors. More... | |
void | Integrate (integer *input, integer size) |
Integrate an array of integer values over all processors. More... | |
real | Integrate (const Tag &t, enumerator entry, ElementType mask) |
Integrate data corresponding to tag between all processors. More... | |
integer | ExclusiveSum (integer input) |
Compute sum of integer values for all processors with rank lower then current, excluding current processor. More... | |
enumerator | ExclusiveSum (enumerator input) |
real | AggregateMax (real input) |
integer | AggregateMax (integer input) |
enumerator | AggregateMax (enumerator input) |
void | AggregateMax (real *input, integer size) |
void | AggregateMax (integer *input, integer size) |
void | AggregateMax (enumerator *input, integer size) |
real | AggregateMin (real input) |
integer | AggregateMin (integer input) |
enumerator | AggregateMin (enumerator input) |
void | AggregateMin (real *input, integer size) |
void | AggregateMin (integer *input, integer size) |
void | AggregateMin (enumerator *input, integer size) |
void | RecomputeParallelStorage (ElementType mask) |
Regather ghost and shared element sets for data exchange. More... | |
void | SortParallelStorage (ElementType mask) |
Sort parallel storage. More... | |
void | RecordParallelStorage (ElementType mask) |
Outputs parallel storage into xml log files. More... | |
ElementType | SynchronizeElementType (ElementType etype) |
Synchronize bitwise mask of element types between processors. More... | |
void | SynchronizeMarker (MarkerType marker, ElementType mask, SyncBitOp op) |
Synchronize marker on elements between processors using provided operation. More... | |
void | Barrier () |
void | BeginSequentialCode () |
void | EndSequentialCode () |
Element | ElementByLocalIDNum (integer etypenum, integer lid) |
Element | ElementByLocalID (ElementType etype, integer lid) |
Element | ElementByHandle (HandleType h) |
HandleType | NextHandle (HandleType h) const |
HandleType | PrevHandle (HandleType h) const |
HandleType | NextHandle (HandleType h, ElementType mask) const |
HandleType | PrevHandle (HandleType h, ElementType mask) const |
HandleType | FirstHandle () const |
HandleType | LastHandle () const |
HandleType | FirstHandle (ElementType etype) const |
HandleType | LastHandle (ElementType etype) const |
Node | NodeByLocalID (integer lid) |
Edge | EdgeByLocalID (integer lid) |
Face | FaceByLocalID (integer lid) |
Cell | CellByLocalID (integer lid) |
ElementSet | EsetByLocalID (integer lid) |
integer | NodeNextLocalID (integer lid) const |
integer | EdgeNextLocalID (integer lid) const |
integer | FaceNextLocalID (integer lid) const |
integer | CellNextLocalID (integer lid) const |
integer | EsetNextLocalID (integer lid) const |
integer | NodePrevLocalID (integer lid) const |
integer | EdgePrevLocalID (integer lid) const |
integer | FacePrevLocalID (integer lid) const |
integer | CellPrevLocalID (integer lid) const |
integer | EsetPrevLocalID (integer lid) const |
__INLINE integer | NodeLastLocalID () const |
__INLINE integer | EdgeLastLocalID () const |
__INLINE integer | FaceLastLocalID () const |
__INLINE integer | CellLastLocalID () const |
__INLINE integer | EsetLastLocalID () const |
integer | LastLocalIDNum (integer n) const |
integer | NextLocalID (ElementType etype, integer lid) const |
integer | PrevLocalID (ElementType etype, integer lid) const |
integer | FirstLocalID (ElementType etype) const |
integer | LastLocalID (ElementType etype) const |
integer | NextLocalIDIter (ElementType etype, integer lid) const |
integer | PrevLocalIDIter (ElementType etype, integer lid) const |
integer | LastLocalIDThr (ElementType etype) const |
integer | FirstLocalIDThr (ElementType etype) const |
__INLINE integer | NumberOfSets () const |
__INLINE integer | NumberOfCells () const |
__INLINE integer | NumberOfFaces () const |
__INLINE integer | NumberOfEdges () const |
__INLINE integer | NumberOfNodes () const |
__INLINE integer | NumberOfElements () const |
__INLINE integer | NumberOfAll () const |
integer | NumberOf (ElementType t) const |
iteratorStorage | Begin (ElementType Types) |
These iterators skip invalid elements but don't skip modified elements. | |
iteratorStorage | End () |
iteratorElement | BeginElement (ElementType Types) |
iteratorElement | EndElement () |
iteratorSet | BeginSet () |
iteratorSet | EndSet () |
iteratorCell | BeginCell () |
iteratorCell | EndCell () |
iteratorFace | BeginFace () |
iteratorFace | EndFace () |
iteratorEdge | BeginEdge () |
iteratorEdge | EndEdge () |
iteratorNode | BeginNode () |
iteratorNode | EndNode () |
void | SetFileOption (std::string, std::string) |
Set file option. More... | |
std::string | GetFileOption (std::string key) const |
Get current option corresponding to key. More... | |
std::set< std::string > | TagOptions (std::string name) const |
Collect file options related to records Tag:TAGNAME. More... | |
bool | CheckLoadSkip (std::string name, const std::set< std::string > &noload, const std::set< std::string > &loadonly) const |
Check if tag loading should be skipped. | |
bool | CheckSaveSkip (std::string name, const std::set< std::string > &noload, const std::set< std::string > &loadonly) const |
Check if tag saving should be skipped. | |
void | Load (std::string File) |
Acceptable file formats for reading. More... | |
void | LoadMSH (std::string File) |
void | LoadECL (std::string File) |
void | LoadXML (std::string File) |
void | LoadPMF (std::string File) |
void | LoadVTK (std::string File) |
void | LoadVTU (std::string File) |
void | LoadPVTK (std::string File) |
void | LoadPVTU (std::string File) |
void | LoadMKF (std::string File) |
void | Save (std::string File) |
Acceptable file formats for writing. More... | |
void | SaveXML (std::string File) |
void | SavePMF (std::string File) |
void | SaveVTK (std::string File) |
void | SaveVTU (std::string File) |
void | SavePVTK (std::string File) |
void | SavePVTU (std::string File) |
void | SaveGMV (std::string File) |
bool | isParallelFileFormat (std::string File) |
void | RepairGeometricTags () |
bool | HideGeometricData (GeometricData type, ElementType mask) |
bool | ShowGeometricData (GeometricData type, ElementType mask) |
void | FacesOrientation (const ElementArray< Face > &faces, MarkerType rev) |
Marks face with the orientation direction by marker. More... | |
void | FacesOrientation (const HandleType *faces, enumerator size, MarkerType rev, bool check_convexity=true, enumerator start=0) |
void | CollectCentroidsNormals (const HandleType *faces, enumerator size, real *x, real *n) |
bool | CheckConvexity (const real *x, const real *n, enumerator size) const |
bool | CheckConvexity (const ElementArray< Face > &faces) |
bool | CheckConvexity (const HandleType *faces, enumerator size) |
void | PrepareGeometricData (GeomParam table) |
void | RemoveGeometricData (GeomParam table) |
bool | HaveGeometricData (GeometricData type, ElementType mask) const |
void | GetGeometricData (HandleType e, GeometricData type, real *ret) |
const Tag & | GetGeometricTag (GeometricData type) const |
bool | TestClosure (const HandleType *elements, integer num) const |
ElementArray< Face > | GatherBoundaryFaces () |
ElementArray< Face > | GatherInteriorFaces () |
integer | CountBoundaryFaces () |
integer | CountInteriorFaces () |
bool | FixEdgeOrder (HandleType *edges, enumerator nedges) const |
void | RecomputeGeometricData (HandleType e) |
void | RecomputeGeometricData (HandleType e, GeometricData d) |
Element::GeometricType | ComputeGeometricType (ElementType element_type, const HandleType *lower_adjacent, INMOST_DATA_ENUM_TYPE lower_adjacent_size) |
void | ComputeCentroid (Element e, TagRealArray coords, real *x) const |
void | ComputeBarycenter (Element e, TagRealArray coords, real *x) const |
void | ComputeNormal (Element e, TagRealArray coords, real *n) const |
void | ComputeMeasure (Element e, TagRealArray coords, real &m) const |
void | ComputeCentroid (Element e, TagVariableArray coords, variable *x) const |
void | ComputeBarycenter (Element e, TagVariableArray coords, variable *x) const |
void | ComputeNormal (Element e, TagVariableArray coords, variable *n) const |
void | ComputeMeasure (Element e, TagVariableArray coords, variable &m) const |
void | WachspressInterpolation2D (const real *x, const Face &f, std::map< HandleType, real > &nodes_stencil) const |
Compute node-centered interpolation on 2d face for point. More... | |
void | WachspressInterpolation3D (const real *x, const Cell &c, std::map< HandleType, real > &nodes_stencil) const |
Compute node-centered interpolation on 3d cell for point Point should be inside cell or on its boundary. More... | |
void | MarkBoundaryFaces (MarkerType boundary_marker) |
Sets marker for all the faces that have only one neighbouring cell, works correctly in parallel environment. More... | |
void | MarkNormalOrientation (MarkerType mrk) |
This function should be used to detect normal inversion on ghost interfaces with respect to normal orientation on owner of the interface. More... | |
bool | isMeshModified () const |
Check whether code runs between Mesh::BeginModification, Mesh::EndModification scope. More... | |
MarkerType | HideMarker () const |
MarkerType | NewMarker () const |
void | SwapModification (bool recompute_geometry) |
void | BeginModification () |
void | ApplyModification () |
After this function any link to deleted element will be replaced by InvalidHandle(). More... | |
void | ResolveModification () |
This function is not yet implemented. More... | |
void | EndModification () |
enumerator | getNext (const HandleType *arr, enumerator size, enumerator k, MarkerType marker) const |
enumerator | Count (const HandleType *arr, enumerator size, MarkerType marker) const |
void | EquilibrateGhost () |
void | CheckCentroids (std::string file, int line) |
Check that centroids of ghost and shared elements match to each other. More... | |
void | CheckProcsSorted (std::string file, int line) |
Check that processors are sorted on every element. | |
void | CheckGhostSharedCount (std::string file, int line, ElementType etype=ESET|CELL|FACE|EDGE|NODE) |
Check that number of ghost and shared elements match to each other. More... | |
void | CheckOwners (std::string file, int line) |
Let ghost elements send processors list to master elements and see if they match. | |
void | CheckGIDs (std::string file, int line, ElementType mask=NODE|EDGE|FACE|CELL|ESET) |
Let ghost elements send global ids to master elements and see if they match. | |
void | CheckProcessors () |
Let ghost elements send owner processor to master elements and see if they match. | |
void | CheckSetLinks (std::string file, int line) |
Checks that there are no invalid links in sets. | |
TopologyCheck | BeginTopologyCheck (ElementType etype, const HandleType *adj, enumerator num) |
This function allows you to perform some topological checks before you create an element. More... | |
bool | EndTopologyCheck (HandleType e, TopologyCheck begin_check) |
This function performs some topological checks after construction of element. More... | |
Tag | TopologyErrorTag () const |
This will return tag by which you can retrieve error mark to any element on which topology check failed. More... | |
TopologyCheck | GetTopologyCheck (TopologyCheck mask=ENUMUNDEF) const |
Retrieve currently set topology checks. | |
void | SetTopologyCheck (TopologyCheck mask) |
Set topology checks. | |
void | RemTopologyCheck (TopologyCheck mask) |
Remove topology checks. | |
void | SetTopologyError (TopologyCheck mask) |
This will turn mesh into the state indicating that some topology error occurred. | |
TopologyCheck | GetTopologyError (TopologyCheck mask=ENUMUNDEF) const |
Retrieve topology error state, this indicates that some error have occurred. | |
void | ClearTopologyError (TopologyCheck mask=ENUMUNDEF) |
Revert mesh to clean topology error state. | |
void | SortHandles (HandleType *h, enumerator num) |
void | SortByGlobalID (HandleType *h, enumerator num) |
std::string | GetMeshName () |
Retrieve the name of the current mesh. | |
void | SetMeshName (std::string new_name) |
Be careful changing mesh name if you have already established remote links. | |
Public Member Functions inherited from INMOST::TagManager | |
bool | HaveTag (std::string name) const |
Check existence of a data tag by it's name. | |
Tag | GetTag (std::string name) const |
Retrieve a data tag by it's name. | |
void | ListTagNames (std::vector< std::string > &list) const |
Retrieve names for all the tags present on the mesh. | |
Tag | CreateTag (Mesh *m, std::string name, DataType dtype, ElementType etype, ElementType sparse, INMOST_DATA_ENUM_TYPE size=ENUMUNDEF) |
Create tag with prescribed attributes. | |
bool | ElementDefined (Tag const &tag, ElementType etype) const |
Check that the tag was defined on certain elements. | |
bool | RenameTag (std::string oldname, std::string newname) |
Change tag name. | |
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 void | Initialize (int *argc, char ***argv) |
Initial initialization. More... | |
static void | Finalize () |
Finalizes operation with MPI, recommended to call, otherwise MPI may produce warnings. | |
static void | CopyData (Element a, Element b) |
Copy all the data from b to a (a = b). More... | |
static Mesh * | GetMesh (std::string name) |
Find mesh by name. | |
Public Attributes | |
Tag | tag_sendto |
Tag | tag_processors |
Additional Inherited Members | |
Protected Types inherited from INMOST::TagManager | |
typedef chunk_array< INMOST_DATA_ENUM_TYPE, chunk_bits_empty > | empty_data |
typedef chunk_array< Tag, chunk_bits_tags > | tag_array_type |
typedef chunk_bulk_array< chunk_bits_elems > | dense_sub_type |
typedef chunk_array< dense_sub_type, chunk_bits_dense > | dense_data_array_type |
typedef array< sparse_sub_record > | sparse_sub_type |
typedef chunk_array< sparse_sub_type, chunk_bits_elems > | sparse_data_array_type |
typedef chunk_array< INMOST_DATA_INTEGER_TYPE, chunk_bits_elems > | back_links_type |
typedef tag_array_type::iterator | tag_iterator |
typedef tag_array_type::const_iterator | tag_const_iterator |
Protected Member Functions inherited from INMOST::TagManager | |
TagManager (const TagManager &other) | |
TagManager & | operator= (TagManager const &other) |
void | ReallocateData (const Tag &t, INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_ENUM_TYPE new_size) |
Shrink or enlarge arrays for a dense data. | |
void | ReallocateData (INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_ENUM_TYPE new_size) |
Reallocate all the data for all the tags. | |
__INLINE sparse_sub_type const & | GetSparseData (int etypenum, int local_id) const |
Retrieve substructure for representation of the sparse data without permission for modification. | |
__INLINE sparse_sub_type & | GetSparseData (int etypenum, int local_id) |
Retrieve substructure for representation of the sparse data. | |
__INLINE dense_sub_type const & | GetDenseData (int pos) const |
Retrieve substructure for representation of the dense data without permission for modification. | |
__INLINE dense_sub_type & | GetDenseData (int pos) |
Retrieve substructure for representation of the dense data. | |
Static Protected Member Functions inherited from INMOST::TagManager | |
static void | CopyData (const Tag &t, void *adata, const void *bdata) |
Copy data from one element to another. | |
static void | DestroyVariableData (const Tag &t, void *adata) |
Destroy data that represents array of variable size. | |
Protected Attributes inherited from INMOST::TagManager | |
tag_array_type | tags |
empty_data | empty_dense_data |
dense_data_array_type | dense_data |
sparse_data_array_type | sparse_data [NUM_ELEMENT_TYPS] |
back_links_type | back_links [NUM_ELEMENT_TYPS] |
Protected Attributes inherited from INMOST::Storage | |
HandleType | handle |
HandleType * | handle_link |
Definition at line 1303 of file inmost_mesh.h.
void INMOST::Mesh::ApplyModification | ( | ) |
After this function any link to deleted element will be replaced by InvalidHandle().
This will modify DATA_REFERENCE tags and contents of sets, so that all deleted elements are not referenced anymore. If you have any tags of type DATA_REMOTE_REFERENCE on current mesh linking to the elements of the current mesh or there are other meshes that possess tags of type DATA_REMOTE_REFERENCE and link elements on the current mesh, you should check that there are no links to deleted elements manually with Element::Old().
void INMOST::Mesh::AssignGlobalID | ( | ElementType | mask | ) |
Assign unique numbers to elements.
Internally this will create Mesh::GlobalIDTag and make call to Element::GlobalID and Mesh::GlobalID functions valid. Internally this will also set have_global_id variable that will indicate that all the comparisons in parallel algorithms should be performed using global identificators instead of centroids which is faster.
|
inline |
Returns the first tag defined on the mesh.
For safety while iterating through tags you should check for validity of the tag
Definition at line 1492 of file inmost_mesh.h.
TopologyCheck INMOST::Mesh::BeginTopologyCheck | ( | ElementType | etype, |
const HandleType * | adj, | ||
enumerator | num | ||
) |
This function allows you to perform some topological checks before you create an element.
Function is used internally by CreateEdge, CreateFace, CreateCell functions If you perform topological checks on your own, you'd probably better turn off checks before calling CreateXXX functions. Note that check for duplicates within mesh is performed by Mesh::FindSharedAdjacency.
Returns a reference in inner representation to the first element of array of bytes.
Future recommendation: If variable size array was not allocated then this function will generate segmentation fault.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function.
Reference to the data is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
bulk_array INMOST::Mesh::BulkArray | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns an array of bytes.
If you know that data is certanly sparse or dense on elements you access then it is faster to use variants of this function with hint data structure.
Array data structure is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
|
inline |
Returns an array of bytes in dense array.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set), likely to result in segfault.
Note that as array is fixed you shouldn't use any functions that alter size of the array as resize, erase, insert, you may use replace if initial and final size will match, in debug mode assert will fire if you try to do this in release (NDEBUG is set) it will lead to segfault.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1806 of file inmost_mesh.h.
|
inline |
Returns an array of bytes in dense array of variable size.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1960 of file inmost_mesh.h.
Returns a reference in dense array to the first element of constant size array of bytes.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1741 of file inmost_mesh.h.
Returns a reference in dense array to the first element of variable size array of bytes.
Future recommendation: If array was not allocated then this function will generate segmentation fault.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1901 of file inmost_mesh.h.
void INMOST::Mesh::CheckCentroids | ( | std::string | file, |
int | line | ||
) |
Check that centroids of ghost and shared elements match to each other.
Exits if does not match.
void INMOST::Mesh::CheckGhostSharedCount | ( | std::string | file, |
int | line, | ||
ElementType | etype = ESET|CELL|FACE|EDGE|NODE |
||
) |
Check that number of ghost and shared elements match to each other.
Exits if does not match.
void INMOST::Mesh::ComputeGeometricType | ( | HandleType | h | ) |
Recompute geometrical type of current element and set it to element.
h | handle of element |
Copy all the data from b to a (a = b).
Except for protected data. Non-private markers are copied. Elements should be of the same type.
MarkerType INMOST::Mesh::CreateMarker | ( | ) |
Allocate a new marker.
Assert will fire in debug mode (NDEBUG not set) if you run out of space for markers, in this case you either use too many markers, then you can just increase MarkerFields variable (increasing by 1 gives you 8 more markers) or you forget to release markers after you use them.
In release mode (NDEBUG is set) if you run out of space for markers function will return InvalidMarker()
Create node by given coordinates.
This operation would not involve searching existing nodes for node with the same coordinates. It is potentially dangerous to have nodes whose coordinates differ by less than GetEpsilon since ResolveShared algorithm would not know how to resolve parallel statuses of the elements. However this may be subject to change, if ResolveShared algorithm will be rewritten to resolve cells first by their centroids and only then resolve all the rest elements by adjacency information.
coords | array of coordinates at least of size GetDimensions() |
Tag INMOST::Mesh::CreateTag | ( | std::string | name, |
DataType | dtype, | ||
ElementType | etype, | ||
ElementType | sparse, | ||
INMOST_DATA_ENUM_TYPE | size = ENUMUNDEF |
||
) |
Create the tag by name, type and size.
You cannot create the tag with the same name and different type or size.
You may make subsequent calls to the function with the same name, same type and same size (or undefined size, then it will be deduced) but different selection of element.
The following recommendation is for future: When you create data of variable size, every array of data for every element will be empty at first, so before accessing it through mechanism for single-valued data (Real, Integer, Bulk, Reference) you should first resize arrays otherwise your program very likely to be halted by segmentation fault. For this case arrays are not allocated automatically from performance considerations.
name | name of the tag |
dtype | type of the tag |
etype | the selection of elements on which the data of the tag is defined, you may use bitwise or operations to define tag on multiple types of elements, example CELL | FACE |
sparse | the selection of elements from etype on which the tag is sparse, for example, if you know that the data is used on all cells and only on boundary faces, then you may should set etype = CELL | FACE and sparse = FACE |
size | size of associated data |
|
inline |
Retrieve position of the data position of current element.
After ReorderEmpty this number is guaranteed to be between 0 and NumberOf(type of element)
h | handle of the element |
Definition at line 2208 of file inmost_mesh.h.
void INMOST::Mesh::DelData | ( | HandleType | h, |
const Tag & | tag | ||
) |
Remove tag data from given element.
Removes data of variable size and sparse tag data. Clears to zero data of fixed size.
h | handle to the element |
tag | tag that indicates the data |
void INMOST::Mesh::DelDenseData | ( | HandleType | h, |
const Tag & | tag | ||
) |
Removes data of variable size, clears to zero data of fixed size.
h | handle to the element |
tag | tag that indicates the data |
void INMOST::Mesh::DelDenseData | ( | void * | data, |
const Tag & | tag | ||
) |
Removes data of variable size, clears to zero data of fixed size.
data | link to data |
tag | tag that indicates the data |
bool INMOST::Mesh::Delete | ( | HandleType | h | ) |
This function will hide element in modification state (between BeginModification and EndModification) or call Destroy in non-modification state.
h | handle of the element |
Remove the data that is represented by the tag from elements of selected type.
tag | tag that indicates the data |
mask | the selection of the elements on which the data should be removed, may be set by bitwise or operation |
Reimplemented from INMOST::TagManager.
bool INMOST::Mesh::DelSparseData | ( | HandleType | h, |
const Tag & | tag | ||
) |
Removes data of variable size and sparse tag data.
h | handle to the element |
tag | tag that indicates the data |
void INMOST::Mesh::Destroy | ( | HandleType | h | ) |
Completely destroy element from mesh.
This function bypass check that mesh is in modification state and will remove element immediatly. It will disconnect element from lower adjacencies and delete all the upper adjacencies that depend on current element. If you don't want upper adjacencies to be deleted you should first use Element::Disconnect function to explicitly disconnect current element and then destroy it.
h | handle of the element |
|
inline |
Returns the indicator for loop to end iteration over tags.
Definition at line 1498 of file inmost_mesh.h.
bool INMOST::Mesh::EndTopologyCheck | ( | HandleType | e, |
TopologyCheck | begin_check | ||
) |
This function performs some topological checks after construction of element.
Function is used internally by CreateEdge, CreateFace, CreateCell functions.
|
inline |
Enumerate all elements beginning with start and put numeration to data associated with num_tag.
Collective operation.
elements | array of elements |
num_tag | a tag that is associated with the data |
start | starting value for enumeration |
define_sparse | if true then function will define sparse data on elements that don't have it, otherwise it will skip those elements |
Definition at line 2905 of file inmost_mesh.h.
integer INMOST::Mesh::Enumerate | ( | const HandleType * | h, |
enumerator | num, | ||
const Tag & | num_tag, | ||
integer | start = 0 , |
||
bool | define_sparse = true |
||
) |
Enumerate all elements beginning with start and put numeration to data associated with num_tag.
Collective operation.
h | array of handles |
num | number of handles |
num_tag | a tag that is associated with the data |
start | starting value for enumeration |
define_sparse | if true then function will define sparse data on elements that don't have it, otherwise it will skip those elements |
integer INMOST::Mesh::Enumerate | ( | ElementType | mask, |
Tag | num_tag, | ||
integer | start = 0 , |
||
bool | define_sparse = false |
||
) |
Enumerate all elements beginning with start and put numeration to data associated with num_tag for all elements with given type mask.
Collective operation.
mask | bitwise or of types of elements |
num_tag | a tag that is associated with the data |
start | starting value for enumeration |
define_sparse | if true then function will define sparse data on elements that don't have it, otherwise it will skip those elements |
integer INMOST::Mesh::EnumerateSet | ( | const ElementSet & | set, |
const Tag & | num_tag, | ||
integer | start = 0 , |
||
bool | define_sparse = true |
||
) |
Enumerate all elements in the set.
Collective operation.
set | handle of the set |
num_tag | a tag that is associated with the data |
start | starting value for enumeration |
define_sparse | if true then function will define sparse data on elements that don't have it, otherwise it will skip those elements |
void INMOST::Mesh::ExchangeData | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select = 0 |
||
) |
Update data from Shared elements to Ghost elements.
For backward direction please see Mesh::ReduceData. If you have a tag of DATA_BULK type and you store your own custom data structure in it, it is highly recommended that you provide MPI information about your structure through Tag::SetBulkDataType, this would not do any difference on homogeneous architecture, but it may help you save a lot of time and nerves in heterogeneous parallel environment.
Blocking, Collective point-2-point
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
void INMOST::Mesh::ExchangeData | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select = 0 |
||
) |
This function will perform exchange of multiple data tags.
Blocking, Collective point-2-point
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
void INMOST::Mesh::ExchangeDataBegin | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
Start asynchronous synchronization of data.
You should define object of type exchange_data that will hold temporary buffers for data. every Mesh::ExchangeDataBegin should be matched with Mesh::ExchangeDataEnd with the same exchange_data object. After matching Mesh::ExchangeDataEnd the exchange_data object may be reused If you will go out of the scope where exchange_data object was defined it will be deallocated and may result in segmentation fault.
You should also never put the same exchange_data object to any other Mesh::ExchangeDataBegin or Mesh::ReduceDataBegin, until matching Mesh::ExchangeDataEnd because it may override or reallocate buffers, internally used by MPI and remote processor will receive garbage instead of data.
Nonblocking, Collective point-2-point
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ExchangeDataBegin | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
This function will initialize exchange of multiple data tags.
Using this function may lead to good overlapping between communication and computation.
Nonblocking, Collective point-2-point
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ExchangeDataEnd | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
Complete asynchronous synchronization of data.
Blocking
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ExchangeDataEnd | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
This function will finalize exchange of multiple data tags.
Blocking
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ExchangeGhost | ( | integer | layers, |
ElementType | bridge, | ||
MarkerType | select = 0 , |
||
bool | delete_ghost = true |
||
) |
Form several layers of ghost cells that are adjacent through bridge elements to current cells.
This function acceptes any mesh topology, failure on some mesh should be considered a bug and sample example should be provided for testing purposes.
This function internally calculates layer by layer and invokes ExchangeMarked for each layer, you can either reproduce the algorithm on your own if you want to bypass the function and call Mesh::ExchangeMarked directly, but then you will lose optimization in Mesh::Redistribute, that expects that layers are formed the same way they are formed in Mesh::ExchangeGhost. Internally it sets up LayersTag and BridgeTag for the mesh with provided values, which are used by Mesh::Redistribute but you are discouraged to override these tags since using non-matching algorithms is not tested and should be considered dangerous.
Nevertheless you can use this function first for layers then request any additional ghost elements by ExchangeMarked.
Collective point-2-point.
layers | number of required layers of ghost elements |
bridge | bitwise mask of elements for which neighbouring cells should be considered a layer |
void INMOST::Mesh::ExchangeMarked | ( | enum Action | action = AGhost | ) |
This function realizes two algorithms: ghosting of elements and migration of elements.
ghosting:
Creates ghost elements at other processors prescribed in SendtoTag() performs sending and receiving of elements and all operations to keep parallel state of the mesh.
Given that all the data was up to date among processors all the data at the end of the algorithm will be also up to data
migration:
To correctly perform migration of elements it is necessary to set up tags besides SendToTag(), which indicates to where every element should be sent:
if there is no current processor in "TEMPORARY_NEW_PROCESSORS", then current processor will remove the copy of the element. All this actions are performed automatically by Mesh::Redistribute based on information provided in Mesh::RedistributeTag which effectively contains new owner.
Given that all the data was up to date among processors all the data at the end of the algorithm will be also up to date
Collective point-2-point.
action |
void INMOST::Mesh::ExchangeOrientedData | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select = 0 , |
||
MarkerType | orient = 0 |
||
) |
This function is similar to ExchangeData, except that it will change the orientation of recieved data upon completion for the exchanged tags, registered through AddOrientedTag.
The orientation marker is computed using MarkNormalOrientation and could be provided by the user. If marker is provided it is assumed to be consistent. It is computed internally if zero marker is provided.
Blocking, Collective point-2-point
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
orient | set the marker to change the sign of oriented tags, computed internally if zero |
void INMOST::Mesh::ExchangeOrientedData | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select = 0 , |
||
MarkerType | orient = 0 |
||
) |
This function is similar to ExchangeData, except that it will change the orientation of recieved data upon completion for the exchanged tags, registered through AddOrientedTag.
The orientation marker is computed using MarkNormalOrientation and could be provided by the user. If marker is provided it is assumed to be consistent. It is computed internally if zero marker is provided. This function allows to mix oriented and normal data.
Blocking, Collective point-2-point
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
Compute sum of integer values for all processors with rank lower then current, excluding current processor.
Collective operation.
input | value on current processor |
|
inline |
Marks face with the orientation direction by marker.
If marker is set then face is reversed. Then all faces are oriented either inside or outside of the cell.
Definition at line 3312 of file inmost_mesh.h.
HandleType INMOST::Mesh::FindSharedAdjacency | ( | const HandleType * | arr, |
enumerator | num | ||
) | const |
Retrieve upper adjacent that is shared by multiple lower adjacencies.
void INMOST::Mesh::GetData | ( | HandleType | h, |
const Tag & | tag, | ||
enumerator | shift, | ||
enumerator | size, | ||
void * | data | ||
) | const |
Copy inner data array of size elements to provided array beginning from shift element.
It is assumed that user-provided array don't overlap inner data.
h | handle of element |
tag | tag that represents data |
shift | for which element to start to copy |
size | how many elements to copy |
data | user-provided array where data should be copied |
INMOST_DATA_ENUM_TYPE INMOST::Mesh::GetDataCapacity | ( | const INMOST_DATA_BULK_TYPE * | data, |
INMOST_DATA_ENUM_TYPE | size, | ||
const Tag & | tag | ||
) | const |
Returns the number of bytes in data used for given type of tag.
Trivial for all the types except DATA_VARIABLE.
INMOST_DATA_ENUM_TYPE INMOST::Mesh::GetDataCapacity | ( | HandleType | h, |
const Tag & | tag | ||
) | const |
Return the size of the structure in bytes required to represent the data on current element.
This is equal to GetDataSize times Tag::GetBytesSize for all the data types, except for DATA_VARIABLE, that requires a larger structure to accommodate derivatives.
h | handle of element |
tag | tag that represents the data |
INMOST_DATA_ENUM_TYPE INMOST::Mesh::GetDataSize | ( | HandleType | h, |
const Tag & | tag | ||
) | const |
Return the size of the array.
For variable size arrays returns current size of the array. For constant size array returns the same value that may be obtained through GetSize.
h | handle of element |
tag | tag that represents the data |
|
inline |
Get number of dimensions of mesh.
Size of the array returned by Node::Coords will match this number.
Definition at line 1440 of file inmost_mesh.h.
|
inline |
Retrieve tolerance for coordinates comparison.
Definition at line 1430 of file inmost_mesh.h.
std::string INMOST::Mesh::GetFileOption | ( | std::string | key | ) | const |
Get current option corresponding to key.
key | options for which options should be retrieven |
|
inline |
Check whether the marker is set one the element.
h | element handle |
n | stores byte number and byte bit mask that represent marker |
Definition at line 2038 of file inmost_mesh.h.
void INMOST::Mesh::GetMarkerSpace | ( | HandleType | h, |
bulk | copy[MarkerFields] | ||
) | const |
Get a copy of the bytes that store markers on the element.
h | element handle |
copy | storage to put data to |
|
inline |
Get parallel state of the mesh.
Definition at line 1443 of file inmost_mesh.h.
|
inline |
Retrieve currently set parallel strategy for ".pmf" files.
Definition at line 2540 of file inmost_mesh.h.
ElementSet INMOST::Mesh::GetSet | ( | std::string | name | ) |
Retrieve set by name.
name | set name |
|
inline |
Retrieve parallel status of the element.
If mesh is in Serial state then call always returns Element::Owned. otherwise it will return:
h | handle of the element |
Definition at line 2217 of file inmost_mesh.h.
|
inline |
Retrieve global id of the element with right of modification (dangerous to modify).
Run AssignGlobalID so that tag is automatically allocated and shortcut is set within mesh, otherwise tag is not created and call will fail.
h | handle of the element |
Definition at line 2196 of file inmost_mesh.h.
|
inline |
Retrieve global id of the element without right of modification.
Run AssignGlobalID so that tag is automatically allocated and shortcut is set within mesh, otherwise tag is not created and call will fail.
h | handle of the element |
Definition at line 2203 of file inmost_mesh.h.
bool INMOST::Mesh::HaveData | ( | HandleType | h, |
const Tag & | tag | ||
) | const |
Check whether data is present on given element.
Always returns true for dense tag data.
h | handle to the element |
tag | tag that indicates data |
bool INMOST::Mesh::HaveGlobalID | ( | ElementType | types | ) | const |
Test whether global identificator was set on certain type of elements.
This function does not validate correctness of global identificators.
type | Single type of elements on which to test presence of global identificators. |
bool INMOST::Mesh::Hidden | ( | HandleType | h | ) | const |
bool INMOST::Mesh::Hide | ( | HandleType | h | ) |
Hide element from mesh.
All the functions (except direct access like LowConn,HighConn or ElementSet::getElementsHandles) involving adjacencies retrieval would not return this element. Works only inside BeginModification and EndModification, on EndModification all Hidden elements are destroyed.
h | handle of the element |
|
inline |
Access directly higher order adjacencies of current element with right of modification.
This function gives direct access to elements and allows you to overwrite handles which is not recommended. You bypass topology checks, correct connectivity establishment and geometric data updates. If you do so then check connectivity afterwards by Element::CheckElementConnectivity for debugging purposes. Then for correct function of geometrical algorithms in order from lower modified adjacenices to upper modified adjacencies (if some element have lower adjacencies updated then it should be updated otherwise it shouldn't) call ComputeGeometricType to deduce geometric representation or force it by SetGeometricType, then for element of type CELL call RestoreCellNodes, clear current mutual connection to the nodes and establish new mutual connections from nodes returned by RestoreCellNodes; then for all elements call RecomputeGeometricData to automatically recompute all geometric quantities. Don't forget that edges of the face should be ordered for correct retrieval of nodes, otherwise Face::getNodes and Element::getNodes for FACE in 3 dimensions or Cell::getNodes and Element::getNodes for CELL in 2 dimensions will return garbage
h | handle of the element |
Definition at line 2095 of file inmost_mesh.h.
|
static |
Initial initialization.
Calls MPI_Initialize, if MPI was not initialized it is necessary to invoke this function if you plan to use any parallel algorithms Accepts arguments passed to console application or NULL
argc | number of arguments for command line |
argv | strings of arguments of command line |
Returns a reference to inner memory location of the first element of the array of integer values.
Future recommendation: If variable size array was not allocated then this function will generate segmentation fault.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function.
Reference to the data is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
integer_array INMOST::Mesh::IntegerArray | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns an array of integer values.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function. variants of this function with hint data structure.
Array data structure is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
|
inline |
Returns an array of integer values in dense array.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set), likely to result in segfault.
Note that as array is fixed you shouldn't use any functions that alter size of the array as resize, erase, insert, you may use replace if initial and final size will match, in debug mode assert will fire if you try to do this in release (NDEBUG is set) it will lead to segfault.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1793 of file inmost_mesh.h.
|
inline |
Returns an array of integer values in dense array of variable size.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1951 of file inmost_mesh.h.
Returns a reference to inner memory location of the first element of the array of integer values.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1732 of file inmost_mesh.h.
Returns a reference in dense array to the first element of variable size array of integer values.
Future recommendation: If array was not allocated then this function will generate segmentation fault.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1888 of file inmost_mesh.h.
real INMOST::Mesh::Integrate | ( | const Tag & | t, |
enumerator | entry, | ||
ElementType | mask | ||
) |
Integrate data corresponding to tag between all processors.
Elements without the data defined on them or when entry not present will be skipped.
Collective operation.
t | tag that correspond to data to be integrated |
entry | in the array of data |
mask | bitwise or of types of elements on which to integrate |
void INMOST::Mesh::Integrate | ( | enumerator * | input, |
integer | size | ||
) |
Integrate an array of unsigned integer values over all processors.
Collective operation.
input | An array of values on current processor. |
size | Size of the array. |
enumerator INMOST::Mesh::Integrate | ( | enumerator | input | ) |
Integrate unsigned integer value over all processors.
Collective operation.
input | Value on current processor |
Integrate an array of integer values over all processors.
Collective operation.
input | An array of values on current processor. |
size | Size of the array. |
Integrate integer value over all processors.
Collective operation.
input | Value on current processor |
Integrate an array of real values over all processors.
Collective operation.
input | An array of values on current processor. |
size | Size of the array. |
Integrate real value over all processors.
Collective operation.
input | Value on current processor |
|
inline |
Check whether code runs between Mesh::BeginModification, Mesh::EndModification scope.
In case mesh is modified, on element construction Mesh::TieElements will always place elements to the end of the array as a result all the newly created elements will be iterated after current or hidden elements.
Definition at line 3377 of file inmost_mesh.h.
void INMOST::Mesh::Load | ( | std::string | File | ) |
Acceptable file formats for reading.
File | path to the file |
|
inline |
Access directly lower order adjacencies of current element with right of modification.
This function gives direct access to elements and allows you to overwrite handles. If you are going to overwrite them then read recommendations in description for HighConn function.
h | handle of the element |
Definition at line 2121 of file inmost_mesh.h.
void INMOST::Mesh::MarkBoundaryFaces | ( | MarkerType | boundary_marker | ) |
Sets marker for all the faces that have only one neighbouring cell, works correctly in parallel environment.
boundary_marker | Non-private marker that will indicate boundary faces. |
void INMOST::Mesh::MarkNormalOrientation | ( | MarkerType | mrk | ) |
This function should be used to detect normal inversion on ghost interfaces with respect to normal orientation on owner of the interface.
Due to automatic control over normal orientation in the grid, it may happen that some ghost faces have different orientation rather then face on owner processor. It may happen that some data depends on normal orientation, then one should be aware on a local processor orientation may be different from owner value, then the data may have incorrect sign.
mrk | Non-private marker that will indicate inverted normals |
bool INMOST::Mesh::New | ( | HandleType | h | ) | const |
Check whether element is new.
Works only in modification state (between BeginModification and EndModification), when you create elements all of them are marked.
|
inline |
Retrieve the total number of valid tags.
Definition at line 1495 of file inmost_mesh.h.
Returns a reference to inner memory location of the first element of the array of real values.
Future recommendation: If variable size array was not allocated then this function will generate segmentation fault.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function.
Reference to the data is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
real_array INMOST::Mesh::RealArray | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns an array of real values.
If you know that data is certanly dense on elements you access then it is faster to use variants of this function with hint data structure.
Array data structure is guaranteed to be valid during mesh modification.
h | element handle |
tag | tag that represents data |
|
inline |
Returns an array of real values in dense array.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
Note that as array is fixed you shouldn't use any functions that alter size of the array as resize, erase, insert, you may use replace if initial and final size will match, in debug mode assert will fire if you try to do this in release (NDEBUG is set) it will lead to segfault.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1780 of file inmost_mesh.h.
|
inline |
Returns an array of real values in dense array of variable size.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1942 of file inmost_mesh.h.
Returns a reference to inner memory location of the first element of the array of real values.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1723 of file inmost_mesh.h.
Returns a reference in dense array to the first element of variable size array of real values.
Future recommendation: If array was not allocated (resized) then this function will generate segmentation fault.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
h | element handle |
tag | tag that represents data |
Definition at line 1876 of file inmost_mesh.h.
void INMOST::Mesh::RecomputeParallelStorage | ( | ElementType | mask | ) |
Regather ghost and shared element sets for data exchange.
This function will be quite useful if you change statuses of elements or modify mesh on your own bypassing internal algorithms.
No action will be performed if USE_PARALLEL_STORAGE is not set in inmost_common.h, since all the elements are computed during exchange phase.
Generally this is not needed if you use high-level algorithms for mesh modification or mesh redistribution.
mask | Bitwise mask of element types for which to recompute the parallel storage. |
void INMOST::Mesh::RecordParallelStorage | ( | ElementType | mask | ) |
Outputs parallel storage into xml log files.
USE_PARALLEL_STORAGE and USE_PARALLEL_WRITE_TIME should be activated in inmost_common.h.
mask | Bitwise mask of element types for which to log the parallel storage. |
void INMOST::Mesh::Redistribute | ( | ) |
Migrate all the elements to the new owners prescribed in data corresponding to RedistributeTag.
This will perform all the actions to send mesh elements and data and reproduce new mesh partitions on remote elements and correctly resolve parallel state of the mesh. If you have previously prescribed number of layers through ExchangeGhost, then minimal number of actions will be performed to reproduce layers of ghost elements without involving removal of all ghost elements.
Internally function sets up following data on elements using provided information:
Action of this function regarding restoration of layers of ghost elements in the case you have modified mesh without involving Mesh::ResolveModification is yet to be tested and should be considered dangerous.
If you have output from Zoltan or ParMetis for cells of the mesh then just write this output to RedistributeTag and call Mesh::Redistribute.
Collective point-2-point.
void INMOST::Mesh::ReduceData | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select, | ||
ReduceOperation | op | ||
) |
Accumulation of data from ghost elements to shared elements.
Accumulation is performed based on user-provided function. When processor - owner of the element receives data addressed to this element then it calls user-defined op function. Since there may be multiple ghost elements per one shared element, function may be called multiple times.
Several examples of reduction functions may be found within the parallel.cpp source.
Remember that the result will be up to date only on the owner processor of the element. You will have to run Mesh::ExchangeData to make the data up to date among all of the processors.
If you have a tag of DATA_BULK type and you store your own custom data structure in it, it is highly recommended that you provide MPI information about your structure through Tag::SetBulkDataType, this would not do any difference on homogeneous architecture, but it may help you save a lot of time and nerves in heterogeneous parallel environment.
Exchanging tags of DATA_REFERENCE is not implemented, TODO 14.
Blocking, Collective point-2-point
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
op | user-defined operation on received data |
void INMOST::Mesh::ReduceData | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select, | ||
ReduceOperation | op | ||
) |
This function will perform reduction of multiple data tags.
Note that function will be the same for all tags, you can differentiate behavior of function depending on tag name (may be expensive).
Blocking, collective point-2-point
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
op | user-defined operation on received data |
void INMOST::Mesh::ReduceDataBegin | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
This function intializes data reduction.
Read recommendations about exchange_storage object in Mesh::ExchangeDataBegin
Nonblocking, Collective point-2-point
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ReduceDataBegin | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select, | ||
exchange_data & | storage | ||
) |
This function will initialize reduction of multiple data tags.
Nonblocking, collective point-2-point
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
void INMOST::Mesh::ReduceDataEnd | ( | const Tag & | tag, |
ElementType | mask, | ||
MarkerType | select, | ||
ReduceOperation | op, | ||
exchange_data & | storage | ||
) |
This function completes data reduction.
Read Mesh::ReduceData for information about op function
Blocking
tag | tag that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
op | user-defined operation on received data |
void INMOST::Mesh::ReduceDataEnd | ( | const tag_set & | tags, |
ElementType | mask, | ||
MarkerType | select, | ||
ReduceOperation | op, | ||
exchange_data & | storage | ||
) |
This function will finalize exchange of multiple data tags.
Blocking
tags | multiple tags that represents data |
mask | bitwise or of element types |
select | set the marker to filter elements that perform operation, set 0 to select all elements |
storage | buffer that will temporary hold sended data |
op | user-defined operation on received data |
Returns a reference in an inner representation to the first element of array of element handles.
Future recommendation: If variable size array was not allocated then this function will generate segmentation fault.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function.
Reference to the data is guaranteed to be valid during mesh modification.
Using handle you can construct objects of type Storage, Element, Node, Edge, Face, Cell, ElementSet by calling their constructor with pointer to mesh and handle as arguments.
h | element handle |
tag | tag that represents data |
reference_array INMOST::Mesh::ReferenceArray | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns an array of element handles.
If you know that data is certanly sparse or dense on elements you access then it is faster to use variants of this function with hint data structure.
The class reference_array that is used to represent array of elements stores handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain handle you may use reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
Array data structure is guaranteed to be valid during mesh modification. If you delete elements by Mesh::Delete or Element::Delete all the references are also will be valid and reverted to InvalidHandle on Mesh::ApplyModification. If you use Mesh::Destroy to delete mesh elements or you delete elements not within modification state then references may become either invalid but not testable against InvalidHandle (situation may be tested by Element::isValid or Mesh::isValidHandle) or reference may be reused by another element. If you mix deletion and construction of elements then there is no way to resolve this situation, except if you have created only one element, then it may be retrieved by Mesh::LastHandle.
h | element handle |
tag | tag that represents data |
|
inline |
Returns an array of element handles in dense array.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set), likely to result in segfault.
Note that as array is fixed you shouldn't use any functions that alter size of the array as resize, erase, insert, you may use replace if initial and final size will match, in debug mode assert will fire if you try to do this in release (NDEBUG is set) it will lead to segfault.
The class reference_array that is used to represent array of elements stores handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain handle you may use reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1835 of file inmost_mesh.h.
|
inline |
Returns an array of element handles in dense array of variable size.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
The class reference_array that is used to represent array of elements stores handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain handle you may use reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
h | element handle |
tag | tag that represents data |
Definition at line 1985 of file inmost_mesh.h.
Returns a reference in dense array to the first element of constant size array of element handles.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
Using handle you can construct objects of type Storage, Element, Node, Edge, Face, Cell, ElementSet by calling their constructor with pointer to mesh and handle as arguments.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1754 of file inmost_mesh.h.
Returns a reference in dense array to the first element of variable size array of element handles.
Future recommendation: If array was not allocated then this function will generate segmentation fault.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
Using handle you can construct objects of type Storage, Element, Node, Edge, Face, Cell, ElementSet by calling their constructor with pointer to mesh and handle as arguments.
h | element handle |
tag | tag that represents data |
Definition at line 1917 of file inmost_mesh.h.
void INMOST::Mesh::ReleaseMarker | ( | MarkerType | n, |
ElementType | cleanup = NONE |
||
) |
Release marker back for reuse.
This function will only notice mesh that the marker is free to be reused, this will not clear markers from elements. Before releasing the marker you should ensure that all the marker is removed from all the elements. Since many inner algorithms use markers, not properly clearing markers from elements may lead to undefined behavior.
Since it is expensive to check asserts will fire in debug mode (NDEBUG not set) only if you define CHECKS_MARKERS in inmost_common.h, no checks will be performed in release mode(NDEBUG is set).
n | Byte position and byte bit mask. |
cleanup | Elements on which marker should be removed. |
|
inline |
Remove the marker from the element.
h | element handle |
n | stores byte number and byte bit mask that represent marker |
Definition at line 2044 of file inmost_mesh.h.
|
inline |
Remove the marker from the set of handles.
h | set of handles |
n | number of handles |
m | stores byte number and byte bit mask that represent marker |
Definition at line 2052 of file inmost_mesh.h.
remote_reference& INMOST::Mesh::RemoteReference | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns a reference in an inner representation to the first element of array of element remote handles.
Future recomendation: If variable size array was not allocated then this function will generate segmentation fault.
If you know that data is certanly dense and fixed or variable on elements you access then it is faster to use specialized variants of this function.
Reference to the data is guaranteed to be valid during mesh modification.
Using remote handle you can construct objects of type Element with the function MakeElement or MakeElementRef.
h | element handle |
tag | tag that represents data |
remote_reference_array INMOST::Mesh::RemoteReferenceArray | ( | HandleType | h, |
const Tag & | tag | ||
) |
Returns an array of element remote handles.
If you know that data is certanly sparse or dense on elements you access then it is faster to use variants of this function with hint data structure.
The class reference_array that is used to represent array of elements stores remote handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form an object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain remote handle you may use remote_reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
Array data structure is guaranteed to be valid during mesh modification. If you delete elements by Mesh::Delete or Element::Delete all the references are also will be valid and reverted to InvalidHandle on Mesh::ApplyModification. If you use Mesh::Destroy to delete mesh elements or you delete elements not within modification state then references may become either invalid but not testable against InvalidHandle (situation may be tested by Element::isValid or Mesh::isValidHandle) or reference may be reused by another element. If you mix deletion and construction of elements then there is no way to resolve this situation, except if you have created only one element, then it may be retrieved by Mesh::LastHandle.
h | element handle |
tag | tag that represents data |
|
inline |
Returns an array of element remote handles in dense array.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set), likely to result in segfault.
Note that as array is fixed you shouldn't use any functions that alter size of the array as resize, erase, insert, you may use replace if initial and final size will match, in debug mode assert will fire if you try to do this in release (NDEBUG is set) it will lead to segfault.
The class remote_reference_array that is used to represent array of elements stores handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain handle you may use reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1864 of file inmost_mesh.h.
|
inline |
Returns an array of element remote handles in dense array of variable size.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
The class remote_reference_array that is used to represent array of elements stores remote handles inside but accessing them through square scopes [] or by arrow -> in iterator will automatically form object of type Element. If you are not sure that stored handles are valid, you should either check that by Element::isValid (involves deep check) or test handle against InvalidHandle (simple check). To obtain handle you may use reference_array::at function or dereference * operator for iterator. If you need custom object like Node, Edge, Face, Cell or ElementSet you may use Element::getAsNode, Element::getAsEdge, Element::getAsFace, Element::getAsCell and Element::getAsSet functions.
h | element handle |
tag | tag that represents data |
Definition at line 2010 of file inmost_mesh.h.
|
inline |
Returns a reference in dense array to the first element of constant size array of element remote handles.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and fixed is incorrect, no checks performed in release mode (NDEBUG is set).
Using handle you can construct objects of type Storage, Element, Node, Edge, Face, Cell, ElementSet by calling their constructor with pointer to mesh and handle as arguments.
h | element handle |
tag | tag that represents dense data of fixed size on given handle |
Definition at line 1767 of file inmost_mesh.h.
|
inline |
Returns a reference in dense array to the first element of variable size array of element remote handles.
Future recommendation: If array was not allocated then this function will generate segmentation fault.
If you don't know any hint information about tag data you should not use this function.
Asserts will fire in debug mode if assumption that data is dense and variable is incorrect, no checks performed in release mode (NDEBUG is set).
Using handle you can construct objects of type Storage, Element, Node, Edge, Face, Cell, ElementSet by calling their constructor with pointer to mesh and handle as arguments.
h | element handle |
tag | tag that represents data |
Definition at line 1933 of file inmost_mesh.h.
void INMOST::Mesh::RemoveGhostElements | ( | const HandleType * | ghost, |
enumerator | num | ||
) |
Delete some ghost cells provided in array.
Non-ghost elements will also be deleted.
This algorithm will properly communicate between processors so that parallel states of deleted elements properly updated on remote processors. Internally function invokes Destroy function, not Delete, which hides elements during modification state, currently it is not expected that any parallel algorithms will be performed between BeginModification and EndModification since modification may break parallel state though it is never checked whether the mesh is in the modification state, so you are free to experiment. This behavior may change in future.
Collective point-2-point.
ghost | array of handles |
num | number of handles |
void INMOST::Mesh::ResolveModification | ( | ) |
This function is not yet implemented.
It should correctly resolve parallel state of newly created elements, provide them valid global identificators, resolve owners of the elements potentially optimized using information from BridgeTag and LayersTag May use ResolveShared function as basis but instead the whole mesh run the same algorithm for subset.
void INMOST::Mesh::Save | ( | std::string | File | ) |
Acceptable file formats for writing.
Remeber: .pmf stores all references to elements. If reference are broken due to mesh modification, saving or loading such a mesh may lead to segfault. To automatically maintain correct references modify mesh using BeginModification, ApplyModification, EndModification
File | path to the file |
void INMOST::Mesh::SetData | ( | HandleType | h, |
const Tag & | tag, | ||
enumerator | shift, | ||
enumerator | size, | ||
const void * | data | ||
) |
Copy into inner data array of size elements from provided array beginning from shift element.
h | handle of element |
tag | tag that represents data |
shift | for which element to start to copy |
size | how many elements to copy |
data | user-provided array where data should be copied |
void INMOST::Mesh::SetDataSize | ( | HandleType | h, |
const Tag & | tag, | ||
enumerator | new_size | ||
) |
Sets the size of the array for data of variable size.
If you try to change size of data of constant size then if size is different from current then in debug mode (NDEBUG not set) assertion will fail, in release mode nothing happens.
h | handle of element |
tag | tag that represents the data |
new_size | new size of the array |
void INMOST::Mesh::SetDimensions | ( | integer | dim | ) |
Set number of dimensions for mesh.
It sets the size for number of internally stored coordinates. Size of the array returned by Node::Coords will match this number. When you change number of dimensions and there are nodes with bigger number of dimensions then first dim coordinates are copied and the rest are dropped.
|
inline |
Set tolerance for coordinates comparison.
This tolerance is used in comparators when two meshes are merged during loading, in ResolveShared to check that nodes on different processors match and in UnpackElementsData
e | small real value |
Definition at line 1427 of file inmost_mesh.h.
void INMOST::Mesh::SetFileOption | ( | std::string | , |
std::string | |||
) |
Set file option.
Current available file options:
|
inline |
Set a marker on the element represented by handle.
h | element handle |
n | stores byte number and byte bit mask that represent marker |
Definition at line 2023 of file inmost_mesh.h.
|
inline |
Set a marker on the set of handles.
h | set of handles |
n | number of handles |
m | stores byte number and byte bit mask that represent marker |
Definition at line 2032 of file inmost_mesh.h.
void INMOST::Mesh::SetMarkerSpace | ( | HandleType | h, |
bulk | source[MarkerFields] | ||
) |
Overwrite the bytes that store markers on the element.
h | element handle |
source | storage to get data from |
|
inline |
Set parallel strategy for inner communications.
There are three possible scenarios in parallel communication associated in accordance to enum Prepare structure:
Currently with UnknownSize it will run the following algorithm none for strategy 0, following for strategies 1 and 2:
With UnknownSource there are two options depending from the USE_MPI_P2P define. If USE_MPI_P2P is defined then MPI-2 api operations will be used
if USE_MPI_P2P not set then MPI-1 api will be used
Initially it was intended to mainly use MPI-2 functionality for both scenarios but it was realized that there is no available hardware on which MPI-2 functionality performs much better than MPI-1 counterparts, especially in the case of UnknownSize. Probably this happens due to lack of support of RDMA operations. If you believe it will be better to use MPI-2 in both cases you are free to uncomment definition of PREFFER_MPI_P2P in inmost_common.h then MPI-2 will be used in both scenarios. These algorithms above are implemented in Mesh::ExchangeBufferInner.
After first problem was resolved following strategies are available for main communication: strategy = 0
This strategy shows to be the fastest on mac with intel core 2 duo it appears to be independent of apriori knowledge of sizes of incoming messages and skips the step of determining sizes in all the cases but still it requires establishing knowledge of communicating processors Asynchronous sending and receiving may be performed by breaking the steps 1) and 2-5) but should be considered bad since it will be performed without appropriate receive buffers posted for sends, as a result messages will stuck in network pipeline and would be repeatedly rejected resulting in bad networking performance especially if processors have small memory. As a result non-asynchronous communication is implemented with this strategy breaking steps 1-5) and 6) when you ask for asynchronous communication strategy = 1
True asynchronous behavior is reproduced by breaking 1-2) and 3) strategy = 2
For asynchronous communication algorithm is broken into 1-3) and 4) which is fairly asynchronous. The only provisional benefit it may have on machines with small memory since it should bypass any allocation of buffers for sent and received data by MPI and probably not perform any rendezvous communication to ensure data allocation. But MPI_Barrier looks like elephant here.
Algorithms above are implemented in Mesh::ExchangeBuffersInner
strategy = 0
This strategy requires one processor to hold all the data, which is quite bad for large files. New strategy may be created from this one in the future when each processors consequently obtain access to the file using std::fstream and writes the data.
strategy = 1
on load it will perform
Availible only when USE_MPI_P2P is set because it rely on MPI-2 api that begins with MPI_File_xxx some MPI-1 standards contain this API as an extension.
The strategy 1 appeared to be considerably slower on INM cluster than strategy 0, this may happen due to lack of read-write devices that able to work in parallel. On IBM Bluegene/p strategy 1 was not working due to same old problem with shared file pointers in their MPI realization
Definition at line 2537 of file inmost_mesh.h.
|
inline |
Set parallel status of the element.
If mesh is in Serial state then call will fire asserts in debug mode and segfault in relese mode.
Parallel status controls how exchange of data between elements will be performed, it is expected that number of elements and copies of elements do match between processors. This kind of check is never performed and if you fail to setup statuses correctly, you may end up with data being copied to incorrect elements. If you modify statuses on your own don't forget to call RecomputeParallelStorage, otherwise exchange will be performed by old status guidelines.
h | handle of the element |
s | new status of the element |
Definition at line 2229 of file inmost_mesh.h.
bool INMOST::Mesh::Show | ( | HandleType | h | ) |
Show element from mesh.
h | handle of the element |
void INMOST::Mesh::SortByGlobalID | ( | HandleType * | h, |
enumerator | num | ||
) |
void INMOST::Mesh::SortParallelStorage | ( | ElementType | mask | ) |
Sort parallel storage.
Parallel storage is sorted according to global identificators or centroids of elements if global identificators are not available. If you manually change global identificators or if global identificators are not available and coordinates of nodes change, then you should invoke this function. You can check presence of global identificators on single type of elements using function Mesh::HaveGlobalID. This function is called automatically inside Mesh::AssignGlobalID. No action will be performed if USE_PARALLEL_STORAGE is not set in inmost_common.h.
mask | Bitwise mask of element types for which to sort the parallel storage. |
ElementType INMOST::Mesh::SynchronizeElementType | ( | ElementType | etype | ) |
Synchronize bitwise mask of element types between processors.
Collective operation
etype | bitwise type mask |
void INMOST::Mesh::SynchronizeMarker | ( | MarkerType | marker, |
ElementType | mask, | ||
SyncBitOp | op | ||
) |
Synchronize marker on elements between processors using provided operation.
Depending on requested operation following action is performed:
marker | marker to be synchronized |
mask | bitwise or type mask |
op | operation, one of SYNC_BIT_SET, SYNC_BIT_OR, SYNC_BIT_XOR, SYNC_BIT_AND |
std::set<std::string> INMOST::Mesh::TagOptions | ( | std::string | name | ) | const |
Collect file options related to records Tag:TAGNAME.
given | option name, such as nosave, noload, noderivatives, loadonly, saveonly |
|
inline |
This will return tag by which you can retrieve error mark to any element on which topology check failed.
As this is sparse tag you can check presence of error by Element::HaveData or Mesh::HaveData check. This tag will be valid only if you pass MARK_ON_ERROR to Mesh::GetTopologyCheck and will be deleted if you pass MARK_ON_ERROR to Mesh::RemTopologyCheck
Definition at line 3451 of file inmost_mesh.h.
integer INMOST::Mesh::TotalNumberOf | ( | ElementType | mask | ) |
Sum of all physical elements, it excludes ghost copies.
To compute total number including ghost copies run Integrate(NumberOf(mask))
Collective operation.
mask | bitwise mask of element types, example: NODE | CELL |
void INMOST::Mesh::WachspressInterpolation2D | ( | const real * | x, |
const Face & | f, | ||
std::map< HandleType, real > & | nodes_stencil | ||
) | const |
Compute node-centered interpolation on 2d face for point.
Point should be inside face or on its boundary.
x | Interpolation point |
f | Face (should be 2d) which contains point |
nodes_stencil | Vector of pairs (node handle, coefficient) to store interpolation data |
void INMOST::Mesh::WachspressInterpolation3D | ( | const real * | x, |
const Cell & | c, | ||
std::map< HandleType, real > & | nodes_stencil | ||
) | const |
Compute node-centered interpolation on 3d cell for point Point should be inside cell or on its boundary.
x | Interpolation point |
c | Cell (should be 3d) which contains point |
nodes_stencil | Vector of pairs (node handle, coefficient) to store interpolation data |