1 #ifndef OMEGA_H_SIMPLEX_HPP
2 #define OMEGA_H_SIMPLEX_HPP
24 Int elem_dim, Int bdry_dim, Int which_bdry, Int which_vert) {
26 return (elem_dim == 3 ?
29 (which_vert == 0 ? 0 :
30 (which_vert == 1 ? 2 :
31 (which_vert == 2 ? 1 : -1))) :
33 (which_vert == 0 ? 0 :
34 (which_vert == 1 ? 1 :
35 (which_vert == 2 ? 3 : -1))) :
37 (which_vert == 0 ? 1 :
38 (which_vert == 1 ? 2 :
39 (which_vert == 2 ? 3 : -1))) :
41 (which_vert == 0 ? 2 :
42 (which_vert == 1 ? 0 :
43 (which_vert == 2 ? 3 : -1))) : -1)))) :
46 (which_vert == 0 ? 0 :
47 (which_vert == 1 ? 1 : -1)) :
49 (which_vert == 0 ? 1 :
50 (which_vert == 1 ? 2 : -1)) :
52 (which_vert == 0 ? 2 :
53 (which_vert == 1 ? 0 : -1)) :
55 (which_vert == 0 ? 0 :
56 (which_vert == 1 ? 3 : -1)) :
58 (which_vert == 0 ? 1 :
59 (which_vert == 1 ? 3 : -1)) :
61 (which_vert == 0 ? 2 :
62 (which_vert == 1 ? 3 : -1)) : -1)))))) :
64 (which_bdry == 0 ? 0 :
65 (which_bdry == 1 ? 1 :
66 (which_bdry == 2 ? 2 :
67 (which_bdry == 3 ? 3 : -1)))) : -1))) :
71 (which_vert == 0 ? 0 :
72 (which_vert == 1 ? 1 : -1)) :
74 (which_vert == 0 ? 1 :
75 (which_vert == 1 ? 2 : -1)) :
77 (which_vert == 0 ? 2 :
78 (which_vert == 1 ? 0 : -1)) : -1))) :
80 (which_bdry == 0 ? 0 :
81 (which_bdry == 1 ? 1 :
82 (which_bdry == 2 ? 2 : -1))) : -1)) :
85 (which_bdry == 0 ? 0 :
86 (which_bdry == 1 ? 1 : -1)) : -1) : -1)));
93 OMEGA_H_INLINE TemplateUp simplex_up_template(
94 Int elem_dim, Int bdry_dim, Int which_bdry, Int which_up) {
143 switch (which_bdry) {
199 switch (which_bdry) {
232 OMEGA_H_INLINE Int simplex_opposite_template(
233 Int elem_dim, Int bdry_dim, Int which_bdry) {
238 switch (which_bdry) {
250 switch (which_bdry) {
266 switch (which_bdry) {
282 switch (which_bdry) {
292 switch (which_bdry) {
306 return (1 - which_bdry);
313 OMEGA_H_INLINE constexpr Int simplex_degree(Int from_dim, Int to_dim) {
315 return (from_dim == 0 ? 1 :
318 (to_dim == 1 ? 1 : -1)) :
322 (to_dim == 2 ? 1 : -1))) :
327 (to_dim == 3 ? 1 : -1)))) : -1))));
331 constexpr
char const* simplex_singular_name(Int dim) {
332 return (dim == 3 ?
"tet"
333 : (dim == 2 ?
"triangle"
335 : (dim == 0 ?
"vertex" :
nullptr))));
338 constexpr
char const* simplex_plural_name(Int dim) {
341 : (dim == 2 ?
"triangles"
342 : (dim == 1 ?
"edges"
343 : (dim == 0 ?
"vertices" :
nullptr))));
346 template <Int dim, Int low, Int high>
351 static constexpr Int value = 2;
356 static constexpr Int value = 6;
361 static constexpr Int value = 6;
366 static constexpr Int value = 14;
371 static constexpr Int value = 24;
Defines the TemplateUp class.
Definition: amr_mpi_test.cpp:6
constexpr OMEGA_H_INLINE Int simplex_down_template(Int elem_dim, Int bdry_dim, Int which_bdry, Int which_vert)
Relates bounding simplex vertices to the parent simplex's vertices.
Definition: Omega_h_simplex.hpp:23
Definition: Omega_h_simplex.hpp:347