Changeset 3579
- Timestamp:
- 04/20/10 15:40:05 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/mex/Bamg/Bamg.cpp
r3332 r3579 34 34 FetchData(&bamggeom_in.SubDomains, &bamggeom_in.SubDomainsSize[0], &bamggeom_in.SubDomainsSize[1], mxGetField(BAMGGEOMETRY,0,"SubDomains")); 35 35 FetchData(&bamggeom_in.hVertices,&lines,&cols,mxGetField(BAMGGEOMETRY,0,"hVertices")); 36 if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.VerticesSize[0])){ISSMERROR( exprintf("the size of 'hVertices' should be [%i %i]",bamggeom_in.VerticesSize[0],1));}36 if (bamggeom_in.hVertices && (cols!=1 || lines!=bamggeom_in.VerticesSize[0])){ISSMERROR("the size of 'hVertices' should be [%i %i]",bamggeom_in.VerticesSize[0],1);} 37 37 38 38 /*create bamg mesh input*/ … … 47 47 FetchData(&bamgmesh_in.VerticesOnGeometricVertex,&bamgmesh_in.VerticesOnGeometricVertexSize[0],&bamgmesh_in.VerticesOnGeometricVertexSize[1],mxGetField(BAMGMESH,0,"VerticesOnGeometricVertex")); 48 48 FetchData(&bamgmesh_in.hVertices,&lines,&cols,mxGetField(BAMGMESH,0,"hVertices")); 49 if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR( exprintf("the size of 'hVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}49 if (bamgmesh_in.hVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR("the size of 'hVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1);} 50 50 51 51 /*create bamg options input*/ … … 73 73 FetchData(&bamgopts.MaximalAngleOfCorner,mxGetField(BAMGOPTIONS,0,"MaximalAngleOfCorner")); 74 74 FetchData(&bamgopts.hminVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hminVertices")); 75 if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR( exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}75 if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1);} 76 76 FetchData(&bamgopts.hmaxVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hmaxVertices")); 77 if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR( exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1));}77 if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.VerticesSize[0],1);} 78 78 FetchData(&bamgopts.metric,&lines,&cols,mxGetField(BAMGOPTIONS,0,"metric")); 79 if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR( exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.VerticesSize[0],3));}79 if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.VerticesSize[0])){ISSMERROR("the size of 'metric' should be [%i %i]",bamgmesh_in.VerticesSize[0],3);} 80 80 FetchData(&bamgopts.field,&lines,&bamgopts.numfields,mxGetField(BAMGOPTIONS,0,"field")); 81 if (bamgopts.field && lines!=bamgmesh_in.VerticesSize[0]){ISSMERROR( exprintf("the size of 'field' should be [%i %i]",bamgmesh_in.VerticesSize[0],bamgopts.numfields));}81 if (bamgopts.field && lines!=bamgmesh_in.VerticesSize[0]){ISSMERROR("the size of 'field' should be [%i %i]",bamgmesh_in.VerticesSize[0],bamgopts.numfields);} 82 82 FetchData(&bamgopts.err,NULL,&cols,mxGetField(BAMGOPTIONS,0,"err")); 83 if (bamgopts.numfields!=0 && cols!=bamgopts.numfields){ISSMERROR( exprintf("the size of 'err' should be the same as 'field'"));}83 if (bamgopts.numfields!=0 && cols!=bamgopts.numfields){ISSMERROR("the size of 'err' should be the same as 'field'");} 84 84 BamgOptsCheck(&bamgopts); 85 85
Note:
See TracChangeset
for help on using the changeset viewer.