$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_HEX27_H 00021 #define LIBMESH_CELL_HEX27_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 00068 class Hex27 : public Hex 00069 { 00070 public: 00071 00075 explicit 00076 Hex27 (Elem* p=NULL); 00077 00081 ElemType type () const { return HEX27; } 00082 00086 unsigned int n_nodes() const { return 27; } 00087 00091 unsigned int n_sub_elem() const { return 8; } 00092 00096 virtual bool is_vertex(const unsigned int i) const; 00097 00101 virtual bool is_edge(const unsigned int i) const; 00102 00106 virtual bool is_face(const unsigned int i) const; 00107 00108 /* 00109 * @returns true iff the specified (local) node number is on the 00110 * specified side 00111 */ 00112 virtual bool is_node_on_side(const unsigned int n, 00113 const unsigned int s) const; 00114 00115 /* 00116 * @returns true iff the specified (local) node number is on the 00117 * specified edge 00118 */ 00119 virtual bool is_node_on_edge(const unsigned int n, 00120 const unsigned int e) const; 00121 00122 /* 00123 * @returns true iff the element map is definitely affine within 00124 * numerical tolerances 00125 */ 00126 virtual bool has_affine_map () const; 00127 00131 Order default_order() const { return SECOND; } 00132 00142 dof_id_type key (const unsigned int s) const; 00143 00148 UniquePtr<Elem> build_side (const unsigned int i, 00149 bool proxy) const; 00150 00155 UniquePtr<Elem> build_edge (const unsigned int i) const; 00156 00157 virtual void connectivity(const unsigned int sc, 00158 const IOPackage iop, 00159 std::vector<dof_id_type>& conn) const; 00160 00165 unsigned int n_second_order_adjacent_vertices (const unsigned int) const; 00166 00172 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00173 const unsigned int v) const; 00174 00184 virtual std::pair<unsigned short int, unsigned short int> 00185 second_order_child_vertex (const unsigned int n) const; 00186 00191 static const unsigned int side_nodes_map[6][9]; 00192 00197 static const unsigned int edge_nodes_map[12][3]; 00198 00199 00200 protected: 00201 00202 00206 Node* _nodelinks_data[27]; 00207 00208 00209 #ifdef LIBMESH_ENABLE_AMR 00210 00214 float embedding_matrix (const unsigned int i, 00215 const unsigned int j, 00216 const unsigned int k) const 00217 { return _embedding_matrix[i][j][k]; } 00218 00223 static const float _embedding_matrix[8][27][27]; 00224 00225 #endif 00226 00227 00228 private: 00229 00241 static const unsigned short int _remaining_second_order_adjacent_vertices[6][4]; 00242 00243 }; 00244 00245 00246 00247 // ------------------------------------------------------------ 00248 // Hex27 class member functions 00249 inline 00250 Hex27::Hex27(Elem* p) : 00251 Hex(Hex27::n_nodes(), p, _nodelinks_data) 00252 { 00253 } 00254 00255 00256 } // namespace libMesh 00257 00258 #endif // LIBMESH_CELL_HEX27_H