- Thank you received: 0
Questions about Integrate function
- oliverxia2020
- Topic Author
- Offline
- New Member
Less
More
3 years 9 months ago #3513
by oliverxia2020
Questions about Integrate function was created by oliverxia2020
Hello,
I'd like to compute some integrals on the faces of each element in 2D and use them as the error estimator.
I found that the following two lines of code give different results.
I am wondering why they are different. The NGSolve version I am using is 6.2.2007. I also attached my code.
I am also wondering if I want to compute integrals on all the faces of one element, including those are on the boundary, what is the right way to do it. The above code seems to ignore the boundary faces.
Thank you!
Oliver
I'd like to compute some integrals on the faces of each element in 2D and use them as the error estimator.
I found that the following two lines of code give different results.
Code:
Integrate(CoefficientFunction(1)*dx(element_boundary=True),my_mesh)
Code:
sum( Integrate(CoefficientFunction(1)*dx(element_boundary=True), my_mesh,element_wise = True))
I am wondering why they are different. The NGSolve version I am using is 6.2.2007. I also attached my code.
I am also wondering if I want to compute integrals on all the faces of one element, including those are on the boundary, what is the right way to do it. The above code seems to ignore the boundary faces.
Thank you!
Oliver
Attachments:
Time to create page: 0.092 seconds