-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircuit.h
82 lines (70 loc) · 1.76 KB
/
circuit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "source.h"
class circuit{
protected :
float Vs_init;
float Vs;
float Ve;
source *signal;
public :
circuit(){
Vs_init = 0;Vs = 0; Ve = 0;};
~circuit(){};
virtual float f_prim() = 0;
virtual void f_euler(float t, float pas) = 0;
virtual float f_second() = 0;
void choix_source();
};
class ordre_1 : public circuit{
public:
void f_euler(float t, float pas);
virtual float f_prim() = 0;
float f_second(){return 0;};
ordre_1(){};
};
class ordre_2 : public circuit{
protected :
float pas, Vs_prim, Ve_buff;
public:
virtual float f_prim(){return 0;};
virtual float f_second() = 0;
void f_euler(float t, float s_pas);
ordre_2(){};
};
class circuit_A : public ordre_1{
protected :
float R, C;
public :
circuit_A();
circuit_A(float saisie_Vs_init, float saisie_R, float saisie_C);
float f_prim();
};
class circuit_B : public ordre_1{
private :
float Vbe;
protected :
float R1, R2, C;
public :
circuit_B();
circuit_B(float saisie_Vs_init, float saisie_R1, float saisie_R2, float saisie_C);
float f_prim();
};
class circuit_C : public ordre_2{
protected :
float R, L, C;
public :
circuit_C();
circuit_C(float saisie_Vs_init, float saisie_R, float saisie_L, float saisie_C,float saisie_Vs_prim);
float f_second();
float f_prim(){return 0;};
//void f_euler(float t, float pas);
};
class circuit_D : public ordre_2{
protected :
float R, L, C;
public :
circuit_D();
circuit_D(float saisie_Vs_init, float saisie_R, float saisie_L, float saisie_C,float saisie_Vs_prim);
float f_second();
float f_prim(){return 0;};
//void f_euler(float t, float pas);
};