Jspice3
Main Page
Data Structures
Files
File List
Globals
cosderiv.c
Go to the documentation of this file.
1
/**********
2
Copyright 1990 Regents of the University of California. All rights reserved.
3
Author: 1989 Jaijeet S. Roychowdhury
4
**********/
5
6
#include "
spice.h
"
7
#include <math.h>
8
9
#define JOB char
10
#include "
distodef.h
"
11
12
/*
13
* CosDeriv computes the partial derivatives of the cosine
14
* function where the argument to the function is itself a
15
* function of three variables p, q, and r.
16
*/
17
18
void
19
CosDeriv
(
new
, old)
20
Dderivs
*new, *old;
21
{
22
23
Dderivs
temp;
24
25
EqualDeriv
(&temp, old);
26
27
new
->value =
cos
(temp.
value
);
28
new
->d1_p = -
sin
(temp.
value
)*temp.
d1_p
;
29
new
->d1_q = -
sin
(temp.
value
)*temp.
d1_q
;
30
new
->d1_r = -
sin
(temp.
value
)*temp.
d1_r
;
31
new
->d2_p2 = -(
cos
(temp.
value
)*temp.
d1_p
*temp.
d1_p
+
sin
(temp.
value
)*temp.
d2_p2
);
32
new
->d2_q2 = -(
cos
(temp.
value
)*temp.
d1_q
*temp.
d1_q
+
sin
(temp.
value
)*temp.
d2_q2
);
33
new
->d2_r2 = -(
cos
(temp.
value
)*temp.
d1_r
*temp.
d1_r
+
sin
(temp.
value
)*temp.
d2_r2
);
34
new
->d2_pq = -(
cos
(temp.
value
)*temp.
d1_p
*temp.
d1_q
+
sin
(temp.
value
)*temp.
d2_pq
);
35
new
->d2_qr = -(
cos
(temp.
value
)*temp.
d1_q
*temp.
d1_r
+
sin
(temp.
value
)*temp.
d2_qr
);
36
new
->d2_pr = -(
cos
(temp.
value
)*temp.
d1_p
*temp.
d1_r
+
sin
(temp.
value
)*temp.
d2_pr
);
37
new
->d3_p3 = -(
sin
(temp.
value
)*(temp.
d3_p3
- temp.
d1_p
*temp.
d1_p
*temp.
d1_p
)
38
+
cos
(temp.
value
)*(temp.
d1_p
*temp.
d2_p2
+ temp.
d1_p
*temp.
d2_p2
39
+ temp.
d1_p
*temp.
d2_p2
));
40
new
->d3_q3 = -(
sin
(temp.
value
)*(temp.
d3_q3
- temp.
d1_q
*temp.
d1_q
*temp.
d1_q
)
41
+
cos
(temp.
value
)*(temp.
d1_q
*temp.
d2_q2
+ temp.
d1_q
*temp.
d2_q2
42
+ temp.
d1_q
*temp.
d2_q2
));
43
new
->d3_r3 = -(
sin
(temp.
value
)*(temp.
d3_r3
- temp.
d1_r
*temp.
d1_r
*temp.
d1_r
)
44
+
cos
(temp.
value
)*(temp.
d1_r
*temp.
d2_r2
+ temp.
d1_r
*temp.
d2_r2
45
+ temp.
d1_r
*temp.
d2_r2
));
46
new
->d3_p2r = -(
sin
(temp.
value
)*(temp.
d3_p2r
- temp.
d1_r
*temp.
d1_p
*temp.
d1_p
)
47
+
cos
(temp.
value
)*(temp.
d1_p
*temp.
d2_pr
+ temp.
d1_p
*temp.
d2_pr
48
+ temp.
d1_r
*temp.
d2_p2
));
49
new
->d3_p2q = -(
sin
(temp.
value
)*(temp.
d3_p2q
- temp.
d1_q
*temp.
d1_p
*temp.
d1_p
)
50
+
cos
(temp.
value
)*(temp.
d1_p
*temp.
d2_pq
+ temp.
d1_p
*temp.
d2_pq
51
+ temp.
d1_q
*temp.
d2_p2
));
52
new
->d3_q2r = -(
sin
(temp.
value
)*(temp.
d3_q2r
- temp.
d1_r
*temp.
d1_q
*temp.
d1_q
)
53
+
cos
(temp.
value
)*(temp.
d1_q
*temp.
d2_qr
+ temp.
d1_q
*temp.
d2_qr
54
+ temp.
d1_r
*temp.
d2_q2
));
55
new
->d3_pq2 = -(
sin
(temp.
value
)*(temp.
d3_pq2
- temp.
d1_p
*temp.
d1_q
*temp.
d1_q
)
56
+
cos
(temp.
value
)*(temp.
d1_q
*temp.
d2_pq
+ temp.
d1_q
*temp.
d2_pq
57
+ temp.
d1_p
*temp.
d2_q2
));
58
new
->d3_pr2 = -(
sin
(temp.
value
)*(temp.
d3_pr2
- temp.
d1_p
*temp.
d1_r
*temp.
d1_r
)
59
+
cos
(temp.
value
)*(temp.
d1_r
*temp.
d2_pr
+ temp.
d1_r
*temp.
d2_pr
60
+ temp.
d1_p
*temp.
d2_r2
));
61
new
->d3_qr2 = -(
sin
(temp.
value
)*(temp.
d3_qr2
- temp.
d1_q
*temp.
d1_r
*temp.
d1_r
)
62
+
cos
(temp.
value
)*(temp.
d1_r
*temp.
d2_qr
+ temp.
d1_r
*temp.
d2_qr
63
+ temp.
d1_q
*temp.
d2_r2
));
64
new
->d3_pqr = -(
sin
(temp.
value
)*(temp.
d3_pqr
- temp.
d1_r
*temp.
d1_p
*temp.
d1_q
)
65
+
cos
(temp.
value
)*(temp.
d1_q
*temp.
d2_pr
+ temp.
d1_p
*temp.
d2_qr
66
+ temp.
d1_r
*temp.
d2_pq
));
67
}
Dderivs::d2_pr
double d2_pr
Definition:
distodef.h:75
Dderivs::d3_pr2
double d3_pr2
Definition:
distodef.h:83
distodef.h
Dderivs::d3_pq2
double d3_pq2
Definition:
distodef.h:81
Dderivs::d3_p3
double d3_p3
Definition:
distodef.h:76
Dderivs::d1_q
double d1_q
Definition:
distodef.h:68
Dderivs::d2_pq
double d2_pq
Definition:
distodef.h:73
Dderivs::d3_pqr
double d3_pqr
Definition:
distodef.h:85
Dderivs::d2_r2
double d2_r2
Definition:
distodef.h:72
Dderivs::d3_p2r
double d3_p2r
Definition:
distodef.h:80
Dderivs::d2_qr
double d2_qr
Definition:
distodef.h:74
Dderivs::d1_r
double d1_r
Definition:
distodef.h:69
Dderivs::d1_p
double d1_p
Definition:
distodef.h:67
Dderivs::d3_qr2
double d3_qr2
Definition:
distodef.h:84
cos
double cos()
Dderivs::d3_q3
double d3_q3
Definition:
distodef.h:77
sin
double sin()
spice.h
Dderivs::d3_q2r
double d3_q2r
Definition:
distodef.h:82
Dderivs::value
double value
Definition:
distodef.h:66
Dderivs
Definition:
distodef.h:64
Dderivs::d3_r3
double d3_r3
Definition:
distodef.h:78
Dderivs::d3_p2q
double d3_p2q
Definition:
distodef.h:79
Dderivs::d2_q2
double d2_q2
Definition:
distodef.h:71
Dderivs::d2_p2
double d2_p2
Definition:
distodef.h:70
CosDeriv
void CosDeriv(Dderivs *new, Dderivs *old)
Definition:
cosderiv.c:19
EqualDeriv
void EqualDeriv(Dderivs *new, Dderivs *old)
Definition:
equalder.c:17
src
lib
dev
disto
cosderiv.c
Generated by
1.8.11