Yang,

Sorry, my bad. I think the only way to do what you want, is to modify the 
code inside deal.II You need to modify this function 
<https://github.com/dealii/dealii/blob/master/include/deal.II/lac/solver_cg.h#L315-L458>
 
You will need to change the second argument of iteration_status() Instead 
of using the residual, you can change it to your inner product.

Best,

Bruno
 
On Tuesday, February 22, 2022 at 9:48:13 AM UTC-5 Yang Liu wrote:

> Hi Bruno,
>
> It seems that all the three derived classes of SolverControl have the 
> stopping criteria that are based on the residual l_2 norm. The argument 
> `check_value' in the function SolverControl::check() is provided as the 
> residual l_2 norm. I wonder how to provide the `SolverControl::check()' 
> function a different quantity instead of the l_2 norm. 
>
> Best,
>
> Yang
>
> On Monday, 21 February 2022 at 16:35:37 UTC+3 [email protected] wrote:
>
>> Yang,
>>
>> On Monday, February 21, 2022 at 8:00:24 AM UTC-5 Yang Liu wrote:
>>
>>> 1. Is it possible to extract the residual vector from the SolverCG (or 
>>> other possible solvers) class?
>>
>>
>> Yes, you can extract the residual vector using this 
>> <https://dealii.org/current/doxygen/deal.II/classSolverControl.html#a6d99741765243ccb65da4ff66558cf41>
>>   
>> and this 
>> <https://dealii.org/current/doxygen/deal.II/classSolverControl.html#a23d702aa2d7ee0a7b42c9968cf796521>
>>
>>>
>>> 2. Is it possible to use the inner product as mentioned above rather 
>>> than the l_2 norm as the check_value in the SolverControl class?
>>>
>>  
>> To do that you will need to create your on SolverControl class. As you 
>> can see here 
>> <https://dealii.org/current/doxygen/deal.II/classSolverControl.html>, 
>> there are already three derived classes of SolverControl. You will need to 
>> create a fourth one that does what you want.
>>
>> Best,
>>
>> Bruno
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/ae77dbba-3f3d-4af3-bb10-0a2a06376089n%40googlegroups.com.

Reply via email to