| 1 | /*\file UpdateConstraints.c
|
|---|
| 2 | *\brief: build degrees of freedom for every node.
|
|---|
| 3 | */
|
|---|
| 4 |
|
|---|
| 5 | #include "./UpdateConstraints.h"
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
|
|---|
| 9 |
|
|---|
| 10 | /*input datasets: */
|
|---|
| 11 | Nodes* nodes=NULL;
|
|---|
| 12 | Parameters* parameters=NULL;
|
|---|
| 13 | Constraints* constraints=NULL;
|
|---|
| 14 |
|
|---|
| 15 | /*Boot module: */
|
|---|
| 16 | MODULEBOOT();
|
|---|
| 17 |
|
|---|
| 18 | /*checks on arguments on the matlab side: */
|
|---|
| 19 | CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateConstraintsUsage);
|
|---|
| 20 |
|
|---|
| 21 | /*Input datasets: */
|
|---|
| 22 | FetchMatlabData((DataSet**)&nodes,NODESIN);
|
|---|
| 23 | FetchMatlabData((DataSet**)&constraints,CONSTRAINTS);
|
|---|
| 24 | FetchMatlabData(¶meters,PARAMETERS);
|
|---|
| 25 |
|
|---|
| 26 | /*!Generate internal degree of freedom numbers: */
|
|---|
| 27 | UpdateConstraintsx(nodes,constraints,parameters);
|
|---|
| 28 |
|
|---|
| 29 | /*write output datasets: */
|
|---|
| 30 | WriteMatlabData(NODES,nodes);
|
|---|
| 31 |
|
|---|
| 32 | /*Free ressources: */
|
|---|
| 33 | delete nodes;
|
|---|
| 34 | delete constraints;
|
|---|
| 35 | delete parameters;
|
|---|
| 36 |
|
|---|
| 37 | /*end module: */
|
|---|
| 38 | MODULEEND();
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | void UpdateConstraintsUsage(void)
|
|---|
| 42 | {
|
|---|
| 43 | _printf_(true,"\n");
|
|---|
| 44 | _printf_(true," usage: [m.node]=%s(m.nodes,m.constraints,m.parameters);\n",__FUNCT__);
|
|---|
| 45 | _printf_(true,"\n");
|
|---|
| 46 | }
|
|---|