rheolef  6.3
space_component.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_SPACE_COMPONENT_H
2 #define _RHEOLEF_SPACE_COMPONENT_H
3 
4 #include "rheolef/space.h"
5 
6 namespace rheolef {
7 
8 template<class T, class M>
10 public:
11 
13 
14 
16  : _constit(sc) {}
18  : _constit(x._constit) {}
19 
20 
21  operator space_basic<T,M>() const { return space_basic<T,M>(_constit); }
22 
23 
25  space_component<T,M> sub (_constit [i_comp]);
26  return sub;
27  }
28 
29 
30  void block (std::string dom_name) {
31  _constit.do_act (space_act(dom_name, space_act::block));
32  }
33  void block (const domain_indirect_basic<M>& dom) {
34  _constit.do_act (space_act(dom.name(), space_act::block));
35  }
36 
37 protected:
38  space_constitution<T,M>& _constit; // non-const reference: block() modify the _constit
39 };
40 template<class T, class M>
42 public:
43 
45 
46 
48  : _constit(sc) {}
50  : _constit(x._constit) {}
52  : _constit(x._constit) {}
53 
54 
55  operator space_basic<T,M>() const { return space_basic<T,M>(_constit); }
56 
57 
58 #ifdef TODO
59  space_component_const<T,M> operator[] (size_type i_comp) const {
60  space_component_const<T,M> sub (_constit [i_comp]);
61  return sub;
62  }
63 #endif // TODO
64 
65 protected:
67 };
68 template <class T, class M>
69 inline
72 {
73  return space_component<T,M> (_constit [i_comp]);
74 }
75 template <class T, class M>
76 inline
79 {
80  return space_component_const<T,M> (_constit [i_comp]);
81 }
82 
83 } // namespace rheolef
84 #endif // _RHEOLEF_SPACE_COMPONENT_H
85