cell_hex8.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_HEX8_H 00021 #define LIBMESH_CELL_HEX8_H 00022 00023 // Local includes 00024 #include "libmesh/cell_hex.h" 00025 00026 // C++ includes 00027 #include <cstddef> 00028 00029 namespace libMesh 00030 { 00031 00032 00033 00034 00055 // ------------------------------------------------------------ 00056 // Hex class definition 00057 class Hex8 : public Hex 00058 { 00059 public: 00060 00064 explicit 00065 Hex8 (Elem* p=NULL); 00066 00070 ElemType type () const { return HEX8; } 00071 00075 unsigned int n_nodes() const { return 8; } 00076 00080 unsigned int n_sub_elem() const { return 1; } 00081 00085 virtual bool is_vertex(const unsigned int i) const; 00086 00090 virtual bool is_edge(const unsigned int i) const; 00091 00095 virtual bool is_face(const unsigned int i) const; 00096 00097 /* 00098 * @returns true iff the specified (local) node number is on the 00099 * specified side 00100 */ 00101 virtual bool is_node_on_side(const unsigned int n, 00102 const unsigned int s) const; 00103 00104 /* 00105 * @returns true iff the specified (local) node number is on the 00106 * specified edge 00107 */ 00108 virtual bool is_node_on_edge(const unsigned int n, 00109 const unsigned int e) const; 00110 00111 /* 00112 * @returns true iff the element map is definitely affine within 00113 * numerical tolerances 00114 */ 00115 virtual bool has_affine_map () const; 00116 00120 Order default_order() const { return FIRST; } 00121 00126 AutoPtr<Elem> build_side (const unsigned int i, 00127 bool proxy) const; 00128 00133 AutoPtr<Elem> build_edge (const unsigned int i) const; 00134 00135 virtual void connectivity(const unsigned int sc, 00136 const IOPackage iop, 00137 std::vector<dof_id_type>& conn) const; 00138 00143 static const unsigned int side_nodes_map[6][4]; 00144 00149 static const unsigned int edge_nodes_map[12][2]; 00150 00155 virtual Real volume () const; 00156 00157 00158 protected: 00159 00163 Node* _nodelinks_data[8]; 00164 00165 00166 00167 #ifdef LIBMESH_ENABLE_AMR 00168 00172 float embedding_matrix (const unsigned int i, 00173 const unsigned int j, 00174 const unsigned int k) const 00175 { return _embedding_matrix[i][j][k]; } 00176 00181 static const float _embedding_matrix[8][8][8]; 00182 00183 #endif 00184 00185 }; 00186 00187 00188 00189 // ------------------------------------------------------------ 00190 // Hex8 class member functions 00191 inline 00192 Hex8::Hex8(Elem* p) : 00193 Hex(Hex8::n_nodes(), p, _nodelinks_data) 00194 { 00195 } 00196 00197 00198 } // namespace libMesh 00199 00200 #endif // LIBMESH_CELL_HEX8_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: