cell_inf_prism12.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 00064 // ------------------------------------------------------------ 00065 // InfPrism12 class definition 00066 class InfPrism12 : public InfPrism 00067 { 00068 public: 00069 00073 explicit 00074 InfPrism12 (Elem* p=NULL); 00075 00079 unsigned int n_nodes() const { return 12; } 00080 00084 ElemType type () const { return INFPRISM12; } 00085 00089 unsigned int n_sub_elem() const { return 4; } 00090 00094 virtual bool is_vertex(const unsigned int i) const; 00095 00099 virtual bool is_edge(const unsigned int i) const; 00100 00104 virtual bool is_face(const unsigned int i) const; 00105 00106 /* 00107 * @returns true iff the specified (local) node number is on the 00108 * specified side 00109 */ 00110 virtual bool is_node_on_side(const unsigned int n, 00111 const unsigned int s) const; 00112 00113 /* 00114 * @returns true iff the specified (local) node number is on the 00115 * specified edge 00116 */ 00117 virtual bool is_node_on_edge(const unsigned int n, 00118 const unsigned int e) const; 00119 00123 Order default_order() const { return SECOND; } 00124 00130 AutoPtr<Elem> build_side (const unsigned int i, 00131 bool proxy) const; 00132 00138 AutoPtr<Elem> build_edge (const unsigned int i) const; 00139 00140 virtual void connectivity(const unsigned int sc, 00141 const IOPackage iop, 00142 std::vector<dof_id_type>& conn) const; 00143 00144 // void tecplot_connectivity(const unsigned int sc, 00145 // std::vector<unsigned int>& conn) const; 00146 00147 // void vtk_connectivity(const unsigned int, 00148 // std::vector<unsigned int>*) const 00149 // { libmesh_error(); } 00150 00151 // unsigned int vtk_element_type (const unsigned int) const 00152 // { return 13; } 00153 00157 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00158 { return 2; } 00159 00165 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00166 const unsigned int v) const; 00167 00177 virtual std::pair<unsigned short int, unsigned short int> 00178 second_order_child_vertex (const unsigned int n) const; 00179 00184 static const unsigned int side_nodes_map[4][6]; 00185 00190 static const unsigned int edge_nodes_map[6][3]; 00191 00192 00193 00194 protected: 00195 00199 Node* _nodelinks_data[12]; 00200 00201 00202 #ifdef LIBMESH_ENABLE_AMR 00203 00207 float embedding_matrix (const unsigned int i, 00208 const unsigned int j, 00209 const unsigned int k) const 00210 { return _embedding_matrix[i][j][k]; } 00211 00216 static const float _embedding_matrix[4][12][12]; 00217 00218 #endif 00219 00220 00221 private: 00222 00227 static const unsigned short int _second_order_adjacent_vertices[6][2]; 00228 00232 static const unsigned short int _second_order_vertex_child_number[12]; 00233 00237 static const unsigned short int _second_order_vertex_child_index[12]; 00238 }; 00239 00240 00241 00242 // ------------------------------------------------------------ 00243 // InfPrism12 class member functions 00244 inline 00245 InfPrism12::InfPrism12(Elem* p) : 00246 InfPrism(InfPrism12::n_nodes(), p, _nodelinks_data) 00247 { 00248 } 00249 00250 00251 } // namespace libMesh 00252 00253 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00254 00255 #endif // LIBMESH_CELL_INF_PRISM12_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: