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;
119 MatrixPtr_Type getVelocityMassMatrix(){
return velocityMassMatrixMatrixPtr_;}
121 void setPressureLaplaceMatrix(MatrixPtr_Type matrix)
const;
122 MatrixPtr_Type getPressureLaplaceMatrix(){
return pressureLaplaceMatrixPtr_;}
124 void setPCDOperator(MatrixPtr_Type matrix)
const;
125 MatrixPtr_Type getPCDOperatorMatrix(){
return pcdOperatorMatrixPtr_;}
128 void setPressureMassMatrix(MatrixPtr_Type massMatrix)
const;
129 MatrixPtr_Type getPressureMassMatrix(){
return pressureMassMatrixPtr_;}
131 void buildPreconditionerFaCSI( std::string type );
133 void buildPreconditionerBlock2x2();
135 void setFaCSIBCFactory( BCConstPtr_Type bcFactory ){ faCSIBCFactory_ = bcFactory; }
137 bool hasFaCSIBCFactory(){
return !faCSIBCFactory_.is_null(); }
139 BCConstPtr_Type getFaCSIBCFactory( ){
return faCSIBCFactory_; }
141 void exportCoarseBasis( );
143 void exportCoarseBasisFSI( );
145 bool isPreconditionerComputed()
const{
return precondtionerIsBuilt_;}
149 ThyraPrecPtr_Type thyraPrec_;
150 bool precondtionerIsBuilt_;
151 ProblemPtr_Type problem_;
152 TimeProblemPtr_Type timeProblem_;
153 Teuchos::RCP<Thyra::PreconditionerFactoryBase<SC> > precFactory_;
155 ThyraLinOpConstPtr_Type tekoLinOp_;
156 Teuchos::RCP<Teko::RequestHandler> rh_;
157 Teuchos::RCP< Teko::StaticRequestCallback<Teko::LinearOp> > callbackPCD_;
160 ThyraLinOpConstPtr_Type fsiLinOp_;
161 ThyraLinOpPtr_Type precFluid_;
162 ThyraLinOpPtr_Type precStruct_;
163 ThyraLinOpPtr_Type precGeo_;
164 MinPrecProblemPtr_Type probFluid_;
165 MinPrecProblemPtr_Type probSolid_;
166 MinPrecProblemPtr_Type probGeo_;
167 BCConstPtr_Type faCSIBCFactory_;
170 ThyraLinOpPtr_Type precVelocity_;
171 ThyraLinOpPtr_Type precSchur_;
172 MinPrecProblemPtr_Type probVelocity_;
173 MinPrecProblemPtr_Type probSchur_;
177 mutable ThyraLinOpConstPtr_Type velocityMassMatrix_;
178 mutable MatrixPtr_Type velocityMassMatrixMatrixPtr_;
180 mutable MatrixPtr_Type pressureLaplaceMatrixPtr_;
181 mutable ThyraLinOpConstPtr_Type pressureLaplace_;
183 mutable MatrixPtr_Type pressureMassMatrixPtr_;
184 mutable ThyraLinOpConstPtr_Type pressureMass_;
186 mutable MatrixPtr_Type pcdOperatorMatrixPtr_;
187 mutable ThyraLinOpConstPtr_Type pcdOperator_;
190 MinPrecProblemPtr_Type probLaplace_;
191 MinPrecProblemPtr_Type probMass_;
192 MinPrecProblemPtr_Type probVMass_;
193 ThyraLinOpPtr_Type laplaceInverse_;
194 ThyraLinOpPtr_Type massMatrixInverse_;
195 ThyraLinOpPtr_Type massMatrixVInverse_;
197 ParameterListPtr_Type pListPhiExport_;
198#define PRECONDITIONER_TIMER
199#ifdef PRECONDITIONER_TIMER
200 TimePtr_Type preconditionerTimer_;