39 #ifndef MESQUITE_INTERFACE_HPP
40 #define MESQUITE_INTERFACE_HPP
43 #include "TopologyInfo.hpp"
45 #ifdef MSQ_USE_OLD_C_HEADERS
103 size_t& element_count,
104 size_t& vertex_use_count,
127 size_t* elem_conn_offsets,
size_t offset_len,
128 size_t* elem_conn_indices,
size_t index_len,
176 unsigned char byte,
MsqError &err) = 0;
178 unsigned char *byte_array,
179 size_t array_size,
MsqError &err) = 0;
185 unsigned char *byte,
MsqError &err) = 0;
187 unsigned char *byte_array,
188 size_t array_size,
MsqError &err) = 0;
200 size_t sizeof_elem_array,
254 size_t &sizeof_vert_handles,
256 size_t &sizeof_csr_data,
268 size_t num_elements,
MsqError &err) = 0;
290 const void* default_value,
319 msq_std::string& name_out,
321 unsigned& length_out,
337 const void* tag_data,
353 const void* tag_data,
395 size_t num_handles,
MsqError &err) = 0;
532 return TopologyInfo::corners( topo );
Iterates through a set of entities. An EntityIterator is typically obtained via Mesh::vertex_iterator...
EntityIterator VertexIterator
virtual void tag_delete(TagHandle handle, MsqError &err)=0
Remove a tag and all corresponding data.
Used to hold the error state and return it to the application.
virtual void get_all_sizes(size_t &vertex_count, size_t &element_count, size_t &vertex_use_count, MsqError &err)=0
get sizes for calling get_all_mesh
TagType
The type of a tag.
virtual ElementIterator * element_iterator(MsqError &err)=0
Returns a pointer to an iterator that iterates over the set of all top-level elements in this mesh...
virtual void closest_point(Mesh::EntityHandle handle, const Vector3D &position, Vector3D &closest, Vector3D &normal, MsqError &err) const =0
evaluate closest point and normal
virtual TagHandle tag_get(const msq_std::string &name, MsqError &err)=0
Get handle for existing tag, by name.
virtual void tag_set_element_data(TagHandle handle, size_t num_elems, const ElementHandle *elem_array, const void *tag_data, MsqError &err)=0
Set tag values on elements.
DomainHint
A hint on the characteristics of the domain that Mesquite may use to determine what, if any, scheme to use to cache characteristics of the geometric domain.
EntityHandle VertexHandle
virtual void elements_get_attached_vertices(ElementHandle *elem_handles, size_t num_elems, VertexHandle *vert_handles, size_t &sizeof_vert_handles, size_t *csr_data, size_t &sizeof_csr_data, size_t *csr_offsets, MsqError &err)=0
Returns the vertices that are part of the topological definition of each element in the "elem_handles...
EntityHandle ElementHandle
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual Mesh::EntityHandle operator*() const =0
*iterator.
void * EntityHandle
Opaque EntityHandle type and tag type.
virtual VertexIterator * vertex_iterator(MsqError &err)=0
Returns a pointer to an iterator that iterates over the set of all vertices in this mesh...
virtual void tag_get_vertex_data(TagHandle handle, size_t num_elems, const VertexHandle *node_array, void *tag_data, MsqError &err)=0
Get tag values on vertices.
virtual void get_all_mesh(VertexHandle *vert_array, size_t vert_len, ElementHandle *elem_array, size_t elem_len, size_t *elem_conn_offsets, size_t offset_len, size_t *elem_conn_indices, size_t index_len, MsqError &err)=0
Get entities and connectivity.
double length(Vector3D *const v, int n)
virtual void vertices_set_byte(VertexHandle *vert_array, unsigned char *byte_array, size_t array_size, MsqError &err)=0
virtual EntityTopology element_get_topology(ElementHandle entity_handle, MsqError &err)=0
Returns the topology of the given entity.
virtual TagHandle tag_create(const msq_std::string &tag_name, TagType type, unsigned length, const void *default_value, MsqError &err)=0
Create a tag.
virtual void vertex_get_byte(VertexHandle vertex, unsigned char *byte, MsqError &err)=0
Retrieve the byte value for the specified vertex or vertices.
virtual void elements_get_topologies(ElementHandle *element_handle_array, EntityTopology *element_topologies, size_t num_elements, MsqError &err)=0
Returns the topologies of the given entities.
virtual ~EntityIterator()
virtual void release()=0
Instead of deleting a Mesh when you think you are done, call release().
virtual void tag_set_vertex_data(TagHandle handle, size_t num_elems, const VertexHandle *node_array, const void *tag_data, MsqError &err)=0
Set tag values on vertices.
virtual void vertex_set_byte(VertexHandle vertex, unsigned char byte, MsqError &err)=0
Each vertex has a byte-sized flag that can be used to store flags.
virtual void snap_to(Mesh::EntityHandle entity_handle, Vector3D &coordinate) const =0
Modifies "coordinate" so that it lies on the domain to which "entity_handle" is constrained.
size_t vertices_in_topology(EntityTopology)
virtual size_t vertex_get_attached_element_count(VertexHandle vertex, MsqError &err)=0
Gets the number of elements attached to this vertex.
virtual DomainHint hint() const =0
Give a hint about the nature of the domain for better performance.
virtual void release_entity_handles(EntityHandle *handle_array, size_t num_handles, MsqError &err)=0
Tells the mesh that the client is finished with a given entity handle.
virtual void vertex_get_attached_elements(VertexHandle vertex, ElementHandle *elem_array, size_t sizeof_elem_array, MsqError &err)=0
Gets the elements attached to this vertex.
A Mesquite::Mesh is a collection of mesh elements which are composed of mesh vertices. Intermediate objects are not accessible through this interface (where intermediate objects include things like the faces of a hex, or an element's edges).
virtual size_t element_get_attached_vertex_count(ElementHandle elem, MsqError &err)=0
Gets the number of vertices in this element.
virtual void vertices_are_on_boundary(VertexHandle vert_array[], bool on_bnd[], size_t num_vtx, MsqError &err)=0
Returns true or false, indicating whether the vertex is on the boundary.
virtual void vertices_get_byte(VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)=0
virtual void vertex_set_coordinates(VertexHandle vertex, const Vector3D &coordinates, MsqError &err)=0
virtual ~Mesh()
Don't allow a Mesh to be deleted directly.
virtual void tag_properties(TagHandle handle, msq_std::string &name_out, TagType &type_out, unsigned &length_out, MsqError &err)=0
Get properites of tag.
void * TagHandle
Type used to refer to a tag defintion.
virtual bool is_at_end() const =0
Returns false until the iterator has been advanced PAST the last entity.
virtual void vertices_get_coordinates(const VertexHandle vert_array[], MsqVertex *coordinates, size_t num_vtx, MsqError &err)=0
Get/set location of a vertex.
virtual size_t get_vertex_use_count(ElementHandle *handle_array, size_t num_handles, MsqError &err)=0
virtual void normal_at(Mesh::EntityHandle entity_handle, Vector3D &coordinate) const =0
Returns the normal of the domain to which "entity_handle" is constrained.
EntityIterator ElementIterator
virtual void restart()=0
Moves the iterator back to the first entity in the list.
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
virtual void operator++()=0
++iterator
virtual bool vertex_is_fixed(VertexHandle vertex, MsqError &err)=0
Returns true or false, indicating whether the vertex is allowed to be repositioned.
virtual void tag_get_element_data(TagHandle handle, size_t num_elems, const ElementHandle *elem_array, void *tag_data, MsqError &err)=0
Get tag values on elements.
virtual int get_geometric_dimension(MsqError &err)=0
Returns whether this mesh lies in a 2D or 3D coordinate system.