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/core/LinearAlgebra/BlockMultiVector.hpp"
7
8#include <Thyra_PreconditionerBase.hpp>
9#include <Thyra_DefaultZeroLinearOp_decl.hpp>
10#include <Thyra_BlockedLinearOpBase.hpp>
11
20
21namespace FEDD {
22template<class SC_, class LO_, class GO_, class NO_>
23class Problem;
24template<class SC_, class LO_, class GO_, class NO_>
25class TimeProblem;
26template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
27class LinearSolver {
28
29public:
30
31 typedef Problem<SC,LO,GO,NO> Problem_Type;
32 typedef Teuchos::RCP<Problem_Type> ProblemPtr_Type;
33 typedef TimeProblem<SC,LO,GO,NO> TimeProblem_Type;
34 typedef Teuchos::RCP<const Thyra::LinearOpBase<SC> > ThyraLinOpConstPtr_Type;
35 typedef Thyra::BlockedLinearOpBase<SC> ThyraLinOpBlock_Type;
36 typedef Teuchos::RCP< ThyraLinOpBlock_Type > ThyraLinOpBlockPtr_Type;
37 typedef Teuchos::RCP< const ThyraLinOpBlock_Type > ThyraLinOpBlockConstPtr_Type;
38 typedef Teuchos::RCP<Thyra::PreconditionerBase<SC> > ThyraPrecPtr_Type;
39
40 typedef typename Problem_Type::Matrix_Type Matrix_Type;
41 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
42 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
43 typedef BlockMultiVector<SC,LO,GO,NO> BlockMultiVector_Type;
44 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
45
46// typedef typename Problem_Type::Preconditioner_Type Preconditioner_Type;
47// typedef typename Problem_Type::PreconditionerPtr_Type PreconditionerPtr_Type;
48
49 LinearSolver();
50
51 ~LinearSolver();
52
59 int solve(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string type="Monolithic" );
60
67 int solve(TimeProblem_Type* timeProblem, BlockMultiVectorPtr_Type rhs, std::string type="Monolithic" );
68
75 int solveMonolithic(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string type );
76
82 int solveMonolithic(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs );
83
84// #ifdef FEDD_HAVE_TEKO
85// int solveTeko(Problem_Type* problem, BlockMultiVectorPtr_Type rhs );
86// int solveTeko(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs );
87// #endif
94 int solveBlock(Problem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string precType );
95
102 int solveBlock(TimeProblem_Type* problem, BlockMultiVectorPtr_Type rhs, std::string precType );
103
104private:
105
106};
107}
108#endif
Definition BlockMultiVector_decl.hpp:25
int solveMonolithic(Problem_Type *problem, BlockMultiVectorPtr_Type rhs, std::string type)
Solve linear/linearized problem monolithicly.
Definition LinearSolver_def.hpp:75
int solveBlock(Problem_Type *problem, BlockMultiVectorPtr_Type rhs, std::string precType)
In case of a block system, solve block is called. It works also for teko.
Definition LinearSolver_def.hpp:223
int solve(Problem_Type *problem, BlockMultiVectorPtr_Type rhs, std::string type="Monolithic")
Call to solve a linear/linearized problem with right-hand side rhs. Depending on 'type' solveMonolith...
Definition LinearSolver_def.hpp:27
Definition Problem_decl.hpp:42
Definition TimeProblem_decl.hpp:31
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36