Deprecated MeshGeometry::size() used heavily throught the library

Issue #594 resolved
Jan Blechta created an issue

Annoying symptom is that test stdout is flooded by

Process 0: *** -------------------------------------------------------------------------
*** Warning: MeshGeometry::size() has been deprecated in DOLFIN version 1.7.0.
*** It will be removed from version 1.8.0.
*** Use MeshGeometry::num_vertices() or MeshGeometry::num_points() instead
*** -------------------------------------------------------------------------

Comments (14)

  1. Anders Logg (Chalmers)

    One could use the Event class for this. It has been around for a long time in DOLFIN but is not in much use. However, need to make sure that printing that message many times does not affect performance.

  2. Prof Garth Wells

    When DOLFIN is built in developer mode, it should should throw a runtime error when the deprecation function is called. Why isn't this being picked up by the tests?

  3. Jan Blechta reporter

    Seems to me that default is OFF in CMakeLists.txt regardless of build type

    option(DOLFIN_DEPRECATION_ERROR "Turn deprecation warnings into errors." OFF)

  4. Prof Garth Wells

    Just checked, and we had -DDOLFIN_DEPRECATION_ERROR in the old cmake.local file, but towards the end someone switched it off there.

    Someone should build DOLFIN and run the tests with -DDOLFIN_DEPRECATION_ERROR=true to clean up all the calls to deprecated code.

  5. Jan Blechta reporter

    BTW, I like cmake.local - it's obvious what does it do, compared to fenics-magic-install.sh.

  6. Jan Blechta reporter

    I know the place also git checkout `git rev-list -1 HEAD -- cmake.local`^ -- cmake.local :)

  7. Chris Richardson

    @blechta - now you are just showing off your git mastery... you could just add cmake.local back to the repo and see if anyone notices.

  8. Log in to comment