Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Tempus_StepperNewmarkImplicitDForm_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_StepperNewmarkImplicitDForm_impl_hpp
10#define Tempus_StepperNewmarkImplicitDForm_impl_hpp
11
13
14
15//#define VERBOSE_DEBUG_OUTPUT
16//#define DEBUG_OUTPUT
17
18namespace Tempus {
19
20
21template <class Scalar>
22void
25 const Thyra::VectorBase<Scalar>& a, const Scalar dt) const {
26#ifdef VERBOSE_DEBUG_OUTPUT
27 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
28#endif
29 // vPred = v + dt*(1.0-gamma_)*a
30 Thyra::V_StVpStV(Teuchos::ptrFromRef(vPred), 1.0, v, dt * (1.0 - gamma_), a);
31}
32
33template <class Scalar>
34void
38 const Scalar dt) const {
39#ifdef VERBOSE_DEBUG_OUTPUT
40 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
41#endif
42 Teuchos::RCP<const Thyra::VectorBase<Scalar>> tmp =
43 Thyra::createMember<Scalar>(dPred.space());
44 // dPred = dt*v + dt*dt/2.0*(1.0-2.0*beta_)*a
45 Scalar aConst = dt * dt / 2.0 * (1.0 - 2.0 * beta_);
46 Thyra::V_StVpStV(Teuchos::ptrFromRef(dPred), dt, v, aConst, a);
47 // dPred += d;
48 Thyra::Vp_V(Teuchos::ptrFromRef(dPred), d, 1.0);
49}
50
51template <class Scalar>
52void
55 const Thyra::VectorBase<Scalar>& a, const Scalar dt) const {
56#ifdef VERBOSE_DEBUG_OUTPUT
57 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
58#endif
59 // v = vPred + dt*gamma_*a
60 Thyra::V_StVpStV(Teuchos::ptrFromRef(v), 1.0, vPred, dt * gamma_, a);
61}
62
63template <class Scalar>
64void
67 const Thyra::VectorBase<Scalar>& a, const Scalar dt) const {
68#ifdef VERBOSE_DEBUG_OUTPUT
69 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
70#endif
71 // d = dPred + beta_*dt*dt*a
72 Thyra::V_StVpStV(Teuchos::ptrFromRef(d), 1.0, dPred, beta_ * dt * dt, a);
73}
74
75template <class Scalar>
76void
79 const Thyra::VectorBase<Scalar>& d, const Scalar dt) const {
80#ifdef VERBOSE_DEBUG_OUTPUT
81 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
82#endif
83 // a = (d - dPred) / (beta_*dt*dt)
84 Scalar const c = 1.0 / beta_ / dt / dt;
85 Thyra::V_StVpStV(Teuchos::ptrFromRef(a), c, d, -c, dPred);
86}
87
88template<class Scalar>
90{
91 if (schemeName_ != "User Defined") {
92 *out_ << "\nWARNING: schemeName != 'User Defined' (=" <<schemeName_<< ").\n"
93 << " Not setting beta, and leaving as beta = " << beta_ << "!\n";
94 return;
95 }
96
97 beta_ = beta;
98
99 if (beta_ == 0.0) {
100 *out_ << "\nWARNING: Running (implicit implementation of) Newmark "
101 << "Implicit a-Form Stepper with Beta = 0.0, which \n"
102 << "specifies an explicit scheme. Mass lumping is not possible, "
103 << "so this will be slow! To run explicit \n"
104 << "implementation of Newmark Implicit a-Form Stepper, please "
105 << "re-run with 'Stepper Type' = 'Newmark Explicit a-Form'.\n"
106 << "This stepper allows for mass lumping when called through "
107 << "Piro::TempusSolver.\n";
108 }
109
110 TEUCHOS_TEST_FOR_EXCEPTION( (beta_ > 1.0) || (beta_ < 0.0),
111 std::logic_error,
112 "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Beta = "
113 << beta_ << ". Please select Beta >= 0 and <= 1. \n");
114
115 this->isInitialized_ = false;
116}
117
118
119template<class Scalar>
121{
122 if (schemeName_ != "User Defined") {
123 *out_ << "\nWARNING: schemeName != 'User Defined' (=" <<schemeName_<< ").\n"
124 << " Not setting gamma, and leaving as gamma = " << gamma_ << "!\n";
125 return;
126 }
127
128 gamma_ = gamma;
129
130 TEUCHOS_TEST_FOR_EXCEPTION( (gamma_ > 1.0) || (gamma_ < 0.0),
131 std::logic_error,
132 "\nError in 'Newmark Implicit a-Form' stepper: invalid value of Gamma ="
133 <<gamma_ << ". Please select Gamma >= 0 and <= 1. \n");
134
135 this->isInitialized_ = false;
136}
137
138
139template<class Scalar>
141 std::string schemeName)
142{
143 schemeName_ = schemeName;
144
145 if (schemeName_ == "Average Acceleration") {
146 beta_= 0.25; gamma_ = 0.5;
147 }
148 else if (schemeName_ == "Linear Acceleration") {
149 beta_= 0.25; gamma_ = 1.0/6.0;
150 }
151 else if (schemeName_ == "Central Difference") {
152 beta_= 0.0; gamma_ = 0.5;
153 }
154 else if (schemeName_ == "User Defined") {
155 beta_= 0.25; gamma_ = 0.5; // Use defaults until setBeta and setGamma calls.
156 }
157 else {
158 TEUCHOS_TEST_FOR_EXCEPTION(true,
159 std::logic_error,
160 "\nError in Tempus::StepperNewmarkImplicitDForm! "
161 <<"Invalid Scheme Name = " << schemeName_ <<". \n"
162 <<"Valid Scheme Names are: 'Average Acceleration', "
163 <<"'Linear Acceleration', \n"
164 <<"'Central Difference' and 'User Defined'.\n");
165 }
166
167 this->isInitialized_ = false;
168}
169
170
171template <class Scalar>
173 : out_(Teuchos::VerboseObjectBase::getDefaultOStream()) {
174#ifdef VERBOSE_DEBUG_OUTPUT
175 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
176#endif
177
178 this->setStepperName( "Newmark Implicit d-Form");
179 this->setStepperType( "Newmark Implicit d-Form");
180 this->setUseFSAL( false);
181 this->setICConsistency( "None");
182 this->setICConsistencyCheck( false);
183 this->setZeroInitialGuess( false);
184 this->setSchemeName( "Average Acceleration");
185
186 this->setAppAction(Teuchos::null);
187 this->setDefaultSolver();
188}
189
190template<class Scalar>
192 const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > & appModel,
193 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> > & solver,
194 bool useFSAL,
195 std::string ICConsistency,
196 bool ICConsistencyCheck,
197 bool zeroInitialGuess,
198 std::string schemeName,
199 Scalar beta,
200 Scalar gamma,
201 const Teuchos::RCP<StepperNewmarkImplicitDFormAppAction<Scalar> >& stepperAppAction)
202 : out_(Teuchos::VerboseObjectBase::getDefaultOStream())
203{
204 this->setStepperName( "Newmark Implicit d-Form");
205 this->setStepperType( "Newmark Implicit d-Form");
206 this->setUseFSAL( useFSAL);
207 this->setICConsistency( ICConsistency);
208 this->setICConsistencyCheck( ICConsistencyCheck);
209 this->setZeroInitialGuess( zeroInitialGuess);
210 this->setSchemeName( schemeName);
211 this->setBeta( beta);
212 this->setGamma( gamma);
213 this->setAppAction(stepperAppAction);
214 this->setSolver(solver);
215
216 if (appModel != Teuchos::null) {
217 this->setModel(appModel);
218 this->initialize();
219 }
220}
221
222template <class Scalar>
223void
225 const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar>>& appModel) {
226#ifdef VERBOSE_DEBUG_OUTPUT
227 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
228#endif
229 validSecondOrderODE_DAE(appModel);
230 this->wrapperModel_ =
232 appModel, "Newmark Implicit d-Form"));
233
234 TEUCHOS_TEST_FOR_EXCEPTION(
235 this->getSolver() == Teuchos::null, std::logic_error,
236 "Error - Solver is not set!\n");
237 this->getSolver()->setModel(this->wrapperModel_);
238
239 this->isInitialized_ = false;
240}
241
242
243template<class Scalar>
245 Teuchos::RCP<StepperNewmarkImplicitDFormAppAction<Scalar> > appAction)
246{
247
248 if (appAction == Teuchos::null) {
249 // Create default appAction
252 } else {
253 stepperNewmarkImpAppAction_ = appAction;
254 }
255
256 this->isInitialized_ = false;
257}
258
259
260template <class Scalar>
261void
263 const Teuchos::RCP<SolutionHistory<Scalar>>& solutionHistory) {
264#ifdef VERBOSE_DEBUG_OUTPUT
265 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
266#endif
267 this->checkInitialized();
268
269 using Teuchos::RCP;
270
271 TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperNewmarkImplicitDForm::takeStep()");
272 {
273 TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
274 std::logic_error,
275 "Error - StepperNewmarkImplicitDForm<Scalar>::takeStep(...)\n"
276 "Need at least two SolutionStates for NewmarkImplicitDForm.\n"
277 " Number of States = " << solutionHistory->getNumStates() << "\n"
278 "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
279 " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
280
281 auto thisStepper = Teuchos::rcpFromRef(*this);
282 stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper,
284
285 RCP<SolutionState<Scalar>> workingState =solutionHistory->getWorkingState();
286 RCP<SolutionState<Scalar>> currentState =solutionHistory->getCurrentState();
287
288 Teuchos::RCP<WrapperModelEvaluatorSecondOrder<Scalar> > wrapperModel =
289 Teuchos::rcp_dynamic_cast<WrapperModelEvaluatorSecondOrder<Scalar> >(
290 this->wrapperModel_);
291
292 // Get values of d, v and a from previous step
293 RCP<const Thyra::VectorBase<Scalar>> d_old = currentState->getX();
294 RCP<Thyra::VectorBase<Scalar>> v_old = currentState->getXDot();
295 RCP<Thyra::VectorBase<Scalar>> a_old = currentState->getXDotDot();
296
297 // Get new values of d, v and a from current workingState
298 //(to be updated here)
299 RCP<Thyra::VectorBase<Scalar>> d_new = workingState->getX();
300 RCP<Thyra::VectorBase<Scalar>> v_new = workingState->getXDot();
301 RCP<Thyra::VectorBase<Scalar>> a_new = workingState->getXDotDot();
302
303 // Get time and dt
304 const Scalar time = currentState->getTime();
305 const Scalar dt = workingState->getTimeStep();
306 // Update time
307 Scalar t = time + dt;
308
309
310#ifdef DEBUG_OUTPUT
311 Teuchos::Range1D range;
312
313 *out_ << "\n*** d_old ***\n";
314 RTOpPack::ConstSubVectorView<Scalar> dov;
315 d_old->acquireDetachedView(range, &dov);
316 auto doa = dov.values();
317 for (auto i = 0; i < doa.size(); ++i) *out_ << doa[i] << " ";
318 *out_ << "\n*** d_old ***\n";
319
320 *out_ << "\n*** v_old ***\n";
321 RTOpPack::ConstSubVectorView<Scalar> vov;
322 v_old->acquireDetachedView(range, &vov);
323 auto voa = vov.values();
324 for (auto i = 0; i < voa.size(); ++i) *out_ << voa[i] << " ";
325 *out_ << "\n*** v_old ***\n";
326
327 *out_ << "\n*** a_old ***\n";
328 RTOpPack::ConstSubVectorView<Scalar> aov;
329 a_old->acquireDetachedView(range, &aov);
330 auto aoa = aov.values();
331 for (auto i = 0; i < aoa.size(); ++i) *out_ << aoa[i] << " ";
332 *out_ << "\n*** a_old ***\n";
333#endif
334
335 // allocate d and v predictors
336 RCP<Thyra::VectorBase<Scalar>> d_pred = Thyra::createMember(d_old->space());
337 RCP<Thyra::VectorBase<Scalar>> v_pred = Thyra::createMember(v_old->space());
338
339 // compute displacement and velocity predictors
340 predictDisplacement(*d_pred, *d_old, *v_old, *a_old, dt);
341 predictVelocity(*v_pred, *v_old, *a_old, dt);
342
343#ifdef DEBUG_OUTPUT
344 *out_ << "\n*** d_pred ***\n";
345 RTOpPack::ConstSubVectorView<Scalar> dpv;
346 d_pred->acquireDetachedView(range, &dpv);
347 auto dpa = dpv.values();
348 for (auto i = 0; i < dpa.size(); ++i) *out_ << dpa[i] << " ";
349 *out_ << "\n*** d_pred ***\n";
350
351 *out_ << "\n*** v_pred ***\n";
352 RTOpPack::ConstSubVectorView<Scalar> vpv;
353 v_pred->acquireDetachedView(range, &vpv);
354 auto vpa = vpv.values();
355 for (auto i = 0; i < vpa.size(); ++i) *out_ << vpa[i] << " ";
356 *out_ << "\n*** v_pred ***\n";
357
358#endif
359 // inject d_pred, v_pred, a and other relevant data into wrapperModel
360 wrapperModel->initializeNewmark(v_pred, d_pred, dt, t, beta_, gamma_);
361
362 // create initial guess in NOX solver
363 RCP<Thyra::VectorBase<Scalar>> initial_guess = Thyra::createMember(d_pred->space());
364 if ((time == solutionHistory->minTime()) && (this->initialGuess_ != Teuchos::null)) {
365 //if first time step and initialGuess_ is provided, set initial_guess = initialGuess_
366 //Throw an exception if initial_guess is not compatible with solution
367 bool is_compatible = (initial_guess->space())->isCompatible(*this->initialGuess_->space());
368 TEUCHOS_TEST_FOR_EXCEPTION(
369 is_compatible != true, std::logic_error,
370 "Error in Tempus::NemwarkImplicitDForm takeStep(): user-provided initial guess'!\n"
371 << "for Newton is not compatible with solution vector!\n");
372 Thyra::copy(*this->initialGuess_, initial_guess.ptr());
373 }
374 else {
375 //Otherwise, set initial guess = diplacement predictor
376 Thyra::copy(*d_pred, initial_guess.ptr());
377 }
378
379 stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper,
381
382
383 //Set d_pred as initial guess for NOX solver, and solve nonlinear system.
384 const Thyra::SolveStatus<Scalar> sStatus = (*(this->solver_)).solve(&*initial_guess);
385
386 workingState->setSolutionStatus(sStatus); // Converged --> pass.
387
388 stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper,
390
391 //solve will return converged solution in initial_guess
392 //vector. Copy it here to d_new, to define the new displacement.
393 Thyra::copy(*initial_guess, d_new.ptr());
394
395 //correct acceleration, velocity
396 correctAcceleration(*a_new, *d_pred, *d_new, dt);
397 correctVelocity(*v_new, *v_pred, *a_new, dt);
398
399#ifdef DEBUG_OUTPUT
400 *out_ << "\n*** d_new ***\n";
401 RTOpPack::ConstSubVectorView<Scalar> dnv;
402 d_new->acquireDetachedView(range, &dnv);
403 auto dna = dnv.values();
404 for (auto i = 0; i < dna.size(); ++i) *out_ << dna[i] << " ";
405 *out_ << "\n*** d_new ***\n";
406
407 *out_ << "\n*** v_new ***\n";
408 RTOpPack::ConstSubVectorView<Scalar> vnv;
409 v_new->acquireDetachedView(range, &vnv);
410 auto vna = vnv.values();
411 for (auto i = 0; i < vna.size(); ++i) *out_ << vna[i] << " ";
412 *out_ << "\n*** v_new ***\n";
413
414 *out_ << "\n*** a_new ***\n";
415 RTOpPack::ConstSubVectorView<Scalar> anv;
416 a_new->acquireDetachedView(range, &anv);
417 auto ana = anv.values();
418 for (auto i = 0; i < ana.size(); ++i) *out_ << ana[i] << " ";
419 *out_ << "\n*** a_new ***\n";
420#endif
421
422 workingState->setOrder(this->getOrder());
423 workingState->computeNorms(currentState);
424
425 stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper,
427 }
428 return;
429}
430
437template <class Scalar>
438Teuchos::RCP<Tempus::StepperState<Scalar>>
440#ifdef VERBOSE_DEBUG_OUTPUT
441 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
442#endif
443 Teuchos::RCP<Tempus::StepperState<Scalar>> stepperState =
444 rcp(new StepperState<Scalar>(this->getStepperType()));
445 return stepperState;
446}
447
448template <class Scalar>
449void
451 Teuchos::FancyOStream& out,
452 const Teuchos::EVerbosityLevel verbLevel) const {
453#ifdef VERBOSE_DEBUG_OUTPUT
454 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
455#endif
456
457 out.setOutputToRootOnly(0);
458 out << std::endl;
459 Stepper<Scalar>::describe(out, verbLevel);
460 StepperImplicit<Scalar>::describe(out, verbLevel);
461
462 out << "--- StepperNewmarkImplicitDForm ---\n";
463 out << " schemeName_ = " << schemeName_ << std::endl;
464 out << " beta_ = " << beta_ << std::endl;
465 out << " gamma_ = " << gamma_ << std::endl;
466 out << "-----------------------------------" << std::endl;
467}
468
469
470template<class Scalar>
471bool StepperNewmarkImplicitDForm<Scalar>::isValidSetup(Teuchos::FancyOStream & out) const
472{
473 out.setOutputToRootOnly(0);
474 bool isValidSetup = true;
475
476 if ( !Stepper<Scalar>::isValidSetup(out) ) isValidSetup = false;
477
478 //if ( !StepperImplicit<Scalar>::isValidSetup(out) ) isValidSetup = false;
479 if (this->wrapperModel_->getAppModel() == Teuchos::null) {
480 isValidSetup = false;
481 out << "The application ModelEvaluator is not set!\n";
482 }
483
484 if (this->wrapperModel_ == Teuchos::null) {
485 isValidSetup = false;
486 out << "The wrapper ModelEvaluator is not set!\n";
487 }
488
489 if (this->solver_ == Teuchos::null) {
490 isValidSetup = false;
491 out << "The solver is not set!\n";
492 }
493
494 return isValidSetup;
495}
496
497
498template <class Scalar>
499Teuchos::RCP<const Teuchos::ParameterList>
501#ifdef VERBOSE_DEBUG_OUTPUT
502 *out_ << "DEBUG: " << __PRETTY_FUNCTION__ << "\n";
503#endif
504 auto pl = this->getValidParametersBasicImplicit();
505
506 auto newmarkPL = Teuchos::parameterList("Newmark Parameters");
507 newmarkPL->set<std::string>("Scheme Name", schemeName_);
508 newmarkPL->set<double> ("Beta", beta_);
509 newmarkPL->set<double> ("Gamma", gamma_ );
510 pl->set("Newmark Parameters", *newmarkPL);
511
512 return pl;
513}
514
515// Nonmember constructor - ModelEvaluator and ParameterList
516// ------------------------------------------------------------------------
517template<class Scalar>
518Teuchos::RCP<StepperNewmarkImplicitDForm<Scalar> >
520 const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
521 Teuchos::RCP<Teuchos::ParameterList> pl)
522{
523 auto stepper = Teuchos::rcp(new StepperNewmarkImplicitDForm<Scalar>());
524 stepper->setStepperImplicitValues(pl);
525
526 if (pl != Teuchos::null) {
527 if (pl->isSublist("Newmark Parameters")) {
528 auto newmarkPL = pl->sublist("Newmark Parameters", true);
529 std::string schemeName =
530 newmarkPL.get<std::string>("Scheme Name", "Average Acceleration");
531 stepper->setSchemeName(schemeName);
532 if (schemeName == "User Defined") {
533 stepper->setBeta (newmarkPL.get<double>("Beta", 0.25));
534 stepper->setGamma(newmarkPL.get<double>("Gamma", 0.5 ));
535 }
536 } else {
537 stepper->setSchemeName("Average Acceleration");
538 }
539 }
540
541 if (model != Teuchos::null) {
542 stepper->setModel(model);
543 stepper->initialize();
544 }
545
546 return stepper;
547}
548
549
550} // namespace Tempus
551#endif // Tempus_StepperNewmarkImplicitDForm_impl_hpp
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess_
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasicImplicit() const
Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver_
virtual void setSolver(Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver) override
Set solver.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > getSolver() const override
Get solver.
virtual void setZeroInitialGuess(bool zIG)
Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False).
virtual void setAppAction(Teuchos::RCP< StepperNewmarkImplicitDFormAppAction< Scalar > > appAction)
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Set the model.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
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
void correctAcceleration(Thyra::VectorBase< Scalar > &a, const Thyra::VectorBase< Scalar > &dPred, const Thyra::VectorBase< Scalar > &d, const Scalar dt) 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
void predictVelocity(Thyra::VectorBase< Scalar > &vPred, 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
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
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< StepperNewmarkImplicitDFormAppAction< Scalar > > stepperNewmarkImpAppAction_
StepperState is a simple class to hold state information about the stepper.
bool isInitialized_
True if stepper's member data is initialized.
void setICConsistencyCheck(bool c)
void setStepperName(std::string s)
Set the stepper name.
virtual void initialize()
Initialize after construction and changing input parameters.
std::string getStepperType() const
Get the stepper type. The stepper type is used as an identifier for the stepper, and can only be set ...
virtual void setUseFSAL(bool a)
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
virtual void checkInitialized()
Check initialization, and error out on failure.
void setStepperType(std::string s)
Set the stepper type.
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,...
Teuchos::RCP< StepperNewmarkImplicitDForm< Scalar > > createStepperNewmarkImplicitDForm(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].