1 #include "WriteCGNS.hpp"
2 #include "moab/CN.hpp"
3 #include "MBTagConventions.hpp"
4 #include "MBParallelConventions.h"
5 #include "moab/Interface.hpp"
6 #include "moab/Range.hpp"
7 #include "moab/WriteUtilIface.hpp"
8 #include "moab/FileOptions.hpp"
9 #include "GmshUtil.hpp"
10
11 #include <fstream>
12 #include <map>
13 #include <set>
14
15 #include <iostream>
16
17 namespace moab
18 {
19
20 WriterIface* WriteCGNS::factory( Interface* iface )
21 {
22 return new WriteCGNS( iface );
23 }
24
25 WriteCGNS::WriteCGNS( Interface* impl )
26 : mbImpl( impl ), fileName( NULL ), IndexFile( 0 ), BaseName( NULL ), IndexBase( 0 ), ZoneName( NULL ),
27 IndexZone( 0 ), IndexSection( 0 ), celldim( 0 ), physdim( 0 ), VrtSize( 0 ), EdgeSize( 0 ), FaceSize( 0 ),
28 CellSize( 0 )
29 {
30 impl->query_interface( mWriteIface );
31 IndexCoord[0] = IndexCoord[1] = IndexCoord[2] = 0;
32 isize[0] = isize[1] = isize[2] = 0;
33 }
34
35 WriteCGNS::~WriteCGNS()
36 {
37 mbImpl->release_interface( mWriteIface );
38 }
39
40
41 ErrorCode WriteCGNS::write_file( const char* file_name,
42 const bool overwrite,
43 const FileOptions& ,
44 const EntityHandle* ,
45 const int ,
46 const std::vector< std::string >&,
47 const Tag*,
48 int,
49 int )
50 {
51 ErrorCode rval;
52
53 if( !overwrite )
54 {
55 rval = mWriteIface->check_doesnt_exist( file_name );
56 if( MB_SUCCESS != rval ) return rval;
57 }
58 std::cout << "THE CGNS CONVERSION ONLY WORKS FOR ENTITIES CITED BELOW:";
59 std::cout << "\n -MBVERTEX\n -MBEDGE\n -MBTRI\n -MBQUAD";
60 std::cout << "\n -MBTET\n -MBPYRAMID\n -MBHEX\n";
61
62
63
64 rval = get_vertex_entities( VrtSize, Nodes );
65 if( rval != MB_SUCCESS )
66 {
67 return rval;
68 }
69
70 rval = get_edge_entities( EdgeSize, Edges );
71 if( rval != MB_SUCCESS )
72 {
73 return rval;
74 }
75
76 rval = get_face_entities( FaceSize, Faces );
77 if( rval != MB_SUCCESS )
78 {
79 return rval;
80 }
81
82 rval = get_cell_entities( CellSize, Cells );
83 if( rval != MB_SUCCESS )
84 {
85 return rval;
86 }
87 std::cout << "\nThe Number of Vertex is " << VrtSize << ".\n";
88 std::cout << "The Number of Edges is " << EdgeSize << ".\n";
89 std::cout << "The Number of Faces is " << FaceSize << ".\n";
90 std::cout << "The Number of Cells is " << CellSize << ".\n\n";
91
92
93
94 fileName = file_name;
95 std::cout << fileName << " file is a " << physdim << "-D mesh.\n";
96
97
98 IndexFile = 0;
99
100
101
102
103
104
105
106
107
108 if( cg_open( fileName, CG_MODE_WRITE, &IndexFile ) )
109 {
110 std::cout << "Error opening file\n";
111 cg_error_exit();
112 }
113
114 BaseName = "Cgns Base";
115 if( cg_base_write( IndexFile, BaseName, celldim, physdim, &IndexBase ) )
116 {
117 std::cout << "Error creating CGNS base";
118 }
119
120 ZoneName = "Cgns Zone";
121
122
123
124 isize[0] = VrtSize;
125 isize[1] = CellSize;
126 isize[2] = 0;
127
128
129 if( cg_zone_write( IndexFile, IndexBase, ZoneName, isize, Unstructured, &IndexZone ) )
130 {
131 std::cout << "Error creating CGNS zone\n";
132 cg_error_exit();
133 }
134
135 rval = write_coord_cgns( Nodes );
136 if( rval != MB_SUCCESS )
137 {
138 return rval;
139 }
140
141
142 std::vector< moab::Tag > TagHandles;
143
144 rval = mbImpl->tag_get_tags( TagHandles );
145 if( rval != MB_SUCCESS )
146 {
147 return rval;
148 }
149
150 int NbTags = TagHandles.size();
151 std::cout << "\nThe mesh has " << NbTags << " Tags.\n";
152
153
154
155 std::vector< SetStruct > Sets;
156 Sets.reserve( NbTags );
157
158 rval = set_tag_values( TagHandles, Edges, Faces, Cells, Sets );
159 if( rval != MB_SUCCESS )
160 {
161 std::cout << "Problem to set tag values\n";
162 return rval;
163 }
164
165
166 std::vector< std::vector< cgsize_t > > ConnTable;
167 ConnTable.resize( NbTags );
168
169 std::vector< int > Begin( NbTags, 0 );
170 std::vector< int > End( NbTags, 0 );
171
172
173 cgsize_t BeginSetsIndex = 1;
174 cgsize_t EndSetsIndex;
175 switch( physdim )
176 {
177 case 1:
178 rval = get_conn_table( Edges, Begin, End, TagHandles, Sets, ConnTable );
179 if( rval != MB_SUCCESS )
180 {
181 std::cout << "Problem to fill the connectivity table for 1-D entities\n";
182 return rval;
183 }
184 for( int i = 0; i < NbTags; ++i )
185 {
186 if( Sets[i].IdSet != -1 )
187 {
188 const char* SectionName = Sets[i].TagName.c_str();
189 EndSetsIndex = BeginSetsIndex + Sets[i].NbEdges - 1;
190
191 if( cg_section_write( IndexFile, IndexBase, IndexBase, SectionName, Sets[i].CGNSType,
192 BeginSetsIndex, EndSetsIndex, 0, &ConnTable[i][0], &IndexSection ) )
193 {
194 std::cout << "Issue on writing connectivity - 3-D\n";
195 cg_error_exit();
196 }
197 BeginSetsIndex = EndSetsIndex + 1;
198 }
199 }
200 break;
201 case 2:
202 rval = get_conn_table( Edges, Begin, End, TagHandles, Sets, ConnTable );
203 if( rval != MB_SUCCESS )
204 {
205 std::cout << "Problem to fill the connectivity table for 1-D entities\n";
206 return rval;
207 }
208 rval = get_conn_table( Faces, Begin, End, TagHandles, Sets, ConnTable );
209 if( rval != MB_SUCCESS )
210 {
211 std::cout << "Problem to fill the connectivity table for 2-D entities\n";
212 return rval;
213 }
214 for( int i = 0; i < NbTags; ++i )
215 {
216 if( Sets[i].IdSet != -1 )
217 {
218 const char* SectionName = Sets[i].TagName.c_str();
219 EndSetsIndex = BeginSetsIndex + Sets[i].NbEdges + Sets[i].NbFaces - 1;
220
221 if( cg_section_write( IndexFile, IndexBase, IndexBase, SectionName, Sets[i].CGNSType,
222 BeginSetsIndex, EndSetsIndex, 0, &ConnTable[i][0], &IndexSection ) )
223 {
224 std::cout << "Issue on writing connectivity -- 2-D\n";
225 cg_error_exit();
226 }
227 BeginSetsIndex = EndSetsIndex + 1;
228 }
229 }
230 break;
231 case 3:
232 rval = get_conn_table( Faces, Begin, End, TagHandles, Sets, ConnTable );
233 if( rval != MB_SUCCESS )
234 {
235 std::cout << "Problem to fill the connectivity table for 2-D entities\n";
236 return rval;
237 }
238 rval = get_conn_table( Cells, Begin, End, TagHandles, Sets, ConnTable );
239 if( rval != MB_SUCCESS )
240 {
241 std::cout << "Problem to fill the connectivity table for 3-D entities\n";
242 return rval;
243 }
244 for( int i = 0; i < NbTags; ++i )
245 {
246 if( Sets[i].IdSet != -1 )
247 {
248 const char* SectionName = Sets[i].TagName.c_str();
249 EndSetsIndex = BeginSetsIndex + Sets[i].NbFaces + Sets[i].NbCells - 1;
250 std::cout << "BeginSetsIndex = " << BeginSetsIndex << "\tEndSetsIndex = " << EndSetsIndex << "\n";
251
252 if( cg_section_write( IndexFile, IndexBase, IndexBase, SectionName, Sets[i].CGNSType,
253 BeginSetsIndex, EndSetsIndex, 0, &ConnTable[i][0], &IndexSection ) )
254 {
255 std::cout << "Issue on writing connectivity -- 3-D\n";
256 cg_error_exit();
257 }
258 BeginSetsIndex = EndSetsIndex + 1;
259 }
260 }
261 break;
262 default:
263 std::cout << "Issue on Physical dimension\n";
264 return MB_FAILURE;
265 }
266
267
268 if( cg_close( IndexFile ) )
269 {
270 std::cout << "Error closing file\n";
271 cg_error_exit();
272 }
273
274 return MB_SUCCESS;
275 }
276
277
278 ErrorCode WriteCGNS::get_vertex_entities( cgsize_t& VrtSize_, std::vector< moab::EntityHandle >& Nodes_ )
279 {
280 ErrorCode rval;
281
282
283
284 rval = mbImpl->get_entities_by_dimension( 0, 0, Nodes_, false );
285 if( Nodes.size() > 0 )
286 {
287 celldim = 0;
288 physdim = 0;
289
290 VrtSize_ = Nodes_.size();
291 }
292 else
293 {
294 std::cout << "The mesh has not node points.\n";
295 }
296
297 return rval;
298 }
299
300
301 ErrorCode WriteCGNS::get_edge_entities( cgsize_t& EdgeSize_, std::vector< moab::EntityHandle >& Edges_ )
302 {
303 ErrorCode rval;
304
305
306 rval = mbImpl->get_entities_by_dimension( 0, 1, Edges_, false );
307 if( Edges_.size() > 0 )
308 {
309 celldim = 1;
310 physdim = 1;
311
312 EdgeSize_ = Edges_.size();
313 }
314
315 return rval;
316 }
317
318
319 ErrorCode WriteCGNS::get_face_entities( cgsize_t& FaceSize_, std::vector< moab::EntityHandle >& Faces_ )
320 {
321 ErrorCode rval;
322
323
324 rval = mbImpl->get_entities_by_dimension( 0, 2, Faces_, false );
325 if( Faces_.size() )
326 {
327 celldim = 2;
328 physdim = 2;
329
330 FaceSize_ = Faces_.size();
331 }
332
333 return rval;
334 }
335
336
337 ErrorCode WriteCGNS::get_cell_entities( cgsize_t& CellSize_, std::vector< moab::EntityHandle >& Cells_ )
338 {
339 ErrorCode rval;
340
341
342 rval = mbImpl->get_entities_by_dimension( 0, 3, Cells_, false );
343 if( Cells_.size() )
344 {
345 celldim = 3;
346 physdim = 3;
347
348 CellSize_ = Cells_.size();
349 }
350
351 return rval;
352 }
353
354 ErrorCode WriteCGNS::write_coord_cgns( std::vector< moab::EntityHandle >& Nodes_ )
355 {
356 ErrorCode rval;
357
358 const int num_entities = (int)Nodes_.size();
359
360
361 std::vector< double > Coords( 3 * num_entities );
362 std::vector< double >::iterator c = Coords.begin();
363
364
365 std::vector< double > CoordX;
366 std::vector< double > CoordY;
367 std::vector< double > CoordZ;
368
369
370 double SumX = 0;
371 double SumY = 0;
372 double SumZ = 0;
373
374
375 rval = mbImpl->get_coords( &Nodes_[0], num_entities, &Coords[0] );
376 if( MB_SUCCESS != rval )
377 {
378 std::cout << "Error getting coordinates from nodes.\n";
379 return rval;
380 }
381
382
383 CoordX.reserve( Nodes_.size() );
384 CoordY.reserve( Nodes_.size() );
385 CoordZ.reserve( Nodes_.size() );
386
387 for( std::vector< moab::EntityHandle >::iterator i = Nodes_.begin(); i != Nodes_.end(); ++i )
388 {
389 CoordX.push_back( *c );
390 SumX += abs( *c );
391 ++c;
392 CoordY.push_back( *c );
393 SumY += abs( *c );
394 ++c;
395 CoordZ.push_back( *c );
396 SumZ += abs( *c );
397 ++c;
398 }
399
400
401 if( SumX != 0 )
402 {
403 if( cg_coord_write( IndexFile, IndexBase, IndexZone, RealDouble, "CoordinateX", &CoordX[0], &IndexCoord[0] ) )
404 {
405 std::cout << " Error writing X coordinates.\n";
406 cg_error_exit();
407 }
408 }
409
410 if( SumY != 0 )
411 {
412 if( cg_coord_write( IndexFile, IndexBase, IndexZone, RealDouble, "CoordinateY", &CoordY[0], &IndexCoord[1] ) )
413 {
414 std::cout << " Error writing Y coordinates.\n";
415 cg_error_exit();
416 }
417 }
418
419 if( SumZ != 0 )
420 {
421 if( cg_coord_write( IndexFile, IndexBase, IndexZone, RealDouble, "CoordinateZ", &CoordZ[0], &IndexCoord[2] ) )
422 {
423 std::cout << " Error writing Z coordinates.\n";
424 cg_error_exit();
425 }
426 }
427
428
429 Coords.clear();
430 CoordX.clear();
431 CoordY.clear();
432 CoordZ.clear();
433
434
435 return MB_SUCCESS;
436 }
437
438 ErrorCode WriteCGNS::set_tag_values( std::vector< Tag >& TagHandles,
439 std::vector< moab::EntityHandle >& Edges_,
440 std::vector< moab::EntityHandle >& Faces_,
441 std::vector< moab::EntityHandle >& Cells_,
442 std::vector< WriteCGNS::SetStruct >& Sets )
443 {
444 ErrorCode rval;
445
446
447 int NbTags = TagHandles.size();
448
449
450 for( int i = 0; i < NbTags; ++i )
451 {
452
453
454 Sets.push_back( SetStruct() );
455
456
457 rval = mbImpl->tag_get_name( TagHandles[i], Sets[i].TagName );
458 if( rval != MB_SUCCESS )
459 {
460 std::cout << "Problem to get Tag Name\n";
461 return rval;
462 }
463 std::cout << "Tag name= " << Sets[i].TagName << "\n";
464
465
466 rval = get_set_entities( i, TagHandles, Sets );
467 if( rval != MB_SUCCESS )
468 {
469 std::cout << "Problem to get Set entities\n";
470 return rval;
471 }
472
473
474 rval = get_cgns_type( i, Sets );
475 if( rval != MB_SUCCESS )
476 {
477 std::cout << "Problem to get CGNSType\n";
478 return rval;
479 }
480 std::cout << "\tSets[" << i << "].CGNSType= " << Sets[i].CGNSType << "\n";
481
482
483
484
485 if( Sets[i].CGNSType == BAR_2 || Sets[i].CGNSType == TRI_3 || Sets[i].CGNSType == QUAD_4 ||
486 Sets[i].CGNSType == TETRA_4 || Sets[i].CGNSType == PYRA_5 || Sets[i].CGNSType == PENTA_6 ||
487 Sets[i].CGNSType == HEXA_8 || Sets[i].CGNSType == MIXED )
488 {
489
490 if( Sets[i].NbEdges > 0 && physdim < 3 )
491 {
492
493 const std::vector< int > tag_values( Edges_.size(), i );
494 rval = mbImpl->tag_set_data( TagHandles[i], &Edges_[0], Edges_.size(), &tag_values[0] );
495 if( rval != MB_SUCCESS )
496 {
497 std::cout << "Problem to set data for 1-D entities\n";
498 return rval;
499 }
500 }
501 if( Sets[i].NbFaces > 0 && physdim > 1 )
502 {
503
504 const std::vector< int > tag_values( Faces.size(), i );
505 rval = mbImpl->tag_set_data( TagHandles[i], &Faces_[0], Faces_.size(), &tag_values[0] );
506 if( rval != MB_SUCCESS )
507 {
508 std::cout << "Problem to set data for 2-D entities\n";
509 return rval;
510 }
511 }
512 if( Sets[i].NbCells > 0 && physdim > 2 )
513 {
514
515 const std::vector< int > tag_values( Cells.size(), i );
516 rval = mbImpl->tag_set_data( TagHandles[i], &Cells_[0], Cells_.size(), &tag_values[0] );
517 if( rval != MB_SUCCESS )
518 {
519 std::cout << "Problem to set data for 3-D entities\n";
520 return rval;
521 }
522 }
523
524 Sets[i].IdSet = i;
525 }
526 std::cout << "\tSets[" << i << "].IdSet = " << Sets[i].IdSet << "\n\n";
527 }
528 return MB_SUCCESS;
529 }
530
531
532 ErrorCode WriteCGNS::get_set_entities( int i,
533 std::vector< Tag >& TagHandles,
534 std::vector< WriteCGNS::SetStruct >& Sets )
535 {
536 ErrorCode rval;
537
538
539
540 int Number = 0;
541 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBEDGE, &TagHandles[i], 0, 1, Number );
542 if( rval != MB_SUCCESS )
543 {
544 std::cout << "Problem to get the number of entities by type and tag\n";
545 return rval;
546 }
547 Sets[i].NbEntities.push_back( Number );
548 Sets[i].NbEdges += Number;
549 std::cout << "\tNumber of MBEDGE = " << Number << "\n";
550
551
552
553 Number = 0;
554 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBTRI, &TagHandles[i], 0, 1, Number );
555 if( rval != MB_SUCCESS )
556 {
557 std::cout << "Problem to get the number of entities by type and tag\n";
558 return rval;
559 }
560 Sets[i].NbEntities.push_back( Number );
561 Sets[i].NbFaces += Number;
562 std::cout << "\tNumber of MBTRI = " << Number << "\n";
563
564
565
566 Number = 0;
567 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBQUAD, &TagHandles[i], 0, 1, Number );
568 if( rval != MB_SUCCESS )
569 {
570 std::cout << "Problem to get the number of entities by type and tag\n";
571 return rval;
572 }
573 Sets[i].NbEntities.push_back( Number );
574 Sets[i].NbFaces += Number;
575 std::cout << "\tNumber of MBQUAD = " << Number << "\n";
576
577
578
579 Number = 0;
580 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBTET, &TagHandles[i], 0, 1, Number );
581 if( rval != MB_SUCCESS )
582 {
583 std::cout << "Problem to get the number of entities by type and tag\n";
584 return rval;
585 }
586 Sets[i].NbEntities.push_back( Number );
587 Sets[i].NbCells += Number;
588 std::cout << "\tNumber of MBTET = " << Number << "\n";
589
590
591
592 Number = 0;
593 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBPYRAMID, &TagHandles[i], 0, 1, Number );
594 if( rval != MB_SUCCESS )
595 {
596 std::cout << "Problem to get the number of entities by type and tag\n";
597 return rval;
598 }
599 Sets[i].NbEntities.push_back( Number );
600 Sets[i].NbCells += Number;
601 std::cout << "\tNumber of MBPYRAMID = " << Number << "\n";
602
603
604
605 Number = 0;
606 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBPRISM, &TagHandles[i], 0, 1, Number );
607 if( rval != MB_SUCCESS )
608 {
609 std::cout << "Problem to get the number of entities by type and tag\n";
610 return rval;
611 }
612 Sets[i].NbEntities.push_back( Number );
613 Sets[i].NbCells += Number;
614 std::cout << "\tNumber of MBPRISM = " << Number << "\n";
615
616
617
618 Number = 0;
619 rval = mbImpl->get_number_entities_by_type_and_tag( 0, MBHEX, &TagHandles[i], 0, 1, Number );
620 if( rval != MB_SUCCESS )
621 {
622 std::cout << "Problem to get the number of entities by type and tag\n";
623 return rval;
624 }
625 Sets[i].NbEntities.push_back( Number );
626 Sets[i].NbCells += Number;
627 std::cout << "\tNumber of MBHEX = " << Number << "\n";
628
629 std::cout << "\tTotal number of Edges = " << Sets[i].NbEdges << "\n";
630 std::cout << "\tTotal number of Faces = " << Sets[i].NbFaces << "\n";
631 std::cout << "\tTotal number of Cells = " << Sets[i].NbCells << "\n";
632
633 return MB_SUCCESS;
634 }
635
636
637 ErrorCode WriteCGNS::get_cgns_type( int i, std::vector< WriteCGNS::SetStruct >& Sets )
638 {
639 std::vector< int > Test;
640 int Sum = 0;
641
642
643
644
645
646 for( int j = 0; j < (int)Sets[i].NbEntities.size(); ++j )
647 {
648 if( Sets[i].NbEntities[j] > 0 )
649 {
650 Test.push_back( 1 );
651 Sum++;
652 }
653 else
654 {
655 Test.push_back( 0 );
656 }
657 }
658
659
660
661
662
663 if( Sum > 1 )
664 {
665 Sets[i].CGNSType = MIXED;
666 }
667 else if( Sum == 1 )
668 {
669 int j = 0;
670 std::cout << "Homogeneous Type\n";
671 while( j < (int)Sets[i].NbEntities.size() && Sets[i].NbEntities[j] != 1 )
672 {
673 ++j;
674 }
675 switch( j )
676 {
677 case 0:
678 Sets[i].CGNSType = BAR_2;
679 break;
680 case 1:
681 Sets[i].CGNSType = TRI_3;
682 break;
683 case 2:
684 Sets[i].CGNSType = QUAD_4;
685 break;
686 case 3:
687 Sets[i].CGNSType = TETRA_4;
688 break;
689 case 4:
690 Sets[i].CGNSType = PYRA_5;
691 break;
692 case 5:
693 Sets[i].CGNSType = PENTA_6;
694 break;
695 case 6:
696 Sets[i].CGNSType = HEXA_8;
697 break;
698 default:
699 std::cout << "It was not possible to identify the CGNSType\n";
700 return MB_FAILURE;
701 }
702 }
703 else
704 {
705 Sets[i].CGNSType = ElementTypeNull;
706 }
707
708
709 Test.clear();
710
711 return MB_SUCCESS;
712 }
713
714
715 ErrorCode WriteCGNS::get_conn_table( std::vector< moab::EntityHandle >& Elements,
716 std::vector< int >& Begin,
717 std::vector< int >& End,
718 std::vector< moab::Tag >& TagHandles,
719 std::vector< WriteCGNS::SetStruct >& Sets,
720 std::vector< std::vector< cgsize_t > >& ConnTable )
721 {
722 ErrorCode rval;
723
724
725
726
727
728 int NbTags = TagHandles.size();
729
730
731
732 for( std::vector< moab::EntityHandle >::iterator i = Elements.begin(); i != Elements.end(); ++i )
733 {
734 int id;
735
736 for( int j = 0; j < NbTags; ++j )
737 {
738
739 if( Sets[j].IdSet != -1 )
740 {
741
742 rval = mbImpl->tag_get_data( TagHandles[j], &*i, 1, &id );
743 if( MB_SUCCESS != rval )
744 {
745 return rval;
746 }
747
748 if( id == j )
749 {
750
751 int num_vtx;
752 const EntityHandle* conn;
753
754 rval = mbImpl->get_connectivity( *i, conn, num_vtx );
755 if( MB_SUCCESS != rval )
756 {
757 return rval;
758 }
759
760
761
762 if( Sets[j].CGNSType == MIXED )
763 {
764 ConnTable[j].push_back( moab_cgns_conv( *i ) );
765
766 Begin[j]++;
767 }
768 End[j] = Begin[j] + num_vtx;
769
770 for( int k = Begin[j]; k < End[j]; ++k )
771 {
772 ConnTable[j].push_back( (cgsize_t)conn[k - Begin[j]] );
773 }
774 Begin[j] = End[j];
775 }
776 }
777 }
778 }
779 return MB_SUCCESS;
780 }
781
782
783 int WriteCGNS::moab_cgns_conv( const EntityHandle handle )
784 {
785 EntityType MoabType = mbImpl->type_from_handle( handle );
786 switch( MoabType )
787 {
788 case MBEDGE:
789 return BAR_2;
790 case MBTRI:
791 return TRI_3;
792 case MBQUAD:
793 return QUAD_4;
794 case MBTET:
795 return TETRA_4;
796 case MBPYRAMID:
797 return PYRA_5;
798 case MBPRISM:
799 return PENTA_6;
800 case MBHEX:
801 return HEXA_8;
802 default:
803 std::cout << "It was not possible to identify the CGNSType\n";
804 return 0;
805 }
806 }
807
808 }