# Signature of method 'Gamma\_L1.inside()' does not match signature of the base method in class 'SubDomain'

**URL:** <https://fenicsproject.discourse.group/t/signature-of-method-gamma-l1-inside-does-not-match-signature-of-the-base-method-in-class-subdomain/6221>\
**Category:** Uncategorized\
**Created:** [July 12, 2021, 1:02pm UTC](https://fenicsproject.discourse.group/t/signature-of-method-gamma-l1-inside-does-not-match-signature-of-the-base-method-in-class-subdomain/6221 "2021-07-12T13:02:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hatem1264](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hatem1264](https://fenicsproject.discourse.group/u/hatem1264)\
**Post date:** [July 12, 2021, 1:02pm UTC](https://fenicsproject.discourse.group/t/signature-of-method-gamma-l1-inside-does-not-match-signature-of-the-base-method-in-class-subdomain/6221/1 "2021-07-12T13:02:08Z")

</div>

Hello everyone. but I have gotten the following error code , any help please

i want to solve stokes  
 ![stokes](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/1/161da21884b59753e6140fb126b145941ae87c22.png)  
this is the FV:  
 ![2](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/6/6e68a1f1572717e0eb483ac0d379b8242388571c.png)

```auto
mesh3 = UnitSquareMesh(n, n, "crossed")

# Define boundary condition
def boundary(x, on_boundary):
    return on_boundary

# Define boundary subdomains
tol = 1e-14

class Gamma_N(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[0], x1, tol)

class Gamma_R(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[0], x2, tol)

class Gamma_L1(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[1], y1, tol)

class Gamma_L2(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[1], y2, tol)

# Mark boundaries
boundary_markers = MeshFunction('size_t', mesh, mesh.topology().dim() - 1)
boundary_markers.set_all(0)
G_N = Gamma_N()
G_R = Gamma_R()
G_L1 = Gamma_L1()
G_L2 = Gamma_L2()
G_N.mark(boundary_markers, 0)
G_R.mark(boundary_markers, 1)
G_L1.mark(boundary_markers, 2)
G_L2.mark(boundary_markers, 3)
# Redefine boundary integration measure
ds = Measure('ds', domain=mesh, subdomain_data=boundary_markers)

```

Error :Signature of method ‘Gamma\_L1.inside()’ does not match signature of the base method in class ‘SubDomain’

---

<div class="post-metadata">

**Author:** ![kamensky](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kamensky](https://fenicsproject.discourse.group/u/kamensky)\
**Post date:** [July 12, 2021, 1:45pm UTC](https://fenicsproject.discourse.group/t/signature-of-method-gamma-l1-inside-does-not-match-signature-of-the-base-method-in-class-subdomain/6221/2 "2021-07-12T13:45:39Z")

</div>

When I edit the code into a runnable MWE, I can’t reproduce the problem. The following runs without error for me using FEniCS 2019.2:

```python
from dolfin import *

####### Added #######
x1=0
x2=1
y1=0
y2=1
n=10
#####################

mesh3 = UnitSquareMesh(n, n, "crossed")

# Define boundary condition
def boundary(x, on_boundary):
    return on_boundary

# Define boundary subdomains
tol = 1e-14

class Gamma_N(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[0], x1, tol)

class Gamma_R(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[0], x2, tol)

class Gamma_L1(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[1], y1, tol)

class Gamma_L2(SubDomain):
    def inside(self, x, on_boundary):
        return on_boundary and near(x[1], y2, tol)

# Mark boundaries

####### Changed #######
#boundary_markers = MeshFunction('size_t', mesh, mesh.topology().dim() - 1)
boundary_markers = MeshFunction('size_t', mesh3, mesh3.topology().dim() - 1)
#######################

boundary_markers.set_all(0)
G_N = Gamma_N()
G_R = Gamma_R()
G_L1 = Gamma_L1()
G_L2 = Gamma_L2()
G_N.mark(boundary_markers, 0)
G_R.mark(boundary_markers, 1)
G_L1.mark(boundary_markers, 2)
G_L2.mark(boundary_markers, 3)
# Redefine boundary integration measure
####### Changed #######
#ds = Measure('ds', domain=mesh, subdomain_data=boundary_markers)
ds = Measure('ds', domain=mesh3, subdomain_data=boundary_markers)
#######################

```

---

<div class="post-metadata">

**Author:** ![dparsons](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dparsons](https://fenicsproject.discourse.group/u/dparsons)\
**Post date:** [July 12, 2021, 1:50pm UTC](https://fenicsproject.discourse.group/t/signature-of-method-gamma-l1-inside-does-not-match-signature-of-the-base-method-in-class-subdomain/6221/3 "2021-07-12T13:50:52Z")

</div>

See if clearing the cache helps,

```auto
$ dijitso clean

```

or

```auto
$ rm -r ~/.cache/dijitso/

```
