cell_inf_hex18.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_HEX18_H 00021 #define LIBMESH_CELL_INF_HEX18_H 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/cell_inf_hex.h" 00029 00030 // C++ includes 00031 #include <cstddef> 00032 00033 namespace libMesh 00034 { 00035 00036 00037 00038 00073 // ------------------------------------------------------------ 00074 // InfHex18 class definition 00075 class InfHex18 : public InfHex 00076 { 00077 public: 00078 00082 explicit 00083 InfHex18 (Elem* p=NULL); 00084 00088 unsigned int n_nodes() const { return 18; } 00089 00093 ElemType type () const { return INFHEX18; } 00094 00098 unsigned int n_sub_elem() const { return 4; } 00099 00103 Order default_order() const { return SECOND; } 00104 00108 virtual bool is_vertex(const unsigned int i) const; 00109 00113 virtual bool is_edge(const unsigned int i) const; 00114 00118 virtual bool is_face(const unsigned int i) const; 00119 00120 /* 00121 * @returns true iff the specified (local) node number is on the 00122 * specified side 00123 */ 00124 virtual bool is_node_on_side(const unsigned int n, 00125 const unsigned int s) const; 00126 00127 /* 00128 * @returns true iff the specified (local) node number is on the 00129 * specified edge 00130 */ 00131 virtual bool is_node_on_edge(const unsigned int n, 00132 const unsigned int e) const; 00133 00139 AutoPtr<Elem> build_side (const unsigned int i, 00140 bool proxy) const; 00141 00147 AutoPtr<Elem> build_edge (const unsigned int i) const; 00148 00158 dof_id_type key (const unsigned int s) const; 00159 00160 virtual void connectivity(const unsigned int sc, 00161 const IOPackage iop, 00162 std::vector<dof_id_type>& conn) const; 00163 00164 // void tecplot_connectivity(const unsigned int sc, 00165 // std::vector<unsigned int>& conn) const; 00166 00167 // void vtk_connectivity(const unsigned int, 00168 // std::vector<unsigned int>*) const 00169 // { libmesh_error(); } 00170 00171 unsigned int vtk_element_type (const unsigned int) const 00172 { return 12; } 00173 00177 unsigned int n_second_order_adjacent_vertices (const unsigned int) const; 00178 00184 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00185 const unsigned int v) const; 00186 00196 virtual std::pair<unsigned short int, unsigned short int> 00197 second_order_child_vertex (const unsigned int n) const; 00198 00203 static const unsigned int side_nodes_map[5][9]; 00204 00209 static const unsigned int edge_nodes_map[8][3]; 00210 00211 00212 protected: 00213 00217 Node* _nodelinks_data[18]; 00218 00219 00220 00221 #ifdef LIBMESH_ENABLE_AMR 00222 00226 float embedding_matrix (const unsigned int i, 00227 const unsigned int j, 00228 const unsigned int k) const 00229 { return _embedding_matrix[i][j][k]; } 00230 00235 static const float _embedding_matrix[4][18][18]; 00236 00237 00238 #endif 00239 00240 }; 00241 00242 00243 00244 // ------------------------------------------------------------ 00245 // InfHex18 class member functions 00246 inline 00247 InfHex18::InfHex18(Elem* p) : 00248 InfHex(InfHex18::n_nodes(), p, _nodelinks_data) 00249 { 00250 } 00251 00252 00253 } // namespace libMesh 00254 00255 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00256 00257 00258 #endif // LIBMESH_CELL_INF_HEX18_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: