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:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/ed15a787-fad7-4b4f-9be0-b12d54a758a8%40colostate.edu.

Reply via email to