Changeset 5016
- Timestamp:
- 08/06/10 10:01:41 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/DataSet.cpp
r4927 r5016 398 398 } 399 399 400 return 1; 401 400 402 } 401 403 /*}}}*/ … … 416 418 417 419 } 418 return;419 420 } 420 421 /*}}}*/ -
issm/trunk/src/c/modules/HoleFillerx/HoleFillerx.cpp
r3913 r5016 18 18 long i, j, k, l, ii, jj, bytes; 19 19 long iii, jjj; 20 long count,test, prevlines, prevpix, test1, test2, thresh,counter;20 long test, prevlines, prevpix, test1, test2, thresh,counter; 21 21 long bell, cycles, leftovers; 22 22 float howlong; … … 68 68 memcpy(image3,image2,lines*samps*sizeof(double)); 69 69 70 count += 2;71 70 #ifdef _DEBUG2_ 72 71 counter=0; … … 86 85 87 86 again2: 88 89 count += 2;90 87 91 88 #ifdef _DEBUG2_ -
issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
r3913 r5016 17 17 /*Output*/ 18 18 double* data_interp=NULL; 19 int noerr;20 19 21 20 /*Intermediary*/ … … 113 112 114 113 /*No error return*/ 115 return noerr; 116 114 return 1; 117 115 } -
issm/trunk/src/c/objects/Bamg/Geometry.cpp
r4997 r5016 418 418 bamggeom->TangentAtEdges[4*i+1]=2; 419 419 bamggeom->TangentAtEdges[4*i+2]=edges[i].tg[1].x; 420 bamggeom->TangentAtEdges[4*i+3]=edges[i].tg[ 2].y;420 bamggeom->TangentAtEdges[4*i+3]=edges[i].tg[1].y; 421 421 } 422 422 count=count+1; -
issm/trunk/src/c/objects/Bamg/Metric.cpp
r3913 r5016 183 183 LastMetricInterpole.lab=l; 184 184 LastMetricInterpole.opt=i; 185 if (i>200 && kkk++<10) printf("WARNING: LengthInterpole: ( i=%i l=%i sss=% i) %g\n",i,l,sss,sstop);185 if (i>200 && kkk++<10) printf("WARNING: LengthInterpole: ( i=%i l=%i sss=%g ) %g\n",i,l,sss,sstop); 186 186 return l; 187 187 } -
issm/trunk/src/c/objects/Bamg/Triangles.cpp
r5010 r5016 98 98 } 99 99 printf(" number of vertices %i, remove = %i\n",k,Tho.nbv - k); 100 printf(" number of triangles %i, remove = \n",kt,nbInT-kt);100 printf(" number of triangles %i, remove = %i\n",kt,nbInT-kt); 101 101 printf(" number of New boundary edge %i\n",nbNewBedge); 102 102 long inbvx =k; … … 2018 2018 //skip constant field 2019 2019 if (sdelta < 1.0e-10*Max(absmax,1e-20) ){ 2020 if (verbosity>2) printf(" Solution %i is constant, skipping...\n" );2020 if (verbosity>2) printf(" Solution %i is constant, skipping...\n",nusol); 2021 2021 continue; 2022 2022 } … … 4380 4380 printf("This edge is on geometrical edge number %i\n",Gh.Number(edges[i].onGeometry)+1); 4381 4381 if (edges[i][j].onGeometry->OnGeomVertex()) 4382 printf("the vertex number %i of this edge is a geometric MeshVertex number %i\n", Gh.Number(edges[i][j].onGeometry->gv)+1);4382 printf("the vertex number %i of this edge is a geometric MeshVertex number %i\n",Number(edges[i][j])+1,Gh.Number(edges[i][j].onGeometry->gv)+1); 4383 4383 else if (edges[i][j].onGeometry->OnGeomEdge()) 4384 printf("the vertex number %i of this edge is a geometric Edge number %i\n", Gh.Number(edges[i][j].onGeometry->ge)+1);4384 printf("the vertex number %i of this edge is a geometric Edge number %i\n",Number(edges[i][j])+1,Gh.Number(edges[i][j].onGeometry->ge)+1); 4385 4385 else 4386 4386 printf("Its pointer is %p\n",edges[i][j].onGeometry); … … 4707 4707 else printf(" %10g",exp(lmin+(i+1)/delta)); 4708 4708 printf("| %10g |\n",((long) ((10000.0 * histo[i])/ nbedges))/100.0); 4709 printf(" % g\n",histo[i]);4709 printf(" %i\n",histo[i]); 4710 4710 } 4711 4711 printf(" --------------------+-------------+-------------\n"); … … 5017 5017 || (bb=Area2( t[0].r , A.r , t[2].r )) < 0.0 5018 5018 || (cc=Area2( t[0].r , t[1].r , A.r )) < 0.0)){ 5019 printf("%i not in triangle %i In= %i % i %i %i %i\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd);5019 printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd); 5020 5020 ISSMERROR("Number of triangles with P2 interpolation Problem"); 5021 5021 } … … 5025 5025 || (bb=Area2( tt[0].r , A.r , tt[2].r )) < 0 5026 5026 || (cc=Area2( tt[0].r , tt[1].r , A.r )) < 0)){ 5027 printf("%i not in triangle %i In= %i % i %i %i %i\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd);5027 printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd); 5028 5028 ISSMERROR("Number of triangles with P2 interpolation Problem"); 5029 5029 } -
issm/trunk/src/c/objects/Elements/Penta.cpp
r4995 r5016 968 968 GradjDrag(gradient); 969 969 } 970 else if (control_type= RheologyBEnum){970 else if (control_type==RheologyBEnum){ 971 971 GradjB(gradient); 972 972 } -
issm/trunk/src/c/objects/Elements/Tria.cpp
r4974 r5016 1035 1035 VecSetValues(gradient,numgrids,doflist1,(const double*)grade_g,ADD_VALUES); 1036 1036 1037 cleanup_and_return:1038 1037 xfree((void**)&first_gauss_area_coord); 1039 1038 xfree((void**)&second_gauss_area_coord); … … 1209 1208 VecSetValues(gradient,numgrids,doflist1,(const double*)grade_g,ADD_VALUES); 1210 1209 1211 cleanup_and_return:1212 1210 xfree((void**)&first_gauss_area_coord); 1213 1211 xfree((void**)&second_gauss_area_coord); … … 2478 2476 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 2479 2477 2480 cleanup_and_return:2481 2478 xfree((void**)&first_gauss_area_coord); 2482 2479 xfree((void**)&second_gauss_area_coord); … … 2582 2579 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 2583 2580 2584 cleanup_and_return:2585 2581 xfree((void**)&first_gauss_area_coord); 2586 2582 xfree((void**)&second_gauss_area_coord); … … 2908 2904 } 2909 2905 2910 cleanup_and_return:2911 2906 xfree((void**)&first_gauss_area_coord); 2912 2907 xfree((void**)&second_gauss_area_coord); … … 3049 3044 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3050 3045 3051 cleanup_and_return:3052 3046 xfree((void**)&first_gauss_area_coord); 3053 3047 xfree((void**)&second_gauss_area_coord); … … 3205 3199 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3206 3200 3207 cleanup_and_return:3208 3201 xfree((void**)&first_gauss_area_coord); 3209 3202 xfree((void**)&second_gauss_area_coord); … … 3288 3281 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)K_terms,ADD_VALUES); 3289 3282 3290 cleanup_and_return:3291 3283 xfree((void**)&first_gauss_area_coord); 3292 3284 xfree((void**)&second_gauss_area_coord); … … 3674 3666 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 3675 3667 3676 cleanup_and_return:3677 3668 xfree((void**)&first_gauss_area_coord); 3678 3669 xfree((void**)&second_gauss_area_coord); … … 3769 3760 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)K_terms,ADD_VALUES); 3770 3761 3771 cleanup_and_return:3772 3762 xfree((void**)&first_gauss_area_coord); 3773 3763 xfree((void**)&second_gauss_area_coord); … … 4012 4002 VecSetValues(pg,numdof,doflist,(const double*)pe_g,ADD_VALUES); 4013 4003 4014 cleanup_and_return:4015 4004 xfree((void**)&first_gauss_area_coord); 4016 4005 xfree((void**)&second_gauss_area_coord); … … 4121 4110 VecSetValues(pg,numdof,doflist,(const double*)pe_g,ADD_VALUES); 4122 4111 4123 cleanup_and_return:4124 4112 xfree((void**)&first_gauss_area_coord); 4125 4113 xfree((void**)&second_gauss_area_coord); … … 4245 4233 VecSetValues(pg,numdof,doflist,(const double*)pe_g,ADD_VALUES); 4246 4234 4247 cleanup_and_return:4248 4235 xfree((void**)&first_gauss_area_coord); 4249 4236 xfree((void**)&second_gauss_area_coord); … … 5058 5045 VecSetValues(pg,numdof,doflist,(const double*)pe_g,ADD_VALUES); 5059 5046 5060 cleanup_and_return:5061 5047 xfree((void**)&first_gauss_area_coord); 5062 5048 xfree((void**)&second_gauss_area_coord); … … 5165 5151 VecSetValues(pg,numdof,doflist,(const double*)P_terms,ADD_VALUES); 5166 5152 5167 cleanup_and_return:5168 5153 xfree((void**)&first_gauss_area_coord); 5169 5154 xfree((void**)&second_gauss_area_coord); … … 5299 5284 VecSetValues(pg,numdof,doflist,(const double*)P_terms,ADD_VALUES); 5300 5285 5301 cleanup_and_return:5302 5286 xfree((void**)&first_gauss_area_coord); 5303 5287 xfree((void**)&second_gauss_area_coord); … … 5852 5836 this->inputs->AddInput(new TriaVertexInput(GradientEnum,&grade_g[0])); 5853 5837 5854 cleanup_and_return:5855 5838 xfree((void**)&first_gauss_area_coord); 5856 5839 xfree((void**)&second_gauss_area_coord); -
issm/trunk/src/c/objects/Inputs/IntInput.cpp
r4927 r5016 42 42 printf("IntInput:\n"); 43 43 printf(" enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type)); 44 printf(" value: %i\n", this->value);44 printf(" value: %i\n",(int)this->value); 45 45 } 46 46 /*}}}*/ -
issm/trunk/src/c/objects/Loads/Riftfront.cpp
r4698 r5016 577 577 #define _ZIGZAGCOUNTER_ 578 578 579 int 579 int Riftfront::Constrain(int* punstable){ 580 580 581 581 const int numgrids = 2; -
issm/trunk/src/c/objects/Params/StringArrayParam.cpp
r4546 r5016 125 125 126 126 int i; 127 int marshallsize ;127 int marshallsize=0; 128 128 int stringsize; 129 129 char* string=NULL; -
issm/trunk/src/c/objects/Params/StringParam.cpp
r4546 r5016 49 49 /*FUNCTION StringParam::DeepEcho{{{1*/ 50 50 void StringParam::DeepEcho(void){ 51 52 51 printf("StringParam:\n"); 53 52 printf(" enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type)); -
issm/trunk/src/c/objects/Vertex.cpp
r4546 r5016 67 67 printf(" z: %g\n",z); 68 68 printf(" sigma: %g\n",sigma); 69 printf(" dof: % g\n",dof);70 printf(" clone: % g\n",clone);69 printf(" dof: %i\n",dof); 70 printf(" clone: %i\n",clone); 71 71 72 72 return; -
issm/trunk/src/c/shared/Exp/IsInPoly.cpp
r2587 r5016 38 38 VecSetValues(in,1,&i,&value,INSERT_VALUES); 39 39 } 40 return 1; 40 41 } 41 42 … … 59 60 VecSetValues(out,1,&i,&value,INSERT_VALUES); 60 61 } 62 63 return 1; 61 64 } 62 65 -
issm/trunk/src/c/shared/Exp/IsInPolySerial.cpp
r1439 r5016 30 30 } 31 31 } 32 33 return 1; 32 34 } -
issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp
r4898 r5016 95 95 xfree((void **)&dtemp); 96 96 } 97 98 return 1; 97 99 }/*}}}*/ 98 100 /*FUNCTION MatrixMuliply {{{1*/ -
issm/trunk/src/c/shared/TriMesh/SplitMeshForRifts.cpp
r3332 r5016 96 96 UpdateSegments(&segments,&segmentmarkerlist, &nsegs,index,x,y,riftsegments,nriftsegs); 97 97 98 cleanup_and_return:99 100 98 /*Assign output pointers: */ 101 99 *pnel=nel; -
issm/trunk/src/c/solutions/convergence.cpp
r4954 r5016 82 82 //print 83 83 if(res<eps_res){ 84 if (verbose) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," \%");84 if (verbose) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %"); 85 85 converged=1; 86 86 } 87 87 else{ 88 if (verbose) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," \%");88 if (verbose) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %"); 89 89 converged=0; 90 90 } … … 105 105 if (!isnan(eps_rel)){ 106 106 if((ndu/nu)<eps_rel){ 107 if (verbose) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," \%");107 if (verbose) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %"); 108 108 } 109 109 else{ 110 if (verbose) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," \%");110 if (verbose) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %"); 111 111 converged=0; 112 112 } 113 113 } 114 else _printf_("%-50s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," \%");114 else _printf_("%-50s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %"); 115 115 116 116 } -
issm/trunk/src/c/solutions/issm.cpp
r4873 r5016 4 4 5 5 #include "./issm.h" 6 #include "config.h" 6 7 8 #ifdef _HAVE_DAKOTA_ 9 #else 10 #error "No Dakota" 11 #endif 7 12 int main(int argc,char* *argv){ 8 13
Note:
See TracChangeset
for help on using the changeset viewer.