Skip to content

Major redesign of localoperator (and associated classes) file structure

With all the discussions about good locations for helper classes like grid function adapters etc., I think that we should consider a more radical solution. After talking things through with Dominic, I suggest the following new structure:

dune/
  pdelab/
    localoperator/
      [general files like defaultimp.hh, interface.hh]
    problem/
      convectiondiffusion/
        operator/
          convectiondiffusionfem.hh
          convectiondiffusiondg.hh
          ...
        parameter.hh
        function/
          darcy_ccfv.hh
          ...
      convectiondiffusion.hh # includes everything from convectiondiffusion/
      navierstokes/
        ...
      navierstokes.hh
      ...
      common/
        function/
          curl.hh
          ...
      common.hh or util.hh # need a good name here

With this structure the user just includes dune/pdelab/problem/convectiondiffusion.hh and gets everything required to solve convection-diffusion problems.

At the same time, I also support Christian's idea of putting transitional / experimental stuff into a new namespace Dune::PDELab::experimental. This has two advantages over a configure time flag:

  • It's very explicit: Users are always aware of the experimental nature of a class, both when using it and when reading the code at a later time.
  • Stuff can easily be promoted to standard functionality by moving the class into the regular PDELab namespace and replacing the version in the experimental namespace with a deprecated template alias.

What do you think?