#include <openMesh.h>
Inheritance diagram for openMesh:

Public Methods | |
| openMesh (RFConnOrder iOrd=connect_icemcfd_order) | |
| By default, precision is floating and degree is 3. | |
| openMesh (const openMesh &i) | |
| Copy an existing openMesh. More... | |
| openMesh& | operator= (const openMesh &i) |
| Equality operator also validates node storage. More... | |
| ~openMesh () | |
| Free coordinate memory. | |
| void* | getCoords () |
| Return pointer to all node coordinates. More... | |
| const void* | getCoords () const |
| Return pointer to all node coordinates. More... | |
| RFPrecType | getPrec () const |
| Return precision of the coordinates. More... | |
| size_t | getCur_allocation () const |
| Return the current memory allocation. More... | |
| int | getStralloc () const |
| Return the structured memory allocation flag. | |
| int | setCoords (void *ncoords, size_t alloc_coords) |
| Set the coordinates memory to be from externally given pointer. More... | |
| int | clear_strmesh () |
| Clear structured mesh. | |
| int | clear_unstrmesh () |
| Clear the unstructured mesh. | |
| int | clear_counters () |
| Clear just the counters in the unstructured mesh. | |
| void* | prec_offset (void *start, size_t offset) |
| Return the pointer to memory of current precision at given offset. More... | |
| const void* | prec_offset (const void *start, size_t offset) const |
| Return the pointer to memory of current precision at given offset. More... | |
| void* | coord_offset (size_t offset) |
| Offset into coord array using prec_offset(). More... | |
| const void* | coord_offset (size_t offset) const |
| Offset into coord array using prec_offset(). More... | |
| void* | start_str_nodes () |
| Return the beginning of the structured coordinate memory. More... | |
| const void* | start_str_nodes () const |
| Return the beginning of the structured coordinate memory. More... | |
| void* | new_coords () const |
| Return block of memory of size given by cur_allocation. More... | |
| void* | clone_coords () const |
| Clone coordinate memory. More... | |
| int | coord_alloc (size_t nverts, int do_update_dom=1) |
| Allocate the coorindate memory for nverts. More... | |
| int | allocate_coord_size (size_t nreq) |
| Allocate enough coordinate memory of at least size nreq. More... | |
| int | free_coords () |
| Free coordinate memory. | |
| size_t | request_size (size_t nreq) const |
| Compute the next block allocation. More... | |
| void | copy_strverts_to (void *start_str) |
| Copy just the structured vertex coordinates to memory given by start_str. More... | |
| int | updateStructNodes () |
| Update the pointers to memory in all structured domains. More... | |
| int | get_location (const openMesh_vertex *vi, float loc[3]) const |
| Get the location of vertex specified by vi. More... | |
| int | get_location (const openMesh_vertex *vi, double loc[3]) const |
| Same as get_location()(const openMesh_vertex *, float[3]) except location returned in double precision array. | |
| int | set_location (openMesh_vertex *vi, const float loc[3]) |
| Set the location of vertex specified by vi. More... | |
| int | set_location (openMesh_vertex *vi, const double loc[3]) |
| Same as set_location()(const openMesh_vertex *, float[3]) except location returned in double precision array. | |
| RF_SIGNED_LONG | getVtx_offset () const |
| Internal method used by get_vtxconn_offset(). | |
| int | setVtx_offset (RF_SIGNED_LONG v) |
| Internal method used by set_vtxconn_offset(). More... | |
| rf_mesh_interface* | newImpl () const |
| int | create_unstrmesh () |
| Create new unstructured mesh. More... | |
| int | create_strmesh () |
| Create new structured mesh. More... | |
| int | delete_unstrmesh () |
| Delete unstructured mesh. More... | |
| int | delete_strmesh () |
| Create new structured mesh. More... | |
| int | clear_mesh () |
| Empty mesh. More... | |
| RFPrecType | get_prec () const |
| If representation can handle both double and float precisions for vertex coordinates, then this method can be implemented. More... | |
| void | set_default_prec () |
| Fix the default precision if none set to this point. | |
| int | set_prec (RFPrecType p) |
| Only get one bite at this apple. More... | |
| int | allocate_vertex_memory (size_t nverts, RFPrecType p) |
| Can only be called before loading all vertices (unstruct first followed by struct). More... | |
| int | allocate_strvertex_memory (size_t dom=0) |
| Allocate memory for coordinates of specified structured domain. More... | |
| int | set_vtxconn_offset (RF_SIGNED_LONG vtx_offset) |
| Set current vertex offset. More... | |
| int | allocate_element_memory (const size_t *nele) |
| Hint of how many elements of each type to allocate. More... | |
| RFConnOrder | GetInternalOrder () const |
| Return the internal connection order of the mesh representation. More... | |
| int | SetInternalOrder (RFConnOrder order) |
| Set order of storage (if can change the order). More... | |
| const void* | vertex_coords (RFPrecType *pr) const |
| Return the pointer to the start of the vertex memory if mesh representation holds coordinate memory in contiguious block. More... | |
| const int* | connectivity (int type, RFConnOrder *order, int *vtxs) const |
| Return the element connectivity memory if mesh representation can hold element connectivity in a contiguious block of memory. More... | |
| RF_SIGNED_LONG | get_vtxconn_offset () const |
| Return current vertex offset. More... | |
| size_t | add_domain (const int *dmax) |
| Add structured domain with node range (1, 1, 1) to dmax. More... | |
| size_t | add_domain (str_domain_handle& dom) |
| Add structured domain specified by given domain interface. More... | |
| vertex_handle | new_vertex () |
| Create a new vertex of specified type. More... | |
| element_handle | new_element (int type) |
| Create a new element of specified type. More... | |
| int | ConnectIntOrder (element_handle& ele, const int *connect, size_t nid, int famid) |
| Specify newly created element ele (new_element()) has connectivity specified by connect. More... | |
| int | reconnect_vid (element_handle& el, const int *newv) |
| Change the connectivity of element ele to the connectivity specified in the array newv. More... | |
| int | reconnect_vid (element_handle& el, const RF_SIGNED_LONG *newv) |
| int | reconnect (element_handle& el, vertex_handle *nvv) |
| Change the connectivity of element ele to the connectivity specified in the array of vertex handles newv. More... | |
| int | replace_vid (element_handle& el, RF_SIGNED_LONG oldv, RF_SIGNED_LONG newv) |
| Change node number oldv to newv in element. More... | |
| int | replace (element_handle& el, vertex_handle& oldv, vertex_handle& nvewv) |
| Change node oldv to newv in element. More... | |
| int | merge_unstr_nodes (const RFMergeVtxList& list) |
| Merge the nodes specified by the list. More... | |
| int | compress_mesh () |
| Mesh representations that can return vertex coordinates and/or element connectivity in a block, should try and implement this method. More... | |
| int | must_remove_degeneracy () const |
| Each mesh representation must return whether or not it can tolerate degenerate elements. More... | |
| int | stored_vertex_dimension () const |
| Does the mesh representation store the vertex dimension? By default the answer is no (0). More... | |
| int | delete_vertex (RF_SIGNED_LONG vid) |
| Delete specified vertex id. More... | |
| int | delete_vertex (vertex_handle& vtx) |
| Delete the specified vertex. More... | |
| int | delete_element (element_handle& el) |
| Delete the element specified. More... | |
| int | disconnect (element_handle& el) |
| Disconnect element ele from the mesh. More... | |
| vertex_handle | first_vertex (void **cur) |
| Enumerate vertices but use iterator style. More... | |
| vertex_handle | next_vertex (void **cur) |
| Enumerate elements but use iterator style. More... | |
| element_handle | first_el (void **cur, int eltype=0) |
| Enumerate elements but use iterator style. More... | |
| element_handle | next_el (void **cur, int eltype=0) |
| Enumerate elements but use iterator style. More... | |
| element_handle | init_element_iterator (const vertex_handle& v, RF_SIGNED_LONG *next_idx) const |
| Initialize the element loop when looping over all elements on a node. More... | |
| element_handle | next_element (const vertex_handle& v, RF_SIGNED_LONG *next_idx, const element_handle& cur_el) const |
| Go to next element in link list of elements on a node. More... | |
| size_t | cellcount_on_node (unsigned int *offset) const |
| const FacesOnNode* | getFaceConn () const |
| Representations that can build the FaceConn structure should return a pointer to it. More... | |
| size_t | nfaces_on_vertex (int vidx) const |
| size_t | neles_on_face (int vidx, size_t fidx) const |
| size_t | ndim_on_face (int vidx, size_t fidx, int dim) const |
| size_t | face_on_vertex (int vidx, size_t fi, int *fv) const |
| element_handle | ele_on_face (const vertex_handle& v, size_t fidx, size_t elidx) const |
| Return the element specified by the vertex, index of the face and the index of the element. More... | |
| void | face_on_vertex (int vi, size_t fi, size_t *nvf, int *fv) const |
| element_handle | ele_on_face (int vidx, size_t fidx, size_t elidx) const |
| int | incident_elements_face (int nvf, const int *face, int ordf, int max_return, element_handle *elements, int *face_numbers) const |
| Return all elements on face specified by the face vertices. More... | |
| int | incident_elements_face (int nvf, const int *fverts, int ordf, element_handle_list& elements, int *face_numbers) const |
| Return can be artitrary number of elements on a face. More... | |
| int | incident_elements (int nvf, vertex_handle *fverts, int ordf, int max_return, element_handle *elements, int *face_numbers) const |
| All representations should implement this method. More... | |
| int | incident_elements (int nvf, vertex_handle *fverts, int ordf, element_handle_list& elements, int *face_numbers) const |
| Default method invokes array method. More... | |
| int | release_connectivity_info () |
| Release the connectivity information (if it can be safely released). More... | |
| size_t | n_unstr_vertices () const |
| Return number of unstructured vertices created. More... | |
| size_t | n_unstr_elements (int type) const |
| Return number of unstructured elements of specified type created. More... | |
| size_t | n_unstr_vertices_actual () const |
| Return current number of vertices in mesh. More... | |
| size_t | n_unstr_elements_actual (int type) const |
| Return current number of unstructured elements of specified type in mesh. More... | |
| size_t | count_unstr_elements (int type, size_t *s) const |
| Return current number of unstructured elements of specified type in mesh. More... | |
| RF_SIGNED_LONG | getNumber (const vertex_handle& v) const |
| Return invariant id number of specified vertex. More... | |
| vertex_handle | lookup_vertex (RF_SIGNED_LONG vid) const |
| Return vertex given invariant id number. More... | |
| int | get_location (const vertex_handle& v, float loc[3]) const |
| Return the location of specified vertex. More... | |
| int | get_location (const vertex_handle& v, double loc[3]) const |
| int | get_dimension (const vertex_handle& iVtx) const |
| Get the dimension of the vertex. More... | |
| int | get_dimension (RF_SIGNED_LONG iVtx) const |
| int | get_ptwin (const vertex_handle& iVtx) const |
| Get the periodic twin of the specified vertex. More... | |
| int | get_ptwin (RF_SIGNED_LONG iVtx) const |
| int | set_location (vertex_handle& v, const float loc[3]) |
| Set the location of specified vertex. More... | |
| int | set_location (vertex_handle& v, const double loc[3]) |
| Set the location of specified vertex. More... | |
| int | set_dimension (vertex_handle& iVtx, int iDim) |
| Set the dimension of the vertex. More... | |
| int | set_dimension (RF_SIGNED_LONG iVtx, int iDim) |
| int | set_ptwin (const vertex_handle& iVtx, RF_SIGNED_LONG iPtwin) |
| Get the periodic twin of the specified vertex. More... | |
| int | set_ptwin (RF_SIGNED_LONG iVtx, RF_SIGNED_LONG iPtwin) |
| int | has_element_on (RF_SIGNED_LONG vid) const |
| Does specified vertex have an element on it? More... | |
| int | has_element_on (const vertex_handle& vh) const |
| RF_SIGNED_LONG | getNumber (const element_handle& e) const |
| Return the invariant element number. More... | |
| element_handle | lookup_element (RF_SIGNED_LONG iEid) const |
| Return element given invariant id number. More... | |
| int | GetConnectivityIntOrder (const element_handle& ele, int *vtxs) const |
| Return the connectivity of the element as vertex indices in the internal order of the mesh representation. More... | |
| int | GetConnectivityIntOrder_l (const element_handle& ele, RF_SIGNED_LONG *vtxs) const |
| int | max_pid () const |
| Return the maximum family id in the mesh. More... | |
| int | family_pid (const char *name) const |
| Return the family id for given name. More... | |
| const char* | family_name (int pid) const |
| Return the family name for given family id. More... | |
| int | delete_family (const char *name) |
| Delete family. More... | |
| int | set_family (int pid, const char *name) |
| Set the family name for given family id. More... | |
| size_t | family_index (const char *name) const |
| Utility family method to find the index of name in the family list. More... | |
| size_t | family_index (int pid) const |
| Find pid in pid list. More... | |
| int | get_centroid (const element_handle& ele, double loc[3]) const |
| Compute the centroid of the element. More... | |
| int | get_centroid (const element_handle& ele, float loc[3]) const |
| int | get_bbox (const element_handle& ele, double bbox_min[3], double bbox_max[3]) const |
| Compute the bounding box of the element. More... | |
| int | get_bbox (const element_handle& ele, float bbox_min[3], float bbox_max[3]) const |
| size_t | n_domains () const |
| Return number of structured domains. More... | |
| str_domain_handle | get_domain (size_t i) |
| Return the ith structured domain. More... | |
| str_domain_handle | get_domain (size_t i) const |
| int | ijk_of_domain (size_t i, int ijk[3]) const |
| Return the ijk range (1-n) for ith structured domain. More... | |
| int | set_basic_topo () |
| Set the basic topology of a set of structured domains. More... | |
| int | setDegree (int deg) |
| Set the degree of the structured mesh (2 or 3D). More... | |
| int | getDegree () const |
| Return the degree of the structured mesh (2 or 3D). More... | |
Protected Attributes | |
| RFIntList | pids |
| list of pids in parallel with list of family names. | |
| RFFamilyList | families |
| List of family names in parallel with list of ids. | |
| void* | coords |
| openMesh owns all node storage for both structure and unstructured meshes. | |
| size_t | cur_allocation |
| Current memory allocation of coords. | |
| RFPrecType | prec |
| Precision of coords. | |
| int | stralloc |
| Structured nodes have been allocated. More... | |
| int | degree |
| Degree of mesh. More... | |
| openMesh_str_domain_list | str_mesh |
| All structured domains. More... | |
| openMesh_unstr_mesh | unstr_mesh |
| unstructured mesh. More... | |
Implementation details of interface functions can be found in the documentation for openMesh_unstr.
|
|
Copy an existing openMesh.
|
|
|
Equality operator also validates node storage. The mesh will be an exact duplicate of passed mesh.
|
|
|
Return pointer to all node coordinates.
|
|
|
Return pointer to all node coordinates. User cannot modify.
|
|
|
Return precision of the coordinates.
|
|
|
Return the current memory allocation.
|
|
|
Set the coordinates memory to be from externally given pointer. Instance takes over ownership.
|
|
|
Return the pointer to memory of current precision at given offset.
|
|
|
Return the pointer to memory of current precision at given offset. User cannot modify.
|
|
|
Offset into coord array using prec_offset().
|
|
|
Offset into coord array using prec_offset(). User cannot modify.
|
|
|
Return the beginning of the structured coordinate memory.
|
|
|
Return the beginning of the structured coordinate memory. User cannot modify.
|
|
|
Return block of memory of size given by cur_allocation.
|
|
|
Clone coordinate memory. Leave current memory alone.
|
|
|
Allocate the coorindate memory for nverts.
|
|
|
Allocate enough coordinate memory of at least size nreq.
|
|
|
Compute the next block allocation. Used by allocate_coord_size(). Memory allocated in blocks. Rounds request up to next size given by coor_alloc_block.
|
|
|
Copy just the structured vertex coordinates to memory given by start_str.
|
|
|
Update the pointers to memory in all structured domains. Used whenever a new unstructured vertex has been added. If have a mixed structured and unstructured mesh, this can lead to a slight degradation in performance. To avoid this, define unstructued nodes first before allocating storage space for the structured node coordinates.
|
|
|
Get the location of vertex specified by vi.
|
|
|
Set the location of vertex specified by vi.
|
|
|
Internal method used by set_vtxconn_offset().
|
|
|
Reimplemented from rf_mesh_interface. |
|
|
Create new unstructured mesh. Seperated from new structured mesh for efficiency sake. Must be implemented. Implementations that do not concern themselves with unstructured meshes can make this method a NOP.
Reimplemented from rf_mesh_interface. |
|
|
Create new structured mesh. Seperated from new unstructured mesh for efficiency sake. Must be implemented. Implementations that do not concern themselves with structured meshes can make this method a NOP.
Reimplemented from rf_mesh_interface. |
|
|
Delete unstructured mesh. Seperated from deletion of structured mesh for efficiency sake. Must be implemented. Implementations that do not concern themselves with unstructured meshes can make this method a NOP.
Reimplemented from rf_mesh_interface. |
|
|
Create new structured mesh. Seperated from new unstructured mesh for efficiency sake. Must be implemented. Implementations that do not concern themselves with structured meshes can make this method a NOP.
Reimplemented from rf_mesh_interface. |
|
|
Empty mesh. Does not necessarily mean that mesh is deleted though that is one way a representation can signal 'clear' mesh. The representation must be able to be loaded after clear complete. Base class implementation invokes delete str and unstr mesh methods to carry out work. It recreates empty structured domains for each structured domain it removes thus making it possible to instantly reload. Implementation can override if this implementation of clear does not make sense.
Reimplemented from rf_mesh_interface. Reimplemented in openMeshVertexInfo. |
|
|
If representation can handle both double and float precisions for vertex coordinates, then this method can be implemented. Return specified precision.
Reimplemented from rf_mesh_interface. |
|
|
Only get one bite at this apple. Only set the precision once. Once set, it will not be reset. If the precision passed as RFPrecNone, then default to RFPrecFloat -- ie minimize memory used.
Reimplemented from rf_mesh_interface. |
|
|
Can only be called before loading all vertices (unstruct first followed by struct). After that, only new_vertex (for unstructured vertices) and allocate_strvertex_memory (for structured domains) can be used.
Reimplemented from rf_mesh_interface. |
|
|
Allocate memory for coordinates of specified structured domain. This method is a hint and hence does not need to be implemented. However, it is strongly suggested that implementations that do handle structured meshes do so.
Reimplemented from rf_mesh_interface. |
|
|
Set current vertex offset. External applications expect node numbering to begin with this number if they are sharing memory with openMesh. Usually 0 or 1. Implementations that can share memory with external applications should reimplement this method. Default method is a NOP.
Reimplemented from rf_mesh_interface. |
|
|
Hint of how many elements of each type to allocate.
Reimplemented from rf_mesh_interface. |
|
|
Return the internal connection order of the mesh representation.
Reimplemented from rf_mesh_interface. |
|
|
Set order of storage (if can change the order). The default implementation returns 'not implemented' (2). Only implementations that can change the connectivity order (like openMesh) need implement this method.
Reimplemented from rf_mesh_interface. |
|
|
Return the pointer to the start of the vertex memory if mesh representation holds coordinate memory in contiguious block. This can improve speed by removing the need to copy coordinate values and reduces memory usage. If mesh representation does not have node coordinates in a block, it should return 0.
Reimplemented from rf_mesh_interface. |
|
|
Return the element connectivity memory if mesh representation can hold element connectivity in a contiguious block of memory. This can improve speed by removing the need to copy element connectivities and reduce memory usage substantially. If mesh representation does not hold the element connectivity in either a block or in an approved order, it should return 0.
Reimplemented from rf_mesh_interface. |
|
|
Return current vertex offset. External applications expect node numbering to begin with this number if they are sharing memory with openMesh. Usually 0 or 1. Implementations that can share memory with external applications should reimplement this method. Default method simply returns 0.
Reimplemented from rf_mesh_interface. |
|
|
Add structured domain with node range (1, 1, 1) to dmax. Implementations must specify.
Reimplemented from rf_mesh_interface. |
|
|
Add structured domain specified by given domain interface.
Reimplemented from rf_mesh_interface. |
|
|
Create a new vertex of specified type. Typically implementors only need to return the pointer to the interface. The constructor sharable_pointer::sharable_pointer() then automatically creates a new handle.
Reimplemented from rf_mesh_interface. |
|
|
Create a new element of specified type. Typically implementors only need to return the pointer to the interface. The constructor sharable_pointer::sharable_pointer() then automatically creates a new handle.
Reimplemented from rf_mesh_interface. |
|
|
Specify newly created element ele (new_element()) has connectivity specified by connect. Implementations must specify. Connectivity is in the user specified order. If no order is specified, the order is NASTRAN Mesh order. A mesh representation need not store more than one order. The requirement of this interface is that the currently set user order be mapped to the internal representation order.
Reimplemented from rf_mesh_interface. |
|
|
Change the connectivity of element ele to the connectivity specified in the array newv. By default, the connectivity numbers are converted to vertex handles by use of lookup_vertex(), and the method reconnect(element_handle&, vertex_handle*) is invoked. Implementations may specify if they can more efficiently carry out the reconnection. see openMesh_unstr_mesh::reconnect()
Reimplemented from rf_mesh_interface. |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Reimplemented from rf_mesh_interface. |
|
|
Change the connectivity of element ele to the connectivity specified in the array of vertex handles newv. Implementations must specify. However, if implementation does not allow reconnect, can be a NOP. Note, certain operations might not succeed with certain applications if user chooses to implement as NOP.
Reimplemented from rf_mesh_interface. |
|
|
Change node number oldv to newv in element. By default, the connectivity numbers are converted to vertex handles by use of lookup_vertex(), and the method replace()(element_handle&, vertex_handle&, vertex_handle&) is invoked. Implementations may specify if they can more efficiently carry out the reconnection. see openMesh_unstr_mesh::replace()
Reimplemented from rf_mesh_interface. |
|
|
Change node oldv to newv in element. Implementations must specify. However, if implementation does not allow replace, can be a NOP. Note, certain operations might not succeed with certain applications if user chooses to implement as NOP.
Reimplemented from rf_mesh_interface. |
|
|
Merge the nodes specified by the list.
Reimplemented from rf_mesh_interface. |
|
|
Mesh representations that can return vertex coordinates and/or element connectivity in a block, should try and implement this method. After edits have added and removed elements/nodes, the block of memory must be updated to reflect this. If mesh representation cannot compress the mesh, then it must return 0 in response to vertex_coords() or GetConnectivityInOrder methods after edits.
Reimplemented from rf_mesh_interface. |
|
|
Each mesh representation must return whether or not it can tolerate degenerate elements. If the representation does not override this method, the return is 1 -- ie, by default mesh representations cannot handle degenerate elements.
Reimplemented from rf_mesh_interface. |
|
|
Does the mesh representation store the vertex dimension? By default the answer is no (0).
Reimplemented from rf_mesh_interface. |
|
|
Delete specified vertex id.
Reimplemented from rf_mesh_interface. |
|
|
Delete the specified vertex.
Reimplemented from rf_mesh_interface. |
|
|
Delete the element specified. Default implementation simply disconnects the element from the mesh. Implementations can override.
Reimplemented from rf_mesh_interface. |
|
|
Disconnect element ele from the mesh. Implementations must specify.
Reimplemented from rf_mesh_interface. |
|
|
Enumerate vertices but use iterator style. This method returns the element interface to the first element.
Reimplemented from rf_mesh_interface. |
|
|
Enumerate elements but use iterator style. This method returns the next element in list of specified type.
Reimplemented from rf_mesh_interface. |
|
|
Enumerate elements but use iterator style. This method returns the element interface to the first element.
Reimplemented from rf_mesh_interface. |
|
|
Enumerate elements but use iterator style. This method returns the next element in list of specified type.
Reimplemented from rf_mesh_interface. |
|
|
Initialize the element loop when looping over all elements on a node. Implementations must specify.
Reimplemented from rf_mesh_interface. |
|
|
Go to next element in link list of elements on a node. Implementations must specify.
Reimplemented from rf_mesh_interface. |