AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
Assigner.hpp
1 #pragma once
2 
3 namespace AMDiS
4 {
5  namespace Assigner
6  {
7  struct assign
8  {
9  template <class T, class S>
10  constexpr void operator()(T const& from, S&& to) const
11  {
12  to = from;
13  }
14  };
15 
16  struct plus_assign
17  {
18  template <class T, class S>
19  constexpr void operator()(T const& from, S&& to) const
20  {
21  to += from;
22  }
23  };
24 
25  struct minus_assign
26  {
27  template <class T, class S>
28  constexpr void operator()(T const& from, S&& to) const
29  {
30  to -= from;
31  }
32  };
33 
35  {
36  template <class T, class S>
37  constexpr void operator()(T const& from, S&& to) const
38  {
39  to *= from;
40  }
41  };
42 
44  {
45  template <class T, class S>
46  constexpr void operator()(T const& from, S&& to) const
47  {
48  to /= from;
49  }
50  };
51 
52  } // end namespcae Assigner
53 } // end namespace AMDiS
Definition: Assigner.hpp:16
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
Definition: Assigner.hpp:34
Definition: Assigner.hpp:43
Definition: Assigner.hpp:25
Definition: Assigner.hpp:7