cell_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_HEX_H 00021 #define LIBMESH_CELL_HEX_H 00022 00023 // Local includes 00024 #include "libmesh/cell.h" 00025 00026 namespace libMesh 00027 { 00028 00029 00030 00031 00036 // ------------------------------------------------------------ 00037 // Hex class definition 00038 class Hex : public Cell 00039 { 00040 public: 00041 00046 Hex(const unsigned int nn, Elem* p, Node** nodelinkdata); 00047 00051 unsigned int n_sides() const { return 6; } 00052 00056 unsigned int n_vertices() const { return 8; } 00057 00061 unsigned int n_edges() const { return 12; } 00062 00066 unsigned int n_faces() const { return 6; } 00067 00071 unsigned int n_children() const { return 8; } 00072 00073 /* 00074 * @returns true iff the specified child is on the 00075 * specified side 00076 */ 00077 virtual bool is_child_on_side(const unsigned int c, 00078 const unsigned int s) const; 00079 00080 /* 00081 * @returns true iff the specified edge is on the specified side 00082 */ 00083 virtual bool is_edge_on_side(const unsigned int e, 00084 const unsigned int s) const; 00085 00090 virtual unsigned int opposite_side(const unsigned int s) const; 00091 00097 virtual unsigned int opposite_node(const unsigned int n, 00098 const unsigned int s) const; 00099 00105 dof_id_type key (const unsigned int s) const; 00106 00111 AutoPtr<Elem> side (const unsigned int i) const; 00112 00117 Real quality (const ElemQuality q) const; 00118 00124 std::pair<Real, Real> qual_bounds (const ElemQuality q) const; 00125 00126 00127 00128 protected: 00129 00133 Elem* _elemlinks_data[7+(LIBMESH_DIM>3)]; 00134 00142 static const unsigned short int _second_order_adjacent_vertices[12][2]; 00143 00147 static const unsigned short int _second_order_vertex_child_number[27]; 00148 00152 static const unsigned short int _second_order_vertex_child_index[27]; 00153 }; 00154 00155 00156 00157 // ------------------------------------------------------------ 00158 // Hex class member functions 00159 inline 00160 Hex::Hex(const unsigned int nn, Elem* p, Node** nodelinkdata) : 00161 Cell(nn, Hex::n_sides(), p, _elemlinks_data, nodelinkdata) 00162 { 00163 } 00164 00165 } // namespace libMesh 00166 00167 #endif // LIBMESH_CELL_HEX_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: