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 @@
#include <dpsim/Utils.h>
#include <cps/Utils.h>
#include <dpsim/MNASolverFactory.h>
#ifdef WITH_SPARSE
#include <dpsim/MNASolverSysRecomp.h>
#endif
#include <dpsim/PFSolverPowerPolar.h>
#include <dpsim/DiakopticsSolver.h>
......@@ -171,6 +173,7 @@ void Simulation::createMNASolver() {
subnets[net], mTearComponents, mTimeStep, mLogLevel);
}
else if (mSystemMatrixRecomputation) {
#ifdef WITH_SPARSE
// Recompute system matrix if switches or other components change
solver = std::make_shared<MnaSolverSysRecomp<VarType>>(
mName + copySuffix, mDomain, mLogLevel);
......@@ -180,6 +183,9 @@ void Simulation::createMNASolver() {
solver->setSteadStIniAccLimit(mSteadStIniAccLimit);
solver->setSystem(subnets[net]);
solver->initialize();
#else
throw SystemError("Recomputation Solver requires WITH_SPARSE to be set.");
#endif
}
else {
// 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