face_quad4.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_FACE_QUAD4_H 00021 #define LIBMESH_FACE_QUAD4_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/face_quad.h" 00027 00028 // C++ includes 00029 #include <cstddef> 00030 00031 namespace libMesh 00032 { 00033 00034 00035 00036 // Forward declarations 00037 00038 00039 00056 // ------------------------------------------------------------ 00057 // Quad4 class definition 00058 class Quad4 : public Quad 00059 { 00060 public: 00061 00065 explicit 00066 Quad4 (Elem* p=NULL) : 00067 Quad(Quad::n_nodes(), p, _nodelinks_data) {} 00068 00072 ElemType type () const { return QUAD4; } 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 00109 /* 00110 * @returns true iff the element map is definitely affine within 00111 * numerical tolerances 00112 */ 00113 virtual bool has_affine_map () const; 00114 00118 Order default_order() const { return FIRST; } 00119 00120 AutoPtr<Elem> build_side (const unsigned int i, 00121 bool proxy) const; 00122 00123 virtual void connectivity(const unsigned int sf, 00124 const IOPackage iop, 00125 std::vector<dof_id_type>& conn) const; 00126 00131 static const unsigned int side_nodes_map[4][2]; 00132 00138 virtual Real volume () const; 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[4][4][4]; 00164 00165 #endif 00166 00167 }; 00168 00169 00170 } // namespace libMesh 00171 00172 #endif // LIBMESH_FACE_QUAD4_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: