common.deprecation arguments

Issue #260 resolved
Yusuke Sakamoto created an issue

When I call MeshFunction('uint', mesh, 2) with uint like an example in DolfinBook, I get the following error:

   2368     """
-> 2369   return _common.deprecation(*args)
   2370 
   2371 def log(*args):

TypeError: deprecation expected 4 arguments, got 3

The error comes from the warning that uint is deprecated and I should use size_t instead. But the real problem is that in mesh.py file, MeshFunction calls common.deprecation with only 3 arguments. According to this document, version_remove argument is missing.

I also looked at DOLFIN/dolfin/swig/mesh/post.i in Bitbucket and found that all the common.deprecation functions are called with only 3 arguments.

Comments (3)

  1. Yusuke Sakamoto reporter

    Here is a minimal example.

    from dolfin import *
    
    nx = 4;  ny = 6
    mesh = UnitSquare(nx, ny)
    
    # Define a MeshFunction over two subdomains
    subdomains = MeshFunction('uint', mesh, 2)
    
  2. Log in to comment