@@ -38,8 +38,8 @@ Sub CLAM2()
3838 windowSize = 1.3 ' 1 for large, 2 for small display, and so on. Larger number, smaller graph plot.
3939 windowRatio = 4 / 3 ' window width / height, "2/1" for eyes or "4/3" for ppt
4040 ElemD = "C,O" ' Default elements to be shown up in the element analysis.
41- TimeCheck = "No " ' "No" only iteration results in fitting, numeric value to suppress any display.
42-
41+ TimeCheck = "0 " ' "yes" to display the progress time, "No" only iteration results in fitting, numeric value to suppress any display.
42+ ' (mac Excel should be like "0" to be speedy)
4343 a0 = - 0 . 00044463 ' Undulator parameters for harmonics or
4444 a1 = 1 . 0975 ' B vs gap equation
4545 a2 = - 0 . 02624 ' B = A0 + A1 * Exp(A2 * gap)
@@ -5094,8 +5094,8 @@ Resolve:
50945094 Cells( 15 + sftfit2, n - iCol + 110 ).Value = ratio(iRow - iCol) / ratio(k)
50955095 Else
50965096 If Cells( 6 , n - iCol).Font.Bold = False Then
5097- If Cells( 6 , n - iRow + k).Value <= 0 . 00001 Then Cells( 6 , n - iRow + k).Value = (Cells( 3 , 101 ).Value - Cells( 2 , 101 ).Value) / 100
5098- ' above avoids reference amplitude to be minimum at 1e-6 , then make certain value if less than 1e-5 .
5097+ If Cells( 6 , n - iRow + k).Value < (Cells( 3 , 101 ).Value - Cells( 2 , 101 ).Value) / 1000 Then Cells( 6 , n - iRow + k).Value = (Cells( 3 , 101 ).Value - Cells( 2 , 101 ).Value) / 100
5098+ ' above avoids reference amplitude to be less than minimum ((max-min)/1000) , then make 10 times of amplitude min .
50995099 SolverAdd CellRef:=Cells( 6 , n - iCol), Relation:= 2 , FormulaText:=Cells( 6 , n - iRow + k) * ratio(iRow - iCol) / ratio(k)
51005100 End If
51015101 Cells( 15 + sftfit2, n - iCol + 110 ).Value = ratio(iRow - iCol) / ratio(k)
0 commit comments