#include <SEElectricalCompartment.h>

Inherits SECompartment.

Public Member Functions

virtual ~SEElectricalCompartment ()
 
void Clear () override
 
const SEScalarGetScalar (const std::string &name) override
 
virtual bool HasChildren () const override
 
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)
 
void StateChange () override
 
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 SEElectricalCompartment &cmpt)
 
virtual void AddChild (SEElectricalCompartment &child)
 
- Public Member Functions inherited from SECompartment
virtual ~SECompartment ()
 
virtual void Clear ()
 
virtual std::string GetName () const
 
virtual const SEScalarGetScalar (const std::string &name)=0
 
virtual bool HasChildren () const =0
 
virtual void StateChange ()=0
 
- 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) const
 
virtual void Debug (std::stringstream &msg) const
 
virtual void Debug (std::ostream &msg) const
 
virtual void Info (std::string const &msg) const
 
virtual void Info (std::stringstream &msg) const
 
virtual void Info (const std::stringstream &msg) const
 
virtual void Info (std::ostream &msg) const
 
virtual void Warning (std::string const &msg) const
 
virtual void Warning (std::stringstream &msg) const
 
virtual void Warning (std::ostream &msg) const
 
virtual void Error (std::string const &msg) const
 
virtual void Error (std::stringstream &msg) const
 
virtual void Error (std::ostream &msg) const
 
virtual void Fatal (std::string const &msg) const
 
virtual void Fatal (std::stringstream &msg) const
 
virtual void Fatal (std::ostream &msg) 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
 
- 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)
 

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 ( )
overridevirtual

Reimplemented from SECompartment.

◆ 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)
overridevirtual

Implements SECompartment.

◆ GetVoltage() [1/2]

SEScalarElectricPotential & SEElectricalCompartment::GetVoltage ( )
virtual

◆ GetVoltage() [2/2]

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

◆ HasCharge()

bool SEElectricalCompartment::HasCharge ( ) const
virtual

◆ HasChild()

bool SEElectricalCompartment::HasChild ( const SEElectricalCompartment cmpt)
virtual

◆ HasChildren()

virtual bool SEElectricalCompartment::HasChildren ( ) const
inlineoverridevirtual

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

◆ StateChange()

void SEElectricalCompartment::StateChange ( )
overridevirtual

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_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.