$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_HEX8_H 00021 #define LIBMESH_CELL_INF_HEX8_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 00058 class InfHex8 : public InfHex 00059 { 00060 public: 00061 00065 explicit 00066 InfHex8 (Elem* p=NULL); 00067 00071 unsigned int n_nodes() const { return 8; } 00072 00076 ElemType type() const { return INFHEX8; } 00077 00081 unsigned int n_sub_elem() const { return 1; } 00082 00086 virtual bool is_vertex(const unsigned int i) const; 00087 00091 virtual bool is_edge(const unsigned int i) const; 00092 00096 virtual bool is_face(const unsigned int i) const; 00097 00098 /* 00099 * @returns true iff the specified (local) node number is on the 00100 * specified side 00101 */ 00102 virtual bool is_node_on_side(const unsigned int n, 00103 const unsigned int s) const; 00104 00105 /* 00106 * @returns true iff the specified (local) node number is on the 00107 * specified edge 00108 */ 00109 virtual bool is_node_on_edge(const unsigned int n, 00110 const unsigned int e) const; 00111 00115 Order default_order() const { return FIRST; } 00116 00122 UniquePtr<Elem> build_side (const unsigned int i, 00123 bool proxy) const; 00124 00130 UniquePtr<Elem> build_edge (const unsigned int i) const; 00131 00132 virtual void connectivity(const unsigned int sc, 00133 const IOPackage iop, 00134 std::vector<dof_id_type>& conn) const; 00135 00136 unsigned int vtk_element_type (const unsigned int) const 00137 { return 12; } 00138 00144 bool contains_point (const Point& p, Real tol=TOLERANCE) const; 00145 00150 static const unsigned int side_nodes_map[5][4]; 00151 00156 static const unsigned int edge_nodes_map[8][2]; 00157 00158 00159 protected: 00160 00164 Node* _nodelinks_data[8]; 00165 00166 00167 00168 #ifdef LIBMESH_ENABLE_AMR 00169 00173 float embedding_matrix (const unsigned int i, 00174 const unsigned int j, 00175 const unsigned int k) const 00176 { return _embedding_matrix[i][j][k]; } 00177 00182 static const float _embedding_matrix[4][8][8]; 00183 00184 #endif 00185 00186 }; 00187 00188 00189 00190 // ------------------------------------------------------------ 00191 // InfHex8 class member functions 00192 inline 00193 InfHex8::InfHex8(Elem* p) : 00194 InfHex(InfHex8::n_nodes(), p, _nodelinks_data) 00195 { 00196 } 00197 00198 00199 } // namespace libMesh 00200 00201 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00202 00203 #endif // LIBMESH_CELL_INF_HEX8_H