File indexing completed on 2024-04-28 05:43:16

0001 /***************************************************************************
0002  *   Copyright (C) 2003-2004 by David Saxton                               *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef VOLTAGEPOINT_H
0012 #define VOLTAGEPOINT_H
0013 
0014 #include "element.h"
0015 
0016 /**
0017 @short VoltagePoint
0018 @author David saxton
0019 */
0020 class VoltagePoint : public Element
0021 {
0022 public:
0023     VoltagePoint(const double voltage);
0024     ~VoltagePoint() override;
0025 
0026     Type type() const override
0027     {
0028         return Element_VoltagePoint;
0029     }
0030     void setVoltage(const double voltage);
0031     double voltage()
0032     {
0033         return m_voltage;
0034     }
0035 
0036 protected:
0037     void updateCurrents() override;
0038     void add_initial_dc() override;
0039 
0040 private:
0041     double m_voltage; // Conductance
0042 };
0043 
0044 #endif