Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

compute L2 error

More
3 years 8 months ago #3106 by dong
Replied by dong on topic compute L2 error
Assume that the domain split into two subregions 1 and 2. The exact solution on each region is u1 and u2, respectively. You can draw the exact solution on the domain by using the characteristic functions. For examples,
Code:
# Draw exact solution char_1 = GridFunction(L2(mesh,order=0)) char_1.Set(CoefficientFunction([1,0])) char_2 = GridFunction(L2(mesh,order=0)) char_2.Set(CoefficientFunction([0,1])) u = char_1*u1+char_2*u2 Draw(u, mesh, "uexact")
The following user(s) said Thank You: wen jing
More
3 years 8 months ago #3107 by wen jing
Replied by wen jing on topic compute L2 error
Thank you for your constant reply! However, if the variable is only defined on one of the regions, can we draw?
More
3 years 8 months ago #3108 by wen jing
Replied by wen jing on topic compute L2 error
Dear dong
I've seen you ask some questions about Stokes - Darcy's code, I think you must be very good at dealing with interface problems. I have recently written IPDG for primal form of Stokes- Darcy and HDG for mixed form of Stokes- Darcy according to the ideas I have learned,but I have encountered difficulties. Have you ever written a complete program like this? What kind of difficulties have you encountered? Looking forward to your reply. Thanks!

Best regards,
JIng
Time to create page: 0.135 seconds