cell_hex20.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_HEX20_H 00021 #define LIBMESH_CELL_HEX20_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 00069 // ------------------------------------------------------------ 00070 // Hex20 class definition 00071 class Hex20 : public Hex 00072 { 00073 public: 00074 00078 explicit 00079 Hex20 (Elem* p=NULL); 00080 00084 ElemType type () const { return HEX20; } 00085 00089 unsigned int n_nodes() const { return 20; } 00090 00094 unsigned int n_sub_elem() const { return 1; } 00095 00099 virtual bool is_vertex(const unsigned int i) const; 00100 00104 virtual bool is_edge(const unsigned int i) const; 00105 00109 virtual bool is_face(const unsigned int i) const; 00110 00111 /* 00112 * @returns true iff the specified (local) node number is on the 00113 * specified side 00114 */ 00115 virtual bool is_node_on_side(const unsigned int n, 00116 const unsigned int s) const; 00117 00118 /* 00119 * @returns true iff the specified (local) node number is on the 00120 * specified edge 00121 */ 00122 virtual bool is_node_on_edge(const unsigned int n, 00123 const unsigned int e) const; 00124 00125 /* 00126 * @returns true iff the element map is definitely affine within 00127 * numerical tolerances 00128 */ 00129 virtual bool has_affine_map () const; 00130 00134 Order default_order() const { return SECOND; } 00135 00140 AutoPtr<Elem> build_side (const unsigned int i, 00141 bool proxy) const; 00142 00147 AutoPtr<Elem> build_edge (const unsigned int i) const; 00148 00149 virtual void connectivity(const unsigned int sc, 00150 const IOPackage iop, 00151 std::vector<dof_id_type>& conn) const; 00152 00156 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00157 { return 2; } 00158 00164 unsigned short int second_order_adjacent_vertex (const unsigned int n, 00165 const unsigned int v) const; 00166 00176 virtual std::pair<unsigned short int, unsigned short int> 00177 second_order_child_vertex (const unsigned int n) const; 00178 00183 static const unsigned int side_nodes_map[6][8]; 00184 00189 static const unsigned int edge_nodes_map[12][3]; 00190 00191 00192 protected: 00193 00197 Node* _nodelinks_data[20]; 00198 00199 00200 00201 #ifdef LIBMESH_ENABLE_AMR 00202 00206 float embedding_matrix (const unsigned int i, 00207 const unsigned int j, 00208 const unsigned int k) const 00209 { return _embedding_matrix[i][j][k]; } 00210 00215 static const float _embedding_matrix[8][20][20]; 00216 00217 #endif 00218 00219 }; 00220 00221 00222 00223 // ------------------------------------------------------------ 00224 // Hex20 class member functions 00225 inline 00226 Hex20::Hex20(Elem* p) : 00227 Hex(Hex20::n_nodes(), p, _nodelinks_data) 00228 { 00229 } 00230 00231 00232 } // namespace libMesh 00233 00234 #endif // LIBMESH_CELL_HEX20_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: