100 Teko_DEBUG_SCOPE(
"EBP::buildPreconditioner",10);
103 RCP<const Thyra::LinearOpBase<double> > thyraA = extractLinearOp(A);
113 RCP<const Thyra::LinearOpSourceBase<double> > lOpSrc = Thyra::defaultLinearOpSource(thyraA);
114 preconFactory_->initializePrec(lOpSrc,&*preconObj_,Thyra::SUPPORT_SOLVE_UNSPECIFIED);
117 RCP<const Thyra::LinearOpBase<double> > preconditioner = preconObj_->getUnspecifiedPrecOp();
119 SetOperator(preconditioner,
false);
121 firstBuildComplete_ =
true;
123 TEUCHOS_ASSERT(preconObj_!=Teuchos::null);
126 TEUCHOS_ASSERT(firstBuildComplete_==
true);
144 Teko_DEBUG_SCOPE(
"EBP::buildPreconditioner - with solution",10);
147 RCP<const Thyra::LinearOpBase<double> > thyraA = extractLinearOp(A);
155 RCP<Thyra::MultiVectorBase<double> > thyra_mv = Thyra::createMembers(thyraA->range(),epetra_mv.NumVectors());
162 preconFactory_->initializePrec(Thyra::defaultLinearOpSource(thyraA),thyra_mv,&*preconObj_,Thyra::SUPPORT_SOLVE_UNSPECIFIED);
163 RCP<const Thyra::LinearOpBase<double> > preconditioner = preconObj_->getUnspecifiedPrecOp();
165 SetOperator(preconditioner,
false);
167 firstBuildComplete_ =
true;
169 TEUCHOS_ASSERT(preconObj_!=Teuchos::null);
172 TEUCHOS_ASSERT(firstBuildComplete_==
true);
190 Teko_DEBUG_SCOPE(
"EBP::rebuildPreconditioner",10);
193 if(not firstBuildComplete_) {
197 Teko_DEBUG_EXPR(Teuchos::Time timer(
""));
200 Teko_DEBUG_EXPR(timer.start(
true));
201 RCP<const Thyra::LinearOpBase<double> > thyraA = extractLinearOp(A);
202 Teko_DEBUG_EXPR(timer.stop());
203 Teko_DEBUG_MSG(
"EBP::rebuild get thyraop time = " << timer.totalElapsedTime(),2);
206 Teko_DEBUG_EXPR(timer.start(
true));
207 preconFactory_->initializePrec(Thyra::defaultLinearOpSource(thyraA),&*preconObj_,Thyra::SUPPORT_SOLVE_UNSPECIFIED);
208 RCP<const Thyra::LinearOpBase<double> > preconditioner = preconObj_->getUnspecifiedPrecOp();
209 Teko_DEBUG_EXPR(timer.stop());
210 Teko_DEBUG_MSG(
"EBP::rebuild initialize prec time = " << timer.totalElapsedTime(),2);
212 Teko_DEBUG_EXPR(timer.start(
true));
213 SetOperator(preconditioner,
false);
214 Teko_DEBUG_EXPR(timer.stop());
215 Teko_DEBUG_MSG(
"EBP::rebuild set operator time = " << timer.totalElapsedTime(),2);
217 TEUCHOS_ASSERT(preconObj_!=Teuchos::null);
219 TEUCHOS_ASSERT(firstBuildComplete_==
true);
237 Teko_DEBUG_SCOPE(
"EBP::rebuildPreconditioner - with solution",10);
240 if(not firstBuildComplete_) {
244 Teko_DEBUG_EXPR(Teuchos::Time timer(
""));
247 Teko_DEBUG_EXPR(timer.start(
true));
248 RCP<const Thyra::LinearOpBase<double> > thyraA = extractLinearOp(A);
249 Teko_DEBUG_EXPR(timer.stop());
250 Teko_DEBUG_MSG(
"EBP::rebuild get thyraop time = " << timer.totalElapsedTime(),2);
253 Teko_DEBUG_EXPR(timer.start(
true));
254 RCP<Thyra::MultiVectorBase<double> > thyra_mv = Thyra::createMembers(thyraA->range(),epetra_mv.NumVectors());
256 Teko_DEBUG_EXPR(timer.stop());
257 Teko_DEBUG_MSG(
"EBP::rebuild vector copy time = " << timer.totalElapsedTime(),2);
260 Teko_DEBUG_EXPR(timer.start(
true));
261 preconFactory_->initializePrec(Thyra::defaultLinearOpSource(thyraA),thyra_mv,&*preconObj_,Thyra::SUPPORT_SOLVE_UNSPECIFIED);
262 RCP<const Thyra::LinearOpBase<double> > preconditioner = preconObj_->getUnspecifiedPrecOp();
263 Teko_DEBUG_EXPR(timer.stop());
264 Teko_DEBUG_MSG(
"EBP::rebuild initialize prec time = " << timer.totalElapsedTime(),2);
266 Teko_DEBUG_EXPR(timer.start(
true));
267 SetOperator(preconditioner,
false);
268 Teko_DEBUG_EXPR(timer.stop());
269 Teko_DEBUG_MSG(
"EBP::rebuild set operator time = " << timer.totalElapsedTime(),2);
271 TEUCHOS_ASSERT(preconObj_!=Teuchos::null);
273 TEUCHOS_ASSERT(firstBuildComplete_==
true);
314Teuchos::RCP<const Thyra::LinearOpBase<double> > EpetraBlockPreconditioner::extractLinearOp(
const Teuchos::RCP<const Epetra_Operator> & A)
const
327Teuchos::RCP<const MappingStrategy> EpetraBlockPreconditioner::extractMappingStrategy(
const Teuchos::RCP<const Epetra_Operator> & A)
const