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

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

merged trunk-jpl and trunk for revision 12703

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