Skip to content
Snippets Groups Projects
Commit 7cefc036 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

oupss

parent bdf2c888
No related branches found
No related tags found
No related merge requests found
......@@ -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++) {
......
......@@ -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){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment