Creating, converting and importing mesh routine with subdomains

Hello :),

for my master thesis i try to simulate a SIR model on the Berlin domain. For now my routine is as the following:

  1. Create the shape of Berlin with polygons
  2. Initializing mesh and exporting mesh with the notations “p e t”
  3. Run the following matlab script:
DT = delaunayTriangulation(p');
T = t(1:3,:)';
DT1 = triangulation(T,p');
  1. Use gmsh and open the generated “berlin.stl” file
  2. Exporting as “berling.msh” and “ASCII Version 2 Format”
  3. Finally using the following command in the terminal
$ dolfin-convert berlin.msh berlin.xml

I obtain the following mesh:

So far it works pretty good. It seems that i can’t create subdomains with Matlab which should also be polygons to get the city districts.

Can someone tell me, how to create the subdomains for my problem? :slight_smile:
Thank you in advance