@@ -123,6 +123,16 @@ unsigned int hierarchic_n_dofs(const ElemType t, const Order o)
123123 libmesh_fallthrough ();
124124 case HEX27 :
125125 return ((o + 1 )* (o + 1 )* (o + 1 ));
126+ case PRISM6 :
127+ case PRISM15 :
128+ libmesh_assert_less (o , 2 );
129+ libmesh_fallthrough ();
130+ case PRISM18 :
131+ libmesh_assert_less (o , 3 );
132+ libmesh_fallthrough ();
133+ case PRISM20 :
134+ case PRISM21 :
135+ return ((o + 1 )* (o + 1 )* (o + 2 )/2 );
126136 case TRI3 :
127137 libmesh_assert_less (o , 2 );
128138 libmesh_fallthrough ();
@@ -275,6 +285,59 @@ unsigned int hierarchic_n_dofs_at_node(const ElemType t,
275285 libmesh_error_msg ("ERROR: Invalid node ID " << n << " selected for HEX8/20/27!" );
276286 }
277287
288+ case PRISM6 :
289+ libmesh_assert_less (n , 6 );
290+ libmesh_fallthrough ();
291+ case PRISM15 :
292+ libmesh_assert_less (n , 15 );
293+ libmesh_assert_less (o , 2 );
294+ libmesh_fallthrough ();
295+ case PRISM18 :
296+ libmesh_assert_less (n , 18 );
297+ libmesh_assert_less (o , 3 );
298+ libmesh_fallthrough ();
299+ case PRISM20 :
300+ // Internal DoFs are associated with the elem on a Prism20, or
301+ // node 20 on a Prism21
302+ libmesh_assert_less (n , 20 );
303+ libmesh_fallthrough ();
304+ case PRISM21 :
305+ libmesh_assert_less (n , 21 );
306+ switch (n )
307+ {
308+ case 0 :
309+ case 1 :
310+ case 2 :
311+ case 3 :
312+ case 4 :
313+ case 5 :
314+ return 1 ;
315+
316+ case 6 :
317+ case 7 :
318+ case 8 :
319+ case 9 :
320+ case 10 :
321+ case 11 :
322+ case 12 :
323+ case 13 :
324+ case 14 :
325+ return (o - 1 );
326+
327+ case 15 :
328+ case 16 :
329+ case 17 :
330+ return ((o - 1 )* (o - 1 ));
331+
332+ case 18 :
333+ case 19 :
334+ return ((o - 1 )* (o - 2 )/2 );
335+ case 20 :
336+ return ((o - 1 )* (o - 1 )* (o - 2 )/2 );
337+ default :
338+ libmesh_error_msg ("ERROR: Invalid node ID " << n << " selected for TRI!" );
339+ }
340+
278341 case TET4 :
279342 libmesh_assert_less (o , 2 );
280343 libmesh_assert_less (n , 4 );
@@ -353,6 +416,17 @@ unsigned int hierarchic_n_dofs_per_elem(const ElemType t,
353416 return 0 ;
354417 case HEX27 :
355418 return ((o - 1 )* (o - 1 )* (o - 1 ));
419+ case PRISM6 :
420+ case PRISM15 :
421+ libmesh_assert_less (o , 2 );
422+ libmesh_fallthrough ();
423+ case PRISM18 :
424+ libmesh_assert_less (o , 3 );
425+ return 0 ;
426+ case PRISM20 :
427+ return ((o - 1 )* (o - 1 )* (o - 2 )/2 );
428+ case PRISM21 : // Store interior DoFs on interior node
429+ return 0 ;
356430 case TET4 :
357431 libmesh_assert_less (o , 2 );
358432 libmesh_fallthrough ();
0 commit comments