Docstring for SubDomain.mark is wrong

Issue #504 resolved
Douglas Arnold created an issue

[Part of] the docstring for SubDomain.mark is

"""
* mark\ (sub_domains, sub_domain, check_midpoint=true)

  Set subdomain markers (std::size_t) for given subdomain number

  *Arguments*
      sub_domains (:py:class:`MeshFunction`)
          The subdomain markers.
      sub_domain (int)
          The subdomain number.
      check_midpoint (bool)
          Flag for whether midpoint of cell should be checked (default).
"""

indicating that check_midpoint is a keyword parameter, e.g.,

sbd.mark(meshfun, 1, check_midpoint=False)

But this does not work, while

sbd.mark(meshfun, 1, False)

does. Easy solution is to adjust the docstring. Better, and also easy, solution would be to make check_midpoint a keyword parameter.

Comments (5)

  1. Chris Richardson

    Looks easy, but docstring is generated automatically from C++ header, and SWIG can't support keyword arguments for default values in overloaded functions. Will probably require some SWIG hacking to fix.

  2. Log in to comment