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

Last change on this file since 11933 was 11933, checked in by Eric.Larour, 13 years ago

New FetchData and WriteData interface

File size: 1.2 KB
RevLine 
[1103]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: */
[11933]25 FetchData(&elements,&nel,NULL,ELEMENTS);
26 FetchData(&nodeconnectivity,&nods,&width,NODECONNECTIVITY);
[1103]27
28 /*!Generate internal degree of freedom numbers: */
29 ElementConnectivityx(&elementconnectivity, elements,nel, nodeconnectivity, nods, width);
30
31 /*write output datasets: */
[11933]32 WriteData(ELEMENTCONNECTIVITY,elementconnectivity,nel,3);
[1103]33
34 /*Free ressources: */
35 xfree((void**)&elements);
36 xfree((void**)&nodeconnectivity);
37
38 /*end module: */
39 MODULEEND();
40}
41
42void ElementConnectivityUsage(void) {
[6412]43 _printf_(true,"\n");
44 _printf_(true," usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
45 _printf_(true,"\n");
[1103]46}
Note: See TracBrowser for help on using the repository browser.