Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
PrecBlock2x2_decl.hpp
1#ifndef PrecBlock2x2_DECL_hpp
2#define PrecBlock2x2_DECL_hpp
3#include "feddlib/core/FEDDCore.hpp"
4#include "feddlib/problems/problems_config.h"
5#include "PreconditionerOperator.hpp"
6#include <Thyra_DefaultProductMultiVector_decl.hpp>
7#include <Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp>
8#include <Thyra_OperatorVectorTypes.hpp>
9#include <Thyra_MultiVectorStdOps_decl.hpp>
10#include <Thyra_MultiVectorBase_decl.hpp>
11#include <Thyra_VectorBase.hpp>
12#include <Thyra_TpetraVector_decl.hpp>
13#include <Thyra_DetachedMultiVectorView.hpp>
14#include <Thyra_SpmdVectorSpaceBase_decl.hpp>
23
24namespace FEDD {
25
26template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
27class PrecBlock2x2 : public PreconditionerOperator<SC,LO,GO,NO> {
28
29public:
30 typedef Teuchos::RCP<Thyra::LinearOpBase<SC> > ThyraLinOpPtr_Type;
31 typedef Teuchos::Comm<int> Comm_Type;
32 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
33
34 PrecBlock2x2();
35
36 PrecBlock2x2(CommConstPtr_Type comm);
38 void setDiagonal(ThyraLinOpPtr_Type velocityInv,
39 ThyraLinOpPtr_Type pressureInv);
40
41 void setTriangular(ThyraLinOpPtr_Type velocityInv,
42 ThyraLinOpPtr_Type pressureInv,
43 ThyraLinOpPtr_Type BT);
44
45 void setVeloctiyInv(ThyraLinOpPtr_Type veloctiyInv);
46
47 void setPressureInv(ThyraLinOpPtr_Type pressureInv);
48
49 void setType(std::string type);
50
51 void initialize();
52
53 virtual void applyIt(
54 const Thyra::EOpTransp M_trans,
55 const Thyra::MultiVectorBase<SC> &X,
56 const Teuchos::Ptr<Thyra::MultiVectorBase<SC> > &Y,
57 const SC alpha,
58 const SC beta
59 ) const;
60
61protected:
62
63 virtual void applyImpl(
64 const Thyra::EOpTransp M_trans,
65 const Thyra::MultiVectorBase<SC> &X,
66 const Teuchos::Ptr<Thyra::MultiVectorBase<SC> > &Y,
67 const SC alpha,
68 const SC beta
69 ) const;
70
71
72
73
74
75private:
76
77 ThyraLinOpPtr_Type velocityInv_;
78 ThyraLinOpPtr_Type pressureInv_;
79 ThyraLinOpPtr_Type BT_;
80
81 mutable Teuchos::RCP<const Thyra::DefaultProductVectorSpace<SC> > productRangeFluid_;
82
83 CommConstPtr_Type comm_;
84 std::string type_;
85
86};
87}
88#endif
virtual void applyImpl(const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< SC > &X, const Teuchos::Ptr< Thyra::MultiVectorBase< SC > > &Y, const SC alpha, const SC beta) const
Definition PrecBlock2x2_def.hpp:114
void setDiagonal(ThyraLinOpPtr_Type velocityInv, ThyraLinOpPtr_Type pressureInv)
Definition PrecBlock2x2_def.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5