Changeset 11284
- Timestamp:
- 02/01/12 13:24:45 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/solvers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp
r9761 r11284 22 22 23 23 Loads* loads=NULL; 24 intconverged;24 bool converged; 25 25 int constraints_converged; 26 26 int num_unstable_constraints; … … 43 43 44 44 count=1; 45 converged= 0;45 converged=false; 46 46 47 47 /*Start non-linear iteration using input velocity: */ … … 50 50 51 51 //Update once again the solution to make sure that vx and vxold are similar (for next step in transient or steadystate) 52 InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum); 52 53 InputUpdateFromSolutionx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug); 53 54 … … 74 75 if (!constraints_converged) { 75 76 if (converged){ 76 if (num_unstable_constraints <= min_mechanical_constraints) converged= 1;77 else converged= 0;77 if (num_unstable_constraints <= min_mechanical_constraints) converged=true; 78 else converged=false; 78 79 } 79 80 } … … 81 82 /*Increase count: */ 82 83 count++; 83 if(converged== 1)break;84 if(converged==true)break; 84 85 if(count>=max_nonlinear_iterations){ 85 86 _printf_(true," maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); -
issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
r10997 r11284 14 14 15 15 /*intermediary: */ 16 Mat Kff_horiz = NULL, Kfs_horiz = NULL;17 Vec ug_horiz = NULL, uf_horiz = NULL, old_uf_horiz = NULL;18 Vec pf_horiz = NULL;19 Vec df_horiz = NULL;20 Mat Kff_vert = NULL, Kfs_vert = NULL;21 Vec ug_vert = NULL, uf_vert = NULL;22 Vec pf_vert = NULL;23 Vec df_vert = NULL;24 Vec ys = NULL;25 intconverged;26 int constraints_converged;27 int num_unstable_constraints;28 int count;16 Mat Kff_horiz = NULL, Kfs_horiz = NULL; 17 Vec ug_horiz = NULL, uf_horiz = NULL, old_uf_horiz = NULL; 18 Vec pf_horiz = NULL; 19 Vec df_horiz = NULL; 20 Mat Kff_vert = NULL, Kfs_vert = NULL; 21 Vec ug_vert = NULL, uf_vert = NULL; 22 Vec pf_vert = NULL; 23 Vec df_vert = NULL; 24 Vec ys = NULL; 25 bool converged; 26 int constraints_converged; 27 int num_unstable_constraints; 28 int count; 29 29 30 30 /*parameters:*/ 31 int min_mechanical_constraints;32 int max_nonlinear_iterations;33 int configuration_type;31 int min_mechanical_constraints; 32 int max_nonlinear_iterations; 33 int configuration_type; 34 34 35 35 /*Recover parameters: */ … … 39 39 40 40 count=1; 41 converged= 0;41 converged=false; 42 42 43 43 /*First get ug_horiz:*/ … … 84 84 /*Increase count: */ 85 85 count++; 86 if(converged== 1)break;86 if(converged==true)break; 87 87 if(count>=max_nonlinear_iterations){ 88 88 _printf_(true," maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations);
Note:
See TracChangeset
for help on using the changeset viewer.