Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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  Teuchos::RCP<const Thyra::VectorBase<Scalar> > tmp =
52  Thyra::createMember<Scalar>(dPred.space());
53  //dPred = dt*v + dt*dt/2.0*(1.0-2.0*beta_)*a
54  Scalar aConst = dt*dt/2.0*(1.0-2.0*beta_);
55  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), dt, v, aConst, a);
56  //dPred += d;
57  Thyra::Vp_V(Teuchos::ptrFromRef(dPred), d, 1.0);
58 }
59 
60 
61 template<class Scalar>
63 predictVelocity_alpha_f(Thyra::VectorBase<Scalar>& vPred,
64  const Thyra::VectorBase<Scalar>& v) const
65 {
66 #ifdef VERBOSE_DEBUG_OUTPUT
67  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
68 #endif
69  //vPred = (1-alpha_f)*vPred + alpha_f*v
70  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0-alpha_f_, vPred, alpha_f_, v);
71 }
72 
73 
74 template<class Scalar>
76 predictDisplacement_alpha_f(Thyra::VectorBase<Scalar>& dPred,
77  const Thyra::VectorBase<Scalar>& d) const
78 {
79 #ifdef VERBOSE_DEBUG_OUTPUT
80  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
81 #endif
82  //dPred = (1-alpha_f)*dPred + alpha_f*d
83  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), 1.0-alpha_f_, dPred, alpha_f_, d);
84 }
85 
86 template<class Scalar>
88 correctAcceleration(Thyra::VectorBase<Scalar>& a_n_plus1,
89  const Thyra::VectorBase<Scalar>& a_n) const
90 {
91 #ifdef VERBOSE_DEBUG_OUTPUT
92  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
93 #endif
94  Scalar c = 1.0/(1.0-alpha_m_);
95  //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
96  Thyra::V_StVpStV(Teuchos::ptrFromRef(a_n_plus1), c, a_n_plus1, -c*alpha_m_, a_n);
97 }
98 
99 
100 
101 template<class Scalar>
103 correctVelocity(Thyra::VectorBase<Scalar>& v,
104  const Thyra::VectorBase<Scalar>& vPred,
105  const Thyra::VectorBase<Scalar>& a,
106  const Scalar dt) const
107 {
108 #ifdef VERBOSE_DEBUG_OUTPUT
109  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
110 #endif
111  //v = vPred + dt*gamma_*a
112  Thyra::V_StVpStV(Teuchos::ptrFromRef(v), 1.0, vPred, dt*gamma_, a);
113 }
114 
115 template<class Scalar>
117 correctDisplacement(Thyra::VectorBase<Scalar>& d,
118  const Thyra::VectorBase<Scalar>& dPred,
119  const Thyra::VectorBase<Scalar>& a,
120  const Scalar dt) const
121 {
122 #ifdef VERBOSE_DEBUG_OUTPUT
123  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
124 #endif
125  //d = dPred + beta_*dt*dt*a
126  Thyra::V_StVpStV(Teuchos::ptrFromRef(d), 1.0, dPred, beta_*dt*dt, a);
127 }
128 
129 
130 template<class Scalar>
132  out_(Teuchos::VerboseObjectBase::getDefaultOStream())
133 {
134 #ifdef VERBOSE_DEBUG_OUTPUT
135  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
136 #endif
137 
138  this->setParameterList(Teuchos::null);
139  this->modelWarning();
140 }
141 
142 
143 template<class Scalar>
145  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
146  Teuchos::RCP<Teuchos::ParameterList> pList) :
147  out_(Teuchos::VerboseObjectBase::getDefaultOStream())
148 {
149 #ifdef VERBOSE_DEBUG_OUTPUT
150  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
151 #endif
152 
153  this->setParameterList(pList);
154 
155  if (appModel == Teuchos::null) {
156  this->modelWarning();
157  }
158  else {
159  this->setModel(appModel);
160  this->initialize();
161  }
162 }
163 
164 
165 template<class Scalar>
167  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel)
168 {
169 #ifdef VERBOSE_DEBUG_OUTPUT
170  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
171 #endif
172  this->validSecondOrderODE_DAE(appModel);
173  Teuchos::RCP<WrapperModelEvaluatorSecondOrder<Scalar> > wrapperModel =
174  Teuchos::rcp(new WrapperModelEvaluatorSecondOrder<Scalar>(appModel,
175  "HHT-Alpha"));
176  this->wrapperModel_ = wrapperModel;
177 }
178 
179 
180 template<class Scalar>
182 {
183  TEUCHOS_TEST_FOR_EXCEPTION( this->wrapperModel_ == Teuchos::null,
184  std::logic_error,
185  "Error - Need to set the model, setModel(), before calling "
186  "StepperHHTAlpha::initialize()\n");
187 
188 #ifdef VERBOSE_DEBUG_OUTPUT
189  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
190 #endif
191  this->setParameterList(this->stepperPL_);
192  this->setSolver();
193 }
194 
195 
196 template<class Scalar>
198  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
199 {
200 #ifdef VERBOSE_DEBUG_OUTPUT
201  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
202 #endif
203  using Teuchos::RCP;
204 
205  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperHHTAlpha::takeStep()");
206  {
207  TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
208  std::logic_error,
209  "Error - StepperHHTAlpha<Scalar>::takeStep(...)\n"
210  "Need at least two SolutionStates for HHTAlpha.\n"
211  " Number of States = " << solutionHistory->getNumStates() << "\n"
212  "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
213  " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
214 
215  RCP<SolutionState<Scalar> > workingState=solutionHistory->getWorkingState();
216  RCP<SolutionState<Scalar> > currentState=solutionHistory->getCurrentState();
217 
218  Teuchos::RCP<WrapperModelEvaluatorSecondOrder<Scalar> > wrapperModel =
219  Teuchos::rcp_dynamic_cast<WrapperModelEvaluatorSecondOrder<Scalar> >(
220  this->wrapperModel_);
221 
222  //Get values of d, v and a from previous step
223  RCP<const Thyra::VectorBase<Scalar> > d_old = currentState->getX();
224  RCP<const Thyra::VectorBase<Scalar> > v_old = currentState->getXDot();
225  RCP<Thyra::VectorBase<Scalar> > a_old = currentState->getXDotDot();
226 
227 #ifdef DEBUG_OUTPUT
228  //IKT, 3/21/17, debug output: pring d_old, v_old, a_old to check for
229  // correctness.
230  *out_ << "IKT d_old = " << Thyra::max(*d_old) << "\n";
231  *out_ << "IKT v_old = " << Thyra::max(*v_old) << "\n";
232 #endif
233 
234  //Get new values of d, v and a from current workingState
235  //(to be updated here)
236  RCP<Thyra::VectorBase<Scalar> > d_new = workingState->getX();
237  RCP<Thyra::VectorBase<Scalar> > v_new = workingState->getXDot();
238  RCP<Thyra::VectorBase<Scalar> > a_new = workingState->getXDotDot();
239 
240  //Get time and dt
241  const Scalar time = currentState->getTime();
242  const Scalar dt = workingState->getTimeStep();
243  //Update time
244  Scalar t = time+dt;
245 
246  //Compute initial acceleration, a_old, using initial displacement (d_old) and initial
247  //velocity (v_old) if in 1st time step
248  if (time == solutionHistory->minTime()) {
249  RCP<Thyra::VectorBase<Scalar> > d_init = Thyra::createMember(d_old->space());
250  RCP<Thyra::VectorBase<Scalar> > v_init = Thyra::createMember(v_old->space());
251  RCP<Thyra::VectorBase<Scalar> > a_init = Thyra::createMember(a_old->space());
252  Thyra::copy(*d_old, d_init.ptr());
253  Thyra::copy(*v_old, v_init.ptr());
254  if (this->initial_guess_ != Teuchos::null) { //set initial guess for Newton, if provided
255  //Throw an exception if initial_guess is not compatible with solution
256  bool is_compatible = (a_init->space())->isCompatible(*this->initial_guess_->space());
257  TEUCHOS_TEST_FOR_EXCEPTION(
258  is_compatible != true, std::logic_error,
259  "Error in Tempus::NemwarkImplicitAForm takeStep(): user-provided initial guess'!\n"
260  << "for Newton is not compatible with solution vector!\n");
261  Thyra::copy(*this->initial_guess_, a_init.ptr());
262  }
263  else { //if no initial_guess_ provide, set 0 initial guess
264  Thyra::put_scalar(0.0, a_init.ptr());
265  }
266  wrapperModel->initializeNewmark(v_init,d_init,0.0,time,beta_,gamma_);
267  const Thyra::SolveStatus<Scalar> sStatus=this->solveImplicitODE(a_init);
268 
269  workingState->setSolutionStatus(sStatus); // Converged --> pass.
270  Thyra::copy(*a_init, a_old.ptr());
271  }
272 #ifdef DEBUG_OUTPUT
273  //IKT, 3/30/17, debug output: pring a_old to check for correctness.
274  *out_ << "IKT a_old = " << Thyra::max(*a_old) << "\n";
275 #endif
276 
277 
278  //allocate d and v predictors
279  RCP<Thyra::VectorBase<Scalar> > d_pred =Thyra::createMember(d_old->space());
280  RCP<Thyra::VectorBase<Scalar> > v_pred =Thyra::createMember(v_old->space());
281 
282  //compute displacement and velocity predictors
283  predictDisplacement(*d_pred, *d_old, *v_old, *a_old, dt);
284  predictVelocity(*v_pred, *v_old, *a_old, dt);
285 
286  //compute second displacement and velocity predictors (those that are functions of alpha_f)
287  predictDisplacement_alpha_f(*d_pred, *d_old);
288  predictVelocity_alpha_f(*v_pred, *v_old);
289 
290  //inject d_pred, v_pred, a and other relevant data into wrapperModel
291  wrapperModel->initializeNewmark(v_pred,d_pred,dt,t,beta_,gamma_);
292 
293  //Solve for new acceleration
294  const Thyra::SolveStatus<Scalar> sStatus = this->solveImplicitODE(a_new);
295 
296  //correct acceleration (function of alpha_m)
297  correctAcceleration(*a_new, *a_old);
298 
299  //correct velocity and displacement
300  correctVelocity(*v_new, *v_pred, *a_new, dt);
301  correctDisplacement(*d_new, *d_pred, *a_new, dt);
302 
303  workingState->setSolutionStatus(sStatus); // Converged --> pass.
304  workingState->setOrder(this->getOrder());
305  }
306  return;
307 }
308 
309 
310 
311 /** \brief Provide a StepperState to the SolutionState.
312  * This Stepper does not have any special state data,
313  * so just provide the base class StepperState with the
314  * Stepper description. This can be checked to ensure
315  * that the input StepperState can be used by this Stepper.
316  */
317 template<class Scalar>
318 Teuchos::RCP<Tempus::StepperState<Scalar> >
321 {
322 #ifdef VERBOSE_DEBUG_OUTPUT
323  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
324 #endif
325  Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
326  rcp(new StepperState<Scalar>(description()));
327  return stepperState;
328 }
329 
330 
331 template<class Scalar>
333 {
334 #ifdef VERBOSE_DEBUG_OUTPUT
335  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
336 #endif
337  std::string name = "HHT-Alpha";
338  return(name);
339 }
340 
341 
342 template<class Scalar>
344  Teuchos::FancyOStream &out,
345  const Teuchos::EVerbosityLevel /* verbLevel */) const
346 {
347 #ifdef VERBOSE_DEBUG_OUTPUT
348  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
349 #endif
350  out << description() << "::describe:" << std::endl
351  << "wrapperModel_ = " << this->wrapperModel_->description() << std::endl;
352 }
353 
354 
355 template <class Scalar>
357  Teuchos::RCP<Teuchos::ParameterList> const& pList)
358 {
359 #ifdef VERBOSE_DEBUG_OUTPUT
360  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
361 #endif
362  if (pList == Teuchos::null) {
363  // Create default parameters if null, otherwise keep current parameters.
364  if (this->stepperPL_ == Teuchos::null) this->stepperPL_ = this->getDefaultParameters();
365  } else {
366  this->stepperPL_ = pList;
367  }
368  // Can not validate because of optional Parameters.
369  //stepperPL_->validateParametersAndSetDefaults(*this->getValidParameters());
370  //Get beta and gamma from parameter list
371  //IKT, FIXME: does parameter list get validated somewhere? validateParameters above is commented out...
372 
373  Teuchos::RCP<Teuchos::ParameterList> stepperPL = this->stepperPL_;
374  std::string stepperType = stepperPL->get<std::string>("Stepper Type");
375  TEUCHOS_TEST_FOR_EXCEPTION( stepperType != "HHT-Alpha",
376  std::logic_error,
377  "\nError - Stepper Type is not 'HHT-Alpha'!\n" << "Stepper Type = "
378  << stepperPL->get<std::string>("Stepper Type") << "\n");
379  beta_ = 0.25; //default value
380  gamma_ = 0.5; //default value
381  //IKT, FIXME: test this scheme for alpha_f and alpha_m != 0.0.
382  //Once that is done, logic should be changed to allow user to select
383  //these options from the parameter list.
384  alpha_f_ = 0.0; //default value. Hard-coded for Newmark-Beta for now.
385  alpha_m_ = 0.0; //default value. Hard-coded for Newmark-Beta for now.
386  Teuchos::RCP<Teuchos::FancyOStream> out =
387  Teuchos::VerboseObjectBase::getDefaultOStream();
388  if (this->stepperPL_->isSublist("HHT-Alpha Parameters")) {
389  Teuchos::ParameterList &HHTalphaPL =
390  this->stepperPL_->sublist("HHT-Alpha Parameters", true);
391  std::string scheme_name = HHTalphaPL.get("Scheme Name", "Not Specified");
392  alpha_m_ = HHTalphaPL.get("Alpha_m", 0.0);
393  alpha_f_ = HHTalphaPL.get("Alpha_f", 0.0);
394  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_m_ >= 1.0) || (alpha_m_ < 0.0),
395  std::logic_error,
396  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_m = "
397  << alpha_m_ << ". Please select Alpha_m >= 0 and < 1. \n");
398  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_f_ > 1.0) || (alpha_f_ < 0.0),
399  std::logic_error,
400  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_f = "
401  << alpha_f_ << ". Please select Alpha_f >= 0 and <= 1. \n");
402  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_m_ != 0.0) || (alpha_f_ != 0.0),
403  std::logic_error,
404  "\nError - 'HHT-Alpha' stepper has not been verified yet for "
405  "Alpha_m, Alpha_f != 0! \n" << "You have specified Alpha_m = "
406  << alpha_m_ << ", Alpha_f = " << alpha_f_ <<".\n");
407  if (scheme_name == "Newmark Beta") {
408  beta_ = HHTalphaPL.get("Beta", 0.25);
409  gamma_ = HHTalphaPL.get("Gamma", 0.5);
410  TEUCHOS_TEST_FOR_EXCEPTION( (beta_ > 1.0) || (beta_ < 0.0),
411  std::logic_error,
412  "\nError in 'HHT-Alpha' stepper: invalid value of Beta = "
413  << beta_ << ". Please select Beta >= 0 and <= 1. \n");
414  TEUCHOS_TEST_FOR_EXCEPTION( (gamma_ > 1.0) || (gamma_ < 0.0),
415  std::logic_error,
416  "\nError in 'HHT-Alpha' stepper: invalid value of Gamma = "
417  <<gamma_ << ". Please select Gamma >= 0 and <= 1. \n");
418  *out << "\n \nScheme Name = Newmark Beta. Setting Alpha_f = "
419  << "Alpha_m = 0. Setting \n" << "Beta = " << beta_
420  << " and Gamma = " << gamma_
421  << " from HHT-Alpha Parameters in input file.\n\n";
422  }
423  else {
424  *out << "\n \nScheme Name = " << scheme_name
425  << ". Using values of Alpha_m, Alpha_f, \n"
426  << "Beta and Gamma for this scheme (ignoring values of "
427  << "Alpha_m, Alpha_f, Beta and Gamma \n"
428  << "in input file, if provided).\n";
429  if (scheme_name == "Newmark Beta Average Acceleration") {
430  beta_ = 0.25; gamma_ = 0.5;
431  }
432  else if (scheme_name == "Newmark Beta Linear Acceleration") {
433  beta_ = 0.25; gamma_ = 1.0/6.0;
434  }
435  else if (scheme_name == "Newmark Beta Central Difference") {
436  beta_ = 0.0; gamma_ = 0.5;
437  }
438  else {
439  TEUCHOS_TEST_FOR_EXCEPTION(true,
440  std::logic_error,
441  "\nError in Tempus::StepperHHTAlpha! Invalid Scheme Name = "
442  << scheme_name <<". \n"
443  <<"Valid Scheme Names are: 'Newmark Beta', 'Newmark Beta "
444  <<"Average Acceleration', \n"
445  <<"'Newmark Beta Linear Acceleration', and 'Newmark Beta "
446  <<"Central Difference'.\n");
447  }
448  *out << "===> Alpha_m = " << alpha_m_ << ", Alpha_f = " << alpha_f_
449  << ", Beta = " << beta_ << ", Gamma = " << gamma_ << "\n";
450  }
451  if (beta_ == 0.0) {
452  *out << "\n \nRunning HHT-Alpha Stepper with Beta = 0.0, which \n"
453  << "specifies an explicit scheme. WARNING: code has not been "
454  << "optimized \nyet for this case (no mass lumping)\n";
455  }
456  }
457  else {
458  *out << "\n \nNo HHT-Alpha Parameters sublist found in input file; "
459  << "using default values of Beta = "
460  << beta_ << " and Gamma = " << gamma_ << ".\n\n";
461  }
462 }
463 
464 
465 template<class Scalar>
466 Teuchos::RCP<const Teuchos::ParameterList>
468 {
469 #ifdef VERBOSE_DEBUG_OUTPUT
470  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
471 #endif
472  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
473  pl->setName("Default Stepper - " + this->description());
474  pl->set<std::string>("Stepper Type", this->description());
475  this->getValidParametersBasic(pl);
476  pl->set<bool> ("Zero Initial Guess", false);
477  pl->set<std::string>("Solver Name", "",
478  "Name of ParameterList containing the solver specifications.");
479 
480  return pl;
481 }
482 template<class Scalar>
483 Teuchos::RCP<Teuchos::ParameterList>
485 {
486 #ifdef VERBOSE_DEBUG_OUTPUT
487  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
488 #endif
489  using Teuchos::RCP;
490  using Teuchos::ParameterList;
491  using Teuchos::rcp_const_cast;
492 
493  RCP<ParameterList> pl =
494  rcp_const_cast<ParameterList>(this->getValidParameters());
495 
496  pl->set<std::string>("Solver Name", "Default Solver");
497  RCP<ParameterList> solverPL = this->defaultSolverParameters();
498  pl->set("Default Solver", *solverPL);
499 
500  return pl;
501 }
502 
503 
504 template <class Scalar>
505 Teuchos::RCP<Teuchos::ParameterList>
507 {
508 #ifdef VERBOSE_DEBUG_OUTPUT
509  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
510 #endif
511  return(this->stepperPL_);
512 }
513 
514 
515 template <class Scalar>
516 Teuchos::RCP<Teuchos::ParameterList>
518 {
519 #ifdef VERBOSE_DEBUG_OUTPUT
520  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
521 #endif
522  Teuchos::RCP<Teuchos::ParameterList> temp_plist = this->stepperPL_;
523  this->stepperPL_ = Teuchos::null;
524  return(temp_plist);
525 }
526 
527 
528 } // namespace Tempus
529 #endif // Tempus_StepperHHTAlpha_impl_hpp
void correctDisplacement(Thyra::VectorBase< Scalar > &d, const Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &a, const Scalar dt) 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 modelWarning() const
void correctAcceleration(Thyra::VectorBase< Scalar > &a_n_plus1, const Thyra::VectorBase< Scalar > &a_n) const
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
StepperHHTAlpha()
Default constructor.
A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state...
StepperState is a simple class to hold state information about the stepper.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
void predictVelocity_alpha_f(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v) const
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
void predictDisplacement_alpha_f(Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &d) const
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 std::string description() const
Teuchos::RCP< Teuchos::FancyOStream > out_
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
void predictVelocity(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
virtual void initialize()
Initialize during construction and after changing input parameters.
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.