00001 /* 00002 00003 umesh2dgui, a GUI for umesh2d grid generator 00004 00005 Copyright (C) 2010 Gabriele Dini Ciacci <dark.schneider@iol.it> 00006 Based on a code from Luigi Quartapelle and Massimo Biava 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00021 00022 Created on January 24, 2010, 6:56 PM 00023 */ 00024 00025 #ifndef U2D_NEUMANNCONDITION_H 00026 #define U2D_NEUMANNCONDITION_H 00027 00028 #include "boost/numeric/mtl/mtl.hpp" 00029 #include "u2d_mesh.h" 00030 00031 using namespace mtl; 00032 00033 class u2d_NeumannCondition { 00034 public: 00035 u2d_NeumannCondition(); 00036 u2d_NeumannCondition(const u2d_NeumannCondition& orig); 00037 virtual ~u2d_NeumannCondition(); 00038 void calculateElements(u2d_Mesh* mesh); 00039 int setSide(int side_id); 00040 bool isNeumann(int side_id); 00041 00042 dense_vector<int> neumann_elements; 00043 00044 private: 00045 void countElements(u2d_Mesh* mesh); 00046 int neumann_element_n; 00047 std::vector<int> neu_sides; 00048 }; 00049 00050 #endif /* U2D_NEUMANNCONDITION_H */ 00051