DPsim
Loading...
Searching...
No Matches
dpsim
include
dpsim
MNAStateSpaceContributor.h
1
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
2
// SPDX-License-Identifier: MPL-2.0
3
4
#pragma once
5
6
#include <memory>
7
#include <vector>
8
9
#include <dpsim-models/Solver/MNAInterface.h>
10
#include <dpsim/Definitions.h>
11
12
namespace
DPsim
{
13
24
class
MNAStateSpaceContributor
{
25
public
:
26
using
Ptr = std::shared_ptr<MNAStateSpaceContributor>;
27
using
List = std::vector<Ptr>;
28
29
virtual
~MNAStateSpaceContributor
() =
default
;
30
32
virtual
UInt
getStateCount
()
const
= 0;
33
35
virtual
Bool
isVariable
()
const
{
return
false
; }
36
38
virtual
void
stamp
(Matrix &AdLocal, Matrix &BdMna, Matrix &CdMna,
39
UInt stateOffset, UInt mnaVectorSize)
const
= 0;
40
};
41
47
class
MNAStateSpaceContributorFactory
{
48
public
:
49
static
MNAStateSpaceContributor::List
50
createList(
const
CPS::MNAInterface::List &components);
51
52
private
:
53
static
MNAStateSpaceContributor::Ptr
54
create(
const
CPS::MNAInterface::Ptr &component);
55
};
56
57
}
// namespace DPsim
DPsim::MNAStateSpaceContributorFactory
Definition
MNAStateSpaceContributor.h:47
DPsim::MNAStateSpaceContributor
Definition
MNAStateSpaceContributor.h:24
DPsim::MNAStateSpaceContributor::isVariable
virtual Bool isVariable() const
Returns true if the local matrices may change during simulation.
Definition
MNAStateSpaceContributor.h:35
DPsim::MNAStateSpaceContributor::getStateCount
virtual UInt getStateCount() const =0
Number of local extraction states contributed by this component.
DPsim::MNAStateSpaceContributor::stamp
virtual void stamp(Matrix &AdLocal, Matrix &BdMna, Matrix &CdMna, UInt stateOffset, UInt mnaVectorSize) const =0
Stamp this component's current local state-space contribution.
DPsim
Definition
DenseLUAdapter.cpp:13
Generated by
1.13.2