moab
|
Main interface class to MOAB. More...
#include <moab/Interface.hpp>
Classes | |
class | HONodeAddedRemoved |
function object for recieving events from MB of higher order nodes added to entities More... | |
Public Types | |
enum | { INTERSECT, UNION } |
Enumerated type used in get_adjacencies() and other functions. More... | |
Interface | |
Interface () | |
constructor | |
virtual | ~Interface () |
destructor | |
virtual EntityHandle | get_root_set ()=0 |
return the entity set representing the whole mesh | |
virtual ErrorCode | query_interface_type (const std::type_info &iface_type, void *&iface)=0 |
template<class IFace > | |
ErrorCode | query_interface (IFace *&ptr) |
virtual ErrorCode | release_interface_type (const std::type_info &iface_type, void *iface)=0 |
Release reference to MB interface. | |
template<class IFace > | |
ErrorCode | release_interface (IFace *interface) |
constructor | |
virtual float | api_version (std::string *version_string=NULL) |
Release reference to MB interface. | |
virtual float | impl_version (std::string *version_string=NULL)=0 |
Returns the major.minor version number of the implementation. | |
Type and id | |
virtual EntityType | type_from_handle (const EntityHandle handle) const =0 |
Returns the entity type of an EntityHandle. | |
virtual EntityID | id_from_handle (const EntityHandle handle) const =0 |
Returns the id from an EntityHandle. | |
virtual int | dimension_from_handle (const EntityHandle handle) const =0 |
Returns the topological dimension of an entity. | |
virtual ErrorCode | handle_from_id (const EntityType type, const EntityID, EntityHandle &handle) const =0 |
Gets an entity handle from the data base, if it exists, according to type and id. | |
Mesh input/output | |
virtual ErrorCode | load_mesh (const char *file_name, const int *active_block_id_list=NULL, const int num_blocks=0)=0 |
Loads a mesh file into the database. | |
virtual ErrorCode | load_file (const char *file_name, const EntityHandle *file_set=0, const char *options=0, const char *set_tag_name=0, const int *set_tag_values=0, int num_set_tag_values=0)=0 |
Load or import a file. | |
virtual ErrorCode | write_mesh (const char *file_name, const EntityHandle *output_list=NULL, const int num_sets=0)=0 |
Writes mesh to a file. | |
virtual ErrorCode | write_file (const char *file_name, const char *file_type=0, const char *options=0, const EntityHandle *output_sets=0, int num_output_sets=0, const Tag *tag_list=0, int num_tags=0)=0 |
Write or export a file. | |
virtual ErrorCode | write_file (const char *file_name, const char *file_type, const char *options, const Range &output_sets, const Tag *tag_list=0, int num_tags=0)=0 |
Write or export a file. | |
virtual ErrorCode | delete_mesh ()=0 |
Deletes all mesh entities from this MB instance. | |
Coordinates and dimensions | |
virtual ErrorCode | get_vertex_coordinates (std::vector< double > &coords) const =0 |
Get blocked vertex coordinates for all vertices. | |
virtual ErrorCode | coords_iterate (Range::const_iterator iter, Range::const_iterator end, double *&xcoords_ptr, double *&ycoords_ptr, double *&zcoords_ptr, int &count)=0 |
get pointers to coordinate data | |
virtual ErrorCode | get_coords (const Range &entity_handles, double *coords) const =0 |
Gets xyz coordinate information for range of vertices. | |
virtual ErrorCode | get_coords (const EntityHandle *entity_handles, const int num_entities, double *coords) const =0 |
Gets xyz coordinate information for vector of vertices. | |
virtual ErrorCode | get_coords (const Range &entity_handles, double *x_coords, double *y_coords, double *z_coords) const =0 |
Get vertex coordinates in blocks by dimension. | |
virtual ErrorCode | set_coords (const EntityHandle *entity_handles, const int num_entities, const double *coords)=0 |
Sets the xyz coordinates for a vector of vertices. | |
virtual ErrorCode | set_coords (Range entity_handles, const double *coords)=0 |
Sets the xyz coordinates for a vector of vertices. | |
virtual ErrorCode | get_dimension (int &dim) const =0 |
Get overall geometric dimension. | |
virtual ErrorCode | set_dimension (const int dim)=0 |
Set overall geometric dimension. | |
Connectivity | |
virtual ErrorCode | connect_iterate (Range::const_iterator iter, Range::const_iterator end, EntityHandle *&connect, int &verts_per_entity, int &count)=0 |
get pointers to connectivity data | |
virtual ErrorCode | get_connectivity_by_type (const EntityType type, std::vector< EntityHandle > &connect) const =0 |
Get the connectivity array for all entities of the specified entity type. | |
virtual ErrorCode | get_connectivity (const EntityHandle *entity_handles, const int num_handles, Range &connectivity, bool corners_only=false) const =0 |
Gets the connectivity for a vector of elements. | |
virtual ErrorCode | get_connectivity (const Range &entity_handles, Range &connectivity, bool corners_only=false) const =0 |
Gets the connectivity for elements. | |
virtual ErrorCode | get_connectivity (const EntityHandle *entity_handles, const int num_handles, std::vector< EntityHandle > &connectivity, bool corners_only=false, std::vector< int > *offsets=NULL) const =0 |
Gets the connectivity for a vector of elements. | |
virtual ErrorCode | get_connectivity (const EntityHandle entity_handle, const EntityHandle *&connectivity, int &num_nodes, bool corners_only=false, std::vector< EntityHandle > *storage=0) const =0 |
Gets a pointer to constant connectivity data of entity_handle | |
virtual ErrorCode | set_connectivity (const EntityHandle entity_handle, EntityHandle *connect, const int num_connect)=0 |
Sets the connectivity for an EntityHandle. For non-element handles, return an error. | |
Adjacencies | |
virtual ErrorCode | get_adjacencies (const EntityHandle *from_entities, const int num_entities, const int to_dimension, const bool create_if_missing, std::vector< EntityHandle > &adj_entities, const int operation_type=Interface::INTERSECT)=0 |
Get the adjacencies associated with a vector of entities to entities of a specfied dimension. | |
virtual ErrorCode | get_adjacencies (const EntityHandle *from_entities, const int num_entities, const int to_dimension, const bool create_if_missing, Range &adj_entities, const int operation_type=Interface::INTERSECT)=0 |
Get the adjacencies associated with a vector of entities to entities of a specfied dimension. | |
virtual ErrorCode | get_adjacencies (const Range &from_entities, const int to_dimension, const bool create_if_missing, Range &adj_entities, const int operation_type=Interface::INTERSECT)=0 |
Get the adjacencies associated with a range of entities to entities of a specfied dimension. | |
virtual ErrorCode | add_adjacencies (const EntityHandle from_handle, const EntityHandle *to_handles, const int num_handles, bool both_ways)=0 |
Adds adjacencies between "from" and "to" entities. | |
virtual ErrorCode | add_adjacencies (const EntityHandle from_handle, Range &adjacencies, bool both_ways)=0 |
Adds adjacencies; same as vector-based, but with range instead. | |
virtual ErrorCode | remove_adjacencies (const EntityHandle from_handle, const EntityHandle *to_handles, const int num_handles)=0 |
Removes adjacencies between handles. | |
virtual ErrorCode | adjacencies_iterate (Range::const_iterator iter, Range::const_iterator end, const std::vector< EntityHandle > **&adjs_ptr, int &count)=0 |
Get a ptr to adjacency lists Get a pointer to adjacency lists. These lists are std::vector<EntityHandle>, which are pointed to by adjs[i]. Adjacencies are not guaranteed to be in order of increasing dimension. Only a const version of this function is given, because adjacency data is managed more carefully in MOAB and should be treated as read-only by applications. If adjacencies have not yet been initialized, adjs_ptr will be NULL (i.e. adjs_ptr == NULL). There may also be NULL entries for individual entities, i.e. adjs_ptr[i] == NULL. | |
Getting entities | |
virtual ErrorCode | get_entities_by_dimension (const EntityHandle meshset, const int dimension, Range &entities, const bool recursive=false) const =0 |
Retrieves all entities of a given topological dimension in the database or meshset. | |
virtual ErrorCode | get_entities_by_dimension (const EntityHandle meshset, const int dimension, std::vector< EntityHandle > &entities, const bool recursive=false) const =0 |
Retrieves all entities of a given topological dimension in the database or meshset. | |
virtual ErrorCode | get_entities_by_type (const EntityHandle meshset, const EntityType type, Range &entities, const bool recursive=false) const =0 |
Retrieve all entities of a given type in the database or meshset. | |
virtual ErrorCode | get_entities_by_type (const EntityHandle meshset, const EntityType type, std::vector< EntityHandle > &entities, const bool recursive=false) const =0 |
Retrieves all entities of a given topological dimension in the database or meshset. | |
virtual ErrorCode | get_entities_by_type_and_tag (const EntityHandle meshset, const EntityType type, const Tag *tag_handles, const void *const *values, const int num_tags, Range &entities, const int condition=Interface::INTERSECT, const bool recursive=false) const =0 |
virtual ErrorCode | get_entities_by_handle (const EntityHandle meshset, Range &entities, const bool recursive=false) const =0 |
Returns all entities in the data base or meshset, in a range (order not preserved) | |
virtual ErrorCode | get_entities_by_handle (const EntityHandle meshset, std::vector< EntityHandle > &entities, const bool recursive=false) const =0 |
Returns all entities in the data base or meshset, in a vector (order preserved) | |
virtual ErrorCode | get_number_entities_by_dimension (const EntityHandle meshset, const int dimension, int &num_entities, const bool recursive=false) const =0 |
Return the number of entities of given dimension in the database or meshset. | |
virtual ErrorCode | get_number_entities_by_type (const EntityHandle meshset, const EntityType type, int &num_entities, const bool recursive=false) const =0 |
Retrieve the number of entities of a given type in the database or meshset. | |
virtual ErrorCode | get_number_entities_by_type_and_tag (const EntityHandle meshset, const EntityType type, const Tag *tag_handles, const void *const *values, const int num_tags, int &num_entities, const int condition=Interface::INTERSECT, const bool recursive=false) const =0 |
virtual ErrorCode | get_number_entities_by_handle (const EntityHandle meshset, int &num_entities, const bool recursive=false) const =0 |
Returns number of entities in the data base or meshset. | |
Mesh modification | |
virtual ErrorCode | create_element (const EntityType type, const EntityHandle *connectivity, const int num_vertices, EntityHandle &element_handle)=0 |
Create an element based on the type and connectivity. | |
virtual ErrorCode | create_vertex (const double coordinates[3], EntityHandle &entity_handle)=0 |
Creates a vertex with the specified coordinates. | |
virtual ErrorCode | create_vertices (const double *coordinates, const int nverts, Range &entity_handles)=0 |
Create a set of vertices with the specified coordinates. | |
virtual ErrorCode | merge_entities (EntityHandle entity_to_keep, EntityHandle entity_to_remove, bool auto_merge, bool delete_removed_entity)=0 |
Merge two entities into a single entity. | |
virtual ErrorCode | delete_entities (const EntityHandle *entities, const int num_entities)=0 |
Removes entities in a vector from the data base. | |
virtual ErrorCode | delete_entities (const Range &entities)=0 |
Removes entities in a range from the data base. | |
Information | |
virtual ErrorCode | list_entities (const Range &entities) const =0 |
List entities to standard output. | |
virtual ErrorCode | list_entities (const EntityHandle *entities, const int num_entities) const =0 |
List entities, or number of entities in database, to standard output. | |
virtual ErrorCode | list_entity (const EntityHandle entity) const =0 |
List a single entity; no header printed. | |
virtual ErrorCode | get_last_error (std::string &info) const =0 |
Return information about the last error. | |
virtual std::string | get_error_string (const ErrorCode code) const =0 |
Return string representation of given error code. | |
virtual void | estimated_memory_use (const EntityHandle *ent_array=0, unsigned long num_ents=0, unsigned long *total_storage=0, unsigned long *total_amortized_storage=0, unsigned long *entity_storage=0, unsigned long *amortized_entity_storage=0, unsigned long *adjacency_storage=0, unsigned long *amortized_adjacency_storage=0, const Tag *tag_array=0, unsigned num_tags=0, unsigned long *tag_storage=0, unsigned long *amortized_tag_storage=0)=0 |
Calculate amount of memory used to store MOAB data. | |
virtual void | estimated_memory_use (const Range &ents, unsigned long *total_storage=0, unsigned long *total_amortized_storage=0, unsigned long *entity_storage=0, unsigned long *amortized_entity_storage=0, unsigned long *adjacency_storage=0, unsigned long *amortized_adjacency_storage=0, const Tag *tag_array=0, unsigned num_tags=0, unsigned long *tag_storage=0, unsigned long *amortized_tag_storage=0)=0 |
Calculate amount of memory used to store MOAB data. | |
Higher-order elements | |
virtual ErrorCode | convert_entities (const EntityHandle meshset, const bool mid_edge, const bool mid_face, const bool mid_region, HONodeAddedRemoved *function_object=0)=0 |
Convert entities to higher-order elements by adding mid nodes. | |
virtual ErrorCode | side_number (const EntityHandle parent, const EntityHandle child, int &side_number, int &sense, int &offset) const =0 |
Returns the side number, in canonical ordering, of child with respect to parent | |
virtual ErrorCode | high_order_node (const EntityHandle parent_handle, const EntityHandle *subfacet_conn, const EntityType subfacet_type, EntityHandle &high_order_node) const =0 |
Find the higher-order node on a subfacet of an entity. | |
virtual ErrorCode | side_element (const EntityHandle source_entity, const int dim, const int side_number, EntityHandle &target_entity) const =0 |
Return the handle of the side element of a given dimension and index. | |
Tags | |
virtual ErrorCode | tag_get_handle (const char *name, int size, DataType type, Tag &tag_handle, unsigned flags=0, const void *default_value=0, bool *created=0)=0 |
Get a tag handle, possibly creating the tag. | |
virtual ErrorCode | tag_get_handle (const char *name, int size, DataType type, Tag &tag_handle, unsigned flags=0, const void *default_value=0) const =0 |
same as non-const version, except that MB_TAG_CREAT flag is ignored. | |
virtual ErrorCode | tag_get_name (const Tag tag_handle, std::string &tag_name) const =0 |
Get the name of a tag corresponding to a handle. | |
virtual ErrorCode | tag_get_handle (const char *tag_name, Tag &tag_handle) const =0 |
Gets the tag handle corresponding to a name. | |
virtual ErrorCode | tag_get_bytes (const Tag tag, int &bytes_per_tag) const =0 |
Get the size of the specified tag in bytes. | |
virtual ErrorCode | tag_get_length (const Tag tag, int &length) const =0 |
Get the array length of a tag. | |
virtual ErrorCode | tag_get_type (const Tag tag, TagType &tag_type) const =0 |
Get the type of the specified tag. | |
virtual ErrorCode | tag_get_data_type (const Tag tag, DataType &type) const =0 |
Get data type of tag. | |
virtual ErrorCode | tag_get_default_value (const Tag tag, void *def_val) const =0 |
Get the default value of the specified tag. | |
virtual ErrorCode | tag_get_default_value (Tag tag, const void *&def_val, int &size) const =0 |
Get a tag handle, possibly creating the tag. | |
virtual ErrorCode | tag_get_tags (std::vector< Tag > &tag_handles) const =0 |
Get handles for all tags defined in the mesh instance. | |
virtual ErrorCode | tag_get_tags_on_entity (const EntityHandle entity, std::vector< Tag > &tag_handles) const =0 |
Get handles for all tags defined on this entity. | |
virtual ErrorCode | tag_get_data (const Tag tag_handle, const EntityHandle *entity_handles, int num_entities, void *tag_data) const =0 |
Get the value of the indicated tag on the specified entities in the specified vector. | |
virtual ErrorCode | tag_get_data (const Tag tag_handle, const Range &entity_handles, void *tag_data) const =0 |
Get the value of the indicated tag on the specified entities in the specified range. | |
virtual ErrorCode | tag_set_data (Tag tag_handle, const EntityHandle *entity_handles, int num_entities, const void *tag_data)=0 |
Set the value of the indicated tag on the specified entities in the specified vector. | |
virtual ErrorCode | tag_set_data (Tag tag_handle, const Range &entity_handles, const void *tag_data)=0 |
Set the value of the indicated tag on the specified entities in the specified range. | |
virtual ErrorCode | tag_get_by_ptr (const Tag tag_handle, const EntityHandle *entity_handles, int num_entities, const void **tag_data, int *tag_sizes=0) const =0 |
Get pointers to tag data. | |
virtual ErrorCode | tag_get_by_ptr (const Tag tag_handle, const Range &entity_handles, const void **tag_data, int *tag_sizes=0) const =0 |
Get pointers to tag data. | |
virtual ErrorCode | tag_set_by_ptr (Tag tag_handle, const EntityHandle *entity_handles, int num_entities, void const *const *tag_data, const int *tag_sizes=0)=0 |
Set tag data given an array of pointers to tag values. | |
virtual ErrorCode | tag_set_by_ptr (Tag tag_handle, const Range &entity_handles, void const *const *tag_data, const int *tag_sizes=0)=0 |
Set tag data given an array of pointers to tag values. | |
virtual ErrorCode | tag_clear_data (Tag tag_handle, const Range &entity_handles, const void *value, int value_size=0)=0 |
Set tag data given value. | |
virtual ErrorCode | tag_clear_data (Tag tag_handle, const EntityHandle *entity_handles, int num_entity_handles, const void *value, int value_size=0)=0 |
Set tag data given value. | |
virtual ErrorCode | tag_delete_data (Tag tag_handle, const EntityHandle *entity_handles, int num_handles)=0 |
Delete the data of a vector of entity handles and sparse tag. | |
virtual ErrorCode | tag_delete_data (Tag tag_handle, const Range &entity_range)=0 |
Delete the data of a range of entity handles and sparse tag. | |
virtual ErrorCode | tag_iterate (Tag tag_handle, Range::const_iterator begin, Range::const_iterator end, int &count, void *&data_ptr, bool allocate=true)=0 |
Access tag data via direct pointer into contiguous blocks. | |
virtual ErrorCode | tag_delete (Tag tag_handle)=0 |
Remove a tag from the database and delete all of its associated data. | |
Sets | |
virtual ErrorCode | create_meshset (const unsigned int options, EntityHandle &ms_handle, int start_id=0)=0 |
Create a new mesh set. | |
virtual ErrorCode | clear_meshset (const EntityHandle *ms_handles, const int num_meshsets)=0 |
Empty a vector of mesh set. | |
virtual ErrorCode | clear_meshset (const Range &ms_handles)=0 |
Empty a range of mesh set. | |
virtual ErrorCode | get_meshset_options (const EntityHandle ms_handle, unsigned int &options) const =0 |
Get the options of a mesh set. | |
virtual ErrorCode | set_meshset_options (const EntityHandle ms_handle, const unsigned int options)=0 |
Set the options of a mesh set. | |
virtual ErrorCode | subtract_meshset (EntityHandle meshset1, const EntityHandle meshset2)=0 |
Subtract meshsets. | |
virtual ErrorCode | intersect_meshset (EntityHandle meshset1, const EntityHandle meshset2)=0 |
Intersect meshsets. | |
virtual ErrorCode | unite_meshset (EntityHandle meshset1, const EntityHandle meshset2)=0 |
Unite meshsets. | |
virtual ErrorCode | add_entities (EntityHandle meshset, const Range &entities)=0 |
Add to a meshset entities in specified range. | |
virtual ErrorCode | add_entities (EntityHandle meshset, const EntityHandle *entities, const int num_entities)=0 |
Add to a meshset entities in specified vector. | |
virtual ErrorCode | remove_entities (EntityHandle meshset, const Range &entities)=0 |
Remove from a meshset entities in specified range. | |
virtual ErrorCode | remove_entities (EntityHandle meshset, const EntityHandle *entities, const int num_entities)=0 |
Remove from a meshset entities in specified vector. | |
virtual bool | contains_entities (EntityHandle meshset, const EntityHandle *entities, int num_entities, const int operation_type=Interface::INTERSECT)=0 |
Return whether a set contains entities. | |
virtual ErrorCode | replace_entities (EntityHandle meshset, const EntityHandle *old_entities, const EntityHandle *new_entities, int num_entities)=0 |
Replace entities in a set with other entities. | |
Set parents/children | |
virtual ErrorCode | get_parent_meshsets (const EntityHandle meshset, std::vector< EntityHandle > &parents, const int num_hops=1) const =0 |
Get parent mesh sets of a mesh set. | |
virtual ErrorCode | get_parent_meshsets (const EntityHandle meshset, Range &parents, const int num_hops=1) const =0 |
Get parent mesh sets of a mesh set. | |
virtual ErrorCode | get_child_meshsets (const EntityHandle meshset, std::vector< EntityHandle > &children, const int num_hops=1) const =0 |
Get child mesh sets of a mesh set. | |
virtual ErrorCode | get_child_meshsets (const EntityHandle meshset, Range &children, const int num_hops=1) const =0 |
Get child mesh sets of a mesh set. | |
virtual ErrorCode | get_contained_meshsets (const EntityHandle meshset, std::vector< EntityHandle > &contained, const int num_hops=1) const =0 |
Get mesh sets contained in a mesh set. | |
virtual ErrorCode | get_contained_meshsets (const EntityHandle meshset, Range &contained, const int num_hops=1) const =0 |
Get mesh sets contained in a mesh set. | |
virtual ErrorCode | num_parent_meshsets (const EntityHandle meshset, int *number, const int num_hops=1) const =0 |
Get the number of parent mesh sets of a mesh set. | |
virtual ErrorCode | num_child_meshsets (const EntityHandle meshset, int *number, const int num_hops=1) const =0 |
Get the number of child mesh sets of a mesh set. | |
virtual ErrorCode | num_contained_meshsets (const EntityHandle meshset, int *number, const int num_hops=1) const =0 |
Get the number of mesh sets contained in a mesh set. | |
virtual ErrorCode | add_parent_meshset (EntityHandle child_meshset, const EntityHandle parent_meshset)=0 |
Add a parent mesh set to a mesh set. | |
virtual ErrorCode | add_parent_meshsets (EntityHandle child_meshset, const EntityHandle *parent_meshsets, int num_parent_meshsets)=0 |
Add a parent mesh sets to a mesh set. | |
virtual ErrorCode | add_child_meshset (EntityHandle parent_meshset, const EntityHandle child_meshset)=0 |
Add a child mesh set to a mesh set. | |
virtual ErrorCode | add_child_meshsets (EntityHandle parent_meshset, const EntityHandle *child_meshsets, int num_child_meshsets)=0 |
Add a child mesh sets to a mesh set. | |
virtual ErrorCode | add_parent_child (EntityHandle parent, EntityHandle child)=0 |
Add parent and child links between mesh sets. | |
virtual ErrorCode | remove_parent_child (EntityHandle parent, EntityHandle child)=0 |
Remove parent and child links between mesh sets. | |
virtual ErrorCode | remove_parent_meshset (EntityHandle child_meshset, const EntityHandle parent_meshset)=0 |
Remove a parent mesh set from a mesh set. | |
virtual ErrorCode | remove_child_meshset (EntityHandle parent_meshset, const EntityHandle child_meshset)=0 |
Remove a child mesh set from a mesh set. | |
Set iterators | |
virtual ErrorCode | create_set_iterator (EntityHandle meshset, EntityType ent_type, int ent_dim, int chunk_size, bool check_valid, SetIterator *&set_iter)=0 |
Create an iterator over the set Create a new iterator that iterates over entities with the specified type or dimension. Only one of ent_type or dim can be set; use dim=-1 or ent_type=MBMAXTYPE for the other. Iterators for list-type (ordered) sets are stable over set modification, unless entity removed or deleted is the one at the current position of the iterator. If the check_valid parameter is passed as true, entities are checked for validity before being passed back by get_next_entities function (checking entity validity can have a non-negligible cost). |
Main interface class to MOAB.
Definition at line 89 of file Interface.hpp.
anonymous enum |
Enumerated type used in get_adjacencies() and other functions.
Definition at line 697 of file Interface.hpp.
moab::Interface::Interface | ( | ) | [inline] |
virtual moab::Interface::~Interface | ( | ) | [inline, virtual] |
virtual ErrorCode moab::Interface::add_adjacencies | ( | const EntityHandle | from_handle, |
const EntityHandle * | to_handles, | ||
const int | num_handles, | ||
bool | both_ways | ||
) | [pure virtual] |
Adds adjacencies between "from" and "to" entities.
from_handle | Entities on which the adjacencies are placed |
to_handles | Vector of entities referenced by new adjacencies added to from_handle |
num_handles | Number of entities in to_handles |
both_ways | If true, add the adjacency information in both directions; if false, adjacencies are added only to from_handle |
virtual ErrorCode moab::Interface::add_adjacencies | ( | const EntityHandle | from_handle, |
Range & | adjacencies, | ||
bool | both_ways | ||
) | [pure virtual] |
Adds adjacencies; same as vector-based, but with range instead.
virtual ErrorCode moab::Interface::add_child_meshset | ( | EntityHandle | parent_meshset, |
const EntityHandle | child_meshset | ||
) | [pure virtual] |
Add a child mesh set to a mesh set.
Make child_meshset a new child of parent_meshset. This function does not add a corresponding parent link to child_meshset.
parent_meshset | The parent mesh set being given a new child. |
child_meshset | The child being added to parent_meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_child_meshsets | ( | EntityHandle | parent_meshset, |
const EntityHandle * | child_meshsets, | ||
int | num_child_meshsets | ||
) | [pure virtual] |
Add a child mesh sets to a mesh set.
Make child_meshset a new child of parent_meshset. This function does not add a corresponding parent link to child_meshset.
parent_meshset | The parent mesh set being given a new child. |
child_meshset | The child being added to parent_meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_entities | ( | EntityHandle | meshset, |
const Range & | entities | ||
) | [pure virtual] |
Add to a meshset entities in specified range.
Add to a meshset entities in specified range. If meshset has MESHSET_TRACK_OWNER option set, adjacencies are also added to entities in entities.
meshset | Mesh set being added to |
entities | Range of entities being added to meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_entities | ( | EntityHandle | meshset, |
const EntityHandle * | entities, | ||
const int | num_entities | ||
) | [pure virtual] |
Add to a meshset entities in specified vector.
Add to a meshset entities in specified vector. If meshset has MESHSET_TRACK_OWNER option set, adjacencies are also added to entities in entities.
meshset | Mesh set being added to |
entities | 1d vector of entities being added to meshset |
num_entities | Number of entities in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_parent_child | ( | EntityHandle | parent, |
EntityHandle | child | ||
) | [pure virtual] |
Add parent and child links between mesh sets.
Makes child_meshset a new child of parent_meshset, and vica versa.
parent | The parent mesh set being given a new child, and the new parent |
child | The child being given a new parent, and the new child |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_parent_meshset | ( | EntityHandle | child_meshset, |
const EntityHandle | parent_meshset | ||
) | [pure virtual] |
Add a parent mesh set to a mesh set.
Make parent_meshset a new parent of child_meshset. This function does not add a corresponding child link to parent_meshset.
child_meshset | The child mesh set being given a new parent. |
parent_meshset | The parent being added to child_meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::add_parent_meshsets | ( | EntityHandle | child_meshset, |
const EntityHandle * | parent_meshsets, | ||
int | num_parent_meshsets | ||
) | [pure virtual] |
Add a parent mesh sets to a mesh set.
Make parent_meshset a new parent of child_meshset. This function does not add a corresponding child link to parent_meshset.
child_meshset | The child mesh set being given a new parent. |
parent_meshset | The parent being added to child_meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::adjacencies_iterate | ( | Range::const_iterator | iter, |
Range::const_iterator | end, | ||
const std::vector< EntityHandle > **& | adjs_ptr, | ||
int & | count | ||
) | [pure virtual] |
Get a ptr to adjacency lists Get a pointer to adjacency lists. These lists are std::vector<EntityHandle>, which are pointed to by adjs[i]. Adjacencies are not guaranteed to be in order of increasing dimension. Only a const version of this function is given, because adjacency data is managed more carefully in MOAB and should be treated as read-only by applications. If adjacencies have not yet been initialized, adjs_ptr will be NULL (i.e. adjs_ptr == NULL). There may also be NULL entries for individual entities, i.e. adjs_ptr[i] == NULL.
iter | Iterator to beginning of entity range desired |
end | End iterator for which adjacencies are requested |
adjs_ptr | Pointer to pointer to const std::vector<EntityHandle>; each member of that array is the vector of adjacencies for this entity |
count | Number of entities in the contiguous chunk starting from *iter |
Implemented in moab::Core.
float moab::Interface::api_version | ( | std::string * | version_string = NULL | ) | [inline, virtual] |
Release reference to MB interface.
Returns the major.minor version number of the interface
version_string | If non-NULL, will be filled in with a string, possibly containing implementation-specific information |
Definition at line 2033 of file Interface.hpp.
{ if (NULL != version_string) *version_string = std::string("MOAB API version ") + std::string(MOAB_API_VERSION_STRING); return MOAB_API_VERSION; }
virtual ErrorCode moab::Interface::clear_meshset | ( | const EntityHandle * | ms_handles, |
const int | num_meshsets | ||
) | [pure virtual] |
Empty a vector of mesh set.
Empty a mesh set.
ms_handles | 1d vector of handles of sets being emptied |
num_meshsets | Number of entities in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::clear_meshset | ( | const Range & | ms_handles | ) | [pure virtual] |
Empty a range of mesh set.
Empty a mesh set.
ms_handles | Range of handles of sets being emptied |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::connect_iterate | ( | Range::const_iterator | iter, |
Range::const_iterator | end, | ||
EntityHandle *& | connect, | ||
int & | verts_per_entity, | ||
int & | count | ||
) | [pure virtual] |
get pointers to connectivity data
BEWARE, THIS GIVES ACCESS TO MOAB'S INTERNAL STORAGE, USE WITH CAUTION! This function returns a pointer to MOAB's internal storage for entity connectivity. For each contiguous sub-range of entities, those entities are guaranteed to have the same number of vertices (since they're in the same ElementSequence). Count is given in terms of entities, not elements of the connectivity array. Access is similar to tag_iterate, see documentation for that function for details about arguments and a coding example.
iter | Iterator to first entity you want coordinates for |
end | Iterator to last entity you want coordinates for |
connect | Pointer to connectivity storage for these entities |
verts_per_entity | Number of vertices per entity in this block of entities |
count | Number of entities for which returned pointers are valid/contiguous |
Implemented in moab::Core.
virtual bool moab::Interface::contains_entities | ( | EntityHandle | meshset, |
const EntityHandle * | entities, | ||
int | num_entities, | ||
const int | operation_type = Interface::INTERSECT |
||
) | [pure virtual] |
Return whether a set contains entities.
Return whether a set contains entities. Returns true only if ALL entities are contained
meshset | Mesh set being queried |
entities | Entities being queried |
num_entities | Number of entities |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::convert_entities | ( | const EntityHandle | meshset, |
const bool | mid_edge, | ||
const bool | mid_face, | ||
const bool | mid_region, | ||
HONodeAddedRemoved * | function_object = 0 |
||
) | [pure virtual] |
Convert entities to higher-order elements by adding mid nodes.
This function causes MB to create mid-nodes on all edges, faces, and element interiors for all entities in meshset. Higher order nodes appear in an element's connectivity array according to the algorithm described in the documentation for Mesh. If HONodeAddedRemoved function is input, this function is called to notify the application of nodes being added/removed from the mesh.
meshset | The set of entities being converted |
mid_edge | If true, mid-edge nodes are created |
mid_face | If true, mid-face nodes are created |
mid_region | If true, mid-element nodes are created |
function_object | If non-NULL, the node_added or node_removed functions on this object are called when nodes are added or removed from an entity, respectively |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::coords_iterate | ( | Range::const_iterator | iter, |
Range::const_iterator | end, | ||
double *& | xcoords_ptr, | ||
double *& | ycoords_ptr, | ||
double *& | zcoords_ptr, | ||
int & | count | ||
) | [pure virtual] |
get pointers to coordinate data
BEWARE, THIS GIVES ACCESS TO MOAB'S INTERNAL STORAGE, USE WITH CAUTION! This function returns pointers to MOAB's internal storage for vertex coordinates. Access is similar to tag_iterate, see documentation for that function for details about arguments and a coding example.
iter | Iterator to first entity you want coordinates for |
end | Iterator to last entity you want coordinates for |
xcoords_ptr | Pointer to x coordinate storage for these entities |
ycoords_ptr | Pointer to y coordinate storage for these entities |
zcoords_ptr | Pointer to z coordinate storage for these entities |
count | Number of entities for which returned pointers are valid/contiguous |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::create_element | ( | const EntityType | type, |
const EntityHandle * | connectivity, | ||
const int | num_vertices, | ||
EntityHandle & | element_handle | ||
) | [pure virtual] |
Create an element based on the type and connectivity.
Create a new element in the database. Vertices composing this element must already exist, and connectivity must be specified in canonical order for the given element type. If connectivity vector is not correct for EntityType type (ie, a vector with 3 vertices is passed in to make an MeshQuad), the function returns MB_FAILURE.
type | Type of element to create. (MeshTet, MeshTri, MeshKnife, etc.) |
connectivity | 1d vector containing connectivity of element to create. |
num_vertices | Number of vertices in element |
element_handle | Handle representing the newly created element in the database. |
Example:
EntityHandle quad_conn[] = {vertex0, vertex1, vertex2, vertex3}; EntityHandle quad_handle = 0; create_element( MeshQuad, quad_conn, 4, quad_handle );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::create_meshset | ( | const unsigned int | options, |
EntityHandle & | ms_handle, | ||
int | start_id = 0 |
||
) | [pure virtual] |
Create a new mesh set.
Create a new mesh set. Meshsets can store entities ordered or unordered. A set can include entities at most once (MESHSET_SET) or more than once. Meshsets can optionally track its members using adjacencies (MESHSET_TRACK_OWNER); if set, entities are deleted from tracking meshsets before being deleted. This adds data to mesh entities, which can be expensive.
options | Options bitmask for the new meshset, possible values defined above |
ms_handle | Handle for the meshset created |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::create_set_iterator | ( | EntityHandle | meshset, |
EntityType | ent_type, | ||
int | ent_dim, | ||
int | chunk_size, | ||
bool | check_valid, | ||
SetIterator *& | set_iter | ||
) | [pure virtual] |
Create an iterator over the set Create a new iterator that iterates over entities with the specified type or dimension. Only one of ent_type or dim can be set; use dim=-1 or ent_type=MBMAXTYPE for the other. Iterators for list-type (ordered) sets are stable over set modification, unless entity removed or deleted is the one at the current position of the iterator. If the check_valid parameter is passed as true, entities are checked for validity before being passed back by get_next_entities function (checking entity validity can have a non-negligible cost).
Iterators returned by this function can be deleted using the normal C++ delete function. After creating the iterator through this function, further interactions are through methods on the SetIterator class.
meshset | The entity set associated with this iterator (use 0 for whole instance) |
ent_type | Entity type associated with this iterator |
ent_dim | Dimension associated with this iterator |
chunk_size | Chunk size of the iterator |
check_valid | If true, entities are checked for validity before being returned |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::create_vertex | ( | const double | coordinates[3], |
EntityHandle & | entity_handle | ||
) | [pure virtual] |
Creates a vertex with the specified coordinates.
coordinates | Array that has 3 doubles in it. |
entity_handle | EntityHandle representing the newly created vertex in the database. |
Example:
double coordinates[] = {1.034, 23.23, -0.432}; EntityHandle new_handle = 0; create_vertex( coordinates, entity_handle );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::create_vertices | ( | const double * | coordinates, |
const int | nverts, | ||
Range & | entity_handles | ||
) | [pure virtual] |
Create a set of vertices with the specified coordinates.
coordinates | Array that has 3*n doubles in it. |
nverts | Number of vertices to create |
entity_handles | Range passed back with new vertex handles |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::delete_entities | ( | const EntityHandle * | entities, |
const int | num_entities | ||
) | [pure virtual] |
Removes entities in a vector from the data base.
If any of the entities are contained in any meshsets, it is removed from those meshsets which were created with MESHSET_TRACK_OWNER option bit set. Tags for entity are removed as part of this function.
entities | 1d vector of entities to delete |
num_entities | Number of entities in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::delete_entities | ( | const Range & | entities | ) | [pure virtual] |
Removes entities in a range from the data base.
If any of the entities are contained in any meshsets, it is removed from those meshsets which were created with MESHSET_TRACK_OWNER option bit set. Tags for entity are removed as part of this function.
entities | Range of entities to delete |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::delete_mesh | ( | ) | [pure virtual] |
Deletes all mesh entities from this MB instance.
Implemented in moab::Core.
virtual int moab::Interface::dimension_from_handle | ( | const EntityHandle | handle | ) | const [pure virtual] |
Returns the topological dimension of an entity.
Returns the topological dimension of an entity.
handle | The EntityHandle you want to find the dimension of. |
Example:
int dim = dimension_from_handle( handle); if( dim == 0 ) ...
Implemented in moab::Core.
virtual void moab::Interface::estimated_memory_use | ( | const EntityHandle * | ent_array = 0 , |
unsigned long | num_ents = 0 , |
||
unsigned long * | total_storage = 0 , |
||
unsigned long * | total_amortized_storage = 0 , |
||
unsigned long * | entity_storage = 0 , |
||
unsigned long * | amortized_entity_storage = 0 , |
||
unsigned long * | adjacency_storage = 0 , |
||
unsigned long * | amortized_adjacency_storage = 0 , |
||
const Tag * | tag_array = 0 , |
||
unsigned | num_tags = 0 , |
||
unsigned long * | tag_storage = 0 , |
||
unsigned long * | amortized_tag_storage = 0 |
||
) | [pure virtual] |
Calculate amount of memory used to store MOAB data.
This function calculates the amount of memory used to store MOAB data.
There are two possible values for each catagory of memory use. The exact value and the amortized value. The exact value is the amount of memory used to store the data for the specified entities. The amortized value includes the exact value and an amortized estimate of the memory consumed in overhead for storing the values (indexing structures, access structures, etc.)
Note: If ent_array is NULL and total_amortized_storage is *not* NULL, the total memory used by MOAB for storing data all will be returned in the address pointed to by total_amortized_storage.
ent_array | Array of entities for which to estimate the memory use. If NULL, estimate is done for all entities. |
num_ents | The length of ent_array. Not used if ent_rray is NULL. |
total_(amortized_)storage | The sum of the memory entity, adjacency, and all tag storage. |
(amortized_)entity_storage | The storage for the entity definitions (connectivity arrays for elements, coordinates for vertices, list storage within sets, etc.) |
(amortized_)adjacency_storage | The storage for adjacency data. |
tag_array | An array of tags for which to calculate the memory use. |
num_tags | The lenght of tag_array |
(amortized_)tag_storage | If tag_array is not NULL, then one value for each tag specifying the memory used for storing that tag. If tag_array is NULL and this value is not, the location at which to store the total memory used for all tags. |
Implemented in moab::Core.
virtual void moab::Interface::estimated_memory_use | ( | const Range & | ents, |
unsigned long * | total_storage = 0 , |
||
unsigned long * | total_amortized_storage = 0 , |
||
unsigned long * | entity_storage = 0 , |
||
unsigned long * | amortized_entity_storage = 0 , |
||
unsigned long * | adjacency_storage = 0 , |
||
unsigned long * | amortized_adjacency_storage = 0 , |
||
const Tag * | tag_array = 0 , |
||
unsigned | num_tags = 0 , |
||
unsigned long * | tag_storage = 0 , |
||
unsigned long * | amortized_tag_storage = 0 |
||
) | [pure virtual] |
Calculate amount of memory used to store MOAB data.
This function calculates the amount of memory used to store MOAB data.
There are two possible values for each catagory of memory use. The exact value and the amortized value. The exact value is the amount of memory used to store the data for the specified entities. The amortized value includes the exact value and an amortized estimate of the memory consumed in overhead for storing the values (indexing structures, access structures, etc.)
ents | Entities for which to estimate the memory use. |
total_(amortized_)storage | The sum of the memory entity, adjacency, and all tag storage. |
(amortized_)entity_storage | The storage for the entity definitions (connectivity arrays for elements, coordinates for vertices, list storage within sets, etc.) |
(amortized_)adjacency_storage | The storage for adjacency data. |
tag_array | An array of tags for which to calculate the memory use. |
num_tags | The lenght of tag_array |
(amortized_)tag_storage | If tag_array is not NULL, then one value for each tag specifying the memory used for storing that tag. If tag_array is NULL and this value is not, the location at which to store the total memory used for all tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_adjacencies | ( | const EntityHandle * | from_entities, |
const int | num_entities, | ||
const int | to_dimension, | ||
const bool | create_if_missing, | ||
std::vector< EntityHandle > & | adj_entities, | ||
const int | operation_type = Interface::INTERSECT |
||
) | [pure virtual] |
Get the adjacencies associated with a vector of entities to entities of a specfied dimension.
from_entities | Vector of EntityHandle to get adjacencies of. |
num_entities | Number of entities in from_entities |
to_dimension | Dimension of desired adjacencies |
create_if_missing | If true, MB will create any entities of the specfied dimension which have not yet been created (only useful when to_dimension < dim(*from_entities)) |
adj_entities | STL vector to which adjacent entities are appended. |
operation_type | Enum of INTERSECT or UNION. Defines whether to take the intersection or union of the set of adjacencies recovered for the from_entities. |
The adjacent entities in vector adjacencies are not in any particular order.
Example:
std::vector<EntityHandle> adjacencies, from_entities = {hex1, hex2}; // generate all edges for these two hexes get_adjacencies( from_entities, 2, 1, true, adjacencies, Interface::UNION); adjacencies.clear(); // now find the edges common to both hexes get_adjacencies( from_entities, 2, 1, false, adjacencies, Interface::INTERSECT);
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_adjacencies | ( | const EntityHandle * | from_entities, |
const int | num_entities, | ||
const int | to_dimension, | ||
const bool | create_if_missing, | ||
Range & | adj_entities, | ||
const int | operation_type = Interface::INTERSECT |
||
) | [pure virtual] |
Get the adjacencies associated with a vector of entities to entities of a specfied dimension.
Identical to vector-based get_adjacencies function, except results are returned in a range instead of a vector.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_adjacencies | ( | const Range & | from_entities, |
const int | to_dimension, | ||
const bool | create_if_missing, | ||
Range & | adj_entities, | ||
const int | operation_type = Interface::INTERSECT |
||
) | [pure virtual] |
Get the adjacencies associated with a range of entities to entities of a specfied dimension.
Identical to vector-based get_adjacencies function, except "from" entities specified in a range instead of a vector.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_child_meshsets | ( | const EntityHandle | meshset, |
std::vector< EntityHandle > & | children, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get child mesh sets of a mesh set.
If num_hops is 1, only immediate children are returned. If num_hops is zero, all ancenstors are returned. Otherwise, num_hops specifies the maximum number of generations to traverse.
meshset | The mesh set whose children are being queried |
children | STL vector holding the children returned by this function |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_child_meshsets | ( | const EntityHandle | meshset, |
Range & | children, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get child mesh sets of a mesh set.
If num_hops is 1, only immediate children are returned. If num_hops is zero, all ancenstors are returned. Otherwise, num_hops specifies the maximum number of generations to traverse.
meshset | The mesh set whose children are being queried |
children | Range holding the children returned by this function |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_connectivity | ( | const EntityHandle * | entity_handles, |
const int | num_handles, | ||
Range & | connectivity, | ||
bool | corners_only = false |
||
) | const [pure virtual] |
Gets the connectivity for a vector of elements.
Same as vector-based version except range is returned (unordered!)
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_connectivity | ( | const Range & | entity_handles, |
Range & | connectivity, | ||
bool | corners_only = false |
||
) | const [pure virtual] |
Gets the connectivity for elements.
Same as vector-based version except range is returned (unordered!)
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_connectivity | ( | const EntityHandle * | entity_handles, |
const int | num_handles, | ||
std::vector< EntityHandle > & | connectivity, | ||
bool | corners_only = false , |
||
std::vector< int > * | offsets = NULL |
||
) | const [pure virtual] |
Gets the connectivity for a vector of elements.
Corner vertices or all vertices (including higher-order nodes, if any) are returned. For non-element handles (ie, MB_MeshSets), returns an error. Connectivity data is copied from the database into the vector. Connectivity of a vertex is the same vertex. The nodes in connectivity are properly ordered according to that element's canonical ordering.
entity_handles | Vector of element handles to get connectivity of. |
num_handles | Number of entity handles in entity_handles |
connectivity | Vector in which connectivity of entity_handles is returned. |
corners_only | If true, returns only corner vertices, otherwise returns all of them (including any higher-order vertices) |
offsets | If non-NULL, offsets->[i] stores the index of the start of entity i's connectivity, with the last value in offsets one beyond the last entry |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_connectivity | ( | const EntityHandle | entity_handle, |
const EntityHandle *& | connectivity, | ||
int & | num_nodes, | ||
bool | corners_only = false , |
||
std::vector< EntityHandle > * | storage = 0 |
||
) | const [pure virtual] |
Gets a pointer to constant connectivity data of entity_handle
Sets number_nodes equal to the number of nodes of the entity_handle . Faster then the other get_connectivity function because no data is copied. The nodes in 'connectivity' are properly ordered according to the element's canonical ordering.
Example:
const EntityHandle* conn; int number_nodes = 0; get_connectivity( entity_handle, conn, number_nodes );
Example2:
std::vector<EntityHandle> sm_storage; const EntityHandle* conn; int number_nodes; get_connectivity( handle, conn, number_nodes, false, &sm_storage ); if (conn == &sm_storage[0]) std::cout << "Structured mesh element" << std::endl;
entity_handle | EntityHandle to get connectivity of. |
connectivity | Array in which connectivity of entity_handle is returned. |
num_nodes | Number of MeshVertices in array connectivity. |
corners_only | If true, returns only corner vertices, otherwise returns all of them (including any higher-order vertices) |
storage | Some elements (e.g. structured mesh) may not have an explicit connectivity list. This function will normally return MB_NOT_IMPLEMENTED for such elements. However, if the caller passes in a non-null value for this argument, space will be allocated in this vector for the connectivity data and the connectivity pointer will be set to the data in this vector. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_connectivity_by_type | ( | const EntityType | type, |
std::vector< EntityHandle > & | connect | ||
) | const [pure virtual] |
Get the connectivity array for all entities of the specified entity type.
This function returns the connectivity of just the corner vertices, no higher order nodes
type | The entity type of elements whose connectivity is to be returned |
connect | an STL vector used to return connectivity array (in the form of entity handles) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_contained_meshsets | ( | const EntityHandle | meshset, |
std::vector< EntityHandle > & | contained, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get mesh sets contained in a mesh set.
If num_hops is 1, only immediate contents are returned. Otherwise a recursive query of all contained sets is performed, returning every visted set. The value of num_hops limites the depth of the search, with zero indicating no depth limit.
meshset | The mesh set whose contents are being queried |
contained | The result list. |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_contained_meshsets | ( | const EntityHandle | meshset, |
Range & | contained, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get mesh sets contained in a mesh set.
If num_hops is 1, only immediate contents are returned. Otherwise a recursive query of all contained sets is performed, returning every visted set. The value of num_hops limites the depth of the search, with zero indicating no depth limit.
meshset | The mesh set whose contents are being queried |
contained | The result list. |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_coords | ( | const Range & | entity_handles, |
double * | coords | ||
) | const [pure virtual] |
Gets xyz coordinate information for range of vertices.
Length of 'coords' should be at least 3*entity_handles.size() before making call.
entity_handles | Range of vertex handles (error if not of type MeshVertex) |
coords | Array used to return x, y, and z coordinates. |
Example:
double coords[3]; get_coords( vertex_handle, coords ); std::cout<<"x = "<<coords[0]<<std::endl; std::cout<<"y = "<<coords[1]<<std::endl; std::cout<<"z = "<<coords[2]<<std::endl;
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_coords | ( | const EntityHandle * | entity_handles, |
const int | num_entities, | ||
double * | coords | ||
) | const [pure virtual] |
Gets xyz coordinate information for vector of vertices.
Identical to range-based function, except entity handles are specified using a 1d vector and vector length.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_coords | ( | const Range & | entity_handles, |
double * | x_coords, | ||
double * | y_coords, | ||
double * | z_coords | ||
) | const [pure virtual] |
Get vertex coordinates in blocks by dimension.
Get the X, Y, and Z coordinates of a group of vertices. Coordinates are returned in separate arrays, one for each dimension. Each coordinate array must be of sufficient length to hold the coordinate value for each vertex. Array pointers may be NULL if coordinates in the the respective dimension are not desired.
entity_handles | The group of vertex handles for which to get the coordiantes. |
x_coords | Output: the X coordinate of each vertex. May be NULL. |
y_coords | Output: the Y coordinate of each vertex. May be NULL. |
z_coords | Output: the Z coordinate of each vertex. May be NULL. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_dimension | ( | int & | dim | ) | const [pure virtual] |
Get overall geometric dimension.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_dimension | ( | const EntityHandle | meshset, |
const int | dimension, | ||
Range & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieves all entities of a given topological dimension in the database or meshset.
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
dimension | Topological dimension of entities desired. |
entities | Range in which entities of dimension dimension are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Example:
// get 1d (edge) elements in the entire mesh Range edges; get_entities_by_dimension( 0, 1, edges );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_dimension | ( | const EntityHandle | meshset, |
const int | dimension, | ||
std::vector< EntityHandle > & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieves all entities of a given topological dimension in the database or meshset.
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
dimension | Topological dimension of entities desired. |
entities | Range in which entities of dimension dimension are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Example:
// get 1d (edge) elements in the entire mesh Range edges; get_entities_by_dimension( 0, 1, edges );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_handle | ( | const EntityHandle | meshset, |
Range & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Returns all entities in the data base or meshset, in a range (order not preserved)
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for the entire mesh). |
entities | Range in which entities are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Example:
Range entities; // get all non-meshset entities in meshset, including in contained meshsets get_entities_by_handle(meshset, entities, true);
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_handle | ( | const EntityHandle | meshset, |
std::vector< EntityHandle > & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Returns all entities in the data base or meshset, in a vector (order preserved)
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for the entire mesh). |
entities | STL vector in which entities are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Example:
std::vector<EntityHandle> entities; // get all non-meshset entities in meshset, including in contained meshsets get_entities_by_handle(meshset, entities, true);
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_type | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
Range & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieve all entities of a given type in the database or meshset.
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
type | Type of entities to be returned |
entities | Range in which entities of type type are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves. Specifying both recursive=true and type=MBENTITYSET is an error, as it would always result in an empty list. |
Example:
// get the quadrilateral elements in meshset Range quads; get_entities_by_type( meshset, MeshQuad, quads );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_type | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
std::vector< EntityHandle > & | entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieves all entities of a given topological dimension in the database or meshset.
Appends entities to list passed in.
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
dimension | Topological dimension of entities desired. |
entities | Range in which entities of dimension dimension are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Example:
// get 1d (edge) elements in the entire mesh Range edges; get_entities_by_dimension( 0, 1, edges );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_entities_by_type_and_tag | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
const Tag * | tag_handles, | ||
const void *const * | values, | ||
const int | num_tags, | ||
Range & | entities, | ||
const int | condition = Interface::INTERSECT , |
||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieve entities in the database or meshset which have any or all of the tag(s) and (optionally) value(s) specified.
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
type | Type of entities to be returned |
tag_handles | Vector of tag handles entities must have |
values | Vector of pointers to values of tags in tag_handles |
num_tags | Number of tags and values in tag_handles and values |
entities | Range in which entities are returned. |
condition | Boolean condition, either Interface::UNION or Interface::INTERSECT |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves. Specifying both recursive=true and type=MBENTITYSET is an error, as it would always result in an empty list. |
If Interface::UNION is specified as the condition, entities with any of the tags and values specified are returned. If Interface::INTERSECT is specified, only entities with all of the tags/values are returned.
If values is NULL, entities with the specified tags and any corresponding values are returned. Note that if values is non-NULL, it is a vector of pointers to tag values.
Example:
// get the dirichlet sets in a mesh Range dir_sets; Tag dir_tag; tag_get_handle(DIRICHLET_SET_TAG_NAME, dir_tag, 1, MB_TYPE_INTEGER); get_entities_by_type_and_tag(0, MeshEntitySet, &dir_tag, NULL, 1, dir_sets, Interface::UNION);
Implemented in moab::Core.
virtual std::string moab::Interface::get_error_string | ( | const ErrorCode | code | ) | const [pure virtual] |
Return string representation of given error code.
code | Error code for which string is wanted |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_last_error | ( | std::string & | info | ) | const [pure virtual] |
Return information about the last error.
info | std::string into which information on the last error is written. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_meshset_options | ( | const EntityHandle | ms_handle, |
unsigned int & | options | ||
) | const [pure virtual] |
Get the options of a mesh set.
Get the options of a mesh set.
ms_handle | Handle for mesh set being queried |
options | Bit mask in which mesh set options are returned |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_number_entities_by_dimension | ( | const EntityHandle | meshset, |
const int | dimension, | ||
int & | num_entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Return the number of entities of given dimension in the database or meshset.
meshset | Meshset whose entities are being queried (zero if query is for the entire mesh). |
dimension | Dimension of entities desired. |
num_entities | Number of entities of the given dimension |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_number_entities_by_handle | ( | const EntityHandle | meshset, |
int & | num_entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Returns number of entities in the data base or meshset.
Identical to get-entities_by_handle, except number instead of entities are returned
meshset | Meshset whose entities are being queried (zero if query is for the entire mesh). |
num_entities | Range in which num_entities are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_number_entities_by_type | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
int & | num_entities, | ||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieve the number of entities of a given type in the database or meshset.
Identical to get_entities_by_dimension, except returns number instead of entities
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
type | Type of entities to be returned |
num_entities | Number of entities of type type |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves. Specifying both recursive=true and type=MBENTITYSET is an error, as it would always result in an empty list. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_number_entities_by_type_and_tag | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
const Tag * | tag_handles, | ||
const void *const * | values, | ||
const int | num_tags, | ||
int & | num_entities, | ||
const int | condition = Interface::INTERSECT , |
||
const bool | recursive = false |
||
) | const [pure virtual] |
Retrieve number of entities in the database or meshset which have any or all of the tag(s) and (optionally) value(s) specified. Identical to get_entities_by_type_and_tag, except number instead of entities are returned
meshset | Meshset whose entities are being queried (zero if query is for entire mesh). |
type | Type of entities to be returned |
tag_handles | Vector of tag handles entities must have |
values | Vector of pointers to values of tags in tag_handles |
num_tags | Number of tags and values in tag_handles and values |
num_entities | Range in which number of entities are returned. |
recursive | If true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves. Specifying both recursive=true and type=MBENTITYSET is an error, as it would always result in an empty list. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_parent_meshsets | ( | const EntityHandle | meshset, |
std::vector< EntityHandle > & | parents, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get parent mesh sets of a mesh set.
If num_hops is 1, only immediate parents are returned. If num_hops is zero, all ancenstors are returned. Otherwise, num_hops specifies the maximum number of generations to traverse.
meshset | The mesh set whose parents are being queried |
parents | STL vector holding the parents returned by this function |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_parent_meshsets | ( | const EntityHandle | meshset, |
Range & | parents, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get parent mesh sets of a mesh set.
If num_hops is 1, only immediate parents are returned. If num_hops is zero, all ancenstors are returned. Otherwise, num_hops specifies the maximum number of generations to traverse.
meshset | The mesh set whose parents are being queried |
parents | Range holding the parents returned by this function |
num_hops | Number of generations to traverse (0 = all) |
Implemented in moab::Core.
virtual EntityHandle moab::Interface::get_root_set | ( | ) | [pure virtual] |
return the entity set representing the whole mesh
Implemented in moab::Core.
virtual ErrorCode moab::Interface::get_vertex_coordinates | ( | std::vector< double > & | coords | ) | const [pure virtual] |
Get blocked vertex coordinates for all vertices.
Blocked = all x, then all y, etc.
Example:
std::vector<double> coords; get_vertex_coordinates(coords); double xavg = 0; for (int i = 0; i < coords.size()/3; i++) xavg += coords[i];
Implemented in moab::Core.
virtual ErrorCode moab::Interface::handle_from_id | ( | const EntityType | type, |
const EntityID | , | ||
EntityHandle & | handle | ||
) | const [pure virtual] |
Gets an entity handle from the data base, if it exists, according to type and id.
Given an EntiyType and an id, this function gets the existent EntityHandle. If no such EntityHandle exits, it returns MB_ENTITY_NOT_FOUND and sets handle to zero.
type | The type of the EntityHandle to retrieve from the database. |
id | The id of the EntityHandle to retrieve from the database. |
handle | An EntityHandle of type type and id. |
Example:
EntityType handle; ErrorCode error_code = handle_from_id(MeshTri, 204, handle ); if( error_code == MB_ENTITY_NOT_FOUND ) ...
Implemented in moab::Core.
virtual ErrorCode moab::Interface::high_order_node | ( | const EntityHandle | parent_handle, |
const EntityHandle * | subfacet_conn, | ||
const EntityType | subfacet_type, | ||
EntityHandle & | high_order_node | ||
) | const [pure virtual] |
Find the higher-order node on a subfacet of an entity.
Given an entity and the connectivity and type of one of its subfacets, find the high order node on that subfacet, if any. The number of vertices in subfacet_conn is derived from subfacet_type and the canonical numbering for that type.
parent_handle | The element whose subfacet is being queried |
subfacet_conn | The connectivity of the subfacet being queried |
subfacet_type | The type of subfacet being queried |
high_order_node | If the subfacet has a high-order node defined on parent_handle, the handle for that node. |
Implemented in moab::Core.
virtual EntityID moab::Interface::id_from_handle | ( | const EntityHandle | handle | ) | const [pure virtual] |
Returns the id from an EntityHandle.
handle | The EntityHandle you want to find the id of. |
Example:
int id = id_from_handle(handle);
Implemented in moab::Core.
virtual float moab::Interface::impl_version | ( | std::string * | version_string = NULL | ) | [pure virtual] |
Returns the major.minor version number of the implementation.
version_string | If non-NULL, will be filled in with a string, possibly containing implementation-specific information |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::intersect_meshset | ( | EntityHandle | meshset1, |
const EntityHandle | meshset2 | ||
) | [pure virtual] |
Intersect meshsets.
Intersect meshset1 with meshset2, placing the results in meshset1.
meshset1 | Mesh set being intersected, also used to pass back result |
meshset2 | Mesh set being intersected with meshset1 |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::list_entities | ( | const Range & | entities | ) | const [pure virtual] |
List entities to standard output.
Lists all data pertaining to entities (i.e. vertex coordinates if vertices, connectivity if elements, set membership if set). Useful for debugging, but output can become quite long for large databases.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::list_entities | ( | const EntityHandle * | entities, |
const int | num_entities | ||
) | const [pure virtual] |
List entities, or number of entities in database, to standard output.
Lists data pertaining to entities to standard output. If entities is NULL and num_entities is zero, lists only the number of entities of each type in the database. If entities is NULL and num_entities is non-zero, lists all information for all entities in the database.
entities | 1d vector of entities to list |
num_entities | Number of entities in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::list_entity | ( | const EntityHandle | entity | ) | const [pure virtual] |
List a single entity; no header printed.
Lists a single entity, including its connectivity and its adjacencies. No header is printed, because calling function might print information between header and information printed by this function.
entity | The entity to be listed. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::load_file | ( | const char * | file_name, |
const EntityHandle * | file_set = 0 , |
||
const char * | options = 0 , |
||
const char * | set_tag_name = 0 , |
||
const int * | set_tag_values = 0 , |
||
int | num_set_tag_values = 0 |
||
) | [pure virtual] |
Load or import a file.
Load a MOAB-native file or import data from some other supported file format.
file_name | The location of the file to read. |
file_set | If non-null, this argument must be a pointer to a valid entity set handle. All entities read from the file will be added to this set. File metadata will be added to tags on the set. |
options | A list of string options, separated by semicolons (;). See README.IO for more information. Options are typically format-specific options or parallel options. If an option value is unrecognized but the file read otherwise succeeded, MB_UNHANDLED_OPTION will be returned. |
set_tag_name | The name of a tag used to designate the subset of the file to read. The name must correspond to data in the file that will be instantiated in MOAB as a tag. |
set_tag_values | If the name specified in 'set_tag_name' corresponds to a tag with a single integer value, the values in this tag can be used to further limit the subset of data written from the file to only those entities or sets that have a value for the tag that is one of the values in this array. |
num_set_tag_values | The length of set_tag_values. |
file_set is passed by pointer rather than by value (where a zero handle value would indicate no set) so as to intentionally break compatibility with the previous version of this function because the behavior with respect to the file set was changed. The file_set is now an input-only argument. The previous version of this function unconditionally created a set and passed it back to the caller via a non-const reference argument.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::load_mesh | ( | const char * | file_name, |
const int * | active_block_id_list = NULL , |
||
const int | num_blocks = 0 |
||
) | [pure virtual] |
Loads a mesh file into the database.
Loads the file 'file_name'; types of mesh which can be loaded depend on modules available at MB compile time. If active_block_id_list is NULL, all material sets (blocks in the ExodusII jargon) are loaded. Individual material sets can be loaded by specifying their ids in 'active_block_id_list'. All nodes are loaded on first call for a given file. Subsequent calls for a file load any material sets not loaded in previous calls.
file_name | Name of file to load into database. |
active_block_id_list | Material set/block ids to load. If NULL, ALL blocks of file_name are loaded. |
num_blocks | Number of blocks in active_block_id_list |
Example:
std::vector<int> active_block_id_list; int active_block_id_list[] = {1, 4, 10}; load_mesh( "temp.gen", active_block_id_list, 3 ); //load blocks 1, 4, 10
Implemented in moab::Core.
virtual ErrorCode moab::Interface::merge_entities | ( | EntityHandle | entity_to_keep, |
EntityHandle | entity_to_remove, | ||
bool | auto_merge, | ||
bool | delete_removed_entity | ||
) | [pure virtual] |
Merge two entities into a single entity.
Merge two entities into a single entities, with entity_to_keep receiving adjacencies that were on entity_to_remove.
entity_to_keep | Entity to be kept after merge |
entity_to_remove | Entity to be merged into entity_to_keep |
auto_merge | If false, entity_to_keep and entity_to_remove must share the same lower-dimensional entities; if true, MB tries to merge those entities automatically |
delete_removed_entity | If true, entity_to_remove is deleted after merge is complete |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::num_child_meshsets | ( | const EntityHandle | meshset, |
int * | number, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get the number of child mesh sets of a mesh set.
Identical to get_child_meshsets, only number is returned instead of actual children.
meshset | The mesh set whose children are being queried |
number | Number of children |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::num_contained_meshsets | ( | const EntityHandle | meshset, |
int * | number, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get the number of mesh sets contained in a mesh set.
Return the number of sets that would be returned by get_contained_meshsets
meshset | The initial set to begin the query from. |
number | (Output) The result count. |
num_hops | Search depth (0 => unbounded). |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::num_parent_meshsets | ( | const EntityHandle | meshset, |
int * | number, | ||
const int | num_hops = 1 |
||
) | const [pure virtual] |
Get the number of parent mesh sets of a mesh set.
Identical to get_parent_meshsets, only number is returned instead of actual parents.
meshset | The mesh set whose parents are being queried |
number | Number of parents |
Implemented in moab::Core.
ErrorCode moab::Interface::query_interface | ( | IFace *& | ptr | ) | [inline] |
Get a pointer to an internal MOAB interface
Definition at line 117 of file Interface.hpp.
{ void* tmp_ptr; ErrorCode result = query_interface_type(typeid(IFace), tmp_ptr); ptr = reinterpret_cast<IFace*>(tmp_ptr); return result; }
virtual ErrorCode moab::Interface::query_interface_type | ( | const std::type_info & | iface_type, |
void *& | iface | ||
) | [pure virtual] |
Get a pointer to an internal MOAB interface
Implemented in moab::Core.
ErrorCode moab::Interface::release_interface | ( | IFace * | interface | ) | [inline] |
constructor
Definition at line 128 of file Interface.hpp.
{ return release_interface_type( typeid(IFace), interface ); }
virtual ErrorCode moab::Interface::release_interface_type | ( | const std::type_info & | iface_type, |
void * | iface | ||
) | [pure virtual] |
Release reference to MB interface.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::remove_adjacencies | ( | const EntityHandle | from_handle, |
const EntityHandle * | to_handles, | ||
const int | num_handles | ||
) | [pure virtual] |
Removes adjacencies between handles.
Adjacencies in both directions are removed.
from_handle | Entity from which adjacencies are being removed. |
to_handles | Entities to which adjacencies are being removed. |
num_handles | Number of handles in to_handles |
virtual ErrorCode moab::Interface::remove_child_meshset | ( | EntityHandle | parent_meshset, |
const EntityHandle | child_meshset | ||
) | [pure virtual] |
Remove a child mesh set from a mesh set.
Removes child_meshset from the children of parent_meshset. This function does not remove a corresponding parent link from child_meshset.
parent_meshset | The parent mesh set whose child is being removed |
child_meshset | The child being removed from parent_meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::remove_entities | ( | EntityHandle | meshset, |
const Range & | entities | ||
) | [pure virtual] |
Remove from a meshset entities in specified range.
Remove from a meshset entities in specified range. If meshset has MESHSET_TRACK_OWNER option set, adjacencies in entities in entities are updated.
meshset | Mesh set being removed from |
entities | Range of entities being removed from meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::remove_entities | ( | EntityHandle | meshset, |
const EntityHandle * | entities, | ||
const int | num_entities | ||
) | [pure virtual] |
Remove from a meshset entities in specified vector.
Remove from a meshset entities in specified vector. If meshset has MESHSET_TRACK_OWNER option set, adjacencies in entities in entities are updated.
meshset | Mesh set being removed from |
entities | 1d vector of entities being removed from meshset |
num_entities | Number of entities in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::remove_parent_child | ( | EntityHandle | parent, |
EntityHandle | child | ||
) | [pure virtual] |
Remove parent and child links between mesh sets.
Removes parent/child links between child_meshset and parent_meshset.
parent | The parent mesh set being removed from child |
child | The child mesh set being removed from parent |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::remove_parent_meshset | ( | EntityHandle | child_meshset, |
const EntityHandle | parent_meshset | ||
) | [pure virtual] |
Remove a parent mesh set from a mesh set.
Removes parent_meshset from the parents of child_meshset. This function does not remove a corresponding child link from parent_meshset.
child_meshset | The child mesh whose parent is being removed |
parent_meshset | The parent being removed from meshset |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::replace_entities | ( | EntityHandle | meshset, |
const EntityHandle * | old_entities, | ||
const EntityHandle * | new_entities, | ||
int | num_entities | ||
) | [pure virtual] |
Replace entities in a set with other entities.
Replace entities in a set with other entities
meshset | Mesh set being modified |
old_entities | Entities to replace |
new_entities | New entities to add |
num_entities | Number of entities in input arrays |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::set_connectivity | ( | const EntityHandle | entity_handle, |
EntityHandle * | connect, | ||
const int | num_connect | ||
) | [pure virtual] |
Sets the connectivity for an EntityHandle. For non-element handles, return an error.
Connectivity is stored exactly as it is ordered in vector connectivity.
entity_handle | EntityHandle to set connectivity of. |
connect | Vector containing new connectivity of entity_handle. |
num_connect | Number of vertices in connect |
Example:
EntityHandle conn[] = {node1, node2, node3}; set_connectivity( tri_element, conn, 3 );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::set_coords | ( | const EntityHandle * | entity_handles, |
const int | num_entities, | ||
const double * | coords | ||
) | [pure virtual] |
Sets the xyz coordinates for a vector of vertices.
An error is returned if any entities in the vector are not vertices.
entity_handles | EntityHandle's to set coordinates of. (Must be of type MeshVertex) |
num_entities | Number of entities in entity_handles |
coords | Array containing new xyz coordinates. |
Example:
double coords[3] = {0.234, -2.52, 12.023}; set_coords( entity_handle, 1, coords );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::set_coords | ( | Range | entity_handles, |
const double * | coords | ||
) | [pure virtual] |
Sets the xyz coordinates for a vector of vertices.
An error is returned if any entities in the vector are not vertices.
entity_handles | EntityHandle's to set coordinates of. (Must be of type MeshVertex) |
num_entities | Number of entities in entity_handles |
coords | Array containing new xyz coordinates. |
Example:
double coords[3] = {0.234, -2.52, 12.023}; set_coords( entity_handle, 1, coords );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::set_dimension | ( | const int | dim | ) | [pure virtual] |
Set overall geometric dimension.
Returns error if setting to 3 dimensions, mesh has been created, and there are only 2 dimensions on that mesh
Implemented in moab::Core.
virtual ErrorCode moab::Interface::set_meshset_options | ( | const EntityHandle | ms_handle, |
const unsigned int | options | ||
) | [pure virtual] |
Set the options of a mesh set.
Set the options of a mesh set.
ms_handle | Handle for meshset whose options are being changed |
options | Bit mask of options to be used |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::side_element | ( | const EntityHandle | source_entity, |
const int | dim, | ||
const int | side_number, | ||
EntityHandle & | target_entity | ||
) | const [pure virtual] |
Return the handle of the side element of a given dimension and index.
Given a parent entity and a target dimension and side number, return the handle of the entity corresponding to that side. If an entity has not been created to represent that side, one is not created by this function, and zero is returned in target_entity.
source_entity | The entity whose side is being queried. |
dim | The topological dimension of the side being queried. |
side_number | The canonical index of the side being queried. |
target_entity | The handle of the entity representing this side, if any. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::side_number | ( | const EntityHandle | parent, |
const EntityHandle | child, | ||
int & | side_number, | ||
int & | sense, | ||
int & | offset | ||
) | const [pure virtual] |
Returns the side number, in canonical ordering, of child with respect to parent
Given a parent and child entity, returns the canonical ordering information side number, sense, and offset of child with respect to parent. This function returns MB_FAILURE if child is not related to parent. This function does *not* create adjacencies between parent and child.
parent | Parent entity to be compared |
child | Child entity to be compared |
side_number | Side number in canonical ordering of child with respect to parent |
sense | Sense of child with respect to parent, assuming ordering of child as given by get_connectivity called on child; sense is 1, -1 for forward/reverse sense, resp. |
offset | Offset between first vertex of child and first vertex of side side_number on parent |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::subtract_meshset | ( | EntityHandle | meshset1, |
const EntityHandle | meshset2 | ||
) | [pure virtual] |
Subtract meshsets.
Subtract meshset2 from meshset1, placing the results in meshset1.
meshset1 | Mesh set being subtracted from, also used to pass back result |
meshset2 | Mesh set being subtracted from meshset1 |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_clear_data | ( | Tag | tag_handle, |
const Range & | entity_handles, | ||
const void * | value, | ||
int | value_size = 0 |
||
) | [pure virtual] |
Set tag data given value.
For a tag, set the values for a list of passed entity handles to the same, specified value.
tag_handle | The tag |
entity_handles | The entity handles for which to set tag values. |
tag_data | A pointer to the tag value. |
tag_sizes | For variable-length tags, the length of the tag value. This argument will be ignored for fixed-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_clear_data | ( | Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_entity_handles, | ||
const void * | value, | ||
int | value_size = 0 |
||
) | [pure virtual] |
Set tag data given value.
For a tag, set the values for a list of passed entity handles to the same, specified value.
tag_handle | The tag |
entity_handles | The entity handles for which to set tag values. |
tag_data | A pointer to the tag value. |
tag_sizes | For variable-length tags, the length of the tag value. This argument will be ignored for fixed-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_delete | ( | Tag | tag_handle | ) | [pure virtual] |
Remove a tag from the database and delete all of its associated data.
Deletes a tag and all associated data.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_delete_data | ( | Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_handles | ||
) | [pure virtual] |
Delete the data of a vector of entity handles and sparse tag.
Delete the data of a tag on a vector of entity handles. Only sparse tag data are deleted with this function; dense tags are deleted by deleting the tag itself using tag_delete.
tag_handle | Handle of the (sparse) tag being deleted from entity |
entity_handles | 1d vector of entity handles from which the tag is being deleted |
num_handles | Number of entity handles in 1d vector |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_delete_data | ( | Tag | tag_handle, |
const Range & | entity_range | ||
) | [pure virtual] |
Delete the data of a range of entity handles and sparse tag.
Delete the data of a tag on a range of entity handles. Only sparse tag data are deleted with this function; dense tags are deleted by deleting the tag itself using tag_delete.
tag_handle | Handle of the (sparse) tag being deleted from entity |
entity_range | Range of entities from which the tag is being deleted |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_by_ptr | ( | const Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_entities, | ||
const void ** | tag_data, | ||
int * | tag_sizes = 0 |
||
) | const [pure virtual] |
Get pointers to tag data.
For a tag, get the values for a list of passed entity handles.
tag_handle | The tag |
entity_handles | An array of entity handles for which to retreive tag values. |
num_entities | The length of the 'entity_handles' array. |
tag_data | An array of 'const void*'. Array must be at least 'num_entitities' long. Array is populated (output) with pointers to the internal storage for the tag value corresponding to each entity handle. |
tag_sizes | The length of each tag value. Optional for fixed-length tags. Required for variable-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_by_ptr | ( | const Tag | tag_handle, |
const Range & | entity_handles, | ||
const void ** | tag_data, | ||
int * | tag_sizes = 0 |
||
) | const [pure virtual] |
Get pointers to tag data.
For a tag, get the values for a list of passed entity handles.
tag_handle | The tag |
entity_handles | The entity handles for which to retreive tag values. |
tag_data | An array of 'const void*'. Array is populated (output) with pointers to the internal storage for the tag value corresponding to each entity handle. |
tag_sizes | The length of each tag value. Optional for fixed-length tags. Required for variable-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_bytes | ( | const Tag | tag, |
int & | bytes_per_tag | ||
) | const [pure virtual] |
Get the size of the specified tag in bytes.
Get the size of the specified tag, in bytes (MB_TAG_SPARSE, MB_TAG_DENSE, MB_TAG_MESH)
tag | Handle of the desired tag. |
bytes_per_tag | Size of the specified tag |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_data | ( | const Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_entities, | ||
void * | tag_data | ||
) | const [pure virtual] |
Get the value of the indicated tag on the specified entities in the specified vector.
Get the value of the indicated tag on the specified entities; tag_data must contain enough space (i.e. tag_size*num_entities bytes) to hold all tag data. MOAB does not check whether this space is available before writing to it.
tag_handle | Tag whose values are being queried. |
entity_handles | 1d vector of entity handles whose tag values are being queried |
num_entities | Number of entities in 1d vector of entity handles |
tag_data | Pointer to memory into which tag data will be written |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_data | ( | const Tag | tag_handle, |
const Range & | entity_handles, | ||
void * | tag_data | ||
) | const [pure virtual] |
Get the value of the indicated tag on the specified entities in the specified range.
Identical to previous function, except entities are specified using a range instead of a 1d vector.
tag_handle | Tag whose values are being queried. |
entity_handles | Range of entity handles whose tag values are being queried |
tag_data | Pointer to memory into which tag data will be written |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_data_type | ( | const Tag | tag, |
DataType & | type | ||
) | const [pure virtual] |
Get data type of tag.
Get the type of the tag data. The tag is data is assumed to be a vector of this type. If the tag data vetcor contains more than one value, then the tag size must be a multiple of the size of this type.
tag | The tag |
type | The type of the specified tag (output). |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_default_value | ( | const Tag | tag, |
void * | def_val | ||
) | const [pure virtual] |
Get the default value of the specified tag.
Get the default value of the specified tag
tag | Handle of the desired tag. |
def_value | Pointer to memory where default value of the specified tag is written |
def_val
is NULL.tag_handle
is invalid. Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_default_value | ( | Tag | tag, |
const void *& | def_val, | ||
int & | size | ||
) | const [pure virtual] |
Get a tag handle, possibly creating the tag.
Get a handle used to associate application-defined values with MOAB entities. If the tag does not already exist then flags
should contain exactly one of MB_TAG_SPARSE
, MB_TAG_DENSE
, MB_TAG_MESH
unless type
is MB_TYPE_BIT, which implies MB_TAG_BIT
storage.
name | The tag name |
size | Tag size as number of values of of data type per entity (or number of bytes if MB_TAG_BYTES is passed in flags). If MB_TAG_VARLEN is specified, this value is taken to be the size of the default value if one is specified and is otherwise ignored. |
type | The type of the data (used for IO) |
tag_handle | Output: the resulting tag handle. |
flags | Bitwise OR of values from TagType |
default_value | Optional default value for tag. |
created | Optional returned boolean indicating that the was created. |
MB_TAG_ALREADY_ALLOCATED
if tag exists and MB_TAG_EXCL
is specifiedMB_TAG_NOT_FOUND
if tag does not exist and MB_TAG_CREAT
is not specifiedMB_INVALID_SIZE
if tag value size is not a multiple of the size of the data type (and mb_TAG_COUNT
not specified).MB_TYPE_OUT_OF_RANGE
invalid or inconsistent parameterMB_VARIABLE_DATA_LENGTH
if MB_TAG_VARLEN
and default_value
is non-null and default_value_size
is not specified.A call to tag_get_handle that includes a default value will fail if the tag already exists with a different default value. A call without a default value will succeed if the tag already exists, regardless of whether or not the existing tag has a default value.
Examples:
Retreive a handle for an existing tag, returning a non-success error code if the tag does not exist or does not store 1 integer value per entity:
Tag git_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag );
Get the tag handle, or create it as a dense tag if it does not already exist:
Tag gid_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag, MB_TAG_CREAT|MB_TAG_BIT );
Create the tag or *fail* if it already exists:
Tag gid_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag, MB_TAG_EXCL|MB_TAG_DENSE );
Get an existing variable length tag, failing if it does not exist or is not variable-length or does not contain double values.
Tag vtag; mb.tag_get_handle( tag_name, 0, MB_TYPE_DOUBLE, vtag );
Get the same variable-length tag, but create it with a default value if it doesn't exist. Note that if the tag already exists this call will return a non-success error code if the existing tag has a different default value.
Tag vtag; const double default_val = M_PI; const int def_val_len = 1; mb.tag_get_handle( tag_name, def_val_len, MB_TYPE_DOUBLE, vtag, MB_TAG_SPARSE|MB_TAG_VARLEN|MB_TAG_CREAT, &default_val );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_handle | ( | const char * | name, |
int | size, | ||
DataType | type, | ||
Tag & | tag_handle, | ||
unsigned | flags = 0 , |
||
const void * | default_value = 0 , |
||
bool * | created = 0 |
||
) | [pure virtual] |
Get a tag handle, possibly creating the tag.
Get a handle used to associate application-defined values with MOAB entities. If the tag does not already exist then flags
should contain exactly one of MB_TAG_SPARSE
, MB_TAG_DENSE
, MB_TAG_MESH
unless type
is MB_TYPE_BIT, which implies MB_TAG_BIT
storage.
name | The tag name |
size | Tag size as number of values of of data type per entity (or number of bytes if MB_TAG_BYTES is passed in flags). If MB_TAG_VARLEN is specified, this value is taken to be the size of the default value if one is specified and is otherwise ignored. |
type | The type of the data (used for IO) |
tag_handle | Output: the resulting tag handle. |
flags | Bitwise OR of values from TagType |
default_value | Optional default value for tag. |
created | Optional returned boolean indicating that the was created. |
MB_TAG_ALREADY_ALLOCATED
if tag exists and MB_TAG_EXCL
is specifiedMB_TAG_NOT_FOUND
if tag does not exist and MB_TAG_CREAT
is not specifiedMB_INVALID_SIZE
if tag value size is not a multiple of the size of the data type (and mb_TAG_COUNT
not specified).MB_TYPE_OUT_OF_RANGE
invalid or inconsistent parameterMB_VARIABLE_DATA_LENGTH
if MB_TAG_VARLEN
and default_value
is non-null and default_value_size
is not specified.A call to tag_get_handle that includes a default value will fail if the tag already exists with a different default value. A call without a default value will succeed if the tag already exists, regardless of whether or not the existing tag has a default value.
Examples:
Retreive a handle for an existing tag, returning a non-success error code if the tag does not exist or does not store 1 integer value per entity:
Tag git_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag );
Get the tag handle, or create it as a dense tag if it does not already exist:
Tag gid_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag, MB_TAG_CREAT|MB_TAG_BIT );
Create the tag or *fail* if it already exists:
Tag gid_tag; mb.tag_get_handle( GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, gid_tag, MB_TAG_EXCL|MB_TAG_DENSE );
Get an existing variable length tag, failing if it does not exist or is not variable-length or does not contain double values.
Tag vtag; mb.tag_get_handle( tag_name, 0, MB_TYPE_DOUBLE, vtag );
Get the same variable-length tag, but create it with a default value if it doesn't exist. Note that if the tag already exists this call will return a non-success error code if the existing tag has a different default value.
Tag vtag; const double default_val = M_PI; const int def_val_len = 1; mb.tag_get_handle( tag_name, def_val_len, MB_TYPE_DOUBLE, vtag, MB_TAG_SPARSE|MB_TAG_VARLEN|MB_TAG_CREAT, &default_val );
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_handle | ( | const char * | name, |
int | size, | ||
DataType | type, | ||
Tag & | tag_handle, | ||
unsigned | flags = 0 , |
||
const void * | default_value = 0 |
||
) | const [pure virtual] |
same as non-const version, except that MB_TAG_CREAT flag is ignored.
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_handle | ( | const char * | tag_name, |
Tag & | tag_handle | ||
) | const [pure virtual] |
Gets the tag handle corresponding to a name.
If a tag of that name does not exist, returns MB_TAG_NOT_FOUND
tag_name | Name of the desired tag. |
tag_handle | Tag handle corresponding to tag_name |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_length | ( | const Tag | tag, |
int & | length | ||
) | const [pure virtual] |
Get the array length of a tag.
Get the size of the specified tag, in as the number of values of the basic type (e.g. number of integer values for each tag value if the data type is MB_TYPE_INTEGER). Gives number of bits for bit tags and is the same as tag_get_bytes
for MB_TYPE_OPAQUE tags.
tag | Handle of the desired tag. |
length | Size of the specified tag |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_name | ( | const Tag | tag_handle, |
std::string & | tag_name | ||
) | const [pure virtual] |
Get the name of a tag corresponding to a handle.
tag_handle | Tag you want the name of. |
tag_name | Name string for tag_handle. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_tags | ( | std::vector< Tag > & | tag_handles | ) | const [pure virtual] |
Get handles for all tags defined in the mesh instance.
Get handles for all tags defined on the mesh instance.
tag_handles | STL vector of all tags |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_tags_on_entity | ( | const EntityHandle | entity, |
std::vector< Tag > & | tag_handles | ||
) | const [pure virtual] |
Get handles for all tags defined on this entity.
Get handles for all tags defined on this entity; if zero, get all tags defined on mesh instance
entity | Entity for which you want tags |
tag_handles | STL vector of all tags defined on entity |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_get_type | ( | const Tag | tag, |
TagType & | tag_type | ||
) | const [pure virtual] |
Get the type of the specified tag.
Get the type of the specified tag
tag | Handle of the desired tag. |
tag_type | Type of the specified tag |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_iterate | ( | Tag | tag_handle, |
Range::const_iterator | begin, | ||
Range::const_iterator | end, | ||
int & | count, | ||
void *& | data_ptr, | ||
bool | allocate = true |
||
) | [pure virtual] |
Access tag data via direct pointer into contiguous blocks.
Iteratively obtain direct access to contiguous blocks of tag storage. This function cannot be used with bit tags because of the compressed bit storage. This function cannot be used with variable length tags because it does not provide a mechanism to determine the length of the value for each entity. This function may be used with sparse tags, but if it is used, it will return data for a single entity at a time.
tag_handle | The handle of the tag for which to access data |
iter | The first entity for which to return data. |
end | One past the last entity for which data is desired. |
count | The number of entities for which data was returned |
data_ptr | Output: pointer to tag storage. |
allocate | If true, space for this tag will be allocated, if not it wont |
If this function is called for entities for which no tag value has been set, but for which a default value exists, it will force the allocation of explicit storage for each such entity even though MOAB would normally not explicitly store tag values for such entities.
:
Range ents; // range to iterate over Tag tag; // tag for which to access data int bytes; ErrorCode err = mb.tag_get_size( tag, bytes ); if (err) { ... } ... Range::iterator iter = ents.begin(); while (iter != ents.end()) { int count; // get contiguous block of tag dat void* ptr; err = mb.tag_iterate( tag, iter, ents.end(), count, ptr ); if (err) { ... } // do something with tag data process_Data( ptr, count ); // advance to next block of data iter += count; } *
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_set_by_ptr | ( | Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_entities, | ||
void const *const * | tag_data, | ||
const int * | tag_sizes = 0 |
||
) | [pure virtual] |
Set tag data given an array of pointers to tag values.
For a tag, set the values for a list of passed entity handles.
tag_handle | The tag |
entity_handles | An array of entity handles for which to set tag values. |
num_entities | The length of the 'entity_handles' array. |
tag_data | An array of 'const void*'. Array must be at least 'num_entitities' long. Array is expected to contain pointers to tag values for the corresponding EntityHandle in 'entity_handles'. |
tag_sizes | The length of each tag value. Optional for fixed-length tags. Required for variable-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_set_by_ptr | ( | Tag | tag_handle, |
const Range & | entity_handles, | ||
void const *const * | tag_data, | ||
const int * | tag_sizes = 0 |
||
) | [pure virtual] |
Set tag data given an array of pointers to tag values.
For a tag, set the values for a list of passed entity handles.
tag_handle | The tag |
entity_handles | The entity handles for which to set tag values. |
tag_data | An array of 'const void*'. Array is expected to contain pointers to tag values for the corresponding EntityHandle in 'entity_handles'. |
tag_sizes | The length of each tag value. Optional for fixed-length tags. Required for variable-length tags. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_set_data | ( | Tag | tag_handle, |
const EntityHandle * | entity_handles, | ||
int | num_entities, | ||
const void * | tag_data | ||
) | [pure virtual] |
Set the value of the indicated tag on the specified entities in the specified vector.
Set the value of the indicated tag on the specified entities; tag_data contains the values, one value per entity in entity_handles.
tag_handle | Tag whose values are being set |
entity_handles | 1d vector of entity handles whose tag values are being set |
num_entities | Number of entities in 1d vector of entity handles |
tag_data | Pointer to memory holding tag values to be set, one entry per entity handle |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::tag_set_data | ( | Tag | tag_handle, |
const Range & | entity_handles, | ||
const void * | tag_data | ||
) | [pure virtual] |
Set the value of the indicated tag on the specified entities in the specified range.
Identical to previous function, except entities are specified using a range instead of a 1d vector.
tag_handle | Tag whose values are being set |
entity_handles | Range of entity handles whose tag values are being set |
tag_data | Pointer to memory holding tag values to be set, one entry per entity handle |
Implemented in moab::Core.
virtual EntityType moab::Interface::type_from_handle | ( | const EntityHandle | handle | ) | const [pure virtual] |
Returns the entity type of an EntityHandle.
Returns the EntityType (ie, MeshVertex, MeshQuad, MeshHex ) of handle.
handle | The EntityHandle you want to find the entity type of. |
Example:
EntityType type = type_from_handle( handle); if( type == MeshHex ) ...
Implemented in moab::Core.
virtual ErrorCode moab::Interface::unite_meshset | ( | EntityHandle | meshset1, |
const EntityHandle | meshset2 | ||
) | [pure virtual] |
Unite meshsets.
Unite meshset1 with meshset2, placing the results in meshset1.
meshset1 | Mesh set being united, also used to pass back result |
meshset2 | Mesh set being united with meshset1 |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::write_file | ( | const char * | file_name, |
const char * | file_type = 0 , |
||
const char * | options = 0 , |
||
const EntityHandle * | output_sets = 0 , |
||
int | num_output_sets = 0 , |
||
const Tag * | tag_list = 0 , |
||
int | num_tags = 0 |
||
) | [pure virtual] |
Write or export a file.
Write a MOAB-native file or export data to some other supported file format.
file_name | The location of the file to write. |
file_type | The type of the file. If this value is NULL, then file type will be determined using the file name suffix. |
options | A semicolon-separated list of options. See README.IO for more information. Typical options include the file type, parallel options, and options specific to certain file formats. |
output_sets | A list of entity sets to write to the file. If no sets are sepcified, the default behavior is to write all data that is supported by the target file type. |
num_output_sets | The length of the output_sets array. |
tag_list | A list of tags for which to write the tag data. The write may fail if a tag list is specified but the target file type is not capable of representing the data. If no tags are specified, the default is to write whatever data the target file format supports. |
num_tags | The length of tag_list. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::write_file | ( | const char * | file_name, |
const char * | file_type, | ||
const char * | options, | ||
const Range & | output_sets, | ||
const Tag * | tag_list = 0 , |
||
int | num_tags = 0 |
||
) | [pure virtual] |
Write or export a file.
Write a MOAB-native file or export data to some other supported file format.
file_name | The location of the file to write. |
file_type | The type of the file. If this value is NULL, then file type will be determined using the file name suffix. |
options | A semicolon-separated list of options. See README.IO for more information. Typical options include the file type, parallel options, and options specific to certain file formats. |
output_sets | A list of entity sets to write to the file. If no sets are sepcified, the default behavior is to write all data that is supported by the target file type. |
tag_list | A list of tags for which to write the tag data. The write may fail if a tag list is specified but the target file type is not capable of representing the data. If no tags are specified, the default is to write whatever data the target file format supports. |
num_tags | The length of tag_list. |
Implemented in moab::Core.
virtual ErrorCode moab::Interface::write_mesh | ( | const char * | file_name, |
const EntityHandle * | output_list = NULL , |
||
const int | num_sets = 0 |
||
) | [pure virtual] |
Writes mesh to a file.
Write mesh to file 'file_name'; if output_list is non-NULL, only material sets contained in that list will be written.
file_name | Name of file to write. |
output_list | 1d array of material set handles to write; if NULL, all sets are written |
num_sets | Number of sets in output_list array |
Example:
EntityHandle output_list[] = {meshset1, meshset2, meshset3}; write_mesh( "output_file.gen", output_list, 3 );
Implemented in moab::Core.