$extrastylesheet
cell_inf_prism6.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_PRISM6_H
00021 #define LIBMESH_CELL_INF_PRISM6_H
00022 
00023 #include "libmesh/libmesh_config.h"
00024 
00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00026 
00027 // Local includes
00028 #include "libmesh/cell_inf_prism.h"
00029 
00030 // C++ includes
00031 #include <cstddef>
00032 
00033 namespace libMesh
00034 {
00035 
00036 
00037 
00038 
00059 class InfPrism6 : public InfPrism
00060 {
00061 public:
00062 
00066   explicit
00067   InfPrism6  (Elem* p=NULL);
00068 
00072   unsigned int n_nodes() const { return 6; }
00073 
00077   ElemType     type() const { return INFPRISM6; }
00078 
00082   unsigned int n_sub_elem() const { return 1; }
00083 
00087   virtual bool is_vertex(const unsigned int i) const;
00088 
00092   virtual bool is_edge(const unsigned int i) const;
00093 
00097   virtual bool is_face(const unsigned int i) const;
00098 
00099   /*
00100    * @returns true iff the specified (local) node number is on the
00101    * specified side
00102    */
00103   virtual bool is_node_on_side(const unsigned int n,
00104                                const unsigned int s) const;
00105 
00106   /*
00107    * @returns true iff the specified (local) node number is on the
00108    * specified edge
00109    */
00110   virtual bool is_node_on_edge(const unsigned int n,
00111                                const unsigned int e) const;
00112 
00116   Order        default_order() const { return FIRST; }
00117 
00123   UniquePtr<Elem> build_side (const unsigned int i,
00124                               bool proxy) const;
00125 
00131   UniquePtr<Elem> build_edge (const unsigned int i) const;
00132 
00133   virtual void connectivity(const unsigned int sc,
00134                             const IOPackage iop,
00135                             std::vector<dof_id_type>& conn) const;
00136 
00142   bool contains_point (const Point& p, Real tol=TOLERANCE) const;
00143 
00148   static const unsigned int side_nodes_map[4][4];
00149 
00154   static const unsigned int edge_nodes_map[6][2];
00155 
00156 
00157 protected:
00158 
00162   Node* _nodelinks_data[6];
00163 
00164 
00165 
00166 #ifdef LIBMESH_ENABLE_AMR
00167 
00171   float embedding_matrix (const unsigned int i,
00172                           const unsigned int j,
00173                           const unsigned int k) const
00174   { return _embedding_matrix[i][j][k]; }
00175 
00180   static const float _embedding_matrix[4][6][6];
00181 
00182 #endif
00183 
00184 };
00185 
00186 
00187 
00188 // ------------------------------------------------------------
00189 // InfPrism6 class member functions
00190 inline
00191 InfPrism6::InfPrism6(Elem* p) :
00192   InfPrism(InfPrism6::n_nodes(), p, _nodelinks_data)
00193 {
00194 }
00195 
00196 
00197 } // namespace libMesh
00198 
00199 #endif  // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00200 
00201 #endif // LIBMESH_CELL_INF_PRISM6_H