DPsim
Loading...
Searching...
No Matches
MNASyncGenInterface.h
Go to the documentation of this file.
1/* Copyright 2017-2020 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
12#include <dpsim-models/Config.h>
14
15namespace CPS {
18protected:
25
26public:
27 typedef std::shared_ptr<MNASyncGenInterface> Ptr;
28 typedef std::vector<Ptr> List;
29
31
32 // Solver functions
34 virtual void correctorStep() = 0;
36 virtual void updateVoltage(const Matrix &leftVector) = 0;
38 virtual bool requiresIteration() { return false; }
39
42 void setMaxIterations(Int maxIterations) { mMaxIter = maxIterations; }
44 void setTolerance(Real Tolerance) { mTolerance = Tolerance; }
45
46protected:
49};
50} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
std::shared_ptr< MNASyncGenInterface > Ptr
virtual void correctorStep()=0
Attribute< Int >::Ptr mNumIter
void setTolerance(Real Tolerance)
void setMaxIterations(Int maxIterations)
virtual void updateVoltage(const Matrix &leftVector)=0
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition Definitions.h:81
double Real
Definition Definitions.h:62
int Int
Definition Definitions.h:61