Changeset 2934
- Timestamp:
- 01/29/10 14:45:30 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Bamgx.cpp
r2932 r2934 140 140 Metric Mhmax(hmax); 141 141 for (Int4 iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax; 142 // change using hVertices if required 143 if (bamgmesh->hVertices){ 144 for (i=0;i<BTh.nbv;i++){ 145 if (!isnan(bamgmesh->hVertices[i])){ 146 BTh[i].m=Metric((Real4)bamgmesh->hVertices[i]); 147 } 148 } 149 } 142 150 143 151 //use present fields to generate metric if present -
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r2932 r2934 869 869 MatVVP2x2 Vp(vertices[i]); 870 870 double lmax=Vp.lmax(); 871 h1 =Min(h1,Vp.lmin());872 h2 =Max(h2,Vp.lmax());873 871 Vp*=Min(lminaniso,lmax)/lmax; 874 872 Vp.BoundAniso2(coef); … … 877 875 //info to be displayed 878 876 if (verbosity>2){ 877 h1 =Min(h1,Vp.lmin()); 878 h2 =Max(h2,Vp.lmax()); 879 879 hn1=Min(hn1,Vp.lmin()); 880 880 hn2=Max(hn2,Vp.lmax()); … … 907 907 Real8 hmax1; 908 908 Real8 coef; 909 Real8 anisomax =1e30;909 Real8 anisomax; 910 910 Real8 CutOff; 911 911 int NbJacobi; … … 924 924 Rescaling=bamgopts->Rescaling; //do normalization 925 925 power=bamgopts->power; 926 anisomax=bamgopts->anisomax; 926 927 927 928 /*process options*/ … … 1331 1332 Real8 hmax1; 1332 1333 Real8 coef; 1333 Real8 anisomax =1e30;1334 Real8 anisomax; 1334 1335 Real8 CutOff; 1335 1336 int NbJacobi; … … 1348 1349 Rescaling=bamgopts->Rescaling; //do normalization 1349 1350 power=bamgopts->power; 1351 anisomax=bamgopts->anisomax; 1350 1352 1351 1353 /*process options*/ … … 1823 1825 const int dim = 2; 1824 1826 double* s=NULL; 1825 Int4 nbsol; 1826 int* typsols=NULL; 1827 int verbosity; 1828 Real8 hmin1; 1829 Real8 hmax1; 1827 Int4 nbsol; 1828 int* typsols=NULL; 1829 int verbosity; 1830 Real8 hmin1; 1831 Real8 hmax1; 1832 double power; 1833 double anisomax; 1834 1830 1835 int i,j,k,iA,iB,iC; 1831 1836 int iv,nbfield; 1837 double coef; 1838 1839 /*Recover options*/ 1840 verbosity=bamgopts->verbose; 1841 power=bamgopts->power; 1842 hmin1=bamgopts->hmin; 1843 hmax1=bamgopts->hmax; 1832 1844 1833 1845 /*Recover options*/ … … 1835 1847 hmin1=bamgopts->hmin; 1836 1848 hmax1=bamgopts->hmax; 1837 1838 /*Recover options*/ 1839 verbosity=bamgopts->verbose; 1840 hmin1=bamgopts->hmin; 1841 hmax1=bamgopts->hmax; 1849 anisomax=bamgopts->anisomax; 1842 1850 1843 1851 /*Get and process fields*/ … … 2024 2032 Vp.Abs(); 2025 2033 2034 //Apply a power if requested by user 2035 if(power!=1.0) Vp.pow(power); 2036 2026 2037 //modify eigen values according to hmin and hmax 2027 2038 Vp.Maxh(hmax); 2028 2039 Vp.Minh(hmin); 2040 2041 //Bound anisotropy by 1/(anisomax)^2 2042 Vp.BoundAniso2(1/(anisomax*anisomax)); 2029 2043 2030 2044 //rebuild Metric from Vp -
issm/trunk/src/c/objects/BamgOpts.h
r2914 r2934 13 13 int Hessiantype; 14 14 double power; 15 double anisomax; 15 16 int NbSmooth; 16 17 int Rescaling; -
issm/trunk/src/m/classes/public/bamg.m
r2914 r2934 91 91 bamg_options.hmin=getfieldvalue(options,'hmin',10^-100); 92 92 bamg_options.hmax=getfieldvalue(options,'hmax',10^100); 93 bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30); 93 94 bamg_options.gradation=getfieldvalue(options,'gradation',1.5); 94 95 bamg_options.cutoff=getfieldvalue(options,'cutoff',10^-5); -
issm/trunk/src/mex/Bamg/Bamg.cpp
r2914 r2934 33 33 /*Options inputs*/ 34 34 int iso,maxnbv,verbose,splitcorners; 35 double hmin,hmax ;35 double hmin,hmax,anisomax; 36 36 double err,errg,coef; 37 37 double power; … … 135 135 FetchData(&hmax,mxGetField(BAMGOPTIONS,0,"hmax")); 136 136 bamgopts.hmax=hmax; 137 FetchData(&anisomax,mxGetField(BAMGOPTIONS,0,"anisomax")); 138 bamgopts.anisomax=anisomax; 137 139 FetchData(&gradation,mxGetField(BAMGOPTIONS,0,"gradation")); 138 140 bamgopts.gradation=gradation;
Note:
See TracChangeset
for help on using the changeset viewer.