45 typedef Teuchos::RCP<Teuchos::Comm<int> > CommPtr_Type;
46 typedef Teuchos::RCP<const Teuchos::Comm<int> > CommConstPtr_Type;
51 typedef Teuchos::RCP<Problem_Type> ProblemPtr_Type;
52 typedef Teuchos::RCP<TimeProblem_Type> TimeProblemPtr_Type;
53 typedef Teuchos::RCP<MinPrecProblem_Type> MinPrecProblemPtr_Type;
55 typedef Teuchos::RCP<Map<LO,GO,NO> > MapPtr_Type;
56 typedef Teuchos::RCP<const Map<LO,GO,NO> > MapConstPtr_Type;
57 typedef Teuchos::RCP<Thyra::PreconditionerBase<SC> > ThyraPrecPtr_Type;
58 typedef Teuchos::RCP<const Thyra::PreconditionerBase<SC> > ThyraPrecConstPtr_Type;
59 typedef Teuchos::RCP<Thyra::LinearOpBase<SC> > ThyraLinOpPtr_Type;
60 typedef Teuchos::RCP<const Thyra::LinearOpBase<SC> > ThyraLinOpConstPtr_Type;
61 typedef Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder > LinSolverBuilderPtr_Type;
64 typedef Teuchos::RCP<Mesh_Type> MeshPtr_Type;
65 typedef Teuchos::RCP<const Mesh_Type> MeshConstPtr_Type;
67 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
69 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
70 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
71 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
73 typedef typename Problem_Type::BlockMultiVector_Type BlockMultiVector_Type;
74 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
76 typedef typename Problem_Type::Matrix_Type Matrix_Type;
77 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
79 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
80 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
82 typedef typename Problem_Type::BC_Type BC_Type;
83 typedef typename Problem_Type::BCConstPtr_Type BCConstPtr_Type;
85 Preconditioner(Problem_Type* problem);
87 Preconditioner(TimeProblem_Type* problem);
91 ThyraPrecPtr_Type getThyraPrec();
93 ThyraPrecConstPtr_Type getThyraPrecConst()
const;
95 void setPreconditionerThyraFromLinOp( ThyraLinOpPtr_Type precLinOp );
97 void buildPreconditioner( std::string type=
"Monolithic" );
99 void initializePreconditioner( std::string type=
"Monolithic" );
101 void buildPreconditionerMonolithic( );
103 void buildPreconditionerMonolithicFSI( );
105 void initPreconditionerMonolithic( );
107 void initPreconditionerBlock( );
110 void buildPreconditionerTeko( );
112 void setVelocityParameters( ParameterListPtr_Type parameterList,
int coarseRanks );
114 void setPressureParameters( ParameterListPtr_Type parameterList,
int coarseRanks );
116 ThyraLinOpConstPtr_Type getTekoOp();
118 void setVelocityMassMatrix(MatrixPtr_Type massMatrix)
const;
121 void buildPreconditionerFaCSI( std::string type );
123 void buildPreconditionerBlock2x2();
125 void setPressureMassMatrix(MatrixPtr_Type massMatrix)
const;
127 void setFaCSIBCFactory( BCConstPtr_Type bcFactory ){ faCSIBCFactory_ = bcFactory; };
129 bool hasFaCSIBCFactory(){
return !faCSIBCFactory_.is_null(); };
131 BCConstPtr_Type getFaCSIBCFactory( ){
return faCSIBCFactory_; };
133 void exportCoarseBasis( );
135 void exportCoarseBasisFSI( );
137 bool isPreconditionerComputed()
const{
return precondtionerIsBuilt_;};
140 ThyraPrecPtr_Type thyraPrec_;
141 bool precondtionerIsBuilt_;
142 ProblemPtr_Type problem_;
143 TimeProblemPtr_Type timeProblem_;
144 Teuchos::RCP<Thyra::PreconditionerFactoryBase<SC> > precFactory_;
146 ThyraLinOpConstPtr_Type tekoLinOp_;
147 mutable ThyraLinOpConstPtr_Type velocityMassMatrix_;
150 ThyraLinOpConstPtr_Type fsiLinOp_;
151 ThyraLinOpPtr_Type precFluid_;
152 ThyraLinOpPtr_Type precStruct_;
153 ThyraLinOpPtr_Type precGeo_;
154 MinPrecProblemPtr_Type probFluid_;
155 MinPrecProblemPtr_Type probSolid_;
156 MinPrecProblemPtr_Type probGeo_;
157 BCConstPtr_Type faCSIBCFactory_;
160 ThyraLinOpPtr_Type precVelocity_;
161 ThyraLinOpPtr_Type precSchur_;
162 MinPrecProblemPtr_Type probVelocity_;
163 MinPrecProblemPtr_Type probSchur_;
164 mutable MatrixPtr_Type pressureMassMatrix_;
166 ParameterListPtr_Type pListPhiExport_;
167#define PRECONDITIONER_TIMER
168#ifdef PRECONDITIONER_TIMER
169 TimePtr_Type preconditionerTimer_;