diff --git a/Solver/dgAlgorithm.cpp b/Solver/dgAlgorithm.cpp index 551e0e9e8db61481da2e41ddffd7a23e1957569e..6b0d57058e7d9cc4c2b822ac27bdb61f0c337179 100644 --- a/Solver/dgAlgorithm.cpp +++ b/Solver/dgAlgorithm.cpp @@ -243,12 +243,12 @@ void dgAlgorithm::multAddInverseMassMatrix ( /*dofManager &dof,*/ { -// U_{n+1}=U_n+h*(SUM_i a_i*K_i) -// K_i=M^(-1)R(U_n+b_i*K_{i-1}) - + // U_{n+1}=U_n+h*(SUM_i a_i*K_i) + // K_i=M^(-1)R(U_n+b_i*K_{i-1}) + double a[4] = {h/6.0,h/3.0,h/3.0,h/6.0}; double b[4] = {0.,h/2.0,h/2.0,h}; - + fullMatrix<double> K(sol); // Current updated solution fullMatrix<double> Unp(sol); @@ -256,12 +256,12 @@ void dgAlgorithm::multAddInverseMassMatrix ( /*dofManager &dof,*/ fullMatrix<double> iMassEl; int nbNodes=eGroups[0]->getNbNodes(); - + for(int j=0; j<orderRK;j++){ if(j!=0){ K.scale(b[j]); K.add(sol); - + } this->residual(claw,eGroups,fGroups,bGroups,K,residu); K.scale(0.); for(int i=0;i<eGroups[0]->getNbElements();i++) { diff --git a/Solver/dgMainTest.cpp b/Solver/dgMainTest.cpp index 3b8fc082c834b5cec3958c7e0ef6d0d7871d6d3a..13738ae96409edd429236b0f573f7564fb1260f7 100644 --- a/Solver/dgMainTest.cpp +++ b/Solver/dgMainTest.cpp @@ -81,7 +81,7 @@ int main(int argc, char **argv){ print("output/init.pos",*elementGroups[0],&sol(0,0)); - for(int iT=0; iT<1000; iT++) { + for(int iT=0; iT<100; iT++) { algo.residual(*law,elementGroups,faceGroups,boundaryGroups,sol,residu); algo.rungeKutta(*law,elementGroups,faceGroups,boundaryGroups,0.01,residu,sol); if(iT%10==0){