Changeset 3213
- Timestamp:
- 03/08/10 11:57:50 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/BamgOpts.cpp
r3212 r3213 1 1 #include "stdio.h" 2 #include "../shared/shared.h" 2 3 #include "./BamgOpts.h" 3 4 … … 31 32 32 33 } 34 35 void BamgOptsCheck(BamgOpts* bamgopts){ 36 37 int i; 38 39 if (bamgopts->coef==0) throw ErrorException(__FUNCT__,exprintf("'coef' should be positive")); 40 if (bamgopts->maxsubdiv<1) throw ErrorException(__FUNCT__,exprintf("'maxsubdiv' should be >=1")); 41 if (bamgopts->Hessiantype!=0 && bamgopts->Hessiantype!=1) throw ErrorException(__FUNCT__,exprintf("'Hessiantype' supported options are 0 and 1")); 42 if (bamgopts->Metrictype!=0 && bamgopts->Metrictype!=1 && bamgopts->Metrictype!=2) throw ErrorException(__FUNCT__,exprintf("'Metrictype' supported options are 0, 1 and 2")); 43 if (bamgopts->KeepVertices!=0 && bamgopts->KeepVertices!=1) throw ErrorException(__FUNCT__,exprintf("'KeepVertices' supported options are 0 and 1")); 44 if (bamgopts->renumber!=0 && bamgopts->renumber!=1 && bamgopts->renumber!=2) throw ErrorException(__FUNCT__,exprintf("'renumber' supported options are 0, 1 and 2")); 45 if (bamgopts->errg<0) throw ErrorException(__FUNCT__,exprintf("'errg' option should be >0")); 46 if (bamgopts->nbjacobi<=0) throw ErrorException(__FUNCT__,exprintf("'nbjacobi' option should be >0")); 47 if (bamgopts->NbSmooth<=0) throw ErrorException(__FUNCT__,exprintf("'NbSmooth' option should be >0")); 48 if (bamgopts->maxnbv<3) throw ErrorException(__FUNCT__,exprintf("'maxnbv' option should be >3")); 49 if (bamgopts->hmin<=0) throw ErrorException(__FUNCT__,exprintf("'hmin' option should be >0")); 50 if (bamgopts->hmax<=0 || bamgopts->hmax<bamgopts->hmin) throw ErrorException(__FUNCT__,exprintf("'hmax' option should be between 0 and hmin=%g",bamgopts->hmin)); 51 if (bamgopts->anisomax<1) throw ErrorException(__FUNCT__,exprintf("'anisomax' option should be >=1")); 52 if (bamgopts->gradation<1) throw ErrorException(__FUNCT__,exprintf("'gradation' option should be >=1")); 53 for (i=0;i<bamgopts->numfields;i++) {if (bamgopts->err[i]<=0) throw ErrorException(__FUNCT__,exprintf("'err' option should be >0"));}; 54 55 } -
issm/trunk/src/c/objects/BamgOpts.h
r3212 r3213 38 38 void BamgOptsInit(BamgOpts* bamgopts); 39 39 40 void BamgOptsCheck(BamgOpts* bamgopts); 41 40 42 #endif
Note:
See TracChangeset
for help on using the changeset viewer.