Pulse adds COVID-19 Simulation Support
×
SECircuit< CIRCUIT_TEMPLATE > Class Template Reference

#include <SECircuit.h>

Inherits Loggable.

Public Member Functions

 SECircuit (const std::string &name, Logger *logger)
 
virtual ~SECircuit ()
 
virtual void Clear ()
 
virtual std::string GetName () const
 
virtual bool HasReferenceNode () const
 
virtual void AddNode (NodeType &node)
 
virtual void ForceAddNode (NodeType &node)
 
virtual bool HasNode (NodeType &node)
 
virtual bool HasNode (const std::string &name)
 
virtual NodeType * GetNode (const std::string &name)
 
virtual const NodeType * GetNode (const std::string &name) const
 
virtual const std::vector< NodeType * > & GetNodes () const
 
virtual void RemoveNode (const NodeType &node)
 
virtual void RemoveNode (const std::string &name)
 
virtual void AddPath (PathType &node)
 
virtual void ForceAddPath (PathType &node)
 
virtual bool HasPath (PathType &node)
 
virtual bool HasPath (const std::string &name)
 
virtual PathType * GetPath (const std::string &name)
 
virtual const PathType * GetPath (const std::string &name) const
 
virtual const std::vector< PathType * > & GetPaths () const
 
virtual void RemovePath (const PathType &path)
 
virtual void RemovePath (const std::string &name)
 
virtual const std::vector< PathType * > & GetValvePaths ()
 
virtual const std::vector< PathType * > & GetPolarizedElementPaths ()
 
virtual const std::vector< PathType * > * GetTargetPaths (const NodeType &node) const
 Returns all target paths for a node. More...
 
virtual const std::vector< PathType * > * GetSourcePaths (const NodeType &node) const
 Returns all source paths for a node. More...
 
virtual const std::vector< PathType * > * GetConnectedPaths (const NodeType &node) const
 Returns all source paths for a node. More...
 
virtual void StateChange ()
 
virtual void SetNextAndCurrentFromBaselines ()
 Set all Current and Next values to the Baseline values for all Elements. More...
 
- Public Member Functions inherited from Loggable
 Loggable (Logger *logger=nullptr)
 
 Loggable (std::string const &logfile)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void SetLogger (Logger &logger)
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 
std::string to_string (int i)
 
std::string to_string (unsigned int i)
 
std::string to_string (size_t t)
 
std::string to_string (float f)
 
std::string to_string (double d)
 

Protected Attributes

std::string m_Name
 
std::stringstream m_ss
 
std::vector< NodeType * > m_Nodes
 
std::vector< PathType * > m_Paths
 
std::map< const NodeType *, std::vector< PathType * > * > m_TargetPathMap
 
std::map< const NodeType *, std::vector< PathType * > * > m_SourcePathMap
 
std::map< const NodeType *, std::vector< PathType * > * > m_ConnectedPathMap
 
std::vector< PathType * > m_ValvePaths
 
std::vector< PathType * > m_PolarizedElementPaths
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PBCircuit
 

Additional Inherited Members

- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ SECircuit()

template<CIRCUIT_TEMPLATE >
SECircuit< CIRCUIT_TEMPLATE >::SECircuit ( const std::string &  name,
Logger logger 
)

◆ ~SECircuit()

template<CIRCUIT_TEMPLATE >
SECircuit< CIRCUIT_TEMPLATE >::~SECircuit ( )
virtual

Member Function Documentation

◆ AddNode()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::AddNode ( NodeType &  node)
virtual

◆ AddPath()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::AddPath ( PathType &  node)
virtual

◆ Clear()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::Clear ( )
virtual

◆ ForceAddNode()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::ForceAddNode ( NodeType &  node)
virtual

◆ ForceAddPath()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::ForceAddPath ( PathType &  node)
virtual

◆ GetConnectedPaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > * SECircuit< CIRCUIT_TEMPLATE >::GetConnectedPaths ( const NodeType &  node) const
virtual

Returns all source paths for a node.

Parameters
CircuitThe circuit in question.
nodeCircuit node
Returns
Vector of circuit paths

Finds all paths where the input node is the source or target node. Returns a vector of the paths.

◆ GetName()

template<CIRCUIT_TEMPLATE >
std::string SECircuit< CIRCUIT_TEMPLATE >::GetName ( ) const
virtual

◆ GetNode() [1/2]

template<CIRCUIT_TEMPLATE >
NodeType * SECircuit< CIRCUIT_TEMPLATE >::GetNode ( const std::string &  name)
virtual

◆ GetNode() [2/2]

template<CIRCUIT_TEMPLATE >
const NodeType * SECircuit< CIRCUIT_TEMPLATE >::GetNode ( const std::string &  name) const
virtual

◆ GetNodes()

template<CIRCUIT_TEMPLATE >
const std::vector< NodeType * > & SECircuit< CIRCUIT_TEMPLATE >::GetNodes ( ) const
virtual

◆ GetPath() [1/2]

template<CIRCUIT_TEMPLATE >
PathType * SECircuit< CIRCUIT_TEMPLATE >::GetPath ( const std::string &  name)
virtual

◆ GetPath() [2/2]

template<CIRCUIT_TEMPLATE >
const PathType * SECircuit< CIRCUIT_TEMPLATE >::GetPath ( const std::string &  name) const
virtual

◆ GetPaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > & SECircuit< CIRCUIT_TEMPLATE >::GetPaths ( ) const
virtual

◆ GetPolarizedElementPaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > & SECircuit< CIRCUIT_TEMPLATE >::GetPolarizedElementPaths ( )
virtual

◆ GetSourcePaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > * SECircuit< CIRCUIT_TEMPLATE >::GetSourcePaths ( const NodeType &  node) const
virtual

Returns all source paths for a node.

Parameters
CircuitThe circuit in question.
nodeCircuit node
Returns
Vector of circuit paths

Finds all paths where the input node is the source node. Returns a vector of the paths.

◆ GetTargetPaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > * SECircuit< CIRCUIT_TEMPLATE >::GetTargetPaths ( const NodeType &  node) const
virtual

Returns all target paths for a node.

Parameters
CircuitThe circuit in question.
nodeCircuit node
Returns
Vector of circuit paths

Finds all paths where the input node is the target node. Returns a vector of the paths.

◆ GetValvePaths()

template<CIRCUIT_TEMPLATE >
const std::vector< PathType * > & SECircuit< CIRCUIT_TEMPLATE >::GetValvePaths ( )
virtual

◆ HasNode() [1/2]

template<CIRCUIT_TEMPLATE >
bool SECircuit< CIRCUIT_TEMPLATE >::HasNode ( NodeType &  node)
virtual

◆ HasNode() [2/2]

template<CIRCUIT_TEMPLATE >
bool SECircuit< CIRCUIT_TEMPLATE >::HasNode ( const std::string &  name)
virtual

◆ HasPath() [1/2]

template<CIRCUIT_TEMPLATE >
bool SECircuit< CIRCUIT_TEMPLATE >::HasPath ( PathType &  node)
virtual

◆ HasPath() [2/2]

template<CIRCUIT_TEMPLATE >
bool SECircuit< CIRCUIT_TEMPLATE >::HasPath ( const std::string &  name)
virtual

◆ HasReferenceNode()

template<CIRCUIT_TEMPLATE >
bool SECircuit< CIRCUIT_TEMPLATE >::HasReferenceNode ( ) const
virtual

◆ RemoveNode() [1/2]

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::RemoveNode ( const NodeType &  node)
virtual

◆ RemoveNode() [2/2]

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::RemoveNode ( const std::string &  name)
virtual

◆ RemovePath() [1/2]

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::RemovePath ( const PathType &  path)
virtual

◆ RemovePath() [2/2]

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::RemovePath ( const std::string &  name)
virtual

◆ SetNextAndCurrentFromBaselines()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::SetNextAndCurrentFromBaselines ( )
virtual

Set all Current and Next values to the Baseline values for all Elements.

◆ StateChange()

template<CIRCUIT_TEMPLATE >
void SECircuit< CIRCUIT_TEMPLATE >::StateChange ( )
virtual
Error:
Fatal: Invalid Path in the Circuit.
Error:
Fatal: There are too many assumed state options. The Circuit solver can only handle up to 64 Diodes and Polar Elements in a single circuit (i.e. ~1.8e19 possible combinations).

Friends And Related Function Documentation

◆ PBCircuit

template<CIRCUIT_TEMPLATE >
friend class PBCircuit
friend

Member Data Documentation

◆ m_ConnectedPathMap

template<CIRCUIT_TEMPLATE >
std::map<const NodeType*, std::vector<PathType*>*> SECircuit< CIRCUIT_TEMPLATE >::m_ConnectedPathMap
protected

◆ m_Name

template<CIRCUIT_TEMPLATE >
std::string SECircuit< CIRCUIT_TEMPLATE >::m_Name
protected

◆ m_Nodes

template<CIRCUIT_TEMPLATE >
std::vector<NodeType*> SECircuit< CIRCUIT_TEMPLATE >::m_Nodes
protected

◆ m_Paths

template<CIRCUIT_TEMPLATE >
std::vector<PathType*> SECircuit< CIRCUIT_TEMPLATE >::m_Paths
protected

◆ m_PolarizedElementPaths

template<CIRCUIT_TEMPLATE >
std::vector<PathType*> SECircuit< CIRCUIT_TEMPLATE >::m_PolarizedElementPaths
protected

◆ m_SourcePathMap

template<CIRCUIT_TEMPLATE >
std::map<const NodeType*, std::vector<PathType*>*> SECircuit< CIRCUIT_TEMPLATE >::m_SourcePathMap
protected

◆ m_ss

template<CIRCUIT_TEMPLATE >
std::stringstream SECircuit< CIRCUIT_TEMPLATE >::m_ss
protected

◆ m_TargetPathMap

template<CIRCUIT_TEMPLATE >
std::map<const NodeType*, std::vector<PathType*>*> SECircuit< CIRCUIT_TEMPLATE >::m_TargetPathMap
protected

◆ m_ValvePaths

template<CIRCUIT_TEMPLATE >
std::vector<PathType*> SECircuit< CIRCUIT_TEMPLATE >::m_ValvePaths
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.