source: issm/trunk/src/modules/BamgMesher/BamgMesher.cpp@ 12331

Last change on this file since 12331 was 12331, checked in by Mathieu Morlighem, 13 years ago

merged trunk-jpl and trunk for revision 12326M

File size: 1.3 KB
Line 
1/*\file BamgMesher.c
2 *\brief: mesher that uses the bamg library
3 */
4#include "./BamgMesher.h"
5
6void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
7
8 /*Outputs*/
9 mxArray* bamgmesh_mat=NULL;
10 mxArray* bamggeom_mat=NULL;
11
12 /*diverse: */
13 BamgOpts *bamgopts=NULL;
14 BamgMesh *bamgmesh_in=NULL;
15 BamgGeom *bamggeom_in=NULL;
16 BamgMesh *bamgmesh_out=NULL;
17 BamgGeom *bamggeom_out=NULL;
18
19 /*Boot module: */
20 MODULEBOOT();
21
22 /*checks on arguments on the matlab side: */
23 CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgMesherUsage);
24
25 /*Initialize outputs*/
26 bamggeom_out=new BamgGeom();
27 bamgmesh_out=new BamgMesh();
28
29 /*Fetch inputs: */
30 FetchData(&bamgopts,BAMGOPTIONS);
31 FetchData(&bamggeom_in,BAMGGEOMIN);
32 FetchData(&bamgmesh_in,BAMGMESHIN);
33
34 /*Call x layer*/
35 Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
36
37 /*Generate output Matlab Structures*/
38 WriteData(BAMGGEOMOUT,bamggeom_out);
39 WriteData(BAMGMESHOUT,bamgmesh_out);
40
41 /*Free ressources: */
42 delete bamgopts;
43 delete bamggeom_in;
44 delete bamggeom_out;
45 delete bamgmesh_in;
46 delete bamgmesh_out;
47
48 /*end module: */
49 MODULEEND();
50}
51
52void BamgMesherUsage(void){
53 _printf_(true,"\n");
54 _printf_(true," usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);
55 _printf_(true,"\n");
56}
Note: See TracBrowser for help on using the repository browser.