Dear team,
I want to express my gratitude for the support you have provided thus far. I would like to provide you with an update on the current situation and seek your assistance regarding a couple of issues. Firstly, I have successfully implemented the missing function `VectorFunctionFromScalarFunctionObject::gradient()` in my project. Although it appears to be functioning correctly, the execution speed is extremely slow. In fact, it took until the next working day to obtain the results for only two cycles of refinement. Based on the response from @Wolfgang, it seems that the issue lies with the FeFieldFunction. Allow me to provide some context. I have a reference solution serialized on a fine mesh. In my current code, my objective is to deserialize this solution and utilize it as the exact solution. To achieve this, I have employed the FeFieldFunction. Now, I have two scenarios in which I need to utilize the FeFieldFunction. The first scenario involves directly using the FeFieldFunction when my computed solution consists of a single component. In this case, I have successfully calculated the L2 and H1 norms of the error using the `integrate_difference` and `compute_global_error` functions. The calculations proceeded smoothly, and the execution speed was reasonable. However, the second scenario involves using the FeFieldFunction when the computed solution consists of two components. My objective is to calculate the error for the first component only. To accomplish this, I employed the new VectorFunctionFromScalarFunctionObject class locally. Unfortunately, the computation of the L2 norm in this case was considerably slow and the H1 norm was very slow. Given the current situation, I have two questions that I hope you can assist me with, as you have done in the past: 1. Regarding my specific project, is there an alternative method, other than the FeFieldFunction, to save the deserialized solution as a function and utilize it as the exact solution? It is crucial that the solution be saved in the first component of a vector with two components. 2. In a more general sense, how can I test this function to determine if the sluggishness is solely attributable to the FeFieldFunction? Additionally, I would like to verify whether the function is functioning correctly or not, to be able to send it in a pull request to the dealii git repository. Your guidance and expertise in resolving these issues would be greatly appreciated. Thank you once again for your continued support. Best regards, Najwa On Tuesday, August 1, 2023 at 12:50:27 PM UTC+3 abbas.b...@gmail.com wrote: > Najwa, > The files I edited are in the pull request here: > https://github.com/dealii/dealii/pull/15805. > Let me know if I can help in a better way or of there is something I can > do. > > Abbas. > > On Tuesday, August 1, 2023 at 5:48:41 AM UTC+2 najwaa...@gmail.com wrote: > >> Hello Abbas, >> >> Thank you for your response. I have actually written something, but I >> need to test it. It would be great to have a look at your work as well, so >> we can compare. >> >> Best regards, >> Najwa >> >> On Mon, 31 Jul 2023 at 10:48 PM Abbas Ballout <abbas.b...@gmail.com> >> wrote: >> >>> 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 najwaa...@gmail.com 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: bang...@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 a topic in the >>> Google Groups "deal.II User Group" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/dealii/DqH2auneWaY/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> dealii+un...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/dealii/dd5f93f8-fb58-45c6-9ab2-91ef6c5bdf56n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/dealii/dd5f93f8-fb58-45c6-9ab2-91ef6c5bdf56n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- 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/9fde16f1-f9be-4f6a-8f2e-915ad23d2d56n%40googlegroups.com.