1 #ifndef DEF_RKMK_DIAGONALSTEPINTERNALS 2 #define DEF_RKMK_DIAGONALSTEPINTERNALS 11 template <
typename T_LIE_ALGEBRA,
12 int T_N_INTERNAL_STAGES,
13 typename T_M =
double>
18 T_LIE_ALGEBRA m_initialGuess;
19 T_LIE_ALGEBRA m_solution;
27 m_initialGuess = T_LIE_ALGEBRA::Zero();
28 m_solution = T_LIE_ALGEBRA::Zero();
38 {
return m_currentStep; }
43 { m_currentStep = c; }
47 { this->m_k[m_currentStep] = T_LIE_ALGEBRA(x); }
54 this->m_k[m_currentStep] = T_LIE_ALGEBRA(x);
56 T_LIE_ALGEBRA omega0 = T_LIE_ALGEBRA::Zero();
57 T_LIE_ALGEBRA omega = omega0;
58 T_LIE_ALGEBRA res = omega0;
63 for (j=0; j<=m_currentStep; j++) {
64 omega += this->m_k[j]*this->a_coeffs(m_currentStep,j);
66 omega = this->m_h*omega;
67 this->m_problem.computeA(A,omega.exp()*this->m_y0);
68 res = omega.computeDExpRInv(A,this->m_order_q) - this->m_k[m_currentStep];
79 this->m_k[m_currentStep] = T_LIE_ALGEBRA(x);
86 double a = this->a_coeffs(m_currentStep,m_currentStep);
91 T_LIE_ALGEBRA w = T_LIE_ALGEBRA::Zero();
92 for (j=0; j<=m_currentStep; j++) {
93 w += this->a_coeffs(m_currentStep,j)*this->m_k[j];
102 std::vector<T_LIE_ALGEBRA> JA;
103 this->computeJacobianA(JA,Y);
104 Eigen::Matrix<double,T_LIE_ALGEBRA::DOF,T_LIE_ALGEBRA::DOF> MatJA;
105 for (i=0; i<T_LIE_ALGEBRA::DOF; i++) {
107 MatJA.row(i) = (JA[i]).toVector();
117 for (p=0; p<T_LIE_ALGEBRA::DOF; p++) {
118 Gen = T_LIE_ALGEBRA::Generator(p);
119 dAdk = T_LIE_ALGEBRA(this->m_h*a*MatJA*w.partialExp(p)*this->m_y0);
122 if (this->m_order_q > 0) {
126 for (i=0; i<this->m_order_q; i++) {
127 factorial = factorial*(i+1);
128 daddk = this->m_h*a*Gen.bracket(ad) + w.bracket(daddk);
130 dfdk += (BERNOULLI_NUMBERS[i]/factorial)*daddk;
136 J.col(p) = (dfdk-Gen).toVector();
Definition: DiagonalStepInternals.hpp:14
Definition: Abstract_Problem.hpp:10
Definition: Abstract_Integrator.hpp:4
Definition: StepInternals.hpp:11
Definition: NOXVector.hpp:14
Definition: Abstract_NOXStep.hpp:12