Changeset 6322
- Timestamp:
- 10/15/10 11:58:26 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/include/macros.h
r4518 r6322 16 16 /*}}}*/ 17 17 18 /*Printing macro: call MPI_Barrier in debugging mode so that prints are synchronized*/ 18 /* _printf_ {{{1*/ 19 /*Printing macro: only cpu number 0 */ 19 20 #define _printf_(...) PrintfFunction(__VA_ARGS__) 20 21 /*}}}*/ 22 /* ISSMPRINTF {{{1*/ 23 /*Printing macro with flag*/ 24 #define ISSMPRINTF(flag,...) if(flag) PrintfFunction(__VA_ARGS__) 25 /*}}}*/ 26 /* ISSMERROR {{{1*/ 21 27 /*Error exception macro*/ 22 28 #ifdef _INTEL_WIN_ … … 27 33 throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__)) 28 34 #endif 29 35 /*}}}*/ 36 /* ISSMASSERT {{{1*/ 30 37 /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/ 31 38 #ifdef _ISSM_DEBUG_ … … 36 43 ((void) 0) 37 44 #endif 38 45 /*}}}*/ 46 /* MODULEBOOT/MODULEEND {{{1*/ 39 47 /*The following macros hide the error exception handling in a matlab module. Just put 40 48 * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions … … 70 78 } 71 79 #endif 72 80 /*}}}*/ 73 81 74 82 #endif -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r6305 r6322 42 42 analysis_type=analysis_type_list[i]; 43 43 44 if (VerbModProc()) _printf_(" create datasets for analysis %s\n",EnumToString(analysis_type));44 ISSMPRINTF(VerboseMProcessor()," create datasets for analysis %s\n",EnumToString(analysis_type)); 45 45 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,¶meters,iomodel,IOMODEL,solution_type,analysis_type,nummodels,i); 46 46 } -
issm/trunk/src/c/objects/FemModel.cpp
r6305 r6322 48 48 for(i=0;i<nummodels;i++){ 49 49 50 if(VerbModProc()) _printf_(" Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i])); 50 printf("\n"); 51 ISSMPRINTF(VerboseMProcessor()," Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i])); 51 52 analysis_type=analysis_type_list[i]; 52 53 this->SetCurrentConfiguration(analysis_type); 53 54 54 55 if(i==0){ 55 if(VerbModProc()) _printf_(" create vertex degrees of freedom\n");56 ISSMPRINTF(VerboseMProcessor()," create vertex degrees of freedom\n"); 56 57 VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices 57 58 } 58 59 59 if(VerbModProc()) _printf_(" resolve node constraints\n");60 ISSMPRINTF(VerboseMProcessor()," resolve node constraints\n"); 60 61 SpcNodesx(nodes,constraints,analysis_type); 61 62 62 if(VerbModProc()) _printf_(" create nodal degrees of freedom\n");63 ISSMPRINTF(VerboseMProcessor()," create nodal degrees of freedom\n"); 63 64 NodesDofx(nodes,parameters,analysis_type); 64 65 65 if(VerbModProc()) _printf_(" create nodal constraints vector\n");66 ISSMPRINTF(VerboseMProcessor()," create nodal constraints vector\n"); 66 67 CreateNodalConstraintsx(&m_ys[i],nodes,analysis_type); 67 68 68 if(VerbModProc()) _printf_(" create node sets\n");69 ISSMPRINTF(VerboseMProcessor()," create node sets\n"); 69 70 BuildNodeSetsx(&m_nodesets[i], nodes,analysis_type); 70 71 71 if(VerbModProc()) _printf_(" configuring element and loads\n");72 ISSMPRINTF(VerboseMProcessor()," configuring element and loads\n"); 72 73 ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters); 73 74 } -
issm/trunk/src/c/solutions/convergence.cpp
r6305 r6322 44 44 45 45 /*Display solver caracteristics*/ 46 if (Verb Converge()){46 if (VerboseConvergence()){ 47 47 48 48 //compute KUF = KU - F = K*U - F … … 80 80 //print 81 81 if(res<eps_res){ 82 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");82 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %"); 83 83 converged=1; 84 84 } 85 85 else{ 86 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");86 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %"); 87 87 converged=0; 88 88 } 89 89 90 90 /*Relative criterion (optional)*/ 91 if (!isnan(eps_rel) || (Verb Converge())){91 if (!isnan(eps_rel) || (VerboseConvergence())){ 92 92 93 93 //compute norm(du)/norm(u) … … 103 103 if (!isnan(eps_rel)){ 104 104 if((ndu/nu)<eps_rel){ 105 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");105 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %"); 106 106 } 107 107 else{ 108 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");108 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %"); 109 109 converged=0; 110 110 } … … 115 115 116 116 /*Absolute criterion (Optional) = max(du)*/ 117 if (!isnan(eps_abs) || (Verb Converge())){117 if (!isnan(eps_abs) || (VerboseConvergence())){ 118 118 119 119 //compute max(du) … … 128 128 if (!isnan(eps_abs)){ 129 129 if ((nduinf*yts)<eps_abs){ 130 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");130 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr"); 131 131 } 132 132 else{ 133 if (VerbConverge()) _printf_("%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");133 ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr"); 134 134 converged=0; 135 135 }
Note:
See TracChangeset
for help on using the changeset viewer.