00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef VOLTAGESOURCE_H
00012 #define VOLTAGESOURCE_H
00013
00014 #include "element.h"
00015
00020 class VoltageSource : public Element
00021 {
00022 public:
00023 VoltageSource( const double voltage );
00024 virtual ~VoltageSource();
00025
00026 virtual Type type() const { return Element_VoltageSource; }
00027 void setVoltage( const double v );
00028 virtual void add_map();
00029
00030 protected:
00031 virtual void updateCurrents();
00032 virtual void add_initial_dc();
00033
00034 private:
00035 double m_v;
00036 };
00037
00038 #endif