1. 15 Sep, 2021 2 commits
    • Marcus Mohr's avatar
      Small updates after rebase due to changes in FaceDoFFunction · 7726785a
      Marcus Mohr authored
      For completeness we commit also adds a new fule FaceDoFPetsc.hpp.
      Like DGPetsc.hpp it only contains dummy implementations for
      - createVectorFromFunction()
      - createFunctionFromVector()
      7726785a
    • Marcus Mohr's avatar
      Implements PETSc vector <-> function conversion for GenericFunction · 068368aa
      Marcus Mohr authored
      The commit introduces implementations of
      - createVectorFromFunction()
      - createFunctionFromVector()
      for functions of type GenericFunction< PetscReal >.
      
      The two free functions reside in the new file GenericFunctionPetsc.hpp.
      Because of the peculiarities of GenericFunctions these free functions
      are, however, only wrappers that call the corresponding one of the two
      new member functions
      - GenericFunction::toVector()
      - GenericFunction::fromVector()
      As usual these are pure virtual and the actual work happens inside
      the member functions of the FunctionWrapper class.
      
      We extend the FunctionWrapperTest to check compilation and execution
      for various kinds of wrapped functions.
      
      Note that due to instantiation requirements the commit also implements
      - createVectorFromFunction()
      - createFunctionFromVector()
      for functions of type DGFunction. However, these implementations are
      pseudo only and will abort.
      068368aa
  2. 17 Aug, 2021 1 commit
    • Marcus Mohr's avatar
      Simplifies implementation of BlockFunction::getNumberOfLocalDoFs() · f52815a3
      Marcus Mohr authored
      The previous implementation relied on directly using the templated
      free function numberOfLocalDoFs(). In order to call the correct one
      a switch statement was used based on the FunctionKind of the
      corresponding sub-function.
      
      Consequently we would need to update this code piece for every new
      type of sub-function that we want to use.
      
      The new implementation is directly using
      GenericFunction::getNumberOfLocalDoFs().
      f52815a3
  3. 16 Aug, 2021 2 commits
    • Marcus Mohr's avatar
      Changes to typedefs/using statements in some function classes · 2b3d27c9
      Marcus Mohr authored
      The FunctionWrapper class no longer typedefs FunctionType to its
      func_t argument. IMHO that was pretty useless. Instead we get a
      ```
      template< typename VType >
      using WrappedFuncKind =
      typename WrappedFuncType::template FunctionType< VType >;
      ```
      For this to work functions the get wrapped need to provide a templated
      FunctionType. So this is added to
      - DGFunction
      - and all already exisiting children of the BlockFunction class.
      2b3d27c9
    • Marcus Mohr's avatar
      Add numberOfLocalDoFs() for Generic- and BlockFunctions · 11449739
      Marcus Mohr authored
      Our usual tag-based approach to the numberOfLocalDoFs() free functions
      cannot work with Generic- and BlockFunctions, as for those we need an
      object instance of the class to determine that value.
      
      In order to remain somewhat compatible with the current approach this
      commit adds a version of numberOfLocalDoFs() that takes as input a
      function object. For our standard function classes work is then delegated
      to the existing free functions by determining the function tag. For the
      Generic- and BlockFunction we have special implementations that call
      their getNumberOfLocalDoFs() member function.
      
      For the case of the GenericFunction this member function is implemented
      by this commit. As usual it is purely virtual and the actual implementation
      happens in the FunctionWrapper class.
      
      We use this new function variant in the construction of PETScVector for
      testing and as this is where we will need it when converting
      GenericFunction objects to PETScVector objects.
      
      Additionally this commit implements enumerate() without an offset in
      GenericFunction and FunctionWrapper.
      11449739
  4. 09 Aug, 2021 1 commit
    • Marcus Mohr's avatar
      Implements member function BlockFunction::enumerate() · 0f899882
      Marcus Mohr authored
      In order to implement enumerate for the BlockFunction class, we needed
      to also implement enumerate( level, offset ) in the GenericFunction and
      the FunctionWrapper class.
      
      Commit extends BlockFunctionBasicTest to check enumeration works for the
      case of a P2P1TaylorHoodBlockFunction.
      0f899882
  5. 20 May, 2021 8 commits