DPsim
Loading...
Searching...
No Matches
TopologicalNode.h
Go to the documentation of this file.
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
14
15namespace CPS {
16
18protected:
20 Bool mIsGround = false;
21
22public:
23 typedef std::shared_ptr<TopologicalNode> Ptr;
24 typedef std::vector<Ptr> List;
25
27
31 const std::vector<Complex> &initialVoltage);
33 virtual ~TopologicalNode() {}
34
36 Bool isGround() const;
40 void setInitialVoltage(MatrixComp voltage) const;
42 void setInitialVoltage(Complex voltage) const;
44 void setInitialVoltage(Complex voltage, Int phaseIndex) const;
48 PhaseType phaseType() const;
52 virtual std::vector<UInt> matrixNodeIndices() = 0;
54 virtual void setMatrixNodeIndex(UInt phase, UInt matrixNodeIndex) = 0;
55};
56} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
String uid()
Returns unique id.
std::vector< Ptr > List
virtual UInt matrixNodeIndex(PhaseType phaseType=PhaseType::Single)=0
void setInitialVoltage(MatrixComp voltage) const
const Attribute< MatrixComp >::Ptr mInitialVoltage
PhaseType phaseType() const
virtual void setMatrixNodeIndex(UInt phase, UInt matrixNodeIndex)=0
virtual std::vector< UInt > matrixNodeIndices()=0
std::shared_ptr< TopologicalNode > Ptr
Complex initialSingleVoltage(PhaseType phaseType=PhaseType::Single)
MatrixComp initialVoltage() const
std::string String
Definition Definitions.h:65
int Int
Definition Definitions.h:61
std::complex< Real > Complex
Definition Definitions.h:63
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixComp
Dense matrix for complex numbers.
Definition Definitions.h:84
bool Bool
Definition Definitions.h:64
unsigned int UInt
Definition Definitions.h:60