HEAVE.CPP
1
#include "mcadincl.h"
2
#include "rigidice.h"
3
4
5
LRESULT RIGIDICEFunction(
LPCOMPLEXARRAY
calculated,
6
LPCCOMPLEXARRAY settings);
7
8
9
FUNCTIONINFO
RIGIDICE =
10
{
11
"RIGIDICE",
// Name by which mathcad will recognize the function
12
"settings",
// heaverate will be called as heavepressure(settings)
13
"pressure, heat and mass fluxes and lens sizes for given settings",
//
description of heavepressurre(settings)
(LPCFUNCTION)RIGIDICEFunction,
// pointer to the executible code
14
COMPLEX_ARRAY,
// the return type is a complex scalar
15
1,
// the function takes on 1 argument
16
{ COMPLEX_ARRAY}
// that is an array
17
};
18
19
20
LRESULT RIGIDICEFunction(
LPCOMPLEXARRAY
calculated,
21
LPCCOMPLEXARRAY settings)
22
{
23
24
Trigidice
foo;
25
double transient;
26
double
micro, macro, body;
27
double
khw, khi, khg;
28
double
wsat, wd, ksat;
29
double
alpha, beta, phib;
30
double
prec, resol, lcmax;
31
double
heave, pene, gradtb;
32
33
micro = settings->hReal[0][0];
34
macro = settings->hReal[0][1];
35
body = settings->hReal[0][2];
36
foo.FirstScales( micro, macro, body);
37
38
khw = settings->hReal[0][3];
39
khi = settings->hReal[0][4];
40
khg = settings->hReal[0][5];
41
foo.InitTherm( khw, khi, khg);
42
43
wsat = settings->hReal[0][6];
44
wd = settings->hReal[0][7];
45
ksat = settings->hReal[0][8];
46
foo.InitWATER( wsat, wd, ksat);
47
48
alpha = settings->hReal[0][9];
49
beta = settings->hReal[0][10];
50
28