Skip to content

Commit

Permalink
Changed default solver to KLU with factorization path. Removed explic…
Browse files Browse the repository at this point in the history
…it solver configuration in circuit notebooks

Signed-off-by: Philipp Fensch <[email protected]>
  • Loading branch information
philipp-fensch committed Sep 29, 2023
1 parent c69b52d commit 758679b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dpsim/include/dpsim/MNASolverFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ class MnaSolverFactory {
static std::shared_ptr<MnaSolver<VarType>> factory(String name,
CPS::Domain domain = CPS::Domain::DP,
CPS::Logger::Level logLevel = CPS::Logger::Level::info,
DirectLinearSolverImpl implementation = DirectLinearSolverImpl::SparseLU,
DirectLinearSolverImpl implementation = DirectLinearSolverImpl::KLU,
String pluginName = "plugin.so")
{
//To avoid regression we use SparseLU in case of undefined implementation
//To avoid regression we use KLU in case of undefined implementation
if (implementation == DirectLinearSolverImpl::Undef) {
implementation = DirectLinearSolverImpl::SparseLU;
implementation = DirectLinearSolverImpl::KLU;
}
CPS::Logger::Log log = CPS::Logger::get("MnaSolverFactory", CPS::Logger::Level::info, CPS::Logger::Level::info);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@
" sim.set_system(system)\n",
" sim.do_init_from_nodes_and_terminals(True)\n",
" sim.set_domain(dpsimpy.Domain.DP)\n",
" sim.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
" sim.set_time_step(time_step)\n",
" sim.set_final_time(final_time)\n",
" if (gen_model==\"4VBR\" or gen_model==\"6VBR\"):\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@
"sim_dp.set_domain(dpsimpy.Domain.DP)\n",
"sim_dp.add_logger(logger_dp)\n",
"sim_dp.do_system_matrix_recomputation(True)\n",
"sim_dp.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
"\n",
"\n",
"# Events\n",
Expand Down Expand Up @@ -660,7 +659,6 @@
"sim_sp.set_domain(dpsimpy.Domain.SP)\n",
"sim_sp.add_logger(logger_sp)\n",
"sim_sp.do_system_matrix_recomputation(True)\n",
"sim_sp.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
"\n",
"\n",
"# Events\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@
"sim_dp.set_domain(dpsimpy.Domain.DP)\n",
"sim_dp.add_logger(logger_dp)\n",
"sim_dp.do_system_matrix_recomputation(True)\n",
"sim_dp.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
"\n",
"\n",
"# Events\n",
Expand Down Expand Up @@ -477,7 +476,6 @@
"sim_sp.set_domain(dpsimpy.Domain.SP)\n",
"sim_sp.add_logger(logger_sp)\n",
"sim_sp.do_system_matrix_recomputation(True)\n",
"sim_sp.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
"\n",
"\n",
"# Events\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@
" sim.set_system(system)\n",
" sim.do_init_from_nodes_and_terminals(True)\n",
" sim.set_domain(dpsimpy.Domain.SP)\n",
" sim.set_direct_solver_implementation(dpsimpy.DirectLinearSolverImpl.SparseLU)\n",
" sim.set_time_step(time_step)\n",
" sim.set_final_time(final_time)\n",
" sim.do_system_matrix_recomputation(True)\n",
Expand Down

0 comments on commit 758679b

Please sign in to comment.