Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
LinearSolver_decl.hpp
1#ifndef LinearSolver_DECL_hpp
2#define LinearSolver_DECL_hpp
3
4#include "feddlib/problems/problems_config.h"
5#include "feddlib/core/FEDDCore.hpp"
6#include "feddlib/problems/abstract/TimeProblem.hpp"
7
8#include <Thyra_PreconditionerBase.hpp>
9#include <Thyra_DefaultZeroLinearOp_decl.hpp>
18
19namespace FEDD {
20template<class SC_, class LO_, class GO_, class NO_>
21class Problem;
22template<class SC_, class LO_, class GO_, class NO_>
23class TimeProblem;
24template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
25class LinearSolver {
26
27public:
28
29 typedef Problem<SC,LO,GO,NO> Problem_Type;
30 typedef Teuchos::RCP<Problem_Type> ProblemPtr_Type;
31 typedef TimeProblem<SC,LO,GO,NO> TimeProblem_Type;
32 typedef Teuchos::RCP<const Thyra::LinearOpBase<SC> > ThyraLinOpConstPtr_Type;
33 typedef Thyra::BlockedLinearOpBase<SC> ThyraLinOpBlock_Type;
34 typedef Teuchos::RCP< ThyraLinOpBlock_Type > ThyraLinOpBlockPtr_Type;
35 typedef Teuchos::RCP< const ThyraLinOpBlock_Type > ThyraLinOpBlockConstPtr_Type;
36 typedef Teuchos::RCP<Thyra::PreconditionerBase<SC> > ThyraPrecPtr_Type;
37
38 typedef typename Problem_Type::Matrix_Type Matrix_Type;
39 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
40 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
41 typedef BlockMultiVector<SC,LO,GO,NO> BlockMultiVector_Type;
42 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
43
44// typedef typename Problem_Type::Preconditioner_Type Preconditioner_Type;
45// typedef typename Problem_Type::PreconditionerPtr_Type PreconditionerPtr_Type;
46
47 LinearSolver();
48
49 ~LinearSolver();
50
51 int solve(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string type="Monolithic" );
52
53 int solve(TimeProblem_Type* timeProblem, BlockMultiVectorPtr_Type rhs, std::string type="Monolithic" );
54
55 int solveMonolithic(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string type );
56
57 int solveMonolithic(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs );
58
59#ifdef FEDD_HAVE_TEKO
60 int solveTeko(Problem_Type* problem, BlockMultiVectorPtr_Type rhs );
61
62 int solveTeko(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs );
63#endif
64 int solveBlock(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string precType );
65
66 int solveBlock(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string precType );
67
68private:
69
70};
71}
72#endif
Definition BlockMultiVector_decl.hpp:25
Definition Problem_decl.hpp:38
Definition TimeProblem_decl.hpp:33
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5