159
160
161
FUNCTIONINFO
heaverate =
162
{
163
"heaverate",
// Name by which mathcad will recognize the function
164
"settings",
// heaverate will be called as heavepressure(settings)
165
"heave rate for given settings",
// description of heavepressurre(settings)
166
(LPCFUNCTION)heavepressureFunction,
// pointer to the executible code
167
COMPLEX_SCALAR,
// the return type is a complex scalar
168
1,
// the function takes on 1 argument
169
{ COMPLEX_ARRAY}
// that is an array
170
};
171
172
173
LRESULT heaverateFunction(
LPCOMPLEXSCALAR
heaverate,
174
LPCCOMPLEXARRAY settings)
175
{
176
177
Trigidice
foo;
178
double HeaveRate;
179
double
micro, macro, body;
180
double
khw, khi, khg;
181
double
wsat, wd, ksat;
182
double
alpha, beta, phib;
183
double
prec, resol, lcmax;
184
double
press, pene, gradtb;
185
186
micro = settings->hReal[0][0];
187
macro = settings->hReal[0][1];
188
body = settings->hReal[0][2];
189
foo.FirstScales( micro, macro, body);
190
191
khw = settings->hReal[0][3];
192
khi = settings->hReal[0][4];
193
khg = settings->hReal[0][5];
194
foo.InitTherm( khw, khi, khg);
195
196
wsat = settings->hReal[0][6];
197
wd = settings->hReal[0][7];
198
ksat = settings->hReal[0][8];
199
foo.InitWATER( wsat, wd, ksat);
200
201
alpha = settings->hReal[0][9];
202
beta = settings->hReal[0][10];
203
phib = settings->hReal[0][11];
204
foo.InitBC( alpha, beta, phib);
205
206
press = settings->hReal[0][12];
207
pene = settings->hReal[0][13];
208
gradtb = settings->hReal[0][14];
209
foo.InitQuasi( press, pene, gradtb);
210
211
prec = settings->hReal[0][15];
212
resol = settings->hReal[0][16];
31