Changeset 2913
- Timestamp:
- 01/26/10 14:23:56 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Bamgx.cpp
r2899 r2913 25 25 int Bamgx(BamgMesh* bamgmesh,BamgGeom* bamggeom,BamgOpts* bamgopts){ 26 26 27 int noerr=1;28 27 29 28 /*output: */ … … 37 36 int maxnbv; 38 37 double hmin,hmax; 38 double err,errg,coef; 39 39 double cutoff; 40 40 int verbosity; 41 42 /*Bamg variables: */ 41 int Hessiantype,NbSmooth; 42 double power; 43 double omega; 44 45 /*intermediary*/ 46 int noerr=1; 43 47 int i,j,num; 44 48 int AbsError=0,nbjacoby=1,allquad=0; 45 49 double costheta=2; 46 50 double anisomax = 1e6; 47 double err=0.01,errg=0.1,coef=1;48 51 int KeepBackVertices=1; 49 52 double hminaniso=1e-100; 50 53 const double boundmaxsubdiv = 10; 51 54 double maxsubdiv=boundmaxsubdiv; 52 double omega=1.8;53 int NbSmooth=3;54 int ChoiseHessien = 0;55 double power=1;56 55 int Rescaling=1; 57 56 … … 61 60 /*Bamg options*/ 62 61 iso=bamgopts->iso; 62 err=bamgopts->err; 63 errg=bamgopts->errg; 64 Hessiantype=bamgopts->Hessiantype; 65 power=bamgopts->power; 66 NbSmooth=bamgopts->NbSmooth; 67 omega=bamgopts->omega; 68 coef=bamgopts->coef; 63 69 maxnbv=bamgopts->maxnbv; 64 70 hmin=bamgopts->hmin; … … 135 141 BTh.ReadMetric(bamgopts,hmin,hmax,coef); 136 142 } 137 else if (bamgopts->field){ 138 if (verbosity>1) printf(" Generating Metric from solution field...\n"); 139 BTh.IntersectConsMetric(bamgopts->field,1,0,hmin,hmax,sqrt(err)*coef,1e30,AbsError?0.0:cutoff,nbjacoby,Rescaling,power,ChoiseHessien); 140 } 141 else { // init with hmax 143 else { 144 145 // init with hmax 142 146 Metric Mhmax(hmax); 143 147 for (Int4 iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax; 148 149 //use present fields to generate metric if present 150 if (bamgopts->field){ 151 if (verbosity>1) printf(" Generating Metric from solution field...\n"); 152 BTh.IntersectConsMetric(bamgopts->field,1,0,hmin,hmax,sqrt(err)*coef,1e30,AbsError?0.0:cutoff,nbjacoby,Rescaling,power,Hessiantype); 153 } 144 154 } 145 155 -
issm/trunk/src/c/Bamgx/objects/Geometry.cpp
r2910 r2913 689 689 } 690 690 } 691 printf("ord = %i\n",ord);692 691 693 692 // angular test on current vertex to guess whether it is a corner (ord = number of edges horlding i) -
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r2899 r2913 2905 2905 2906 2906 R2 Grads = (nAB * sC + nBC * sA + nCA * sB ) /detT[i] ; 2907 if(choice) 2908 { 2907 if(choice){ 2909 2908 int nbb = 0; 2910 2909 Real8 dd = detT[i]; … … 2981 2980 2982 2981 } 2983 else 2984 { 2982 else { 2985 2983 2986 2984 // if edge on boundary no contribution => normal = 0 -
issm/trunk/src/c/objects/BamgOpts.h
r2899 r2913 11 11 int maxnbv; 12 12 double MaximalAngleOfCorner; 13 int Hessiantype; 14 double power; 15 int NbSmooth; 16 double omega; 13 17 double hmin; 14 18 double hmax; … … 17 21 int splitcorners; 18 22 int verbose; 23 double err; 24 double errg; 25 double coef; 19 26 double* metric; 20 27 double* field; -
issm/trunk/src/c/objects/Param.cpp
r2907 r2913 698 698 memcpy(doublevec,value,M*sizeof(double)); 699 699 } 700 else{ 701 xfree((void**)&doublevec); doublevec=NULL; 702 } 700 703 ndof=0; //this vector will not be repartitioned. 701 704 -
issm/trunk/src/m/classes/public/bamg.m
r2899 r2913 77 77 % Bamg Options {{{1 78 78 bamg_options.iso=getfieldvalue(options,'iso',0); 79 bamg_options.err=getfieldvalue(options,'err',0.01); 80 bamg_options.errg=getfieldvalue(options,'errg',0.1); 81 bamg_options.coef=getfieldvalue(options,'coef',1); 82 bamg_options.power=getfieldvalue(options,'power',1); 83 bamg_options.Hessiantype=getfieldvalue(options,'Hessiantype',0); 84 bamg_options.NbSmooth=getfieldvalue(options,'NbSmooth',3); 85 bamg_options.omega=getfieldvalue(options,'omega',1.8); 79 86 bamg_options.maxnbv=getfieldvalue(options,'maxnbv',10^6); 80 87 bamg_options.MaximalAngleOfCorner=getfieldvalue(options,'MaximalAngleOfCorner',10); … … 85 92 bamg_options.verbose=getfieldvalue(options,'verbose',1); 86 93 bamg_options.splitcorners=getfieldvalue(options,'splitcorners',1); 87 bamg_options.metric=getfieldvalue(options,'metric', zeros(0,3));88 bamg_options.field=getfieldvalue(options,'field', zeros(0,1));94 bamg_options.metric=getfieldvalue(options,'metric',[]); 95 bamg_options.field=getfieldvalue(options,'field',[]); 89 96 %}}} 90 97 -
issm/trunk/src/mex/Bamg/Bamg.cpp
r2899 r2913 34 34 int iso,maxnbv,verbose,splitcorners; 35 35 double hmin,hmax; 36 double err,errg,coef; 37 double power; 38 int Hessiantype,NbSmooth; 39 double omega; 36 40 double gradation; 37 41 double cutoff; … … 104 108 FetchData(&iso,mxGetField(BAMGOPTIONS,0,"iso")); 105 109 bamgopts.iso=iso; 110 FetchData(&err,mxGetField(BAMGOPTIONS,0,"err")); 111 bamgopts.err=err; 112 FetchData(&errg,mxGetField(BAMGOPTIONS,0,"errg")); 113 bamgopts.errg=errg; 114 FetchData(&coef,mxGetField(BAMGOPTIONS,0,"coef")); 115 bamgopts.coef=coef; 116 FetchData(&Hessiantype,mxGetField(BAMGOPTIONS,0,"Hessiantype")); 117 bamgopts.Hessiantype=Hessiantype; 118 FetchData(&power,mxGetField(BAMGOPTIONS,0,"power")); 119 bamgopts.power=power; 120 FetchData(&NbSmooth,mxGetField(BAMGOPTIONS,0,"NbSmooth")); 121 bamgopts.NbSmooth=NbSmooth; 122 FetchData(&omega,mxGetField(BAMGOPTIONS,0,"omega")); 123 bamgopts.omega=omega; 106 124 FetchData(&maxnbv,mxGetField(BAMGOPTIONS,0,"maxnbv")); 107 125 bamgopts.maxnbv=maxnbv;
Note:
See TracChangeset
for help on using the changeset viewer.