DPsim
Loading...
Searching...
No Matches
DAEInterface.h
1/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2 * EONERC, RWTH Aachen University
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 *********************************************************************************/
8
9#pragma once
10
11#include <dpsim-models/Definitions.h>
12#include <vector>
13
14namespace CPS {
16public:
17 typedef std::shared_ptr<DAEInterface> Ptr;
18 typedef std::vector<Ptr> List;
19
20 using ResFn = std::function<void(double, const double *, const double *,
21 double *, std::vector<int> &)>;
22
23 // #### DAE Section ####
25 virtual void daeResidual(double ttime, const double state[],
26 const double dstate_dt[], double resid[],
27 std::vector<int> &off) = 0;
29 virtual Complex daeInitialize() = 0;
30};
31} // namespace CPS
virtual void daeResidual(double ttime, const double state[], const double dstate_dt[], double resid[], std::vector< int > &off)=0
Residual Function for DAE Solver.
virtual Complex daeInitialize()=0
Voltage Getter for Components.