- Thank you received: 0
compute L2 error
4 years 2 months ago #3091
by wen jing
compute L2 error was created by wen jing
How to compute the error over a subdomain ?
4 years 2 months ago #3092
by hvwahl
Replied by hvwahl on topic compute L2 error
Hello Wen Jing,
have a Look at the tutorial on subdomains you see that bilinear forms use the `definedon` to determine which domain to act on If you look at the docstring of the Integrate function
you will see that is also has an optional Flag 'definedon' which you can use just as as in a BilinearForm to integrate over a subdomain.
Best wishes
Henry
have a Look at the tutorial on subdomains you see that bilinear forms use the `definedon` to determine which domain to act on If you look at the docstring of the Integrate function
Code:
help(Integrate)
Best wishes
Henry
4 years 2 months ago #3093
by wen jing
Replied by wen jing on topic compute L2 error
Thanks for your reply. I tried “ erru3 = sqrt( Integrate(errDD,mesh,order = 2*order, definedon=[2]) )” , but it doesn't seem to be able to use it that way.
TypeError: Integrate(): incompatible function arguments. The following argument types are supported:
TypeError: Integrate(): incompatible function arguments. The following argument types are supported:
4 years 2 months ago #3095
by hvwahl
Replied by hvwahl on topic compute L2 error
`definedon` expects a ngsolve.Region object (as stated in the docstring) so you need to give is something like mesh.Materials("region_name")
4 years 2 months ago #3097
by wen jing
Replied by wen jing on topic compute L2 error
Thanks for your help!
Best regards,
Wen jing
Best regards,
Wen jing
4 years 2 months ago #3105
by wen jing
Replied by wen jing on topic compute L2 error
We can compute the error of the subregion, so can we graph the solution on the subregion? If yes, could you give me a general idea? Looking for your reply, thanks!
Best regards,
Wen Jing
Best regards,
Wen Jing
Time to create page: 0.108 seconds