$extrastylesheet
face_inf_quad4.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 #ifndef LIBMESH_FACE_INF_QUAD4_H
00020 #define LIBMESH_FACE_INF_QUAD4_H
00021 
00022 
00023 #include "libmesh/libmesh_config.h"
00024 
00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00026 
00027 // Local includes
00028 #include "libmesh/face_inf_quad.h"
00029 
00030 // C++ includes
00031 #include <cstddef>
00032 
00033 namespace libMesh
00034 {
00035 
00036 
00037 
00053 class InfQuad4 : public InfQuad
00054 {
00055 public:
00056 
00060   explicit
00061   InfQuad4 (Elem* p=NULL) :
00062     InfQuad(InfQuad4::n_nodes(), p, _nodelinks_data) {}
00063 
00067   unsigned int n_nodes() const { return 4; }
00068 
00072   ElemType type () const { return INFQUAD4; }
00073 
00077   unsigned int n_sub_elem() const { return 1; }
00078 
00082   virtual bool is_vertex(const unsigned int i) const;
00083 
00087   virtual bool is_edge(const unsigned int i) const;
00088 
00092   virtual bool is_face(const unsigned int i) const;
00093 
00094   /*
00095    * @returns true iff the specified (local) node number is on the
00096    * specified side
00097    */
00098   virtual bool is_node_on_side(const unsigned int n,
00099                                const unsigned int s) const;
00100 
00101   /*
00102    * @returns true iff the specified (local) node number is on the
00103    * specified edge (== is_node_on_side in 2D)
00104    */
00105   virtual bool is_node_on_edge(const unsigned int n,
00106                                const unsigned int e) const
00107   { return this->is_node_on_side(n,e); }
00108 
00112   Order default_order() const { return FIRST; }
00113 
00118   UniquePtr<Elem> build_side (const unsigned int i,
00119                               bool proxy) const;
00120 
00121   virtual void connectivity(const unsigned int sf,
00122                             const IOPackage iop,
00123                             std::vector<dof_id_type>& conn) const;
00124 
00131   bool contains_point (const Point& p, Real tol=TOLERANCE) const;
00132 
00137   static const unsigned int side_nodes_map[3][2];
00138 
00139 
00140 protected:
00141 
00145   Node* _nodelinks_data[4];
00146 
00147 
00148 
00149 #ifdef LIBMESH_ENABLE_AMR
00150 
00154   float embedding_matrix (const unsigned int i,
00155                           const unsigned int j,
00156                           const unsigned int k) const
00157   { return _embedding_matrix[i][j][k]; }
00158 
00163   static const float _embedding_matrix[2][4][4];
00164 
00165 #endif
00166 
00167 };
00168 
00169 
00170 } // namespace libMesh
00171 
00172 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00173 
00174 #endif // LIBMESH_FACE_INF_QUAD4_H