1 | /*\file InputScale.c
|
---|
2 | *\brief: duplicate input
|
---|
3 | */
|
---|
4 |
|
---|
5 | #include "./InputScale.h"
|
---|
6 |
|
---|
7 | void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
|
---|
8 |
|
---|
9 | /*diverse: */
|
---|
10 | int noerr=1;
|
---|
11 |
|
---|
12 | /*input datasets: */
|
---|
13 | DataSet* elements=NULL;
|
---|
14 | Nodes* nodes=NULL;
|
---|
15 | Vertices* vertices=NULL;
|
---|
16 | Loads* loads=NULL;
|
---|
17 | DataSet* materials=NULL;
|
---|
18 | Parameters* parameters=NULL;
|
---|
19 | int enum_type;
|
---|
20 | double scale_factor;
|
---|
21 |
|
---|
22 | /*Boot module: */
|
---|
23 | MODULEBOOT();
|
---|
24 |
|
---|
25 | /*checks on arguments on the matlab side: */
|
---|
26 | CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InputScaleUsage);
|
---|
27 |
|
---|
28 | /*Input datasets: */
|
---|
29 | FetchData(&elements,ELEMENTS);
|
---|
30 | FetchData((DataSet**)&nodes,NODES);
|
---|
31 | FetchData((DataSet**)&vertices,VERTICES);
|
---|
32 | FetchData((DataSet**)&loads,LOADS);
|
---|
33 | FetchData(&materials,MATERIALS);
|
---|
34 | FetchParams(¶meters,PARAMETERS);
|
---|
35 |
|
---|
36 | FetchData(&enum_type,ENUMTYPE);
|
---|
37 | FetchData(&scale_factor,SCALEFACTOR);
|
---|
38 |
|
---|
39 | /*!Call core code: */
|
---|
40 | InputScalex( elements, nodes, vertices, loads, materials,parameters,enum_type, scale_factor);
|
---|
41 |
|
---|
42 | /*write output : */
|
---|
43 | WriteData(ELEMENTSOUT,elements);
|
---|
44 |
|
---|
45 | /*Free ressources: */
|
---|
46 | delete elements;
|
---|
47 | delete nodes;
|
---|
48 | delete vertices;
|
---|
49 | delete loads;
|
---|
50 | delete materials;
|
---|
51 | delete parameters;
|
---|
52 |
|
---|
53 | /*end module: */
|
---|
54 | MODULEEND();
|
---|
55 |
|
---|
56 | }
|
---|
57 |
|
---|
58 | void InputScaleUsage(void)
|
---|
59 | {
|
---|
60 | _printf_("\n");
|
---|
61 | _printf_(" usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,scale_factor);\n",__FUNCT__);
|
---|
62 | _printf_("\n");
|
---|
63 | }
|
---|