19 Oct
                
                    2016
                
            
            
                19 Oct
                
                '16
                
            
            
            
        
    
                1:57 a.m.
            
        Another way to do this (which may be more convenient if the internal border doesn't have such a simple analytic expression) is to define the subdomains in Gmsh as 'Physical Surfaces'. These can then be accessed using the cell_subset method of the Mesh and passed to the subset keyword-argument of interpolate. I attach a minimal example which seems to do the same thing as the FEniCS piecewise.py. I gleaned this technique from https://github.com/firedrakeproject/firedrake/pull/791/files .