IOSS 2.0
Loading...
Searching...
No Matches
Iotm_TextMeshTopologyMapping.h
Go to the documentation of this file.
1// Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions
2// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3// NTESS, the U.S. Government retains certain rights in this software.
4//
5// See packages/seacas/LICENSE for details
6
7#pragma once
8
9#include "iotm_export.h"
10
11#include "Ioss_CodeTypes.h"
12#include "Ioss_EntityType.h" // for EntityType
13
14#include <cstddef> // for size_t
15#include <cstdint> // for int64_t
16#include <map> // for map, etc
17#include <string> // for string
18#include <unordered_map>
19#include <utility> // for pair
20#include <vector> // for vector
21
22#include <assert.h>
23
27#include "Ioss_Utils.h"
28
30
31namespace Iotm {
32 class IOTM_EXPORT TopologyMapEntry
33 {
34 public:
35 using Ordinal = uint16_t;
36 using Permutation = uint8_t;
37
38 static constexpr Ordinal InvalidOrdinal = 65535;
39 static constexpr Permutation InvalidPermutation = 128;
40
41 using DimensionArray = bool[4];
42
44 : id(Ioss::ElementTopology::get_unique_id(std::string(Ioss::Unknown::name))),
45 topology(Ioss::ElementTopology::factory(std::string(Ioss::Unknown::name))),
46 initialized(false)
47 {
48 set_valid_spatial_dimensions({false, false, false, false});
49 }
50
51 explicit TopologyMapEntry(const std::string &name)
52 : id(Ioss::ElementTopology::get_unique_id(name)),
53 topology(Ioss::ElementTopology::factory(name)), initialized(false)
54 {
55 set_valid_spatial_dimensions({false, false, false, false});
56 }
57
58 TopologyMapEntry(const TopologyMapEntry &topo) = default;
60
61 bool operator==(const Ioss::ElementTopology *topo) const { return topo == topology; }
62
63 bool defined_on_spatial_dimension(const unsigned spatialDim) const
64 {
65 if (spatialDim > 3) {
66 return false;
67 }
68 return validSpatialDimensions[spatialDim];
69 }
70
71 const std::string name() const { return topology->name(); }
72
73 int num_nodes() const { return topology->number_nodes(); }
74
75 bool operator==(const TopologyMapEntry &rhs) const
76 {
77 return id == rhs.id && topology == rhs.topology &&
78 equivalent_valid_spatial_dimensions(rhs.validSpatialDimensions);
79 }
80
81 bool operator!=(const TopologyMapEntry &rhs) const { return !(*this == rhs); }
82
83 int num_face_sides() const
84 {
85 if (topology->is_shell()) {
86 // Only interested in face boundaries, not edges
87 if (topology->parametric_dimension() == 2) {
88 return topology->number_faces();
89 }
90 }
91
92 return topology->number_boundaries();
93 }
94
95 int num_sides() const { return sideTopologies.size(); }
96
97 // Side references are one-based
98 bool valid_side(unsigned side) const
99 {
100 unsigned numSides = num_sides();
101 if (side > 0 && side <= numSides)
102 return true;
103 return false;
104 }
105
106 std::string side_topology_name(unsigned side) const
107 {
108 if (!valid_side(side))
109 return "";
110
111 Ioss::ElementTopology *sideTopology = topology->boundary_type(side);
112 return sideTopology->name();
113 }
114
115 const TopologyMapEntry &side_topology(unsigned side) const
116 {
117 if (!valid_side(side))
118 return *(invalid_topology_factory());
119 return *sideTopologies[side - 1];
120 }
121
122 unsigned side_topology_num_nodes(unsigned side) const
123 {
124 if (!valid_side(side))
125 return 0;
126
127 Ioss::ElementTopology *sideTopology = topology->boundary_type(side);
128 return sideTopology->number_nodes();
129 }
130
131 std::vector<Ordinal> side_topology_node_indices(unsigned side) const
132 {
133 if (!valid_side(side))
134 return std::vector<Ordinal>();
135
136 Ioss::ElementTopology *sideTopology = topology->boundary_type(side);
137 std::vector<Ordinal> elementNodeOrdinalVector(sideTopology->number_nodes());
138
139 Ioss::IntVector connectivity = topology->boundary_connectivity(side);
140
141 for (int i = 0; i < sideTopology->number_nodes(); i++) {
142 elementNodeOrdinalVector[i] = connectivity[i];
143 }
144
145 return elementNodeOrdinalVector;
146 }
147
148 bool is_shell() const { return topology->is_shell(); }
149
150 unsigned num_permutations() const { return topology->permutation()->num_permutations(); }
151
153 {
154 return topology->permutation()->num_positive_permutations();
155 }
156
157 bool is_positive_polarity(Permutation permutation) const
158 {
159 return topology->permutation()->is_positive_polarity(permutation);
160 }
161
162 bool valid_permutation(Permutation permutation) const
163 {
164 return topology->permutation()->valid_permutation(permutation);
165 }
166
168 std::vector<Ordinal> &nodeOrdinalVector) const
169 {
170 return topology->permutation()->fill_permutation_indices(permutation, nodeOrdinalVector);
171 }
172
173 std::vector<Ordinal> permutation_indices(Permutation permutation) const
174 {
175 return topology->permutation()->permutation_indices(permutation);
176 }
177
179 {
180 static TopologyMapEntry entry;
181
182 entry.initialized = true;
183
184 return &entry;
185 }
186
187 // Node with no permutation and no sides
189 {
191
192 if (!entry.initialized) {
193 entry.set_valid_spatial_dimensions({false, true, true, true});
194 entry.set_side_topologies({});
195 entry.initialized = true;
196 }
197
198 return &entry;
199 }
200
201 //***************************************************************************
202 // topology::LINE -- topology::EDGE_RANK
203 // 2 nodes with no sides defined in 2D/3D
204 //***************************************************************************
206 {
208
209 if (!entry.initialized) {
210 entry.set_valid_spatial_dimensions({false, false, true, true});
211 entry.set_side_topologies({});
212 entry.initialized = true;
213 }
214
215 return &entry;
216 }
217
218 //***************************************************************************
219 // topology::LINE 1D -- topology::ELEMENT_RANK
220 // 2 nodes with no sides only defined on 1d problems
221 //***************************************************************************
223 {
225
226 if (!entry.initialized) {
227 entry.set_valid_spatial_dimensions({false, true, false, false});
228 entry.set_side_topologies({});
229 entry.initialized = true;
230 }
231
232 return &entry;
233 }
234
235 //***************************************************************************
236 // topology::LINE -- topology::EDGE_RANK
237 // 3 nodes with no sides defined in 2D/3D
238 //***************************************************************************
240 {
242
243 if (!entry.initialized) {
244 entry.set_valid_spatial_dimensions({false, false, true, true});
245 entry.set_side_topologies({});
246 entry.initialized = true;
247 }
248
249 return &entry;
250 }
251
252 //***************************************************************************
253 // topology::LINE 1D -- topology::ELEMENT_RANK
254 // 3 nodes with no sides only defined on 1d problems
255 //***************************************************************************
257 {
259
260 if (!entry.initialized) {
261 entry.set_valid_spatial_dimensions({false, true, false, false});
262 entry.set_side_topologies({});
263 entry.initialized = true;
264 }
265
266 return &entry;
267 }
268
269 //***************************************************************************
270 // topology::TRIANGLE -- topology::FACE_RANK
271 // defined on spatial dimension 3d
272 // 3, 4, or 6 nodes with 3 edges and no sides
273 //***************************************************************************
275 {
277
278 if (!entry.initialized) {
279 entry.set_valid_spatial_dimensions({false, false, false, true});
280 entry.set_side_topologies({});
281 entry.initialized = true;
282 }
283
284 return &entry;
285 }
286
288 {
290
291 if (!entry.initialized) {
292 entry.set_valid_spatial_dimensions({false, false, false, true});
293 entry.set_side_topologies({});
294 entry.initialized = true;
295 }
296
297 return &entry;
298 }
299
301 {
303
304 if (!entry.initialized) {
305 entry.set_valid_spatial_dimensions({false, false, false, true});
306 entry.set_side_topologies({});
307 entry.initialized = true;
308 }
309
310 return &entry;
311 }
312
313 //***************************************************************************
314 // topology::QUADRILATERAL -- topology::FACE_RANK
315 // defined on spatial dimension 3d
316 // 4, 8, or 9 nodes with 4 edges and no sides
317 //***************************************************************************
319 {
321
322 if (!entry.initialized) {
323 entry.set_valid_spatial_dimensions({false, false, false, true});
324 entry.set_side_topologies({});
325 entry.initialized = true;
326 }
327
328 return &entry;
329 }
330
332 {
334
335 if (!entry.initialized) {
336 entry.set_valid_spatial_dimensions({false, false, false, true});
337 entry.set_side_topologies({});
338 entry.initialized = true;
339 }
340
341 return &entry;
342 }
343
345 {
347
348 if (!entry.initialized) {
349 entry.set_valid_spatial_dimensions({false, false, false, true});
350 entry.set_side_topologies({});
351 entry.initialized = true;
352 }
353
354 return &entry;
355 }
356
358 {
360
361 if (!entry.initialized) {
362 entry.set_valid_spatial_dimensions({false, false, false, true});
363 entry.set_side_topologies({});
364 entry.initialized = true;
365 }
366
367 return &entry;
368 }
369
370 //***************************************************************************
371 // PARTICLE -- topology::ELEMENT_RANK
372 // one node with no sides
373 //***************************************************************************
375 {
377
378 if (!entry.initialized) {
379 entry.set_valid_spatial_dimensions({false, true, true, true});
380 entry.set_side_topologies({});
381 entry.initialized = true;
382 }
383
384 return &entry;
385 }
386
387 //***************************************************************************
388 // topology::BEAM_2 -- topology::ELEMENT_RANK
389 // 2 nodes with 2 sides defined in 2D/3D
390 //***************************************************************************
392 {
394
395 if (!entry.initialized) {
396 entry.set_valid_spatial_dimensions({false, false, true, true});
397 entry.set_side_topologies({line_2_factory(), line_2_factory()});
398 entry.initialized = true;
399 }
400
401 return &entry;
402 }
403
404 //***************************************************************************
405 // topology::BEAM_3 -- topology::ELEMENT_RANK
406 // 3 nodes with 2 sides defined in 2D/3D
407 //***************************************************************************
409 {
411
412 if (!entry.initialized) {
413 entry.set_valid_spatial_dimensions({false, false, true, true});
414 entry.set_side_topologies({line_3_factory(), line_3_factory()});
415 entry.initialized = true;
416 }
417
418 return &entry;
419 }
420
421 //***************************************************************************
422 // topology::SHELL_LINE -- topology::ELEMENT_RANK
423 // only defined on 2d problems
424 // 2 or 3 nodes with two edges and 2 sides
425 //***************************************************************************
426
428 {
430
431 if (!entry.initialized) {
432 entry.set_valid_spatial_dimensions({false, false, true, false});
433 entry.set_side_topologies({line_2_factory(), line_2_factory()});
434 entry.initialized = true;
435 }
436
437 return &entry;
438 }
439
441 {
443
444 if (!entry.initialized) {
445 entry.set_valid_spatial_dimensions({false, false, true, false});
446 entry.set_side_topologies({line_3_factory(), line_3_factory()});
447 entry.initialized = true;
448 }
449
450 return &entry;
451 }
452
453 //***************************************************************************
454 // topology::SPRING -- topology::ELEM_RANK
455 // 2 or 3 nodes with no sides
456 //***************************************************************************
457
459 {
461
462 if (!entry.initialized) {
463 entry.set_valid_spatial_dimensions({false, true, true, true});
464 entry.set_side_topologies({});
465 entry.initialized = true;
466 }
467
468 return &entry;
469 }
470
472 {
474
475 if (!entry.initialized) {
476 entry.set_valid_spatial_dimensions({false, true, true, true});
477 entry.set_side_topologies({});
478 entry.initialized = true;
479 }
480
481 return &entry;
482 }
483
484 //***************************************************************************
485 // topology::TRIANGLE 2D -- topology::ELEMENT_RANK
486 // defined on spatial dimension 2d
487 // 3, 4, or 6 nodes with 3 edges and 3 sides
488 //***************************************************************************
490 {
492
493 if (!entry.initialized) {
494 entry.set_valid_spatial_dimensions({false, false, true, false});
495 entry.set_side_topologies({line_2_factory(), line_2_factory(), line_2_factory()});
496 entry.initialized = true;
497 }
498
499 return &entry;
500 }
501
503 {
505
506 if (!entry.initialized) {
507 entry.set_valid_spatial_dimensions({false, false, true, false});
508 entry.set_side_topologies({line_2_factory(), line_2_factory(), line_2_factory()});
509 entry.initialized = true;
510 }
511
512 return &entry;
513 }
514
516 {
518
519 if (!entry.initialized) {
520 entry.set_valid_spatial_dimensions({false, false, true, false});
521 entry.set_side_topologies({line_3_factory(), line_3_factory(), line_3_factory()});
522 entry.initialized = true;
523 }
524
525 return &entry;
526 }
527
528 //***************************************************************************
529 // topology::QUADRILATERAL 2D -- topology::ELEMENT_RANK
530 // defined on spatial dimension 2d
531 // 4, 8, or 9 nodes with 4 edges and 4 sides
532 //***************************************************************************
533
535 {
537
538 if (!entry.initialized) {
539 entry.set_valid_spatial_dimensions({false, false, true, false});
541 {line_2_factory(), line_2_factory(), line_2_factory(), line_2_factory()});
542 entry.initialized = true;
543 }
544
545 return &entry;
546 }
547
549 {
551
552 if (!entry.initialized) {
553 entry.set_valid_spatial_dimensions({false, false, true, false});
555 {line_3_factory(), line_3_factory(), line_3_factory(), line_3_factory()});
556 entry.initialized = true;
557 }
558
559 return &entry;
560 }
561
563 {
565
566 if (!entry.initialized) {
567 entry.set_valid_spatial_dimensions({false, false, false, true});
569 {line_3_factory(), line_3_factory(), line_3_factory(), line_3_factory()});
570 entry.initialized = true;
571 }
572
573 return &entry;
574 }
575
576 //***************************************************************************
577 // topology::SHELL topology::TRIANGLE -- topology::ELEMENT_RANK
578 // defined on spatial dimension 3d
579 // 3, 4, or 6 nodes with 3 edges and 2 sides
580 //***************************************************************************
581
583 {
585
586 if (!entry.initialized) {
587 entry.set_valid_spatial_dimensions({false, false, false, true});
588 entry.set_side_topologies({tri_3_factory(), tri_3_factory(), line_2_factory(),
589 line_2_factory(), line_2_factory()});
590 entry.initialized = true;
591 }
592
593 return &entry;
594 }
595
597 {
599
600 if (!entry.initialized) {
601 entry.set_valid_spatial_dimensions({false, false, false, true});
602 entry.set_side_topologies({tri_4_factory(), tri_4_factory(), line_2_factory(),
603 line_2_factory(), line_2_factory()});
604 entry.initialized = true;
605 }
606
607 return &entry;
608 }
609
611 {
613
614 if (!entry.initialized) {
615 entry.set_valid_spatial_dimensions({false, false, false, true});
616 entry.set_side_topologies({tri_6_factory(), tri_6_factory(), line_3_factory(),
617 line_3_factory(), line_3_factory()});
618 entry.initialized = true;
619 }
620
621 return &entry;
622 }
623
624 //***************************************************************************
625 // topology::SHELL topology::QUADRILATERAL -- topology::ELEMENT_RANK
626 // defined on spatial dimension 3d
627 // 4, 8, or 9 nodes with 4 edges and 2 sides
628 //***************************************************************************
630 {
632
633 if (!entry.initialized) {
634 entry.set_valid_spatial_dimensions({false, false, false, true});
635 entry.set_side_topologies({quad_4_factory(), quad_4_factory(), line_2_factory(),
636 line_2_factory(), line_2_factory(), line_2_factory()});
637 entry.initialized = true;
638 }
639
640 return &entry;
641 }
642
644 {
646
647 if (!entry.initialized) {
648 entry.set_valid_spatial_dimensions({false, false, false, true});
649 entry.set_side_topologies({quad_8_factory(), quad_8_factory(), line_3_factory(),
650 line_3_factory(), line_3_factory(), line_3_factory()});
651 entry.initialized = true;
652 }
653
654 return &entry;
655 }
656
658 {
660
661 if (!entry.initialized) {
662 entry.set_valid_spatial_dimensions({false, false, false, true});
663 entry.set_side_topologies({quad_9_factory(), quad_9_factory(), line_3_factory(),
664 line_3_factory(), line_3_factory(), line_3_factory()});
665 entry.initialized = true;
666 }
667
668 return &entry;
669 }
670
671 //***************************************************************************
672 // topology::TETRAHEDRON -- topology::ELEMENT_RANK
673 // defined on spatial dimension 3d
674 // 4, 8, 10 or 11 nodes with 4 sides
675 //***************************************************************************
677 {
679
680 if (!entry.initialized) {
681 entry.set_valid_spatial_dimensions({false, false, false, true});
683 {tri_3_factory(), tri_3_factory(), tri_3_factory(), tri_3_factory()});
684 entry.initialized = true;
685 }
686
687 return &entry;
688 }
689
691 {
693
694 if (!entry.initialized) {
695 entry.set_valid_spatial_dimensions({false, false, false, true});
697 {tri_4_factory(), tri_4_factory(), tri_4_factory(), tri_4_factory()});
698 entry.initialized = true;
699 }
700
701 return &entry;
702 }
703
705 {
707
708 if (!entry.initialized) {
709 entry.set_valid_spatial_dimensions({false, false, false, true});
711 {tri_6_factory(), tri_6_factory(), tri_6_factory(), tri_6_factory()});
712 entry.initialized = true;
713 }
714
715 return &entry;
716 }
717
719 {
721
722 if (!entry.initialized) {
723 entry.set_valid_spatial_dimensions({false, false, false, true});
725 {tri_6_factory(), tri_6_factory(), tri_6_factory(), tri_6_factory()});
726 entry.initialized = true;
727 }
728
729 return &entry;
730 }
731
732 //***************************************************************************
733 // topology::PYRAMID -- topology::ELEMENT_RANK
734 // defined on spatial dimension 3d
735 // 5, 13 or 14 nodes with 5 sides
736 //***************************************************************************
738 {
740
741 if (!entry.initialized) {
742 entry.set_valid_spatial_dimensions({false, false, false, true});
744 {tri_3_factory(), tri_3_factory(), tri_3_factory(), tri_3_factory(), quad_4_factory()});
745 entry.initialized = true;
746 }
747
748 return &entry;
749 }
750
752 {
754
755 if (!entry.initialized) {
756 entry.set_valid_spatial_dimensions({false, false, false, true});
758 {tri_6_factory(), tri_6_factory(), tri_6_factory(), tri_6_factory(), quad_8_factory()});
759 entry.initialized = true;
760 }
761
762 return &entry;
763 }
764
766 {
768
769 if (!entry.initialized) {
770 entry.set_valid_spatial_dimensions({false, false, false, true});
772 {tri_6_factory(), tri_6_factory(), tri_6_factory(), tri_6_factory(), quad_9_factory()});
773 entry.initialized = true;
774 }
775
776 return &entry;
777 }
778
779 //***************************************************************************
780 // topology::WEDGE -- topology::ELEMENT_RANK
781 // defined on spatial dimension 3d
782 // 6, 12, 15 or 18 nodes with 5 sides
783 //***************************************************************************
785 {
787
788 if (!entry.initialized) {
789 entry.set_valid_spatial_dimensions({false, false, false, true});
790 entry.set_side_topologies({quad_4_factory(), quad_4_factory(), quad_4_factory(),
791 tri_3_factory(), tri_3_factory()});
792 entry.initialized = true;
793 }
794
795 return &entry;
796 }
797
799 {
801
802 if (!entry.initialized) {
803 entry.set_valid_spatial_dimensions({false, false, false, true});
804 entry.set_side_topologies({quad_6_factory(), quad_6_factory(), quad_6_factory(),
805 tri_6_factory(), tri_6_factory()});
806 entry.initialized = true;
807 }
808
809 return &entry;
810 }
811
813 {
815
816 if (!entry.initialized) {
817 entry.set_valid_spatial_dimensions({false, false, false, true});
818 entry.set_side_topologies({quad_8_factory(), quad_8_factory(), quad_8_factory(),
819 tri_6_factory(), tri_6_factory()});
820 entry.initialized = true;
821 }
822
823 return &entry;
824 }
825
827 {
829
830 if (!entry.initialized) {
831 entry.set_valid_spatial_dimensions({false, false, false, true});
832 entry.set_side_topologies({quad_9_factory(), quad_9_factory(), quad_9_factory(),
833 tri_6_factory(), tri_6_factory()});
834 entry.initialized = true;
835 }
836
837 return &entry;
838 }
839
840 //***************************************************************************
841 // topology::HEXAHEDRON -- topology::ELEMENT_RANK
842 // defined on spatial dimension 3d
843 // 8, 20 or 27 nodes nodes with 6 sides
844 //***************************************************************************
846 {
848
849 if (!entry.initialized) {
850 entry.set_valid_spatial_dimensions({false, false, false, true});
851 entry.set_side_topologies({quad_4_factory(), quad_4_factory(), quad_4_factory(),
852 quad_4_factory(), quad_4_factory(), quad_4_factory()});
853 entry.initialized = true;
854 }
855
856 return &entry;
857 }
858
860 {
862
863 if (!entry.initialized) {
864 entry.set_valid_spatial_dimensions({false, false, false, true});
865 entry.set_side_topologies({quad_8_factory(), quad_8_factory(), quad_8_factory(),
866 quad_8_factory(), quad_8_factory(), quad_8_factory()});
867 entry.initialized = true;
868 }
869
870 return &entry;
871 }
872
874 {
876
877 if (!entry.initialized) {
878 entry.set_valid_spatial_dimensions({false, false, false, true});
879 entry.set_side_topologies({quad_9_factory(), quad_9_factory(), quad_9_factory(),
880 quad_9_factory(), quad_9_factory(), quad_9_factory()});
881 entry.initialized = true;
882 }
883
884 return &entry;
885 }
886
887 private:
888 bool equivalent_valid_spatial_dimensions(const DimensionArray &validSpatialDimensions_) const
889 {
890 return validSpatialDimensions[0] == validSpatialDimensions_[0] &&
891 validSpatialDimensions[1] == validSpatialDimensions_[1] &&
892 validSpatialDimensions[2] == validSpatialDimensions_[2] &&
893 validSpatialDimensions[3] == validSpatialDimensions_[3];
894 }
895
896 void set_valid_spatial_dimensions(const DimensionArray &validSpatialDimensions_)
897 {
898 validSpatialDimensions[0] = validSpatialDimensions_[0];
899 validSpatialDimensions[1] = validSpatialDimensions_[1];
900 validSpatialDimensions[2] = validSpatialDimensions_[2];
901 validSpatialDimensions[3] = validSpatialDimensions_[3];
902 }
903
904 // Create and set TopologyMapEntry based side topologies since some of the implementation
905 // details of the class cannot be automatically constructed from the Ioss_ElementTopology
906 // object .. this will not be necessary if/when they are migrated to Ioss_ElementTopology
907 void set_side_topologies(const std::vector<TopologyMapEntry *> &sideTopologies_)
908 {
909 int numSides = sideTopologies_.size();
910
911 for (int side = 1; side <= numSides; side++) {
912 if (topology->boundary_type(side) != sideTopologies_[side - 1]->topology) {
913 std::ostringstream errmsg;
914 // Would be nice to use fmt:: here, but we need to avoid using fmt includes in public
915 // headers...
916 errmsg << "ERROR: For element topology: " << topology->name() << " on side: " << side
917 << ", expected topology: " << topology->boundary_type(side)->name()
918 << " does not match topology: " << sideTopologies_[side - 1]->topology->name();
919 IOSS_ERROR(errmsg);
920 }
921 }
922 sideTopologies = sideTopologies_;
923 }
924
925 unsigned num_permutation_nodes() const
926 {
927 return topology->permutation()->num_permutation_nodes();
928 }
929
930 unsigned int id{0};
931 Ioss::ElementTopology *topology = nullptr;
932
933 std::vector<TopologyMapEntry *> sideTopologies{};
934
935 // Defines what spatial dimension the topology is valid on
937
938 bool initialized{false};
939 };
940
941 inline std::ostream &operator<<(std::ostream &out, const TopologyMapEntry &t)
942 {
943 return out << t.name();
944 }
945
946 class IOTM_EXPORT IossTopologyMapping : public text_mesh::TopologyMapping<TopologyMapEntry>
947 {
948 public:
950
951 // clang-format off
953 {
954 m_nameToTopology = {
955 {"NODE", *TopologyMapEntry::node_factory()},
956 {"LINE_2", *TopologyMapEntry::line_2_factory()},
957 {"LINE_3", *TopologyMapEntry::line_3_factory()},
958 {"TRI_3", *TopologyMapEntry::tri_3_factory()},
959 {"TRI_4", *TopologyMapEntry::tri_4_factory()},
960 {"TRI_6", *TopologyMapEntry::tri_6_factory()},
961 {"QUAD_4", *TopologyMapEntry::quad_4_factory()},
962 {"QUAD_6", *TopologyMapEntry::quad_6_factory()},
963 {"QUAD_8", *TopologyMapEntry::quad_8_factory()},
964 {"QUAD_9", *TopologyMapEntry::quad_9_factory()},
965 {"PARTICLE", *TopologyMapEntry::particle_factory()},
966 {"LINE_2_1D", *TopologyMapEntry::line_2_1d_factory()},
967 {"LINE_3_1D", *TopologyMapEntry::line_3_1d_factory()},
968 {"BEAM_2", *TopologyMapEntry::beam_2_factory()},
969 {"BEAM_3", *TopologyMapEntry::beam_3_factory()},
970 {"SHELL_LINE_2", *TopologyMapEntry::shell_line_2_factory()},
971 {"SHELL_LINE_3", *TopologyMapEntry::shell_line_3_factory()},
972 {"SPRING_2", *TopologyMapEntry::spring_2_factory()},
973 {"SPRING_3", *TopologyMapEntry::spring_3_factory()},
974 {"TRI_3_2D", *TopologyMapEntry::tri_3_2d_factory()},
975 {"TRI_4_2D", *TopologyMapEntry::tri_4_2d_factory()},
976 {"TRI_6_2D", *TopologyMapEntry::tri_6_2d_factory()},
977 {"QUAD_4_2D", *TopologyMapEntry::quad_4_2d_factory()},
978 {"QUAD_8_2D", *TopologyMapEntry::quad_8_2d_factory()},
979 {"QUAD_9_2D", *TopologyMapEntry::quad_9_2d_factory()},
980 {"SHELL_TRI_3", *TopologyMapEntry::shell_tri_3_factory()},
981 {"SHELL_TRI_4", *TopologyMapEntry::shell_tri_4_factory()},
982 {"SHELL_TRI_6", *TopologyMapEntry::shell_tri_6_factory()},
983 {"SHELL_QUAD_4", *TopologyMapEntry::shell_quad_4_factory()},
984 {"SHELL_QUAD_8", *TopologyMapEntry::shell_quad_8_factory()},
985 {"SHELL_QUAD_9", *TopologyMapEntry::shell_quad_9_factory()},
986 {"TET_4", *TopologyMapEntry::tet_4_factory()},
987 {"TET_8", *TopologyMapEntry::tet_8_factory()},
988 {"TET_10", *TopologyMapEntry::tet_10_factory()},
989 {"TET_11", *TopologyMapEntry::tet_11_factory()},
990 {"PYRAMID_5", *TopologyMapEntry::pyramid_5_factory()},
991 {"PYRAMID_13", *TopologyMapEntry::pyramid_13_factory()},
992 {"PYRAMID_14", *TopologyMapEntry::pyramid_14_factory()},
993 {"WEDGE_6", *TopologyMapEntry::wedge_6_factory()},
994 {"WEDGE_12", *TopologyMapEntry::wedge_12_factory()},
995 {"WEDGE_15", *TopologyMapEntry::wedge_15_factory()},
996 {"WEDGE_18", *TopologyMapEntry::wedge_18_factory()},
997 {"HEX_8", *TopologyMapEntry::hex_8_factory()},
998 {"HEX_20", *TopologyMapEntry::hex_20_factory()},
999 {"HEX_27", *TopologyMapEntry::hex_27_factory()}
1000 };
1001 }
1002 // clang-format on
1003 };
1004} // namespace Iotm
void IOSS_ERROR(const std::ostringstream &errmsg)
Definition Ioss_Utils.h:38
static const char * name
Definition Ioss_Beam2.h:19
static const char * name
Definition Ioss_Beam3.h:19
static const char * name
Definition Ioss_Edge2.h:19
static const char * name
Definition Ioss_Edge3.h:19
Represents an element topology.
Definition Ioss_ElementTopology.h:68
IOSS_NODISCARD const std::string & name() const
Definition Ioss_ElementTopology.h:78
IOSS_NODISCARD ElementTopology * boundary_type(int face_number=0) const
Definition Ioss_ElementTopology.C:302
virtual IOSS_NODISCARD int number_nodes() const =0
static const char * name
Definition Ioss_Hex20.h:19
static const char * name
Definition Ioss_Hex27.h:19
static const char * name
Definition Ioss_Hex8.h:19
static const char * name
Definition Ioss_Node.h:19
static const char * name
Definition Ioss_Pyramid13.h:19
static const char * name
Definition Ioss_Pyramid14.h:19
static const char * name
Definition Ioss_Pyramid5.h:20
static const char * name
Definition Ioss_Quad4.h:19
static const char * name
Definition Ioss_Quad6.h:19
static const char * name
Definition Ioss_Quad8.h:19
static const char * name
Definition Ioss_Quad9.h:19
static const char * name
Definition Ioss_Shell4.h:19
static const char * name
Definition Ioss_Shell8.h:19
static const char * name
Definition Ioss_Shell9.h:19
static const char * name
Definition Ioss_ShellLine2D2.h:19
static const char * name
Definition Ioss_ShellLine2D3.h:19
static const char * name
Definition Ioss_Sphere.h:20
static const char * name
Definition Ioss_Spring2.h:19
static const char * name
Definition Ioss_Spring3.h:19
static const char * name
Definition Ioss_Tet10.h:19
static const char * name
Definition Ioss_Tet11.h:19
static const char * name
Definition Ioss_Tet4.h:20
static const char * name
Definition Ioss_Tet8.h:19
static const char * name
Definition Ioss_Tri3.h:19
static const char * name
Definition Ioss_Tri4.h:20
static const char * name
Definition Ioss_Tri6.h:20
static const char * name
Definition Ioss_TriShell3.h:20
static const char * name
Definition Ioss_TriShell4.h:20
static const char * name
Definition Ioss_TriShell6.h:20
static const char * name
Definition Ioss_Wedge12.h:20
static const char * name
Definition Ioss_Wedge15.h:20
static const char * name
Definition Ioss_Wedge18.h:20
static const char * name
Definition Ioss_Wedge6.h:20
Definition Iotm_TextMeshTopologyMapping.h:947
TopologyMapEntry invalid_topology() const override
Definition Iotm_TextMeshTopologyMapping.h:949
void initialize_topology_map() override
Definition Iotm_TextMeshTopologyMapping.h:952
Definition Iotm_TextMeshTopologyMapping.h:33
static TopologyMapEntry * shell_quad_8_factory()
Definition Iotm_TextMeshTopologyMapping.h:643
static TopologyMapEntry * shell_tri_6_factory()
Definition Iotm_TextMeshTopologyMapping.h:610
static TopologyMapEntry * wedge_18_factory()
Definition Iotm_TextMeshTopologyMapping.h:826
static TopologyMapEntry * spring_2_factory()
Definition Iotm_TextMeshTopologyMapping.h:458
bool operator==(const TopologyMapEntry &rhs) const
Definition Iotm_TextMeshTopologyMapping.h:75
static TopologyMapEntry * tri_4_factory()
Definition Iotm_TextMeshTopologyMapping.h:287
static TopologyMapEntry * pyramid_14_factory()
Definition Iotm_TextMeshTopologyMapping.h:765
static TopologyMapEntry * line_3_1d_factory()
Definition Iotm_TextMeshTopologyMapping.h:256
static TopologyMapEntry * line_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:239
static TopologyMapEntry * quad_8_factory()
Definition Iotm_TextMeshTopologyMapping.h:344
static TopologyMapEntry * tri_3_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:489
std::vector< Ordinal > side_topology_node_indices(unsigned side) const
Definition Iotm_TextMeshTopologyMapping.h:131
static TopologyMapEntry * shell_line_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:440
static TopologyMapEntry * pyramid_5_factory()
Definition Iotm_TextMeshTopologyMapping.h:737
uint8_t Permutation
Definition Iotm_TextMeshTopologyMapping.h:36
static TopologyMapEntry * wedge_6_factory()
Definition Iotm_TextMeshTopologyMapping.h:784
static TopologyMapEntry * shell_tri_4_factory()
Definition Iotm_TextMeshTopologyMapping.h:596
bool equivalent_valid_spatial_dimensions(const DimensionArray &validSpatialDimensions_) const
Definition Iotm_TextMeshTopologyMapping.h:888
static TopologyMapEntry * tet_4_factory()
Definition Iotm_TextMeshTopologyMapping.h:676
unsigned num_positive_permutations() const
Definition Iotm_TextMeshTopologyMapping.h:152
static TopologyMapEntry * beam_2_factory()
Definition Iotm_TextMeshTopologyMapping.h:391
bool defined_on_spatial_dimension(const unsigned spatialDim) const
Definition Iotm_TextMeshTopologyMapping.h:63
bool valid_permutation(Permutation permutation) const
Definition Iotm_TextMeshTopologyMapping.h:162
static TopologyMapEntry * tri_6_factory()
Definition Iotm_TextMeshTopologyMapping.h:300
void set_valid_spatial_dimensions(const DimensionArray &validSpatialDimensions_)
Definition Iotm_TextMeshTopologyMapping.h:896
static TopologyMapEntry * quad_9_factory()
Definition Iotm_TextMeshTopologyMapping.h:357
TopologyMapEntry & operator=(const TopologyMapEntry &topo)=default
static TopologyMapEntry * tet_11_factory()
Definition Iotm_TextMeshTopologyMapping.h:718
bool operator==(const Ioss::ElementTopology *topo) const
Definition Iotm_TextMeshTopologyMapping.h:61
static TopologyMapEntry * hex_27_factory()
Definition Iotm_TextMeshTopologyMapping.h:873
static TopologyMapEntry * quad_4_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:534
bool is_shell() const
Definition Iotm_TextMeshTopologyMapping.h:148
void set_side_topologies(const std::vector< TopologyMapEntry * > &sideTopologies_)
Definition Iotm_TextMeshTopologyMapping.h:907
unsigned num_permutation_nodes() const
Definition Iotm_TextMeshTopologyMapping.h:925
TopologyMapEntry()
Definition Iotm_TextMeshTopologyMapping.h:43
bool fill_permutation_indices(Permutation permutation, std::vector< Ordinal > &nodeOrdinalVector) const
Definition Iotm_TextMeshTopologyMapping.h:167
static TopologyMapEntry * shell_line_2_factory()
Definition Iotm_TextMeshTopologyMapping.h:427
TopologyMapEntry(const TopologyMapEntry &topo)=default
static TopologyMapEntry * shell_quad_4_factory()
Definition Iotm_TextMeshTopologyMapping.h:629
unsigned side_topology_num_nodes(unsigned side) const
Definition Iotm_TextMeshTopologyMapping.h:122
static TopologyMapEntry * line_2_factory()
Definition Iotm_TextMeshTopologyMapping.h:205
int num_sides() const
Definition Iotm_TextMeshTopologyMapping.h:95
TopologyMapEntry(const std::string &name)
Definition Iotm_TextMeshTopologyMapping.h:51
bool valid_side(unsigned side) const
Definition Iotm_TextMeshTopologyMapping.h:98
int num_face_sides() const
Definition Iotm_TextMeshTopologyMapping.h:83
static TopologyMapEntry * wedge_15_factory()
Definition Iotm_TextMeshTopologyMapping.h:812
const std::string name() const
Definition Iotm_TextMeshTopologyMapping.h:71
static TopologyMapEntry * shell_quad_9_factory()
Definition Iotm_TextMeshTopologyMapping.h:657
static TopologyMapEntry * tri_6_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:515
static TopologyMapEntry * pyramid_13_factory()
Definition Iotm_TextMeshTopologyMapping.h:751
static TopologyMapEntry * tet_10_factory()
Definition Iotm_TextMeshTopologyMapping.h:704
static TopologyMapEntry * quad_4_factory()
Definition Iotm_TextMeshTopologyMapping.h:318
int num_nodes() const
Definition Iotm_TextMeshTopologyMapping.h:73
uint16_t Ordinal
Definition Iotm_TextMeshTopologyMapping.h:35
Ioss::ElementTopology * topology
Definition Iotm_TextMeshTopologyMapping.h:931
static TopologyMapEntry * shell_tri_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:582
static TopologyMapEntry * particle_factory()
Definition Iotm_TextMeshTopologyMapping.h:374
static TopologyMapEntry * tri_4_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:502
unsigned int id
Definition Iotm_TextMeshTopologyMapping.h:930
bool is_positive_polarity(Permutation permutation) const
Definition Iotm_TextMeshTopologyMapping.h:157
unsigned num_permutations() const
Definition Iotm_TextMeshTopologyMapping.h:150
static TopologyMapEntry * quad_9_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:562
bool initialized
Definition Iotm_TextMeshTopologyMapping.h:938
static TopologyMapEntry * tet_8_factory()
Definition Iotm_TextMeshTopologyMapping.h:690
static TopologyMapEntry * quad_8_2d_factory()
Definition Iotm_TextMeshTopologyMapping.h:548
bool[4] DimensionArray
Definition Iotm_TextMeshTopologyMapping.h:41
std::string side_topology_name(unsigned side) const
Definition Iotm_TextMeshTopologyMapping.h:106
std::vector< Ordinal > permutation_indices(Permutation permutation) const
Definition Iotm_TextMeshTopologyMapping.h:173
static TopologyMapEntry * invalid_topology_factory()
Definition Iotm_TextMeshTopologyMapping.h:178
static TopologyMapEntry * quad_6_factory()
Definition Iotm_TextMeshTopologyMapping.h:331
const TopologyMapEntry & side_topology(unsigned side) const
Definition Iotm_TextMeshTopologyMapping.h:115
static TopologyMapEntry * tri_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:274
static TopologyMapEntry * node_factory()
Definition Iotm_TextMeshTopologyMapping.h:188
static TopologyMapEntry * hex_20_factory()
Definition Iotm_TextMeshTopologyMapping.h:859
static TopologyMapEntry * beam_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:408
bool operator!=(const TopologyMapEntry &rhs) const
Definition Iotm_TextMeshTopologyMapping.h:81
DimensionArray validSpatialDimensions
Definition Iotm_TextMeshTopologyMapping.h:936
static TopologyMapEntry * hex_8_factory()
Definition Iotm_TextMeshTopologyMapping.h:845
static TopologyMapEntry * spring_3_factory()
Definition Iotm_TextMeshTopologyMapping.h:471
static TopologyMapEntry * line_2_1d_factory()
Definition Iotm_TextMeshTopologyMapping.h:222
static TopologyMapEntry * wedge_12_factory()
Definition Iotm_TextMeshTopologyMapping.h:798
Definition Iotm_TextMeshDataTypes.h:39
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::vector< int > IntVector
Definition Ioss_CodeTypes.h:21
A namespace for the textmesh database format.
Definition Iotm_DatabaseIO.C:95
std::ostream & operator<<(std::ostream &out, const TopologyMapEntry &t)
Definition Iotm_TextMeshTopologyMapping.h:941