Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MesqPane.C
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 /* ****
24  MesqPane.C
25 
26 *** */
27 
28 #ifndef MESQPANE_C
29 #define MESQPANE_C
30 
31 #include "MesqPane.h"
32 #include "Element_accessors.h"
33 
34 using namespace MOP;
35 using namespace std;
36 namespace Mesquite{
37 
39  _pane = NULL;
40  if(_dc)
41  delete _dc;
42  _dc = NULL;
43  }
44 
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  }
67 
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  }
111 
113  size_t array_size, MsqError &err){
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  }
126 
128  size_t array_size, MsqError &err){
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  }
141 
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  }
148 
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  }
155 
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  }
166 
167  void MesqPane::vertices_are_on_boundary(VertexHandle vert_array[], bool on_bnd[],
168  size_t num_vtx, MsqError &err){
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  }
185 
187  Mesquite::MsqVertex* const &coordinates,
188  const size_t &num_vtx,
189  MsqError &err){
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  }
243 
245  const Vector3D &coordinates,
246  MsqError &err){
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  }
272 
274  unsigned char byte, MsqError &err){
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 }
282 
284  unsigned char *byte_array,
285  size_t array_size, MsqError &err){
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  }
296 
298  unsigned char *byte, MsqError &err){
299  if(_verb)
300  cout << "MesqPane::vertex_get_byte" << endl;
301  int offset = ((char*)vertex - (char*)NULL) - 1;
302  *byte = _vertexBytes[offset];
303  }
304 
306  unsigned char *byte_array,
307  size_t array_size, MsqError &err){
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  }
318 
320  MsqError &err) const{
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  }
330 
332  ElementHandle* elem_array,
333  size_t sizeof_elem_array,
334  MsqError &err){
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  }
348 
350  MsqError &err) const{
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  }
357 
359  size_t num_elems,
360  VertexHandle *vert_handles,
361  size_t &sizeof_vert_handles,
362  size_t *csr_data,
363  size_t &sizeof_csr_data,
364  size_t *csr_offsets,
365  MsqError &err){
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  }
409 
411  size_t num_elems,
412  size_t index_array[],
413  size_t array_size,
414  size_t* offsets,
415  MsqError &err){
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  }
453 
455  MsqError &err) const{
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  }
484 
486  EntityTopology *element_topologies,
487  size_t num_elements, MsqError &err){
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  }
496 
497  void MesqPane::element_tag_create(const string tag_name,
498  int tag_size,
499  TagHandle& tag_handle,
500  MsqError &err)
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; }
512 
515  void* MesqPane::tag_get_handle(const string tag_name, MsqError &err){
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  }
522 
523 
528  void MesqPane::elements_set_tag_data(const size_t num_elements,
529  const TagHandle tag_handle,
530  TagDataPt const tag_data_array,
531  const int& tag_size,
532  MsqError &err)
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  }
555 
560  void MesqPane::elements_get_tag_data(const size_t num_elements,
561  const TagHandle tag_handle,
562  TagDataPt &tag_data_array,
563  int& tag_size,
564  MsqError &err){
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  }
585 
587  size_t num_handles, MsqError &err){
588 
589  if(_verb)
590  cout << "MesqPane::release_entity_handles" << endl;
591  }
592 
594  {
595  if(_verb)
596  cout << "MesqPane::release()" << endl;
597  }
598 
599 } // end namespace Mesquite
600 #endif
601 
602 
603 
604 
605 
606 
Iterates through a set of entities. An EntityIterator is typically obtained via Mesh::vertex_iterator...
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.
Definition: MesqPane.C:305
void invert()
Invert Tetrahedrons.
Definition: MesqPane.C:45
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.
Definition: MesqPane.C:560
virtual ElementIterator * element_iterator(MsqError &err)
Returns a pointer to an element iterator over this Pane.
Definition: MesqPane.C:149
A tag structure required by Mesquite.
Definition: MesqPane.h:487
Used to hold the error state and return it to the application.
EntityTopology
Definition: Mesquite.hpp:92
#define COM_assertion_msg(EX, msg)
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.
Definition: MesqPane.C:186
virtual ~MesqPane()
Destructor.
Definition: MesqPane.C:38
A class for iterating through a Panes vertices or elements.
Definition: MesqPane.h:495
EntityHandle VertexHandle
virtual void * tag_get_handle(const string tag_name, MsqError &err)
Returns the tag handle corresponding to the string.
Definition: MesqPane.C:515
EntityHandle ElementHandle
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual void get_all_elements(ElementHandle *elem_array, size_t array_size, MsqError &err)
Fills array with handles to all elements in the mesh.
Definition: MesqPane.C:127
void * TagHandle
Definition: MesqPane_1_1.h:101
void * EntityHandle
Opaque EntityHandle type and tag type.
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.
Definition: MesqPane.C:167
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
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 &quot;elem_handles&quot; array.
Definition: MesqPane.C:358
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&#39;s global index.
Definition: MesqPane.C:410
virtual size_t element_get_attached_vertex_count(ElementHandle elem, MsqError &err) const
Gets the number of vertices in this element.
Definition: MesqPane.C:349
void * pt
Definition: MesqPane.h:488
virtual bool vertex_is_fixed(VertexHandle vertex, MsqError &err)
Tells wheter the vertex is allowed to be repositioned.
Definition: MesqPane.C:156
void get_coordinates(double &x, double &y, double &z) const
#define MSQ_CHKERR(err)
Mesquite&#39;s Error Checking macro.
virtual void release()
Release a MesqPane from use.
Definition: MesqPane.C:593
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.
Definition: MesqPane.C:485
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.
Definition: MesqPane.C:528
virtual void vertices_set_byte(VertexHandle *vert_array, unsigned char *byte_array, size_t array_size, MsqError &err)
Set mutliple vertex flags.
Definition: MesqPane.C:283
blockLoc i
Definition: read.cpp:79
virtual size_t vertex_get_attached_element_count(VertexHandle vertex, MsqError &err) const
Gets the number of elements attached to this vertex.
Definition: MesqPane.C:319
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.
Definition: MesqPane.C:497
MesqPane.h.
j indices j
Definition: Indexing.h:6
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.
Definition: MesqPane.C:586
virtual VertexIterator * vertex_iterator(MsqError &err)
Returns a pointer to a vertex iterator over this Pane.
Definition: MesqPane.C:142
void set(const double x, const double y, const double z)
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.
Definition: MesqPane.C:331
void int * nj
Definition: read.cpp:74
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
virtual void vertex_get_byte(VertexHandle vertex, unsigned char *byte, MsqError &err)
Retrieve the byte value for the specified vertex.
Definition: MesqPane.C:297
virtual void get_all_vertices(VertexHandle *vert_array, size_t array_size, MsqError &err)
Fills array with handles to all vertices.
Definition: MesqPane.C:112
virtual void vertex_set_byte(VertexHandle vertex, unsigned char byte, MsqError &err)
Set a vertex flag.
Definition: MesqPane.C:273
virtual EntityTopology element_get_topology(ElementHandle entity_handle, MsqError &err) const
Returns the topology of the given entity.
Definition: MesqPane.C:454
virtual void vertex_set_coordinates(VertexHandle vertex, const Vector3D &coordinates, MsqError &err)
Set the Location of a vertex.
Definition: MesqPane.C:244
void init()
Initialize the MesqPane.
Definition: MesqPane.C:68