Skip to content
Snippets Groups Projects
Commit ddc70528 authored by Bruno Seny's avatar Bruno Seny
Browse files

update in Solver

parent dd525f68
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,6 @@ void dgAlgorithm::multAddInverseMassMatrix ( /*dofManager &dof,*/
const dgGroupOfElements & group,
fullMatrix<double> &residu,
fullMatrix<double> &sol)
{
for(int i=0;i<group.getNbElements();i++) {
fullMatrix<double> residuEl(residu,i,1);
......@@ -172,14 +171,15 @@ void dgAlgorithm::multAddInverseMassMatrix ( /*dofManager &dof,*/
}
}
void dgAlgorithm::rungeKutta (const dgConservationLaw &claw, // conservation law
std::vector<dgGroupOfElements*> &eGroups, //group of elements
std::vector<dgGroupOfFaces*> &fGroups, // group of interfacs
std::vector<dgGroupOfFaces*> &bGroups, // group of boundaries
double h,
fullMatrix<double> &residu,
fullMatrix<double> &sol,
int orderRK)
void dgAlgorithm::rungeKutta (
const dgConservationLaw &claw, // conservation law
std::vector<dgGroupOfElements*> &eGroups, // group of elements
std::vector<dgGroupOfFaces*> &fGroups, // group of interfacs
std::vector<dgGroupOfFaces*> &bGroups, // group of boundaries
double h, // time-step
fullMatrix<double> &residu,
fullMatrix<double> &sol,
int orderRK) // order of RK integrator
{
......
......@@ -34,13 +34,11 @@ class dgAlgorithm {
std::vector<dgGroupOfFaces*> &bGroups, // group of boundaries
const fullMatrix<double> &solution, // solution !! at faces nodes
fullMatrix<double> &residual // residual !! at faces nodes
);
);
void multAddInverseMassMatrix ( /*dofManager &dof,*/
const dgGroupOfElements & group,
fullMatrix<double> &residu,
fullMatrix<double> &sol);
void rungeKutta (
const dgConservationLaw &claw,
std::vector<dgGroupOfElements*> &eGroups, //group of elements
......@@ -50,7 +48,6 @@ class dgAlgorithm {
fullMatrix<double> &residu,
fullMatrix<double> &sol,
int orderRK=4);
void buildGroups(GModel *model, int dim, int order,
std::vector<dgGroupOfElements*> &eGroups,
std::vector<dgGroupOfFaces*> &fGroups,
......
......@@ -82,17 +82,15 @@ int main(int argc, char **argv){
print("output/init.pos",*elementGroups[0],&sol(0,0));
for(int iT=0; iT<1000; iT++) {
algo.residual(*law,elementGroups,faceGroups,boundaryGroups,sol,residu);
algo.residual(*law,elementGroups,faceGroups,boundaryGroups,sol,residu);
algo.rungeKutta(*law,elementGroups,faceGroups,boundaryGroups,0.01,residu,sol);
if(iT%10==0){
char name[10];
char name[100];
sprintf(name,"output/test_%05i.pos",iT/10);
printf("%i\n",iT);
print(name,*elementGroups[0],&sol(0,0));
}
}
delete law;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment