Based on this excellent FEM response: Electric field between two arbitrarily defined forms, I can calculate the electric field `ef`

between two conductive objects.

$$ F = qE $$

Now I have tried to calculate the **total resulting electric force** on each object (acting at the geometric center), by simply integrating the electric field around the border of the object:

```
NIntegrate(
Evaluate(ef), {x, y} (Element)
Region`RegionProperty(RegionBoundary(object1), {x, y},
"FastDescription")((1))((2)))
```

but it does not work. Any help would be greatly appreciated.

Here is the complete code to calculate the electric field:

```
Needs("NDSolve`FEM`");
(*Define Boundaries*)
air = Rectangle({-5, -5}, {5, 5});
object1 = Rectangle({-2.5, 2.5}, {2.5, 2});
object2 = Rectangle({-2.5, -2.5}, {2.5, -2});
reg12 = RegionUnion(object1, object2);
reg = RegionDifference(air, reg12)
mesh = ToElementMesh(reg, MaxCellMeasure -> 0.1);
mesh("Wireframe")
eq = Laplacian(u(x, y), {x, y}); V1 = 1; V2 = -2;
bc = {DirichletCondition(u(x, y) == V1,
Region`RegionProperty(RegionBoundary(object1), {x, y},
"FastDescription")((1))((2))),
DirichletCondition(u(x, y) == V2,
Region`RegionProperty(RegionBoundary(object2), {x, y},
"FastDescription")((1))((2)))};
U = NDSolveValue({eq == 0, bc}, u, {x, y} (Element) mesh);
ef = -Grad(U(x, y), {x, y});
StreamDensityPlot(Evaluate(ef), {x, y} (Element) reg,
ColorFunction -> "Rainbow", PlotLegends -> Automatic,
FrameLabel -> {x, y}, StreamStyle -> LightGray, VectorPoints -> Fine,
PlotRange -> Automatic)
```