Dear colleagues,

I have a question concerning surface integration.

It is a simple model: 3 cubes one over another. The middle cube is polled (a polarisation vector(0,0,1) is assigned) and should produce charges on surfaces which are equal to a normal component of the polarisation.

To calculate a total charge on each surface I want to integrate through the surfaces the normal component of the polarisation.

I expect to get values 1 and -1 for these integrals on the top and bottom surfaces of the cube.

In the manual book I found three different ways to integrate. I used all of them and have following questions:

1) SURF_INTEGRAL ( integrand, surface, region ) - gives a value for a down surface but not for the upper surface as well as SURF_INTEGRAL ( integrand, surface, region, layer ) does. Why is it so?

2) SURF_INTEGRAL ( integrand, surface) - gives values both for down and upper surfaces but reduced by factor 2. What is the reason?

I am sorry for such a question, but what is the difference between all this three ways of integration and how finally calculate integrals both on down and upper surfaces?

Thank you for your support, it is always useful,

Ruben

Please find my script attached below.