$extrastylesheet
cell_inf_prism.h
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2014 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_PRISM_H
00021 #define LIBMESH_CELL_INF_PRISM_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 
00045 class InfPrism : public InfCell
00046 {
00047 public:
00048 
00053   InfPrism(const unsigned int nn, Elem* p, Node** nodelinkdata);
00054 
00055   //   /**
00056   //    * @returns 4 for the base \p s=0 and 2 for side faces.
00057   //    */
00058   //   unsigned int n_children_per_side(const unsigned int s) const;
00059 
00065   unsigned int n_sides() const { return 4; }
00066 
00071   unsigned int n_vertices() const { return 6; }
00072 
00077   unsigned int n_edges() const { return 6; }
00078 
00082   unsigned int n_faces() const { return 4; }
00083 
00087   unsigned int n_children() const { return 4; }
00088 
00089   /*
00090    * @returns true iff the specified child is on the
00091    * specified side
00092    */
00093   virtual bool is_child_on_side(const unsigned int c,
00094                                 const unsigned int s) const;
00095 
00096   /*
00097    * @returns true iff the specified edge is on the specified side
00098    */
00099   virtual bool is_edge_on_side(const unsigned int e,
00100                                const unsigned int s) const;
00101 
00107   dof_id_type key (const unsigned int s) const;
00108 
00113   UniquePtr<Elem> side (const unsigned int i) const;
00114 
00115 
00116 protected:
00117 
00121   Elem* _elemlinks_data[5+(LIBMESH_DIM>3)];
00122 };
00123 
00124 
00125 
00126 // ------------------------------------------------------------
00127 // InfPrism class member functions
00128 inline
00129 InfPrism::InfPrism(const unsigned int nn, Elem* p, Node** nodelinkdata) :
00130   InfCell(nn, InfPrism::n_sides(), p, _elemlinks_data, nodelinkdata)
00131 {
00132 }
00133 
00134 
00135 // inline
00136 // unsigned int InfPrism::n_children_per_side(const unsigned int s) const
00137 // {
00138 //   libmesh_assert_less (s, this->n_sides());
00139 
00140 //   switch (s)
00141 //   {
00142 //     case 0:
00143 //       // every infinite prism has 4 children in the base side
00144 //       return 4;
00145 
00146 //     default:
00147 //       // on infinite faces (sides), only 2 children exist
00148 //       //
00149 //       // note that the face at infinity is already caught by the libmesh_assertion
00150 //       return 2;
00151 //   }
00152 // }
00153 
00154 
00155 } // namespace libMesh
00156 
00157 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00158 
00159 #endif // LIBMESH_CELL_INF_PRISM_H