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"
64 #ifdef MSQ_USE_OLD_C_HEADERS
72 #define MESQUITE_BEGIN_NAMESPACE namespace Mesquite{
73 #define MESQUITE_END_NAMESPACE }
128 : _pane(p), _verb(0), _with_ghost(with_ghost){
151 std::cout <<
"MesqPane::get_geometric_dimension\n";
166 size_t& element_count,
167 size_t& vertex_use_count,
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());
201 virtual void get_all_mesh( VertexHandle* vert_array,
size_t vert_len,
202 ElementHandle* elem_array,
size_t elem_len,
203 size_t* elem_conn_offsets,
size_t offset_len,
204 size_t* elem_conn_indices,
size_t index_len,
227 virtual bool vertex_is_fixed(VertexHandle vertex, MsqError &err);
235 virtual void vertices_are_on_boundary(VertexHandle vert_array[],
bool on_bnd[],
236 size_t num_vtx, MsqError &err);
239 virtual void vertices_get_coordinates(
const VertexHandle vert_array[],
240 MsqVertex* coordinates,
244 virtual void vertex_set_coordinates(VertexHandle vertex,
252 virtual void vertex_set_byte (VertexHandle vertex,
253 unsigned char byte, MsqError &err);
255 virtual void vertices_set_byte (VertexHandle *vert_array,
256 unsigned char *byte_array,
257 size_t array_size, MsqError &err);
262 virtual void vertex_get_byte(VertexHandle vertex,
263 unsigned char *byte, MsqError &err);
264 virtual void vertices_get_byte(VertexHandle *vertex,
265 unsigned char *byte_array,
266 size_t array_size, MsqError &err);
272 virtual size_t vertex_get_attached_element_count(VertexHandle vertex,
276 virtual void vertex_get_attached_elements(VertexHandle vertex,
277 ElementHandle* elem_array,
278 size_t sizeof_elem_array,
288 virtual size_t element_get_attached_vertex_count(ElementHandle elem,
291 virtual size_t get_vertex_use_count( ElementHandle* handle_array,
331 virtual void elements_get_attached_vertices(ElementHandle *elem_handles,
333 VertexHandle *vert_handles,
334 size_t &sizeof_vert_handles,
336 size_t &sizeof_csr_data,
341 virtual EntityTopology element_get_topology(ElementHandle entity_handle,
346 virtual void elements_get_topologies(ElementHandle *element_handle_array,
348 size_t num_elements, MsqError &err);
365 virtual TagHandle tag_create(
const msq_std::string& tag_name,
366 TagType type,
unsigned length,
367 const void* default_value,
374 virtual void tag_delete(
TagHandle handle, MsqError& err );
384 virtual TagHandle tag_get(
const msq_std::string& name,
395 virtual void tag_properties(
TagHandle handle,
396 msq_std::string& name_out,
398 unsigned& length_out,
411 virtual void tag_set_element_data(
TagHandle handle,
413 const ElementHandle* elem_array,
414 const void* tag_data,
427 virtual void tag_set_vertex_data (
TagHandle handle,
429 const VertexHandle* node_array,
430 const void* tag_data,
444 virtual void tag_get_element_data(
TagHandle handle,
446 const ElementHandle* elem_array,
460 virtual void tag_get_vertex_data (
TagHandle handle,
462 const VertexHandle* node_array,
471 virtual void release_entity_handles(EntityHandle *handle_array,
472 size_t num_handles, MsqError &err);
479 virtual void release();
483 MAP::Pane_dual_connectivity* _dc;
484 std::vector<bool> _is_border;
485 std::vector<unsigned char> _vertexBytes;
498 msq_std::string name;
502 tagStruct::tagStruct()
503 : size(0), type(0), edata(NULL), ndata(NULL), dval(NULL)
509 std::map<msq_std::string,tagStruct> s_to_t;
517 return TopologyInfo::corners( topo );
544 return (
char*)NULL+
_cur;
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.
A class for iterating through a Panes vertices or elements.
virtual ~MyEntityIterator()
Destructor.
#define MESQUITE_END_NAMESPACE
This file contains the Mesquite mesh interface. Many users will want to implement a concrete class de...
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.
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.
#define MESQUITE_BEGIN_NAMESPACE
MyEntityIterator(uint size)
Constructor.
virtual bool is_at_end() const
Check if we are at the end of the entites.
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.