Stratimikos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_MLPreconditionerFactory.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Stratimikos: Thyra-based strategies for linear solvers
5 // Copyright (2006) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
43 
45 #include "Thyra_EpetraLinearOp.hpp"
46 #include "Thyra_DefaultPreconditioner.hpp"
47 #include "ml_MultiLevelPreconditioner.h"
48 #include "ml_MultiLevelOperator.h"
49 #include "ml_ValidateParameters.h"
50 #include "ml_RefMaxwell.h"
51 #include "ml_GradDiv.h"
52 #include "Epetra_RowMatrix.h"
54 #include "Teuchos_dyn_cast.hpp"
55 #include "Teuchos_TimeMonitor.hpp"
60 
61 
62 namespace {
63 
64 
66  ML_PROBTYPE_NONE,
67  ML_PROBTYPE_SMOOTHED_AGGREGATION,
68  ML_PROBTYPE_NONSYMMETRIC_SMOOTHED_AGGREGATION,
69  ML_PROBTYPE_DOMAIN_DECOMPOSITION,
70  ML_PROBTYPE_DOMAIN_DECOMPOSITION_ML,
71  ML_PROBTYPE_MAXWELL,
72  ML_PROBTYPE_REFMAXWELL,
73  ML_PROBTYPE_GRADDIV
74 };
75 const std::string BaseMethodDefaults_valueNames_none = "none";
76 const Teuchos::Array<std::string> BaseMethodDefaults_valueNames
77 = Teuchos::tuple<std::string>(
78  BaseMethodDefaults_valueNames_none,
79  "SA",
80  "NSSA",
81  "DD",
82  "DD-ML",
83  "maxwell",
84  "refmaxwell",
85  "graddiv"
86  );
87 
88 
90 
91 
92 TEUCHOS_STATIC_SETUP()
93 {
95 }
96 
97 const std::string BaseMethodDefaults_name = "Base Method Defaults";
98 const std::string BaseMethodDefaults_default = "SA";
101  >
102 BaseMethodDefaults_validator;
103 
104 const std::string ReuseFineLevelSmoother_name = "Reuse Fine Level Smoother";
105 const bool ReuseFineLevelSmoother_default = false;
106 
107 const std::string MLSettings_name = "ML Settings";
108 
109 
110 } // namespace
111 
112 
113 namespace Thyra {
114 
115 
116 using Teuchos::RCP;
118 
119 
120 // Constructors/initializers/accessors
121 
122 
124  :epetraFwdOpViewExtractor_(Teuchos::rcp(new EpetraOperatorViewExtractorStd()))
125 {}
126 
127 
128 // Overridden from PreconditionerFactoryBase
129 
130 
132  const LinearOpSourceBase<double> &fwdOpSrc
133  ) const
134 {
135  using Teuchos::outArg;
137  EOpTransp epetraFwdOpTransp;
138  EApplyEpetraOpAs epetraFwdOpApplyAs;
139  EAdjointEpetraOp epetraFwdOpAdjointSupport;
140  double epetraFwdOpScalar;
142  fwdOp = fwdOpSrc.getOp();
143  epetraFwdOpViewExtractor_->getEpetraOpView(
144  fwdOp,
145  outArg(epetraFwdOp),outArg(epetraFwdOpTransp),
146  outArg(epetraFwdOpApplyAs),
147  outArg(epetraFwdOpAdjointSupport),
148  outArg(epetraFwdOpScalar)
149  );
150  if( !dynamic_cast<const Epetra_RowMatrix*>(&*epetraFwdOp) )
151  return false;
152  return true;
153 }
154 
155 
156 bool MLPreconditionerFactory::applySupportsConj(EConj /* conj */) const
157 {
158  return true;
159 }
160 
161 
163 {
164  return false; // See comment below
165 }
166 
167 
170 {
171  return Teuchos::rcp(new DefaultPreconditioner<double>());
172 }
173 
174 
176  const Teuchos::RCP<const LinearOpSourceBase<double> > &fwdOpSrc,
177  PreconditionerBase<double> *prec,
178  const ESupportSolveUse /* supportSolveUse */
179  ) const
180 {
181  using Teuchos::outArg;
182  using Teuchos::OSTab;
183  using Teuchos::dyn_cast;
184  using Teuchos::RCP;
185  using Teuchos::null;
186  using Teuchos::rcp;
187  using Teuchos::rcp_dynamic_cast;
188  using Teuchos::rcp_const_cast;
189  using Teuchos::set_extra_data;
190  using Teuchos::get_optional_extra_data;
192  Teuchos::Time totalTimer(""), timer("");
193  totalTimer.start(true);
194  const RCP<Teuchos::FancyOStream> out = this->getOStream();
195  const Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
196  Teuchos::OSTab tab(out);
197  if(out.get() && implicit_cast<int>(verbLevel) > implicit_cast<int>(Teuchos::VERB_LOW))
198  *out << "\nEntering Thyra::MLPreconditionerFactory::initializePrec(...) ...\n";
199 
200  // Get the problem type
201  const EMLProblemType problemType = BaseMethodDefaults_validator->getIntegralValue(*paramList_,BaseMethodDefaults_name,BaseMethodDefaults_default);
202 
203  Teuchos::RCP<const LinearOpBase<double> > fwdOp = fwdOpSrc->getOp();
204 #ifdef _DEBUG
205  TEUCHOS_TEST_FOR_EXCEPT(fwdOp.get()==NULL);
206  TEUCHOS_TEST_FOR_EXCEPT(prec==NULL);
207 #endif
208  //
209  // Unwrap and get the forward Epetra_Operator object
210  //
212  EOpTransp epetraFwdOpTransp;
213  EApplyEpetraOpAs epetraFwdOpApplyAs;
214  EAdjointEpetraOp epetraFwdOpAdjointSupport;
215  double epetraFwdOpScalar;
216  epetraFwdOpViewExtractor_->getEpetraOpView(
217  fwdOp,outArg(epetraFwdOp),outArg(epetraFwdOpTransp),outArg(epetraFwdOpApplyAs),
218  outArg(epetraFwdOpAdjointSupport),outArg(epetraFwdOpScalar)
219  );
220  // Validate what we get is what we need
222  epetraFwdRowMat = rcp_dynamic_cast<const Epetra_RowMatrix>(epetraFwdOp,true);
224  epetraFwdOpApplyAs != EPETRA_OP_APPLY_APPLY, std::logic_error
225  ,"Error, incorrect apply mode for an Epetra_RowMatrix"
226  );
227  RCP<const Epetra_CrsMatrix> epetraFwdCrsMat = rcp_dynamic_cast<const Epetra_CrsMatrix>(epetraFwdRowMat);
228 
229  //
230  // Get the concrete preconditioner object
231  //
232  DefaultPreconditioner<double>
233  *defaultPrec = &Teuchos::dyn_cast<DefaultPreconditioner<double> >(*prec);
234  //
235  // Get the EpetraLinearOp object that is used to implement the preconditoner linear op
236  //
238  epetra_precOp = rcp_dynamic_cast<EpetraLinearOp>(defaultPrec->getNonconstUnspecifiedPrecOp(),true);
239  //
240  // Get the embedded ML_Epetra Preconditioner object if it exists
241  //
245  if(epetra_precOp.get()) {
246  if(problemType == ML_PROBTYPE_REFMAXWELL)
247  rm_precOp = rcp_dynamic_cast<ML_Epetra::RefMaxwellPreconditioner>(epetra_precOp->epetra_op(),true);
248  else if(problemType == ML_PROBTYPE_GRADDIV)
249  gd_precOp = rcp_dynamic_cast<ML_Epetra::GradDivPreconditioner>(epetra_precOp->epetra_op(),true);
250  else
251  ml_precOp = rcp_dynamic_cast<ML_Epetra::MultiLevelPreconditioner>(epetra_precOp->epetra_op(),true);
252  }
253  //
254  // Get the attached forward operator if it exists and make sure that it matches
255  //
256  if(ml_precOp!=Teuchos::null) {
257  // Get the forward operator and make sure that it matches what is
258  // already being used!
259  const Epetra_RowMatrix & rm = ml_precOp->RowMatrix();
260 
261  TEUCHOS_TEST_FOR_EXCEPTION(
262  &rm!=&*epetraFwdRowMat, std::logic_error
263  ,"ML requires Epetra_RowMatrix to be the same for each initialization of the preconditioner"
264  );
265  }
266  // NOTE: No such check exists for RefMaxwell
267 
268  //
269  // Perform initialization if needed
270  //
271  const bool startingOver = (ml_precOp.get() == NULL && rm_precOp.get() == NULL);
272  if(startingOver)
273  {
274  if(out.get() && implicit_cast<int>(verbLevel) >= implicit_cast<int>(Teuchos::VERB_LOW))
275  *out << "\nCreating the initial ML_Epetra::MultiLevelPreconditioner object...\n";
276  timer.start(true);
277  // Create the initial preconditioner: DO NOT compute it yet
278 
279  if(problemType==ML_PROBTYPE_REFMAXWELL)
280  rm_precOp = rcp(new ML_Epetra::RefMaxwellPreconditioner(*epetraFwdCrsMat, paramList_->sublist(MLSettings_name),false));
281  else if(problemType==ML_PROBTYPE_GRADDIV)
282  gd_precOp = rcp(new ML_Epetra::GradDivPreconditioner(*epetraFwdCrsMat, paramList_->sublist(MLSettings_name),false));
283  else
284  ml_precOp = rcp(new ML_Epetra::MultiLevelPreconditioner(*epetraFwdRowMat, paramList_->sublist(MLSettings_name),false));
285 
286 
287  timer.stop();
288  if(out.get() && implicit_cast<int>(verbLevel) >= implicit_cast<int>(Teuchos::VERB_LOW))
289  OSTab(out).o() <<"> Creation time = "<<timer.totalElapsedTime()<<" sec\n";
290  // RAB: Above, I am just passing a string to ML::Create(...) in order
291  // get this code written. However, in the future, it would be good to
292  // copy the contents of what is in ML::Create(...) into a local
293  // function and then use switch(...) to create the initial
294  // ML_Epetra::MultiLevelPreconditioner object. This would result in better validation
295  // and faster code.
296  // Set parameters if the list exists
297  if(paramList_.get()) {
298  if (problemType==ML_PROBTYPE_REFMAXWELL) {
299  TEUCHOS_TEST_FOR_EXCEPT(0!=rm_precOp->SetParameterList(paramList_->sublist(MLSettings_name)));
300  }
301  else if (problemType==ML_PROBTYPE_GRADDIV) {
302  TEUCHOS_TEST_FOR_EXCEPT(0!=gd_precOp->SetParameterList(paramList_->sublist(MLSettings_name)));
303  }
304  else {
305  TEUCHOS_TEST_FOR_EXCEPT(0!=ml_precOp->SetParameterList(paramList_->sublist(MLSettings_name)));
306  }
307  }
308  }
309  //
310  // Attach the epetraFwdOp to the ml_precOp to guarantee that it will not go away
311  //
312  if (problemType==ML_PROBTYPE_REFMAXWELL)
313  set_extra_data(epetraFwdOp, "IFPF::epetraFwdOp", Teuchos::inOutArg(rm_precOp),
314  Teuchos::POST_DESTROY, false);
315  else if (problemType==ML_PROBTYPE_GRADDIV)
316  set_extra_data(epetraFwdOp, "IFPF::epetraFwdOp", Teuchos::inOutArg(gd_precOp),
317  Teuchos::POST_DESTROY, false);
318  else
319  set_extra_data(epetraFwdOp, "IFPF::epetraFwdOp", Teuchos::inOutArg(ml_precOp),
320  Teuchos::POST_DESTROY, false);
321  //
322  // Update the factorization
323  //
324  if(out.get() && implicit_cast<int>(verbLevel) >= implicit_cast<int>(Teuchos::VERB_LOW))
325  *out << "\nComputing the preconditioner ...\n";
326  timer.start(true);
327  if (problemType==ML_PROBTYPE_REFMAXWELL) {
328  if (startingOver) {
329  TEUCHOS_TEST_FOR_EXCEPT(0!=rm_precOp->ComputePreconditioner());
330  }
331  else {
332  TEUCHOS_TEST_FOR_EXCEPT(0!=rm_precOp->ReComputePreconditioner());
333  }
334  }
335  else if (problemType==ML_PROBTYPE_GRADDIV) {
336  if (startingOver) {
337  TEUCHOS_TEST_FOR_EXCEPT(0!=gd_precOp->ComputePreconditioner());
338  }
339  else {
340  TEUCHOS_TEST_FOR_EXCEPT(0!=gd_precOp->ReComputePreconditioner());
341  }
342  }
343  else {
344  if (startingOver) {
345  TEUCHOS_TEST_FOR_EXCEPT(0!=ml_precOp->ComputePreconditioner());
346  }
347  else {
348  TEUCHOS_TEST_FOR_EXCEPT(0!=ml_precOp->ReComputePreconditioner(paramList_->get<bool>(ReuseFineLevelSmoother_name)));
349  }
350  }
351  timer.stop();
352  if(out.get() && implicit_cast<int>(verbLevel) >= implicit_cast<int>(Teuchos::VERB_LOW))
353  OSTab(out).o() <<"=> Setup time = "<<timer.totalElapsedTime()<<" sec\n";
354  //
355  // Compute the conditioner number estimate if asked
356  //
357 
358  // ToDo: Implement
359 
360  //
361  // Attach fwdOp to the ml_precOp
362  //
363  if (problemType==ML_PROBTYPE_REFMAXWELL)
364  set_extra_data(fwdOp, "IFPF::fwdOp", Teuchos::inOutArg(rm_precOp),
365  Teuchos::POST_DESTROY, false);
366  else if (problemType==ML_PROBTYPE_GRADDIV)
367  set_extra_data(fwdOp, "IFPF::fwdOp", Teuchos::inOutArg(gd_precOp),
368  Teuchos::POST_DESTROY, false);
369  else
370  set_extra_data(fwdOp, "IFPF::fwdOp", Teuchos::inOutArg(ml_precOp),
371  Teuchos::POST_DESTROY, false);
372  //
373  // Initialize the output EpetraLinearOp
374  //
375  if(startingOver) {
376  epetra_precOp = rcp(new EpetraLinearOp);
377  }
378  // ToDo: Look into adjoints again.
379  if (problemType==ML_PROBTYPE_REFMAXWELL)
380  epetra_precOp->initialize(rm_precOp,epetraFwdOpTransp,EPETRA_OP_APPLY_APPLY_INVERSE,EPETRA_OP_ADJOINT_UNSUPPORTED);
381  else if (problemType==ML_PROBTYPE_GRADDIV)
382  epetra_precOp->initialize(gd_precOp,epetraFwdOpTransp,EPETRA_OP_APPLY_APPLY_INVERSE,EPETRA_OP_ADJOINT_UNSUPPORTED);
383  else
384  epetra_precOp->initialize(ml_precOp,epetraFwdOpTransp,EPETRA_OP_APPLY_APPLY_INVERSE,EPETRA_OP_ADJOINT_UNSUPPORTED);
385  //
386  // Initialize the preconditioner
387  //
388  defaultPrec->initializeUnspecified(
389  Teuchos::rcp_implicit_cast<LinearOpBase<double> >(epetra_precOp)
390  );
391  totalTimer.stop();
392  if(out.get() && implicit_cast<int>(verbLevel) >= implicit_cast<int>(Teuchos::VERB_LOW))
393  *out << "\nTotal time in MLPreconditionerFactory = "<<totalTimer.totalElapsedTime()<<" sec\n";
394  if(out.get() && implicit_cast<int>(verbLevel) > implicit_cast<int>(Teuchos::VERB_LOW))
395  *out << "\nLeaving Thyra::MLPreconditionerFactory::initializePrec(...) ...\n";
396 }
397 
398 
400  PreconditionerBase<double> * /* prec */,
401  Teuchos::RCP<const LinearOpSourceBase<double> > * /* fwdOp */,
402  ESupportSolveUse * /* supportSolveUse */
403  ) const
404 {
406 }
407 
408 
409 // Overridden from ParameterListAcceptor
410 
411 
413  Teuchos::RCP<ParameterList> const& paramList
414  )
415 {
416  TEUCHOS_TEST_FOR_EXCEPT(paramList.get()==NULL);
417 
418  // Do not recurse
419  paramList->validateParameters(*this->getValidParameters(),0);
420  paramList_ = paramList;
421 
422  // set default for reuse of fine level smoother
423  if(!paramList_->isType<bool>(ReuseFineLevelSmoother_name))
424  paramList_->set<bool>(ReuseFineLevelSmoother_name,ReuseFineLevelSmoother_default);
425 
426  const EMLProblemType
427  defaultType = BaseMethodDefaults_validator->getIntegralValue(
428  *paramList_,BaseMethodDefaults_name,BaseMethodDefaults_default
429  );
430  if( ML_PROBTYPE_NONE != defaultType ) {
431  const std::string defaultTypeStr = BaseMethodDefaults_valueNames[defaultType];
432 
433  // ML will do validation on its own. We don't need to duplicate that here.
434  Teuchos::ParameterList defaultParams;
435  if(defaultType == ML_PROBTYPE_REFMAXWELL) {
436  ML_Epetra::SetDefaultsRefMaxwell(defaultParams);
437  }
438  else if(defaultType == ML_PROBTYPE_GRADDIV) {
439  ML_Epetra::SetDefaultsGradDiv(defaultParams);
440  }
441  else {
442  TEUCHOS_TEST_FOR_EXCEPTION(0!=ML_Epetra::SetDefaults(defaultTypeStr,defaultParams)
444  ,"Error, the ML problem type \"" << defaultTypeStr << "\' is not recognized by ML!"
445  );
446  }
447 
448  // Note, the only way the above exception message could be generated is if
449  // a default problem type was removed from ML_Epetra::SetDefaults(...).
450  // When a new problem type is added to this function, it must be added to
451  // our enum EMLProblemType along with associated objects ... In other
452  // words, this adapter must be maintained as ML is maintained. An
453  // alternative design would be to just pass in whatever string to this
454  // function. This would improve maintainability but it would not generate
455  // very good error messages when a bad string was passed in. Currently,
456  // the error message attached to the exception will contain the list of
457  // valid problem types.
458  paramList_->sublist(MLSettings_name).setParametersNotAlreadySet(
459  defaultParams);
460  }
461 
462 }
463 
464 
467 {
468  return paramList_;
469 }
470 
471 
474 {
477  return _paramList;
478 }
479 
480 
483 {
484  return paramList_;
485 }
486 
487 
490 {
491  // NOTE: We're only going to use this function to genrate valid *Stratimikos* parameters.
492  // Since ML's parameters can be validated internally, we'll handle those separarely.
493 
494 
495  using Teuchos::rcp;
496  using Teuchos::tuple;
498  using Teuchos::rcp_implicit_cast;
500 
501  static RCP<const ParameterList> validPL;
502 
503  if(is_null(validPL)) {
504 
506  pl = rcp(new ParameterList());
507 
508  BaseMethodDefaults_validator = rcp(
510  BaseMethodDefaults_valueNames,
511  tuple<std::string>(
512  "Do not set any default parameters",
513  "Set default parameters for a smoothed aggregation method",
514  "Set default parameters for a nonsymmetric smoothed aggregation method",
515  "Set default parameters for a domain decomposition method",
516  "Set default parameters for a domain decomposition method special to ML",
517  "Set default parameters for a Maxwell-type of preconditioner",
518  "Set default parameters for a RefMaxwell-type preconditioner",
519  "Set default parameters for a Grad-Div-type preconditioner"
520  ),
521  tuple<EMLProblemType>(
522  ML_PROBTYPE_NONE,
523  ML_PROBTYPE_SMOOTHED_AGGREGATION,
524  ML_PROBTYPE_NONSYMMETRIC_SMOOTHED_AGGREGATION,
525  ML_PROBTYPE_DOMAIN_DECOMPOSITION,
526  ML_PROBTYPE_DOMAIN_DECOMPOSITION_ML,
527  ML_PROBTYPE_MAXWELL,
528  ML_PROBTYPE_REFMAXWELL,
529  ML_PROBTYPE_GRADDIV
530  ),
531  BaseMethodDefaults_name
532  )
533  );
534 
535  pl->set(BaseMethodDefaults_name,BaseMethodDefaults_default,
536  "Select the default method type which also sets parameter defaults\n"
537  "in the sublist \"" + MLSettings_name + "\"!",
538  rcp_implicit_cast<const PEV>(BaseMethodDefaults_validator)
539  );
540 
541  pl->set(ReuseFineLevelSmoother_name,ReuseFineLevelSmoother_default,
542  "Enables/disables the reuse of the fine level smoother.");
543 
544  ParameterList mlpl;
545  pl->set(MLSettings_name,mlpl,
546  "Sampling of the parameters directly accepted by ML\n"
547  "This list of parameters is generated by combining all of\n"
548  "the parameters set for all of the default problem types supported\n"
549  "by ML. Therefore, do not assume these parameters are at values that\n"
550  "are reasonable to ML. This list is just to give a sense of some of\n"
551  "the parameters that ML accepts. Consult ML documentation on how to\n"
552  "set these parameters. Also, you can print the parameter list after\n"
553  "it is used and see what defaults where set for each default problem\n"
554  "type. Warning! the parameters in this sublist are currently *not*\n"
555  "being validated by ML!"
556  );
557 
558  validPL = pl;
559 
560  }
561 
562  return validPL;
563 
564 }
565 
566 
567 // Public functions overridden from Teuchos::Describable
568 
569 
571 {
572  std::ostringstream oss;
573  oss << "Thyra::MLPreconditionerFactory";
574  return oss.str();
575 }
576 
577 
578 } // namespace Thyra
bool is_null(const boost::shared_ptr< T > &p)
Teuchos::RCP< Teuchos::ParameterList > paramList_
T & get(ParameterList &l, const std::string &name)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
T * get() const
#define TEUCHOS_ENUM_INPUT_STREAM_OPERATOR(ENUMTYPE)
basic_OSTab< char > OSTab
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
IntegralType getIntegralValue(ParameterList const &paramList, std::string const &paramName)
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
void start(bool reset=false)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
double stop()
EAdjointEpetraOp
T_To & dyn_cast(T_From &from)
void initializePrec(const Teuchos::RCP< const LinearOpSourceBase< double > > &fwdOp, PreconditionerBase< double > *prec, const ESupportSolveUse supportSolveUse) const
TypeTo implicit_cast(const TypeFrom &t)
#define TEUCHOS_ADD_STRINGTOINTEGRALVALIDATOR_CONVERTER(INTEGRALTYPE)
void uninitializePrec(PreconditionerBase< double > *prec, Teuchos::RCP< const LinearOpSourceBase< double > > *fwdOp, ESupportSolveUse *supportSolveUse) const
Teuchos::RCP< PreconditionerBase< double > > createPrec() const
bool isType(const std::string &name) const
double totalElapsedTime(bool readCurrentTime=false) const
EApplyEpetraOpAs
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
bool isCompatible(const LinearOpSourceBase< double > &fwdOp) const