Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Thyra_MultiVectorLinearOpWithSolveFactory.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Thyra_MultiVectorLinearOpWithSolveFactory_hpp
10 #define Thyra_MultiVectorLinearOpWithSolveFactory_hpp
11 
12 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
16 #include "Thyra_DefaultMultiVectorLinearOpWithSolve.hpp"
17 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
18 #include "Thyra_DefaultLinearOpSource.hpp"
19 
20 namespace Thyra {
21 
22 /** \brief Create a LinearOpWithSolveFactory for a flattened-out multi-vector.
23  */
24 template<class Scalar>
26  : virtual public LinearOpWithSolveFactoryBase<Scalar>
27 {
28 public:
29 
30  /** @name Overridden from Constructors/Initializers/Accessors */
31  //@{
32 
33  /** \brief Construct to uninitialized. */
35 
36  /** \brief Initialize given a single non-const LOWSFB object.
37  *
38  * \param lowsf [in,persisting] The LOWSFB object that will be used to
39  * create the LOWSB object for the diagonal blocks.
40  * \param multiVecRange [?] Description.
41  * \param multiVecDomain [?] Description.
42  *
43  * <b>Preconditions:</b><ul>
44  * <li><tt>!is_null(lowsf)</tt>
45  * </ul>
46  *
47  */
48  void nonconstInitialize(
49  const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
50  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
51  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
52  );
53 
54 
55  /** \brief Initialize given a single const LOWSFB object.
56  *
57  * \param lowsf [in,persisting] The LOWSFB object that will be used to
58  * create the LOWSB object for the diagonal blocks.
59  * \param multiVecRange [?] Description.
60  * \param multiVecDomain [?] Description.
61  *
62  * <b>Preconditions:</b><ul>
63  * <li><tt>!is_null(lowsf)</tt>
64  * </ul>
65  *
66  */
67  void initialize(
68  const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
69  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
70  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
71  );
72 
73  RCP<LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF();
74 
75  RCP<const LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF() const;
76 
77  //@}
78 
79  /** \name Overridden from Teuchos::Describable. */
80  //@{
81 
82  std::string description() const;
83 
84  //@}
85 
86  /** @name Overridden from ParameterListAcceptor (simple forwarding functions) */
87  //@{
88 
89  void setParameterList(RCP<ParameterList> const& paramList);
90  RCP<ParameterList> getNonconstParameterList();
91  RCP<ParameterList> unsetParameterList();
92  RCP<const ParameterList> getParameterList() const;
93  RCP<const ParameterList> getValidParameters() const;
94 
95  //@}
96 
97  /** \name Overridden from LinearOpWithSolveFactoyBase */
98  //@{
99 
100  /** \brief returns false. */
101  virtual bool acceptsPreconditionerFactory() const;
102 
103  /** \brief Throws exception. */
104  virtual void setPreconditionerFactory(
105  const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
106  const std::string &precFactoryName
107  );
108 
109  /** \brief Returns null . */
110  virtual RCP<PreconditionerFactoryBase<Scalar> >
111  getPreconditionerFactory() const;
112 
113  /** \brief Throws exception. */
114  virtual void unsetPreconditionerFactory(
115  RCP<PreconditionerFactoryBase<Scalar> > *precFactory,
116  std::string *precFactoryName
117  );
118 
119  virtual bool isCompatible(
120  const LinearOpSourceBase<Scalar> &fwdOpSrc
121  ) const;
122 
123  virtual RCP<LinearOpWithSolveBase<Scalar> > createOp() const;
124 
125  virtual void initializeOp(
126  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
127  LinearOpWithSolveBase<Scalar> *Op,
128  const ESupportSolveUse supportSolveUse
129  ) const;
130 
131  virtual void initializeAndReuseOp(
132  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
133  LinearOpWithSolveBase<Scalar> *Op
134  ) const;
135 
136  virtual void uninitializeOp(
137  LinearOpWithSolveBase<Scalar> *Op,
138  RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
139  RCP<const PreconditionerBase<Scalar> > *prec,
140  RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
141  ESupportSolveUse *supportSolveUse
142  ) const;
143 
144  virtual bool supportsPreconditionerInputType(
145  const EPreconditionerInputType precOpType
146  ) const;
147 
148  virtual void initializePreconditionedOp(
149  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
150  const RCP<const PreconditionerBase<Scalar> > &prec,
151  LinearOpWithSolveBase<Scalar> *Op,
152  const ESupportSolveUse supportSolveUse
153  ) const;
154 
156  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
157  const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
158  LinearOpWithSolveBase<Scalar> *Op,
159  const ESupportSolveUse supportSolveUse
160  ) const;
161 
162  //@}
163 
164 protected:
165 
166  /** \brief Overridden from Teuchos::VerboseObjectBase */
167  //@{
168 
169  void informUpdatedVerbosityState() const;
170 
171  //@}
172 
173 private:
174 
175  typedef Teuchos::ConstNonconstObjectContainer<LinearOpWithSolveFactoryBase<Scalar> > LOWSF_t;
176 
178  RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > multiVecRange_;
179  RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > multiVecDomain_;
180 
181 };
182 
183 /** \brief Nonmember constructor.
184  *
185  * \relates MultiVectorLinearOpWithSolveFactory
186  */
187 template<class Scalar>
188 RCP<MultiVectorLinearOpWithSolveFactory<Scalar> >
190  const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
191  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
192  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
193  )
194 {
195  RCP<MultiVectorLinearOpWithSolveFactory<Scalar> > mvlowsf =
197  mvlowsf->nonconstInitialize(lowsf,multiVecRange,multiVecDomain);
198  return mvlowsf;
199 }
200 
201 /** \brief Nonmember constructor.
202  *
203  * \relates MultiVectorLinearOpWithSolveFactory
204  */
205 template<class Scalar>
206 RCP<MultiVectorLinearOpWithSolveFactory<Scalar> >
208  const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
209  const int num_blocks
210  )
211 {
212  RCP< LinearOpWithSolveBase<Scalar> > op = lowsf->createOp();
213  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > mv_domain =
214  Thyra::multiVectorProductVectorSpace(op->domain(), num_blocks);
215  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > mv_range =
216  Thyra::multiVectorProductVectorSpace(op->range(), num_blocks);
217  return nonconstMultiVectorLinearOpWithSolveFactory(lowsf, mv_range, mv_domain);
218 }
219 
220 /** \brief Nonmember constructor.
221  *
222  * \relates MultiVectorLinearOpWithSolveFactory
223  */
224 template<class Scalar>
225 RCP<MultiVectorLinearOpWithSolveFactory<Scalar> >
227  const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
228  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
229  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
230  )
231 {
232  RCP<MultiVectorLinearOpWithSolveFactory<Scalar> > mvlowsf =
234  mvlowsf->initialize(lowsf,multiVecRange,multiVecDomain);
235  return mvlowsf;
236 }
237 
238 /** \brief Nonmember constructor.
239  *
240  * \relates MultiVectorLinearOpWithSolveFactory
241  */
242 template<class Scalar>
243 RCP<MultiVectorLinearOpWithSolveFactory<Scalar> >
245  const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
246  const int num_blocks
247  )
248 {
249  RCP< LinearOpWithSolveBase<Scalar> > op = lowsf->createOp();
250  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > mv_domain =
251  Thyra::multiVectorProductVectorSpace(op->domain(), num_blocks);
252  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > mv_range =
253  Thyra::multiVectorProductVectorSpace(op->range(), num_blocks);
254  return multiVectorLinearOpWithSolveFactory(lowsf, mv_range, mv_domain);
255 }
256 
257 // Overridden from Constructors/Initializers/Accessors
258 
259 template<class Scalar>
260 void
263  const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
264  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
265  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
266  )
267 {
268 #ifdef TEUCHOS_DEBUG
269  TEUCHOS_TEST_FOR_EXCEPT(is_null(lowsf));
270 #endif
271  lowsf_.initialize(lowsf);
272  multiVecRange_ = multiVecRange;
273  multiVecDomain_ = multiVecDomain;
274 }
275 
276 template<class Scalar>
277 void
280  const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf,
281  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecRange,
282  const RCP<const DefaultMultiVectorProductVectorSpace<Scalar> > &multiVecDomain
283  )
284 {
285 #ifdef TEUCHOS_DEBUG
286  TEUCHOS_TEST_FOR_EXCEPT(is_null(lowsf));
287 #endif
288  lowsf_.initialize(lowsf);
289  multiVecRange_ = multiVecRange;
290  multiVecDomain_ = multiVecDomain;
291 }
292 
293 template<class Scalar>
294 RCP<LinearOpWithSolveFactoryBase<Scalar> >
297 {
298  return lowsf_.getNonconstObj();
299 }
300 
301 template<class Scalar>
302 RCP<const LinearOpWithSolveFactoryBase<Scalar> >
305 {
306  return lowsf_.getConstObj();
307 }
308 
309 // Overridden from Teuchos::Describable
310 
311 template<class Scalar>
312 std::string
314 description() const
315 {
316  std::ostringstream oss;
317  oss << this->Teuchos::Describable::description()
318  << "{"
319  << "lowsf=";
320  if (!is_null(lowsf_.getConstObj()))
321  oss << lowsf_.getConstObj()->description();
322  else
323  oss << "NULL";
324  oss << "}";
325  return oss.str();
326 }
327 
328 // Overridden from ParameterListAcceptor
329 
330 template<class Scalar>
331 void
334  RCP<ParameterList> const& paramList
335  )
336 {
337  lowsf_.getNonconstObj()->setParameterList(paramList);
338 }
339 
340 template<class Scalar>
341 RCP<ParameterList>
344 {
345  return lowsf_.getNonconstObj()->getNonconstParameterList();
346 }
347 
348 template<class Scalar>
349 RCP<ParameterList>
352 {
353  return lowsf_.getNonconstObj()->unsetParameterList();
354 }
355 
356 template<class Scalar>
357 RCP<const ParameterList>
360 {
361  return lowsf_.getConstObj()->getParameterList();
362 }
363 
364 template<class Scalar>
365 RCP<const ParameterList>
368 {
369  return lowsf_.getConstObj()->getValidParameters();
370 }
371 
372 // Overridden from LinearOpWithSolveFactoyBase
373 
374 template<class Scalar>
375 bool
378 {
379  return lowsf_.getConstObj()->acceptsPreconditionerFactory();
380 }
381 
382 template<class Scalar>
383 void
386  const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
387  const std::string &precFactoryName
388  )
389 {
391  RCP<MVPF> mvpf = Teuchos::rcp_dynamic_cast<MVPF>(precFactory);
392  lowsf_.getNonconstObj()->setPreconditionerFactory(
393  mvpf->getNonconstPreconditionerFactory(),
394  precFactoryName);
395 }
396 
397 template<class Scalar>
398 RCP<PreconditionerFactoryBase<Scalar> >
401 {
402  RCP<PreconditionerFactoryBase<Scalar> > prec_fac =
403  lowsf_.getConstObj()->getPreconditionerFactory();
404  if (prec_fac == Teuchos::null)
405  return Teuchos::null;
406  else
407  return nonconstMultiVectorPreconditionerFactory(
408  prec_fac,
409  multiVecRange_, multiVecDomain_);
410 }
411 
412 template<class Scalar>
415  RCP<PreconditionerFactoryBase<Scalar> > *precFactory,
416  std::string *precFactoryName
417  )
418 {
419  RCP<PreconditionerFactoryBase<Scalar> > inner_precFactory;
420  lowsf_.getNonconstObj()->unsetPreconditionerFactory(
421  precFactory ? &inner_precFactory : NULL,
422  precFactoryName);
423  if (precFactory)
424  *precFactory = nonconstMultiVectorPreconditionerFactory(inner_precFactory,
425  multiVecRange_,
426  multiVecDomain_);
427 }
428 
429 template<class Scalar>
430 bool
433  const LinearOpSourceBase<Scalar> &fwdOpSrc
434  ) const
435 {
436  typedef MultiVectorLinearOp<Scalar> MVLO;
437  RCP<const MVLO> mvlo =
438  Teuchos::rcp_dynamic_cast<const MVLO>(fwdOpSrc.getOp().assert_not_null());
439  RCP<const LinearOpSourceBase<Scalar> > inner_fwdOpSrc =
440  defaultLinearOpSource<Scalar>(mvlo->getLinearOp());
441  return lowsf_.getConstObj()->isCompatible(*inner_fwdOpSrc);
442 }
443 
444 template<class Scalar>
445 RCP<LinearOpWithSolveBase<Scalar> >
447 createOp() const
448 {
449  return nonconstMultiVectorLinearOpWithSolve<Scalar>(
450  lowsf_.getConstObj()->createOp(),
451  multiVecRange_,
452  multiVecDomain_);
453 }
454 
455 template<class Scalar>
456 void
459  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
460  LinearOpWithSolveBase<Scalar> *Op,
461  const ESupportSolveUse supportSolveUse
462  ) const
463 {
464  using Teuchos::dyn_cast;
465  using Teuchos::rcp_dynamic_cast;
466 
467 #ifdef TEUCHOS_DEBUG
468  TEUCHOS_TEST_FOR_EXCEPT(0==Op);
469 #endif
470 
471  // Set the verbosity settings for the wrapped LOWSF object!
472  lowsf_.getConstObj()->setOStream(this->getOStream());
473  lowsf_.getConstObj()->setVerbLevel(this->getVerbLevel());
474 
475  typedef MultiVectorLinearOp<Scalar> MVLO;
476  typedef DefaultMultiVectorLinearOpWithSolve<Scalar> MVLOWS;
477  const RCP<const MVLO> mvlo =
478  rcp_dynamic_cast<const MVLO>(fwdOpSrc->getOp().assert_not_null());
479  MVLOWS &mvlows = dyn_cast<MVLOWS>(*Op);
480 
481  lowsf_.getConstObj()->initializeOp(
482  defaultLinearOpSource<Scalar>(mvlo->getLinearOp()),
483  mvlows.getNonconstLinearOpWithSolve().get(),
484  supportSolveUse);
485 }
486 
487 template<class Scalar>
488 void
491  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
492  LinearOpWithSolveBase<Scalar> *Op
493  ) const
494 {
495  using Teuchos::dyn_cast;
496  using Teuchos::rcp_dynamic_cast;
497 
498 #ifdef TEUCHOS_DEBUG
499  TEUCHOS_TEST_FOR_EXCEPT(0==Op);
500 #endif
501 
502  // Set the verbosity settings for the wrapped LOWSF object!
503  lowsf_.getConstObj()->setOStream(this->getOStream());
504  lowsf_.getConstObj()->setVerbLevel(this->getVerbLevel());
505 
506  typedef MultiVectorLinearOp<Scalar> MVLO;
507  typedef DefaultMultiVectorLinearOpWithSolve<Scalar> MVLOWS;
508  const RCP<const MVLO> mvlo =
509  rcp_dynamic_cast<const MVLO>(fwdOpSrc->getOp().assert_not_null());
510  MVLOWS &mvlows = dyn_cast<MVLOWS>(*Op);
511 
512  lowsf_.getConstObj()->initializeAndReuseOp(
513  defaultLinearOpSource<Scalar>(mvlo->getLinearOp()),
514  mvlows.getNonconstLinearOpWithSolve().get());
515 }
516 
517 template<class Scalar>
518 void
521  LinearOpWithSolveBase<Scalar> *Op,
522  RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
523  RCP<const PreconditionerBase<Scalar> > *prec,
524  RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
525  ESupportSolveUse *supportSolveUse
526  ) const
527 {
528  using Teuchos::dyn_cast;
529 
530 #ifdef TEUCHOS_DEBUG
531  TEUCHOS_TEST_FOR_EXCEPT(0==Op);
532 #endif
533  typedef DefaultMultiVectorLinearOpWithSolve<Scalar> MVLOWS;
534  MVLOWS &mvlowsOp = dyn_cast<MVLOWS>(*Op);
535  RCP<const LinearOpSourceBase<Scalar> > inner_fwdOpSrc;
536  RCP<const PreconditionerBase<Scalar> > inner_prec;
537  RCP<const LinearOpSourceBase<Scalar> > inner_approxFwdOpSrc;
538  lowsf_.getConstObj()->uninitializeOp(
539  mvlowsOp.getNonconstLinearOpWithSolve().get(),
540  fwdOpSrc ? &inner_fwdOpSrc : NULL,
541  prec ? &inner_prec : NULL,
542  approxFwdOpSrc ? &inner_approxFwdOpSrc : NULL,
543  supportSolveUse);
544  if (fwdOpSrc)
545  *fwdOpSrc =
546  defaultLinearOpSource<Scalar>(multiVectorLinearOp(inner_fwdOpSrc->getOp(),
547  multiVecRange_,
548  multiVecDomain_));
549  if (prec)
550  *prec = multiVectorPreconditioner(inner_prec,
551  multiVecRange_,
552  multiVecDomain_);
553  if (fwdOpSrc)
554  *approxFwdOpSrc =
555  defaultLinearOpSource<Scalar>(multiVectorLinearOp(inner_approxFwdOpSrc->getOp(),
556  multiVecRange_,
557  multiVecDomain_));
558 }
559 
560 template<class Scalar>
561 bool
564  const EPreconditionerInputType precOpType
565  ) const
566 {
567  return lowsf_.getConstObj()->supportsPreconditionerInputType(precOpType);
568 }
569 
570 template<class Scalar>
571 void
574  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
575  const RCP<const PreconditionerBase<Scalar> > &prec,
576  LinearOpWithSolveBase<Scalar> *Op,
577  const ESupportSolveUse supportSolveUse
578  ) const
579 {
580  using Teuchos::dyn_cast;
581  using Teuchos::rcp_dynamic_cast;
582 
583 #ifdef TEUCHOS_DEBUG
584  TEUCHOS_TEST_FOR_EXCEPT(0==Op);
585 #endif
586 
587  // Set the verbosity settings for the wrapped LOWSF object!
588  lowsf_.getConstObj()->setOStream(this->getOStream());
589  lowsf_.getConstObj()->setVerbLevel(this->getVerbLevel());
590 
591  typedef MultiVectorLinearOp<Scalar> MVLO;
593  typedef DefaultMultiVectorLinearOpWithSolve<Scalar> MVLOWS;
594  const RCP<const MVLO> mvlo =
595  rcp_dynamic_cast<const MVLO>(fwdOpSrc->getOp().assert_not_null());
596  const RCP<const MVP> mvp = rcp_dynamic_cast<const MVP>(prec);
597  MVLOWS &mvlows = dyn_cast<MVLOWS>(*Op);
598 
599  lowsf_.getConstObj()->initializePreconditionedOp(
600  defaultLinearOpSource<Scalar>(mvlo->getLinearOp()),
601  mvp->getPreconditioner(),
602  mvlows.getNonconstLinearOpWithSolve().get(),
603  supportSolveUse);
604 }
605 
606 template<class Scalar>
607 void
610  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
611  const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
612  LinearOpWithSolveBase<Scalar> *Op,
613  const ESupportSolveUse supportSolveUse
614  ) const
615 {
616  using Teuchos::dyn_cast;
617  using Teuchos::rcp_dynamic_cast;
618 
619 #ifdef TEUCHOS_DEBUG
620  TEUCHOS_TEST_FOR_EXCEPT(0==Op);
621 #endif
622 
623  // Set the verbosity settings for the wrapped LOWSF object!
624  lowsf_.getConstObj()->setOStream(this->getOStream());
625  lowsf_.getConstObj()->setVerbLevel(this->getVerbLevel());
626 
627  typedef MultiVectorLinearOp<Scalar> MVLO;
628  typedef DefaultMultiVectorLinearOpWithSolve<Scalar> MVLOWS;
629  const RCP<const MVLO> mvlo =
630  rcp_dynamic_cast<const MVLO>(fwdOpSrc->getOp().assert_not_null());
631  const RCP<const MVLO> amvlo =
632  rcp_dynamic_cast<const MVLO>(approxFwdOpSrc->getOp().assert_not_null());
633  MVLOWS &mvlows = dyn_cast<MVLOWS>(*Op);
634 
635  lowsf_.getConstObj()->initializeApproxPreconditionedOp(
636  defaultLinearOpSource<Scalar>(mvlo->getLinearOp()),
637  defaultLinearOpSource<Scalar>(amvlo->getLinearOp()),
638  mvlows.getNonconstLinearOpWithSolve().get(),
639  supportSolveUse);
640 }
641 
642 // protected
643 
644 template<class Scalar>
645 void
648 {
649  lowsf_.getConstObj()->setVerbLevel(this->getVerbLevel());
650  lowsf_.getConstObj()->setOStream(this->getOStream());
651 }
652 
653 } // namespace Thyra
654 
655 #endif
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Concrete PreconditionerFactoryBase subclass that wraps a preconditioner in MultiVectorPreconditioner...
RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > multiVecRange_
RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > multiVecDomain_
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
RCP< MultiVectorLinearOpWithSolveFactory< Scalar > > multiVectorLinearOpWithSolveFactory(const RCP< const LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Nonmember constructor.
virtual RCP< LinearOpWithSolveBase< Scalar > > createOp() const
Create a LinearOpWithSolveFactory for a flattened-out multi-vector.
RCP< LinearOpWithSolveFactoryBase< Scalar > > getUnderlyingLOWSF()
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
Throws exception.
RCP< MultiVectorLinearOpWithSolveFactory< Scalar > > nonconstMultiVectorLinearOpWithSolveFactory(const RCP< LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Nonmember constructor.
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Returns null .
RCP< MultiVectorLinearOpWithSolveFactory< Scalar > > nonconstMultiVectorLinearOpWithSolveFactory(const RCP< LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const int num_blocks)
Nonmember constructor.
void nonconstInitialize(const RCP< LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Initialize given a single non-const LOWSFB object.
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
void initialize(const RCP< const LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecRange, const RCP< const DefaultMultiVectorProductVectorSpace< Scalar > > &multiVecDomain)
Initialize given a single const LOWSFB object.
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *precFactory, std::string *precFactoryName)
Throws exception.
Teuchos::ConstNonconstObjectContainer< LinearOpWithSolveFactoryBase< Scalar > > LOWSF_t
Implicit concrete LinearOpBase subclass that takes a flattended out multi-vector and performs a multi...
Concrete PreconditionerBase subclass that wraps a preconditioner operator in MultiVectorLinearOp.
virtual bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, RCP< const PreconditionerBase< Scalar > > *prec, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
RCP< MultiVectorLinearOpWithSolveFactory< Scalar > > multiVectorLinearOpWithSolveFactory(const RCP< const LinearOpWithSolveFactoryBase< Scalar > > &lowsf, const int num_blocks)
Nonmember constructor.
void informUpdatedVerbosityState() const
Overridden from Teuchos::VerboseObjectBase.