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
11
#include <
dpsim-models/AttributeList.h
>
12
#include <dpsim-models/Config.h>
13
#include <
dpsim-models/Definitions.h
>
14
15
namespace
CPS
{
17
class
MNASyncGenInterface
{
18
protected
:
20
Attribute<Int>::Ptr
mNumIter
;
22
Int
mMaxIter
= 25;
24
Real
mTolerance
= 1e-6;
25
26
public
:
27
typedef
std::shared_ptr<MNASyncGenInterface>
Ptr
;
28
typedef
std::vector<Ptr>
List
;
29
30
virtual
~MNASyncGenInterface
(){};
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
46
protected
:
48
MNASyncGenInterface
() {}
49
};
50
}
// namespace CPS
AttributeList.h
CPS::Attribute::Ptr
AttributePointer< Attribute< T > > Ptr
Definition
Attribute.h:250
CPS::MNASyncGenInterface::List
std::vector< Ptr > List
Definition
MNASyncGenInterface.h:28
CPS::MNASyncGenInterface::Ptr
std::shared_ptr< MNASyncGenInterface > Ptr
Definition
MNASyncGenInterface.h:27
CPS::MNASyncGenInterface::MNASyncGenInterface
MNASyncGenInterface()
Constructor.
Definition
MNASyncGenInterface.h:48
CPS::MNASyncGenInterface::correctorStep
virtual void correctorStep()=0
CPS::MNASyncGenInterface::mMaxIter
Int mMaxIter
Definition
MNASyncGenInterface.h:22
CPS::MNASyncGenInterface::requiresIteration
virtual bool requiresIteration()
Definition
MNASyncGenInterface.h:38
CPS::MNASyncGenInterface::mTolerance
Real mTolerance
Definition
MNASyncGenInterface.h:24
CPS::MNASyncGenInterface::mNumIter
Attribute< Int >::Ptr mNumIter
Definition
MNASyncGenInterface.h:20
CPS::MNASyncGenInterface::setTolerance
void setTolerance(Real Tolerance)
Definition
MNASyncGenInterface.h:44
CPS::MNASyncGenInterface::setMaxIterations
void setMaxIterations(Int maxIterations)
Definition
MNASyncGenInterface.h:42
CPS::MNASyncGenInterface::~MNASyncGenInterface
virtual ~MNASyncGenInterface()
Definition
MNASyncGenInterface.h:30
CPS::MNASyncGenInterface::updateVoltage
virtual void updateVoltage(const Matrix &leftVector)=0
Definitions.h
CPS
Definition
Attribute.h:17
CPS::Matrix
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition
Definitions.h:81
CPS::Real
double Real
Definition
Definitions.h:62
CPS::Int
int Int
Definition
Definitions.h:61
dpsim-models
include
dpsim-models
Solver
MNASyncGenInterface.h
Generated by
1.13.2