Chi-Tech
ags_context.h
Go to the documentation of this file.
1#ifndef CHITECH_AGS_CONTEXT_H
2#define CHITECH_AGS_CONTEXT_H
3
6
7#include <vector>
8#include <memory>
9
10namespace lbs
11{
12 class LBSSolver;
13}
14
15namespace lbs
16{
17
18template<class MatType, class VecType, class SolverType>
19struct AGSContext : public chi_math::LinearSolverContext<MatType, VecType>
20{
22 typedef std::shared_ptr<LinSolveBaseType> LinSolveBaseTypePtr;
24 std::vector<LinSolveBaseTypePtr> sub_solvers_list_;
25
26 AGSContext(LBSSolver& lbs_solver,
27 std::vector<LinSolveBaseTypePtr> sub_solvers_list) :
28 lbs_solver_(lbs_solver),
29 sub_solvers_list_(std::move(sub_solvers_list))
30 {}
31
32 std::pair<int64_t,int64_t> SystemSize();
33
34 virtual void SetPreconditioner(SolverType& solver);
35
36 int MatrixAction(MatType& matrix, VecType& vector, VecType& action) override;
37
38};
39
40}//namespace lbs
41
42#endif //CHITECH_AGS_CONTEXT_H
SolverType
Definition: lbs_structs.h:27
std::shared_ptr< LinSolveBaseType > LinSolveBaseTypePtr
Definition: ags_context.h:22
chi_math::LinearSolver< MatType, VecType, SolverType > LinSolveBaseType
Definition: ags_context.h:21
std::pair< int64_t, int64_t > SystemSize()
virtual void SetPreconditioner(SolverType &solver)
int MatrixAction(MatType &matrix, VecType &vector, VecType &action) override
AGSContext(LBSSolver &lbs_solver, std::vector< LinSolveBaseTypePtr > sub_solvers_list)
Definition: ags_context.h:26
std::vector< LinSolveBaseTypePtr > sub_solvers_list_
Definition: ags_context.h:24
LBSSolver & lbs_solver_
Definition: ags_context.h:23