Commit 792eb70e authored by Niklas Eiling's avatar Niklas Eiling
Browse files

only build MnaSolverSysRecomp if WITH_SPARSE is set. MnaSolverSysRecomp with...


only build MnaSolverSysRecomp if WITH_SPARSE is set. MnaSolverSysRecomp with dense Eigen solver is no longer supported.
Signed-off-by: Niklas Eiling's avatarNiklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
parent 3e880bc5
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
#include <dpsim/Utils.h> #include <dpsim/Utils.h>
#include <cps/Utils.h> #include <cps/Utils.h>
#include <dpsim/MNASolverFactory.h> #include <dpsim/MNASolverFactory.h>
#ifdef WITH_SPARSE
#include <dpsim/MNASolverSysRecomp.h> #include <dpsim/MNASolverSysRecomp.h>
#endif
#include <dpsim/PFSolverPowerPolar.h> #include <dpsim/PFSolverPowerPolar.h>
#include <dpsim/DiakopticsSolver.h> #include <dpsim/DiakopticsSolver.h>
...@@ -171,6 +173,7 @@ void Simulation::createMNASolver() { ...@@ -171,6 +173,7 @@ void Simulation::createMNASolver() {
subnets[net], mTearComponents, mTimeStep, mLogLevel); subnets[net], mTearComponents, mTimeStep, mLogLevel);
} }
else if (mSystemMatrixRecomputation) { else if (mSystemMatrixRecomputation) {
#ifdef WITH_SPARSE
// Recompute system matrix if switches or other components change // Recompute system matrix if switches or other components change
solver = std::make_shared<MnaSolverSysRecomp<VarType>>( solver = std::make_shared<MnaSolverSysRecomp<VarType>>(
mName + copySuffix, mDomain, mLogLevel); mName + copySuffix, mDomain, mLogLevel);
...@@ -180,6 +183,9 @@ void Simulation::createMNASolver() { ...@@ -180,6 +183,9 @@ void Simulation::createMNASolver() {
solver->setSteadStIniAccLimit(mSteadStIniAccLimit); solver->setSteadStIniAccLimit(mSteadStIniAccLimit);
solver->setSystem(subnets[net]); solver->setSystem(subnets[net]);
solver->initialize(); solver->initialize();
#else
throw SystemError("Recomputation Solver requires WITH_SPARSE to be set.");
#endif
} }
else { else {
// Default case with precomputed system matrices for different configurations // Default case with precomputed system matrices for different configurations
......
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