39 typedef Teuchos::RCP<Teuchos::Comm<int> > CommPtr_Type;
40 typedef Teuchos::RCP<const Teuchos::Comm<int> > CommConstPtr_Type;
45 typedef Teuchos::RCP<Problem_Type> ProblemPtr_Type;
46 typedef Teuchos::RCP<TimeProblem_Type> TimeProblemPtr_Type;
47 typedef Teuchos::RCP<MinPrecProblem_Type> MinPrecProblemPtr_Type;
49 typedef Teuchos::RCP<Map<LO,GO,NO> > MapPtr_Type;
50 typedef Teuchos::RCP<const Map<LO,GO,NO> > MapConstPtr_Type;
51 typedef Teuchos::RCP<Thyra::PreconditionerBase<SC> > ThyraPrecPtr_Type;
52 typedef Teuchos::RCP<const Thyra::PreconditionerBase<SC> > ThyraPrecConstPtr_Type;
53 typedef Teuchos::RCP<Thyra::LinearOpBase<SC> > ThyraLinOpPtr_Type;
54 typedef Teuchos::RCP<const Thyra::LinearOpBase<SC> > ThyraLinOpConstPtr_Type;
55 typedef Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder > LinSolverBuilderPtr_Type;
58 typedef Teuchos::RCP<Mesh_Type> MeshPtr_Type;
59 typedef Teuchos::RCP<const Mesh_Type> MeshConstPtr_Type;
61 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
63 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
64 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
65 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
67 typedef typename Problem_Type::BlockMultiVector_Type BlockMultiVector_Type;
68 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
70 typedef typename Problem_Type::Matrix_Type Matrix_Type;
71 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
73 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
74 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
76 typedef typename Problem_Type::BC_Type BC_Type;
77 typedef typename Problem_Type::BCConstPtr_Type BCConstPtr_Type;
79 Preconditioner(Problem_Type* problem);
81 Preconditioner(TimeProblem_Type* problem);
85 ThyraPrecPtr_Type getThyraPrec();
87 ThyraPrecConstPtr_Type getThyraPrecConst()
const;
89 void setPreconditionerThyraFromLinOp( ThyraLinOpPtr_Type precLinOp );
91 void buildPreconditioner( std::string type=
"Monolithic" );
93 void initializePreconditioner( std::string type=
"Monolithic" );
95 void buildPreconditionerMonolithic( );
97 void buildPreconditionerMonolithicFSI( );
99 void initPreconditionerMonolithic( );
101 void initPreconditionerBlock( );
104 void buildPreconditionerTeko( );
106 void setVelocityParameters( ParameterListPtr_Type parameterList,
int coarseRanks );
108 void setPressureParameters( ParameterListPtr_Type parameterList,
int coarseRanks );
110 ThyraLinOpConstPtr_Type getTekoOp();
112 void setVelocityMassMatrix(MatrixPtr_Type massMatrix)
const;
113 MatrixPtr_Type getVelocityMassMatrix(){
return velocityMassMatrixMatrixPtr_;}
115 void setPressureLaplaceMatrix(MatrixPtr_Type matrix)
const;
116 MatrixPtr_Type getPressureLaplaceMatrix(){
return pressureLaplaceMatrixPtr_;}
118 void setPCDOperator(MatrixPtr_Type matrix)
const;
119 MatrixPtr_Type getPCDOperatorMatrix(){
return pcdOperatorMatrixPtr_;}
122 void setPressureMassMatrix(MatrixPtr_Type massMatrix)
const;
123 MatrixPtr_Type getPressureMassMatrix(){
return pressureMassMatrixPtr_;}
125 void buildPreconditionerFaCSI( std::string type );
127 void buildPreconditionerBlock2x2();
129 void setFaCSIBCFactory( BCConstPtr_Type bcFactory ){ faCSIBCFactory_ = bcFactory; }
131 bool hasFaCSIBCFactory(){
return !faCSIBCFactory_.is_null(); }
133 BCConstPtr_Type getFaCSIBCFactory( ){
return faCSIBCFactory_; }
135 void exportCoarseBasis( );
137 void exportCoarseBasisFSI( );
139 bool isPreconditionerComputed()
const{
return precondtionerIsBuilt_;}
151 ThyraPrecPtr_Type thyraPrec_;
152 bool precondtionerIsBuilt_;
153 ProblemPtr_Type problem_;
154 TimeProblemPtr_Type timeProblem_;
155 Teuchos::RCP<Thyra::PreconditionerFactoryBase<SC> > precFactory_;
157 ThyraLinOpConstPtr_Type tekoLinOp_;
158 Teuchos::RCP<Teko::RequestHandler> rh_;
159 Teuchos::RCP< Teko::StaticRequestCallback<Teko::LinearOp> > callbackPCD_;
162 ThyraLinOpConstPtr_Type fsiLinOp_;
163 ThyraLinOpPtr_Type precFluid_;
164 ThyraLinOpPtr_Type precStruct_;
165 ThyraLinOpPtr_Type precGeo_;
166 MinPrecProblemPtr_Type probFluid_;
167 MinPrecProblemPtr_Type probSolid_;
168 MinPrecProblemPtr_Type probGeo_;
169 BCConstPtr_Type faCSIBCFactory_;
172 ThyraLinOpPtr_Type precVelocity_;
173 ThyraLinOpPtr_Type precSchur_;
174 MinPrecProblemPtr_Type probVelocity_;
175 MinPrecProblemPtr_Type probSchur_;
179 mutable ThyraLinOpConstPtr_Type velocityMassMatrix_;
180 mutable MatrixPtr_Type velocityMassMatrixMatrixPtr_;
182 mutable MatrixPtr_Type pressureLaplaceMatrixPtr_;
183 mutable ThyraLinOpConstPtr_Type pressureLaplace_;
185 mutable MatrixPtr_Type pressureMassMatrixPtr_;
186 mutable ThyraLinOpConstPtr_Type pressureMass_;
188 mutable MatrixPtr_Type pcdOperatorMatrixPtr_;
189 mutable ThyraLinOpConstPtr_Type pcdOperator_;
192 mutable BlockMultiVectorPtr_Type pressureProjection_;
195 MinPrecProblemPtr_Type probLaplace_;
196 MinPrecProblemPtr_Type probMass_;
197 MinPrecProblemPtr_Type probVMass_;
198 ThyraLinOpPtr_Type laplaceInverse_;
199 ThyraLinOpPtr_Type massMatrixInverse_;
200 ThyraLinOpPtr_Type massMatrixVInverse_;
202 ParameterListPtr_Type pListPhiExport_;
203#define PRECONDITIONER_TIMER
204#ifdef PRECONDITIONER_TIMER
205 TimePtr_Type preconditionerTimer_;