Changeset 71
- Timestamp:
- 04/27/09 16:51:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m
r36 r71 42 42 soln(1).u_g=velocity_param; 43 43 soln(1).u_g(4:6:gridset.gsize)=0; %no pressure in the velocity 44 soln(2).u_g=velocity_param;45 soln(2).u_g(4:6:gridset.gsize)=0; %no pressure in the velocity46 44 else 47 45 soln(1).u_g={}; 48 soln(2).u_g={};49 46 end 50 47 else … … 52 49 inputs=struct(); 53 50 soln(1).u_g={}; 54 soln(2).u_g={};55 51 end 56 52 57 53 58 54 %Initialization 59 count= 2;55 count=1; 60 56 converged=0; 61 57 … … 73 69 pflag=1; 74 70 else 75 if count== 2, pflag=1; else pflag=0; end71 if count==1, pflag=1; else pflag=0; end 76 72 end 77 73 78 74 %add velocity to inputs 79 75 inputs.velocity=soln(count).u_g; 80 inputs.oldvelocity=soln(count-1).u_g; 76 if count>1, 77 inputs.oldvelocity=soln(count-1).u_g; 78 end 81 79 82 80 %generate stiffness and loads … … 85 83 86 84 %Save loads 87 if count== 2,85 if count==1, 88 86 p_g_old=p_g; 89 87 else … … 117 115 118 116 %Figure out if convergence is reached. 119 if((count>= 4)| velocity_is_present), %make sure we already iterated at least once.117 if((count>=3)| velocity_is_present), %make sure we already iterated at least once. 120 118 121 119 %compute relative velocity difference for this step.
Note:
See TracChangeset
for help on using the changeset viewer.