@@ -7,27 +7,15 @@ diagnostic messages, warnings, and errors during nonlinear system solution.
77# Fields
88
99## Error Control Group
10- - `immutable_u0`: Messages when u0 is immutable
11- - `non_enclosing_interval`: Messages when interval doesn't enclose root
12- - `non_forward_mode`: Messages when forward mode AD is not used
13- - `fd_ad_caution`: Messages about finite differencing cautions
14- - `ad_backend_incompatible`: Messages when AD backend is incompatible
10+ - `non_enclosing_interval`: Messages when interval doesn't enclose root (bracketing methods)
1511- `alias_u0_immutable`: Messages when aliasing u0 with immutable array
1612- `linsolve_failed_noncurrent`: Messages when linear solve fails on non-current iteration
17- - `jacobian_free`: Messages about jacobian-free methods
1813- `termination_condition`: Messages about termination conditions
1914
20- ## Performance Group
21- - `colorvec_non_sparse`: Messages when color vector is used with non-sparse matrix
22- - `colorvec_no_prototype`: Messages when color vector has no prototype
23- - `sparsity_using_jac_prototype`: Messages when using jacobian prototype for sparsity
24- - `sparse_matrixcolorings_not_loaded`: Messages when SparseMatrixColorings not loaded
25-
2615## Numerical Group
27- - `threshold_state`: Messages about threshold state
28- - `pinv_undefined`: Messages when pseudoinverse is undefined
16+ - `threshold_state`: Messages about threshold state in low-rank methods
2917
30- ## Linear Solver
18+ ## Linear Solver Group
3119- `linear_verbosity`: Verbosity configuration for linear solvers
3220
3321# Constructors
@@ -59,51 +47,36 @@ verbose = NonlinearVerbosity(
5947
6048# Set individual fields
6149verbose = NonlinearVerbosity(
62- immutable_u0 = SciMLLogging.WarnLevel(),
50+ alias_u0_immutable = SciMLLogging.WarnLevel(),
6351 threshold_state = SciMLLogging.InfoLevel()
6452)
6553
6654# Mix group and individual settings
6755verbose = NonlinearVerbosity(
6856 numerical = SciMLLogging.InfoLevel(), # Set all numerical to InfoLevel
69- pinv_undefined = SciMLLogging.ErrorLevel() # Override specific field
57+ threshold_state = SciMLLogging.ErrorLevel() # Override specific field
7058)
7159```
7260"""
7361@concrete struct NonlinearVerbosity <: AbstractVerbositySpecifier
7462 # Linear verbosity
7563 linear_verbosity
7664 # Error control
77- immutable_u0
7865 non_enclosing_interval
79- non_forward_mode
80- fd_ad_caution
81- ad_backend_incompatible
8266 alias_u0_immutable
8367 linsolve_failed_noncurrent
84- jacobian_free
8568 termination_condition
86- # Performance
87- colorvec_non_sparse
88- colorvec_no_prototype
89- sparsity_using_jac_prototype
90- sparse_matrixcolorings_not_loaded
9169 # Numerical
9270 threshold_state
93- pinv_undefined
9471end
9572
9673# Group classifications
9774const error_control_options = (
98- :immutable_u0 , :non_enclosing_interval , :non_forward_mode , :fd_ad_caution ,
99- :ad_backend_incompatible , :alias_u0_immutable , :linsolve_failed_noncurrent ,
100- :jacobian_free , :termination_condition
101- )
102- const performance_options = (
103- :colorvec_non_sparse , :colorvec_no_prototype , :sparsity_using_jac_prototype ,
104- :sparse_matrixcolorings_not_loaded
75+ :non_enclosing_interval , :alias_u0_immutable , :linsolve_failed_noncurrent ,
76+ :termination_condition
10577)
106- const numerical_options = (:threshold_state , :pinv_undefined )
78+ const performance_options = ()
79+ const numerical_options = (:threshold_state ,)
10780
10881function option_group (option:: Symbol )
10982 if option in error_control_options
12194function group_options (verbosity:: NonlinearVerbosity , group:: Symbol )
12295 if group === :error_control
12396 return NamedTuple {error_control_options} (getproperty (verbosity, opt)
124- for opt in error_control_options)
97+ for opt in error_control_options)
12598 elseif group === :performance
12699 return NamedTuple {performance_options} (getproperty (verbosity, opt)
127- for opt in performance_options)
100+ for opt in performance_options)
128101 elseif group === :numerical
129102 return NamedTuple {numerical_options} (getproperty (verbosity, opt)
130- for opt in numerical_options)
103+ for opt in numerical_options)
131104 else
132105 error (" Unknown group: $group " )
133106 end
@@ -161,21 +134,11 @@ function NonlinearVerbosity(;
161134 # Build arguments using NamedTuple for type stability
162135 default_args = (
163136 linear_verbosity = linear_verbosity === nothing ? Minimal () : linear_verbosity,
164- immutable_u0 = WarnLevel (),
165137 non_enclosing_interval = WarnLevel (),
166- non_forward_mode = WarnLevel (),
167- fd_ad_caution = WarnLevel (),
168- ad_backend_incompatible = WarnLevel (),
169138 alias_u0_immutable = WarnLevel (),
170139 linsolve_failed_noncurrent = WarnLevel (),
171- jacobian_free = WarnLevel (),
172140 termination_condition = WarnLevel (),
173- colorvec_non_sparse = WarnLevel (),
174- colorvec_no_prototype = WarnLevel (),
175- sparsity_using_jac_prototype = WarnLevel (),
176- sparse_matrixcolorings_not_loaded = WarnLevel (),
177- threshold_state = WarnLevel (),
178- pinv_undefined = WarnLevel ()
141+ threshold_state = WarnLevel ()
179142 )
180143
181144 # Apply group-level settings
@@ -206,64 +169,34 @@ function NonlinearVerbosity(verbose::AbstractVerbosityPreset)
206169 # Minimal: Only fatal errors and critical warnings
207170 NonlinearVerbosity (
208171 linear_verbosity = Minimal (),
209- immutable_u0 = WarnLevel (),
210172 non_enclosing_interval = WarnLevel (),
211- non_forward_mode = Silent (),
212- fd_ad_caution = Silent (),
213- ad_backend_incompatible = WarnLevel (),
214173 alias_u0_immutable = Silent (),
215174 linsolve_failed_noncurrent = WarnLevel (),
216- jacobian_free = Silent (),
217175 termination_condition = Silent (),
218- colorvec_non_sparse = Silent (),
219- colorvec_no_prototype = Silent (),
220- sparsity_using_jac_prototype = Silent (),
221- sparse_matrixcolorings_not_loaded = Silent (),
222- threshold_state = Silent (),
223- pinv_undefined = ErrorLevel ()
176+ threshold_state = Silent ()
224177 )
225178 elseif verbose isa Standard
226179 # Standard: Everything from Minimal + non-fatal warnings
227180 NonlinearVerbosity ()
228181 elseif verbose isa Detailed
229182 # Detailed: Everything from Standard + debugging/solver behavior
230183 NonlinearVerbosity (
231- linear_verbosity = Minimal (),
232- immutable_u0 = WarnLevel (),
184+ linear_verbosity = Detailed (),
233185 non_enclosing_interval = WarnLevel (),
234- non_forward_mode = InfoLevel (),
235- fd_ad_caution = WarnLevel (),
236- ad_backend_incompatible = WarnLevel (),
237186 alias_u0_immutable = WarnLevel (),
238187 linsolve_failed_noncurrent = WarnLevel (),
239- jacobian_free = InfoLevel (),
240188 termination_condition = WarnLevel (),
241- colorvec_non_sparse = InfoLevel (),
242- colorvec_no_prototype = InfoLevel (),
243- sparsity_using_jac_prototype = InfoLevel (),
244- sparse_matrixcolorings_not_loaded = InfoLevel (),
245- threshold_state = WarnLevel (),
246- pinv_undefined = WarnLevel ()
189+ threshold_state = WarnLevel ()
247190 )
248191 elseif verbose isa All
249192 # All: Maximum verbosity - every possible logging message at InfoLevel
250193 NonlinearVerbosity (
251- linear_verbosity = All (),
252- immutable_u0 = WarnLevel (),
194+ linear_verbosity = Detailed (),
253195 non_enclosing_interval = WarnLevel (),
254- non_forward_mode = InfoLevel (),
255- fd_ad_caution = WarnLevel (),
256- ad_backend_incompatible = WarnLevel (),
257196 alias_u0_immutable = WarnLevel (),
258197 linsolve_failed_noncurrent = WarnLevel (),
259- jacobian_free = InfoLevel (),
260198 termination_condition = WarnLevel (),
261- colorvec_non_sparse = InfoLevel (),
262- colorvec_no_prototype = InfoLevel (),
263- sparsity_using_jac_prototype = InfoLevel (),
264- sparse_matrixcolorings_not_loaded = InfoLevel (),
265- threshold_state = InfoLevel (),
266- pinv_undefined = WarnLevel ()
199+ threshold_state = InfoLevel ()
267200 )
268201 end
269202end
275208 Silent (),
276209 Silent (),
277210 Silent (),
278- Silent (),
279- Silent (),
280- Silent (),
281- Silent (),
282- Silent (),
283- Silent (),
284- Silent (),
285- Silent (),
286- Silent (),
287- Silent (),
288211 Silent ()
289212 )
290213end
303226 else
304227 return default_val
305228 end
306- end
307-
229+ end
0 commit comments