LifeV
ZeroDimensionalElement Class Referenceabstract

ZeroDimensionalElement - The base element class. More...

#include <ZeroDimensionalCircuitData.hpp>

+ Inheritance diagram for ZeroDimensionalElement:
+ Collaboration diagram for ZeroDimensionalElement:

Protected Attributes

Int M_id
 
ZeroDimensionalElementType M_type
 
Real M_current
 
Real M_deltaCurrent
 

Constructors and Destructor

 ZeroDimensionalElement ()
 Constructor. More...
 
virtual ~ZeroDimensionalElement ()
 Destructor. More...
 

Methods

virtual void showMe (const Int &flag=0)
 Display some information. More...
 
const std::string enum2string (const ZeroDimensionalElementType &type)
 
virtual void connectElement (zeroDimensionalNodeSPtr_Type &nodes)=0
 Connect elements to the nodes. More...
 
virtual void buildABC (matrix_Type &, matrix_Type &, vector_Type &, const zeroDimensionalNodeSPtr_Type &)
 Contribution of the element of matrix {A} and {B} and vector {C}. More...
 
virtual void extractSolution (const ZeroDimensionalNodeS &)
 Compute outputs (currents and voltages) from the solution vector after each succesful iteration. More...
 
virtual Real direction (const Int &nodeId) const =0
 This method specifies the convention of current direction in an element. More...
 

Set Methods

void setId (const Int &id)
 
void setCurrent (const Real &current)
 
void setDeltaCurrent (const Real &deltaCurrent)
 Set derivative of current respect to time. More...
 

Get Methods

const Intid () const
 
const ZeroDimensionalElementTypetype () const
 
const Realcurrent () const
 
const RealdeltaCurrent () const
 Get derivative of current respect to time. More...
 

Detailed Description

ZeroDimensionalElement - The base element class.

Authors
Mahmoud Jafargholi

Definition at line 79 of file ZeroDimensionalCircuitData.hpp.

Constructor & Destructor Documentation

◆ ZeroDimensionalElement()

ZeroDimensionalElement ( )
inlineexplicit

Constructor.

Definition at line 87 of file ZeroDimensionalCircuitData.hpp.

◆ ~ZeroDimensionalElement()

virtual ~ZeroDimensionalElement ( )
inlinevirtual

Destructor.

Definition at line 90 of file ZeroDimensionalCircuitData.hpp.

Member Function Documentation

◆ showMe()

void showMe ( const Int flag = 0)
virtual

◆ enum2string()

const std::string enum2string ( const ZeroDimensionalElementType type)

Definition at line 54 of file ZeroDimensionalCircuitData.cpp.

+ Here is the caller graph for this function:

◆ connectElement()

virtual void connectElement ( zeroDimensionalNodeSPtr_Type nodes)
pure virtual

Connect elements to the nodes.

After all emenets and nodes are created, each element will call this method to connect itself to the nodes.

Implemented in ZeroDimensionalElementCurrentSource, ZeroDimensionalElementVoltageSource, and ZeroDimensionalElementPassive.

◆ buildABC()

virtual void buildABC ( matrix_Type ,
matrix_Type ,
vector_Type ,
const zeroDimensionalNodeSPtr_Type  
)
inlinevirtual

Contribution of the element of matrix {A} and {B} and vector {C}.

After updating the BCs ( or Terminal nodes ) this each element will invoke this method to compute it's contribution on matrices.

Reimplemented in ZeroDimensionalElementCurrentSource, ZeroDimensionalElementPassiveInductor, ZeroDimensionalElementPassiveCapacitor, ZeroDimensionalElementPassiveDiode, and ZeroDimensionalElementPassiveResistor.

Definition at line 115 of file ZeroDimensionalCircuitData.hpp.

◆ extractSolution()

virtual void extractSolution ( const ZeroDimensionalNodeS )
inlinevirtual

Compute outputs (currents and voltages) from the solution vector after each succesful iteration.

After each time step, when Rythmos solver is succesfully finishes, this method will compute finial outputs ( for exmple currents) from the finial solution vector.

Reimplemented in ZeroDimensionalElementPassiveCapacitor, ZeroDimensionalElementPassiveDiode, and ZeroDimensionalElementPassiveResistor.

Definition at line 122 of file ZeroDimensionalCircuitData.hpp.

◆ direction()

virtual Real direction ( const Int nodeId) const
pure virtual

This method specifies the convention of current direction in an element.

Parameters
Anode index connected to the element.
Returns
+1 if the current convention is toward the iniput node and -1 otherwise.

Implemented in ZeroDimensionalElementSource, and ZeroDimensionalElementPassive.

+ Here is the caller graph for this function:

◆ setId()

void setId ( const Int id)
inline

Definition at line 137 of file ZeroDimensionalCircuitData.hpp.

◆ setCurrent()

void setCurrent ( const Real current)
inline

Definition at line 142 of file ZeroDimensionalCircuitData.hpp.

◆ setDeltaCurrent()

void setDeltaCurrent ( const Real deltaCurrent)
inline

Set derivative of current respect to time.

Definition at line 148 of file ZeroDimensionalCircuitData.hpp.

◆ id()

const Int& id ( ) const
inline

Definition at line 159 of file ZeroDimensionalCircuitData.hpp.

+ Here is the caller graph for this function:

◆ type()

const ZeroDimensionalElementType& type ( ) const
inline

Definition at line 164 of file ZeroDimensionalCircuitData.hpp.

+ Here is the caller graph for this function:

◆ current()

const Real& current ( ) const
inline

Definition at line 169 of file ZeroDimensionalCircuitData.hpp.

+ Here is the caller graph for this function:

◆ deltaCurrent()

const Real& deltaCurrent ( ) const
inline

Get derivative of current respect to time.

Definition at line 175 of file ZeroDimensionalCircuitData.hpp.

Field Documentation

◆ M_id

Int M_id
protected

Definition at line 184 of file ZeroDimensionalCircuitData.hpp.

◆ M_type

ZeroDimensionalElementType M_type
protected

Definition at line 185 of file ZeroDimensionalCircuitData.hpp.

◆ M_current

Real M_current
protected

Definition at line 186 of file ZeroDimensionalCircuitData.hpp.

◆ M_deltaCurrent

Real M_deltaCurrent
protected

Definition at line 187 of file ZeroDimensionalCircuitData.hpp.


The documentation for this class was generated from the following files: