Heyhey HoWil,HoWil wrote: ↑Sat Jun 16, 2018 9:10 am Hi Johannes,
I tested the integration over an inner boundary in a minimal fenics example where I created the geometry and mesh in fenics and the result is the same. I get zero when simply integrating over such an inner boundary.
So there has to be a solution inside fenics.
I am thinking of using the normal vector in combination with an inner product but did not succeed until now.
Do you have any new ideas about that?
Br,
Howil
sorry for the late reply, but I was on vacation the last two weeks. First to your question:
Since my experience in Fenics is quite limited I also was not able to extract the normal vector information from the boundary. I will check whether it is possible to access different points or facets of the boundary from a facet function. From that you could easily calculate the normal vector from e.g. three points A, B, C by using (A - B) x (B - C)/||(A - B) x (B - C)||. Maybe it would also be nice to make an accessible object which extracts these quantities in the Fenics tools Another possibility would be to calculate the normal vector direclty from an expression if you know your boundary analytically (i.e. for a sphere with center C it is just (x - C)/||x-C||). Hope this helps a bit.
Now to the Fenics interface: I refactored the interface such that you can load the facet functions and cell functions directly from an XDMF reader class. Also the mesh is available there which you need to define the vector spaces. They could be used as before, but now you can also define vector expressions for the cell functions (i.e. to define a current or something like this). I think the interface becomes more and more useful. Although due to the value_shape() method in the Expression class I had to define an ugly class hierarchy. Maybe this could be removed in the future. The PR is created on bernds femdev branch. Maybe you could give me your opinion.
In a few days I will provide some code for solving a vector Poisson equation or something like this.
Best wishes
Johannes