Commit b5a5b8d1 authored by Lukas Riedel's avatar Lukas Riedel

Remove SuperLU direct linear solver

Only use OVLP_AMG_4_DG for all computations
parent c5a40253
......@@ -77,44 +77,23 @@ void Simulation<Traits>::operator_setup ()
go1 = std::make_unique<GO1>(*gfs,*cc,*gfs,*cc,*tlop,mbe_tlop);
igo = std::make_unique<IGO>(*go0,*go1);
// build parallel solvers
if (helper.size() > 1) {
// --- Solvers ---
lsgfs = std::make_unique<LSGFS>(LSGFSHelper::create(gv));
lscc = std::make_unique<LSCC>();
ls_par = std::make_unique<LSPar>(*igo,*cc,*lsgfs,*lscc,1000,0,true,true);
pdesolver_par = std::make_unique<PDESOLVERPar>(*igo,*ls_par);
pdesolver_par->setParameters(inifile.sub("NewtonParameters"));
pdesolver_par->setVerbosityLevel(verbose);
// --- Time Step Operators ---
Dune::PDELab::OneStepMethodResult osm_result;
if(osm_par){
osm_result = osm_par->result(); // cache old result
}
osm_par = std::make_unique<OSMPar>(alex2,*igo,*pdesolver_par);
osm_par->setResult(osm_result);
osm_par->setVerbosityLevel(verbose+1);
}
// build sequential solvers
else {
ls_seq = std::make_unique<LSSeq>(5000,0);
pdesolver_seq = std::make_unique<PDESOLVERSeq>(*igo,*ls_seq);
pdesolver_seq->setParameters(inifile.sub("NewtonParameters"));
pdesolver_seq->setVerbosityLevel(verbose);
// --- Time Step Operators ---
Dune::PDELab::OneStepMethodResult osm_result;
if(osm_seq){
osm_result = osm_seq->result(); // cache old result
}
osm_seq = std::make_unique<OSMSeq>(alex2,*igo,*pdesolver_seq);
osm_seq->setResult(osm_result);
osm_seq->setVerbosityLevel(verbose+1);
// --- Solvers ---
lsgfs = std::make_unique<LSGFS>(LSGFSHelper::create(gv));
lscc = std::make_unique<LSCC>();
ls = std::make_unique<LS>(*igo,*cc,*lsgfs,*lscc,1000,0,true,true);
pdesolver = std::make_unique<PDESOLVER>(*igo,*ls);
pdesolver->setParameters(inifile.sub("NewtonParameters"));
pdesolver->setVerbosityLevel(verbose);
// --- Time Step Operators ---
Dune::PDELab::OneStepMethodResult osm_result;
if(osm){
osm_result = osm->result(); // cache old result
}
osm = std::make_unique<OSM>(alex2,*igo,*pdesolver);
osm->setResult(osm_result);
osm->setVerbosityLevel(verbose+1);
gfs->update();
......@@ -144,18 +123,10 @@ bool Simulation<Traits>::compute_time_step ()
try
{
// solve in parallel
if (helper.size() > 1) {
pdesolver_par->setMaxIterations(controller->getIterations());
dwarn.push(false);
osm_par->apply(t,dt,*uold,*unew);
dwarn.pop();
}
// solve sequentially
else {
pdesolver_seq->setMaxIterations(controller->getIterations());
osm_seq->apply(t, dt, *uold, *unew);
}
pdesolver->setMaxIterations(controller->getIterations());
dwarn.push(false);
osm->apply(t,dt,*uold,*unew);
dwarn.pop();
*uold = *unew;
}
......
......@@ -65,17 +65,14 @@ protected:
/// Solution vector type
using U = typename IGO::Traits::Domain;
/// Linear solver types
using LSSeq = Dune::PDELab::ISTLBackend_SEQ_SuperLU;
using LSPar = Dune::PDELab::ISTLBackend_OVLP_AMG_4_DG<IGO,CC,LSGFS,LSCC,
using LS = Dune::PDELab::ISTLBackend_OVLP_AMG_4_DG<IGO,CC,LSGFS,LSCC,
Dune::PDELab::CG2DGProlongation,Dune::SeqSSOR,Dune::BiCGSTABSolver>;
/// Non-linear solver types
using PDESOLVERSeq = Dune::PDELab::Newton<IGO,LSSeq,U>;
using PDESOLVERPar = Dune::PDELab::Newton<IGO,LSPar,U>;
using PDESOLVER = Dune::PDELab::Newton<IGO,LS,U>;
/// Time stepping scheme
using TimeStepScheme = Dune::PDELab::Alexander2Parameter<RF>;
/// Methods computing the time step
using OSMSeq = Dune::PDELab::OneStepMethod<RF,IGO,PDESOLVERSeq,U,U>;
using OSMPar = Dune::PDELab::OneStepMethod<RF,IGO,PDESOLVERPar,U,U>;
using OSM = Dune::PDELab::OneStepMethod<RF,IGO,PDESOLVER,U,U>;
// -- Utility Class Definitions -- //
/// VTK Output writer base class
......@@ -111,12 +108,9 @@ protected:
std::unique_ptr<GO0> go0;
std::unique_ptr<GO1> go1;
std::unique_ptr<IGO> igo;
std::unique_ptr<LSSeq> ls_seq;
std::unique_ptr<LSPar> ls_par;
std::unique_ptr<PDESOLVERSeq> pdesolver_seq;
std::unique_ptr<PDESOLVERPar> pdesolver_par;
std::unique_ptr<OSMSeq> osm_seq;
std::unique_ptr<OSMPar> osm_par;
std::unique_ptr<LS> ls;
std::unique_ptr<PDESOLVER> pdesolver;
std::unique_ptr<OSM> osm;
TimeStepScheme alex2;
std::unique_ptr<U> uold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment