Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MesqPane Class Reference

A class enabling Mesquite calls on Rocmop panes. More...

#include <MesqPane.h>

Inheritance diagram for MesqPane:
Collaboration diagram for MesqPane:

Classes

struct  tag
 A tag structure required by Mesquite. More...
 
struct  tagStruct
 

Public Types

typedef void * EntityHandle
 Opaque EntityHandle type and tag type. More...
 
typedef void * TagHandle
 
typedef EntityHandle VertexHandle
 
typedef EntityHandle ElementHandle
 
typedef void * EntityHandle
 Opaque EntityHandle type and tag type. More...
 
typedef void * TagHandle
 
typedef EntityHandle VertexHandle
 
typedef EntityHandle ElementHandle
 
- Public Types inherited from Mesh
enum  TagType {
  BYTE, BOOL, INT, DOUBLE,
  HANDLE
}
 The type of a tag. More...
 
typedef void * EntityHandle
 Opaque EntityHandle type and tag type. More...
 
typedef EntityHandle VertexHandle
 
typedef EntityHandle ElementHandle
 

Public Member Functions

void invert (int conn_type)
 Invert Elements. More...
 
 MesqPane (COM::Pane *p, bool with_ghost=true)
 Construct from a pane. More...
 
void set_verb (int verb)
 Set the MesqPane verbose level (int, >= 0) More...
 
virtual ~MesqPane ()
 Destructor. More...
 
void init ()
 Initialize the MesqPane. More...
 
virtual int get_geometric_dimension (MsqError &err)
 Returns whether this mesh lies in a 2D or 3D coordinate system. More...
 
virtual void get_all_elements (msq_std::vector< ElementHandle > &elements, MsqError &err)
 Get all elements in mesh. More...
 
virtual void get_all_vertices (msq_std::vector< VertexHandle > &vertices, MsqError &err)
 Get all vertices in mesh. More...
 
virtual void get_all_sizes (size_t &vertex_count, size_t &element_count, size_t &vertex_use_count, MsqError &err)
 get sizes for calling get_all_mesh More...
 
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)
 Get entities and connectivity. More...
 
virtual VertexIteratorvertex_iterator (MsqError &err)
 Returns a pointer to an iterator that iterates over the set of all vertices in this mesh. More...
 
virtual ElementIteratorelement_iterator (MsqError &err)
 Returns a pointer to an iterator that iterates over the set of all top-level elements in this mesh. More...
 
virtual void vertices_get_fixed_flag (const VertexHandle vert_array[], bool fixed_flag_array[], size_t num_vtx, MsqError &err)
 Returns true or false, indicating whether the vertex is allowed to be repositioned. More...
 
virtual bool vertex_is_fixed (VertexHandle vertex, MsqError &err)
 Returns true or false, indicating whether the vertex is allowed to be repositioned. More...
 
virtual void vertices_are_on_boundary (VertexHandle vert_array[], bool on_bnd[], size_t num_vtx, MsqError &err)
 Returns true or false, indicating whether the vertex is on the boundary. More...
 
virtual void vertices_get_coordinates (const VertexHandle vert_array[], MsqVertex *coordinates, size_t num_vtx, MsqError &err)
 Get/set location of a vertex. More...
 
virtual void vertex_set_coordinates (VertexHandle vertex, const Vector3D &coordinates, MsqError &err)
 
virtual void vertex_set_byte (VertexHandle vertex, unsigned char byte, MsqError &err)
 Each vertex has a byte-sized flag that can be used to store flags. More...
 
virtual void vertices_set_byte (VertexHandle *vert_array, unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual void vertices_set_byte (const VertexHandle *vert_array, const unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual void vertex_get_byte (VertexHandle vertex, unsigned char *byte, MsqError &err)
 Retrieve the byte value for the specified vertex or vertices. More...
 
virtual void vertices_get_byte (VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual void vertices_get_byte (const VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual size_t vertex_get_attached_element_count (VertexHandle vertex, MsqError &err)
 Gets the number of elements attached to this vertex. More...
 
virtual void vertex_get_attached_elements (VertexHandle vertex, ElementHandle *elem_array, size_t sizeof_elem_array, MsqError &err)
 Gets the elements attached to this vertex. More...
 
virtual void vertices_get_attached_elements (const VertexHandle *vertex_array, size_t num_vertex, msq_std::vector< ElementHandle > &elements, msq_std::vector< size_t > &offsets, MsqError &err)
 get elements adjacent to vertices More...
 
virtual size_t element_get_attached_vertex_count (ElementHandle elem, MsqError &err)
 Gets the number of vertices in this element. More...
 
virtual size_t get_vertex_use_count (ElementHandle *handle_array, size_t num_handles, MsqError &err)
 
virtual void elements_get_attached_vertices (const ElementHandle *elem_handles, size_t num_elems, msq_std::vector< VertexHandle > &vert_handles, msq_std::vector< size_t > &offsets, MsqError &err)
 Get element connectivity. More...
 
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)
 Returns the vertices that are part of the topological definition of each element in the "elem_handles" array. More...
 
virtual EntityTopology element_get_topology (ElementHandle entity_handle, MsqError &err)
 Returns the topology of the given entity. More...
 
virtual void elements_get_topologies (ElementHandle *element_handle_array, EntityTopology *element_topologies, size_t num_elements, MsqError &err)
 Returns the topologies of the given entities. More...
 
virtual void elements_get_topologies (const ElementHandle *element_handle_array, EntityTopology *element_topologies, size_t num_elements, MsqError &err)
 Returns the topologies of the given entities. More...
 
virtual TagHandle tag_create (const msq_std::string &tag_name, TagType type, unsigned length, const void *default_value, MsqError &err)
 Create a tag. More...
 
virtual void tag_delete (TagHandle handle, MsqError &err)
 Remove a tag and all corresponding data. More...
 
virtual TagHandle tag_get (const msq_std::string &name, MsqError &err)
 Get handle for existing tag, by name. More...
 
virtual void tag_properties (TagHandle handle, msq_std::string &name_out, TagType &type_out, unsigned &length_out, MsqError &err)
 Get properites of tag. More...
 
virtual void tag_set_element_data (TagHandle handle, size_t num_elems, const ElementHandle *elem_array, const void *tag_data, MsqError &err)
 Set tag values on elements. More...
 
virtual void tag_set_vertex_data (TagHandle handle, size_t num_elems, const VertexHandle *node_array, const void *tag_data, MsqError &err)
 Set tag values on vertices. More...
 
virtual void tag_get_element_data (TagHandle handle, size_t num_elems, const ElementHandle *elem_array, void *tag_data, MsqError &err)
 Get tag values on elements. More...
 
virtual void tag_get_vertex_data (TagHandle handle, size_t num_elems, const VertexHandle *node_array, void *tag_data, MsqError &err)
 Get tag values on vertices. More...
 
virtual void release_entity_handles (const EntityHandle *handle_array, size_t num_handles, MsqError &err)
 Tells the mesh that the client is finished with a given entity handle. More...
 
virtual void release_entity_handles (EntityHandle *handle_array, size_t num_handles, MsqError &err)
 Tells the mesh that the client is finished with a given entity handle. More...
 
virtual void release ()
 Instead of deleting a Mesh when you think you are done, call release(). More...
 
void invert ()
 Invert Tetrahedrons. More...
 
 MesqPane (COM::Pane *p, bool with_ghost=true)
 Construct from a pane. More...
 
void set_verb (int verb)
 Set the MesqPane verbose level (int, >= 0) More...
 
virtual ~MesqPane ()
 Destructor. More...
 
void init ()
 Initialize the MesqPane. More...
 
virtual int get_geometric_dimension (MsqError &err)
 Returns whether this mesh lies in a 2D or 3D coordinate system. More...
 
virtual void get_all_sizes (size_t &vertex_count, size_t &element_count, size_t &vertex_use_count, MsqError &err)
 get sizes for calling get_all_mesh More...
 
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)
 Get entities and connectivity. More...
 
virtual VertexIteratorvertex_iterator (MsqError &err)
 Returns a pointer to an iterator that iterates over the set of all vertices in this mesh. More...
 
virtual ElementIteratorelement_iterator (MsqError &err)
 Returns a pointer to an iterator that iterates over the set of all top-level elements in this mesh. More...
 
virtual bool vertex_is_fixed (VertexHandle vertex, MsqError &err)
 Returns true or false, indicating whether the vertex is allowed to be repositioned. More...
 
virtual void vertices_are_on_boundary (VertexHandle vert_array[], bool on_bnd[], size_t num_vtx, MsqError &err)
 Returns true or false, indicating whether the vertex is on the boundary. More...
 
virtual void vertices_get_coordinates (const VertexHandle vert_array[], MsqVertex *coordinates, size_t num_vtx, MsqError &err)
 Get/set location of a vertex. More...
 
virtual void vertex_set_coordinates (VertexHandle vertex, const Vector3D &coordinates, MsqError &err)
 
virtual void vertex_set_byte (VertexHandle vertex, unsigned char byte, MsqError &err)
 Each vertex has a byte-sized flag that can be used to store flags. More...
 
virtual void vertices_set_byte (VertexHandle *vert_array, unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual void vertex_get_byte (VertexHandle vertex, unsigned char *byte, MsqError &err)
 Retrieve the byte value for the specified vertex or vertices. More...
 
virtual void vertices_get_byte (VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)
 
virtual size_t vertex_get_attached_element_count (VertexHandle vertex, MsqError &err)
 Gets the number of elements attached to this vertex. More...
 
virtual void vertex_get_attached_elements (VertexHandle vertex, ElementHandle *elem_array, size_t sizeof_elem_array, MsqError &err)
 Gets the elements attached to this vertex. More...
 
virtual size_t element_get_attached_vertex_count (ElementHandle elem, MsqError &err)
 Gets the number of vertices in this element. More...
 
virtual size_t get_vertex_use_count (ElementHandle *handle_array, size_t num_handles, MsqError &err)
 
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)
 Returns the vertices that are part of the topological definition of each element in the "elem_handles" array. More...
 
virtual EntityTopology element_get_topology (ElementHandle entity_handle, MsqError &err)
 Returns the topology of the given entity. More...
 
virtual void elements_get_topologies (ElementHandle *element_handle_array, EntityTopology *element_topologies, size_t num_elements, MsqError &err)
 Returns the topologies of the given entities. More...
 
virtual TagHandle tag_create (const msq_std::string &tag_name, TagType type, unsigned length, const void *default_value, MsqError &err)
 Create a tag. More...
 
virtual void tag_delete (TagHandle handle, MsqError &err)
 Remove a tag and all corresponding data. More...
 
virtual TagHandle tag_get (const msq_std::string &name, MsqError &err)
 Get handle for existing tag, by name. More...
 
virtual void tag_properties (TagHandle handle, msq_std::string &name_out, TagType &type_out, unsigned &length_out, MsqError &err)
 Get properites of tag. More...
 
virtual void tag_set_element_data (TagHandle handle, size_t num_elems, const ElementHandle *elem_array, const void *tag_data, MsqError &err)
 Set tag values on elements. More...
 
virtual void tag_set_vertex_data (TagHandle handle, size_t num_elems, const VertexHandle *node_array, const void *tag_data, MsqError &err)
 Set tag values on vertices. More...
 
virtual void tag_get_element_data (TagHandle handle, size_t num_elems, const ElementHandle *elem_array, void *tag_data, MsqError &err)
 Get tag values on elements. More...
 
virtual void tag_get_vertex_data (TagHandle handle, size_t num_elems, const VertexHandle *node_array, void *tag_data, MsqError &err)
 Get tag values on vertices. More...
 
virtual void release_entity_handles (EntityHandle *handle_array, size_t num_handles, MsqError &err)
 Tells the mesh that the client is finished with a given entity handle. More...
 
virtual void release ()
 Instead of deleting a Mesh when you think you are done, call release(). More...
 
Constructors and Destructors
 MesqPane (COM::Pane *p, bool with_ghost=true)
 Construct from a pane. More...
 
virtual ~MesqPane ()
 Destructor. More...
 
Miscellaneous functions
void invert ()
 Invert Tetrahedrons. More...
 
void init ()
 Initialize the MesqPane. More...
 
void set_verb (int verb)
 Set the MesqPane verbose level (int, >= 0) More...
 
Inherited Operations on Entire Mesh
virtual int get_geometric_dimension (MsqError &err) const
 Returns whether this mesh lies in a 2D or 3D coordinate system. More...
 
virtual size_t get_total_vertex_count (MsqError &err) const
 Returns the number of nodes. More...
 
virtual size_t get_total_element_count (MsqError &err) const
 Returns the number of elements. More...
 
virtual void get_all_vertices (VertexHandle *vert_array, size_t array_size, MsqError &err)
 Fills array with handles to all vertices. More...
 
virtual void get_all_elements (ElementHandle *elem_array, size_t array_size, MsqError &err)
 Fills array with handles to all elements in the mesh. More...
 
virtual VertexIteratorvertex_iterator (MsqError &err)
 Returns a pointer to a vertex iterator over this Pane. More...
 
virtual ElementIteratorelement_iterator (MsqError &err)
 Returns a pointer to an element iterator over this Pane. More...
 
Inherited vertex Properties
virtual bool vertex_is_fixed (VertexHandle vertex, MsqError &err)
 Tells wheter the vertex is allowed to be repositioned. More...
 
virtual void vertices_are_on_boundary (VertexHandle vert_array[], bool on_bnd[], size_t num_vtx, MsqError &err)
 Tells whether the vertex is on the boundary. More...
 
virtual void vertices_get_coordinates (VertexHandle vert_array[], Mesquite::MsqVertex *const &coordinates, const size_t &num_vtx, MsqError &err)
 Get the location of a vertex. More...
 
virtual void vertex_set_coordinates (VertexHandle vertex, const Vector3D &coordinates, MsqError &err)
 Set the Location of a vertex. More...
 
virtual void vertex_set_byte (VertexHandle vertex, unsigned char byte, MsqError &err)
 Set a vertex flag. More...
 
virtual void vertices_set_byte (VertexHandle *vert_array, unsigned char *byte_array, size_t array_size, MsqError &err)
 Set mutliple vertex flags. More...
 
virtual void vertex_get_byte (VertexHandle vertex, unsigned char *byte, MsqError &err)
 Retrieve the byte value for the specified vertex. More...
 
virtual void vertices_get_byte (VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)
 Retrieve the byte value for the specified vertices. More...
 
Inherited Vertex Topology
virtual size_t vertex_get_attached_element_count (VertexHandle vertex, MsqError &err) const
 Gets the number of elements attached to this vertex. More...
 
virtual void vertex_get_attached_elements (VertexHandle vertex, ElementHandle *elem_array, size_t sizeof_elem_array, MsqError &err)
 Gets the elements attached to this vertex. More...
 
Inherited Element Topology
virtual size_t element_get_attached_vertex_count (ElementHandle elem, MsqError &err) const
 Gets the number of vertices in this element. More...
 
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)
 Returns vertices which are part of each element in the "elem_handles" array. More...
 
virtual void elements_get_attached_vertex_indices (ElementHandle element[], size_t num_elems, size_t index_array[], size_t array_size, size_t *offsets, MsqError &err)
 Return each vertex's global index. More...
 
virtual EntityTopology element_get_topology (ElementHandle entity_handle, MsqError &err) const
 Returns the topology of the given entity. More...
 
virtual void elements_get_topologies (ElementHandle *element_handle_array, EntityTopology *element_topologies, size_t num_elements, MsqError &err)
 Returns the topologies of the given entities. More...
 
Inherited Tags
virtual void element_tag_create (const string tag_name, int tag_size, TagHandle &tag_handle, MsqError &err)
 Add a new tag with given name and size to the dense tag map. More...
 
virtual void * tag_get_handle (const string tag_name, MsqError &err)
 Returns the tag handle corresponding to the string. More...
 
virtual void elements_set_tag_data (const size_t num_elements, const TagHandle tag_handle, TagDataPt const tag_data_array, const int &tag_size, MsqError &err)
 Sets the Tag data pointers for an array of entities. More...
 
virtual void elements_get_tag_data (const size_t num_elements, const TagHandle tag_handle, TagDataPt &tag_data_array, int &tag_size, MsqError &err)
 Gets the Tag data for an array of entities. More...
 
Inherited Memory Management
virtual void release_entity_handles (EntityHandle *handle_array, size_t num_handles, MsqError &err)
 Tells the mesh that the client is finished with a given entity handle. More...
 
virtual void release ()
 Release a MesqPane from use. More...
 
- Public Member Functions inherited from Mesh
virtual int get_geometric_dimension (MsqError &err)=0
 Returns whether this mesh lies in a 2D or 3D coordinate system. More...
 
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 More...
 
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. More...
 
virtual void vertices_get_coordinates (const VertexHandle vert_array[], MsqVertex *coordinates, size_t num_vtx, MsqError &err)=0
 Get/set location of a vertex. More...
 
virtual size_t vertex_get_attached_element_count (VertexHandle vertex, MsqError &err)=0
 Gets the number of elements attached to this vertex. More...
 
virtual size_t element_get_attached_vertex_count (ElementHandle elem, MsqError &err)=0
 Gets the number of vertices in this element. More...
 
virtual size_t get_vertex_use_count (ElementHandle *handle_array, size_t num_handles, MsqError &err)=0
 
virtual EntityTopology element_get_topology (ElementHandle entity_handle, MsqError &err)=0
 Returns the topology of the given entity. More...
 
virtual TagHandle tag_create (const msq_std::string &tag_name, TagType type, unsigned length, const void *default_value, MsqError &err)=0
 Create a tag. More...
 
virtual void tag_delete (TagHandle handle, MsqError &err)=0
 Remove a tag and all corresponding data. More...
 
virtual TagHandle tag_get (const msq_std::string &name, MsqError &err)=0
 Get handle for existing tag, by name. More...
 
virtual void tag_properties (TagHandle handle, msq_std::string &name_out, TagType &type_out, unsigned &length_out, MsqError &err)=0
 Get properites of tag. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Protected Attributes

COM::Pane * _pane
 
MAP::Pane_dual_connectivity * _dc
 
std::vector< bool > _is_border
 
std::vector< unsigned char > _vertexBytes
 
int _verb
 
bool _with_ghost
 
std::map< std::string,
MesqPane::tag
denseTags
 
std::map< msq_std::string,
tagStruct
s_to_t
 

Private Member Functions

size_t vertices_in_topology (EntityTopology)
 
size_t vertices_in_topology (EntityTopology)
 
size_t vertices_in_topology (EntityTopology)
 

Additional Inherited Members

- Protected Member Functions inherited from Mesh
virtual ~Mesh ()
 Don't allow a Mesh to be deleted directly. More...
 

Detailed Description

A class enabling Mesquite calls on Rocmop panes.

Type used to refer to a tag defintion.

Mesquite's Mesh base class defines an interface which allows Mesquite to interact with non-native mesh types. MesqPane is an implementation of this class which enables Mesquite to use a Roccom Pane as an input mesh.

Definition at line 95 of file MesqPane.h.

Member Typedef Documentation

Definition at line 108 of file MesqPane_1_1.h.

Definition at line 109 of file MesqPane_95.h.

typedef void* EntityHandle

Opaque EntityHandle type and tag type.

Definition at line 100 of file MesqPane_1_1.h.

typedef void* EntityHandle

Opaque EntityHandle type and tag type.

Definition at line 101 of file MesqPane_95.h.

typedef void* TagHandle

Definition at line 101 of file MesqPane_1_1.h.

typedef void* TagHandle

Definition at line 102 of file MesqPane_95.h.

Definition at line 107 of file MesqPane_1_1.h.

Definition at line 108 of file MesqPane_95.h.

Constructor & Destructor Documentation

MesqPane ( COM::Pane *  p,
bool  with_ghost = true 
)
inline

Construct from a pane.

Build a MesqPane for the given Pane either on all nodes and elements, or just on real nodes and elements.

Parameters
pthe Pane whose mesh we would like to smooth.
with_ghostuse ghost nodes and cells?

Definition at line 113 of file MesqPane.h.

114  : _pane(p), _verb(0), _with_ghost(with_ghost){
115  init();
116  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void init()
Initialize the MesqPane.
Definition: MesqPane.C:68
~MesqPane ( )
virtual

Destructor.

Definition at line 38 of file MesqPane.C.

38  {
39  _pane = NULL;
40  if(_dc)
41  delete _dc;
42  _dc = NULL;
43  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
COM::Pane * _pane
Definition: MesqPane.h:474
MesqPane ( COM::Pane *  p,
bool  with_ghost = true 
)
inline

Construct from a pane.

Build a MesqPane for the given Pane either on all nodes and elements, or just on real nodes and elements.

Parameters
pthe Pane whose mesh we would like to smooth.
with_ghostuse ghost nodes and cells?

Definition at line 127 of file MesqPane_1_1.h.

128  : _pane(p), _verb(0), _with_ghost(with_ghost){
129  init();
130  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void init()
Initialize the MesqPane.
Definition: MesqPane.C:68
virtual ~MesqPane ( )
virtual

Destructor.

MesqPane ( COM::Pane *  p,
bool  with_ghost = true 
)
inline

Construct from a pane.

Build a MesqPane for the given Pane either on all nodes and elements, or just on real nodes and elements.

Parameters
pthe Pane whose mesh we would like to smooth.
with_ghostuse ghost nodes and cells?

Definition at line 127 of file MesqPane_95.h.

128  : _pane(p), _verb(0), _with_ghost(with_ghost){
129  init();
130  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void init()
Initialize the MesqPane.
Definition: MesqPane.C:68
virtual ~MesqPane ( )
virtual

Destructor.

Member Function Documentation

virtual size_t element_get_attached_vertex_count ( ElementHandle  elem,
MsqError &  err 
)
virtual

Gets the number of vertices in this element.

This data can also be found by querying the element's topology and getting the number of vertices per element for that topology type.

size_t element_get_attached_vertex_count ( ElementHandle  elem,
MsqError err 
) const
virtual

Gets the number of vertices in this element.

Definition at line 349 of file MesqPane.C.

350  {
351  if(_verb)
352  cout << "MesqPane::element_get_attached_vertex_count" << endl;
353  int element_id = ((char*)elem - (char*)NULL);
354  const COM::Connectivity *con = _pane->connectivity(element_id);
355  return con->size_of_nodes_pe();
356  }
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479
size_t element_get_attached_vertex_count ( ElementHandle  elem,
MsqError &  err 
)
virtual

Gets the number of vertices in this element.

This data can also be found by querying the element's topology and getting the number of vertices per element for that topology type.

Definition at line 487 of file MesqPane_1_1.C.

488  {
489  if(_verb)
490  cout << "MOP> MesqPane::element_get_attached_vertex_count" << endl;
491  int element_id = ((char*)elem - (char*)NULL);
492  const COM::Connectivity *con = _pane->connectivity(element_id);
493  return con->size_of_nodes_pe();
494  }
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479
virtual EntityTopology element_get_topology ( ElementHandle  entity_handle,
MsqError &  err 
)
virtual

Returns the topology of the given entity.

EntityTopology element_get_topology ( ElementHandle  entity_handle,
MsqError err 
) const
virtual

Returns the topology of the given entity.

Definition at line 454 of file MesqPane.C.

References COM_assertion_msg, Mesquite::HEXAHEDRON, Mesquite::QUADRILATERAL, Mesquite::TETRAHEDRON, and Mesquite::TRIANGLE.

455  {
456  if(_verb)
457  cout << "MesqPane::element_get_topology" << endl;
458  int elem_id = ((char*)entity_handle-(char*)NULL);
459 
460  const COM::Connectivity *con = _pane->connectivity(elem_id);
461  COM_assertion_msg(con!=NULL, "con is NULL");
462  switch(con->element_type()){
463  case COM::Connectivity::TRI3 :
464  return TRIANGLE;
465  break;
466  case COM::Connectivity::QUAD4 :
467  return QUADRILATERAL;
468  break;
469  case COM::Connectivity::TET4 :
470  return TETRAHEDRON;
471  break;
472  case COM::Connectivity::HEX8 :
473  return HEXAHEDRON;
474  break;
475  default:
477  "Element type not supported by Mesquite.");
478  break;
479  }
480  // Control should never reach here...
481  // this 'return' gets rid of compiler warnings
482  return TRIANGLE;
483  }
#define COM_assertion_msg(EX, msg)
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479
EntityTopology element_get_topology ( ElementHandle  entity_handle,
MsqError &  err 
)
virtual

Returns the topology of the given entity.

Definition at line 606 of file MesqPane_1_1.C.

References COM_assertion_msg, Mesquite::HEXAHEDRON, Mesquite::PRISM, Mesquite::PYRAMID, Mesquite::QUADRILATERAL, Mesquite::TETRAHEDRON, and Mesquite::TRIANGLE.

607  {
608  if(_verb)
609  cout << "MOP> MesqPane::element_get_topology" << endl;
610  int elem_id = ((char*)entity_handle-(char*)NULL);
611 
612  const COM::Connectivity *con = _pane->connectivity(elem_id);
613  COM_assertion_msg(con!=NULL, "con is NULL");
614  switch(con->element_type()){
615  case COM::Connectivity::TRI3 :
616  return TRIANGLE;
617  break;
618  case COM::Connectivity::QUAD4 :
619  return QUADRILATERAL;
620  break;
621  case COM::Connectivity::TET4 :
622  return TETRAHEDRON;
623  break;
624  case COM::Connectivity::HEX8 :
625  return HEXAHEDRON;
626  break;
627  case COM::Connectivity::PYRIMID5 :
628  return PYRAMID;
629  break;
630  case COM::Connectivity::PRISM6 :
631  return PRISM;
632  break;
633  default:
635  "Element type not supported by Mesquite.");
636  break;
637  }
638  // Control should never reach here...
639  // this 'return' gets rid of compiler warnings
640  return TRIANGLE;
641  }
#define COM_assertion_msg(EX, msg)
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479
ElementIterator * element_iterator ( MsqError err)
virtual

Returns a pointer to an element iterator over this Pane.

The calling code should delete the returned iterator when it is finished with it. If elements are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

Implements Mesh.

Definition at line 149 of file MesqPane.C.

149  {
150  if(_verb>1)
151  cout << "MesqPane::element_iterator" << endl;
152  return new MyEntityIterator(_with_ghost ? _pane->size_of_elements() :
153  _pane->size_of_real_elements());
154  }
A class for iterating through a Panes vertices or elements.
Definition: MesqPane.h:495
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual ElementIterator* element_iterator ( MsqError &  err)
virtual

Returns a pointer to an iterator that iterates over the set of all top-level elements in this mesh.

The calling code should delete the returned iterator when it is finished with it. If elements are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

ElementIterator * element_iterator ( MsqError &  err)
virtual

Returns a pointer to an iterator that iterates over the set of all top-level elements in this mesh.

The calling code should delete the returned iterator when it is finished with it. If elements are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

Definition at line 235 of file MesqPane_1_1.C.

235  {
236  if(_verb>1)
237  cout << "MOP> MesqPane::element_iterator" << endl;
238  return new MyEntityIterator(_with_ghost ? _pane->size_of_elements() :
239  _pane->size_of_real_elements());
240  }
A class for iterating through a Panes vertices or elements.
Definition: MesqPane.h:495
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void element_tag_create ( const string  tag_name,
int  tag_size,
TagHandle tag_handle,
MsqError err 
)
virtual

Add a new tag with given name and size to the dense tag map.

Definition at line 497 of file MesqPane.C.

References MSQ_CHKERR, MesqPane::tag::pt, and MesqPane::tag::size.

501  {
502  if(_verb)
503  cout << "MesqPane::element_tag_create" << endl;
504  MesqPane::tag new_tag;
505  new_tag.pt = 0;
506  new_tag.size = tag_size;
507  denseTags[tag_name] = new_tag;
508  tag_handle = tag_get_handle(tag_name, err);
509  MSQ_CHKERR(err);
510  if(_verb)
511  cout << "MesqPane::element_tag_create finished" << endl; }
A tag structure required by Mesquite.
Definition: MesqPane.h:487
std::map< std::string, MesqPane::tag > denseTags
Definition: MesqPane.h:491
virtual void * tag_get_handle(const string tag_name, MsqError &err)
Returns the tag handle corresponding to the string.
Definition: MesqPane.C:515
void * pt
Definition: MesqPane.h:488
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
int _verb
Definition: MesqPane.h:479
void elements_get_attached_vertex_indices ( ElementHandle  element[],
size_t  num_elems,
size_t  index_array[],
size_t  array_size,
size_t *  offsets,
MsqError err 
)
virtual

Return each vertex's global index.

Identifies the vertices attached to the elements by returning each vertex's global index. The vertex's global index indicates where that vertex can be found in the array returned by get_all_vertices()

Parameters
elemsArray of element handles.
num_elemsnumber of elements in the array elems
index_arrayArray containing the indexes of the elements vertices. Indexes can be repeated.
index_array_sizeindicates the size of index_array
offsetsHas length num_elems+1. An array of offsets into the index_array that indicates where the indexes corresponding to an element start. First entry is 0. For example element, to get the vertex indices of elems[3], we look at the entries index_array[offsets[3]] to index_array[offsets[4]] .

Definition at line 410 of file MesqPane.C.

References i, and j.

415  {
416  if(_verb)
417  cout << "MesqPane::elements_get_attached_vertex_indices" << endl;
418 
419  int elem_id;
420  offsets[0] = 0;
421 
422  Element_node_enumerator *ene;
423  for(uint i = 0; i < num_elems; ++i){
424 
425  elem_id = ((char*)element[i] - (char*)NULL);
426  if(_verb>1){
427  cout << " element " << elem_id << " contains nodes ";
428  }
429 
430  ene = new Element_node_enumerator(_pane,elem_id);
431  int nodes_in_elem = ene->size_of_nodes();
432  offsets[i+1] = offsets[i] + nodes_in_elem;
433  // loop through vertices in element
434  std::vector<int> nodes;
435  ene->get_nodes(nodes);
436 
437  for(int j = 0; j < nodes_in_elem; ++j){
438  //index_array[offsets[i] + j] = con_array[first_offset+nodes_in_elem*(elem_id-1)+j] -1;
439  index_array[offsets[i]+j] = nodes[j]-1;
440  if(_verb>1){
441  cout << nodes[j]
442  << " ";
443  }
444  delete ene;
445  ene = NULL;
446  }
447  if(_verb>1)
448  cout << endl;
449  }
450  if(_verb>1)
451  cout << " MesqPane::e_g_a_v_i loop finished " << endl;
452  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
int _verb
Definition: MesqPane.h:479
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 
)
virtual

Returns the vertices that are part of the topological definition of each element in the "elem_handles" array.

When this function is called, the following must be true:

  1. "elem_handles" points at an array of "num_elems" element handles.
  2. "vert_handles" points at an array of size "sizeof_vert_handles"
  3. "csr_data" points at an array of size "sizeof_csr_data"
  4. "csr_offsets" points at an array of size "num_elems+1"

When this function returns, adjacency information will be stored in csr format:

  1. "vert_handles" stores handles to all vertices found in one or more of the elements. Each vertex appears only once in "vert_handles", even if it is in multiple elements.
  2. "sizeof_vert_handles" is set to the number of vertex handles placed into "vert_handles".
  3. "sizeof_csr_data" is set to the total number of vertex uses (for example, sizeof_csr_data = 6 in the case of 2 TRIANGLES, even if the two triangles share some vertices).
  4. "csr_offsets" is filled such that csr_offset[i] indicates the location of entity i's first adjacency in "csr_data". The number of vertices in element i is equal to csr_offsets[i+1] - csr_offsets[i]. For this reason, csr_offsets[num_elems] is set to the new value of "sizeof_csr_data".
  5. "csr_data" stores integer offsets which give the location of each adjacency in the "vert_handles" array.

As an example of how to use this data, you can get the handle of the first vertex in element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3] ] ]

and the second vertex of element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3]+1 ] ]
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 
)
virtual

Returns vertices which are part of each element in the "elem_handles" array.

When this function is called, the following must be true:

  1. "elem_handles" points at an array of "num_elems" element handles.
  2. "vert_handles" points at an array of size "sizeof_vert_handles"
    1. "csr_data" points at an array of size "sizeof_csr_data"
  3. "csr_offsets" points at an array of size "num_elems+1"

When this function returns, adjacency information will be stored in csr format:

  1. "vert_handles" stores handles to all vertices found in one or more of the elements. Each vertex appears only once in "vert_handles", even if it is in multiple elements.
  2. "sizeof_vert_handles" is set to the number of vertex handles placed into "vert_handles".
  3. "sizeof_csr_data" is set to the total number of vertex uses (for example, sizeof_csr_data = 6 in the case of 2 TRIANGLES, even if the two triangles share some vertices).
  4. "csr_offsets" is filled such that csr_offset[i] indicates the location of entity i's first adjacency in "csr_data". The number of vertices in element i is equal to csr_offsets[i+1] - csr_offsets[i]. For this reason, csr_offsets[num_elems] is set to the new value of "sizeof_csr_data".
  5. "csr_data" stores integer offsets which give the location of each adjacency in the "vert_handles" array.

As an example of how to use this data, you can get the handle of the first vertex in element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3] ] ]

and the second vertex of element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3]+1 ] ]

Implements Mesh.

Definition at line 358 of file MesqPane.C.

References COM_assertion_msg, i, and j.

365  {
366  if(_verb)
367  cout << "MesqPane::elements_get_attached_vertices" << endl;
368  int vert_count = 0;
369  // maps vertex id's to position in vert_handles
370  std::map<int,int> itop_map;
371  std::map<int,int>::iterator pos;
372  if (num_elems == 0)
373  return;
374  csr_offsets[0] = 0;
375  // loop through elements
376  for (size_t i = 0; i < num_elems; ++i){
377  int elem_id = ((char*)elem_handles[i] - (char*)NULL);
378  std::cout << "\n element " << elem_id << " has nodes : ";
379  std::vector<int> elist;
380  _dc->incident_elements(elem_id,elist);
381  size_t nodes_in_elem = elist.size();
382  csr_offsets[i+1] = csr_offsets[i] + nodes_in_elem;
383  // Check for space in csr_data
384  COM_assertion_msg( (sizeof_csr_data >= csr_offsets[i+1]),
385  "Not enough space in arg. csr_data");
386 
387  // Loop through vertices of current element
388  for( uint j = 0 ; j < nodes_in_elem; ++j){
389  int node_id = ((char*)elist[j] - (char*)NULL);
390  std::cout << node_id << " ";
391  pos = itop_map.find(node_id);
392  // current vertex isn't in vert_handles, add it
393  if(pos == itop_map.end()){
394  itop_map.insert(std::map<int,int>::value_type(node_id,num_elems));
395  vert_handles[vert_count] = ((char*)(NULL)+node_id);
396  csr_data[csr_offsets[i]+j] = vert_count;
397  ++vert_count;
398  }
399  // add current vertex to csr_data
400  csr_data[csr_offsets[i] + j] = pos->second;
401  }
402  elist.clear();
403  }
404  sizeof_csr_data = csr_offsets[num_elems];
405  sizeof_vert_handles = vert_count;
406  if(_verb)
407  cout << "MesqPane::elements_get_attached_vertices" << endl;
408  }
#define COM_assertion_msg(EX, msg)
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
int _verb
Definition: MesqPane.h:479
void elements_get_attached_vertices ( const ElementHandle elem_handles,
size_t  num_elems,
msq_std::vector< VertexHandle > &  vert_handles,
msq_std::vector< size_t > &  offsets,
MsqError &  err 
)
virtual

Get element connectivity.

Get the connectivity (ordered list of vertex handles) for each element in the input array.

Parameters
elem_handlesThe array of element handles for which to retrieve the connectivity list.
num_elemsThe length of elem_handles
vert_handlesArray in which to place the vertex handles in each elements connectivity.
offsetsFor each element in elem_handles, the value in the same position in this array is the index into vert_handles at which the connectivity list for that element begins.

Definition at line 511 of file MesqPane_1_1.C.

References i, j, nj, and swap().

515  {
516 
517  // std::cout << "elements_get_attached_vertices\n";
518 
519  offsets.clear();
520  vert_handles.clear();
521  offsets.resize(num_elems+1);
522  offsets[0] = 0;
523  std::vector<int> nodes;
524  nodes.clear();
525 
526  // guess 4 vertices per element
527  vert_handles.reserve(4*num_elems);
528 
529  // std::cout << "vert_handles = \n";
530 
531  for( size_t i=0; i< num_elems; ++i){
532  offsets[i] += nodes.size();
533  offsets[i+1] = offsets[i];
534  nodes.clear();
535 
536  int elem_id = ((char*)elem_handles[i] - (char*)NULL);
537  Element_node_enumerator ene(_pane,elem_id);
538  ene.get_nodes(nodes);
539 
540  for(uint j=0, nj= nodes.size(); j<nj; ++j){
541  vert_handles.push_back((char*)NULL + nodes[j]);
542  // std::cout << nodes[j] << " ";
543  }
544  // std::cout << "\n";
545  }
546  offsets[num_elems] += nodes.size();
547  msq_std::vector<VertexHandle>(vert_handles).swap(vert_handles);
548  // std::cout << "offsets = \n";
549  for(uint i=0; i < offsets.size(); ++i){
550  // std::cout << offsets[i] << " ";
551  }
552  // std::cout << "\n";
553 
554  }
void swap(int &a, int &b)
Definition: buildface.cpp:88
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
void int * nj
Definition: read.cpp:74

Here is the call graph for this function:

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 
)
virtual

Returns the vertices that are part of the topological definition of each element in the "elem_handles" array.

When this function is called, the following must be true:

  1. "elem_handles" points at an array of "num_elems" element handles.
  2. "vert_handles" points at an array of size "sizeof_vert_handles"
  3. "csr_data" points at an array of size "sizeof_csr_data"
  4. "csr_offsets" points at an array of size "num_elems+1"

When this function returns, adjacency information will be stored in csr format:

  1. "vert_handles" stores handles to all vertices found in one or more of the elements. Each vertex appears only once in "vert_handles", even if it is in multiple elements.
  2. "sizeof_vert_handles" is set to the number of vertex handles placed into "vert_handles".
  3. "sizeof_csr_data" is set to the total number of vertex uses (for example, sizeof_csr_data = 6 in the case of 2 TRIANGLES, even if the two triangles share some vertices).
  4. "csr_offsets" is filled such that csr_offset[i] indicates the location of entity i's first adjacency in "csr_data". The number of vertices in element i is equal to csr_offsets[i+1] - csr_offsets[i]. For this reason, csr_offsets[num_elems] is set to the new value of "sizeof_csr_data".
  5. "csr_data" stores integer offsets which give the location of each adjacency in the "vert_handles" array.

As an example of how to use this data, you can get the handle of the first vertex in element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3] ] ]

and the second vertex of element #3 like this:

VertexHandle vh = vert_handles[ csr_data[ csr_offsets[3]+1 ] ]

Definition at line 556 of file MesqPane_1_1.C.

References COM_assertion_msg, i, and j.

563  {
564  if(_verb)
565  cout << "MOP> MesqPane::elements_get_attached_vertices" << endl;
566  int vert_count = 0;
567  // maps vertex id's to position in vert_handles
568  std::map<int,int> itop_map;
569  std::map<int,int>::iterator pos;
570  if (num_elems == 0)
571  return;
572  csr_offsets[0] = 0;
573  // loop through elements
574  for (size_t i = 0; i < num_elems; ++i){
575  int elem_id = ((char*)elem_handles[i] - (char*)NULL);
576  std::vector<int> elist;
577  _dc->incident_elements(elem_id,elist);
578  size_t nodes_in_elem = elist.size();
579  csr_offsets[i+1] = csr_offsets[i] + nodes_in_elem;
580  // Check for space in csr_data
581  COM_assertion_msg( (sizeof_csr_data >= csr_offsets[i+1]),
582  "Not enough space in arg. csr_data");
583 
584  // Loop through vertices of current element
585  for( uint j = 0 ; j < nodes_in_elem; ++j){
586  int node_id = ((char*)elist[j] - (char*)NULL);
587  pos = itop_map.find(node_id);
588  // current vertex isn't in vert_handles, add it
589  if(pos == itop_map.end()){
590  itop_map.insert(std::map<int,int>::value_type(node_id,num_elems));
591  vert_handles[vert_count] = ((char*)(NULL)+node_id);
592  csr_data[csr_offsets[i]+j] = vert_count;
593  ++vert_count;
594  }
595  // add current vertex to csr_data
596  csr_data[csr_offsets[i] + j] = pos->second;
597  }
598  elist.clear();
599  }
600  sizeof_csr_data = csr_offsets[num_elems];
601  sizeof_vert_handles = vert_count;
602  if(_verb)
603  cout << "MOP> MesqPane::elements_get_attached_vertices" << endl;
604  }
#define COM_assertion_msg(EX, msg)
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
int _verb
Definition: MesqPane.h:479
void elements_get_tag_data ( const size_t  num_elements,
const TagHandle  tag_handle,
TagDataPt &  tag_data_array,
int &  tag_size,
MsqError err 
)
virtual

Gets the Tag data for an array of entities.

The implementation handles the pointers to the tag data, not the memory pointed to. This means that the implementation is not responsible for making sure the memory pointed to is valid.

The implementation handles the pointers to the tag data, not the memory pointed to. This means that the implementation is not responsible for making sure the memory pointed to is valid

Definition at line 560 of file MesqPane.C.

