node_elem.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_NODE_ELEM_H 00021 #define LIBMESH_NODE_ELEM_H 00022 00023 // Local includes 00024 #include "libmesh/elem.h" 00025 00026 // C++ includes 00027 #include <cstddef> 00028 00029 namespace libMesh 00030 { 00031 00032 00033 // Forward declarations 00034 00035 00041 // ------------------------------------------------------------ 00042 // NodeElem class definition 00043 class NodeElem : public Elem 00044 { 00045 public: 00046 00050 explicit 00051 NodeElem (Elem* p=NULL) : 00052 Elem(NodeElem::n_nodes(), NodeElem::n_sides(), p, _elemlinks_data, _nodelinks_data) {} 00053 00057 unsigned int dim () const { return 0; } 00058 00062 unsigned int n_nodes() const { return 1; } 00063 00067 unsigned int n_sides() const { return 0; } 00068 00072 unsigned int n_vertices() const { return 1; } 00073 00077 unsigned int n_edges() const { return 0; } 00078 00082 unsigned int n_faces() const { return 0; } 00083 00087 unsigned int n_children() const { return 1; } 00088 00093 dof_id_type key (const unsigned int) const 00094 { return 0; } 00095 00099 AutoPtr<Elem> side (const unsigned int) const 00100 { libmesh_error(); AutoPtr<Elem> ap(NULL); return ap; } 00101 00105 AutoPtr<Elem> build_side (const unsigned int, bool) const 00106 { libmesh_error(); AutoPtr<Elem> ap(NULL); return ap; } 00107 00111 AutoPtr<Elem> build_edge (const unsigned int) const 00112 { libmesh_error(); AutoPtr<Elem> ap(NULL); return ap; } 00113 00117 unsigned int n_sub_elem() const { return 1; } 00118 00122 virtual bool is_vertex(const unsigned int) const { return true; } 00123 00127 virtual bool is_edge(const unsigned int) const { return false; } 00128 00129 virtual bool is_face(const unsigned int) const { return false; } 00130 00131 virtual bool is_child_on_side(const unsigned int, 00132 const unsigned int) const 00133 { libmesh_error(); return false; } 00134 00135 virtual bool is_node_on_side(const unsigned int, 00136 const unsigned int) const 00137 { libmesh_error(); return false; } 00138 00139 virtual bool is_node_on_edge(const unsigned int, 00140 const unsigned int) const 00141 { libmesh_error(); return false; } 00142 00143 virtual bool is_edge_on_side(const unsigned int, 00144 const unsigned int) const 00145 { libmesh_error(); return false; } 00146 00147 /* 00148 * @returns true iff the element map is definitely affine within 00149 * numerical tolerances 00150 */ 00151 virtual bool has_affine_map () const { return true; } 00152 00157 virtual bool is_linear () const { return true; } 00158 00162 ElemType type() const { return NODEELEM; } 00163 00167 Order default_order() const { return FIRST; } 00168 00169 virtual void connectivity(const unsigned int sc, 00170 const IOPackage iop, 00171 std::vector<dof_id_type>& conn) const; 00172 00173 00174 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00175 00179 bool infinite () const { return false; } 00180 00181 #endif 00182 00183 00184 protected: 00185 00189 Elem* _elemlinks_data[1+(LIBMESH_DIM>0)]; 00190 00194 Node* _nodelinks_data[1]; 00195 00196 00197 #ifdef LIBMESH_ENABLE_AMR 00198 00202 float embedding_matrix (const unsigned int i, 00203 const unsigned int j, 00204 const unsigned int k) const 00205 { return _embedding_matrix[i][j][k]; } 00206 00211 static const float _embedding_matrix[1][1][1]; 00212 00216 unsigned int side_children_matrix (const unsigned int, 00217 const unsigned int) const 00218 { libmesh_error(); return 0; } 00219 00220 #endif 00221 00222 }; 00223 00224 00225 00226 00227 00228 // ------------------------------------------------------------ 00229 // NodeElem class member functions 00230 00231 } // namespace libMesh 00232 00233 #endif // LIBMESH_NODE_ELEM_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: