Tempus  Version of the Day
Time Integration
Tempus_StepperHHTAlpha_impl.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 Tempus_StepperHHTAlpha_impl_hpp
10 #define Tempus_StepperHHTAlpha_impl_hpp
11 
12 #include "Tempus_config.hpp"
14 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
15 #include "NOX_Thyra.H"
16 
17 //#define VERBOSE_DEBUG_OUTPUT
18 //#define DEBUG_OUTPUT
19 
20 namespace Tempus {
21 
22 // Forward Declaration for recursive includes (this Stepper <--> StepperFactory)
23 template<class Scalar> class StepperFactory;
24 
25 
26 template<class Scalar>
28 predictVelocity(Thyra::VectorBase<Scalar>& vPred,
29  const Thyra::VectorBase<Scalar>& v,
30  const Thyra::VectorBase<Scalar>& a,
31  const Scalar dt) const
32 {
33 #ifdef VERBOSE_DEBUG_OUTPUT
34  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
35 #endif
36  //vPred = v + dt*(1.0-gamma_)*a
37  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0, v, dt*(1.0-gamma_), a);
38 }
39 
40 template<class Scalar>
42 predictDisplacement(Thyra::VectorBase<Scalar>& dPred,
43  const Thyra::VectorBase<Scalar>& d,
44  const Thyra::VectorBase<Scalar>& v,
45  const Thyra::VectorBase<Scalar>& a,
46  const Scalar dt) const
47 {
48 #ifdef VERBOSE_DEBUG_OUTPUT
49  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
50 #endif
51  //dPred = dt*v + dt*dt/2.0*(1.0-2.0*beta_)*a
52  Scalar aConst = dt*dt/2.0*(1.0-2.0*beta_);
53  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), dt, v, aConst, a);
54  //dPred += d;
55  Thyra::Vp_V(Teuchos::ptrFromRef(dPred), d, 1.0);
56 }
57 
58 
59 template<class Scalar>
61 predictVelocity_alpha_f(Thyra::VectorBase<Scalar>& vPred,
62  const Thyra::VectorBase<Scalar>& v) const
63 {
64 #ifdef VERBOSE_DEBUG_OUTPUT
65  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
66 #endif
67  //vPred = (1-alpha_f)*vPred + alpha_f*v
68  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0-alpha_f_, vPred, alpha_f_, v);
69 }
70 
71 
72 template<class Scalar>
74 predictDisplacement_alpha_f(Thyra::VectorBase<Scalar>& dPred,
75  const Thyra::VectorBase<Scalar>& d) const
76 {
77 #ifdef VERBOSE_DEBUG_OUTPUT
78  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
79 #endif
80  //dPred = (1-alpha_f)*dPred + alpha_f*d
81  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), 1.0-alpha_f_, dPred, alpha_f_, d);
82 }
83 
84 template<class Scalar>
86 correctAcceleration(Thyra::VectorBase<Scalar>& a_n_plus1,
87  const Thyra::VectorBase<Scalar>& a_n) const
88 {
89 #ifdef VERBOSE_DEBUG_OUTPUT
90  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
91 #endif
92  Scalar c = 1.0/(1.0-alpha_m_);
93  //a_n_plus1 = 1.0/(1.0-alpha_m_)*a_n_plus1 - alpha_m/(1.0-alpha_m)*a_n = (1-alpha_f)*vPred + alpha_f*v
94  Thyra::V_StVpStV(Teuchos::ptrFromRef(a_n_plus1), c, a_n_plus1, -c*alpha_m_, a_n);
95 }
96 
97 
98 
99 template<class Scalar>
101 correctVelocity(Thyra::VectorBase<Scalar>& v,
102  const Thyra::VectorBase<Scalar>& vPred,
103  const Thyra::VectorBase<Scalar>& a,
104  const Scalar dt) const
105 {
106 #ifdef VERBOSE_DEBUG_OUTPUT
107  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
108 #endif
109  //v = vPred + dt*gamma_*a
110  Thyra::V_StVpStV(Teuchos::ptrFromRef(v), 1.0, vPred, dt*gamma_, a);
111 }
112 
113 template<class Scalar>
115 correctDisplacement(Thyra::VectorBase<Scalar>& d,
116  const Thyra::VectorBase<Scalar>& dPred,
117  const Thyra::VectorBase<Scalar>& a,
118  const Scalar dt) const
119 {
120 #ifdef VERBOSE_DEBUG_OUTPUT
121  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
122 #endif
123  //d = dPred + beta_*dt*dt*a
124  Thyra::V_StVpStV(Teuchos::ptrFromRef(d), 1.0, dPred, beta_*dt*dt, a);
125 }
126 
127 
128 
129 template<class Scalar>
131 {
132  if (schemeName_ != "Newmark Beta User Defined") {
133  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
134  << schemeName_ << "').\n"
135  << " Leaving as beta = " << beta_ << "!\n";
136  return;
137  }
138 
139  beta_ = beta;
140 
141  if (beta_ == 0.0) {
142  *out_ << "\nWARNING: Running (implicit implementation of) Newmark "
143  << "Implicit a-Form Stepper with Beta = 0.0, which \n"
144  << "specifies an explicit scheme. Mass lumping is not possible, "
145  << "so this will be slow! To run explicit \n"
146  << "implementation of Newmark Implicit a-Form Stepper, please "
147  << "re-run with 'Stepper Type' = 'Newmark Explicit a-Form'.\n"
148  << "This stepper allows for mass lumping when called through "
149  << "Piro::TempusSolver.\n";
150  }
151 
152  TEUCHOS_TEST_FOR_EXCEPTION( (beta_ > 1.0) || (beta_ < 0.0),
153  std::logic_error,
154  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Beta = "
155  << beta_ << ". Please select Beta >= 0 and <= 1. \n");
156 
157  this->isInitialized_ = false;
158 }
159 
160 
161 template<class Scalar>
163 {
164  if (schemeName_ != "Newmark Beta User Defined") {
165  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
166  << schemeName_ << "').\n"
167  << " Leaving as gamma = " << gamma_ << "!\n";
168  return;
169  }
170 
171  gamma_ = gamma;
172 
173  TEUCHOS_TEST_FOR_EXCEPTION( (gamma_ > 1.0) || (gamma_ < 0.0),
174  std::logic_error,
175  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Gamma ="
176  <<gamma_ << ". Please select Gamma >= 0 and <= 1. \n");
177 
178  this->isInitialized_ = false;
179 }
180 
181 
182 template<class Scalar>
184 {
185  alpha_f_ = alpha_f;
186 
187  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_f_ > 1.0) || (alpha_f_ < 0.0),
188  std::logic_error,
189  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_f = "
190  << alpha_f_ << ". Please select Alpha_f >= 0 and <= 1. \n");
191 
192  this->isInitialized_ = false;
193 }
194 
195 
196 template<class Scalar>
198 {
199  alpha_m_ = alpha_m;
200 
201  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_m_ >= 1.0) || (alpha_m_ < 0.0),
202  std::logic_error,
203  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_m = "
204  << alpha_m_ << ". Please select Alpha_m >= 0 and < 1. \n");
205 
206  this->isInitialized_ = false;
207 }
208 
209 
210 template<class Scalar>
212  std::string schemeName)
213 {
214  schemeName_ = schemeName;
215 
216  if (schemeName_ == "Newmark Beta Average Acceleration") {
217  beta_= 0.25; gamma_ = 0.5;
218  }
219  else if (schemeName_ == "Newmark Beta Linear Acceleration") {
220  beta_= 0.25; gamma_ = 1.0/6.0;
221  }
222  else if (schemeName_ == "Newmark Beta Central Difference") {
223  beta_= 0.0; gamma_ = 0.5;
224  }
225  else if (schemeName_ == "Newmark Beta User Defined") {
226  beta_= 0.25; gamma_ = 0.5; // Use defaults until setBeta and setGamma calls.
227  }
228  else {
229  TEUCHOS_TEST_FOR_EXCEPTION(true,
230  std::logic_error,
231  "\nError in Tempus::StepperHHTAlpha! "
232  <<"Invalid Scheme Name = " << schemeName_ <<". \n"
233  <<"Valid Scheme Names are: 'Newmark Beta Average Acceleration', "
234  <<"'Newmark Beta Linear Acceleration', \n"
235  <<"'Newmark Beta Central Difference' and 'Newmark Beta User Defined'.\n");
236  }
237 
238  this->isInitialized_ = false;
239 }
240 
241 
242 template<class Scalar>
244  out_(Teuchos::VerboseObjectBase::getDefaultOStream())
245 {
246 #ifdef VERBOSE_DEBUG_OUTPUT
247  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
248 #endif
249 
250  this->setStepperType( "HHT-Alpha");
251  this->setUseFSAL( this->getUseFSALDefault());
254  this->setZeroInitialGuess( false);
255  this->setSchemeName( "Newmark Beta Average Acceleration");
256  this->setAlphaF( 0.0);
257  this->setAlphaM( 0.0);
258 
259  this->setObserver();
260  this->setDefaultSolver();
261 }
262 
263 
264 template<class Scalar>
266  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
267  const Teuchos::RCP<StepperObserver<Scalar> >& obs,
268  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
269  bool useFSAL,
270  std::string ICConsistency,
271  bool ICConsistencyCheck,
272  bool zeroInitialGuess,
273  std::string schemeName,
274  Scalar beta,
275  Scalar gamma,
276  Scalar alpha_f,
277  Scalar alpha_m)
278  : out_(Teuchos::VerboseObjectBase::getDefaultOStream())
279 {
280  this->setStepperType( "HHT-Alpha");
281  this->setUseFSAL( useFSAL);
282  this->setICConsistency( ICConsistency);
283  this->setICConsistencyCheck( ICConsistencyCheck);
284  this->setZeroInitialGuess( zeroInitialGuess);
285  this->setSchemeName( schemeName);
286  if (schemeName == "Newmark Beta User Defined") {
287  this->setBeta( beta);
288  this->setGamma( gamma);
289  }
290  this->setAlphaF( alpha_f);
291  this->setAlphaM( alpha_m);
292 
293  this->setObserver(obs);
294  this->setSolver(solver);
295 
296  if (appModel != Teuchos::null) {
297  this->setModel(appModel);
298  this->initialize();
299  }
300 }
301 
302 
303 template<class Scalar>
305  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel)
306 {
307 #ifdef VERBOSE_DEBUG_OUTPUT
308  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
309 #endif
310  validSecondOrderODE_DAE(appModel);
311  Teuchos::RCP<WrapperModelEvaluatorSecondOrder<Scalar> > wrapperModel =
312  Teuchos::rcp(new WrapperModelEvaluatorSecondOrder<Scalar>(appModel,
313  "HHT-Alpha"));
314  this->wrapperModel_ = wrapperModel;
315 
316  TEUCHOS_TEST_FOR_EXCEPTION(this->solver_ == Teuchos::null, std::logic_error,
317  "Error - Solver is not set!\n");
318  if (this->wrapperModel_ != Teuchos::null)
319  this->solver_->setModel(this->wrapperModel_);
320 
321  this->isInitialized_ = false;
322 }
323 
324 
325 template<class Scalar>
327  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
328 {
329 #ifdef VERBOSE_DEBUG_OUTPUT
330  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
331 #endif
332  this->checkInitialized();
333 
334  using Teuchos::RCP;
335 
336  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperHHTAlpha::takeStep()");
337  {
338  TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
339  std::logic_error,
340  "Error - StepperHHTAlpha<Scalar>::takeStep(...)\n"
341  "Need at least two SolutionStates for HHTAlpha.\n"
342  " Number of States = " << solutionHistory->getNumStates() << "\n"
343  "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
344  " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
345 
346  RCP<SolutionState<Scalar> > workingState=solutionHistory->getWorkingState();
347  RCP<SolutionState<Scalar> > currentState=solutionHistory->getCurrentState();
348 
349  Teuchos::RCP<WrapperModelEvaluatorSecondOrder<Scalar> > wrapperModel =
350  Teuchos::rcp_dynamic_cast<WrapperModelEvaluatorSecondOrder<Scalar> >(
351  this->wrapperModel_);
352 
353  //Get values of d, v and a from previous step
354  RCP<const Thyra::VectorBase<Scalar> > d_old = currentState->getX();
355  RCP<const Thyra::VectorBase<Scalar> > v_old = currentState->getXDot();
356  RCP<Thyra::VectorBase<Scalar> > a_old = currentState->getXDotDot();
357 
358 #ifdef DEBUG_OUTPUT
359  //IKT, 3/21/17, debug output: pring d_old, v_old, a_old to check for
360  // correctness.
361  *out_ << "IKT d_old = " << Thyra::max(*d_old) << "\n";
362  *out_ << "IKT v_old = " << Thyra::max(*v_old) << "\n";
363 #endif
364 
365  //Get new values of d, v and a from current workingState
366  //(to be updated here)
367  RCP<Thyra::VectorBase<Scalar> > d_new = workingState->getX();
368  RCP<Thyra::VectorBase<Scalar> > v_new = workingState->getXDot();
369  RCP<Thyra::VectorBase<Scalar> > a_new = workingState->getXDotDot();
370 
371  //Get time and dt
372  const Scalar time = currentState->getTime();
373  const Scalar dt = workingState->getTimeStep();
374  //Update time
375  Scalar t = time+dt;
376 
377  //Compute initial acceleration, a_old, using initial displacement (d_old) and initial
378  //velocity (v_old) if in 1st time step
379  if (time == solutionHistory->minTime()) {
380  RCP<Thyra::VectorBase<Scalar> > d_init = Thyra::createMember(d_old->space());
381  RCP<Thyra::VectorBase<Scalar> > v_init = Thyra::createMember(v_old->space());
382  RCP<Thyra::VectorBase<Scalar> > a_init = Thyra::createMember(a_old->space());
383  Thyra::copy(*d_old, d_init.ptr());
384  Thyra::copy(*v_old, v_init.ptr());
385  if (this->initialGuess_ != Teuchos::null) { //set initial guess for Newton, if provided
386  //Throw an exception if initial_guess is not compatible with solution
387  bool is_compatible = (a_init->space())->isCompatible(*this->initialGuess_->space());
388  TEUCHOS_TEST_FOR_EXCEPTION(
389  is_compatible != true, std::logic_error,
390  "Error in Tempus::NemwarkImplicitAForm takeStep(): user-provided initial guess'!\n"
391  << "for Newton is not compatible with solution vector!\n");
392  Thyra::copy(*this->initialGuess_, a_init.ptr());
393  }
394  else { //if no initialGuess_ provide, set 0 initial guess
395  Thyra::put_scalar(0.0, a_init.ptr());
396  }
397  wrapperModel->initializeNewmark(v_init,d_init,0.0,time,beta_,gamma_);
398  const Thyra::SolveStatus<Scalar> sStatus=this->solveImplicitODE(a_init);
399 
400  workingState->setSolutionStatus(sStatus); // Converged --> pass.
401  Thyra::copy(*a_init, a_old.ptr());
402  }
403 #ifdef DEBUG_OUTPUT
404  //IKT, 3/30/17, debug output: pring a_old to check for correctness.
405  *out_ << "IKT a_old = " << Thyra::max(*a_old) << "\n";
406 #endif
407 
408 
409  //allocate d and v predictors
410  RCP<Thyra::VectorBase<Scalar> > d_pred =Thyra::createMember(d_old->space());
411  RCP<Thyra::VectorBase<Scalar> > v_pred =Thyra::createMember(v_old->space());
412 
413  //compute displacement and velocity predictors
414  predictDisplacement(*d_pred, *d_old, *v_old, *a_old, dt);
415  predictVelocity(*v_pred, *v_old, *a_old, dt);
416 
417  //compute second displacement and velocity predictors (those that are functions of alpha_f)
418  predictDisplacement_alpha_f(*d_pred, *d_old);
419  predictVelocity_alpha_f(*v_pred, *v_old);
420 
421  //inject d_pred, v_pred, a and other relevant data into wrapperModel
422  wrapperModel->initializeNewmark(v_pred,d_pred,dt,t,beta_,gamma_);
423 
424  //Solve for new acceleration
425  const Thyra::SolveStatus<Scalar> sStatus = this->solveImplicitODE(a_new);
426 
427  //correct acceleration (function of alpha_m)
428  correctAcceleration(*a_new, *a_old);
429 
430  //correct velocity and displacement
431  correctVelocity(*v_new, *v_pred, *a_new, dt);
432  correctDisplacement(*d_new, *d_pred, *a_new, dt);
433 
434  workingState->setSolutionStatus(sStatus); // Converged --> pass.
435  workingState->setOrder(this->getOrder());
436  workingState->computeNorms(currentState);
437  }
438  return;
439 }
440 
441 
442 
443 /** \brief Provide a StepperState to the SolutionState.
444  * This Stepper does not have any special state data,
445  * so just provide the base class StepperState with the
446  * Stepper description. This can be checked to ensure
447  * that the input StepperState can be used by this Stepper.
448  */
449 template<class Scalar>
450 Teuchos::RCP<Tempus::StepperState<Scalar> >
453 {
454 #ifdef VERBOSE_DEBUG_OUTPUT
455  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
456 #endif
457  Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
458  rcp(new StepperState<Scalar>(this->getStepperType()));
459  return stepperState;
460 }
461 
462 
463 template<class Scalar>
465  Teuchos::FancyOStream &out,
466  const Teuchos::EVerbosityLevel verbLevel) const
467 {
468 #ifdef VERBOSE_DEBUG_OUTPUT
469  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
470 #endif
471 
472  out << std::endl;
473  Stepper<Scalar>::describe(out, verbLevel);
474  StepperImplicit<Scalar>::describe(out, verbLevel);
475 
476  out << "--- StepperHHTAlpha ---\n";
477  out << " schemeName_ = " << schemeName_ << std::endl;
478  out << " beta_ = " << beta_ << std::endl;
479  out << " gamma_ = " << gamma_ << std::endl;
480  out << " alpha_f_ = " << alpha_f_ << std::endl;
481  out << " alpha_m_ = " << alpha_m_ << std::endl;
482  out << "-----------------------" << std::endl;
483 }
484 
485 
486 template<class Scalar>
487 bool StepperHHTAlpha<Scalar>::isValidSetup(Teuchos::FancyOStream & out) const
488 {
489  bool isValidSetup = true;
490 
491  if ( !Stepper<Scalar>::isValidSetup(out) ) isValidSetup = false;
492 
493  //if ( !StepperImplicit<Scalar>::isValidSetup(out) ) isValidSetup = false;
494  if (this->wrapperModel_->getAppModel() == Teuchos::null) {
495  isValidSetup = false;
496  out << "The application ModelEvaluator is not set!\n";
497  }
498 
499  if (this->wrapperModel_ == Teuchos::null) {
500  isValidSetup = false;
501  out << "The wrapper ModelEvaluator is not set!\n";
502  }
503 
504  if (this->solver_ == Teuchos::null) {
505  isValidSetup = false;
506  out << "The solver is not set!\n";
507  }
508 
509  return isValidSetup;
510 }
511 
512 
513 template<class Scalar>
514 Teuchos::RCP<const Teuchos::ParameterList>
516 {
517 #ifdef VERBOSE_DEBUG_OUTPUT
518  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
519 #endif
520  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
521  getValidParametersBasic(pl, this->getStepperType());
522  pl->set<std::string>("Scheme Name", "Newmark Beta Average Acceleration");
523  pl->set<double> ("Beta", 0.25);
524  pl->set<double> ("Gamma", 0.5 );
525  pl->set<double> ("Alpha_f", 0.0 );
526  pl->set<double> ("Alpha_m", 0.0 );
527  pl->set<std::string>("Solver Name", "Default Solver");
528  pl->set<bool> ("Zero Initial Guess", false);
529  Teuchos::RCP<Teuchos::ParameterList> solverPL = defaultSolverParameters();
530  pl->set("Default Solver", *solverPL);
531 
532  return pl;
533 }
534 
535 
536 } // namespace Tempus
537 #endif // Tempus_StepperHHTAlpha_impl_hpp
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
void predictDisplacement(Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &d, const Thyra::VectorBase< Scalar > &v, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
void predictVelocity(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
void correctAcceleration(Thyra::VectorBase< Scalar > &a_n_plus1, const Thyra::VectorBase< Scalar > &a_n) const
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
void correctVelocity(Thyra::VectorBase< Scalar > &v, const Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > >=Teuchos::null)
Set Observer.
void correctDisplacement(Thyra::VectorBase< Scalar > &d, const Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
void predictDisplacement_alpha_f(Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &d) const
void predictVelocity_alpha_f(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v) const
Teuchos::RCP< Teuchos::FancyOStream > out_
void setSchemeName(std::string schemeName)
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setZeroInitialGuess(bool zIG)
Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False).
virtual void setSolver(Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver)
Set solver.
StepperObserver class for Stepper class.
StepperState is a simple class to hold state information about the stepper.
Thyra Base interface for time steppers.
virtual bool getICConsistencyCheckDefault() const
void setICConsistencyCheck(bool c)
virtual bool getUseFSALDefault() const
virtual void initialize()
Initialize after construction and changing input parameters.
virtual std::string getICConsistencyDefault() const
void setStepperType(std::string s)
void setICConsistency(std::string s)
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state,...
void getValidParametersBasic(Teuchos::RCP< Teuchos::ParameterList > pl, std::string stepperType)
Provide basic parameters to Steppers.
void validSecondOrderODE_DAE(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
Validate ME supports 2nd order implicit ODE/DAE evaluation, f(xdotdot,xdot,x,t) [= 0].
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.