$extrastylesheet
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_FACE_TRI3_H 00021 #define LIBMESH_FACE_TRI3_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/face_tri.h" 00027 00028 // C++ includes 00029 #include <cstddef> 00030 00031 namespace libMesh 00032 { 00033 00034 00035 // Forward declarations 00036 00053 // ------------------------------------------------------------ 00054 // Tri3 class definition 00055 class Tri3 : public Tri 00056 { 00057 public: 00058 00062 explicit 00063 Tri3 (Elem* p=NULL) : 00064 Tri(Tri3::n_nodes(), p, _nodelinks_data) {} 00065 00069 ElemType type () const { return TRI3; } 00070 00074 unsigned int n_sub_elem() const { return 1; } 00075 00079 virtual bool is_vertex(const unsigned int i) const; 00080 00084 virtual bool is_edge(const unsigned int i) const; 00085 00089 virtual bool is_face(const unsigned int i) const; 00090 00091 /* 00092 * @returns true iff the specified (local) node number is on the 00093 * specified side 00094 */ 00095 virtual bool is_node_on_side(const unsigned int n, 00096 const unsigned int s) const; 00097 00098 /* 00099 * @returns true iff the specified (local) node number is on the 00100 * specified edge (== is_node_on_side in 2D) 00101 */ 00102 virtual bool is_node_on_edge(const unsigned int n, 00103 const unsigned int e) const 00104 { return this->is_node_on_side(n,e); } 00105 00106 /* 00107 * @returns true iff the element map is definitely affine within 00108 * numerical tolerances 00109 */ 00110 virtual bool has_affine_map () const { return true; } 00111 00116 virtual bool is_linear () const { return true; } 00117 00121 Order default_order() const { return FIRST; } 00122 00123 UniquePtr<Elem> build_side (const unsigned int i, 00124 bool proxy) const; 00125 00126 virtual void connectivity(const unsigned int sf, 00127 const IOPackage iop, 00128 std::vector<dof_id_type>& conn) const; 00129 00134 static const unsigned int side_nodes_map[3][2]; 00135 00136 00140 virtual Real volume () const; 00141 00147 std::pair<Real, Real> min_and_max_angle() const; 00148 00149 protected: 00150 00154 Node* _nodelinks_data[3]; 00155 00156 00157 00158 #ifdef LIBMESH_ENABLE_AMR 00159 00163 float embedding_matrix (const unsigned int i, 00164 const unsigned int j, 00165 const unsigned int k) const 00166 { return _embedding_matrix[i][j][k]; } 00167 00172 static const float _embedding_matrix[4][3][3]; 00173 00174 #endif 00175 00176 }; 00177 00178 00179 } // namespace libMesh 00180 00181 #endif // LIBMESH_FACE_TRI3_H