11 #include <dpsim/MNASolverDirect.h>
12 #include <dpsim/MNASolverDynInterface.h>
16 template <
typename VarType>
27 void solve(Real time, Int timeStepCount)
override;
31 CPS::Domain domain = CPS::Domain::DP,
32 CPS::Logger::Level logLevel = CPS::Logger::Level::info);
41 : Task(solver.
mName +
".Solve"), mSolver(solver) {
44 if (it->getRightVector()->get().size() != 0)
45 mAttributeDependencies.push_back(it->getRightVector());
47 for (
auto node : solver.
mNodes) {
48 mModifiedAttributes.push_back(node->mVoltage);
53 void execute(Real time, Int timeStepCount) {
54 mSolver.solve(time, timeStepCount);
64 : Task(solver.
mName +
".Log"), mSolver(solver) {
66 mModifiedAttributes.push_back(Scheduler::external);
69 void execute(Real time, Int timeStepCount) {
70 mSolver.log(time, timeStepCount);
Tasks to be defined by every component.
Solver class using Modified Nodal Analysis (MNA).
CPS::MNAInterface::List mMNAComponents
List of MNA components with static stamp into system matrix.
CPS::Attribute< Matrix >::Ptr mLeftSideVector
Solution vector of unknown quantities.
CPS::SimNode< VarType >::List mNodes
List of simulation nodes.
CPS::Task::List getTasks() override
Get tasks for scheduler.
void solve(Real time, Int timeStepCount) override
Solves system for single frequency.
void recomputeSystemMatrix(Real time) override
Recomputes systems matrix.
void initialize() override
Initialize cuSparse-library.
String mName
Name for logging.
CPS::Logger::Log mSLog
Logger.