Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cgns2smf.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  *********************************************************************/
28 #include "Rocin.h"
29 #include "roccom.h"
30 
31 #include <fstream>
32 #include <iomanip>
33 #include <iostream>
34 #include <sstream>
35 #include <string>
36 
37 // Linear cells
38 #define VTK_EMPTY_CELL 0
39 #define VTK_VERTEX 1
40 #define VTK_POLY_VERTEX 2
41 #define VTK_LINE 3
42 #define VTK_POLY_LINE 4
43 #define VTK_TRIANGLE 5
44 #define VTK_TRIANGLE_STRIP 6
45 #define VTK_POLYGON 7
46 #define VTK_PIXEL 8
47 #define VTK_QUAD 9
48 #define VTK_TETRA 10
49 #define VTK_VOXEL 11
50 #define VTK_HEXAHEDRON 12
51 #define VTK_WEDGE 13
52 #define VTK_PYRAMID 14
53 #define VTK_PENTAGONAL_PRISM 15
54 #define VTK_HEXAGONAL_PRISM 16
55 
56 // Quadratic, isoparametric cells
57 #define VTK_QUADRATIC_EDGE 21
58 #define VTK_QUADRATIC_TRIANGLE 22
59 #define VTK_QUADRATIC_QUAD 23
60 #define VTK_QUADRATIC_TETRA 24
61 #define VTK_QUADRATIC_HEXAHEDRON 25
62 #define VTK_QUADRATIC_WEDGE 26
63 #define VTK_QUADRATIC_PYRAMID 27
64 
65 // Special class of cells formed by convex group of points
66 #define VTK_CONVEX_POINT_SET 41
67 
68 // Higher order cells in parametric form
69 #define VTK_PARAMETRIC_CURVE 51
70 #define VTK_PARAMETRIC_SURFACE 52
71 #define VTK_PARAMETRIC_TRI_SURFACE 53
72 #define VTK_PARAMETRIC_QUAD_SURFACE 54
73 #define VTK_PARAMETRIC_TETRA_REGION 55
74 #define VTK_PARAMETRIC_HEX_REGION 56
75 
76 
77 #define SwitchOnDataType(dType, funcCall) \
78  switch (dType) { \
79  case COM_CHAR: \
80  case COM_BYTE: \
81  { typedef char TT; \
82  funcCall; } \
83  break; \
84  case COM_UNSIGNED_CHAR: \
85  { typedef unsigned char TT; \
86  funcCall; } \
87  break; \
88  case COM_SHORT: \
89  { typedef short TT; \
90  funcCall; } \
91  break; \
92  case COM_UNSIGNED_SHORT: \
93  { typedef unsigned short TT; \
94  funcCall; } \
95  break; \
96  case COM_INT: \
97  { typedef int TT; \
98  funcCall; } \
99  break; \
100  case COM_UNSIGNED: \
101  { typedef unsigned int TT; \
102  funcCall; } \
103  break; \
104  case COM_LONG: \
105  { typedef long TT; \
106  funcCall; } \
107  break; \
108  case COM_UNSIGNED_LONG: \
109  { typedef unsigned long TT; \
110  funcCall; } \
111  break; \
112  case COM_FLOAT: \
113  { typedef float TT; \
114  funcCall; } \
115  break; \
116  case COM_DOUBLE: \
117  { typedef double TT; \
118  funcCall; } \
119  break; \
120  case COM_LONG_DOUBLE: \
121  { typedef long double TT; \
122  funcCall; } \
123  break; \
124  }
125 
126 using namespace std;
127 
128 struct AttrInfo {
129  std::string m_name;
133  std::string m_units;
134 };
135 
136 struct ConnInfo {
137  std::string m_name;
138  std::string m_type;
141 };
142 
143  bool rocElement2SMF(string rtype, string & etype)
144  {
145  if (rtype == "t3")
146  etype = "f";
147  else if (rtype == "t6")
148  etype = "f6";
149  else if (rtype == "q4")
150  etype = "q";
151  else if (rtype == "q8")
152  etype = "f";
153  else if (rtype == "T4")
154  etype = "x";
155  else if (rtype == "T10")
156  etype = "x10";
157  else if (rtype == "H8")
158  etype = "H8";
159  else if (rtype == "B20")
160  etype = "B20";
161  else if (rtype == "P5")
162  etype = "P5";
163  else if (rtype == "W6")
164  etype = "W6";
165  else if (rtype == "P6")
166  etype = "P6";
167  else
168  {
169  etype = "UNKNOWN";
170  return false;
171  }
172  return true;
173  }
174 
175 template <typename TT>
176 void PrintStructured(const TT** pData, int nComp, int ndims,
177  const int* dims_nodes, int ghost, char loc,
178  std::ostream& out)
179 {
180  const int dims[3] = { dims_nodes[0] - (loc == 'e'),
181  ndims >= 2 ? dims_nodes[1] - (loc == 'e') : 0,
182  ndims >= 3 ? dims_nodes[2] - (loc == 'e') : 0 };
183 
184  const int last[3] = { dims[0] - ghost,
185  ndims >= 2 ? dims[1] - ghost : 0,
186  ndims >= 3 ? dims[2] - ghost : 0 };
187 
188  int c, i, j, k;
189  switch (ndims) {
190  case 1:
191  for (i=ghost; i<last[0]; ++i) {
192  for (c=0; c<nComp; ++c)
193  out << (pData[c] ? pData[c][i] : (TT)-987654321) << ' ';
194  out << std::endl;
195  }
196  break;
197 
198  case 2:
199  for (j=ghost; j<last[1]; ++j)
200  for (i=ghost; i<last[0]; ++i) {
201  for (c=0; c<nComp; ++c)
202  out << (pData[c] ? pData[c][i+j*dims[0]] : (TT)-987654321) << ' ';
203  out << std::endl;
204  }
205  break;
206 
207  case 3:
208  for (k=ghost; k<last[2]; ++k)
209  for (j=ghost; j<last[1]; ++j)
210  for (i=ghost; i<last[0]; ++i) {
211  for (c=0; c<nComp; ++c)
212  out << (pData[c] ? pData[c][i+j*dims[0]+k*dims[0]*dims[1]]
213  : (TT)-987654321) << ' ';
214  out << std::endl;
215  }
216  break;
217  }
218 }
219 
220 template <typename TT>
221 void PrintUnstructured(const TT** pData, int nComp, int size, std::ostream& out)
222 {
223  int c, i;
224  for (i=0; i<size; ++i) {
225  out << "v ";
226  for (c=0; c<nComp; ++c)
227  out << (pData[c] ? pData[c][i] : (TT)-987654321) << ' ';
228  out << std::endl;
229  }
230 }
231 
232 void PrintConn(const int* pConn, const ConnInfo& ci, std::ostream& out)
233 {
234  std::string etype;
235  int nn;
236  if (ci.m_type == "q9")
237  {
238  nn = 8;
239  }
240  else
241  {
242  std::istringstream sin(ci.m_type.substr(1));
243  sin >> nn;
244  }
245  rocElement2SMF(ci.m_type,etype);
246 
247  int ne = ci.m_numElements - ci.m_numGhost;
248 
249  int elem, i;
250  for (elem=0; elem<ne; ++elem) {
251  out << etype;
252  for (i=0; i<nn; ++i)
253  out << ' ' << (pConn[elem+i*ci.m_numElements]);
254  //out << ' ' << (pConn[elem+i*ci.m_numElements] - 1);
255  out << std::endl;
256  }
257 }
258 
259 void COM_print_window(const std::string& wName, const std::string& timeStr,
260  const std::string& file_in, bool mesh_only, std::ofstream & out)
261 {
262  static std::map<int, std::string> DataTypeAsString;
263  static std::map<std::string, int> COM2VTK;
264  if (DataTypeAsString.empty()) {
265  DataTypeAsString[COM_CHAR] = "char";
266  DataTypeAsString[COM_BYTE] = "char";
267  DataTypeAsString[COM_UNSIGNED_CHAR] = "unsigned_char";
268  DataTypeAsString[COM_SHORT] = "short";
269  DataTypeAsString[COM_UNSIGNED_SHORT] = "unsigned_short";
270  DataTypeAsString[COM_INT] = "int";
271  DataTypeAsString[COM_UNSIGNED] = "unsigned_int";
272  DataTypeAsString[COM_LONG] = "long";
273  DataTypeAsString[COM_UNSIGNED_LONG] = "unsigned_long";
274  DataTypeAsString[COM_FLOAT] = "float";
275  DataTypeAsString[COM_DOUBLE] = "double";
276  DataTypeAsString[COM_LONG_DOUBLE] = "double"; // Not really, but...
277  }
278 
279  if (COM2VTK.empty()) {
280  COM2VTK["t3"] = VTK_TRIANGLE;
281  COM2VTK["t6"] = VTK_QUADRATIC_TRIANGLE;
282  COM2VTK["q4"] = VTK_QUAD;
283  COM2VTK["q8"] = VTK_QUADRATIC_QUAD;
284  COM2VTK["q9"] = VTK_QUADRATIC_QUAD;
285  COM2VTK["T4"] = VTK_TETRA;
286  COM2VTK["T10"] = VTK_QUADRATIC_TETRA;
287  COM2VTK["B8"] = VTK_HEXAHEDRON;
288  COM2VTK["H8"] = VTK_HEXAHEDRON;
289  COM2VTK["B20"] = VTK_QUADRATIC_HEXAHEDRON;
290  COM2VTK["P5"] = VTK_PYRAMID;
291  COM2VTK["W6"] = VTK_WEDGE;
292  COM2VTK["P6"] = VTK_WEDGE;
293  }
294 
295 
296 
297  // Obtain the list of panes
298  int nPanes;
299  int* paneIds;
300  COM_get_panes(wName.c_str(), &nPanes, &paneIds);
301 
302  // Obtain the list of attributes
303  int nAttrs; // Number of attributes
304  char* attrStr; // names of attributes separated by spaces
305  COM_get_attributes(wName.c_str(), &nAttrs, &attrStr);
306 
307  // First get the nodal coordinate info.
308  int i;
309  std::string name;
310  std::vector<AttrInfo> attrs(nAttrs+1);
311  attrs[0].m_name = "nc";
312  COM_get_attribute((wName + '.' + attrs[0].m_name).c_str(),
313  &(attrs[0].m_location), &(attrs[0].m_dataType),
314  &(attrs[0].m_numComp), &(attrs[0].m_units));
315 
316  // Then get the basic attribute info.
317  {
318  std::istringstream sin(attrStr);
319  for (i=1; i<nAttrs+1; ++i) {
320  sin >> attrs[i].m_name;
321  COM_get_attribute((wName + '.' + attrs[i].m_name).c_str(),
322  &(attrs[i].m_location), &(attrs[i].m_dataType),
323  &(attrs[i].m_numComp), &(attrs[i].m_units));
324  }
325  }
326 
327  // Eliminate window and pane attributes. Count node and element attributes.
328  std::set<char> locset;
329  std::vector<AttrInfo>::iterator p = attrs.begin();
330  ++p;
331  while (p != attrs.end()) {
332  char loc = (*p).m_location;
333  if (loc == 'w' || loc == 'p') {
334  p = attrs.erase(p);
335  continue;
336  }
337  locset.insert(loc);
338  ++p;
339  }
340 
341 
342  // Loop through the panes to find the meshes
343  for (i=0; i<nPanes; ++i) {
344 
345 
346 
347  out << "# SMF Version 1.1" << std::endl;
348  // out << "Material=" << wName << ", Block=" << i << ", Time: " << timeStr
349  // << "." << std::endl;
350  out << "#ASCII" << std::endl;
351 
352  // Obtain the size of nodes
353  int nNodes; // total number of nodes
354  int ghost; // Number of ghost nodes
355  name = wName + ".nc";
356  COM_get_size(name.c_str(), paneIds[i], &nNodes, &ghost);
357  nNodes -= ghost;
358 
359  // Obtain the connectivity tables
360  int nConn; // Number of connectivity tables
361  char* connNames; // Names of connectivity tables separated by space
362  COM_get_connectivities(wName.c_str(), paneIds[i], &nConn, &connNames);
363 
364  const int* dims = NULL;
365  int ndims, eTotal = 0, eSize = 0;
366  std::vector<ConnInfo> connInfo(nConn);
367  std::vector<std::pair<int, int> > cellTypes;
368  if (nConn == 1 && strncmp(connNames, ":st", 3) == 0) { // Structured mesh
369  name = wName + '.' + connNames;
370  COM_get_size(name.c_str(), paneIds[i], &ndims, &ghost);
371 
372  // Obtain the dimensions (must be a const array) of the pane
373  COM_get_array_const(name.c_str(), paneIds[i], &dims);
374 
375  out << "DATASET STRUCTURED_GRID" << std::endl;
376  out << "DIMENSIONS " << dims[0] - 2 * ghost << " " << dims[1] - 2 * ghost
377  << " " << dims[2] - 2 * ghost << std::endl;
378 
379  eTotal = (dims[0] - 2 * ghost > 1 ? dims[0] - 2 * ghost - 1 : 1)
380  * (dims[1] - 2 * ghost > 1 ? dims[1] - 2 * ghost - 1 : 1)
381  * (dims[2] - 2 * ghost > 1 ? dims[2] - 2 * ghost - 1 : 1);
382  } else { // Unstructured mesh
383  out << "#DATASET UNSTRUCTURED_GRID" << std::endl;
384  // Obtain the sizes of connectivity tables
385  std::istringstream sin(connNames);
386  std::vector<ConnInfo>::iterator c;
387  for (c=connInfo.begin(); c!=connInfo.end(); ++c) {
388  sin >> (*c).m_type;
389  (*c).m_name = wName + '.' + (*c).m_type;
390  (*c).m_type.erase(0, 1);
391  std::string::size_type x = (*c).m_type.find(':', 2);
392  if (x != std::string::npos)
393  (*c).m_type.erase(x);
394 
395  COM_get_size((*c).m_name.c_str(), paneIds[i], &((*c).m_numElements),
396  &((*c).m_numGhost));
397  eTotal += (*c).m_numElements - (*c).m_numGhost;
398 
399  int nn;
400  if ((*c).m_type == "q9")
401  nn = 8;
402  else {
403  std::istringstream sin((*c).m_type.substr(1));
404  sin >> nn;
405  }
406  eSize += ((*c).m_numElements - (*c).m_numGhost) * (nn + 1);
407 
408  cellTypes.push_back(std::pair<int, int>(COM2VTK[(*c).m_type],
409  (*c).m_numElements - (*c).m_numGhost));
410  }
411  }
412 
413  out << "#POINTS " << nNodes << ' ' << DataTypeAsString[attrs[0].m_dataType]
414  << std::endl;
415  const void* pArray[9] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
416  NULL };
417  p = attrs.begin();
418  int comp;
419  for (comp=1; comp<=(*p).m_numComp; ++comp) {
420  std::ostringstream sout;
421  sout << wName << '.' << comp << '-' << (*p).m_name;
422  COM_get_array_const(sout.str().c_str(), paneIds[i], &(pArray[comp-1]));
423  }
424 
425  if (dims != NULL) { // Structured
426  SwitchOnDataType((*p).m_dataType,
427  PrintStructured((const TT**)pArray, (*p).m_numComp,
428  ndims, dims, ghost, (*p).m_location,
429  out));
430  } else {
431  SwitchOnDataType((*p).m_dataType,
432  PrintUnstructured((const TT**)pArray, (*p).m_numComp,
433  nNodes, out));
434  }
435 
436  if (nConn != 1 || strncmp(connNames, ":st", 3) != 0) { // Unstructured mesh
437  out << "#CELLS " << eTotal << ' ' << eSize << std::endl;
438 
439  std::vector<ConnInfo>::iterator c;
440  for (c=connInfo.begin(); c!=connInfo.end(); ++c) {
441  const int* pConn = NULL;
442  COM_get_array_const((*c).m_name.c_str(), paneIds[i], &pConn);
443  PrintConn(pConn, *c, out);
444  }
445 
446  out << "#CELL_TYPES " << eTotal << std::endl;
447 
448  // int i;
449 // std::vector<std::pair<int, int> >::iterator t = cellTypes.begin();
450 // while (t != cellTypes.end()) {
451 // for (i=0; i<(*t).second; ++i)
452 // out << (*t).first << std::endl;
453 // ++t;
454 // }
455  }
456 
457  // free the buffer of connNames
458  COM_free_buffer(&connNames);
459 
460  if (!mesh_only && locset.count('n') > 0) {
461  out << "#POINT_DATA " << nNodes << std::endl;
462  for (p=attrs.begin(); p!=attrs.end(); ++p) {
463  if ((*p).m_location != 'n')
464  continue;
465 
466  if ((*p).m_numComp == 1) {
467  COM_get_array_const((wName + '.' + (*p).m_name).c_str(), paneIds[i],
468  &(pArray[0]));
469  out << "#SCALARS ";
470  } else {
471  int comp;
472  for (comp=1; comp<=(*p).m_numComp; ++comp) {
473  std::ostringstream sout;
474  sout << wName << '.' << comp << '-' << (*p).m_name;
475  COM_get_array_const(sout.str().c_str(), paneIds[i],
476  &(pArray[comp-1]));
477  }
478  if ((*p).m_numComp == 3)
479  out << "#VECTORS ";
480  else
481  out << "#TENSORS ";
482  }
483 
484  out << (*p).m_name << ' ' << DataTypeAsString[(*p).m_dataType]
485  << std::endl;
486 
487  if ((*p).m_numComp == 1)
488  out << "#LOOKUP_TABLE default" << std::endl;
489 
490  if (dims != NULL) { // Structured
491  SwitchOnDataType((*p).m_dataType,
492  PrintStructured((const TT**)pArray, (*p).m_numComp,
493  ndims, dims, ghost, (*p).m_location,
494  out));
495  } else {
496  SwitchOnDataType((*p).m_dataType,
497  PrintUnstructured((const TT**)pArray, (*p).m_numComp,
498  nNodes, out));
499  }
500  }
501  }
502 
503  if (!mesh_only && locset.count('e') > 0) {
504  out << std::endl << "#CELL_DATA " << eTotal << std::endl;
505  for (p=attrs.begin(); p!=attrs.end(); ++p) {
506  if ((*p).m_location != 'e')
507  continue;
508 
509  if ((*p).m_numComp == 1) {
510  COM_get_array_const((wName + '.' + (*p).m_name).c_str(), paneIds[i],
511  &(pArray[0]));
512  out << "#SCALARS ";
513  } else {
514  int comp;
515  for (comp=1; comp<=(*p).m_numComp; ++comp) {
516  std::ostringstream sout;
517  sout << wName << '.' << comp << '-' << (*p).m_name;
518  COM_get_array_const(sout.str().c_str(), paneIds[i],
519  &(pArray[comp-1]));
520  }
521  if ((*p).m_numComp == 3)
522  out << "#VECTORS ";
523  else
524  out << "TENSORS ";
525  }
526 
527  out << (*p).m_name << ' ' << DataTypeAsString[(*p).m_dataType]
528  << std::endl;
529 
530  if ((*p).m_numComp == 1)
531  out << "LOOKUP_TABLE default" << std::endl;
532 
533  if (dims != NULL) { // Structured
534  SwitchOnDataType((*p).m_dataType,
535  PrintStructured((const TT**)pArray, (*p).m_numComp,
536  ndims, dims, ghost, (*p).m_location,
537  out));
538  } else {
539  SwitchOnDataType((*p).m_dataType,
540  PrintUnstructured((const TT**)pArray, (*p).m_numComp,
541  eTotal, out));
542  }
543  }
544  }
545  }
546 
547  // Free buffers for pane ids and attribute names
548  COM_free_buffer(&paneIds);
549  COM_free_buffer(&attrStr);
550 }
551 
553 
554 int main(int argc, char* argv[])
555 {
556  COM_init(&argc, &argv);
557  bool fail = false;
558  bool mesh_only = false;
559  //bool read_control = false;
560  //int i;
561  if (std::strcmp(argv[1], "-meshonly") == 0)
562  {
563  mesh_only = true;
564  if (argc != 4)
565  fail = true;
566  }
567  else
568  {
569  if (argc != 3)
570  fail = true;
571  }
572 
573  if (fail)
574  {
575  std::cerr << "Usage: cgns2smf [-meshonly] <cgns file> <smf file>" << std::endl;
576  return 1;
577  }
578 
579  ofstream outfile(argv[argc-1], ios::out);
581 
582  int IN_obtain = COM_get_function_handle("IN.obtain_attribute");
583 
584  COM_set_verbose(0);
586 
587  std::string file_in(argv[argc-2]);
588  std::string win_in(file_in);
589  std::string::size_type st = win_in.find_last_of('/');
590  if (st != std::string::npos)
591  win_in.erase(0, st+1);
592  st = win_in.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
593  if (st != std::string::npos)
594  win_in.erase(st);
595 
596  int len = 15;
597  char timeStr[16] = "";
598 
599 
600  std::cout << "Reading CGNS file(s) " << file_in
601  << " into window " << win_in << std::endl;
602 
603  int IN_read = COM_get_function_handle("IN.read_window");
604  COM_call_function(IN_read, file_in.c_str(), win_in.c_str(), NULL, NULL,
605  timeStr, &len);
606 
607  cerr << "Finished reading CGNS file into window\n";
608  int IN_all = COM_get_attribute_handle((win_in + ".all").c_str());
609  COM_call_function(IN_obtain, &IN_all, &IN_all);
610 
611  std::cout << "Printing surface mesh to..." << argv[argc-1] << std::endl;
612  COM_print_window(win_in, timeStr, file_in, mesh_only,outfile);
613  std::cout << "Done" << std::endl;
614 
615 #ifdef DUMMY_MPI
617 #endif // DUMMY_MPI
618 
619  COM_finalize();
620  return 0;
621 }
622 
623 
624 
625 
626 
627 
#define VTK_WEDGE
Definition: cgns2smf.C:51
void PrintConn(const int *pConn, const ConnInfo &ci, std::ostream &out)
Definition: cgns2smf.C:232
#define VTK_PYRAMID
Definition: cgns2smf.C:52
j indices k indices k
Definition: Indexing.h:6
void COM_get_attribute(const std::string wa_str, char *loc, int *type, int *ncomp, std::string *unit)
Definition: roccom_c++.h:269
int m_numGhost
Definition: cgns2smf.C:140
void PrintUnstructured(const TT **pData, int nComp, int size, std::ostream &out)
Definition: cgns2smf.C:221
int m_dataType
Definition: cgns2smf.C:131
This file contains the prototypes for Roccom API.
void COM_print_window(const char *wName, std::ostream &ostr)
Print a terse human-readable description of this window to this ostream.
Definition: printin.C:64
void PrintStructured(const TT **pData, int nComp, int ndims, const int *dims_nodes, int ghost, char loc, std::ostream &out)
Definition: cgns2smf.C:176
C/C++ Data types.
Definition: roccom_basic.h:129
std::string m_name
Definition: cgns2smf.C:137
void COM_set_verbose(int i)
Definition: roccom_c++.h:543
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
#define VTK_HEXAHEDRON
Definition: cgns2smf.C:50
#define VTK_TETRA
Definition: cgns2smf.C:48
void COM_get_connectivities(const char *wname, int pane_id, int *nc, std::string &names)
Definition: roccom_c++.h:363
#define VTK_QUADRATIC_HEXAHEDRON
Definition: cgns2smf.C:61
std::string m_units
Definition: cgns2smf.C:133
#define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:113
void COM_get_attributes(const char *wname, int *na, std::string &names)
Definition: roccom_c++.h:360
void COM_finalize()
Definition: roccom_c++.h:59
std::string m_type
Definition: cgns2smf.C:138
#define VTK_QUADRATIC_QUAD
Definition: cgns2smf.C:59
NT & sin
Definition: Rocin.h:64
blockLoc i
Definition: read.cpp:79
void int int REAL * x
Definition: read.cpp:74
std::string m_name
Definition: cgns2smf.C:129
void COM_get_size(const char *wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute.
Definition: roccom_c++.h:274
#define VTK_TRIANGLE
Definition: cgns2smf.C:43
#define VTK_QUADRATIC_TETRA
Definition: cgns2smf.C:60
void COM_set_profiling(int i)
Definition: roccom_c++.h:550
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
Rocin creates a series of Roccom windows by reading in a list of files.
int main(int argc, char *argv[])
Definition: blastest.C:94
int m_numComp
Definition: cgns2smf.C:132
#define VTK_QUAD
Definition: cgns2smf.C:47
#define SwitchOnDataType(dType, funcCall)
Definition: cgns2smf.C:77
j indices j
Definition: Indexing.h:6
char m_location
Definition: cgns2smf.C:130
#define VTK_QUADRATIC_TRIANGLE
Definition: cgns2smf.C:58
void COM_init(int *argc, char ***argv)
Definition: roccom_c++.h:57
int m_numElements
Definition: cgns2smf.C:139
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
Definition: roccom_c++.h:350
void COM_free_buffer(int **buf)
Definition: roccom_c++.h:397
bool rocElement2SMF(string rtype, string &etype)
Definition: cgns2smf.C:143
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:111
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
#define COM_EXTERN_MODULE(moduleName)
Definition: roccom_basic.h:116
std::vector< int > paneIds
Array of paneIds.
Definition: hdf2pltV2.C:60