Changeset 12497
- Timestamp:
- 06/21/12 14:08:16 (13 years ago)
- Location:
- issm/trunk-jpl/src/modules
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
r12044 r12497 44 44 /*Check inputs*/ 45 45 if (nels<0){ 46 _error _("Number of elements must be positive, check index number of lines");46 _error2_("Number of elements must be positive, check index number of lines"); 47 47 } 48 48 if (nods<0){ 49 _error _("Number of nods must be positive, check x and y sizes");49 _error2_("Number of nods must be positive, check x and y sizes"); 50 50 } 51 51 if (index_rows!=3){ 52 _error _("index should have 3 columns");52 _error2_("index should have 3 columns"); 53 53 } 54 54 if (y_rows!=nods){ 55 _error _("x and y do not have the same length");55 _error2_("x and y do not have the same length"); 56 56 } 57 57 if (x_cols>1 || y_cols>1){ 58 _error _("x and y should have only one column");58 _error2_("x and y should have only one column"); 59 59 } 60 60 -
issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
r11933 r12497 32 32 33 33 /*Check inputs*/ 34 if(y_rows!=nods) _error _("x and y do not have the same length");35 if(x_cols>1 || y_cols>1) _error _("x and y should have only one column");36 if(nods<3) _error _("At least 3 points are required");34 if(y_rows!=nods) _error2_("x and y do not have the same length"); 35 if(x_cols>1 || y_cols>1) _error2_("x and y should have only one column"); 36 if(nods<3) _error2_("At least 3 points are required"); 37 37 38 38 /* Run core computations: */ -
issm/trunk-jpl/src/modules/Chaco/Chaco.cpp
r12496 r12497 42 42 43 43 #ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in. 44 _error _("Chaco not available! Cannot carry out Chaco partitioning!");44 _error2_("Chaco not available! Cannot carry out Chaco partitioning!"); 45 45 #endif 46 46 -
issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
r12496 r12497 47 47 if(nlhs!=1 && nlhs!=2){ 48 48 ContourToMeshUsage(); 49 _error _("usage. See above");49 _error2_("usage. See above"); 50 50 } 51 51 #endif … … 53 53 if(nrhs!=NRHS){ 54 54 ContourToMeshUsage(); 55 _error _("usage. See above");55 _error2_("usage. See above"); 56 56 } 57 57 … … 82 82 WriteData(PLHS1,in_elem); 83 83 } 84 else _error _("wrong interpolation type");84 else _error2_("wrong interpolation type"); 85 85 86 86 /*end module: */ -
issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp
r12496 r12497 12 12 /*checks on arguments on the matlab side: */ 13 13 if(nrhs!=NRHS){ 14 EnumToStringUsage(); _error _("usage. See above");14 EnumToStringUsage(); _error2_("usage. See above"); 15 15 } 16 16 -
issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
r12049 r12497 25 25 /*checks on arguments on the matlab side: */ 26 26 if (nlhs > NLHS) { 27 Exp2KmlUsage(); _error _("Exp2Kml usage error");27 Exp2KmlUsage(); _error2_("Exp2Kml usage error"); 28 28 } 29 29 if (nrhs < NRHS) { 30 Exp2KmlUsage(); _error _("Exp2Kml usage error");30 Exp2KmlUsage(); _error2_("Exp2Kml usage error"); 31 31 } 32 32 … … 49 49 50 50 /*some checks*/ 51 if (sgn !=+1 && sgn !=-1) _error _("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);52 if (fabs(cm) > 180.) _error _("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);53 if (sp < 0. || sp > 90.) _error _("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);51 if (sgn !=+1 && sgn !=-1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south)."); 52 if (fabs(cm) > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees."); 53 if (sp < 0. || sp > 90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere)."); 54 54 55 55 /* Run core computations: */ -
issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
r12060 r12497 26 26 /*Fetch required fields*/ 27 27 FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements")); 28 if(numberofelements<=0) _error _("No elements found in the model");28 if(numberofelements<=0) _error2_("No elements found in the model"); 29 29 FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements")); 30 if(M!=numberofelements || N!=3) _error _("Field 'elements' should be of size [md.numberofelements 3]");30 if(M!=numberofelements || N!=3) _error2_("Field 'elements' should be of size [md.numberofelements 3]"); 31 31 FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater")); 32 if(M!=numberofelements || N!=1) _error _("Field 'elementonwater' should be of size [md.numberofelements 1]");32 if(M!=numberofelements || N!=1) _error2_("Field 'elementonwater' should be of size [md.numberofelements 1]"); 33 33 FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity")); 34 if(M!=numberofelements || N!=3) _error _("Field 'elementconnectivity' should be of size [md.numberofelements 3]");34 if(M!=numberofelements || N!=3) _error2_("Field 'elementconnectivity' should be of size [md.numberofelements 3]"); 35 35 36 36 /*Allocate and initialize all variables*/ -
issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
r12496 r12497 46 46 if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){ 47 47 InterpFromGridToMeshUsage(); 48 _error _("usage. See above");48 _error2_("usage. See above"); 49 49 } 50 50 -
issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
r12060 r12497 69 69 if(nlhs!=NLHS){ 70 70 InterpFromMesh2dUsage(); 71 _error _("InterpFromMeshToMesh2dUsage usage error");71 _error2_("InterpFromMeshToMesh2dUsage usage error"); 72 72 } 73 73 if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){ 74 74 InterpFromMesh2dUsage(); 75 _error _("InterpFromMeshToMesh2dUsage usage error");75 _error2_("InterpFromMeshToMesh2dUsage usage error"); 76 76 } 77 77 … … 131 131 /*some checks*/ 132 132 if (x_data_rows!=y_data_rows){ 133 _error _("vectors x and y should have the same length!");133 _error2_("vectors x and y should have the same length!"); 134 134 } 135 135 if (x_prime_rows!=y_prime_rows){ 136 _error _("vectors x_prime and y_prime should have the same length!");136 _error2_("vectors x_prime and y_prime should have the same length!"); 137 137 } 138 138 -
issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
r12118 r12497 39 39 if(nlhs!=NLHS){ 40 40 InterpFromMeshToMesh2dUsage(); 41 _error _("InterpFromMeshToMesh2dUsage usage error");41 _error2_("InterpFromMeshToMesh2dUsage usage error"); 42 42 } 43 43 #endif … … 45 45 if((nrhs!=6) & (nrhs!=8)){ 46 46 InterpFromMeshToMesh2dUsage(); 47 _error _("InterpFromMeshToMesh2dUsage usage error");47 _error2_("InterpFromMeshToMesh2dUsage usage error"); 48 48 } 49 49 … … 71 71 /*some checks*/ 72 72 if (x_data_rows!=y_data_rows){ 73 _error _("vectors x and y should have the same length!");73 _error2_("vectors x and y should have the same length!"); 74 74 } 75 75 if (x_interp_rows!=y_interp_rows){ 76 _error _("vectors x_interp and y_interp should have the same length!");76 _error2_("vectors x_interp and y_interp should have the same length!"); 77 77 } 78 78 if (index_cols!=3){ 79 _error _("index should have 3 columns (input provided has %i columns)",index_cols);79 _error2_("index should have 3 columns (input provided has " << index_cols << " columns)"); 80 80 } 81 81 -
issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
r11933 r12497 76 76 /*some checks*/ 77 77 if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){ 78 _error _("vectors x, y and z should have the same length!");78 _error2_("vectors x, y and z should have the same length!"); 79 79 } 80 80 if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){ 81 _error _("vectors x_prime, y_prime and z_prime should have the same length!");81 _error2_("vectors x_prime, y_prime and z_prime should have the same length!"); 82 82 } 83 83 /*get number of elements and number of nodes in the data*/ -
issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
r12049 r12497 45 45 /*checks on arguments on the matlab side: */ 46 46 if (nlhs > NLHS) { 47 KMLFileReadUsage(); _error _("KMLFileRead usage error");47 KMLFileReadUsage(); _error2_("KMLFileRead usage error"); 48 48 } 49 49 if (nrhs < NRHS) { 50 KMLFileReadUsage(); _error _("KMLFileRead usage error");50 KMLFileReadUsage(); _error2_("KMLFileRead usage error"); 51 51 } 52 52 -
issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
r12060 r12497 40 40 /*checks on arguments on the matlab side: */ 41 41 if (nlhs > NLHS) { 42 KMLMeshWriteUsage(); _error _("KMLMeshWrite usage error");42 KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error"); 43 43 } 44 44 if (nrhs < NRHS) { 45 KMLMeshWriteUsage(); _error _("KMLMeshWrite usage error");45 KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error"); 46 46 } 47 47 … … 87 87 88 88 if (nodecon && (mncon != nnodes)) 89 _error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");89 {_error2_("Nodal connectivity table, if supplied, must be supplied for all nodes.");} 90 90 else if (!nodecon) 91 91 mncon=nnodes; 92 92 if ((llat != nnodes) || (llng != nnodes) || (llat != llng)) 93 _error _("Latitude and longitude vectors must be supplied for all nodes.");93 _error2_("Latitude and longitude vectors must be supplied for all nodes."); 94 94 if (part && (lprt != nnodes)) 95 _error _("Partitioning vector, if supplied, must be supplied for all nodes.");95 _error2_("Partitioning vector, if supplied, must be supplied for all nodes."); 96 96 if (data && !((mdata == nnodes) || (mdata == melem))) 97 _error _("Data matrix, if supplied, must be supplied for all nodes or all elements.");97 _error2_("Data matrix, if supplied, must be supplied for all nodes or all elements."); 98 98 if (cmap && (ncmap != 3)) 99 _error _("Colormap matrix, if supplied, must have three columns for rgb.");99 _error2_("Colormap matrix, if supplied, must have three columns for rgb."); 100 100 if (!strlen(filnam)) 101 101 strcpy(filnam,"stdout"); -
issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
r12049 r12497 31 31 /*checks on arguments on the matlab side: */ 32 32 if(nlhs>NLHS){ 33 KMLOverlayUsage(); _error _("KMLOverlay usage error");33 KMLOverlayUsage(); _error2_("KMLOverlay usage error"); 34 34 } 35 35 if(nrhs<NRHS){ 36 KMLOverlayUsage(); _error _("KMLOverlay usage error");36 KMLOverlayUsage(); _error2_("KMLOverlay usage error"); 37 37 } 38 38 … … 51 51 52 52 /*some checks*/ 53 if (nlat !=2) _error _("Latitudinal axes \"lataxis\" require two double values, not %d.",nlat);54 if (nlong!=2) _error _("Longitudinal axes \"longaxis\" require two double values, not %d.",nlong);55 if (!nimages) _error _("No image files provided.");53 if (nlat !=2) _error2_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << "."); 54 if (nlong!=2) _error2_("Longitudinal axes \"longaxis\" require two double values, not " << nlong << "."); 55 if (!nimages) _error2_("No image files provided."); 56 56 57 57 if ((int)dzip){ … … 90 90 if (verbose) printf("%s\n",czip); 91 91 92 if (mexEvalString(czip)) _error _("Error zipping file \"%s\".",filkmz);92 if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\"."); 93 93 xfree((void**)&czip); 94 94 xfree((void**)&filkmz); -
issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
r12049 r12497 22 22 /*checks on arguments on the matlab side: */ 23 23 if (nlhs > NLHS) { 24 Kml2ExpUsage(); _error _("Kml2Exp usage error");24 Kml2ExpUsage(); _error2_("Kml2Exp usage error"); 25 25 } 26 26 if (nrhs < NRHS) { 27 Kml2ExpUsage(); _error _("Kml2Exp usage error");27 Kml2ExpUsage(); _error2_("Kml2Exp usage error"); 28 28 } 29 29 … … 43 43 44 44 /*some checks*/ 45 if (sgn !=+1 && sgn!= -1) _error _("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);46 if (fabs(cm) > 180.) _error _("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);47 if (sp < 0. || sp > 90.) _error _("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);45 if (sgn !=+1 && sgn!= -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south)."); 46 if (fabs(cm) > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees."); 47 if (sp < 0. || sp > 90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere)."); 48 48 49 49 /* Run core computations: */ -
issm/trunk-jpl/src/modules/Kriging/Kriging.cpp
r12298 r12497 22 22 /*checks on arguments on the matlab side: */ 23 23 if (nrhs<NRHS || nlhs>NLHS){ 24 KrigingUsage(); _error _("Kriging usage error");24 KrigingUsage(); _error2_("Kriging usage error"); 25 25 } 26 26 27 27 /*Fetch inputs: */ 28 28 FetchData(&x,&n_obs,X); 29 FetchData(&y,&N,Y); if(n_obs!=N) _error _("x and y should have the same size");30 FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error _("x and observations should have the same size");29 FetchData(&y,&N,Y); if(n_obs!=N) _error2_("x and y should have the same size"); 30 FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error2_("x and observations should have the same size"); 31 31 FetchData(&x_interp,&M_interp,&N_interp,XINTERP); 32 FetchData(&y_interp,&M,&N,YINTERP); if(N!=N_interp || M!=M_interp) _error _("x_interp and y_interp should have the same size");32 FetchData(&y_interp,&M,&N,YINTERP); if(N!=N_interp || M!=M_interp) _error2_("x_interp and y_interp should have the same size"); 33 33 FetchData(&options,NRHS,nrhs,prhs); 34 34 -
issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
r12049 r12497 25 25 /*checks on arguments on the matlab side: */ 26 26 if (nlhs > NLHS) { 27 Ll2xyUsage(); _error _("Ll2xy usage error");27 Ll2xyUsage(); _error2_("Ll2xy usage error"); 28 28 } 29 29 if (nrhs < NRHS) { 30 Ll2xyUsage(); _error _("Ll2xy usage error");30 Ll2xyUsage(); _error2_("Ll2xy usage error"); 31 31 } 32 32 … … 47 47 /*some checks*/ 48 48 if (verbose) printf("Checking inputs:\n"); 49 if (nlat != nlon) _error_("Must have same number of lat[%d] and lon[%d] coordinates.",nlat,nlon);49 if (nlat != nlon){_error2_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");} 50 50 else ncoord=nlat; 51 if (sgn != +1 && sgn != -1) _error _("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);52 if (fabs(cm) > 180.) _error _("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);53 if (sp < 0. || sp > 90.) _error _("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);51 if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south)."); 52 if (fabs(cm) > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees."); 53 if (sp < 0. || sp > 90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere)."); 54 54 55 55 x=(double*)mxMalloc(ncoord*sizeof(double)); -
issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
r12496 r12497 54 54 //index 55 55 FetchData(&double_index,&nel,&dummy,INDEX); 56 if(dummy!=3 && dummy!=6)_error _("element triangulation should be of 3 or 6 column width!");56 if(dummy!=3 && dummy!=6)_error2_("element triangulation should be of 3 or 6 column width!"); 57 57 index=(int*)xmalloc(nel*3*sizeof(int)); 58 58 for(i=0;i<nel;i++){ -
issm/trunk-jpl/src/modules/Scotch/Scotch.cpp
r12496 r12497 25 25 26 26 #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in. 27 _error _("Scotch not available! Cannot carry out Scotch partitioning!");27 _error2_("Scotch not available! Cannot carry out Scotch partitioning!"); 28 28 #else 29 29 -
issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
r12496 r12497 25 25 26 26 #ifndef _HAVE_SHAPELIB_ //only works if shapelib library has been compiled in. 27 _error _("Shapelib not available! Cannot carry out shp file translation!");27 _error2_("Shapelib not available! Cannot carry out shp file translation!"); 28 28 #endif 29 29 … … 33 33 /*checks on arguments on the matlab side: */ 34 34 if (nlhs > NLHS) { 35 Shp2KmlUsage(); _error _("Shp2Kml usage error");35 Shp2KmlUsage(); _error2_("Shp2Kml usage error"); 36 36 } 37 37 if (nrhs < NRHS) { 38 Shp2KmlUsage(); _error _("Shp2Kml usage error");38 Shp2KmlUsage(); _error2_("Shp2Kml usage error"); 39 39 } 40 40 … … 54 54 55 55 /*some checks*/ 56 if (sgn < -1 || sgn > +1) _error _("Hemisphere sgn=%d must be +1 (north), -1 (south), or 0 (no translation).",sgn);57 if (fabs(cm) > 180.) _error _("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);58 if (sp < 0. || sp > 90.) _error _("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);56 if (sgn < -1 || sgn > +1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north), -1 (south), or 0 (no translation)."); 57 if (fabs(cm) > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees."); 58 if (sp < 0. || sp > 90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere)."); 59 59 60 60 /* Run core computations: */ -
issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
r12496 r12497 12 12 /*checks on arguments on the matlab side: */ 13 13 if(nrhs!=NRHS){ 14 StringToEnumUsage(); _error _("usage. See above");14 StringToEnumUsage(); _error2_("usage. See above"); 15 15 } 16 16 -
issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
r12049 r12497 24 24 /*checks on arguments on the matlab side: */ 25 25 if (nlhs > NLHS) { 26 Xy2llUsage(); _error _("Xy2ll usage error");26 Xy2llUsage(); _error2_("Xy2ll usage error"); 27 27 } 28 28 if (nrhs < NRHS) { 29 Xy2llUsage(); _error _("Xy2ll usage error");29 Xy2llUsage(); _error2_("Xy2ll usage error"); 30 30 } 31 31 … … 45 45 46 46 /*some checks*/ 47 if (nx != ny) _error_("Must have same number of x[%d] and y[%d] coordinates.",nx,ny);47 if (nx != ny){_error2_("Must have same number of x[" << nx << "] and y[" << ny << "] coordinates.");} 48 48 else ncoord=nx; 49 if (sgn != +1 && sgn != -1) _error _("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);50 if (fabs(cm) > 180.) _error _("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);51 if (sp < 0. || sp > 90.) _error _("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);49 if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south)."); 50 if (fabs(cm) > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees."); 51 if (sp < 0. || sp > 90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere)."); 52 52 53 53 lat=(double*)mxMalloc(ncoord*sizeof(double)); -
issm/trunk-jpl/src/modules/matlab/Makefile.am
r12164 r12497 50 50 AM_CXXFLAGS += -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 51 51 LDADD += $(MEXLIB) ../../c/libISSMMatlab.a 52 53 LDADD += ../../c/libISSMCore.a ../../c/libISSMModules.a 52 LDADD += ../../c/libISSMCore.a 53 if CIRCULAR_DEPENDENCIES 54 LDADD += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB) 55 endif 56 LDADD += ../../c/libISSMModules.a 54 57 55 58 #Optimization flags:
Note:
See TracChangeset
for help on using the changeset viewer.