📄 fe_szabab.c
字号:
case 0: case 1: case 2: case 3: return 1; case 4: case 5: case 6: case 7: return 3; case 8: return 9; default: libmesh_error(); } } default: libmesh_error(); } } // The fifth-order Szabo-Babuska shape functions case FIFTH: { switch (t) { // The 1D Szabo-Babuska defined on a three-noded edge case EDGE2: case EDGE3: { switch (n) { case 0: case 1: return 1; case 2: return 4; default: libmesh_error(); } } // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: { switch (n) { case 0: case 1: case 2: return 1; case 3: case 4: case 5: return 4; default: libmesh_error(); } } // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD8: case QUAD9: { switch (n) { case 0: case 1: case 2: case 3: return 1; case 4: case 5: case 6: case 7: return 4; case 8: return 16; default: libmesh_error(); } } default: libmesh_error(); } } // The sixth-order Szabo-Babuska shape functions case SIXTH: { switch (t) { // The 1D Szabo-Babuska defined on a three-noded edge case EDGE2: case EDGE3: { switch (n) { case 0: case 1: return 1; case 2: return 5; default: libmesh_error(); } } // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: { switch (n) { case 0: case 1: case 2: return 1; case 3: case 4: case 5: return 5; default: libmesh_error(); } } // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD8: case QUAD9: { switch (n) { case 0: case 1: case 2: case 3: return 1; case 4: case 5: case 6: case 7: return 5; case 8: return 25; default: libmesh_error(); } } default: libmesh_error(); } } // The seventh-order Szabo-Babuska shape functions case SEVENTH: { switch (t) { // The 1D Szabo-Babuska defined on a three-noded edge case EDGE2: case EDGE3: { switch (n) { case 0: case 1: return 1; case 2: return 6; default: libmesh_error(); } } // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: { switch (n) { case 0: case 1: case 2: return 1; case 3: case 4: case 5: return 6; default: libmesh_error(); } } // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD8: case QUAD9: { switch (n) { case 0: case 1: case 2: case 3: return 1; case 4: case 5: case 6: case 7: return 6; case 8: return 36; default: libmesh_error(); } } default: libmesh_error(); } } default: { libmesh_error(); } } libmesh_error(); return 0;}template <unsigned int Dim, FEFamily T>unsigned int FE<Dim,T>::n_dofs_per_elem(const ElemType t, const Order o){ switch (o) { // The first-order Szabo-Babuska shape functions case FIRST: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 0; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 0; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD8: return 0; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The second-order Szabo-Babuska shape functions case SECOND: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 1; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 0; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 0; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The third-order Szabo-Babuska shape functions case THIRD: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 2; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 1; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 4; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The fourth-order Szabo-Babuska shape functions case FOURTH: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 3; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 3; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 9; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The fifth-order Szabo-Babuska shape functions case FIFTH: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 4; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 6; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 16; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The sixth-order Szabo-Babuska shape functions case SIXTH: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 5; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 10; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 25; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // The seventh-order Szabo-Babuska shape functions case SEVENTH: { switch (t) { // The 1D Szabo-Babuska defined on a two-noded edge case EDGE2: return 6; // The 1D Szabo-Babuska defined on a three-noded edge case EDGE3: return 0; // The 2D Szabo-Babuska defined on a 6-noded triangle case TRI6: return 15; // The 2D tensor-product Szabo-Babuska defined on a // eight-noded quadrilateral. case QUAD8: return 36; // The 2D tensor-product Szabo-Babuska defined on a // nine-noded quadrilateral. case QUAD9: return 0; default: libmesh_error(); } } // Otherwise no DOFS per element default: return 0; }}template <unsigned int Dim, FEFamily T>FEContinuity FE<Dim,T>::get_continuity() const{ return C_ZERO;}template <unsigned int Dim, FEFamily T>bool FE<Dim,T>::is_hierarchic() const{ return false;}template <unsigned int Dim, FEFamily T>bool FE<Dim,T>::shapes_need_reinit() const{ // reinit is only necessary for // approximation orders >= 3 // FIXME - but with p refinement it may be // needed with any base order // if(this->fe_type.order == FIRST || // this->fe_type.order == SECOND) // return false; // else return true;}//--------------------------------------------------------------// Explicit instantiation of member functionsINSTANTIATE_MBRF(1,SZABAB);INSTANTIATE_MBRF(2,SZABAB);INSTANTIATE_MBRF(3,SZABAB);#endif //ENABLE_HIGHER_ORDER_SHAPES
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -