#include <SEElectricalCompartment.h>

Inherits SECompartment.

Public Member Functions

virtual ~SEElectricalCompartment ()
 
virtual void Clear ()
 
virtual const SEScalarGetScalar (const std::string &name)
 
virtual bool HasChildren () const
 
virtual const std::vector< SEElectricalCompartment * > & GetChildren ()
 
virtual const std::vector< SEElectricalCompartment * > & GetLeaves ()
 
virtual bool HasNodeMapping () const
 
virtual SECompartmentNodes< ELECTRICAL_COMPARTMENT_NODE > & GetNodeMapping ()
 
virtual void MapNode (SEElectricalCircuitNode &node)
 
virtual void StateChange ()
 
virtual bool HasCurrentIn () const
 
virtual const SEScalarElectricCurrentGetCurrentIn () const
 
virtual double GetCurrentIn (const ElectricCurrentUnit &unit) const
 
virtual bool HasCurrentOut () const
 
virtual const SEScalarElectricCurrentGetCurrentOut () const
 
virtual double GetCurrentOut (const ElectricCurrentUnit &unit) const
 
virtual bool HasCharge () const
 
virtual SEScalarElectricChargeGetCharge ()
 
virtual double GetCharge (const ElectricChargeUnit &unit) const
 
virtual bool HasVoltage () const
 
virtual SEScalarElectricPotentialGetVoltage ()
 
virtual double GetVoltage (const ElectricPotentialUnit &unit) const
 
virtual void AddLink (SEElectricalCompartmentLink &link)
 
virtual void RemoveLink (SEElectricalCompartmentLink &link)
 
virtual void RemoveLinks ()
 
virtual const std::vector< SEElectricalCompartmentLink * > & GetLinks ()
 
virtual bool HasChild (const std::string &name)
 
virtual void AddChild (SEElectricalCompartment &child)
 
virtual bool HasBlackBox () const
 
virtual SEElectricalBlackBoxGetBlackBox ()
 
virtual const SEElectricalBlackBoxGetBlackBox () const
 
virtual void SetBlackBox (SEElectricalBlackBox *bb)
 
- Public Member Functions inherited from SECompartment
virtual ~SECompartment ()
 
virtual std::string GetName () const
 
- 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
 

Protected Member Functions

 SEElectricalCompartment (const std::string &name, Logger *logger)
 
virtual double CalculateInFlow_A () const
 
virtual double CalculateOutFlow_A () const
 
- Protected Member Functions inherited from SECompartment
 SECompartment (const std::string &name, Logger *logger)
 

Protected Attributes

SEScalarElectricCurrentm_CurrentIn
 
SEScalarElectricCurrentm_CurrentOut
 
SEScalarElectricChargem_Charge
 
SEScalarElectricPotentialm_Voltage
 
std::vector< SEElectricalCompartmentLink * > m_Links
 
std::vector< SEElectricalCompartmentLink * > m_IncomingLinks
 
std::vector< SEElectricalCompartmentLink * > m_OutgoingLinks
 
std::vector< SEElectricalCompartment * > m_Children
 
std::vector< SEElectricalCompartment * > m_Leaves
 
SECompartmentNodes< ELECTRICAL_COMPARTMENT_NODE > m_Nodes
 
SEElectricalBlackBoxm_BlackBox = nullptr
 
- Protected Attributes inherited from SECompartment
std::string m_Name
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PBCompartment
 
class SECompartmentManager
 
template<typename CompartmentType , typename CompartmentLinkType >
class SECompartmentGraph
 

Additional Inherited Members

- Static Public Member Functions inherited from SECompartment
template<typename CompartmentType >
static void FindLeaves (CompartmentType &cmpt, std::vector< CompartmentType *> &leaves)
 
- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ SEElectricalCompartment()

SEElectricalCompartment::SEElectricalCompartment ( const std::string &  name,
Logger logger 
)
protected

◆ ~SEElectricalCompartment()

SEElectricalCompartment::~SEElectricalCompartment ( )
virtual

Member Function Documentation

◆ AddChild()

void SEElectricalCompartment::AddChild ( SEElectricalCompartment child)
virtual

◆ AddLink()

void SEElectricalCompartment::AddLink ( SEElectricalCompartmentLink link)
virtual

◆ CalculateInFlow_A()

double SEElectricalCompartment::CalculateInFlow_A ( ) const
protectedvirtual

◆ CalculateOutFlow_A()

double SEElectricalCompartment::CalculateOutFlow_A ( ) const
protectedvirtual

◆ Clear()

void SEElectricalCompartment::Clear ( )
virtual

Reimplemented from SECompartment.

◆ GetBlackBox() [1/2]

virtual SEElectricalBlackBox* SEElectricalCompartment::GetBlackBox ( )
inlinevirtual

◆ GetBlackBox() [2/2]

virtual const SEElectricalBlackBox* SEElectricalCompartment::GetBlackBox ( ) const
inlinevirtual

◆ GetCharge() [1/2]

SEScalarElectricCharge & SEElectricalCompartment::GetCharge ( )
virtual

◆ GetCharge() [2/2]

double SEElectricalCompartment::GetCharge ( const ElectricChargeUnit unit) const
virtual

◆ GetChildren()

virtual const std::vector<SEElectricalCompartment*>& SEElectricalCompartment::GetChildren ( )
inlinevirtual

◆ GetCurrentIn() [1/2]

const SEScalarElectricCurrent & SEElectricalCompartment::GetCurrentIn ( ) const
virtual

◆ GetCurrentIn() [2/2]

double SEElectricalCompartment::GetCurrentIn ( const ElectricCurrentUnit unit) const
virtual

◆ GetCurrentOut() [1/2]

const SEScalarElectricCurrent & SEElectricalCompartment::GetCurrentOut ( ) const
virtual

◆ GetCurrentOut() [2/2]

double SEElectricalCompartment::GetCurrentOut ( const ElectricCurrentUnit unit) const
virtual

◆ GetLeaves()

virtual const std::vector<SEElectricalCompartment*>& SEElectricalCompartment::GetLeaves ( )
inlinevirtual

◆ GetLinks()

const std::vector< SEElectricalCompartmentLink * > & SEElectricalCompartment::GetLinks ( )
virtual

◆ GetNodeMapping()

virtual SECompartmentNodes<ELECTRICAL_COMPARTMENT_NODE>& SEElectricalCompartment::GetNodeMapping ( )
inlinevirtual

◆ GetScalar()

const SEScalar * SEElectricalCompartment::GetScalar ( const std::string &  name)
virtual

Implements SECompartment.

◆ GetVoltage() [1/2]

SEScalarElectricPotential & SEElectricalCompartment::GetVoltage ( )
virtual

◆ GetVoltage() [2/2]

double SEElectricalCompartment::GetVoltage ( const ElectricPotentialUnit unit) const
virtual

◆ HasBlackBox()

virtual bool SEElectricalCompartment::HasBlackBox ( ) const
inlinevirtual

◆ HasCharge()

bool SEElectricalCompartment::HasCharge ( ) const
virtual

◆ HasChild()

bool SEElectricalCompartment::HasChild ( const std::string &  name)
virtual

◆ HasChildren()

virtual bool SEElectricalCompartment::HasChildren ( ) const
inlinevirtual

Implements SECompartment.

◆ HasCurrentIn()

bool SEElectricalCompartment::HasCurrentIn ( ) const
virtual

◆ HasCurrentOut()

bool SEElectricalCompartment::HasCurrentOut ( ) const
virtual

◆ HasNodeMapping()

virtual bool SEElectricalCompartment::HasNodeMapping ( ) const
inlinevirtual

◆ HasVoltage()

bool SEElectricalCompartment::HasVoltage ( ) const
virtual

◆ MapNode()

void SEElectricalCompartment::MapNode ( SEElectricalCircuitNode node)
virtual

◆ RemoveLink()

void SEElectricalCompartment::RemoveLink ( SEElectricalCompartmentLink link)
virtual

◆ RemoveLinks()

void SEElectricalCompartment::RemoveLinks ( )
virtual

◆ SetBlackBox()

virtual void SEElectricalCompartment::SetBlackBox ( SEElectricalBlackBox bb)
inlinevirtual

◆ StateChange()

void SEElectricalCompartment::StateChange ( )
virtual

Implements SECompartment.

Friends And Related Function Documentation

◆ PBCompartment

friend class PBCompartment
friend

◆ SECompartmentGraph

template<typename CompartmentType , typename CompartmentLinkType >
friend class SECompartmentGraph
friend

◆ SECompartmentManager

friend class SECompartmentManager
friend

Member Data Documentation

◆ m_BlackBox

SEElectricalBlackBox* SEElectricalCompartment::m_BlackBox = nullptr
protected

◆ m_Charge

SEScalarElectricCharge* SEElectricalCompartment::m_Charge
protected

◆ m_Children

std::vector<SEElectricalCompartment*> SEElectricalCompartment::m_Children
protected

◆ m_CurrentIn

SEScalarElectricCurrent* SEElectricalCompartment::m_CurrentIn
mutableprotected

◆ m_CurrentOut

SEScalarElectricCurrent* SEElectricalCompartment::m_CurrentOut
mutableprotected

◆ m_IncomingLinks

std::vector<SEElectricalCompartmentLink*> SEElectricalCompartment::m_IncomingLinks
protected

◆ m_Leaves

std::vector<SEElectricalCompartment*> SEElectricalCompartment::m_Leaves
protected

◆ m_Links

std::vector<SEElectricalCompartmentLink*> SEElectricalCompartment::m_Links
protected

◆ m_Nodes

SECompartmentNodes<ELECTRICAL_COMPARTMENT_NODE> SEElectricalCompartment::m_Nodes
protected

◆ m_OutgoingLinks

std::vector<SEElectricalCompartmentLink*> SEElectricalCompartment::m_OutgoingLinks
protected

◆ m_Voltage

SEScalarElectricPotential* SEElectricalCompartment::m_Voltage
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.