$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_CELL_INF_PRISM12_H 00021 #define LIBMESH_CELL_INF_PRISM12_H 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/cell_inf_prism.h" 00029 00030 // C++ includes 00031 #include <cstddef> 00032 00033 namespace libMesh 00034 { 00035 00036 00037 00038 00063 class InfPrism12 : public InfPrism 00064 { 00065 public: 00066 00070 explicit 00071 InfPrism12 (Elem* p=NULL); 00072 00076 unsigned int n_nodes() const { return 12; } 00077 00081 ElemType type () const { return INFPRISM12; } 00082 00086 unsigned int n_sub_elem() const { return 4; } 00087 00091 virtual bool is_vertex(const unsigned int i) const; 00092 00096 virtual bool is_edge(const unsigned int i) const; 00097 00101 virtual bool is_face(const unsigned int i) const; 00102 00103 /* 00104 * @returns true iff the specified (local) node number is on the 00105 * specified side 00106 */ 00107 virtual bool is_node_on_side(const unsigned int n, 00108 const unsigned int s) const; 00109 00110 /* 00111 * @returns true iff the specified (local) node number is on the 00112 * specified edge 00113 */ 00114 virtual bool is_node_on_edge(const unsigned int n, 00115 const unsigned int e) const; 00116 00120 Order default_order() const { return SECOND; } 00121 00127 UniquePtr<Elem> build_side (const unsigned int i, 00128 bool proxy) const; 00129 00135 UniquePtr<Elem> build_edge (const unsigned int i) const; 00136 00137 virtual void connectivity(const unsigned int sc, 00138 const IOPackage iop, 00139 std::vector<dof_id_type>& conn) const; 00140 00144 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00145 { return 2; } 00146 00152 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00153 const unsigned int v) const; 00154 00164 virtual std::pair<unsigned short int, unsigned short int> 00165 second_order_child_vertex (const unsigned int n) const; 00166 00171 static const unsigned int side_nodes_map[4][6]; 00172 00177 static const unsigned int edge_nodes_map[6][3]; 00178 00179 00180 00181 protected: 00182 00186 Node* _nodelinks_data[12]; 00187 00188 00189 #ifdef LIBMESH_ENABLE_AMR 00190 00194 float embedding_matrix (const unsigned int i, 00195 const unsigned int j, 00196 const unsigned int k) const 00197 { return _embedding_matrix[i][j][k]; } 00198 00203 static const float _embedding_matrix[4][12][12]; 00204 00205 #endif 00206 00207 00208 private: 00209 00214 static const unsigned short int _second_order_adjacent_vertices[6][2]; 00215 00219 static const unsigned short int _second_order_vertex_child_number[12]; 00220 00224 static const unsigned short int _second_order_vertex_child_index[12]; 00225 }; 00226 00227 00228 00229 // ------------------------------------------------------------ 00230 // InfPrism12 class member functions 00231 inline 00232 InfPrism12::InfPrism12(Elem* p) : 00233 InfPrism(InfPrism12::n_nodes(), p, _nodelinks_data) 00234 { 00235 } 00236 00237 00238 } // namespace libMesh 00239 00240 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00241 00242 #endif // LIBMESH_CELL_INF_PRISM12_H