AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
BoundaryCondition.hpp
1 #pragma once
2 
3 #include <list>
4 #include <memory>
5 
6 #include <amdis/typetree/TreeContainer.hpp>
7 
8 namespace AMDiS
9 {
11 
19  template <class Mat, class Sol, class Rhs>
21  {
22  public:
24  BoundaryCondition() = default;
25 
27 
31  virtual void init() = 0;
32 
34 
38  virtual void apply(Mat& A, Sol& x, Rhs& b) = 0;
39  };
40 
41  template <class Mat, class Sol, class Rhs>
42  struct BCData
43  {
44  template <class RN, class CN>
45  using type = std::list<std::shared_ptr<BoundaryCondition<Mat, Sol, Rhs>>>;
46  };
47 
50  template <class Mat, class Sol, class Rhs, class RB, class CB>
51  using BoundaryConditions
53  typename RB::LocalView::Tree, typename CB::LocalView::Tree>;
54 
55 } // end namespace AMDiS
Definition: BoundaryCondition.hpp:42
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
TreeContainer< Impl::RowNodeData< NodeData, ColTree, leafOnly >::template type, RowTree, leafOnly > TreeMatrix
Definition: TreeContainer.hpp:379
virtual void init()=0
Initialize the boundary condition.
TreeMatrix< BCData< Mat, Sol, Rhs >::template type, typename RB::LocalView::Tree, typename CB::LocalView::Tree > BoundaryConditions
Definition: BoundaryCondition.hpp:53
virtual void apply(Mat &A, Sol &x, Rhs &b)=0
Apply the boundary condition to matrix and vector.
BoundaryCondition()=default
Default constructor.
Interface class for boundary conditions.
Definition: BoundaryCondition.hpp:20