Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
system.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2 
3  This file is part of the Feel library
4 
5  Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6  Date: 2009-01-04
7 
8  Copyright (C) 2009 Universite Joseph Fourier (Grenoble I)
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 3.0 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
29 #ifndef FEELPP_SYSTEM_HPP
30 #define FEELPP_SYSTEM_HPP 1
31 
32 namespace Feel
33 {
41 template<typename SpaceType>
42 class System
43 {
44 public:
45 
46 
50 
51  static const uint16_type Dim = SpaceType::nDim;
53 
54  typedef typename SpaceType::value_type value_type;
55 
56  typedef SpaceType functionspace_type;
57  typedef boost::shared_ptr<SpaceType> functionspace_ptrtype;
58 
59  typedef typename functionspace_type::element_type element_type;
60 
62 
66 
67  System( functionspace_ptrtype const& Xh, po::variables_map const& vm ) : M_Xh( Xh ), M_vm( vm ) {}
68  System( System const & s ) : M_Xh( s.M_Xh ), M_vm( s.M_vm ) {}
69  virtual ~System() {}
70 
72 
76 
77  System& operator=( System const& s )
78  {
79  if ( this != &s )
80  {
81  M_Xh = s.M_Xh;
82  M_vm = s.M_vm;
83  }
84 
85  return *this;
86  }
87 
89 
93 
95  po::variables_map const& vm() const
96  {
97  return M_vm;
98  }
99 
101  functionspace_ptrtype const& functionSpace() const
102  {
103  return M_Xh;
104  }
105 
107 
111 
113  void setVm( po::variables_map const& vm )
114  {
115  M_vm = vm;
116  }
117 
119  void setFunctionSpace( functionspace_ptrtype const& Xh )
120  {
121  M_Xh = Xh;
122  }
123 
125 
129 
133  virtual void assemble() = 0;
134 
139  virtual void solve( element_type& u ) = 0;
140 
142 
143 
144 
145 protected:
146 
147 private:
148 
149  po::variables_map M_vm;
150 
151  functionspace_ptrtype M_Xh;
152 
153 };
154 } // Feel
155 #endif /* FEELPP_SYSTEM_HPP */
functionspace_ptrtype const & functionSpace() const
Definition: system.hpp:101
void setVm(po::variables_map const &vm)
set the variables map
Definition: system.hpp:113
virtual void solve(element_type &u)=0
System of PDE associated to a function space.
Definition: system.hpp:42
po::variables_map const & vm() const
Definition: system.hpp:95
virtual void assemble()=0
void setFunctionSpace(functionspace_ptrtype const &Xh)
set the function space
Definition: system.hpp:119

Generated on Sun Dec 22 2013 13:11:13 for Feel++ by doxygen 1.8.5