You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An implementation of PseudoTransient method that is used to solve steady state problems in an accelerated manner. It uses an adaptive time-stepping to
6
-
integrate an initial value of nonlinear problem until sufficient accuracy in the desired steady-state is achieved to switch over to Newton's method and
7
-
gain a rapid convergence. This implementation specifically uses "switched evolution relaxation" SER method. For detail information about the time-stepping and algorithm,
8
-
please see the paper: [Coffey, Todd S. and Kelley, C. T. and Keyes, David E. (2003), Pseudotransient Continuation and Differential-Algebraic Equations,
5
+
An implementation of PseudoTransient method that is used to solve steady state problems in
6
+
an accelerated manner. It uses an adaptive time-stepping to integrate an initial value of
7
+
nonlinear problem until sufficient accuracy in the desired steady-state is achieved to
8
+
switch over to Newton's method and gain a rapid convergence. This implementation
9
+
specifically uses "switched evolution relaxation" SER method. For detail information about
10
+
the time-stepping and algorithm, please see the paper:
11
+
[Coffey, Todd S. and Kelley, C. T. and Keyes, David E. (2003), Pseudotransient Continuation and Differential-Algebraic Equations,
9
12
SIAM Journal on Scientific Computing,25, 553-569.](https://doi.org/10.1137/S106482750241044X)
::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T}
222
220
if termination_condition !==nothing
223
-
abstol !==nothing?
224
-
(abstol != termination_condition.abstol ?
225
-
error("Incompatible absolute tolerances found. The tolerances supplied as the keyword argument and the one supplied in the termination condition should be same.") :
226
-
nothing) :nothing
227
-
reltol !==nothing?
228
-
(reltol != termination_condition.abstol ?
229
-
error("Incompatible relative tolerances found. The tolerances supplied as the keyword argument and the one supplied in the termination condition should be same.") :
230
-
nothing) :nothing
221
+
if abstol !==nothing&& abstol != termination_condition.abstol
222
+
error("Incompatible absolute tolerances found. The tolerances supplied as the \
223
+
keyword argument and the one supplied in the termination condition should \
224
+
be same.")
225
+
end
226
+
if reltol !==nothing&& reltol != termination_condition.reltol
227
+
error("Incompatible relative tolerances found. The tolerances supplied as the \
228
+
keyword argument and the one supplied in the termination condition should \
if termination_condition != cache.termination_condition
246
-
if abstol != cache.abstol
247
-
if abstol != termination_condition.abstol
248
-
error("Incompatible absolute tolerances found. The tolerances supplied as the keyword argument and the one supplied in the termination condition should be same.")
249
-
end
244
+
if abstol != cache.abstol&& abstol != termination_condition.abstol
245
+
error("Incompatible absolute tolerances found. The tolerances supplied as the \
246
+
keyword argument and the one supplied in the termination condition \
247
+
should be same.")
250
248
end
251
249
252
-
if reltol != cache.reltol
253
-
if reltol != termination_condition.reltol
254
-
error("Incompatible absolute tolerances found. The tolerances supplied as the keyword argument and the one supplied in the termination condition should be same.")
255
-
end
250
+
if reltol != cache.reltol&& reltol != termination_condition.reltol
251
+
error("Incompatible absolute tolerances found. The tolerances supplied as the \
252
+
keyword argument and the one supplied in the termination condition \
253
+
should be same.")
256
254
end
257
-
termination_condition
255
+
returntermination_condition
258
256
else
259
257
# Build the termination_condition with new abstol and reltol
0 commit comments