00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program 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 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: PDECondition.hpp,v 1.2 2006/07/20 19:08:54 delpinux Exp $ 00019 00020 #ifndef PDE_CONDITION_HPP 00021 #define PDE_CONDITION_HPP 00022 00023 #include <string> 00024 00025 #include <StreamCenter.hpp> 00026 00035 class PDECondition 00036 { 00037 public: 00039 enum Type { 00040 dirichlet, 00041 neumann, 00042 fourrier 00043 }; 00044 00045 private: 00046 const PDECondition::Type __type; 00048 const size_t __unknownNumber; 00055 virtual std::string 00056 typeName() const = 0; 00057 public: 00058 00064 const size_t& unknownNumber() const 00065 { 00066 return __unknownNumber; 00067 } 00068 00074 const PDECondition::Type& 00075 type() const 00076 { 00077 return __type; 00078 } 00079 00086 PDECondition(const PDECondition::Type& type, 00087 const size_t& unknownNumber) 00088 : __type(type), 00089 __unknownNumber(unknownNumber) 00090 { 00091 ; 00092 } 00093 00099 PDECondition(const PDECondition& C) 00100 : __type(C.__type), 00101 __unknownNumber(C.__unknownNumber) 00102 { 00103 ; 00104 } 00105 00114 friend std::ostream& 00115 operator << (std::ostream& os, const PDECondition& bc) 00116 { 00117 os << bc.typeName(); 00118 return os; 00119 } 00120 00125 virtual ~PDECondition() 00126 { 00127 ; 00128 } 00129 }; 00130 00131 #endif // PDE_CONDITION_HPP
1.5.6