Changeset 27656
- Timestamp:
- 03/24/23 12:32:46 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp
r23587 r27656 40 40 femmodel->UpdateConstraintsx(); 41 41 42 count= 1;42 count=0; 43 43 converged=false; 44 44 … … 57 57 58 58 /*Solver forward model*/ 59 if(count== 1|| newton==2){59 if(count==0 || newton==2){ 60 60 SystemMatricesx(&Kff,&Kfs,&pf,&df,NULL,femmodel); 61 61 CreateNodalConstraintsx(&ys,femmodel->nodes); … … 87 87 Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys; 88 88 InputUpdateFromSolutionx(femmodel,ug); 89 count++; 89 90 90 91 /*Check convergence*/ 91 92 convergence(&converged,Kff,pf,uf,old_uf,eps_res,eps_rel,eps_abs); 92 93 delete Kff; delete pf; 93 if(converged==true){ 94 break; 95 } 94 if(converged==true) break; 96 95 if(count>=max_nonlinear_iterations){ 97 96 _printf0_(" maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded\n"); 98 97 break; 99 98 } 100 101 count++;102 99 } 103 100 104 if(VerboseConvergence()) _printf0_("\n total number of iterations: " << count -1<< "\n");101 if(VerboseConvergence()) _printf0_("\n total number of iterations: " << count << "\n"); 105 102 106 103 /*clean-up*/
Note:
See TracChangeset
for help on using the changeset viewer.