cell_inf_hex.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_HEX_H 00021 #define LIBMESH_CELL_INF_HEX_H 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/cell_inf.h" 00029 00030 namespace libMesh 00031 { 00032 00033 00034 00035 00046 // ------------------------------------------------------------ 00047 // InfHex class definition 00048 class InfHex : public InfCell 00049 { 00050 public: 00051 00056 InfHex(const unsigned int nn, Elem* p, Node** nodelinkdata); 00057 00058 // /** 00059 // * @returns 4 for the base \p s=0 and 2 for side faces. 00060 // */ 00061 // unsigned int n_children_per_side(const unsigned int s) const; 00062 00068 unsigned int n_sides() const { return 5; } 00069 00074 unsigned int n_vertices() const { return 8; } 00075 00080 unsigned int n_edges() const { return 8; } 00081 00085 unsigned int n_faces() const { return 5; } 00086 00090 unsigned int n_children() const { return 4; } 00091 00092 /* 00093 * @returns true iff the specified child is on the 00094 * specified side 00095 */ 00096 virtual bool is_child_on_side(const unsigned int c, 00097 const unsigned int s) const; 00098 00099 /* 00100 * @returns true iff the specified edge is on the specified side 00101 */ 00102 virtual bool is_edge_on_side(const unsigned int e, 00103 const unsigned int s) const; 00104 00110 dof_id_type key (const unsigned int s) const; 00111 00116 AutoPtr<Elem> side (const unsigned int i) const; 00117 00122 Real quality (const ElemQuality q) const; 00123 00129 std::pair<Real, Real> qual_bounds (const ElemQuality q) const; 00130 00131 00132 00133 protected: 00134 00138 Elem* _elemlinks_data[6+(LIBMESH_DIM>3)]; 00139 00140 00141 00151 static const unsigned short int _second_order_adjacent_vertices[8][2]; 00152 00156 static const unsigned short int _second_order_vertex_child_number[18]; 00157 00161 static const unsigned short int _second_order_vertex_child_index[18]; 00162 }; 00163 00164 00165 00166 // ------------------------------------------------------------ 00167 // InfHex class member functions 00168 inline 00169 InfHex::InfHex(const unsigned int nn, Elem* p, Node** nodelinkdata) : 00170 InfCell(nn, InfHex::n_sides(), p, _elemlinks_data, nodelinkdata) 00171 { 00172 } 00173 00174 00175 // inline 00176 // unsigned int InfHex::n_children_per_side(const unsigned int s) const 00177 // { 00178 // libmesh_assert_less (s, this->n_sides()); 00179 00180 // switch (s) 00181 // { 00182 // case 0: 00183 // // every infinite element has 4 children in the base side 00184 // return 4; 00185 00186 // default: 00187 // // on infinite faces (sides), only 2 children exist 00188 // // 00189 // // note that the face at infinity is already caught by the libmesh_assertion 00190 // return 2; 00191 // } 00192 // } 00193 00194 00195 } // namespace libMesh 00196 00197 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00198 00199 #endif // LIBMESH_CELL_INF_HEX_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: