Re: [deal.II] Q: Question about extracting part of a vector

2023-08-03 Thread Wolfgang Bangerth
On 8/3/23 05:01, Najwa Alshehri wrote: 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

Re: [deal.II] Q: Question about extracting part of a vector

2023-08-03 Thread Najwa Alshehri
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

Re: [deal.II] Q: Question about extracting part of a vector

2023-08-01 Thread Abbas Ballout
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

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-31 Thread Najwa Alshehri
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 wrote: > Najwaa, > > I submitted a pull request

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-31 Thread Abbas Ballout
Najwaa, I submitted a pull request recently about something similar . (I guess) Maybe that would help. Abbas On Monday, July 31, 2023 at 7:37:59 PM UTC+2 najwaa...@gmail.com wrote: > Dear

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-31 Thread Najwa Alshehri
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

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-26 Thread Wolfgang Bangerth
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

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-26 Thread Najwa Alshehri
Greetings everyone, I want to express my gratitude for your assistance with my question, which has evolved into something more profound. Regarding the function "VectorFucntionFromScalarFunctionObject," I have observed that it works for computing the L2 norm of the error. However, when I

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-23 Thread Najwa Alshehri
Dear Luca, This is interesting. I am exited to try this out. Thank you so much, Najwa On Sunday, July 23, 2023 at 3:39:05 PM UTC+3 luca@gmail.com wrote: > FEFieldFunction has the same number of components of the underlying > dofhandler. If that has one component, then so does the

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-23 Thread Luca Heltai
FEFieldFunction has the same number of components of the underlying dofhandler. If that has one component, then so does the FEFieldFunction. What you could do is wrap the FEFieldFunction into another function, e.g.The deal.II Library: VectorFunctionFromScalarFunctionObject< dim, RangeNumberType >

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-21 Thread Najwa Alshehri
Dear Daniel, your answer makes sense, Finally it worked. Dear Luca, thank you for your answer. Indeed, the ExactSolution is a class I built myself. I followed your suggestion and it was the magic line that solved the issue. *However,* say that I have in another code instead of using a

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-20 Thread Daniel Arndt
Najwa, the relevant code reads something like const unsigned int n_components = dof.get_fe(0).n_components(); AssertDimension(exact_solution.n_components, n_components); if (weight != nullptr) { Assert((weight->n_components == 1) ||

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-20 Thread Najwa Alshehri
Hello again, I have a follow-up question. Does this ComponentSelectFunction work also with vectors that are not written as blocked vectors? I have applied it before when I was dealing with blocked vectors and it worked perfectly. So, I did this, const ComponentSelectFunction

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-20 Thread Najwa Alshehri
Thank you Daniel for the clear quick answer. I will follow it. Best, Najwa On Wednesday, July 19, 2023 at 5:16:14 PM UTC+3 d.arnd...@gmail.com wrote: > Najwa, > > The documentation of VectorTools::integrate_difference( >

Re: [deal.II] Q: Question about extracting part of a vector

2023-07-19 Thread Daniel Arndt
Najwa, The documentation of VectorTools::integrate_difference( https://www.dealii.org/current/doxygen/deal.II/namespaceVectorTools.html#a676190d2c897ac5da68a9c460fa95832) says The additional argument weight allows to evaluate weighted norms. The weight function may be scalar, establishing a

[deal.II] Q: Question about extracting part of a vector

2023-07-19 Thread Najwa Alshehri
Dear group members, I have one question, I am trying to calculate the L2 norm of the error of a solution. In particular, I have a *vector of the solution* u_omega and a *FeSystem* with two fes. I am interested in computing the L2 norm of the error related to the first fe using