Rythmos - Transient Integration for Differential Equations  Version of the Day
Rythmos_ImplicitRKStepper_def.hpp
1 //@HEADER
2 // ***********************************************************************
3 //
4 // Rythmos Package
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 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 // USA
24 // Questions? Contact Todd S. Coffey (tscoffe@sandia.gov)
25 //
26 // ***********************************************************************
27 //@HEADER
28 
29 #ifndef Rythmos_IMPLICIT_RK_STEPPER_DEF_H
30 #define Rythmos_IMPLICIT_RK_STEPPER_DEF_H
31 
32 #include "Rythmos_ImplicitRKStepper_decl.hpp"
33 
34 #include "Rythmos_StepperHelpers.hpp"
35 #include "Rythmos_SingleResidualModelEvaluator.hpp"
36 #include "Rythmos_ImplicitRKModelEvaluator.hpp"
37 #include "Rythmos_DiagonalImplicitRKModelEvaluator.hpp"
38 #include "Rythmos_RKButcherTableau.hpp"
39 #include "Rythmos_RKButcherTableauHelpers.hpp"
40 
41 #include "Thyra_ModelEvaluatorHelpers.hpp"
42 #include "Thyra_ProductVectorSpaceBase.hpp"
43 #include "Thyra_AssertOp.hpp"
44 #include "Thyra_TestingTools.hpp"
45 
46 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
47 #include "Teuchos_as.hpp"
48 
49 
50 namespace Rythmos {
51 
56 template<class Scalar>
57 RCP<ImplicitRKStepper<Scalar> >
59 {
60  RCP<ImplicitRKStepper<Scalar> > stepper(new ImplicitRKStepper<Scalar>());
61  return stepper;
62 }
63 
64 template<class Scalar>
65 RCP<ImplicitRKStepper<Scalar> >
66 implicitRKStepper(
67  const RCP<const Thyra::ModelEvaluator<Scalar> >& model,
68  const RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
69  const RCP<Thyra::LinearOpWithSolveFactoryBase<Scalar> >& irk_W_factory,
70  const RCP<const RKButcherTableauBase<Scalar> >& irkbt
71  )
72 {
73  RCP<ImplicitRKStepper<Scalar> > stepper(new ImplicitRKStepper<Scalar>());
74 
75  stepper->setModel(model);
76  stepper->setSolver(solver);
77  stepper->set_W_factory(irk_W_factory);
78  stepper->setRKButcherTableau(irkbt);
79  return stepper;
80 }
81 
82 
83 // ////////////////////////////
84 // Defintions
85 
86 
87 // Constructors, intializers, Misc.
88 
89 
90 template<class Scalar>
92 {
93  this->defaultInitializeAll_();
94  irkButcherTableau_ = rKButcherTableau<Scalar>();
95  numSteps_ = 0;
96 }
97 
98 template<class Scalar>
100 {
101  isInitialized_ = false;
102  model_ = Teuchos::null;
103  solver_ = Teuchos::null;
104  irk_W_factory_ = Teuchos::null;
105  paramList_ = Teuchos::null;
106  //basePoint_;
107  x_ = Teuchos::null;
108  x_old_ = Teuchos::null;
109  x_dot_ = Teuchos::null;
110  //timeRange_;
111  irkModel_ = Teuchos::null;
112  irkButcherTableau_ = Teuchos::null;
113  isDirk_ = false;
114  numSteps_ = -1;
115  haveInitialCondition_ = false;
116  x_stage_bar_ = Teuchos::null;
117 }
118 
119 template<class Scalar>
121  const RCP<Thyra::LinearOpWithSolveFactoryBase<Scalar> > &irk_W_factory
122  )
123 {
124  TEUCHOS_ASSERT( !is_null(irk_W_factory) );
125  irk_W_factory_ = irk_W_factory;
126 }
127 
128 template<class Scalar>
129 RCP<const Thyra::LinearOpWithSolveFactoryBase<Scalar> > ImplicitRKStepper<Scalar>::get_W_factory() const
130 {
131  return irk_W_factory_;
132 }
133 
134 // Overridden from SolverAcceptingStepperBase
135 
136 
137 template<class Scalar>
139  const RCP<Thyra::NonlinearSolverBase<Scalar> > &solver
140  )
141 {
142  TEUCHOS_TEST_FOR_EXCEPT(is_null(solver));
143  solver_ = solver;
144 }
145 
146 
147 template<class Scalar>
148 RCP<Thyra::NonlinearSolverBase<Scalar> >
150 {
151  return solver_;
152 }
153 
154 
155 template<class Scalar>
156 RCP<const Thyra::NonlinearSolverBase<Scalar> >
158 {
159  return solver_;
160 }
161 
162 
163 // Overridden from StepperBase
164 
165 
166 template<class Scalar>
168 {
169  return true;
170 }
171 
172 template<class Scalar>
174 {
175  return true;
176 }
177 
178 
179 template<class Scalar>
180 RCP<StepperBase<Scalar> >
182 {
183  // Just use the interface to clone the algorithm in a basically
184  // uninitialized state
185  RCP<ImplicitRKStepper<Scalar> >
186  stepper = Teuchos::rcp(new ImplicitRKStepper<Scalar>());
187 
188  if (!is_null(model_)) {
189  stepper->setModel(model_); // Shallow copy is okay!
190  }
191 
192  if (!is_null(irkButcherTableau_)) {
193  // 06/16/09 tscoffe: should we clone the RKBT here?
194  stepper->setRKButcherTableau(irkButcherTableau_);
195  }
196 
197  if (!is_null(solver_)) {
198  stepper->setSolver(solver_->cloneNonlinearSolver().assert_not_null());
199  }
200 
201  if (!is_null(irk_W_factory_)) {
202  // 06/16/09 tscoffe: should we clone the W_factory here?
203  stepper->set_W_factory(irk_W_factory_);
204  }
205 
206  if (!is_null(paramList_)) {
207  stepper->setParameterList(Teuchos::parameterList(*paramList_));
208  }
209 
210  return stepper;
211 }
212 
213 
214 template<class Scalar>
216  const RCP<const Thyra::ModelEvaluator<Scalar> >& model
217  )
218 {
219  TEUCHOS_TEST_FOR_EXCEPT(is_null(model));
220  assertValidModel( *this, *model );
221  model_ = model;
222 }
223 
224 
225 template<class Scalar>
227  const RCP<Thyra::ModelEvaluator<Scalar> >& model
228  )
229 {
230  this->setModel(model); // TODO 09/09/09 tscoffe: use ConstNonconstObjectContainer!
231 }
232 
233 
234 template<class Scalar>
235 RCP<const Thyra::ModelEvaluator<Scalar> >
237 {
238  return model_;
239 }
240 
241 
242 template<class Scalar>
243 RCP<Thyra::ModelEvaluator<Scalar> >
245 {
246  return Teuchos::null;
247 }
248 
249 
250 template<class Scalar>
252  const Thyra::ModelEvaluatorBase::InArgs<Scalar> &initialCondition
253  )
254 {
255 
256  typedef ScalarTraits<Scalar> ST;
257  typedef Thyra::ModelEvaluatorBase MEB;
258 
259  basePoint_ = initialCondition;
260 
261  // x
262 
263  RCP<const Thyra::VectorBase<Scalar> >
264  x_init = initialCondition.get_x();
265 
266 #ifdef HAVE_RYTHMOS_DEBUG
267  TEUCHOS_TEST_FOR_EXCEPTION(
268  is_null(x_init), std::logic_error,
269  "Error, if the client passes in an intial condition to setInitialCondition(...),\n"
270  "then x can not be null!" );
271 #endif
272 
273  x_ = x_init->clone_v();
274 
275  // x_dot
276 
277  x_dot_ = createMember(x_->space());
278 
279  RCP<const Thyra::VectorBase<Scalar> >
280  x_dot_init = initialCondition.get_x_dot();
281 
282  if (!is_null(x_dot_init))
283  assign(x_dot_.ptr(),*x_dot_init);
284  else
285  assign(x_dot_.ptr(),ST::zero());
286 
287  // t
288 
289  const Scalar t =
290  (
291  initialCondition.supports(MEB::IN_ARG_t)
292  ? initialCondition.get_t()
293  : ST::zero()
294  );
295 
296  timeRange_ = timeRange(t,t);
297 
298  // x_old
299  x_old_ = x_->clone_v();
300 
301  haveInitialCondition_ = true;
302 
303 }
304 
305 
306 template<class Scalar>
307 Thyra::ModelEvaluatorBase::InArgs<Scalar>
309 {
310  return basePoint_;
311 }
312 
313 
314 template<class Scalar>
315 Scalar ImplicitRKStepper<Scalar>::takeStep(Scalar dt, StepSizeType stepSizeType)
316 {
317 
318 
319  using Teuchos::as;
320  using Teuchos::incrVerbLevel;
321  typedef ScalarTraits<Scalar> ST;
322  typedef Thyra::NonlinearSolverBase<Scalar> NSB;
323  typedef Teuchos::VerboseObjectTempState<NSB> VOTSNSB;
324 
325  RCP<FancyOStream> out = this->getOStream();
326  Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
327  Teuchos::OSTab ostab(out,1,"takeStep");
328  VOTSNSB solver_outputTempState(solver_,out,incrVerbLevel(verbLevel,-1));
329 
330  if ( !is_null(out) && as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) ) {
331  *out
332  << "\nEntering " << Teuchos::TypeNameTraits<ImplicitRKStepper<Scalar> >::name()
333  << "::takeStep("<<dt<<","<<toString(stepSizeType)<<") ...\n";
334  }
335 
336  if (!isInitialized_) {
337  initialize_();
338  }
339 
340  TEUCHOS_TEST_FOR_EXCEPT( stepSizeType != STEP_TYPE_FIXED ); // ToDo: Handle variable case later
341 
342  // A) Set up the IRK ModelEvaluator so that it can represent the time step
343  // equation to be solved.
344 
345  // Set irkModel_ with x_old_, t_old_, and dt
346  V_V( x_old_.ptr(), *x_ );
347  Scalar current_dt = dt;
348  Scalar t = timeRange_.upper();
349 
350  // B) Solve the timestep equation
351 
352  // Set the guess for the stage derivatives to zero (unless we can think of
353  // something better)
354  V_S( Teuchos::rcp_dynamic_cast<Thyra::VectorBase<Scalar> >(x_stage_bar_).ptr(), ST::zero() );
355 
356  if (!isDirk_) { // General Implicit RK Case:
357  RCP<ImplicitRKModelEvaluator<Scalar> > firkModel_ =
358  Teuchos::rcp_dynamic_cast<ImplicitRKModelEvaluator<Scalar> >(irkModel_,true);
359  firkModel_->setTimeStepPoint( x_old_, t, current_dt );
360 
361  // Solve timestep equation
362  solver_->solve( &*x_stage_bar_ );
363 
364  } else { // Diagonal Implicit RK Case:
365 
366  RCP<DiagonalImplicitRKModelEvaluator<Scalar> > dirkModel_ =
367  Teuchos::rcp_dynamic_cast<DiagonalImplicitRKModelEvaluator<Scalar> >(irkModel_,true);
368  dirkModel_->setTimeStepPoint( x_old_, t, current_dt );
369  int numStages = irkButcherTableau_->numStages();
370  for (int stage=0 ; stage < numStages ; ++stage) {
371  dirkModel_->setCurrentStage(stage);
372  solver_->solve( &*(x_stage_bar_->getNonconstVectorBlock(stage)) );
373  dirkModel_->setStageSolution( stage, *(x_stage_bar_->getVectorBlock(stage)) );
374  }
375 
376  }
377 
378  // C) Complete the step ...
379 
380  // Combine the stage derivatives with the Butcher tableau "b" vector to obtain the solution at the final time.
381  // x_{k+1} = x_k + dt*sum_{i}^{p}(b_i*x_stage_bar_[i])
382 
383  assembleIRKSolution( irkButcherTableau_->b(), current_dt, *x_old_, *x_stage_bar_,
384  outArg(*x_)
385  );
386 
387  // Update time range
388  timeRange_ = timeRange(t,t+current_dt);
389  numSteps_++;
390 
391  return current_dt;
392 
393 }
394 
395 
396 template<class Scalar>
398 {
399  StepStatus<Scalar> stepStatus;
400 
401  if (!isInitialized_) {
402  stepStatus.stepStatus = STEP_STATUS_UNINITIALIZED;
403  stepStatus.message = "This stepper is uninitialized.";
404  return stepStatus;
405  }
406  if (numSteps_ > 0) {
407  stepStatus.stepStatus = STEP_STATUS_CONVERGED;
408  }
409  else {
410  stepStatus.stepStatus = STEP_STATUS_UNKNOWN;
411  }
412  stepStatus.stepSize = timeRange_.length();
413  stepStatus.order = irkButcherTableau_->order();
414  stepStatus.time = timeRange_.upper();
415  stepStatus.solution = x_;
416  return(stepStatus);
417 }
418 
419 
420 // Overridden from InterpolationBufferBase
421 
422 
423 template<class Scalar>
424 RCP<const Thyra::VectorSpaceBase<Scalar> >
426 {
427  return ( !is_null(model_) ? model_->get_x_space() : Teuchos::null );
428 }
429 
430 
431 template<class Scalar>
433  const Array<Scalar>& time_vec
434  ,const Array<RCP<const Thyra::VectorBase<Scalar> > >& x_vec
435  ,const Array<RCP<const Thyra::VectorBase<Scalar> > >& xdot_vec
436  )
437 {
438  TEUCHOS_TEST_FOR_EXCEPT(true);
439 }
440 
441 
442 template<class Scalar>
444 {
445  return timeRange_;
446 }
447 
448 
449 template<class Scalar>
451  const Array<Scalar>& time_vec
452  ,Array<RCP<const Thyra::VectorBase<Scalar> > >* x_vec
453  ,Array<RCP<const Thyra::VectorBase<Scalar> > >* xdot_vec
454  ,Array<ScalarMag>* accuracy_vec) const
455 {
456  using Teuchos::constOptInArg;
457  using Teuchos::null;
458  TEUCHOS_ASSERT(haveInitialCondition_);
459  defaultGetPoints<Scalar>(
460  timeRange_.lower(), constOptInArg(*x_old_),
461  Ptr<const VectorBase<Scalar> >(null), // Sun
462  timeRange_.upper(), constOptInArg(*x_),
463  Ptr<const VectorBase<Scalar> >(null), // Sun
464  time_vec,
465  ptr(x_vec), ptr(xdot_vec), ptr(accuracy_vec),
466  Ptr<InterpolatorBase<Scalar> >(null) // For Sun
467  );
468  // 04/17/09 tscoffe: Currently, we don't have x_dot to pass out (TODO)
469 }
470 
471 
472 template<class Scalar>
473 void ImplicitRKStepper<Scalar>::getNodes(Array<Scalar>* time_vec) const
474 {
475  TEUCHOS_ASSERT( time_vec != NULL );
476  time_vec->clear();
477  if (!haveInitialCondition_) {
478  return;
479  }
480  time_vec->push_back(timeRange_.lower());
481  if (numSteps_ > 0) {
482  time_vec->push_back(timeRange_.upper());
483  }
484 }
485 
486 
487 template<class Scalar>
488 void ImplicitRKStepper<Scalar>::removeNodes(Array<Scalar>& time_vec)
489 {
490  TEUCHOS_TEST_FOR_EXCEPT(true);
491 }
492 
493 
494 template<class Scalar>
496 {
497  return irkButcherTableau_->order();
498 }
499 
500 
501 // Overridden from Teuchos::ParameterListAcceptor
502 
503 
504 template <class Scalar>
506  RCP<ParameterList> const& paramList
507  )
508 {
509  TEUCHOS_TEST_FOR_EXCEPT(is_null(paramList));
510  paramList->validateParametersAndSetDefaults(*this->getValidParameters());
511  paramList_ = paramList;
512  Teuchos::readVerboseObjectSublist(&*paramList_,this);
513 }
514 
515 
516 template <class Scalar>
517 RCP<ParameterList>
519 {
520  return(paramList_);
521 }
522 
523 
524 template <class Scalar>
525 RCP<ParameterList>
527 {
528  RCP<ParameterList>
529  temp_param_list = paramList_;
530  paramList_ = Teuchos::null;
531  return(temp_param_list);
532 }
533 
534 
535 template<class Scalar>
536 RCP<const ParameterList>
538 {
539  static RCP<const ParameterList> validPL;
540  if (is_null(validPL)) {
541  RCP<ParameterList> pl = Teuchos::parameterList();
542  Teuchos::setupVerboseObjectSublist(&*pl);
543  validPL = pl;
544  }
545  return validPL;
546 }
547 
548 
549 // Overridden from Teuchos::Describable
550 
551 
552 template<class Scalar>
554  FancyOStream &out,
555  const Teuchos::EVerbosityLevel verbLevel
556  ) const
557 {
558  using std::endl;
559  using Teuchos::as;
560  if (!isInitialized_) {
561  out << this->description() << " : This stepper is not initialized yet" << std::endl;
562  return;
563  }
564  if (
565  as<int>(verbLevel) == as<int>(Teuchos::VERB_DEFAULT)
566  ||
567  as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW)
568  )
569  {
570  out << this->description() << ":" << endl;
571  Teuchos::OSTab tab(out);
572  out << "model = " << Teuchos::describe(*model_,verbLevel);
573  out << "solver = " << Teuchos::describe(*solver_,verbLevel);
574  out << "irk_W_factory = " << Teuchos::describe(*irk_W_factory_,verbLevel);
575  }
576 }
577 
578 
579 // private
580 
581 
582 template <class Scalar>
584 {
585 
586  typedef ScalarTraits<Scalar> ST;
587  using Teuchos::rcp_dynamic_cast;
588 
589  TEUCHOS_TEST_FOR_EXCEPT(is_null(model_));
590  TEUCHOS_TEST_FOR_EXCEPT(is_null(solver_));
591  TEUCHOS_TEST_FOR_EXCEPT(irkButcherTableau_->numStages() == 0);
592  TEUCHOS_ASSERT(haveInitialCondition_);
593 
594 #ifdef HAVE_RYTHMOS_DEBUG
595  THYRA_ASSERT_VEC_SPACES(
596  "Rythmos::ImplicitRKStepper::initialize_(...)",
597  *x_->space(), *model_->get_x_space() );
598 #endif
599 
600 
601  // Set up the IRK mdoel
602 
603  if (!isDirk_) { // General Implicit RK
604  TEUCHOS_TEST_FOR_EXCEPT(is_null(irk_W_factory_));
605  irkModel_ = implicitRKModelEvaluator(
606  model_,basePoint_,irk_W_factory_,irkButcherTableau_);
607  } else { // Diagonal Implicit RK
608  irkModel_ = diagonalImplicitRKModelEvaluator(
609  model_,basePoint_,irk_W_factory_,irkButcherTableau_);
610  }
611 
612  solver_->setModel(irkModel_);
613 
614  // Set up the vector of stage derivatives ...
615  const int numStages = irkButcherTableau_->numStages();
616  RCP<const Thyra::ProductVectorSpaceBase<Scalar> > pvs = productVectorSpace(model_->get_x_space(),numStages);
617  RCP<const Thyra::VectorSpaceBase<Scalar> > vs = rcp_dynamic_cast<const Thyra::VectorSpaceBase<Scalar> >(pvs,true);
618  x_stage_bar_ = rcp_dynamic_cast<Thyra::ProductVectorBase<Scalar> >(createMember(vs),true);
619 // x_stage_bar_ = rcp_dynamic_cast<Thyra::ProductVectorBase<Scalar> >(
620 // createMember(irkModel_->get_x_space())
621 // );
622 
623  isInitialized_ = true;
624 
625 }
626 
627 template <class Scalar>
628 void ImplicitRKStepper<Scalar>::setRKButcherTableau( const RCP<const RKButcherTableauBase<Scalar> > &rkButcherTableau )
629 {
630  TEUCHOS_ASSERT( !is_null(rkButcherTableau) );
631  TEUCHOS_TEST_FOR_EXCEPTION( isInitialized_, std::logic_error,
632  "Error! The RK Butcher Tableau cannot be changed after internal initialization!"
633  );
634  validateIRKButcherTableau(*rkButcherTableau);
635  irkButcherTableau_ = rkButcherTableau;
636  E_RKButcherTableauTypes rkType = determineRKBTType<Scalar>(*irkButcherTableau_);
637  if (
638  (rkType == RYTHMOS_RK_BUTCHER_TABLEAU_TYPE_DIRK)
639  || (rkType == RYTHMOS_RK_BUTCHER_TABLEAU_TYPE_SDIRK)
640  || (irkButcherTableau_->numStages() == 1)
641  )
642  {
643  isDirk_ = true;
644  }
645 }
646 
647 template <class Scalar>
648 RCP<const RKButcherTableauBase<Scalar> > ImplicitRKStepper<Scalar>::getRKButcherTableau() const
649 {
650  return irkButcherTableau_;
651 }
652 
653 template<class Scalar>
655 {
656  TEUCHOS_TEST_FOR_EXCEPTION(isInitialized_, std::logic_error,
657  "Error! Cannot change DIRK flag after internal initialization is completed\n"
658  );
659  if (isDirk == true) {
660  E_RKButcherTableauTypes rkType = determineRKBTType<Scalar>(*irkButcherTableau_);
661  bool RKBT_is_DIRK = (
662  (rkType == RYTHMOS_RK_BUTCHER_TABLEAU_TYPE_DIRK)
663  || (rkType == RYTHMOS_RK_BUTCHER_TABLEAU_TYPE_SDIRK)
664  || (irkButcherTableau_->numStages() == 1)
665  );
666  TEUCHOS_TEST_FOR_EXCEPTION( !RKBT_is_DIRK, std::logic_error,
667  "Error! Cannot set DIRK flag on a non-DIRK RK Butcher Tableau\n"
668  );
669  } else { // isDirk = false;
670  isDirk_ = isDirk;
671  }
672 }
673 
674 //
675 // Explicit Instantiation macro
676 //
677 // Must be expanded from within the Rythmos namespace!
678 //
679 
680 #define RYTHMOS_IMPLICIT_RK_STEPPER_INSTANT(SCALAR) \
681  \
682  template class ImplicitRKStepper< SCALAR >; \
683  \
684  template RCP< ImplicitRKStepper< SCALAR > > \
685  implicitRKStepper(); \
686  \
687  template RCP< ImplicitRKStepper< SCALAR > > \
688  implicitRKStepper( \
689  const RCP<const Thyra::ModelEvaluator< SCALAR > >& model, \
690  const RCP<Thyra::NonlinearSolverBase< SCALAR > >& solver, \
691  const RCP<Thyra::LinearOpWithSolveFactoryBase< SCALAR > >& irk_W_factory, \
692  const RCP<const RKButcherTableauBase< SCALAR > >& irkbt \
693  );
694 
695 } // namespace Rythmos
696 
697 #endif //Rythmos_IMPLICIT_RK_STEPPER_DEF_H
void addPoints(const Array< Scalar > &time_vec, const Array< RCP< const Thyra::VectorBase< Scalar > > > &x_vec, const Array< RCP< const Thyra::VectorBase< Scalar > > > &xdot_vec)
bool isImplicit() const
Returns true.
RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
RCP< const RKButcherTableauBase< Scalar > > getRKButcherTableau() const
void describe(FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
void setTimeStepPoint(const RCP< const Thyra::VectorBase< Scalar > > &x_old, const Scalar &t_old, const Scalar &delta_t)
Scalar takeStep(Scalar dt, StepSizeType flag)
RCP< const ParameterList > getValidParameters() const
void setRKButcherTableau(const RCP< const RKButcherTableauBase< Scalar > > &rkButcherTableau)
RCP< StepperBase< Scalar > > cloneStepperAlgorithm() const
void setSolver(const RCP< Thyra::NonlinearSolverBase< Scalar > > &solver)
const StepStatus< Scalar > getStepStatus() const
void getPoints(const Array< Scalar > &time_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *x_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *xdot_vec, Array< ScalarMag > *accuracy_vec) const
RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
void removeNodes(Array< Scalar > &time_vec)
void setInitialCondition(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &initialCondition)
RCP< ImplicitRKStepper< Scalar > > implicitRKStepper()
Nonmember constructor.
void setModel(const RCP< const Thyra::ModelEvaluator< Scalar > > &model)
void setNonconstModel(const RCP< Thyra::ModelEvaluator< Scalar > > &model)
void getNodes(Array< Scalar > *time_vec) const
bool supportsCloning() const
Returns true.
RCP< const Thyra::VectorBase< Scalar > > solution
RCP< Thyra::ModelEvaluator< Scalar > > getNonconstModel()
RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
void setTimeStepPoint(const RCP< const Thyra::VectorBase< Scalar > > &x_old, const Scalar &t_old, const Scalar &delta_t)
TimeRange< Scalar > getTimeRange() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > getInitialCondition() const
RCP< const Thyra::NonlinearSolverBase< Scalar > > getSolver() const
RCP< Thyra::NonlinearSolverBase< Scalar > > getNonconstSolver()
void setParameterList(RCP< ParameterList > const &paramList)