Feature: Add absolute tolerance (AbsTol) configuration for linear solver#734
Feature: Add absolute tolerance (AbsTol) configuration for linear solver#734jpsimas wants to merge 8 commits into
Conversation
| } | ||
| ksp->SetInitialGuess(linear.initial_guess); | ||
| ksp->SetRelTol(linear.tol); | ||
| ksp->SetAbsTol(iodata.solver.linear.abs_tol); |
There was a problem hiding this comment.
This needs to be linear.abs_tol, in the inner constructors we no longer pass the whole of IoData through.
There was a problem hiding this comment.
sorry! I was working with 0.16 and didnt see that got changed. how do I fix this, should I do another pull request?
| "Tol": { "type": "number", "minimum": 0.0 }, | ||
| "AbsTol": { "type": "number", "minimum": 0.0 }, |
There was a problem hiding this comment.
This slightly suggests changing the previous to "RelTol", which would be a breaking change. We could introduce it as an alias for the time being and then mark deprecated.
Yes, when running some simulations with a particular tricky antenna geometry, the initial absolute residue sometimes gets really high, so I find myself needing to do I dry run to see what is the initial absolute residual to tune the relative tolerance so the simulation stops at a low-enough residue value. This is relatively ok, until you get to AMR runs where the initial residue can value a lot between iterations. Setting the absolute tolerance to some fixed value like 1e-3 makes it a lot easier to run this type of automated runs unattended without having to worry that the initial absolute residual jumped up and ended up generating bad results |
Ok, sounds reasonable. You need to also add an entry to the documentation for the new config entry. |
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
…onfig" This reverts commit 6eca4a6.
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
|
@hughcars – I've addressed the review comments. Summary of changes: • palace/linalg/ksp.cpp : Changed iodata.solver.linear.abs_tol → linear.abs_tol as requested. Please let me know if any further changes are needed. Thanks! |
No description provided.