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.

Questions about Integrate function

More
3 years 2 months ago #3513 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.
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
Time to create page: 0.142 seconds