H1 error for vector function problem #4674
Replies: 5 comments 4 replies
-
Hi @Hemanta822, I think With the existing methods you can split your vector function into scalar |
Beta Was this translation helpful? Give feedback.
-
Hi @vladotomov, I am working on example 5 (with different function space). And I am simplifying my problem by setting both components of displacement (u) same (and alpha = 0, so that I do not see any impact of pressure). I expected to see my x = [x0, x1] such that x0 = x1. However, my x0 and x1 have many same numbers but in the different positions (for example in the following mentioned solution, 0.707232 and 0.70718 have swapped their positions in x0 and x1). I also tried to play with the ordering in the function space as:
I got my displacement x as follows: Solution (x): Solution0 (x0): Solution1 (x1): Please let me know how I can fix it and if there is any easier way to do it. Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
I can't say from the given info. What is |
Beta Was this translation helpful? Give feedback.
-
Are you solving ex5 with the RT space? The above won't extract the components of an RT function correctly, that's not how the vector unknowns are arranged in the solution vectors for RT. See this comment for a way to project the components to an L2 vector space. For L2, the above extraction should work. |
Beta Was this translation helpful? Give feedback.
-
Hi @vladotomov, I am using H1_FECollection,
Since I am having dropped H1 rates while using these splitted x0 and x1. I checked with my L2 rates. I am getting optimal rate 3.00, when I compute the L2 norm using the existing functionality in MFEM WITHOUT SPLITTING x as follows:
However I see high drop in my L2 rate (similar to what I observe in H1 rate), if I split my x as mentioned above and compute L2 error using components as follows:
where u1 and u2 are gridfunctions created using x0 and x1 (x = [x0, x1]). This is why I am guessing if the way I splitted the solution doesn't work. Please advise. Thank you! |
Beta Was this translation helpful? Give feedback.
-
I was trying to compute the H1 error for a vector problem in 2D. As my exact solution, I have a 2D vector u_ex = [u1, u2]. I created a 2*2 gradient matrix and used MatrixFunctionCoefficient to get the coefficients. But when I try to compute the H1 error using u.ComputeH1Error(exact_u_coeff, exact_grad_coeff), I cannot do so because ComputeH1Error() takes gradient from VectorFunctionCoefficient. I would appreciate it if someone could help me or give me some direction to deal with this.
Beta Was this translation helpful? Give feedback.
All reactions