cell_pyramid.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_PYRAMID_H 00021 #define LIBMESH_CELL_PYRAMID_H 00022 00023 // Local includes 00024 #include "libmesh/cell.h" 00025 00026 namespace libMesh 00027 { 00028 00029 00030 00031 00036 // ------------------------------------------------------------ 00037 // Pyramid class definition 00038 class Pyramid : public Cell 00039 { 00040 public: 00041 00047 Pyramid(const unsigned int nn, Elem* p, Node** nodelinkdata); 00048 00053 unsigned int n_nodes() const { return 5; } 00054 00058 unsigned int n_sides() const { return 5; } 00059 00063 unsigned int n_vertices() const { return 5; } 00064 00068 unsigned int n_edges() const { return 8; } 00069 00073 unsigned int n_faces() const { return 5; } 00074 00078 unsigned int n_children() const { return 10; } 00079 00080 /* 00081 * @returns true iff the specified child is on the 00082 * specified side 00083 */ 00084 virtual bool is_child_on_side(const unsigned int c, 00085 const unsigned int s) const; 00086 00087 /* 00088 * @returns true iff the specified edge is on the specified side 00089 */ 00090 virtual bool is_edge_on_side(const unsigned int e, 00091 const unsigned int s) const; 00092 00098 dof_id_type key (const unsigned int s) const; 00099 00104 AutoPtr<Elem> side (const unsigned int i) const; 00105 00106 00107 protected: 00108 00112 Elem* _elemlinks_data[6+(LIBMESH_DIM>3)]; 00113 00114 00115 #ifdef LIBMESH_ENABLE_AMR 00116 00120 unsigned int side_children_matrix (const unsigned int, 00121 const unsigned int) const 00122 { libmesh_error(); return 0; } 00123 00124 #endif 00125 00126 }; 00127 00128 00129 00130 // ------------------------------------------------------------ 00131 // Pyramid class member functions 00132 inline 00133 Pyramid::Pyramid(const unsigned int nn, Elem* p, Node** nodelinkdata) : 00134 Cell(nn, Pyramid::n_sides(), p, _elemlinks_data, nodelinkdata) 00135 { 00136 } 00137 00138 } // namespace libMesh 00139 00140 #endif // LIBMESH_CELL_PYRAMID_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: