Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperHHTAlpha_impl.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_StepperHHTAlpha_impl_hpp
11 #define Tempus_StepperHHTAlpha_impl_hpp
12 
13 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
14 
16 
17 //#define VERBOSE_DEBUG_OUTPUT
18 //#define DEBUG_OUTPUT
19 
20 namespace Tempus {
21 
22 template <class Scalar>
25  const Thyra::VectorBase<Scalar>& a, const Scalar dt) const
26 {
27 #ifdef VERBOSE_DEBUG_OUTPUT
28  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
29 #endif
30  // vPred = v + dt*(1.0-gamma_)*a
31  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0, v, dt * (1.0 - gamma_), a);
32 }
33 
34 template <class Scalar>
38  const Scalar dt) const
39 {
40 #ifdef VERBOSE_DEBUG_OUTPUT
41  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
42 #endif
43  // dPred = dt*v + dt*dt/2.0*(1.0-2.0*beta_)*a
44  Scalar aConst = dt * dt / 2.0 * (1.0 - 2.0 * beta_);
45  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), dt, v, aConst, a);
46  // dPred += d;
47  Thyra::Vp_V(Teuchos::ptrFromRef(dPred), d, 1.0);
48 }
49 
50 template <class Scalar>
53 {
54 #ifdef VERBOSE_DEBUG_OUTPUT
55  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
56 #endif
57  // vPred = (1-alpha_f)*vPred + alpha_f*v
58  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0 - alpha_f_, vPred, alpha_f_,
59  v);
60 }
61 
62 template <class Scalar>
65 {
66 #ifdef VERBOSE_DEBUG_OUTPUT
67  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
68 #endif
69  // dPred = (1-alpha_f)*dPred + alpha_f*d
70  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), 1.0 - alpha_f_, dPred, alpha_f_,
71  d);
72 }
73 
74 template <class Scalar>
76  Thyra::VectorBase<Scalar>& a_n_plus1,
77  const Thyra::VectorBase<Scalar>& a_n) const
78 {
79 #ifdef VERBOSE_DEBUG_OUTPUT
80  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
81 #endif
82  Scalar c = 1.0 / (1.0 - alpha_m_);
83  // a_n_plus1 = 1.0/(1.0-alpha_m_)*a_n_plus1 - alpha_m/(1.0-alpha_m)*a_n =
84  // (1-alpha_f)*vPred + alpha_f*v
85  Thyra::V_StVpStV(Teuchos::ptrFromRef(a_n_plus1), c, a_n_plus1, -c * alpha_m_,
86  a_n);
87 }
88 
89 template <class Scalar>
92  const Thyra::VectorBase<Scalar>& a, const Scalar dt) const
93 {
94 #ifdef VERBOSE_DEBUG_OUTPUT
95  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
96 #endif
97  // v = vPred + dt*gamma_*a
98  Thyra::V_StVpStV(Teuchos::ptrFromRef(v), 1.0, vPred, dt * gamma_, a);
99 }
100 
101 template <class Scalar>
104  const Thyra::VectorBase<Scalar>& a, const Scalar dt) const
105 {
106 #ifdef VERBOSE_DEBUG_OUTPUT
107  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
108 #endif
109  // d = dPred + beta_*dt*dt*a
110  Thyra::V_StVpStV(Teuchos::ptrFromRef(d), 1.0, dPred, beta_ * dt * dt, a);
111 }
112 
113 template <class Scalar>
115 {
116  if (schemeName_ != "Newmark Beta User Defined") {
117  out_->setOutputToRootOnly(0);
118  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
119  << schemeName_ << "').\n"
120  << " Leaving as beta = " << beta_ << "!\n";
121  return;
122  }
123 
124  beta_ = beta;
125 
126  if (beta_ == 0.0) {
127  out_->setOutputToRootOnly(0);
128  *out_ << "\nWARNING: Running (implicit implementation of) Newmark "
129  << "Implicit a-Form Stepper with Beta = 0.0, which \n"
130  << "specifies an explicit scheme. Mass lumping is not possible, "
131  << "so this will be slow! To run explicit \n"
132  << "implementation of Newmark Implicit a-Form Stepper, please "
133  << "re-run with 'Stepper Type' = 'Newmark Explicit a-Form'.\n"
134  << "This stepper allows for mass lumping when called through "
135  << "Piro::TempusSolver.\n";
136  }
137 
139  (beta_ > 1.0) || (beta_ < 0.0), std::logic_error,
140  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Beta = "
141  << beta_ << ". Please select Beta >= 0 and <= 1. \n");
142 
143  this->isInitialized_ = false;
144 }
145 
146 template <class Scalar>
148 {
149  if (schemeName_ != "Newmark Beta User Defined") {
150  out_->setOutputToRootOnly(0);
151  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
152  << schemeName_ << "').\n"
153  << " Leaving as gamma = " << gamma_ << "!\n";
154  return;
155  }
156 
157  gamma_ = gamma;
158 
160  (gamma_ > 1.0) || (gamma_ < 0.0), std::logic_error,
161  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Gamma ="
162  << gamma_ << ". Please select Gamma >= 0 and <= 1. \n");
163 
164  this->isInitialized_ = false;
165 }
166 
167 template <class Scalar>
169 {
170  alpha_f_ = alpha_f;
171 
173  (alpha_f_ > 1.0) || (alpha_f_ < 0.0), std::logic_error,
174  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_f = "
175  << alpha_f_ << ". Please select Alpha_f >= 0 and <= 1. \n");
176 
177  this->isInitialized_ = false;
178 }
179 
180 template <class Scalar>
182 {
183  alpha_m_ = alpha_m;
184 
186  (alpha_m_ >= 1.0) || (alpha_m_ < 0.0), std::logic_error,
187  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_m = "
188  << alpha_m_ << ". Please select Alpha_m >= 0 and < 1. \n");
189 
190  this->isInitialized_ = false;
191 }
192 
193 template <class Scalar>
194 void StepperHHTAlpha<Scalar>::setSchemeName(std::string schemeName)
195 {
196  schemeName_ = schemeName;
197 
198  if (schemeName_ == "Newmark Beta Average Acceleration") {
199  beta_ = 0.25;
200  gamma_ = 0.5;
201  }
202  else if (schemeName_ == "Newmark Beta Linear Acceleration") {
203  beta_ = 0.25;
204  gamma_ = 1.0 / 6.0;
205  }
206  else if (schemeName_ == "Newmark Beta Central Difference") {
207  beta_ = 0.0;
208  gamma_ = 0.5;
209  }
210  else if (schemeName_ == "Newmark Beta User Defined") {
211  beta_ = 0.25;
212  gamma_ = 0.5; // Use defaults until setBeta and setGamma calls.
213  }
214  else {
216  true, std::logic_error,
217  "\nError in Tempus::StepperHHTAlpha! "
218  << "Invalid Scheme Name = " << schemeName_ << ". \n"
219  << "Valid Scheme Names are: 'Newmark Beta Average Acceleration', "
220  << "'Newmark Beta Linear Acceleration', \n"
221  << "'Newmark Beta Central Difference' and 'Newmark Beta User "
222  "Defined'.\n");
223  }
224 
225  this->isInitialized_ = false;
226 }
227 
228 template <class Scalar>
230  : out_(Teuchos::VerboseObjectBase::getDefaultOStream())
231 {
232 #ifdef VERBOSE_DEBUG_OUTPUT
233  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
234 #endif
235 
236  this->setStepperName("HHT-Alpha");
237  this->setStepperType("HHT-Alpha");
238  this->setUseFSAL(false);
239  this->setICConsistency("None");
240  this->setICConsistencyCheck(false);
241  this->setZeroInitialGuess(false);
242  this->setSchemeName("Newmark Beta Average Acceleration");
243  this->setAlphaF(0.0);
244  this->setAlphaM(0.0);
245  this->setAppAction(Teuchos::null);
246  this->setDefaultSolver();
247 }
248 
249 template <class Scalar>
251  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
253  bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck,
254  bool zeroInitialGuess, std::string schemeName, Scalar beta, Scalar gamma,
255  Scalar alpha_f, Scalar alpha_m,
257  stepperHHTAlphaAppAction)
258  : out_(Teuchos::VerboseObjectBase::getDefaultOStream())
259 {
260  this->setStepperName("HHT-Alpha");
261  this->setStepperType("HHT-Alpha");
262  this->setUseFSAL(useFSAL);
263  this->setICConsistency(ICConsistency);
264  this->setICConsistencyCheck(ICConsistencyCheck);
265  this->setZeroInitialGuess(zeroInitialGuess);
266  this->setSchemeName(schemeName);
267  if (schemeName == "Newmark Beta User Defined") {
268  this->setBeta(beta);
269  this->setGamma(gamma);
270  }
271  this->setAlphaF(alpha_f);
272  this->setAlphaM(alpha_m);
273  this->setAppAction(stepperHHTAlphaAppAction);
274  this->setSolver(solver);
275 
276  if (appModel != Teuchos::null) {
277  this->setModel(appModel);
278  this->initialize();
279  }
280 }
281 
282 template <class Scalar>
285 {
286  if (appAction == Teuchos::null) {
287  // Create default appAction
288  stepperHHTAlphaAppAction_ =
290  }
291  else {
292  stepperHHTAlphaAppAction_ = appAction;
293  }
294 }
295 
296 template <class Scalar>
298  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel)
299 {
300 #ifdef VERBOSE_DEBUG_OUTPUT
301  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
302 #endif
303  validSecondOrderODE_DAE(appModel);
305  Teuchos::rcp(
306  new WrapperModelEvaluatorSecondOrder<Scalar>(appModel, "HHT-Alpha"));
307  this->wrapperModel_ = wrapperModel;
308 
309  TEUCHOS_TEST_FOR_EXCEPTION(this->solver_ == Teuchos::null, std::logic_error,
310  "Error - Solver is not set!\n");
311  if (this->wrapperModel_ != Teuchos::null)
312  this->solver_->setModel(this->wrapperModel_);
313 
314  this->isInitialized_ = false;
315 }
316 
317 template <class Scalar>
319  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
320 {
321 #ifdef VERBOSE_DEBUG_OUTPUT
322  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
323 #endif
324  this->checkInitialized();
325 
326  using Teuchos::RCP;
327 
328  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperHHTAlpha::takeStep()");
329  {
331  solutionHistory->getNumStates() < 2, std::logic_error,
332  "Error - StepperHHTAlpha<Scalar>::takeStep(...)\n"
333  << "Need at least two SolutionStates for HHTAlpha.\n"
334  << " Number of States = " << solutionHistory->getNumStates()
335  << "\nTry setting in \"Solution History\" \"Storage Type\" = "
336  << "\"Undo\"\n or \"Storage Type\" = \"Static\" and \"Storage Limit\" = "
337  << "\"2\"\n");
338 
339  RCP<StepperHHTAlpha<Scalar> > thisStepper = Teuchos::rcpFromRef(*this);
340  stepperHHTAlphaAppAction_->execute(
341  solutionHistory, thisStepper,
343 
344  RCP<SolutionState<Scalar> > workingState =
345  solutionHistory->getWorkingState();
346  RCP<SolutionState<Scalar> > currentState =
347  solutionHistory->getCurrentState();
348 
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)
378  // and initial velocity (v_old) if in 1st time step
379  if (time == solutionHistory->minTime()) {
380  RCP<Thyra::VectorBase<Scalar> > d_init =
381  Thyra::createMember(d_old->space());
382  RCP<Thyra::VectorBase<Scalar> > v_init =
383  Thyra::createMember(v_old->space());
384  RCP<Thyra::VectorBase<Scalar> > a_init =
385  Thyra::createMember(a_old->space());
386  Thyra::copy(*d_old, d_init.ptr());
387  Thyra::copy(*v_old, v_init.ptr());
388  if (this->initialGuess_ !=
389  Teuchos::null) { // set initial guess for Newton, if provided
390  // Throw an exception if initial_guess is not compatible with solution
391  bool is_compatible =
392  (a_init->space())->isCompatible(*this->initialGuess_->space());
394  is_compatible != true, std::logic_error,
395  "Error in Tempus::NemwarkImplicitAForm takeStep(): user-provided "
396  "initial guess'!\n"
397  << "for Newton is not compatible with solution vector!\n");
398  Thyra::copy(*this->initialGuess_, a_init.ptr());
399  }
400  else { // if no initialGuess_ provide, set 0 initial guess
401  Thyra::put_scalar(0.0, a_init.ptr());
402  }
403  wrapperModel->initializeNewmark(v_init, d_init, 0.0, time, beta_, gamma_);
404  const Thyra::SolveStatus<Scalar> sStatus =
405  (*(this->solver_)).solve(&*a_init);
406 
407  workingState->setSolutionStatus(sStatus); // Converged --> pass.
408  Thyra::copy(*a_init, a_old.ptr());
409  }
410 #ifdef DEBUG_OUTPUT
411  // IKT, 3/30/17, debug output: pring a_old to check for correctness.
412  *out_ << "IKT a_old = " << Thyra::max(*a_old) << "\n";
413 #endif
414 
415  // allocate d and v predictors
416  RCP<Thyra::VectorBase<Scalar> > d_pred =
417  Thyra::createMember(d_old->space());
418  RCP<Thyra::VectorBase<Scalar> > v_pred =
419  Thyra::createMember(v_old->space());
420 
421  // compute displacement and velocity predictors
422  predictDisplacement(*d_pred, *d_old, *v_old, *a_old, dt);
423  predictVelocity(*v_pred, *v_old, *a_old, dt);
424 
425  // compute second displacement and velocity predictors (those that are
426  // functions of alpha_f)
427  predictDisplacement_alpha_f(*d_pred, *d_old);
428  predictVelocity_alpha_f(*v_pred, *v_old);
429 
430  // inject d_pred, v_pred, a and other relevant data into wrapperModel
431  wrapperModel->initializeNewmark(v_pred, d_pred, dt, t, beta_, gamma_);
432 
433  stepperHHTAlphaAppAction_->execute(
434  solutionHistory, thisStepper,
436 
437  // Solve for new acceleration
438  const Thyra::SolveStatus<Scalar> sStatus =
439  (*(this->solver_)).solve(&*a_new);
440 
441  stepperHHTAlphaAppAction_->execute(
442  solutionHistory, thisStepper,
444 
445  // correct acceleration (function of alpha_m)
446  correctAcceleration(*a_new, *a_old);
447 
448  // correct velocity and displacement
449  correctVelocity(*v_new, *v_pred, *a_new, dt);
450  correctDisplacement(*d_new, *d_pred, *a_new, dt);
451 
452  workingState->setSolutionStatus(sStatus); // Converged --> pass.
453  workingState->setOrder(this->getOrder());
454  workingState->computeNorms(currentState);
455 
456  stepperHHTAlphaAppAction_->execute(
457  solutionHistory, thisStepper,
459  }
460  return;
461 }
462 
469 template <class Scalar>
472 {
473 #ifdef VERBOSE_DEBUG_OUTPUT
474  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
475 #endif
477  rcp(new StepperState<Scalar>(this->getStepperType()));
478  return stepperState;
479 }
480 
481 template <class Scalar>
483  Teuchos::FancyOStream& out, const Teuchos::EVerbosityLevel verbLevel) const
484 {
485  auto l_out = Teuchos::fancyOStream(out.getOStream());
486  Teuchos::OSTab ostab(*l_out, 2, this->description());
487  l_out->setOutputToRootOnly(0);
488 
489 #ifdef VERBOSE_DEBUG_OUTPUT
490  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
491 #endif
492 
493  *l_out << std::endl;
494  Stepper<Scalar>::describe(*l_out, verbLevel);
495  StepperImplicit<Scalar>::describe(*l_out, verbLevel);
496 
497  *l_out << "--- StepperHHTAlpha ---\n";
498  *l_out << " schemeName_ = " << schemeName_ << std::endl;
499  *l_out << " beta_ = " << beta_ << std::endl;
500  *l_out << " gamma_ = " << gamma_ << std::endl;
501  *l_out << " alpha_f_ = " << alpha_f_ << std::endl;
502  *l_out << " alpha_m_ = " << alpha_m_ << std::endl;
503  *l_out << "-----------------------" << std::endl;
504 }
505 
506 template <class Scalar>
508 {
509  out.setOutputToRootOnly(0);
510  bool isValidSetup = true;
511 
512  if (!Stepper<Scalar>::isValidSetup(out)) isValidSetup = false;
513 
514  // if ( !StepperImplicit<Scalar>::isValidSetup(out) ) isValidSetup = false;
515  if (this->wrapperModel_->getAppModel() == Teuchos::null) {
516  isValidSetup = false;
517  out << "The application ModelEvaluator is not set!\n";
518  }
519 
520  if (this->wrapperModel_ == Teuchos::null) {
521  isValidSetup = false;
522  out << "The wrapper ModelEvaluator is not set!\n";
523  }
524 
525  if (this->solver_ == Teuchos::null) {
526  isValidSetup = false;
527  out << "The solver is not set!\n";
528  }
529 
530  return isValidSetup;
531 }
532 
533 template <class Scalar>
536 {
537 #ifdef VERBOSE_DEBUG_OUTPUT
538  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
539 #endif
540  auto pl = this->getValidParametersBasicImplicit();
541 
542  auto hhtalphaPL = Teuchos::parameterList("HHT-Alpha Parameters");
543  hhtalphaPL->set<std::string>("Scheme Name", schemeName_);
544  hhtalphaPL->set<double>("Beta", beta_);
545  hhtalphaPL->set<double>("Gamma", gamma_);
546  hhtalphaPL->set<double>("Alpha_f", alpha_f_);
547  hhtalphaPL->set<double>("Alpha_m", alpha_m_);
548  pl->set("HHT-Alpha Parameters", *hhtalphaPL);
549 
550  return pl;
551 }
552 
553 // Nonmember constructor - ModelEvaluator and ParameterList
554 // ------------------------------------------------------------------------
555 template <class Scalar>
557  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
559 {
560  auto stepper = Teuchos::rcp(new StepperHHTAlpha<Scalar>());
561  stepper->setStepperImplicitValues(pl);
562 
563  if (pl != Teuchos::null) {
564  if (pl->isSublist("HHT-Alpha Parameters")) {
565  auto hhtalphaPL = pl->sublist("HHT-Alpha Parameters", true);
566  std::string schemeName = hhtalphaPL.get<std::string>(
567  "Scheme Name", "Newmark Beta Average Acceleration");
568  stepper->setSchemeName(schemeName);
569  if (schemeName == "Newmark Beta User Defined") {
570  stepper->setBeta(hhtalphaPL.get<double>("Beta", 0.25));
571  stepper->setGamma(hhtalphaPL.get<double>("Gamma", 0.5));
572  }
573  stepper->setAlphaF(hhtalphaPL.get<double>("Alpha_f", 0.0));
574  stepper->setAlphaM(hhtalphaPL.get<double>("Alpha_m", 0.0));
575  }
576  else {
577  stepper->setSchemeName("Newmark Beta Average Acceleration");
578  stepper->setAlphaF(0.0);
579  stepper->setAlphaM(0.0);
580  }
581  }
582 
583  if (model != Teuchos::null) {
584  stepper->setModel(model);
585  stepper->initialize();
586  }
587 
588  return stepper;
589 }
590 
591 } // namespace Tempus
592 #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
virtual void setSolver(Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver) override
Set solver.
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
T & get(const std::string &name, T def_value)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void setStepperName(std::string s)
Set the stepper name.
void correctAcceleration(Thyra::VectorBase< Scalar > &a_n_plus1, const Thyra::VectorBase< Scalar > &a_n) const
virtual void initialize()
Initialize after construction and changing input parameters.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
StepperHHTAlpha()
Default constructor.
A ModelEvaluator for residual evaluations given a state. This ModelEvaluator takes a state...
Thyra Base interface for time steppers.
StepperState is a simple class to hold state information about the stepper.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
bool isSublist(const std::string &name) const
void predictVelocity_alpha_f(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v) const
void setICConsistencyCheck(bool c)
void setSchemeName(std::string schemeName)
virtual void setZeroInitialGuess(bool zIG)
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
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
Teuchos::RCP< StepperHHTAlpha< Scalar > > createStepperHHTAlpha(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
void validSecondOrderODE_DAE(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
Teuchos::RCP< Teuchos::FancyOStream > out_
RCP< std::basic_ostream< char_type, traits_type > > getOStream()
void predictVelocity(Thyra::VectorBase< Scalar > &vPred, const Thyra::VectorBase< Scalar > &v, const Thyra::VectorBase< Scalar > &a, const Scalar dt) const
virtual void setAppAction(Teuchos::RCP< StepperHHTAlphaAppAction< Scalar > > appAction)
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
virtual void setUseFSAL(bool a)
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Set the model.
void setStepperType(std::string s)
Set the stepper type.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
void setICConsistency(std::string s)