source: issm/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.cpp@ 10937

Last change on this file since 10937 was 8910, checked in by Eric.Larour, 14 years ago

Reorganized io/ directory quite a bit.
Separated Matlab io from the other Disk related io.
Renamed WriteData to WriteMatlabData and FetchData to FetchMatlabData.
Folded WriteParams and FetchParams into FetchMatlabData and WriteMatlabData.

File size: 1.2 KB
Line 
1/*\file ElementConnectivity.c
2 *\brief: build element connectivity using node connectivity and elements.
3 */
4
5#include "./ElementConnectivity.h"
6
7void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
8
9 /*inputs: */
10 double* elements=NULL;
11 double* nodeconnectivity=NULL;
12 int nel,nods;
13 int width;
14
15 /*outputs: */
16 double* elementconnectivity=NULL;
17
18 /*Boot module: */
19 MODULEBOOT();
20
21 /*checks on arguments on the matlab side: */
22 CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ElementConnectivityUsage);
23
24 /*Input datasets: */
25 FetchMatlabData(&elements,&nel,NULL,ELEMENTS);
26 FetchMatlabData(&nodeconnectivity,&nods,&width,NODECONNECTIVITY);
27
28 /*!Generate internal degree of freedom numbers: */
29 ElementConnectivityx(&elementconnectivity, elements,nel, nodeconnectivity, nods, width);
30
31 /*write output datasets: */
32 WriteMatlabData(ELEMENTCONNECTIVITY,elementconnectivity,nel,3);
33
34 /*Free ressources: */
35 xfree((void**)&elements);
36 xfree((void**)&nodeconnectivity);
37
38 /*end module: */
39 MODULEEND();
40}
41
42void ElementConnectivityUsage(void) {
43 _printf_(true,"\n");
44 _printf_(true," usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
45 _printf_(true,"\n");
46}
Note: See TracBrowser for help on using the repository browser.