no boundary between domains in 3d

Issue #9 closed
Marc-Antonio Bisotti created an issue

The demo materials.py clearly shows how vertices are placed on the boundary between domains in the 2D case.

Using the following code, I can't reproduce this behaviour in 3 dimensions:

import mshr
import dolfin as df

# two cubes next to each other
domain = mshr.Box(df.Point(0, 0, 0), df.Point(2, 1, 1))
domain.set_subdomain(1, mshr.Box(df.Point(0, 0, 0), df.Point(1, 1, 1)))
domain.set_subdomain(2, mshr.Box(df.Point(1, 0, 0), df.Point(2, 1, 1)))
mesh = mshr.generate_mesh(domain, resolution=20)

# no boundaries to be seen
plot = df.plot(mesh, interactive=True)

# no subdomains to be seen
mf = df.MeshFunction("size_t", mesh, 3, mesh.domains())
df.plot(mf, interactive=True)

Am I doing something wrong?

Comments (3)

  1. Benjamin Dam Kehlet

    No, sorry, there is no support for subdomains in 3D yet. The mesh generation backends has support for this and it will appear at some point.

    Obviously, mshr should warn you when trying to do this. I will add that.

  2. Benjamin Dam Kehlet

    Setting subdomains in 3D now results in an error. I will add a separate issue for adding subdomain support in 3D.

  3. Log in to comment