19 template <
class T,
bool _NL>
22 Base::defaultOptions();
23 m_options.addReal(
"alpha",
"Beta parameter for Wilson's method, such that 0 =< 2 beta =< 1",0.25);
24 m_options.addReal(
"delta",
"Beta parameter for Wilson's method, such that 0 =< delta =< 1",0.50);
25 m_options.addReal(
"gamma",
"Beta parameter for Wilson's method, such that 0 =< gamma =< 1",1.4);
29 template <
class T,
bool _NL>
30 template <
bool _nonlinear>
31 typename std::enable_if<(_nonlinear==false), gsStatus>::type
34 T alpha = m_options.getReal(
"alpha");
35 T delta = m_options.getReal(
"delta");
36 T gamma = m_options.getReal(
"gamma");
47 Base::_step(t,gamma*dt,Utmp,Vtmp,Atmp);
50 A = (1-1/gamma)*Aold + 1/gamma*Atmp;
58 template <
class T,
bool _NL>
59 template <
bool _nonlinear>
60 typename std::enable_if<(_nonlinear==true), gsStatus>::type
63 T alpha = m_options.getReal(
"alpha");
64 T delta = m_options.getReal(
"delta");
65 T gamma = m_options.getReal(
"gamma");
76 Base::_step(t,gamma*dt,Utmp,Vtmp,Atmp);
79 A = (1-1/gamma)*Aold + 1/gamma*Atmp;
80 U = Uold + dt*Vold + Aold*(0.5 - alpha)*dt*dt + alpha*dt*dt*A;
81 V = Vold + Aold*(1 - delta)*dt + delta*dt*A;
86 template <
class T,
bool _NL>
92 status = _step_impl<_NL>(t,dt,U,V,A);
96 template <
class T,
bool _NL>
99 if (m_options.getSwitch(
"Verbose"))
101 gsInfo<<
"Stage "<<stage<<
":";
106 template <
class T,
bool _NL>
107 void gsDynamicWilson<T,_NL>::_initOutput()
const
109 if (m_options.getSwitch(
"Verbose"))
112 gsInfo<<std::setw(4)<<std::left<<
"It.";
113 gsInfo<<std::setw(17)<<std::left<<
"|R|/|R0|";
114 gsInfo<<std::setw(17)<<std::left<<
"|dU|/|U0|"<<
"\n";
118 template <
class T,
bool _NL>
119 void gsDynamicWilson<T,_NL>::_stepOutput(
const index_t it,
const T resnorm,
const T updatenorm)
const
121 if (m_options.getSwitch(
"Verbose"))
124 gsInfo<<std::setw(4)<<std::left<<it;
125 gsInfo<<std::setw(17)<<std::left<<resnorm;
126 gsInfo<<std::setw(17)<<std::left<<updatenorm<<
"\n";
#define index_t
Definition: gsConfig.h:32
gsStatus
Definition: gsStructuralAnalysisTypes.h:20
gsStatus _step(const T t, const T dt, gsVector< T > &U, gsVector< T > &V, gsVector< T > &A) const override
Initialize the ALM.
Definition: gsDynamicWilson.hpp:87
#define gsInfo
Definition: gsDebug.h:43
virtual void defaultOptions() override
Set default options.
Definition: gsDynamicWilson.hpp:20
Performs the arc length method to solve a nonlinear system of equations.
Definition: gsDynamicWilson.h:35