Najwaa, 

I submitted a pull request <https://github.com/dealii/dealii/pull/15805> 
recently about something similar 
<https://groups.google.com/g/dealii/c/H0kLG8RJKVc>. (I guess)
Maybe that would help. 

Abbas 
 

On Monday, July 31, 2023 at 7:37:59 PM UTC+2 [email protected] wrote:

> Dear Wolfgang,
>
> Thank you for your answer. I will try to write a patch to the deal.II 
> sources that implement the missing function. This might require some time. 
> I will come back here if needed.
>
>
> Thank you all for your quick answers,
> Najwa
>
> On Wednesday, July 26, 2023 at 11:41:15 PM UTC+3 Wolfgang Bangerth wrote:
>
>> On 7/26/23 12:17, Najwa Alshehri wrote: 
>> > 
>> > Regarding the function "VectorFucntionFromScalarFunctionObject," I have 
>> > observed that it works for computing the L2 norm of the error. However, 
>> when I 
>> > attempted to compute the H1_seminorm of the error, I noticed that the 
>> gradient 
>> > was not implemented for this function. Please let me know if my 
>> understanding 
>> > is incorrect, as I referred to the <deal.II/base/function.h> for this. 
>>
>> Yes, correct. Someone needs to implement 
>> VectorFucntionFromScalarFunctionObject::gradient() 
>> and/or 
>> VectorFucntionFromScalarFunctionObject::gradient_list() 
>> in exactly the same way as the value() and value_list() functions are 
>> implemented. 
>>
>>
>> > Could you kindly advise me on the simplest way to accomplish this? 
>>
>> The easiest way is to create a class derived from 
>> VectorFucntionFromScalarFunctionObject in your own project that 
>> implements the 
>> missing function. The better way is to write a patch to the deal.II 
>> sources 
>> that implements the missing function because then others can use your 
>> work in 
>> the future as well :-) 
>>
>>
>> > On a side note, although "VectorFucntionFromScalarFunctionObject" works 
>> with 
>> > the L2 norm of the error, it is quite computationally intensive. 
>>
>> It isn't VectorFucntionFromScalarFunctionObject that's expensive, but the 
>> FEFieldFunction. That's sort of inherently the case with this class. If 
>> you 
>> can, it should be avoided and you should try an evaluate the FE field you 
>> have 
>> at regular quadrature points, via FEValues. 
>>
>> Best 
>> W. 
>>
>> -- 
>> ------------------------------------------------------------------------ 
>> Wolfgang Bangerth email: [email protected] 
>> www: http://www.math.colostate.edu/~bangerth/ 
>>
>>
>>

-- 
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/dd5f93f8-fb58-45c6-9ab2-91ef6c5bdf56n%40googlegroups.com.

Reply via email to