Defining subdomain

Hi all,
I need to install MeshView for defining subdomains I checked out some references that some people provide but non of the is working and I still get the error NameError: name ‘MeshView’ is not defined.

You Need to explain a few things for anyone to be able to help you:

  1. How did you install dolfin?
  2. Which version of dolfin have you installed? This can be obtained by the following lines:
import dolfin
print(dolfin.__version__)

Thanks for your reply. I am trying to solve a homogenization problem in which I need to define subdomains for 2 different materials. I have installed 2018.1.0 version.

MeshView is only defined in the latest release of dolfin, see for instance: Restricting a quadrature function to a submesh

1 Like

Thanks again. I just checked it out it provides good information about meshview but I still have no idea how to update dolfin to get that feature. By the way, I am using ubuntu virtual machine.

The easiest way to update dolfin is to use docker, then you simply installed docker following: https://www.docker.com/products/docker-desktop
and then run: docker run -ti -p 127.0.0.1:8000:8000 -v $(pwd):/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/dev:latest

A detailed introduction to docker can be Found at: https://fenics-containers.readthedocs.io/en/latest/introduction.html

1 Like

FWIW if you are implementing @bleyerj 's implementation as here then you can use standard dolfin without using the MixedDimensional branch (or equivalently the latest dolfin).

However if you are trying to solve homogenization with lagrange multipliers then I don’t think MixedDimensional branch will do you any good.

In addition to Dokken’s reply for using Docker (which is easy to deal with on individual workstations), you may also find using Singularity better for HPCs. I have a container with MixedDimensionalBranch here

2 Likes