Skip to content

Adapt to changes in 2.8 and added some new features

Andreas Dedner requested to merge feature/femdg into master

This MR contains the following changes:

  • fixed some issues with methods removed after the 2.7 release
  • improved the construction of grid functions. This change reduces the compile time of grids modules by 30%
  • added the option to construct grid functions by providing short C++ code snippets, e.g.,
code = """
#include <cmath>
template <class GridView> auto myFunction(double a) {
  return [a](const auto& en,const auto& x) -> auto {
    auto y = en.geometry().global(x);
    return std::sin(a*M_PI*(y[0]+y[1]));
  };
}"""
gf = gridView.function("myFunction",io.StringIO(code),2,)
gf.plot()
  • also added a method to import classes but this still needs additional features added

Merge request reports