564  {
565  if(_verb)
566  cout << "MesqPane::elements_get_tag_data" << endl;
567  if (_with_ghost && (num_elements != _pane->size_of_elements())) {
568  err.set_msg("Incorrect num_elements. Must be equal to the total number of elements "
569  "since only dense tags are supported.");
570  return; }
571  else if (num_elements != _pane->size_of_real_elements()) {
572  err.set_msg("Incorrect num_elements. Must be equal to the number of real elements "
573  "since only dense tags are supported.");
574  return;
575  }
576  else if (((tag*)tag_handle)->size != tag_size) {
577  err.set_msg("tag_size does not correspong to actual tag size.");
578  return;
579  }
580  else
581  tag_data_array = ((tag*)tag_handle)->pt;
582  if(_verb)
583  cout << "MesqPane::elements_get_tag_data finished" << endl;
584  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual void elements_get_topologies ( ElementHandle element_handle_array,
EntityTopology *  element_topologies,
size_t  num_elements,
MsqError &  err 
)
virtual

Returns the topologies of the given entities.

The "entity_topologies" array must be at least "num_elements" in size.

void elements_get_topologies ( ElementHandle element_handle_array,
EntityTopology element_topologies,
size_t  num_elements,
MsqError err 
)
virtual

Returns the topologies of the given entities.

The "entity_topologies" array must be at least "num_elements" in size.

Implements Mesh.

Definition at line 485 of file MesqPane.C.

References i.

487  {
488  if(_verb >0)
489  cout << "MesqPane::element_get_topologies" << endl;
490  for (size_t i = 0; i < num_elements; i++){
491  element_topologies[i] = element_get_topology(element_handle_array[i],err);
492  }
493  if(_verb >0)
494  cout << "MesqPane::element_get_topologies done" << endl;
495  }
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
virtual EntityTopology element_get_topology(ElementHandle entity_handle, MsqError &err) const
Returns the topology of the given entity.
Definition: MesqPane.C:454
void elements_get_topologies ( ElementHandle element_handle_array,
EntityTopology *  element_topologies,
size_t  num_elements,
MsqError &  err 
)
virtual

Returns the topologies of the given entities.

The "entity_topologies" array must be at least "num_elements" in size.

Definition at line 643 of file MesqPane_1_1.C.

References i.

645  {
646  if(_verb >0)
647  cout << "MOP> MesqPane::element_get_topologies" << endl;
648  for (size_t i = 0; i < num_elements; i++){
649  element_topologies[i] = element_get_topology(element_handle_array[i],err);
650  }
651  if(_verb >0)
652  cout << "MOP> MesqPane::element_get_topologies done" << endl;
653  }
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
virtual EntityTopology element_get_topology(ElementHandle entity_handle, MsqError &err) const
Returns the topology of the given entity.
Definition: MesqPane.C:454
void elements_get_topologies ( const ElementHandle element_handle_array,
EntityTopology *  element_topologies,
size_t  num_elements,
MsqError &  err 
)
virtual

Returns the topologies of the given entities.

The "entity_topologies" array must be at least "num_elements" in size.

Definition at line 655 of file MesqPane_1_1.C.

References i.

657  {
658  if(_verb >0)
659  cout << "MOP> MesqPane::element_get_topologies" << endl;
660  for (size_t i = 0; i < num_elements; i++){
661  element_topologies[i] = element_get_topology(element_handle_array[i],err);
662  }
663  if(_verb >0)
664  cout << "MOP> MesqPane::element_get_topologies done" << endl;
665  }
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
virtual EntityTopology element_get_topology(ElementHandle entity_handle, MsqError &err) const
Returns the topology of the given entity.
Definition: MesqPane.C:454
void elements_set_tag_data ( const size_t  num_elements,
const TagHandle  tag_handle,
TagDataPt const  tag_data_array,
const int &  tag_size,
MsqError err 
)
virtual

Sets the Tag data pointers for an array of entities.

The memory pointed to is the reponsibility of the function caller, i.e. either the memory was obtained from entities_get_tag_data or the function caller allocated the memory and will keep it allocated as long as the tag pointer is set to that memory.

Definition at line 528 of file MesqPane.C.

533  {
534  if(_verb)
535  cout << "MesqPane::element_set_tag_data" << endl;
536  if (_with_ghost && (num_elements != _pane->size_of_elements())) {
537  err.set_msg("Incorrect num_elements. Must be equal to the total number of elements "
538  "since only dense tags are supported.");
539  return;
540  }
541  else if(num_elements != _pane->size_of_real_elements()){
542  err.set_msg("Incorrect num_elements. Must be equal to the number of real elements "
543  "since only dense tags are supported.");
544  return;
545  }
546  else if (((tag*)tag_handle)->size != tag_size) {
547  err.set_msg("tag_size does not correspong to actual tag size.");
548  return;
549  }
550  else
551  ((tag*)tag_handle)->pt = tag_data_array;
552  if(_verb)
553  cout << "MesqPane::element_set_tag_data" << endl;
554  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void get_all_elements ( msq_std::vector< ElementHandle > &  elements,
MsqError &  err 
)
virtual

Get all elements in mesh.

Get the handles of every element in the active mesh.

Definition at line 166 of file MesqPane_1_1.C.

References i.

167  {
168  elements.clear();
169  int e_size = _with_ghost ? _pane->size_of_elements() :
170  _pane->size_of_real_elements();
171  elements.resize(e_size);
172  for(int i=1; i<= e_size; ++i){
173  elements[i-1] = ((char*)NULL)+i;
174  }
175  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
void get_all_elements ( ElementHandle elem_array,
size_t  array_size,
MsqError err 
)
virtual

Fills array with handles to all elements in the mesh.

Parameters
elem_arraya pointer to the element handle array.
array_sizeMust be at least the number of elements. If less than the mesh number of elements, causes a run time error.

Definition at line 127 of file MesqPane.C.

References COM_assertion_msg, and i.

128  {
129  if(_verb)
130  cout << "MesqPane::get_all_elements" << endl;
131  int pane_size = _with_ghost ? _pane->size_of_elements() :
132  _pane->size_of_real_elements();
133  COM_assertion_msg( (array_size >= (size_t)pane_size),
134  "Array_Size Must Be At Least Number of Nodes");
135  for(int i = 1; i <= pane_size; ++i){
136  elem_array[i-1] = ((char*)NULL)+i;
137  }
138  if(_verb)
139  cout << "MesqPane::get_all_elements done" << endl;
140  }
#define COM_assertion_msg(EX, msg)
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
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 
)
virtual

Get entities and connectivity.

Get vertex handles, element handles, and connectivty for active mesh. Use get_all_sizes to determine required array sizes.

Parameters
vert_arrayArray to store vertex handles in
vert_lenLength of vert_array
elem_arrayArray to store element handles in
elem_lenLength of elem_array
elem_conn_offsetsOffsets into elem_conn_indices at which the connectivity data for each element begins.
offset_lenLength of elem_conn_offsets. Should be elem_len + 1.
elem_conn_indicesIndices into vert_array
index_lenLength of elem_conn_indices.
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 
)
virtual

Get entities and connectivity.

Get vertex handles, element handles, and connectivty for active mesh. Use get_all_sizes to determine required array sizes.

Parameters
vert_arrayArray to store vertex handles in
vert_lenLength of vert_array
elem_arrayArray to store element handles in
elem_lenLength of elem_array
elem_conn_offsetsOffsets into elem_conn_indices at which the connectivity data for each element begins.
offset_lenLength of elem_conn_offsets. Should be elem_len + 1.
elem_conn_indicesIndices into vert_array
index_lenLength of elem_conn_indices.

Definition at line 190 of file MesqPane_1_1.C.

References COM_assertion_msg, i, j, and nj.

194  {
195  if(_verb)
196  cout << "MOP> MesqPane::get_all_mesh" << endl;
197  int pane_size = _with_ghost ? _pane->size_of_nodes() :
198  _pane->size_of_real_nodes();
199 
200  COM_assertion_msg( (vert_len >= (size_t)pane_size),
201  "Vert_Len Must Be At Least Number of Nodes");
202 
203  for(int i = 1; i <= pane_size; ++i)
204  vert_array[i-1] = ((char*)NULL)+i;
205 
206  pane_size = _with_ghost ? _pane->size_of_elements() :
207  _pane->size_of_real_elements();
208 
209  COM_assertion_msg( (elem_len >= (size_t)pane_size),
210  "Array_Size Must Be At Least Number of Nodes");
211 
212  elem_conn_offsets[0] = 0;
213  Element_node_enumerator ene(_pane,1);
214  std::vector<int> nodes;
215 
216  for(int i = 1; i <= pane_size; ++i, ene.next()){
217 
218  elem_array[i-1] = ((char*)NULL)+i;
219 
220  elem_conn_offsets[i] = elem_conn_offsets[i-1]+ ene.size_of_nodes();
221 
222  ene.get_nodes(nodes);
223  for(int j=0, nj=ene.size_of_nodes(); j<nj; ++j)
224  elem_conn_indices[elem_conn_offsets[i-1]+j] = nodes[j]-1;
225  }
226  }
#define COM_assertion_msg(EX, msg)
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
void int * nj
Definition: read.cpp:74
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual void get_all_sizes ( size_t &  vertex_count,
size_t &  element_count,
size_t &  vertex_use_count,
MsqError &  err 
)
inlinevirtual

get sizes for calling get_all_mesh

Get counts of entities in mesh.

Parameters
vertex_count- Number of vertices connected to active mesh
element_count- Number of elements in active mesh
vertex_use_count- Number of vertex uses (sum of the length of the connectivity list for all elements in active.)

Definition at line 165 of file MesqPane_95.h.

References i, and ni.

168  {
169  vertex_count = _with_ghost ? _pane->size_of_nodes() :
170  _pane->size_of_real_nodes();
171  element_count = _with_ghost ? _pane->size_of_elements() :
172  _pane->size_of_real_elements();
173  std::vector<const COM::Connectivity*> conns;
174  _pane->connectivities(conns);
175  vertex_use_count = 0;
176  for(int i=0, ni = conns.size(); i<ni; ++i){
177  vertex_use_count += conns[i]->size_of_nodes_pe() *
178  (_with_ghost ? conns[i]->size_of_elements() :
179  conns[i]->size_of_real_elements());
180  }
181  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
bool _with_ghost
Definition: MesqPane.h:483
virtual void get_all_sizes ( size_t &  vertex_count,
size_t &  element_count,
size_t &  vertex_use_count,
MsqError &  err 
)
inlinevirtual

get sizes for calling get_all_mesh

Get counts of entities in mesh.

Parameters
vertex_count- Number of vertices connected to active mesh
element_count- Number of elements in active mesh
vertex_use_count- Number of vertex uses (sum of the length of the connectivity list for all elements in active.)

Definition at line 181 of file MesqPane_1_1.h.

References i, and ni.

184  {
185  vertex_count = _with_ghost ? _pane->size_of_nodes() :
186  _pane->size_of_real_nodes();
187  element_count = _with_ghost ? _pane->size_of_elements() :
188  _pane->size_of_real_elements();
189  std::vector<const COM::Connectivity*> conns;
190  _pane->connectivities(conns);
191  vertex_use_count = 0;
192  for(int i=0, ni = conns.size(); i<ni; ++i){
193  vertex_use_count += conns[i]->size_of_nodes_pe() *
194  (_with_ghost ? conns[i]->size_of_elements() :
195  conns[i]->size_of_real_elements());
196  }
197  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
bool _with_ghost
Definition: MesqPane.h:483
void get_all_vertices ( msq_std::vector< VertexHandle > &  vertices,
MsqError &  err 
)
virtual

Get all vertices in mesh.

Get the handles of every vertex in the active mesh

Definition at line 178 of file MesqPane_1_1.C.

References i.

179  {
180  vertices.clear();
181  int v_size = _with_ghost ? _pane->size_of_nodes() :
182  _pane->size_of_real_nodes();
183  vertices.resize(v_size);
184  for(int i=1; i<= v_size; ++i){
185  vertices[i-1] = ((char*)NULL)+i;
186  }
187  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
void get_all_vertices ( VertexHandle vert_array,
size_t  array_size,
MsqError err 
)
virtual

Fills array with handles to all vertices.

Parameters
vert_arraya pointer to the vertex array to be filled.
array_sizeMust be at least the number of vertices. If less than the mesh number of vertices, causes a run time error.

Definition at line 112 of file MesqPane.C.

References COM_assertion_msg, and i.

113  {
114  if(_verb)
115  cout << "MesqPane::get_all_vertices" << endl;
116  int pane_size = _with_ghost ? _pane->size_of_nodes() :
117  _pane->size_of_real_nodes();
118  COM_assertion_msg( (array_size >= (size_t)pane_size),
119  "Array_Size Must Be At Least Number of Nodes");
120  for(int i = 1; i <= pane_size; ++i){
121  vert_array[i-1] = ((char*)NULL)+i;
122  }
123  if(_verb)
124  cout << "MesqPane::get_all_vertices done" << endl;
125  }
#define COM_assertion_msg(EX, msg)
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual int get_geometric_dimension ( MsqError &  err)
inlinevirtual

Returns whether this mesh lies in a 2D or 3D coordinate system.

Definition at line 149 of file MesqPane_1_1.h.

149  {
150  if(_verb >1)
151  std::cout << "MesqPane::get_geometric_dimension\n";
152  return 3;
153  }
int _verb
Definition: MesqPane.h:479
virtual int get_geometric_dimension ( MsqError &  err)
inlinevirtual

Returns whether this mesh lies in a 2D or 3D coordinate system.

Definition at line 149 of file MesqPane_95.h.

149  {
150  if(_verb >1)
151  std::cout << "MesqPane::get_geometric_dimension\n";
152  return 3;
153  }
int _verb
Definition: MesqPane.h:479
virtual int get_geometric_dimension ( MsqError err) const
inlinevirtual

Returns whether this mesh lies in a 2D or 3D coordinate system.

Definition at line 156 of file MesqPane.h.

156  {
157  if(_verb >1) std::cout << "MesqPane::get_geometric_dimension" << std::endl;
158  return 3;
159  }
int _verb
Definition: MesqPane.h:479
virtual size_t get_total_element_count ( MsqError err) const
inlinevirtual

Returns the number of elements.

Definition at line 168 of file MesqPane.h.

168  {
169  if(_verb >1) std::cout << "MesqPane::get_total_element_count" << std::endl;
170  return _with_ghost ? _pane->size_of_elements() : _pane->size_of_real_elements(); }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual size_t get_total_vertex_count ( MsqError err) const
inlinevirtual

Returns the number of nodes.

Definition at line 162 of file MesqPane.h.

162  {
163  if(_verb >1) std::cout << "MesqPane::get_total_vertex_count" << std::endl;
164  return _with_ghost ? _pane->size_of_nodes() : _pane->size_of_real_nodes();
165  }
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual size_t get_vertex_use_count ( ElementHandle handle_array,
size_t  num_handles,
MsqError &  err 
)
virtual
size_t get_vertex_use_count ( ElementHandle handle_array,
size_t  num_handles,
MsqError &  err 
)
virtual

Definition at line 497 of file MesqPane_1_1.C.

References i.

499  {
500  if(_verb)
501  cout << "MOP> MesqPane::get_vertex_use_count" << endl;
502  size_t count = 0;
503  for(uint i=0; i< num_handles; ++i){
504  int e_id = ((char*)handle_array[i] - (char*)NULL);
505  Element_node_enumerator ene(_pane,e_id);
506  count += (size_t)ene.size_of_nodes();
507  }
508  return count;
509  }
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
void init ( )

Initialize the MesqPane.

Builds the dual connectivity, determines border nodes, and resizes data structures.

Definition at line 68 of file MesqPane.C.

References i.

68  {
69  if(_verb)
70  cout << "MesqPane::init" << endl;
71  _dc = new MAP::Pane_dual_connectivity(_pane, _with_ghost);
72  if(_verb>1)
73  cout << "Building pb" << endl;
74  MAP::Pane_boundary pb(_pane);
75  if(_verb>1)
76  cout << "Finished building pb" << endl;
77  std::vector<bool> _is_isolated;
78  _is_isolated.clear();
79  if(_verb>1)
80  cout << "Determining border nodes" << endl;
81  if(_with_ghost)
82  pb.determine_border_nodes(_is_border, _is_isolated, NULL, 1);
83  else
84  pb.determine_border_nodes(_is_border, _is_isolated, NULL, 0);
85  if(_verb>1)
86  cout << "Finished determining border nodes" << endl;
87  int siz = _is_border.size();
88  for(int i =0; i < siz; ++i){
89  if(_is_border[i] && _verb >1)
90  cout << " node " << i+1 << " is on the border" << endl;
91  if(_is_isolated[i] && _verb >1)
92  cout << " node " << i+1 << " is isolated" << endl;
93  if(!(_is_border[i] || _is_isolated[i]) && _verb >1)
94  cout << " node " << i+1 << " is free" << endl;
95  _is_border[i] = (_is_border[i] || _is_isolated[i]);
96 
97  }
98  _vertexBytes.resize(_with_ghost ? _pane->size_of_nodes() :
99  _pane->size_of_real_nodes());
100  if(_verb>1){
101  cout << " size_of_elements = " << _pane->size_of_elements() << endl;
102  cout << " size_of_ghost_elements = " << _pane->size_of_ghost_elements() << endl;
103  cout << " size_of_real_elements = " << _pane->size_of_real_elements() << endl;
104  cout << " size_of_nodes = " << _pane->size_of_nodes() << endl;
105  cout << " size_of_ghost_nodes = " << _pane->size_of_ghost_nodes() << endl;
106  cout << " size_of_real_nodes = " << _pane->size_of_real_nodes() << endl;
107  }
108  if(_verb>0)
109  cout << "MesqPane::init done" << endl;
110  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
std::vector< bool > _is_border
Definition: MesqPane.h:476
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
void init ( )

Initialize the MesqPane.

Builds the dual connectivity, determines border nodes, and resizes data structures.

void init ( )

Initialize the MesqPane.

Builds the dual connectivity, determines border nodes, and resizes data structures.

void invert ( int  conn_type)

Invert Elements.

Either inverts tetrahedrons by swapping the 2nd and 4th nodes in each element. Or inverts hexahedrons by swapping the 2nd and 4th nodes as well as the 6th and 8th.

Definition at line 85 of file MesqPane_1_1.C.

References i, j, nj, and offset().

85  {
86  std::vector<COM::Connectivity*> conn;
87  _pane->connectivities(conn);
88 
89  int temp = 0;
90  int *cptr = NULL;
91  uint offset = 0;
92  for(uint i=0; i<conn.size(); ++i){
93  if(conn[i]->element_type() == conn_type &&
94  conn_type == COM::Connectivity::TET4){
95  cptr = conn[i]->pointer();
96  uint nj = _with_ghost ? (uint)conn[i]->size_of_elements() :
97  (uint)conn[i]->size_of_real_elements();
98  for(uint j = 0; j< nj; ++j){
99  temp = cptr[offset+4*j];
100  cptr[offset+4*j] = cptr[offset+4*j+2];
101  cptr[offset+4*j+2] = temp;
102  }
103  }
104  else if(conn[i]->element_type() == conn_type &&
105  conn_type == COM::Connectivity::HEX8){
106  cptr = conn[i]->pointer();
107  uint nj = _with_ghost ? (uint)conn[i]->size_of_elements() :
108  (uint)conn[i]->size_of_real_elements();
109  for(uint j = 0; j< nj; ++j){
110  temp = cptr[offset+8*j+5];
111  cptr[offset+8*j+5] = cptr[offset+8*j+7];
112  cptr[offset+8*j+7] = temp;
113  temp = cptr[offset+8*j+1];
114  cptr[offset+8*j+1] = cptr[offset+8*j+3];
115  cptr[offset+8*j+3] = temp;
116  }
117  }
118  }
119  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
void int * nj
Definition: read.cpp:74
bool _with_ghost
Definition: MesqPane.h:483

Here is the call graph for this function:

void invert ( )

Invert Tetrahedrons.

Assumes that the connectivities of the Pane are all unstructured tetrahedral, and inverts the tetrahedrons by swapping the 2nd and 4th nodes in each element.

void invert ( )

Invert Tetrahedrons.

Assumes that the connectivities of the Pane are all unstructured tetrahedral, and inverts the tetrahedrons by swapping the 2nd and 4th nodes in each element.

Definition at line 45 of file MesqPane.C.

References i, j, nj, and offset().

Referenced by Rocmop::invert_elements(), and Rocmop::invert_tets().

45  {
46  std::vector<COM::Connectivity*> conn;
47  _pane->connectivities(conn);
48 
49  int temp = 0;
50  int *cptr = NULL;
51  uint offset = 0;
52  for(uint i=0; i<conn.size(); ++i){
53  if(_verb>1){
54  cout << "Connectivity " << i <<" has name " << conn[i]->name() << endl;
55  cout << "offset = " << offset << endl;
56  }
57  cptr = conn[i]->pointer();
58  uint nj = _with_ghost ? (uint)conn[i]->size_of_elements() :
59  (uint)conn[i]->size_of_real_elements();
60  for(uint j = 0; j< nj; ++j){
61  temp = cptr[offset+4*j];
62  cptr[offset+4*j] = cptr[offset+4*j+2];
63  cptr[offset+4*j+2] = temp;
64  }
65  }
66  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
void int * nj
Definition: read.cpp:74
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

Here is the caller graph for this function:

void release ( )
virtual

Release a MesqPane from use.

Instead of deleting a Mesh when you think you are done, call release(). In simple cases, the implementation could just call the destructor. More sophisticated implementations may want to keep the Mesh object to live longer than Mesquite is using it.

Implements Mesh.

Definition at line 593 of file MesqPane.C.

594  {
595  if(_verb)
596  cout << "MesqPane::release()" << endl;
597  }
int _verb
Definition: MesqPane.h:479
virtual void release ( )
virtual

Instead of deleting a Mesh when you think you are done, call release().

In simple cases, the implementation could just call the destructor. More sophisticated implementations may want to keep the Mesh object to live longer than Mesquite is using it.

Implements Mesh.

virtual void release ( )
virtual

Instead of deleting a Mesh when you think you are done, call release().

In simple cases, the implementation could just call the destructor. More sophisticated implementations may want to keep the Mesh object to live longer than Mesquite is using it.

Implements Mesh.

void release_entity_handles ( EntityHandle handle_array,
size_t  num_handles,
MsqError err 
)
virtual

Tells the mesh that the client is finished with a given entity handle.

Implements Mesh.

Definition at line 586 of file MesqPane.C.

587  {
588 
589  if(_verb)
590  cout << "MesqPane::release_entity_handles" << endl;
591  }
int _verb
Definition: MesqPane.h:479
virtual void release_entity_handles ( EntityHandle handle_array,
size_t  num_handles,
MsqError &  err 
)
virtual

Tells the mesh that the client is finished with a given entity handle.

void release_entity_handles ( const EntityHandle handle_array,
size_t  num_handles,
MsqError &  err 
)
virtual

Tells the mesh that the client is finished with a given entity handle.

Definition at line 1321 of file MesqPane_1_1.C.

1322  {
1323 
1324  if(_verb)
1325  cout << "MOP> MesqPane::release_entity_handles" << endl;
1326  }
int _verb
Definition: MesqPane.h:479
void release_entity_handles ( EntityHandle handle_array,
size_t  num_handles,
MsqError &  err 
)
virtual

Tells the mesh that the client is finished with a given entity handle.

Definition at line 1314 of file MesqPane_1_1.C.

1315  {
1316 
1317  if(_verb)
1318  cout << "MOP> MesqPane::release_entity_handles" << endl;
1319  }
int _verb
Definition: MesqPane.h:479
void set_verb ( int  verb)
inline

Set the MesqPane verbose level (int, >= 0)

Definition at line 133 of file MesqPane_1_1.h.

133  {
134  _verb = verb;
135  }
int _verb
Definition: MesqPane.h:479
void set_verb ( int  verb)
inline

Set the MesqPane verbose level (int, >= 0)

Definition at line 133 of file MesqPane_95.h.

133  {
134  _verb = verb;
135  }
int _verb
Definition: MesqPane.h:479
void set_verb ( int  verb)
inline

Set the MesqPane verbose level (int, >= 0)

Definition at line 144 of file MesqPane.h.

Referenced by Rocmop::smooth_mesquite().

144  {
145  _verb = verb;
146  }
int _verb
Definition: MesqPane.h:479

Here is the caller graph for this function:

virtual TagHandle tag_create ( const msq_std::string &  tag_name,
TagType  type,
unsigned  length,
const void *  default_value,
MsqError &  err 
)
virtual

Create a tag.

Create a user-defined data type that can be attached to any element or vertex in the mesh. For an opaque or undefined type, use type=BYTE and length=sizeof(..).

Parameters
tag_nameA unique name for the data object
typeThe type of the data
lengthNumber of values per entity (1->scalar, >1 ->vector)
default_valueDefault value to assign to all entities - may be NULL
Returns
- Handle for tag definition
void * tag_create ( const msq_std::string &  tag_n,
TagType  type,
unsigned  length,
const void *  default_value,
MsqError &  err 
)
virtual

Create a tag.

Create a user-defined data type that can be attached to any element or vertex in the mesh. For an opaque or undefined type, use type=BYTE and length=sizeof(..).

Parameters
tag_nameA unique name for the data object
typeThe type of the data
lengthNumber of values per entity (1->scalar, >1 ->vector)
default_valueDefault value to assign to all entities - may be NULL
Returns
- Handle for tag definition

Definition at line 679 of file MesqPane_1_1.C.

References COM_assertion_msg, MesqPane::tagStruct::edata, i, Mesquite::length(), and MesqPane::tagStruct::ndata.

682  {
683 
684  std::string tag_name(*(const_cast<std::string *>(&tag_n)));
685  if(_verb)
686  cout << "MOP> MesqPane::tag_create" << endl;
687 
688  tagStruct new_tag = {length, type, NULL,
689  NULL, tag_name};
690  int esize = 1+(_with_ghost ? _pane->size_of_elements() :
691  _pane->size_of_real_elements());
692  int nsize = 1+(_with_ghost ? _pane->size_of_nodes() :
693  _pane->size_of_real_nodes());
694  switch (type){
695  case BYTE :{
696 
697  std::vector<char>* temp = new std::vector<char>;
698  temp->reserve(length*esize);
699  temp->resize(length*esize);
700  new_tag.edata = (void *)temp;
701 
702  temp = new std::vector<char>;
703  temp->reserve(nsize*length);
704  temp->resize(nsize*length);
705  new_tag.ndata = (void *)temp;
706 
707  for(uint i=0; i<length*esize; ++i)
708  (*static_cast<std::vector<char>*>(new_tag.edata))[i]
709  = ((char *)default_value)[i];
710  for(uint i=0; i<length*nsize; ++i)
711  (*((std::vector<char>*)new_tag.ndata))[i]
712  = ((char *)default_value)[i];
713  break;
714  }
715  case BOOL :{
716 
717  std::vector<bool>* temp = new std::vector<bool>;
718  temp->reserve(esize*length);
719  temp->resize(esize*length);
720  new_tag.edata = (void *) temp;
721 
722  temp = new std::vector<bool>;
723  temp->reserve(nsize*length);
724  temp->resize(nsize*length);
725  new_tag.ndata = (void *) temp;
726 
727  for(uint i=0; i<esize*length; ++i)
728  (*((std::vector<bool>*)new_tag.edata))[i]
729  = ((bool *)default_value)[i];
730  for(uint i=0; i<nsize*length; ++i)
731  (*((std::vector<bool>*)new_tag.ndata))[i]
732  = ((bool *)default_value)[i];
733  break;
734  }
735  case INT :{
736 
737  std::vector<int>* temp = new std::vector<int>;
738  temp->reserve(esize*length);
739  temp->resize(esize*length);
740  new_tag.edata = (void *) temp;
741 
742  temp = new std::vector<int>;
743  temp->reserve(nsize*length);
744  temp->resize(nsize*length);
745  new_tag.ndata = (void *) temp;
746 
747  for(uint i=0; i<esize*length; ++i)
748  (*((std::vector<int>*)new_tag.edata))[i]
749  = ((int *)default_value)[i];
750  for(uint i=0; i<nsize*length; ++i)
751  (*((std::vector<int>*)new_tag.ndata))[i]
752  = ((int *)default_value)[i];
753  break;
754  }
755  case DOUBLE :{
756 
757  std::vector<double>* temp = new std::vector<double>;
758  temp->reserve(esize*length);
759  temp->resize(esize*length);
760  new_tag.edata = (void *) temp;
761 
762  temp = new std::vector<double>;
763  temp->reserve(nsize*length);
764  temp->resize(nsize*length);
765  new_tag.ndata = (void *) temp;
766 
767  for(uint i=0; i<esize*length; ++i)
768  (*((std::vector<double>*)new_tag.edata))[i]
769  = ((double *)default_value)[i];
770  for(uint i=0; i<nsize*length; ++i)
771  (*((std::vector<double>*)new_tag.ndata))[i]
772  = ((double *)default_value)[i];
773  break;
774  }
775  case HANDLE : {
776 
777  std::vector<void*>* temp = new std::vector<void*>;
778  temp->reserve(esize*length);
779  temp->resize(esize*length);
780  new_tag.edata = (void *) temp;
781 
782  temp = new std::vector<void*>;
783  temp->reserve(nsize*length);
784  temp->resize(nsize*length);
785  new_tag.ndata = (void *) temp;
786 
787  for(uint i=0; i<esize*length; ++i)
788  (*((std::vector<void*>*)new_tag.edata))[i]
789  = ((void* *)default_value)[i];
790  for(uint i=0; i<nsize*length; ++i)
791  (*((std::vector<void*>*)new_tag.ndata))[i]
792  = ((void* *)default_value)[i];
793  break;
794  }
795  default :
797  "Unrecognized TagType.");
798  break;
799  }
800  s_to_t.insert(std::make_pair<msq_std::string,tagStruct>(tag_name,new_tag));
801  std::map<msq_std::string,tagStruct>::iterator pos;
802  pos = s_to_t.find(tag_name);
803  COM_assertion_msg(pos != s_to_t.end(),
804  "Unable to create tag for Mesquite.");
805  return &(pos->second);
806  }
std::map< msq_std::string, tagStruct > s_to_t
Definition: MesqPane_1_1.h:613
#define COM_assertion_msg(EX, msg)
double length(Vector3D *const v, int n)
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

virtual void tag_delete ( TagHandle  handle,
MsqError &  err 
)
virtual

Remove a tag and all corresponding data.

Delete a tag.

void tag_delete ( TagHandle  handle,
MsqError &  err 
)
virtual

Remove a tag and all corresponding data.

Delete a tag.

Definition at line 812 of file MesqPane_1_1.C.

References COM_assertion_msg, if(), n, and v.

812  {
813  if(_verb)
814  cout << "MOP> MesqPane::tag_delete" << endl;
815  tagStruct* tag = (tagStruct*)handle;
816  switch ( (*tag).type){
817  case BYTE : {
818  std::vector<char>* v = (std::vector<char>*)(*tag).edata;
819  if (v!= NULL)
820  delete v;
821  v = (std::vector<char>*)(*tag).ndata;
822  if (v!= NULL)
823  delete v;
824  break;
825  }
826  case BOOL :{
827  std::vector<bool>* v = (std::vector<bool>*) (*tag).edata;
828  if (v!= NULL)
829  delete v;
830  v = (std::vector<bool>*) (*tag).ndata;
831  if (v!= NULL)
832  delete v;
833  break;
834  }
835  case INT :{
836  std::vector<int>* v = (std::vector<int>*) (*tag).edata;
837  if (v!= NULL)
838  delete v;
839  v = (std::vector<int>*) (*tag).ndata;
840  if (v!= NULL)
841  delete v;
842  break;
843  }
844  case DOUBLE :{
845  std::vector<double>* v = (std::vector<double>*) (*tag).edata;
846  if (v!= NULL)
847  delete v;
848  v = (std::vector<double>*) (*tag).ndata;
849  if (v!= NULL)
850  delete v;
851  break;
852  }
853  case HANDLE :{
854  std::vector<void*>* v = (std::vector<void*>*) (*tag).edata;
855  if (v!= NULL)
856  delete v;
857  v = (std::vector<void*>*) (*tag).ndata;
858  if (v!= NULL)
859  delete v;
860  break;
861  }
862  default:
864  "Unrecognized TagType.");
865  break;
866  }
867  const msq_std::string n= (*tag).name;
868  std::map<msq_std::string,tagStruct>::iterator pos;
869  pos = s_to_t.find(n);
870  assert(pos != s_to_t.end());
871  s_to_t.erase(n);
872  }
if(dy > dx)
std::map< msq_std::string, tagStruct > s_to_t
Definition: MesqPane_1_1.h:613
#define COM_assertion_msg(EX, msg)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
const NT & n
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

virtual TagHandle tag_get ( const msq_std::string &  name,
MsqError &  err 
)
virtual

Get handle for existing tag, by name.

Check for the existance of a tag given it's name and if it exists return a handle for it. If the specified tag does not exist, zero should be returned WITHOUT flagging an error.

TagHandle tag_get ( const msq_std::string &  name,
MsqError &  err 
)
virtual

Get handle for existing tag, by name.

Check for the existance of a tag given it's name and if it exists return a handle for it. If the specified tag does not exist, zero should be returned WITHOUT flagging an error.

Definition at line 883 of file MesqPane_1_1.C.

884  {
885  if(_verb)
886  cout << "MOP> MesqPane::tag_get" << endl;
887  std::map<msq_std::string,tagStruct>::iterator pos;
888  pos = s_to_t.find(name);
889  if(pos == s_to_t.end())
890  return NULL;
891  else
892  return (TagHandle)(&(*pos));
893  }
std::map< msq_std::string, tagStruct > s_to_t
Definition: MesqPane_1_1.h:613
void * TagHandle
Definition: MesqPane_1_1.h:101
int _verb
Definition: MesqPane.h:479
virtual void tag_get_element_data ( TagHandle  handle,
size_t  num_elems,
const ElementHandle elem_array,
void *  tag_data,
MsqError &  err 
)
virtual

Get tag values on elements.

Get the value of a tag for a list of mesh elements.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of elements for which to get the tag value.
tag_dataReturn buffer in which to copy tag data, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.
void tag_get_element_data ( TagHandle  handle,
size_t  num_elems,
const ElementHandle elem_array,
void *  tag_data,
MsqError &  err 
)
virtual

Get tag values on elements.

Get the value of a tag for a list of mesh elements.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of elements for which to get the tag value.
tag_dataReturn buffer in which to copy tag data, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.

Definition at line 1189 of file MesqPane_1_1.C.

References i, and j.

1193  {
1194  if(_verb)
1195  cout << "MOP> MesqPane::tag_get_element_data" << endl;
1196  tagStruct* tag = (tagStruct*)handle;
1197  switch ((*tag).type){
1198  case BYTE : {
1199  for(uint i=0; i<num_elems; ++i){
1200  int eid = ((char*)elem_array[i]-(char*)NULL);
1201  for(uint j=0; j<(*tag).size; ++j)
1202  ((char*)tag_data)[i * (*tag).size +j]
1203  = ((char*)((*tag).edata))[eid*(*tag).size+j];
1204  }
1205  break;
1206  }
1207  case BOOL :{
1208  for(uint i=0; i<num_elems; ++i){
1209  int eid = ((bool*)elem_array[i]-(bool*)NULL);
1210  for(uint j=0; j<(*tag).size; ++j)
1211  ((bool*)tag_data)[i * (*tag).size +j]
1212  = ((bool*)((*tag).edata))[eid*(*tag).size+j];
1213  }
1214  break;
1215  }
1216  case INT :{
1217  for(uint i=0; i<num_elems; ++i){
1218  int eid = ((int*)elem_array[i]-(int*)NULL);
1219  for(uint j=0; j<(*tag).size; ++j)
1220  ((int*)tag_data)[i * (*tag).size +j]
1221  = ((int*)((*tag).edata))[eid*(*tag).size+j];
1222  }
1223  break;
1224  }
1225  case DOUBLE :{
1226  for(uint i=0; i<num_elems; ++i){
1227  int eid = ((double*)elem_array[i]-(double*)NULL);
1228  for(uint j=0; j<(*tag).size; ++j)
1229  ((double*)tag_data)[i * (*tag).size +j]
1230  = ((double*)((*tag).edata))[eid*(*tag).size+j];
1231  }
1232  break;
1233  }
1234  case HANDLE : {
1235  for(uint i=0; i<num_elems; ++i){
1236  int eid = ((void**)elem_array[i]-(void**)NULL);
1237  for(uint j=0; j<(*tag).size; ++j)
1238  ((void**)tag_data)[i * (*tag).size +j]
1239  = ((void**)((*tag).edata))[eid*(*tag).size+j];
1240  }
1241  break;
1242  }
1243  }
1244  }
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
int _verb
Definition: MesqPane.h:479
void * tag_get_handle ( const string  tag_name,
MsqError err 
)
virtual

Returns the tag handle corresponding to the string.

Sets an error if the string is not recognised

Definition at line 515 of file MesqPane.C.

515  {
516  if(_verb)
517  cout << "MesqPane::tag_get_handle" << endl;
518  return (void*) &(denseTags[tag_name]);
519  if(_verb)
520  cout << "MesqPane::tag_get_handle finished" << endl;
521  }
std::map< std::string, MesqPane::tag > denseTags
Definition: MesqPane.h:491
int _verb
Definition: MesqPane.h:479
virtual void tag_get_vertex_data ( TagHandle  handle,
size_t  num_elems,
const VertexHandle node_array,
void *  tag_data,
MsqError &  err 
)
virtual

Get tag values on vertices.

Get the value of a tag for a list of mesh vertices.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of vertices for which to get the tag value.
tag_dataReturn buffer in which to copy tag data, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.
void tag_get_vertex_data ( TagHandle  handle,
size_t  num_elems,
const VertexHandle node_array,
void *  tag_data,
MsqError &  err 
)
virtual

Get tag values on vertices.

Get the value of a tag for a list of mesh vertices.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of vertices for which to get the tag value.
tag_dataReturn buffer in which to copy tag data, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.

Definition at line 1256 of file MesqPane_1_1.C.

References i, and j.

1260  {
1261  if(_verb)
1262  cout << "MOP> MesqPane::tag_get_vertex_data" << endl;
1263  tagStruct* tag = (tagStruct*)handle;
1264  switch ((*tag).type){
1265  case BYTE : {
1266  for(uint i=0; i<num_elems; ++i){
1267  int vid = ((char*)node_array[i]-(char*)NULL);
1268  for(uint j=0; j<(*tag).size; ++j)
1269  ((char*)tag_data)[i * (*tag).size +j]
1270  = ((char*)((*tag).ndata))[vid*(*tag).size+j];
1271  }
1272  break;
1273  }
1274  case BOOL :{
1275  for(uint i=0; i<num_elems; ++i){
1276  int vid = ((bool*)node_array[i]-(bool*)NULL);
1277  for(uint j=0; j<(*tag).size; ++j)
1278  ((bool*)tag_data)[i * (*tag).size +j]
1279  = ((bool*)((*tag).ndata))[vid*(*tag).size+j];
1280  }
1281  break;
1282  }
1283  case INT :{
1284  for(uint i=0; i<num_elems; ++i){
1285  int vid = ((int*)node_array[i]-(int*)NULL);
1286  for(uint j=0; j<(*tag).size; ++j)
1287  ((int*)tag_data)[i * (*tag).size +j]
1288  = ((int*)((*tag).ndata))[vid*(*tag).size+j];
1289  }
1290  break;
1291  }
1292  case DOUBLE :{
1293  for(uint i=0; i<num_elems; ++i){
1294  int vid = ((double*)node_array[i]-(double*)NULL);
1295  for(uint j=0; j<(*tag).size; ++j)
1296  ((double*)tag_data)[i * (*tag).size +j]
1297  = ((double*)((*tag).ndata))[vid*(*tag).size+j];
1298  }
1299  break;
1300  }
1301  case HANDLE : {
1302  for(uint i=0; i<num_elems; ++i){
1303  int vid = ((void**)node_array[i]-(void**)NULL);
1304  for(uint j=0; j<(*tag).size; ++j)
1305  ((void**)tag_data)[i * (*tag).size +j]
1306  = ((void**)((*tag).ndata))[vid*(*tag).size+j];
1307  }
1308  break;
1309  }
1310  }
1311  }
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
int _verb
Definition: MesqPane.h:479
virtual void tag_properties ( TagHandle  handle,
msq_std::string &  name_out,
TagType type_out,
unsigned &  length_out,
MsqError &  err 
)
virtual

Get properites of tag.

Get data type and number of values per entity for tag.

Parameters
handleTag to get properties of.
name_outPassed back tag name.
type_outPassed back tag type.
length_outPassed back number of values per entity.
void tag_properties ( TagHandle  handle,
msq_std::string &  name_out,
TagType type_out,
unsigned &  length_out,
MsqError &  err 
)
virtual

Get properites of tag.

Get data type and number of values per entity for tag.

Parameters
handleTag to get properties of.
name_outPassed back tag name.
type_outPassed back tag type.
length_outPassed back number of values per entity.

Definition at line 903 of file MesqPane_1_1.C.

References MesqPane::tag::size.

907  {
908  if(_verb)
909  cout << "MOP> MesqPane::tag_properties" << endl;
910  tagStruct* tag = (tagStruct*)handle;
911  name_out = (*tag).name;
912  type_out = (*tag).type;
913  length_out = (*tag).size;
914  }
int _verb
Definition: MesqPane.h:479
virtual void tag_set_element_data ( TagHandle  handle,
size_t  num_elems,
const ElementHandle elem_array,
const void *  tag_data,
MsqError &  err 
)
virtual

Set tag values on elements.

Set the value of a tag for a list of mesh elements.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of elements for which to set the tag value.
tag_dataTag data for each element, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.
void tag_set_element_data ( TagHandle  handle,
size_t  num_elems,
const ElementHandle elem_array,
const void *  tag_data,
MsqError &  err 
)
virtual

Set tag values on elements.

Set the value of a tag for a list of mesh elements.

Parameters
handleThe tag
num_elemsLength of elem_array
elem_arrayArray of elements for which to set the tag value.
tag_dataTag data for each element, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.

Definition at line 926 of file MesqPane_1_1.C.

References COM_assertion_msg, i, if(), j, and v.

930  {
931  if(_verb)
932  cout << "MOP> MesqPane::tag_set_element_data" << endl;
933  tagStruct* tag = (tagStruct*)handle;
934  int ne = 1 + (_with_ghost ? _pane->size_of_elements() :
935  _pane->size_of_real_elements());
936  switch ((*tag).type){
937  case BYTE : {
938  std::vector<char>* v = (std::vector<char>*)(*tag).edata;
939  uint tsize = ne*(*tag).size;
940  if (v->size() != tsize){
941  // This tag isn't used yet... should only have default value
942  COM_assertion_msg(v->size() == (*tag).size,
943  "Invalid TagHandle received from Mesquite");
944  v->reserve(tsize);
945  v->resize(tsize);
946  for(int i=0; i < ne; ++i){
947  for(uint j=0; j< (*tag).size; ++j)
948  (*v)[i*(*tag).size+j]=(*v)[j];
949  }
950  }
951  for(uint i=0; i<num_elems; ++i){
952  int eid = ((char*)elem_array[i]-(char*)NULL);
953  for(uint j=0; j< (*tag).size; ++j)
954  (*v)[eid * (*tag).size +j]=((char*)tag_data)[i*(*tag).size+j];
955  }
956  break;
957  }
958  case BOOL :{
959  std::vector<bool>* v = (std::vector<bool>*)(*tag).edata;
960  uint tsize = ne*(*tag).size;
961  if (v->size() != tsize){
962  // This tag isn't used yet... should only have default value
963  COM_assertion_msg(v->size() == (*tag).size,
964  "Invalid TagHandle received from Mesquite");
965  v->reserve(tsize);
966  v->resize(tsize);
967  for(int i=0; i < ne; ++i){
968  for(uint j=0; j< (*tag).size; ++j)
969  (*v)[i*(*tag).size+j]=(*v)[j];
970  }
971  }
972  for(uint i=0; i<num_elems; ++i){
973  int eid = ((bool*)elem_array[i]-(bool*)NULL);
974  for(uint j=0; j< (*tag).size; ++j)
975  (*v)[eid * (*tag).size +j]=((bool*)tag_data)[i*(*tag).size+j];
976  }
977  break;
978  }
979  case INT :{
980  std::vector<int>* v = (std::vector<int>*)(*tag).edata;
981  uint tsize = ne*(*tag).size;
982  if (v->size() != tsize){
983  // This tag isn't used yet... should only have default value
984  COM_assertion_msg(v->size() == (*tag).size,
985  "Invalid TagHandle received from Mesquite");
986  v->reserve(tsize);
987  v->resize(tsize);
988  for(int i=0; i < ne; ++i){
989  for(uint j=0; j< (*tag).size; ++j)
990  (*v)[i*(*tag).size+j]=(*v)[j];
991  }
992  }
993  for(uint i=0; i<num_elems; ++i){
994  int eid = ((int*)elem_array[i]-(int*)NULL);
995  for(uint j=0; j< (*tag).size; ++j)
996  (*v)[eid * (*tag).size +j]=((int*)tag_data)[i*(*tag).size+j];
997  }
998  break;
999  }
1000  case DOUBLE :{
1001  std::vector<double>* v = (std::vector<double>*)(*tag).edata;
1002  uint tsize = ne*(*tag).size;
1003  if (v->size() != tsize){
1004  // This tag isn't used yet... should only have default value
1005  COM_assertion_msg(v->size() == (*tag).size,
1006  "Invalid TagHandle received from Mesquite");
1007  v->reserve(tsize);
1008  v->resize(tsize);
1009  for(int i=0; i < ne; ++i){
1010  for(uint j=0; j< (*tag).size; ++j)
1011  (*v)[i*(*tag).size+j]=(*v)[j];
1012  }
1013  }
1014  for(uint i=0; i<num_elems; ++i){
1015  int eid = ((double*)elem_array[i]-(double*)NULL);
1016  for(uint j=0; j< (*tag).size; ++j)
1017  (*v)[eid * (*tag).size +j]=((double*)tag_data)[i*(*tag).size+j];
1018  }
1019  break;
1020  }
1021  case HANDLE : {
1022  std::vector<void*>* v = (std::vector<void*>*)(*tag).edata;
1023  uint tsize = ne*(*tag).size;
1024  if (v->size() != tsize){
1025  // This tag isn't used yet... should only have default value
1026  COM_assertion_msg(v->size() == (*tag).size,
1027  "Invalid TagHandle received from Mesquite");
1028  v->reserve(tsize);
1029  v->resize(tsize);
1030  for(int i=0; i < ne; ++i){
1031  for(uint j=0; j< (*tag).size; ++j)
1032  (*v)[i*(*tag).size+j]=(*v)[j];
1033  }
1034  }
1035  for(uint i=0; i<num_elems; ++i){
1036  int eid = ((void**)elem_array[i]-(void**)NULL);
1037  for(uint j=0; j< (*tag).size; ++j)
1038  (*v)[eid * (*tag).size +j]=((void**)tag_data)[i*(*tag).size+j];
1039  }
1040  break;
1041  }
1042  default :
1044  "TagHandle with unrecgonized TagType received.");
1045  }
1046  }
if(dy > dx)
#define COM_assertion_msg(EX, msg)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

virtual void tag_set_vertex_data ( TagHandle  handle,
size_t  num_elems,
const VertexHandle node_array,
const void *  tag_data,
MsqError &  err 
)
virtual

Set tag values on vertices.

Set the value of a tag for a list of mesh vertices.

Parameters
handleThe tag
num_elemsLength of node_array
node_arrayArray of vertices for which to set the tag value.
tag_dataTag data for each element, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.
void tag_set_vertex_data ( TagHandle  handle,
size_t  num_elems,
const VertexHandle node_array,
const void *  tag_data,
MsqError &  err 
)
virtual

Set tag values on vertices.

Set the value of a tag for a list of mesh vertices.

Parameters
handleThe tag
num_elemsLength of node_array
node_arrayArray of vertices for which to set the tag value.
tag_dataTag data for each element, contiguous in memory. This data is expected to be num_elems*tag_length*sizeof(tag_type) bytes.

Definition at line 1059 of file MesqPane_1_1.C.

References COM_assertion_msg, i, j, and v.

1063  {
1064  if(_verb)
1065  cout << "MOP> MesqPane::tag_set_vertex_data" << endl;
1066  tagStruct* tag = (tagStruct*)handle;
1067  uint nn = 1 + (_with_ghost ? _pane->size_of_nodes() :
1068  _pane->size_of_real_nodes());
1069  switch ((*tag).type){
1070  case BYTE : {
1071  std::vector<char>* v = (std::vector<char>*)(*tag).ndata;
1072  uint tsize = (nn)* (*tag).size;
1073  if (v->size() != tsize){
1074  // This tag isn't used yet... should only have default value
1075  COM_assertion_msg(v->size() == (*tag).size,
1076  "Invalid TagHandle received from Mesquite");
1077  v->reserve(tsize);
1078  v->resize(tsize);
1079  for(uint i=0; i < nn; ++i){
1080  for(uint j=0; j< (*tag).size; ++j)
1081  (*v)[i * (*tag).size +j]=(*v)[j];
1082  }
1083  }
1084  for(uint i=0; i<num_elems; ++i){
1085  int eid = ((char*)node_array[i]-(char*)NULL);
1086  for(uint j=0; j<(*tag).size; ++j)
1087  (*v)[eid * (*tag).size +j]=((char*)tag_data)[i*(*tag).size+j];
1088  }
1089  break;
1090  }
1091  case BOOL :{
1092  std::vector<bool>* v = (std::vector<bool>*)(*tag).ndata;
1093  uint tsize = (nn)* (*tag).size;
1094  if (v->size() != tsize){
1095  // This tag isn't used yet... should only have default value
1096  COM_assertion_msg(v->size() == (*tag).size,
1097  "Invalid TagHandle received from Mesquite");
1098  v->reserve(tsize);
1099  v->resize(tsize);
1100  for(uint i=0; i < nn; ++i){
1101  for(uint j=0; j< (*tag).size; ++j)
1102  (*v)[i * (*tag).size +j]=(*v)[j];
1103  }
1104  }
1105  for(uint i=0; i<num_elems; ++i){
1106  int eid = ((bool*)node_array[i]-(bool*)NULL);
1107  for(uint j=0; j<(*tag).size; ++j)
1108  (*v)[eid * (*tag).size +j]=((bool*)tag_data)[i*(*tag).size+j];
1109  }
1110  break;
1111  }
1112  case INT :{
1113  std::vector<int>* v = (std::vector<int>*)(*tag).ndata;
1114  uint tsize = (nn)* (*tag).size;
1115  if (v->size() != tsize){
1116  // This tag isn't used yet... should only have default value
1117  COM_assertion_msg(v->size() == (*tag).size,
1118  "Invalid TagHandle received from Mesquite");
1119  v->reserve(tsize);
1120  v->resize(tsize);
1121  for(uint i=0; i < nn; ++i){
1122  for(uint j=0; j< (*tag).size; ++j)
1123  (*v)[i * (*tag).size +j]=(*v)[j];
1124  }
1125  }
1126  for(uint i=0; i<num_elems; ++i){
1127  int eid = ((int*)node_array[i]-(int*)NULL);
1128  for(uint j=0; j<(*tag).size; ++j)
1129  (*v)[eid * (*tag).size +j]=((int*)tag_data)[i*(*tag).size+j];
1130  }
1131  break;
1132  }
1133  case DOUBLE :{
1134  std::vector<double>* v = (std::vector<double>*)(*tag).ndata;
1135  uint tsize = (nn)* (*tag).size;
1136  if (v->size() != tsize){
1137  // This tag isn't used yet... should only have default value
1138  COM_assertion_msg(v->size() == (*tag).size,
1139  "Invalid TagHandle received from Mesquite");
1140  v->reserve(tsize);
1141  v->resize(tsize);
1142  for(uint i=0; i < nn; ++i){
1143  for(uint j=0; j< (*tag).size; ++j)
1144  (*v)[i * (*tag).size +j]=(*v)[j];
1145  }
1146  }
1147  for(uint i=0; i<num_elems; ++i){
1148  int eid = ((double*)node_array[i]-(double*)NULL);
1149  for(uint j=0; j<(*tag).size; ++j)
1150  (*v)[eid * (*tag).size +j]=((double*)tag_data)[i*(*tag).size+j];
1151  }
1152  break;
1153  }
1154  case HANDLE : {
1155  std::vector<void*>* v = (std::vector<void*>*)(*tag).ndata;
1156  uint tsize = (nn)* (*tag).size;
1157  if (v->size() != tsize){
1158  // This tag isn't used yet... should only have default value
1159  COM_assertion_msg(v->size() == (*tag).size,
1160  "Invalid TagHandle received from Mesquite");
1161  v->reserve(tsize);
1162  v->resize(tsize);
1163  for(uint i=0; i < nn; ++i){
1164  for(uint j=0; j< (*tag).size; ++j)
1165  (*v)[i * (*tag).size +j]=(*v)[j];
1166  }
1167  }
1168  for(uint i=0; i<num_elems; ++i){
1169  int eid = ((void**)node_array[i]-(void**)NULL);
1170  for(uint j=0; j<(*tag).size; ++j)
1171  (*v)[eid * (*tag).size +j]=((void**)tag_data)[i*(*tag).size+j];
1172  }
1173  break;
1174  }
1175  }
1176  }
#define COM_assertion_msg(EX, msg)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual size_t vertex_get_attached_element_count ( VertexHandle  vertex,
MsqError &  err 
)
virtual

Gets the number of elements attached to this vertex.

Useful to determine how large the "elem_array" parameter of the vertex_get_attached_elements() function must be.

size_t vertex_get_attached_element_count ( VertexHandle  vertex,
MsqError err 
) const
virtual

Gets the number of elements attached to this vertex.

Useful to determine how large the "elem_array" parameter of the vertex_get_attached_elements() function must be.

Definition at line 319 of file MesqPane.C.

320  {
321  if(_verb)
322  cout << "MesqPane::vertex_get_attached_element_count" << endl;
323  int node_id = ((char*)vertex - (char*)NULL);
324  std::vector<int> elist;
325  _dc->incident_elements(node_id,elist);
326  return elist.size();
327  if(_verb)
328  cout << "MesqPane::vertex_get_attached_element_count finished" << endl;
329  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
int _verb
Definition: MesqPane.h:479
size_t vertex_get_attached_element_count ( VertexHandle  vertex,
MsqError &  err 
)
virtual

Gets the number of elements attached to this vertex.

Useful to determine how large the "elem_array" parameter of the vertex_get_attached_elements() function must be.

Definition at line 427 of file MesqPane_1_1.C.

428  {
429  if(_verb)
430  cout << "MOP> MesqPane::vertex_get_attached_element_count" << endl;
431  int node_id = ((char*)vertex - (char*)NULL);
432  std::vector<int> elist;
433  _dc->incident_elements(node_id,elist);
434  return elist.size();
435  if(_verb)
436  cout << "MOP> MesqPane::vertex_get_attached_element_count finished" << endl;
437  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
int _verb
Definition: MesqPane.h:479
virtual void vertex_get_attached_elements ( VertexHandle  vertex,
ElementHandle elem_array,
size_t  sizeof_elem_array,
MsqError &  err 
)
virtual

Gets the elements attached to this vertex.

void vertex_get_attached_elements ( VertexHandle  vertex,
ElementHandle elem_array,
size_t  sizeof_elem_array,
MsqError err 
)
virtual

Gets the elements attached to this vertex.

Implements Mesh.

Definition at line 331 of file MesqPane.C.

References i.

334  {
335  if(_verb)
336  cout << "MesqPane::vertex_get_attached_elements" << endl;
337  int node_id = ((char*)vertex - (char*)NULL);
338  std::vector<int> elist;
339  _dc->incident_elements(node_id,elist);
340  if(sizeof_elem_array > elist.size())
341  sizeof_elem_array = elist.size();
342  for(uint i = 0; i < sizeof_elem_array; i++){
343  elem_array[i] = ((char*)NULL+elist[i]);
344  }
345  if(_verb)
346  cout << "MesqPane::vertex_get_attached_elements finished" << endl;
347  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
void vertex_get_attached_elements ( VertexHandle  vertex,
ElementHandle elem_array,
size_t  sizeof_elem_array,
MsqError &  err 
)
virtual

Gets the elements attached to this vertex.

Definition at line 439 of file MesqPane_1_1.C.

References i.

442  {
443  if(_verb)
444  cout << "MOP> MesqPane::vertex_get_attached_elements" << endl;
445  int node_id = ((char*)vertex - (char*)NULL);
446  std::vector<int> elist;
447  _dc->incident_elements(node_id,elist);
448  if(sizeof_elem_array > elist.size())
449  elist.resize(sizeof_elem_array);
450  for(uint i = 0; i < sizeof_elem_array; i++){
451  elem_array[i] = ((char*)NULL+elist[i]);
452  }
453  if(_verb)
454  cout << "MOP> MesqPane::vertex_get_attached_elements finished" << endl;
455  }
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479
virtual void vertex_get_byte ( VertexHandle  vertex,
unsigned char *  byte,
MsqError &  err 
)
virtual

Retrieve the byte value for the specified vertex or vertices.

The byte value is 0 if it has not yet been set via one of the *_set_byte() functions.

void vertex_get_byte ( VertexHandle  vertex,
unsigned char *  byte,
MsqError err 
)
virtual

Retrieve the byte value for the specified vertex.

The byte value is 0 if it has not yet been set via one of the _set_byte() functions.

Implements Mesh.

Definition at line 297 of file MesqPane.C.

References offset().

298  {
299  if(_verb)
300  cout << "MesqPane::vertex_get_byte" << endl;
301  int offset = ((char*)vertex - (char*)NULL) - 1;
302  *byte = _vertexBytes[offset];
303  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertex_get_byte ( VertexHandle  vertex,
unsigned char *  byte,
MsqError &  err 
)
virtual

Retrieve the byte value for the specified vertex or vertices.

The byte value is 0 if it has not yet been set via one of the *_set_byte() functions.

Definition at line 405 of file MesqPane_1_1.C.

References offset().

406  {
407  if(_verb)
408  cout << "MOP> MesqPane::vertex_get_byte" << endl;
409  int offset = ((char*)vertex - (char*)NULL) - 1;
410  *byte = _vertexBytes[offset];
411  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

bool vertex_is_fixed ( VertexHandle  vertex,
MsqError err 
)
virtual

Tells wheter the vertex is allowed to be repositioned.

True indicates that the vertex is fixed and cannot be moved. This flag is not modifiable by users of the Mesquite::Mesh interface.

Implements Mesh.

Definition at line 156 of file MesqPane.C.

References COM_assertion_msg.

156  {
157  if(_verb>1)
158  cout << "MesqPane::vertex_is_fixed" << endl;
159  uint node_id = (char*)vertex - (char*)NULL;
160  COM_assertion_msg(node_id <= _is_border.size(),
161  "Invalid vertex for MesqPane::vertex_is_fixed()");
162  return _is_border[node_id-1];
163  if(_verb>1)
164  cout << "MesqPane::vertex_is_fixed finished" << endl;
165  }
#define COM_assertion_msg(EX, msg)
std::vector< bool > _is_border
Definition: MesqPane.h:476
int _verb
Definition: MesqPane.h:479
virtual bool vertex_is_fixed ( VertexHandle  vertex,
MsqError &  err 
)
virtual

Returns true or false, indicating whether the vertex is allowed to be repositioned.

True indicates that the vertex is fixed and cannot be moved. Note that this is a read-only property; this flag can't be modified by users of the Mesquite::Mesh interface.

bool vertex_is_fixed ( VertexHandle  vertex,
MsqError &  err 
)
virtual

Returns true or false, indicating whether the vertex is allowed to be repositioned.

True indicates that the vertex is fixed and cannot be moved. Note that this is a read-only property; this flag can't be modified by users of the Mesquite::Mesh interface.

Definition at line 252 of file MesqPane_1_1.C.

References COM_assertion_msg.

252  {
253  if(_verb>1)
254  cout << "MOP> MesqPane::vertex_is_fixed" << endl;
255  uint node_id = (char*)vertex - (char*)NULL;
256  COM_assertion_msg(node_id <= _is_border.size(),
257  "Invalid vertex for MesqPane::vertex_is_fixed()");
258  return _is_border[node_id-1];
259  if(_verb>1)
260  cout << "MOP> MesqPane::vertex_is_fixed finished" << endl;
261  }
#define COM_assertion_msg(EX, msg)
std::vector< bool > _is_border
Definition: MesqPane.h:476
int _verb
Definition: MesqPane.h:479
VertexIterator * vertex_iterator ( MsqError err)
virtual

Returns a pointer to a vertex iterator over this Pane.

The calling code should delete the returned iterator when it is finished with it. If vertices are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

Implements Mesh.

Definition at line 142 of file MesqPane.C.

142  {
143  if(_verb>1)
144  cout << "MesqPane::vertex_iterator" << endl;
145  return new MyEntityIterator(_with_ghost ? _pane->size_of_nodes() :
146  _pane->size_of_real_nodes());
147  }
A class for iterating through a Panes vertices or elements.
Definition: MesqPane.h:495
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual VertexIterator* vertex_iterator ( MsqError &  err)
virtual

Returns a pointer to an iterator that iterates over the set of all vertices in this mesh.

The calling code should delete the returned iterator when it is finished with it. If vertices are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

VertexIterator * vertex_iterator ( MsqError &  err)
virtual

Returns a pointer to an iterator that iterates over the set of all vertices in this mesh.

The calling code should delete the returned iterator when it is finished with it. If vertices are added or removed from the Mesh after obtaining an iterator, the behavior of that iterator is undefined.

Definition at line 228 of file MesqPane_1_1.C.

228  {
229  if(_verb>1)
230  cout << "MOP> MesqPane::vertex_iterator" << endl;
231  return new MyEntityIterator(_with_ghost ? _pane->size_of_nodes() :
232  _pane->size_of_real_nodes());
233  }
A class for iterating through a Panes vertices or elements.
Definition: MesqPane.h:495
COM::Pane * _pane
Definition: MesqPane.h:474
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479
virtual void vertex_set_byte ( VertexHandle  vertex,
unsigned char  byte,
MsqError &  err 
)
virtual

Each vertex has a byte-sized flag that can be used to store flags.

This byte's value is neither set nor used by the mesh implementation. It is intended to be used by Mesquite algorithms. Until a vertex's byte has been explicitly set, its value is 0.

void vertex_set_byte ( VertexHandle  vertex,
unsigned char  byte,
MsqError err 
)
virtual

Set a vertex flag.

Each vertex has a byte-sized flag that can be used to store flags. This byte's value is neither set nor used by the Pane. It is intended to be used by Mesquite algorithms. Until a vertex's byte has been explicitly set, its value is 0.

Parameters
vertexa handle to the vertex in question.
bytethe new flag value.

Implements Mesh.

Definition at line 273 of file MesqPane.C.

References offset().

274  {
275  if(_verb)
276  cout << "MesqPane::vertex_set_byte" << endl;
277  int offset = ((char*)vertex - (char*)NULL) - 1;
278  _vertexBytes[offset] = byte;
279  if(_verb)
280  cout << "MesqPane::vertex_set_byte finished" << endl;
281 }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertex_set_byte ( VertexHandle  vertex,
unsigned char  byte,
MsqError &  err 
)
virtual

Each vertex has a byte-sized flag that can be used to store flags.

This byte's value is neither set nor used by the mesh implementation. It is intended to be used by Mesquite algorithms. Until a vertex's byte has been explicitly set, its value is 0.

Definition at line 369 of file MesqPane_1_1.C.

References offset().

370  {
371  if(_verb)
372  cout << "MOP> MesqPane::vertex_set_byte" << endl;
373  int offset = ((char*)vertex - (char*)NULL) - 1;
374  _vertexBytes[offset] = byte;
375  if(_verb)
376  cout << "MOP> MesqPane::vertex_set_byte finished" << endl;
377  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

virtual void vertex_set_coordinates ( VertexHandle  vertex,
const Vector3D &  coordinates,
MsqError &  err 
)
virtual
void vertex_set_coordinates ( VertexHandle  vertex,
const Vector3D coordinates,
MsqError err 
)
virtual

Set the Location of a vertex.

Parameters
vertexthe vertex in question.
coordinatesMesquite's coordinates for this vertex.

Implements Mesh.

Definition at line 244 of file MesqPane.C.

References Vector3D::get_coordinates(), and offset().

246  {
247  int node_id = ((char*)vertex-(char*)NULL);
248  if(_verb > 1)
249  cout << "MesqPane::vertex_set_coordinates, node = " << node_id << endl;
250  int offset = node_id - 1;
251  double * xptr = _pane->coordinates();
252  if(xptr){
253  xptr += offset *3;
254  if(_verb>1){
255  cout << "Coordinate: [" << *xptr << " , "
256  << *(xptr+1) << " , " << *(xptr+2) << "], ";
257  }
258  coordinates.get_coordinates(xptr);
259  if(_verb>1){
260  cout << "-> [" << *xptr << " , "
261  << *(xptr+1) << " , " << *(xptr+2) << "]" << endl;
262  }
263  }
264  else{
265  coordinates.get_coordinates(*(_pane->x_coordinates()+offset),
266  *(_pane->y_coordinates()+offset),
267  *(_pane->z_coordinates()+offset));
268  }
269  if(_verb)
270  cout << "MesqPane::vertex_set_coordinates finished" << endl;
271  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
void get_coordinates(double &x, double &y, double &z) const
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertex_set_coordinates ( VertexHandle  vertex,
const Vector3D &  coordinates,
MsqError &  err 
)
virtual

Definition at line 340 of file MesqPane_1_1.C.

References offset().

342  {
343  int node_id = ((char*)vertex-(char*)NULL);
344  if(_verb)
345  cout << "MOP> MesqPane::vertex_set_coordinates, node = " << node_id << endl;
346  int offset = node_id - 1;
347  double * xptr = _pane->coordinates();
348  if(xptr){
349  xptr += offset *3;
350  if(_verb>2){
351  cout << "MOP> Coordinate: [" << *xptr << " , "
352  << *(xptr+1) << " , " << *(xptr+2) << "], ";
353  }
354  coordinates.get_coordinates(xptr);
355  if(_verb>2){
356  cout << "-> [" << *xptr << " , "
357  << *(xptr+1) << " , " << *(xptr+2) << "]" << endl;
358  }
359  }
360  else{
361  coordinates.get_coordinates(*(_pane->x_coordinates()+offset),
362  *(_pane->y_coordinates()+offset),
363  *(_pane->z_coordinates()+offset));
364  }
365  if(_verb)
366  cout << "MOP> MesqPane::vertex_set_coordinates finished" << endl;
367  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
COM::Pane * _pane
Definition: MesqPane.h:474
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_are_on_boundary ( VertexHandle  vert_array[],
bool  on_bnd[],
size_t  num_vtx,
MsqError err 
)
virtual

Tells whether the vertex is on the boundary.

Boundary nodes may be treated as a special case by some algorithms or culling methods. This flag is not modifiable by users of the Mesquite::Mesh interface.

Implements Mesh.

Definition at line 167 of file MesqPane.C.

References i.

168  {
169  if(_verb)
170  cout << "MesqPane::vertices_are_on_boundary" << endl;
171  for (size_t i = 0; i < num_vtx; ++i){
172  uint node_id = (((char*)vert_array[i]) - (char*)NULL);
173  if (_is_border[node_id-1]){
174  on_bnd[i] = true;
175  if(_verb>1)
176  std::cout << "Node " << node_id << " is on the boundary." << endl;
177  }
178  else{
179  on_bnd[i] = false;
180  }
181  }
182  if(_verb)
183  cout << "MesqPane::vertices_are_on_boundary finished" << endl;
184  }
blockLoc i
Definition: read.cpp:79
std::vector< bool > _is_border
Definition: MesqPane.h:476
int _verb
Definition: MesqPane.h:479
virtual void vertices_are_on_boundary ( VertexHandle  vert_array[],
bool  on_bnd[],
size_t  num_vtx,
MsqError &  err 
)
virtual

Returns true or false, indicating whether the vertex is on the boundary.

Boundary nodes may be treated as a special case by some algorithms or culling methods. Note that this is a read-only property; this flag can't be modified by users of the Mesquite::Mesh interface.

void vertices_are_on_boundary ( VertexHandle  vert_array[],
bool  on_bnd[],
size_t  num_vtx,
MsqError &  err 
)
virtual

Returns true or false, indicating whether the vertex is on the boundary.

Boundary nodes may be treated as a special case by some algorithms or culling methods. Note that this is a read-only property; this flag can't be modified by users of the Mesquite::Mesh interface.

Definition at line 263 of file MesqPane_1_1.C.

References i.

264  {
265  if(_verb)
266  cout << "MOP> MesqPane::vertices_are_on_boundary" << endl;
267  for (size_t i = 0; i < num_vtx; ++i){
268  uint node_id = (((char*)vert_array[i]) - (char*)NULL);
269  if (_is_border[node_id-1]){
270  on_bnd[i] = true;
271  if(_verb>1)
272  std::cout << "MOP> Node " << node_id << " is on the boundary." << endl;
273  }
274  else{
275  on_bnd[i] = false;
276  }
277  }
278  if(_verb)
279  cout << "MOP> MesqPane::vertices_are_on_boundary finished" << endl;
280  }
blockLoc i
Definition: read.cpp:79
std::vector< bool > _is_border
Definition: MesqPane.h:476
int _verb
Definition: MesqPane.h:479
void vertices_get_attached_elements ( const VertexHandle vertex_array,
size_t  num_vertex,
msq_std::vector< ElementHandle > &  elements,
msq_std::vector< size_t > &  offsets,
MsqError &  err 
)
virtual

get elements adjacent to vertices

Get adjacency data for vertices

Parameters
vertex_arrayArray of vertex handles specifying the list of vertices to retrieve adjacency data for.
num_vertexNumber of vertex handles in vertex_array
elementsThe array in which to place the handles of elements adjacent to the input vertices.
offsetsFor each vertex in vertex_array, the value in the corresponding position in this array is the index into elem_array at which the adjacency list begins for that vertex.

Definition at line 458 of file MesqPane_1_1.C.

References i, ni, and swap().

462  {
463 
464  // Guess 6 elements to each node for initial memory allocation
465  // to avoid frequent memory allocation and swapping.
466  elements.reserve(6*num_vertex);
467  offsets.resize(num_vertex+1);
468  if(num_vertex > 0)
469  offsets[0] = 0;
470  std::vector<int> elist;
471  elist.clear();
472 
473  for(size_t i=0; i<num_vertex; ++i){
474  offsets[i] += elist.size();
475  offsets[i+1] = offsets[i];
476  int node_id = ((char*)vertex_array[i] - (char*)NULL);
477  _dc->incident_elements(node_id,elist);
478  for(uint i=0, ni=elist.size(); i<ni; ++i)
479  elements.push_back((char*)NULL + elist[i]);
480  }
481  offsets[num_vertex] = offsets[num_vertex-1] + elist.size();
482 
483  // trim excess capacity
484  vector<ElementHandle>(elements).swap(elements);
485  }
void swap(int &a, int &b)
Definition: buildface.cpp:88
MAP::Pane_dual_connectivity * _dc
Definition: MesqPane.h:475
blockLoc i
Definition: read.cpp:79
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77

Here is the call graph for this function:

virtual void vertices_get_byte ( VertexHandle vertex,
unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
virtual
void vertices_get_byte ( VertexHandle vertex,
unsigned char *  byte_array,
size_t  array_size,
MsqError err 
)
virtual

Retrieve the byte value for the specified vertices.

The byte value is 0 if it has not yet been set via one of the _set_byte() functions.

Implements Mesh.

Definition at line 305 of file MesqPane.C.

References i, and offset().

307  {
308  if(_verb)
309  cout << "MesqPane::vertices_get_byte" << endl;
310  int offset =0;
311  for(size_t i = 0; i < array_size; ++i){
312  offset = ((char*)vertex[i] - (char*)NULL) - 1;
313  byte_array[i] = _vertexBytes[offset];
314  }
315  if(_verb)
316  cout << "MesqPane::vertices_get_byte finished" << endl;
317  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_get_byte ( VertexHandle vertex,
unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
virtual

Definition at line 413 of file MesqPane_1_1.C.

References i, and offset().

415  {
416  if(_verb)
417  cout << "MOP> MesqPane::vertices_get_byte" << endl;
418  int offset =0;
419  for(size_t i = 0; i < array_size; ++i){
420  offset = ((char*)vertex[i] - (char*)NULL) - 1;
421  byte_array[i] = _vertexBytes[offset];
422  }
423  if(_verb)
424  cout << "MOP> MesqPane::vertices_get_byte finished" << endl;
425  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

virtual void vertices_get_byte ( const VertexHandle vertex,
unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
inlinevirtual

Definition at line 303 of file MesqPane_1_1.h.

306  {;}
virtual void vertices_get_coordinates ( const VertexHandle  vert_array[],
MsqVertex *  coordinates,
size_t  num_vtx,
MsqError &  err 
)
virtual

Get/set location of a vertex.

void vertices_get_coordinates ( VertexHandle  vert_array[],
Mesquite::MsqVertex *const &  coordinates,
const size_t &  num_vtx,
MsqError err 
)
virtual

Get the location of a vertex.

Parameters
vert_arraythe array of vertex handles for this Pane.
coordinatesMesquite's array of vertex coordinates.
num_vtxnumber of vertices to process.

Definition at line 186 of file MesqPane.C.

References COM_assertion_msg, COM_NC, COM_NC1, COM_NC2, COM_NC3, i, offset(), and Vector3D::set().

189  {
190  if(_verb)
191  cout << "MesqPane::vertices_get_coordinates" << endl;
192  const double *xptr = _pane->coordinates(), *yptr=NULL, *zptr=NULL;
193  const COM::Attribute *nc = _pane->attribute(COM::COM_NC);
194  int stride = nc->stride();
195  if(!stride){
196  const COM::Attribute *xc = _pane->attribute(COM::COM_NC1);
197  const COM::Attribute *yc = _pane->attribute(COM::COM_NC2);
198  const COM::Attribute *zc = _pane->attribute(COM::COM_NC3);
199  int stride1 = xc->stride();
200  int stride2 = yc->stride();
201  int stride3 = zc->stride();
202  xptr = _pane->x_coordinates();
203  yptr = _pane->y_coordinates();
204  zptr = _pane->z_coordinates();
205  for (size_t i = 0; i < num_vtx; ++i){
206  int offset = (char*)vert_array[i]-(char*)NULL -1;
207  coordinates[i].set(*(xptr+offset*stride1),
208  *(yptr+offset*stride2),
209  *(zptr+offset*stride3));
210  }
211  }
212  else if (stride==1){
213  int nn = _with_ghost ? _pane->size_of_nodes() :
214  _pane->size_of_real_nodes();
215  xptr = _pane->x_coordinates();
216  for (size_t i = 0; i < num_vtx; ++i){
217  int offset = (char*)vert_array[i]-(char*)NULL -1;
218  coordinates[i].set(*(xptr+offset),
219  *(xptr+offset+nn),
220  *(xptr+offset+2*nn));
221  }
222  }
223  else if (stride>=3){
224  xptr = _pane->x_coordinates();
225  for (size_t i = 0; i < num_vtx; ++i){
226  int offset = (char*)vert_array[i]-(char*)NULL -1;
227  coordinates[i].set(xptr + offset * stride);
228  if(_verb>1){
229  cout << "Coords of node " << offset+1 << " = ["
230  << coordinates[i][0] << ","
231  << coordinates[i][1] << ","
232  << coordinates[i][2] << "]" << endl;
233  }
234  }
235  }
236  else{
238  "Invalid stride length for nodal coordinates.");
239  }
240  if(_verb)
241  cout << "MesqPane::vertices_get_coordinates finished" << endl;
242  }
#define COM_assertion_msg(EX, msg)
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
void set(const double x, const double y, const double z)
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_get_coordinates ( const VertexHandle  vert_array[],
MsqVertex *  coordinates,
size_t  num_vtx,
MsqError &  err 
)
virtual

Get/set location of a vertex.

Definition at line 282 of file MesqPane_1_1.C.

References COM_assertion_msg, COM_NC, COM_NC1, COM_NC2, COM_NC3, i, and offset().

285  {
286  if(_verb)
287  cout << "MOP> MesqPane::vertices_get_coordinates" << endl;
288  const double *xptr = _pane->coordinates(), *yptr=NULL, *zptr=NULL;
289  const COM::Attribute *nc = _pane->attribute(COM::COM_NC);
290  int stride = nc->stride();
291  if(!stride){
292  const COM::Attribute *xc = _pane->attribute(COM::COM_NC1);
293  const COM::Attribute *yc = _pane->attribute(COM::COM_NC2);
294  const COM::Attribute *zc = _pane->attribute(COM::COM_NC3);
295  int stride1 = xc->stride();
296  int stride2 = yc->stride();
297  int stride3 = zc->stride();
298  xptr = _pane->x_coordinates();
299  yptr = _pane->y_coordinates();
300  zptr = _pane->z_coordinates();
301  for (size_t i = 0; i < num_vtx; ++i){
302  int offset = (char*)vert_array[i]-(char*)NULL -1;
303  coordinates[i].set(*(xptr+offset*stride1),
304  *(yptr+offset*stride2),
305  *(zptr+offset*stride3));
306  }
307  }
308  else if (stride==1){
309  int nn = _with_ghost ? _pane->size_of_nodes() :
310  _pane->size_of_real_nodes();
311  xptr = _pane->x_coordinates();
312  for (size_t i = 0; i < num_vtx; ++i){
313  int offset = (char*)vert_array[i]-(char*)NULL -1;
314  coordinates[i].set(*(xptr+offset),
315  *(xptr+offset+nn),
316  *(xptr+offset+2*nn));
317  }
318  }
319  else if (stride>=3){
320  xptr = _pane->x_coordinates();
321  for (size_t i = 0; i < num_vtx; ++i){
322  int offset = (char*)vert_array[i]-(char*)NULL -1;
323  coordinates[i].set(xptr + offset * stride);
324  if(_verb>1){
325  cout << "MOP> Coords of node " << offset+1 << " = ["
326  << coordinates[i][0] << ","
327  << coordinates[i][1] << ","
328  << coordinates[i][2] << "]" << endl;
329  }
330  }
331  }
332  else{
334  "Invalid stride length for nodal coordinates.");
335  }
336  if(_verb)
337  cout << "MOP> MesqPane::vertices_get_coordinates finished" << endl;
338  }
#define COM_assertion_msg(EX, msg)
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
COM::Pane * _pane
Definition: MesqPane.h:474
blockLoc i
Definition: read.cpp:79
bool _with_ghost
Definition: MesqPane.h:483
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_get_fixed_flag ( const VertexHandle  vert_array[],
bool  fixed_flag_array[],
size_t  num_vtx,
MsqError &  err 
)
virtual

Returns true or false, indicating whether the vertex is allowed to be repositioned.

True indicates that the vertex is fixed and cannot be moved. Note that this is a read-only property; this flag can't be modified by users of the Mesquite::Mesh interface.

Definition at line 242 of file MesqPane_1_1.C.

References i.

245  {
246  for(size_t i =0; i< num_vtx; ++i){
247  uint node_id = (char*)vert_array[i] - (char*)NULL;
248  fixed_flag_array[i] = _is_border[node_id-1];
249  }
250  }
blockLoc i
Definition: read.cpp:79
std::vector< bool > _is_border
Definition: MesqPane.h:476
size_t vertices_in_topology ( EntityTopology  )
inlineprivate
size_t vertices_in_topology ( EntityTopology  )
inlineprivate
size_t vertices_in_topology ( EntityTopology  )
inlineprivate
virtual void vertices_set_byte ( VertexHandle vert_array,
unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
virtual
void vertices_set_byte ( VertexHandle vert_array,
unsigned char *  byte_array,
size_t  array_size,
MsqError err 
)
virtual

Set mutliple vertex flags.

Each vertex has a byte-sized flag that can be used to store flags. This byte's value is neither set nor used by the Pane. It is intended to be used by Mesquite algorithms. Until a vertex's byte has been explicitly set, its value is 0.

Parameters
vert_arrayhandles to the vertices in question.
bytethe new flag value.

Implements Mesh.

Definition at line 283 of file MesqPane.C.

References i, and offset().

285  {
286  if(_verb)
287  cout << "MesqPane::vertices_set_byte" << endl;
288  int offset =0;
289  for(size_t i = 0; i < array_size; ++i){
290  offset = ((char*)vert_array[i] - (char*)NULL) - 1;
291  _vertexBytes[offset] = byte_array[i];
292  }
293  if(_verb)
294  cout << "MesqPane::vertices_set_byte" << endl;
295  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_set_byte ( VertexHandle vert_array,
unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
virtual

Definition at line 379 of file MesqPane_1_1.C.

References i, and offset().

381  {
382  if(_verb)
383  cout << "MOP> MesqPane::vertices_set_byte" << endl;
384  int offset =0;
385  for(size_t i = 0; i < array_size; ++i){
386  offset = ((char*)vert_array[i] - (char*)NULL) - 1;
387  _vertexBytes[offset] = byte_array[i];
388  }
389  if(_verb)
390  cout << "MOP> MesqPane::vertices_set_byte" << endl;
391  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
blockLoc i
Definition: read.cpp:79
int _verb
Definition: MesqPane.h:479

Here is the call graph for this function:

void vertices_set_byte ( const VertexHandle vert_array,
const unsigned char *  byte_array,
size_t  array_size,
MsqError &  err 
)
virtual

Definition at line 394 of file MesqPane_1_1.C.

References i, and offset().

397  {
398  int offset =0;
399  for(size_t i = 0; i < array_size; ++i){
400  offset = ((char*)vert_array[i] - (char*)NULL) - 1;
401  _vertexBytes[offset] = byte_array[i];
402  }
403  }
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
std::vector< unsigned char > _vertexBytes
Definition: MesqPane.h:477
blockLoc i
Definition: read.cpp:79

Here is the call graph for this function:

Member Data Documentation

MAP::Pane_dual_connectivity * _dc
protected

Definition at line 475 of file MesqPane.h.

std::vector< bool > _is_border
protected

Definition at line 476 of file MesqPane.h.

COM::Pane * _pane
protected

Definition at line 474 of file MesqPane.h.

int _verb
protected

Definition at line 479 of file MesqPane.h.

std::vector< unsigned char > _vertexBytes
protected

Definition at line 477 of file MesqPane.h.

bool _with_ghost
protected

Definition at line 483 of file MesqPane.h.

std::map<std::string, MesqPane::tag> denseTags
protected

Definition at line 491 of file MesqPane.h.

std::map< msq_std::string, tagStruct > s_to_t
protected

Definition at line 613 of file MesqPane_1_1.h.


The documentation for this class was generated from the following files: