[9293] | 1 | /*\file UpdateDynamicConstraints.c
|
---|
[8801] | 2 | *\brief: update single point constraints inside nodes out of constrain vector ys
|
---|
| 3 | */
|
---|
| 4 |
|
---|
[9293] | 5 | #include "./UpdateDynamicConstraints.h"
|
---|
[8801] | 6 |
|
---|
| 7 | void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
|
---|
| 8 |
|
---|
| 9 | /*input datasets: */
|
---|
[9298] | 10 | Constraints *constraints = NULL;
|
---|
| 11 | Nodes *nodes = NULL;
|
---|
| 12 | Parameters *parameters = NULL;
|
---|
[11684] | 13 | Vector* yg = NULL;
|
---|
[8801] | 14 |
|
---|
| 15 | /*Boot module: */
|
---|
| 16 | MODULEBOOT();
|
---|
| 17 |
|
---|
| 18 | /*checks on arguments on the matlab side: */
|
---|
[9293] | 19 | CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&UpdateDynamicConstraintsUsage);
|
---|
[8801] | 20 |
|
---|
| 21 | /*Input datasets: */
|
---|
[12004] | 22 | FetchData((DataSet**)&constraints,CONSTRAINTSIN);
|
---|
| 23 | FetchData((DataSet**)&nodes,NODESIN);
|
---|
| 24 | FetchData((Parameters**)¶meters,PARAMETERS);
|
---|
| 25 | FetchData(&yg,YG);
|
---|
[8801] | 26 |
|
---|
| 27 | /*!Generate internal degree of freedom numbers: */
|
---|
[9298] | 28 | UpdateDynamicConstraintsx(constraints,nodes,parameters,yg);
|
---|
[8801] | 29 |
|
---|
| 30 | /*write output datasets: */
|
---|
[12004] | 31 | WriteData(CONSTRAINTSOUT,constraints);
|
---|
[8801] | 32 |
|
---|
| 33 | /*Free ressources: */
|
---|
[11708] | 34 | xdelete(&yg);
|
---|
[9298] | 35 | delete constraints;
|
---|
[8801] | 36 | delete nodes;
|
---|
| 37 | delete parameters;
|
---|
| 38 |
|
---|
| 39 | /*end module: */
|
---|
| 40 | MODULEEND();
|
---|
| 41 | }
|
---|
| 42 |
|
---|
[9293] | 43 | void UpdateDynamicConstraintsUsage(void)
|
---|
[8801] | 44 | {
|
---|
| 45 | _printf_(true,"\n");
|
---|
[9302] | 46 | _printf_(true," usage: m.constraints=%s(m.constraints,m.nodes,m.parameters,ys);\n",__FUNCT__);
|
---|
[8801] | 47 | _printf_(true,"\n");
|
---|
| 48 | }
|
---|