cell_inf_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_INF_HEX8_H 00021 #define LIBMESH_CELL_INF_HEX8_H 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/cell_inf_hex.h" 00029 00030 // C++ includes 00031 #include <cstddef> 00032 00033 namespace libMesh 00034 { 00035 00036 00037 00038 00059 // ------------------------------------------------------------ 00060 // InfHex8 class definition 00061 class InfHex8 : public InfHex 00062 { 00063 public: 00064 00068 explicit 00069 InfHex8 (Elem* p=NULL); 00070 00074 unsigned int n_nodes() const { return 8; } 00075 00079 ElemType type() const { return INFHEX8; } 00080 00084 unsigned int n_sub_elem() const { return 1; } 00085 00089 virtual bool is_vertex(const unsigned int i) const; 00090 00094 virtual bool is_edge(const unsigned int i) const; 00095 00099 virtual bool is_face(const unsigned int i) const; 00100 00101 /* 00102 * @returns true iff the specified (local) node number is on the 00103 * specified side 00104 */ 00105 virtual bool is_node_on_side(const unsigned int n, 00106 const unsigned int s) const; 00107 00108 /* 00109 * @returns true iff the specified (local) node number is on the 00110 * specified edge 00111 */ 00112 virtual bool is_node_on_edge(const unsigned int n, 00113 const unsigned int e) const; 00114 00118 Order default_order() const { return FIRST; } 00119 00125 AutoPtr<Elem> build_side (const unsigned int i, 00126 bool proxy) const; 00127 /* { */ 00128 /* // side() returns an AutoPtr to a DofObject, hence need to cast to Elem* */ 00129 /* AutoPtr<DofObject> ap_dof_object(this->side(i)); */ 00130 /* Elem* side = libmesh_cast_ptr<Elem*>(ap_dof_object.release()); */ 00131 /* libmesh_assert(side); // libmesh_assert that the cast was successful */ 00132 00133 /* AutoPtr<Elem> ap(side); */ 00134 /* return ap; */ 00135 /* } */ 00136 00142 AutoPtr<Elem> build_edge (const unsigned int i) const; 00143 00144 virtual void connectivity(const unsigned int sc, 00145 const IOPackage iop, 00146 std::vector<dof_id_type>& conn) const; 00147 00148 // void tecplot_connectivity(const unsigned int sc, 00149 // std::vector<unsigned int>& conn) const; 00150 00151 // void vtk_connectivity(const unsigned int, 00152 // std::vector<unsigned int>*) const 00153 // { libmesh_error(); } 00154 00155 unsigned int vtk_element_type (const unsigned int) const 00156 { return 12; } 00157 00163 bool contains_point (const Point& p, Real tol=TOLERANCE) const; 00164 00169 static const unsigned int side_nodes_map[5][4]; 00170 00175 static const unsigned int edge_nodes_map[8][2]; 00176 00177 00178 protected: 00179 00183 Node* _nodelinks_data[8]; 00184 00185 00186 00187 #ifdef LIBMESH_ENABLE_AMR 00188 00192 float embedding_matrix (const unsigned int i, 00193 const unsigned int j, 00194 const unsigned int k) const 00195 { return _embedding_matrix[i][j][k]; } 00196 00201 static const float _embedding_matrix[4][8][8]; 00202 00203 #endif 00204 00205 }; 00206 00207 00208 00209 // ------------------------------------------------------------ 00210 // InfHex8 class member functions 00211 inline 00212 InfHex8::InfHex8(Elem* p) : 00213 InfHex(InfHex8::n_nodes(), p, _nodelinks_data) 00214 { 00215 } 00216 00217 00218 } // namespace libMesh 00219 00220 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00221 00222 #endif // LIBMESH_CELL_INF_HEX8_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: