I am looking for a way to assemble/solve local subdomain problems on the pieces of a distributed mesh. The simplest way I can see would be to create submeshes, but after compiling in the c++ interface a small example I get an RuntimeError "SubMesh::init not working in parallel". Is there any way to accomplish this, or am I dead in the water here?
Here is the small example:
#include <dolfin.h>
using namespace dolfin;
int main()
{
// Create mesh
UnitSquareMesh mesh(2,2);
// Initialize Cell Function
CellFunction<std::size_t> cell_fn(mesh); // don't set values
// Fill Cell Function with the process id
for (CellIterator c(mesh); !c.end(); ++c)
cell_fn[*c] = MPI::rank(MPI_COMM_WORLD);
/// Extract the submesh from the process id cell function
dolfin::SubMesh submesh = SubMesh(mesh, cell_fn, MPI::rank(MPI_COMM_WORLD));
}