41 #ifndef USE_STD_INCLUDES
42 #define USE_STD_INCLUDES 1
45 #ifndef USE_C_PREFIX_INCLUDES
46 #define USE_C_PREFIX_INCLUDES 1
51 #include "TopologyInfo.hpp"
63 #ifdef MSQ_USE_OLD_C_HEADERS
71 #define MESQUITE_BEGIN_NAMESPACE namespace Mesquite{
72 #define MESQUITE_END_NAMESPACE }
117 void invert(
int conn_type);
128 : _pane(p), _verb(0), _with_ghost(with_ghost){
151 std::cout <<
"MesqPane::get_geometric_dimension\n";
160 virtual void get_all_elements( msq_std::vector<ElementHandle>& elements,
168 virtual void get_all_vertices( msq_std::vector<VertexHandle>& vertices,
182 size_t& element_count,
183 size_t& vertex_use_count,
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());
217 virtual void get_all_mesh( VertexHandle* vert_array,
size_t vert_len,
218 ElementHandle* elem_array,
size_t elem_len,
219 size_t* elem_conn_offsets,
size_t offset_len,
220 size_t* elem_conn_indices,
size_t index_len,
245 virtual void vertices_get_fixed_flag(
const VertexHandle vert_array[],
246 bool fixed_flag_array[],
255 virtual bool vertex_is_fixed(VertexHandle vertex, MsqError &err);
263 virtual void vertices_are_on_boundary(VertexHandle vert_array[],
bool on_bnd[],
264 size_t num_vtx, MsqError &err);
267 virtual void vertices_get_coordinates(
const VertexHandle vert_array[],
268 MsqVertex* coordinates,
272 virtual void vertex_set_coordinates(VertexHandle vertex,
280 virtual void vertex_set_byte (VertexHandle vertex,
281 unsigned char byte, MsqError &err);
283 virtual void vertices_set_byte (VertexHandle *vert_array,
284 unsigned char *byte_array,
285 size_t array_size, MsqError &err);
288 virtual void vertices_set_byte(
const VertexHandle *vert_array,
289 const unsigned char *byte_array,
296 virtual void vertex_get_byte(VertexHandle vertex,
297 unsigned char *byte, MsqError &err);
298 virtual void vertices_get_byte(VertexHandle *vertex,
299 unsigned char *byte_array,
300 size_t array_size, MsqError &err);
304 unsigned char *byte_array,
313 virtual size_t vertex_get_attached_element_count(VertexHandle vertex,
317 virtual void vertex_get_attached_elements(VertexHandle vertex,
318 ElementHandle* elem_array,
319 size_t sizeof_elem_array,
340 vertices_get_attached_elements(
const VertexHandle* vertex_array,
342 msq_std::vector<ElementHandle>& elements,
343 msq_std::vector<size_t>& offsets,
353 virtual size_t element_get_attached_vertex_count(ElementHandle elem,
356 virtual size_t get_vertex_use_count( ElementHandle* handle_array,
377 virtual void elements_get_attached_vertices(
378 const ElementHandle *elem_handles,
380 msq_std::vector<VertexHandle>& vert_handles,
381 msq_std::vector<size_t>& offsets,
420 virtual void elements_get_attached_vertices(ElementHandle *elem_handles,
422 VertexHandle *vert_handles,
423 size_t &sizeof_vert_handles,
425 size_t &sizeof_csr_data,
430 virtual EntityTopology element_get_topology(ElementHandle entity_handle,
435 virtual void elements_get_topologies(ElementHandle *element_handle_array,
437 size_t num_elements, MsqError &err);
443 virtual void elements_get_topologies(
const ElementHandle *element_handle_array,
445 size_t num_elements, MsqError &err);
461 virtual TagHandle tag_create(
const msq_std::string& tag_name,
462 TagType type,
unsigned length,
463 const void* default_value,
470 virtual void tag_delete(
TagHandle handle, MsqError& err );
480 virtual TagHandle tag_get(
const msq_std::string& name,
491 virtual void tag_properties(
TagHandle handle,
492 msq_std::string& name_out,
494 unsigned& length_out,
507 virtual void tag_set_element_data(
TagHandle handle,
509 const ElementHandle* elem_array,
510 const void* tag_data,
523 virtual void tag_set_vertex_data (
TagHandle handle,
525 const VertexHandle* node_array,
526 const void* tag_data,
540 virtual void tag_get_element_data(
TagHandle handle,
542 const ElementHandle* elem_array,
556 virtual void tag_get_vertex_data (
TagHandle handle,
558 const VertexHandle* node_array,
569 virtual void release_entity_handles(
const EntityHandle *handle_array,
575 virtual void release_entity_handles(EntityHandle *handle_array,
576 size_t num_handles, MsqError &err);
583 virtual void release();
587 MAP::Pane_dual_connectivity* _dc;
588 std::vector<bool> _is_border;
589 std::vector<unsigned char> _vertexBytes;
606 tagStruct::tagStruct()
607 : size(0), type(0), edata(NULL), ndata(NULL), dval(NULL)
613 std::map<msq_std::string,tagStruct>
s_to_t;
621 return TopologyInfo::corners( topo );
648 return (
char*)NULL+
_cur;
std::map< msq_std::string, tagStruct > s_to_t
Iterates through a set of entities. An EntityIterator is typically obtained via Mesh::vertex_iterator...
EntityIterator VertexIterator
void set_verb(int verb)
Set the MesqPane verbose level (int, >= 0)
EntityHandle VertexHandle
subroutine invert(a, nrow, det)
Contains the prototypes for the Pane object.
TagType
The type of a tag.
A class for iterating through a Panes vertices or elements.
virtual ~MyEntityIterator()
Destructor.
EntityHandle VertexHandle
This file contains the Mesquite mesh interface. Many users will want to implement a concrete class de...
#define MESQUITE_BEGIN_NAMESPACE
void * EntityHandle
Opaque EntityHandle type and tag type.
virtual Mesh::EntityHandle operator*() const
Return the handle currently being pointed to by the iterator.
void * EntityHandle
Opaque EntityHandle type and tag type.
virtual int get_geometric_dimension(MsqError &err)
Returns whether this mesh lies in a 2D or 3D coordinate system.
EntityIterator ElementIterator
EntityIterator VertexIterator
MesqPane(COM::Pane *p, bool with_ghost=true)
Construct from a pane.
#define MESQUITE_END_NAMESPACE
virtual void operator++()
Move to the next entity.
EntityHandle ElementHandle
double length(Vector3D *const v, int n)
NVec< 3, double > Vector3D
A class enabling Mesquite calls on Rocmop panes.
size_t vertices_in_topology(EntityTopology)
A Mesquite::Mesh is a collection of mesh elements which are composed of mesh vertices. Intermediate objects are not accessible through this interface (where intermediate objects include things like the faces of a hex, or an element's edges).
virtual void restart()
Moves the iterator back to the first entity in the list.
MyEntityIterator(uint size)
Constructor.
virtual bool is_at_end() const
Check if we are at the end of the entites.
virtual void vertices_get_byte(const VertexHandle *vertex, unsigned char *byte_array, size_t array_size, MsqError &err)
void * TagHandle
Type used to refer to a tag defintion.
void int int REAL REAL REAL *z blockDim dim * ni
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
EntityIterator ElementIterator
Utility for detecting boundaries of a pane.