/[ascend]/trunk/models/testTrig.a4c
ViewVC logotype

Contents of /trunk/models/testTrig.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 831 - (show annotations) (download) (as text)
Wed Aug 23 06:52:01 2006 UTC (13 years, 5 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2618 byte(s)
About to rename...
1 REQUIRE "atoms.a4l";
2
3 MODEL testfunc;
4 (* dependent variables *)
5 yArccosh,yArcsinh,yArctanh,
6 yCos,yCosh,
7 yExp,yLn,yLnm,
8 ySin,ySinh,
9 yTan,yTanh IS_A factor;
10
11 yArcsin,yArccos,
12 yArctan IS_A angle;
13
14 (* fixed variables *)
15 xArccos,xArccosh,
16 xArcsin,xArcsinh,
17 xArctan,xArctanh,
18 xCosh,
19 xExp,xLn,xLnm,
20 xSinh,
21 xTanh IS_A factor;
22
23 xCos,xSin,
24 xTan IS_A angle;
25
26 (* equations *)
27 arccosEqn: yArccos = arccos(xArccos);
28 arccoshEqn: yArccosh = arccosh(xArccosh);
29 arcsinEqn: yArcsin = arcsin(xArcsin);
30 arcsinhEqn: yArcsinh = arcsinh(xArcsinh);
31 arctanEqn: yArctan = arctan(xArctan);
32 arctanhEqn: yArctanh = arctanh(xArctanh);
33 cosEqn: yCos = cos(xCos);
34 coshEqn: yCosh = cosh(xCosh);
35 expEqn: yExp = exp(xExp);
36 lnEqn: yLn = ln(xLn);
37 lnmEqn: yLnm = lnm(xLnm);
38 sinEqn: ySin = sin(xSin);
39 sinhEqn: ySinh = sinh(xSinh);
40 tanEqn: yTan = tan(xTan);
41 tanhEqn: yTanh = tanh(xTanh);
42
43 METHODS
44
45 METHOD default_self;
46 END default_self;
47
48 METHOD specify;
49 FIX xExp,xLn;
50 FIX xSin,xCos,xTan;
51 FIX xArcsin,xArccos,xArctan;
52 FIX xSinh,xCosh,xTanh;
53 FIX xArccosh,xArcsinh,xArctanh;
54 FIX xLnm;
55 END specify;
56
57 METHOD on_load;
58 RUN default_self;
59 RUN reset;
60 RUN values;
61 END on_load;
62
63 METHOD values;
64 xArccos := 0.10; (* magnitude must not exceed 1.0 *)
65 xArccosh := 2.0; (* value must be 1.0 or greater *)
66 xArcsin := 0.11; (* magnitude must not exceed 1.0 *)
67 xArcsinh := 2.1;
68 xArctan := 2.2;
69 xArctanh := 0.12; (* magnitude must not exceed 1.0 *)
70 xCos := 0.13 {radian};
71 xCosh := 0.14;
72 xExp := 0.15;
73 xLn := 0.16; (* value must be greater than 0 *)
74 xLnm := 0.16;
75 xSin := 0.17 {radian};
76 xSinh := 0.18;
77 xTan := 0.19 {radian};
78 xTanh := 0.2;
79 END values;
80
81
82 (* set up to recover original x values. Note mapping
83 after solving. *)
84
85 METHOD valuesRecover;
86 xArccos := yCos; (* yArccos becomes xCos orig value *)
87 xArccosh := yCosh; (* yArccosh becomes xCosh orig value *)
88 xArcsin := ySin; (* etc *)
89 xArcsinh := ySinh;
90 xArctan := yTan;
91 xArctanh := yTanh;
92 xCos := yArccos;
93 xCosh := yArccosh;
94 xExp := yLn;
95 xLn := yExp;
96 xLnm := yExp;
97 xSin := yArcsin;
98 xSinh := yArcsinh;
99 xTan := yArctan;
100 xTanh := yArctanh;
101 END valuesRecover;
102
103 END testfunc;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22