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: 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 "Teuchos_VerboseObjectParameterListHelpers.hpp"
13 
15 
16 //#define VERBOSE_DEBUG_OUTPUT
17 //#define DEBUG_OUTPUT
18 
19 namespace Tempus {
20 
21 
22 template<class Scalar>
27  const Scalar dt) const
28 {
29 #ifdef VERBOSE_DEBUG_OUTPUT
30  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
31 #endif
32  //vPred = v + dt*(1.0-gamma_)*a
33  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0, v, dt*(1.0-gamma_), a);
34 }
35 
36 template<class Scalar>
42  const Scalar dt) const
43 {
44 #ifdef VERBOSE_DEBUG_OUTPUT
45  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
46 #endif
47  //dPred = dt*v + dt*dt/2.0*(1.0-2.0*beta_)*a
48  Scalar aConst = dt*dt/2.0*(1.0-2.0*beta_);
49  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), dt, v, aConst, a);
50  //dPred += d;
51  Thyra::Vp_V(Teuchos::ptrFromRef(dPred), d, 1.0);
52 }
53 
54 
55 template<class Scalar>
58  const Thyra::VectorBase<Scalar>& v) const
59 {
60 #ifdef VERBOSE_DEBUG_OUTPUT
61  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
62 #endif
63  //vPred = (1-alpha_f)*vPred + alpha_f*v
64  Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0-alpha_f_, vPred, alpha_f_, v);
65 }
66 
67 
68 template<class Scalar>
71  const Thyra::VectorBase<Scalar>& d) const
72 {
73 #ifdef VERBOSE_DEBUG_OUTPUT
74  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
75 #endif
76  //dPred = (1-alpha_f)*dPred + alpha_f*d
77  Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), 1.0-alpha_f_, dPred, alpha_f_, d);
78 }
79 
80 template<class Scalar>
83  const Thyra::VectorBase<Scalar>& a_n) const
84 {
85 #ifdef VERBOSE_DEBUG_OUTPUT
86  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
87 #endif
88  Scalar c = 1.0/(1.0-alpha_m_);
89  //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
90  Thyra::V_StVpStV(Teuchos::ptrFromRef(a_n_plus1), c, a_n_plus1, -c*alpha_m_, a_n);
91 }
92 
93 
94 
95 template<class Scalar>
98  const Thyra::VectorBase<Scalar>& vPred,
100  const Scalar dt) const
101 {
102 #ifdef VERBOSE_DEBUG_OUTPUT
103  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
104 #endif
105  //v = vPred + dt*gamma_*a
106  Thyra::V_StVpStV(Teuchos::ptrFromRef(v), 1.0, vPred, dt*gamma_, a);
107 }
108 
109 template<class Scalar>
112  const Thyra::VectorBase<Scalar>& dPred,
113  const Thyra::VectorBase<Scalar>& a,
114  const Scalar dt) const
115 {
116 #ifdef VERBOSE_DEBUG_OUTPUT
117  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
118 #endif
119  //d = dPred + beta_*dt*dt*a
120  Thyra::V_StVpStV(Teuchos::ptrFromRef(d), 1.0, dPred, beta_*dt*dt, a);
121 }
122 
123 
124 
125 template<class Scalar>
127 {
128  if (schemeName_ != "Newmark Beta User Defined") {
129  out_->setOutputToRootOnly(0);
130  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
131  << schemeName_ << "').\n"
132  << " Leaving as beta = " << beta_ << "!\n";
133  return;
134  }
135 
136  beta_ = beta;
137 
138  if (beta_ == 0.0) {
139  out_->setOutputToRootOnly(0);
140  *out_ << "\nWARNING: Running (implicit implementation of) Newmark "
141  << "Implicit a-Form Stepper with Beta = 0.0, which \n"
142  << "specifies an explicit scheme. Mass lumping is not possible, "
143  << "so this will be slow! To run explicit \n"
144  << "implementation of Newmark Implicit a-Form Stepper, please "
145  << "re-run with 'Stepper Type' = 'Newmark Explicit a-Form'.\n"
146  << "This stepper allows for mass lumping when called through "
147  << "Piro::TempusSolver.\n";
148  }
149 
150  TEUCHOS_TEST_FOR_EXCEPTION( (beta_ > 1.0) || (beta_ < 0.0),
151  std::logic_error,
152  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Beta = "
153  << beta_ << ". Please select Beta >= 0 and <= 1. \n");
154 
155  this->isInitialized_ = false;
156 }
157 
158 
159 template<class Scalar>
161 {
162  if (schemeName_ != "Newmark Beta User Defined") {
163  out_->setOutputToRootOnly(0);
164  *out_ << "\nWARNING: schemeName != 'Newmark Beta User Defined' (= '"
165  << schemeName_ << "').\n"
166  << " Leaving as gamma = " << gamma_ << "!\n";
167  return;
168  }
169 
170  gamma_ = gamma;
171 
172  TEUCHOS_TEST_FOR_EXCEPTION( (gamma_ > 1.0) || (gamma_ < 0.0),
173  std::logic_error,
174  "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Gamma ="
175  <<gamma_ << ". Please select Gamma >= 0 and <= 1. \n");
176 
177  this->isInitialized_ = false;
178 }
179 
180 
181 template<class Scalar>
183 {
184  alpha_f_ = alpha_f;
185 
186  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_f_ > 1.0) || (alpha_f_ < 0.0),
187  std::logic_error,
188  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_f = "
189  << alpha_f_ << ". Please select Alpha_f >= 0 and <= 1. \n");
190 
191  this->isInitialized_ = false;
192 }
193 
194 
195 template<class Scalar>
197 {
198  alpha_m_ = alpha_m;
199 
200  TEUCHOS_TEST_FOR_EXCEPTION( (alpha_m_ >= 1.0) || (alpha_m_ < 0.0),
201  std::logic_error,
202  "\nError in 'HHT-Alpha' stepper: invalid value of Alpha_m = "
203  << alpha_m_ << ". Please select Alpha_m >= 0 and < 1. \n");
204 
205  this->isInitialized_ = false;
206 }
207 
208 
209 template<class Scalar>
211  std::string schemeName)
212 {
213  schemeName_ = schemeName;
214 
215  if (schemeName_ == "Newmark Beta Average Acceleration") {
216  beta_= 0.25; gamma_ = 0.5;
217  }
218  else if (schemeName_ == "Newmark Beta Linear Acceleration") {
219  beta_= 0.25; gamma_ = 1.0/6.0;
220  }
221  else if (schemeName_ == "Newmark Beta Central Difference") {
222  beta_= 0.0; gamma_ = 0.5;
223  }
224  else if (schemeName_ == "Newmark Beta User Defined") {
225  beta_= 0.25; gamma_ = 0.5; // Use defaults until setBeta and setGamma calls.
226  }
227  else {
229  std::logic_error,
230  "\nError in Tempus::StepperHHTAlpha! "
231  <<"Invalid Scheme Name = " << schemeName_ <<". \n"
232  <<"Valid Scheme Names are: 'Newmark Beta Average Acceleration', "
233  <<"'Newmark Beta Linear Acceleration', \n"
234  <<"'Newmark Beta Central Difference' and 'Newmark Beta User Defined'.\n");
235  }
236 
237  this->isInitialized_ = false;
238 }
239 
240 template<class Scalar>
242  out_(Teuchos::VerboseObjectBase::getDefaultOStream())
243 {
244 #ifdef VERBOSE_DEBUG_OUTPUT
245  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
246 #endif
247 
248  this->setStepperName( "HHT-Alpha");
249  this->setStepperType( "HHT-Alpha");
250  this->setUseFSAL( false);
251  this->setICConsistency( "None");
252  this->setICConsistencyCheck( false);
253  this->setZeroInitialGuess( false);
254  this->setSchemeName( "Newmark Beta Average Acceleration");
255  this->setAlphaF( 0.0);
256  this->setAlphaM( 0.0);
257  this->setAppAction(Teuchos::null);
258  this->setDefaultSolver();
259 }
260 
261 template<class Scalar>
263  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
265  bool useFSAL,
266  std::string ICConsistency,
267  bool ICConsistencyCheck,
268  bool zeroInitialGuess,
269  std::string schemeName,
270  Scalar beta,
271  Scalar gamma,
272  Scalar alpha_f,
273  Scalar alpha_m,
274  const Teuchos::RCP<StepperHHTAlphaAppAction<Scalar> >& stepperHHTAlphaAppAction)
275  : out_(Teuchos::VerboseObjectBase::getDefaultOStream())
276 {
277  this->setStepperName( "HHT-Alpha");
278  this->setStepperType( "HHT-Alpha");
279  this->setUseFSAL( useFSAL);
280  this->setICConsistency( ICConsistency);
281  this->setICConsistencyCheck( ICConsistencyCheck);
282  this->setZeroInitialGuess( zeroInitialGuess);
283  this->setSchemeName( schemeName);
284  if (schemeName == "Newmark Beta User Defined") {
285  this->setBeta( beta);
286  this->setGamma( gamma);
287  }
288  this->setAlphaF( alpha_f);
289  this->setAlphaM( alpha_m);
290  this->setAppAction(stepperHHTAlphaAppAction);
291  this->setSolver(solver);
292 
293  if (appModel != Teuchos::null) {
294  this->setModel(appModel);
295  this->initialize();
296  }
297 }
298 
299 template<class Scalar>
302 {
303  if (appAction == Teuchos::null) {
304  // Create default appAction
305  stepperHHTAlphaAppAction_ =
307  }
308  else {
309  stepperHHTAlphaAppAction_ = appAction;
310  }
311 }
312 
313 template<class Scalar>
315  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel)
316 {
317 #ifdef VERBOSE_DEBUG_OUTPUT
318  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
319 #endif
320  validSecondOrderODE_DAE(appModel);
323  "HHT-Alpha"));
324  this->wrapperModel_ = wrapperModel;
325 
326  TEUCHOS_TEST_FOR_EXCEPTION(this->solver_ == Teuchos::null, std::logic_error,
327  "Error - Solver is not set!\n");
328  if (this->wrapperModel_ != Teuchos::null)
329  this->solver_->setModel(this->wrapperModel_);
330 
331  this->isInitialized_ = false;
332 }
333 
334 
335 template<class Scalar>
337  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
338 {
339 #ifdef VERBOSE_DEBUG_OUTPUT
340  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
341 #endif
342  this->checkInitialized();
343 
344  using Teuchos::RCP;
345 
346  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperHHTAlpha::takeStep()");
347  {
348  TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
349  std::logic_error,
350  "Error - StepperHHTAlpha<Scalar>::takeStep(...)\n"
351  "Need at least two SolutionStates for HHTAlpha.\n"
352  " Number of States = " << solutionHistory->getNumStates() << "\n"
353  "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
354  " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
355 
356  RCP<StepperHHTAlpha<Scalar> > thisStepper = Teuchos::rcpFromRef(*this);
357  stepperHHTAlphaAppAction_->execute(solutionHistory, thisStepper,
359 
360  RCP<SolutionState<Scalar> > workingState=solutionHistory->getWorkingState();
361  RCP<SolutionState<Scalar> > currentState=solutionHistory->getCurrentState();
362 
364  Teuchos::rcp_dynamic_cast<WrapperModelEvaluatorSecondOrder<Scalar> >(
365  this->wrapperModel_);
366 
367  //Get values of d, v and a from previous step
368  RCP<const Thyra::VectorBase<Scalar> > d_old = currentState->getX();
369  RCP<const Thyra::VectorBase<Scalar> > v_old = currentState->getXDot();
370  RCP<Thyra::VectorBase<Scalar> > a_old = currentState->getXDotDot();
371 
372 #ifdef DEBUG_OUTPUT
373  //IKT, 3/21/17, debug output: pring d_old, v_old, a_old to check for
374  // correctness.
375  *out_ << "IKT d_old = " << Thyra::max(*d_old) << "\n";
376  *out_ << "IKT v_old = " << Thyra::max(*v_old) << "\n";
377 #endif
378 
379  //Get new values of d, v and a from current workingState
380  //(to be updated here)
381  RCP<Thyra::VectorBase<Scalar> > d_new = workingState->getX();
382  RCP<Thyra::VectorBase<Scalar> > v_new = workingState->getXDot();
383  RCP<Thyra::VectorBase<Scalar> > a_new = workingState->getXDotDot();
384 
385  //Get time and dt
386  const Scalar time = currentState->getTime();
387  const Scalar dt = workingState->getTimeStep();
388  //Update time
389  Scalar t = time+dt;
390 
391  //Compute initial acceleration, a_old, using initial displacement (d_old) and initial
392  //velocity (v_old) if in 1st time step
393  if (time == solutionHistory->minTime()) {
394  RCP<Thyra::VectorBase<Scalar> > d_init = Thyra::createMember(d_old->space());
395  RCP<Thyra::VectorBase<Scalar> > v_init = Thyra::createMember(v_old->space());
396  RCP<Thyra::VectorBase<Scalar> > a_init = Thyra::createMember(a_old->space());
397  Thyra::copy(*d_old, d_init.ptr());
398  Thyra::copy(*v_old, v_init.ptr());
399  if (this->initialGuess_ != Teuchos::null) { //set initial guess for Newton, if provided
400  //Throw an exception if initial_guess is not compatible with solution
401  bool is_compatible = (a_init->space())->isCompatible(*this->initialGuess_->space());
403  is_compatible != true, std::logic_error,
404  "Error in Tempus::NemwarkImplicitAForm takeStep(): user-provided initial guess'!\n"
405  << "for Newton is not compatible with solution vector!\n");
406  Thyra::copy(*this->initialGuess_, a_init.ptr());
407  }
408  else { //if no initialGuess_ provide, set 0 initial guess
409  Thyra::put_scalar(0.0, a_init.ptr());
410  }
411  wrapperModel->initializeNewmark(v_init,d_init,0.0,time,beta_,gamma_);
412  const Thyra::SolveStatus<Scalar> sStatus=this->solveImplicitODE(a_init);
413 
414  workingState->setSolutionStatus(sStatus); // Converged --> pass.
415  Thyra::copy(*a_init, a_old.ptr());
416  }
417 #ifdef DEBUG_OUTPUT
418  //IKT, 3/30/17, debug output: pring a_old to check for correctness.
419  *out_ << "IKT a_old = " << Thyra::max(*a_old) << "\n";
420 #endif
421 
422  //allocate d and v predictors
423  RCP<Thyra::VectorBase<Scalar> > d_pred =Thyra::createMember(d_old->space());
424  RCP<Thyra::VectorBase<Scalar> > v_pred =Thyra::createMember(v_old->space());
425 
426  //compute displacement and velocity predictors
427  predictDisplacement(*d_pred, *d_old, *v_old, *a_old, dt);
428  predictVelocity(*v_pred, *v_old, *a_old, dt);
429 
430  //compute second displacement and velocity predictors (those that are functions of alpha_f)
431  predictDisplacement_alpha_f(*d_pred, *d_old);
432  predictVelocity_alpha_f(*v_pred, *v_old);
433 
434  //inject d_pred, v_pred, a and other relevant data into wrapperModel
435  wrapperModel->initializeNewmark(v_pred,d_pred,dt,t,beta_,gamma_);
436 
437 
438  stepperHHTAlphaAppAction_->execute(solutionHistory, thisStepper,
440 
441  //Solve for new acceleration
442  const Thyra::SolveStatus<Scalar> sStatus = this->solveImplicitODE(a_new);
443 
444  stepperHHTAlphaAppAction_->execute(solutionHistory, thisStepper,
446 
447  //correct acceleration (function of alpha_m)
448  correctAcceleration(*a_new, *a_old);
449 
450  //correct velocity and displacement
451  correctVelocity(*v_new, *v_pred, *a_new, dt);
452  correctDisplacement(*d_new, *d_pred, *a_new, dt);
453 
454  workingState->setSolutionStatus(sStatus); // Converged --> pass.
455  workingState->setOrder(this->getOrder());
456  workingState->computeNorms(currentState);
457 
458  stepperHHTAlphaAppAction_->execute(solutionHistory, thisStepper,
460  }
461  return;
462 }
463 
464 
465 
472 template<class Scalar>
476 {
477 #ifdef VERBOSE_DEBUG_OUTPUT
478  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
479 #endif
481  rcp(new StepperState<Scalar>(this->getStepperType()));
482  return stepperState;
483 }
484 
485 
486 template<class Scalar>
489  const Teuchos::EVerbosityLevel verbLevel) const
490 {
491 
492 #ifdef VERBOSE_DEBUG_OUTPUT
493  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
494 #endif
495 
496  out << std::endl;
497  Stepper<Scalar>::describe(out, verbLevel);
498  StepperImplicit<Scalar>::describe(out, verbLevel);
499 
500  auto l_out = Teuchos::fancyOStream( out.getOStream() );
501  l_out->setOutputToRootOnly(0);
502  *l_out << "--- StepperHHTAlpha ---\n";
503  *l_out << " schemeName_ = " << schemeName_ << std::endl;
504  *l_out << " beta_ = " << beta_ << std::endl;
505  *l_out << " gamma_ = " << gamma_ << std::endl;
506  *l_out << " alpha_f_ = " << alpha_f_ << std::endl;
507  *l_out << " alpha_m_ = " << alpha_m_ << std::endl;
508  *l_out << "-----------------------" << std::endl;
509 }
510 
511 
512 template<class Scalar>
514 {
515  bool isValidSetup = true;
516 
517  if ( !Stepper<Scalar>::isValidSetup(out) ) isValidSetup = false;
518 
519  //if ( !StepperImplicit<Scalar>::isValidSetup(out) ) isValidSetup = false;
520  if (this->wrapperModel_->getAppModel() == Teuchos::null) {
521  isValidSetup = false;
522  out << "The application ModelEvaluator is not set!\n";
523  }
524 
525  if (this->wrapperModel_ == Teuchos::null) {
526  isValidSetup = false;
527  out << "The wrapper ModelEvaluator is not set!\n";
528  }
529 
530  if (this->solver_ == Teuchos::null) {
531  isValidSetup = false;
532  out << "The solver is not set!\n";
533  }
534 
535  return isValidSetup;
536 }
537 
538 
539 template<class Scalar>
542 {
543 #ifdef VERBOSE_DEBUG_OUTPUT
544  *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
545 #endif
546  auto pl = this->getValidParametersBasicImplicit();
547 
548  auto hhtalphaPL = Teuchos::parameterList("HHT-Alpha Parameters");
549  hhtalphaPL->set<std::string>("Scheme Name", schemeName_);
550  hhtalphaPL->set<double> ("Beta", beta_);
551  hhtalphaPL->set<double> ("Gamma", gamma_ );
552  hhtalphaPL->set<double> ("Alpha_f", alpha_f_ );
553  hhtalphaPL->set<double> ("Alpha_m", alpha_m_ );
554  pl->set("HHT-Alpha Parameters", *hhtalphaPL);
555 
556  return pl;
557 }
558 
559 
560 // Nonmember constructor - ModelEvaluator and ParameterList
561 // ------------------------------------------------------------------------
562 template<class Scalar>
565  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
567 {
568  auto stepper = Teuchos::rcp(new StepperHHTAlpha<Scalar>());
569  stepper->setStepperImplicitValues(pl);
570 
571  if (pl != Teuchos::null) {
572  if (pl->isSublist("HHT-Alpha Parameters")) {
573  auto hhtalphaPL = pl->sublist("HHT-Alpha Parameters", true);
574  std::string schemeName =
575  hhtalphaPL.get<std::string>("Scheme Name", "Newmark Beta Average Acceleration");
576  stepper->setSchemeName(schemeName);
577  if (schemeName == "Newmark Beta User Defined") {
578  stepper->setBeta (hhtalphaPL.get<double>("Beta", 0.25));
579  stepper->setGamma(hhtalphaPL.get<double>("Gamma", 0.5 ));
580  }
581  stepper->setAlphaF(hhtalphaPL.get<double>("Alpha_f", 0.0));
582  stepper->setAlphaM(hhtalphaPL.get<double>("Alpha_m", 0.0));
583  } else {
584  stepper->setSchemeName("Newmark Beta Average Acceleration");
585  stepper->setAlphaF(0.0);
586  stepper->setAlphaM(0.0);
587  }
588  }
589 
590  if (model != Teuchos::null) {
591  stepper->setModel(model);
592  stepper->initialize();
593  }
594 
595  return stepper;
596 }
597 
598 
599 } // namespace Tempus
600 #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 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.
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.
virtual void setSolver(Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver)
Set solver.
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)
Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False)...
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
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)
Validate ME supports 2nd order implicit ODE/DAE evaluation, f(xdotdot,xdot,x,t) [= 0]...
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 describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setUseFSAL(bool a)
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
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)