sblauth / cashocs

computational adjoint-based shape optimization and optimal control software for python
https://cashocs.readthedocs.io/
GNU General Public License v3.0
52 stars 10 forks source link

Make angle-weighted interpolation for topology optimization available for parallel computing #208

Closed sblauth closed 2 days ago

sblauth commented 1 year ago

At the moment, topology optimization does not work in parallel.

sblauth commented 1 year ago

The issue arises due to the angle-weighted interpolation. Most likely this is the case due to an indexing error as the mesh and dofs are distributed among multiple tasks.

sblauth commented 2 days ago

This is not so easy to do - it requires setting parameters["ghost_mode"] = "shared_vertex" from the fenics side and then some careful manipulation of the owned vertices of each process (to ensure that things are not done multiple times). I think for now it is easier to raise an error if topology optimization is run with interpolation_scheme = angle and it is detected that the program runs on more than one MPI process.