From 7cefc03667243513aa87c4a1dc5ececf77c9d436 Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Thu, 26 Nov 2009 10:34:59 +0000 Subject: [PATCH] oupss --- Solver/dgAlgorithm.cpp | 12 ++++++------ Solver/dgMainTest.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Solver/dgAlgorithm.cpp b/Solver/dgAlgorithm.cpp index 551e0e9e8d..6b0d57058e 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 3b8fc082c8..13738ae964 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){ -- GitLab