1. 04 Apr, 2021 6 commits
  2. 01 Apr, 2021 31 commits
    • Marcus Mohr's avatar
      Merge branch 'mohr/issue142-mc2' into 'master' · 417ab141
      Marcus Mohr authored
      New VectorFunction classes and hierarchy (updated version)
      See merge request !406
    • Marcus Mohr's avatar
      Updates walberla submodule · 544473e6
      Marcus Mohr authored
      Changing back Walberla to commit
    • Marcus Mohr's avatar
      Adds override specifier to apply() in some operator classes. · cc181212
      Marcus Mohr authored
      Commit adds 'override final' (as we have a flat hierarchy :) to some
      apply() methods in some children of the Operator base class.
      This should quell the warnings by Clang that we had silenced by adding
      -Wno-inconsistent-missing-override. Removing this option from CMakeLists.txt
      We will see whether this is enough, or whether other Clang version than
      my 8.0 have other children as well where they see issues.
    • Marcus Mohr's avatar
      Fixes template parameter error in P1ScalarToP1VectorOperator · c89c02c8
      Marcus Mohr authored
      The operator needs to inherit from
      Operator< P1Function< real_t >, P1VectorFunction< real_t > >
      and not from
      Operator< P1VectorFunction< real_t >, P1Function< real_t > >
      as first argument represents source and second destination.
    • Marcus Mohr's avatar
      Fixes two TrilinosTests · 9855cb28
      Marcus Mohr authored
      The TrilinosSparseMatrixTest and TrilinosVectorTest use 2D meshes, so
      we should not use a 3D VectorFunction. Fixed it.
    • Marcus Mohr's avatar
    • Marcus Mohr's avatar
      Fixes an unused variable warning · 98f3b27d
      Marcus Mohr authored
    • Marcus Mohr's avatar
    • Marcus Mohr's avatar
      Updates method interfaces of P1Transport class · f74fc8e3
      Marcus Mohr authored
       - The interfaces are changed to accept a P1VectorFunction instead
         of three individual P1Functions for the velocity field.
       - Updates tests/apps making use of class, these are
         - AlgebraicUpwind3DCircularConvectionTest
         - StokesCubeTransport
         - 06_FullAppPlumeInCube/Plume
    • Marcus Mohr's avatar
    • Marcus Mohr's avatar
      Fixes design flaw in CSFVectorFunction class · b3556b84
      Marcus Mohr authored
       - So far the template argument to the class was assumed to be the
         type of the scalar component functions. That was problematic, since
         then in the method interfaces we only can have CSFVectorFunction<T>.
         While that will work (compiler can do the upcasting), it get's
         problematic, when the argument should be an std::vector, since at
         the caller we'd like to pass a vector of e.g. pointers to
         P2VectorFunctions, which is different from a vectgor of pointers to
         CSFVectorFunction<P2Function<valueType> >. Other more intricate
         problems also arise.
       - Thus, we swith the class to do CRTP, i.e. the template argument is
         renamed to VectorFunctionType and supposed represent the child
         function itself.
       - In order to be able to determine the type of the component functions
         we extend the FunctionTraits for VectorFunctions to typedef them.
         See the remark on the problem with bottom up inheritance of typedefs
         with CRTP in FunctionTraits.hpp
    • Marcus Mohr's avatar
      Extends VectorFunctionBasicTest · 940af2e8
      Marcus Mohr authored
       - We now do a quick check on the associated FunctionTrait by
         querying and comparing the typename.
       - Also commit removes left over FunctionTrait for P1VectorFunction_AltKind
    • Marcus Mohr's avatar
      Implements vector versions of P1toP2Conversion and P2toP1Conversion. · 9418560e
      Marcus Mohr authored
      The new versions just loop over the component functions and delegate.
      Get used in MultigridStudies and DefectCorrectionStokes.
    • Marcus Mohr's avatar
      Adds alternative P2ProjectNormalOperator::assembleLocalMatrix() · 93788879
      Marcus Mohr authored
      The new variant takes as argument a P2VectorFunction and internally
      handles the 2D vs 3D distinction, then delegates work to the original
      assembleLocalMatrix() method.
    • Marcus Mohr's avatar
      Fixes some 2D/3D component access issues · 8f18e7ed
      Marcus Mohr authored
      We encounter many cases where the code attempts to access the 3rd
      component of a VectorFunction in 2D setting. Leads to failed assertions
      of the following form in DEBUG mode:
      [0][ERROR   ]------(0.043 sec) Assertion failed!
      [0]                            File:       /import/caprica-data/mohr/Terra/terraneo/Redesign/HyTeG/src/hyteg/functions/CSFVectorFunction.hpp:68
      [0]                            Expression: idx < compFunc_.size()
      [0]                            Values:                  idx = 2
      [0]                                        compFunc_.size() = 2
      Commit fixes this in several tests and methods/functions by either
      introducing dimension based loops or appropriate method/function
      calls that handle dimensionality internally.
    • Marcus Mohr's avatar
      Changes assertions in CFSVectorFunction::interpolate · 20b3c480
      Marcus Mohr authored
      We now check that the std::vector of std::function's is large enough.
      If it is larger than the number of component functions, we only log
      a warning and ignore these excess functions.
    • Marcus Mohr's avatar
      Fixes enumerate() in Stokes/TaylorHood functions · 2c001af6
      Marcus Mohr authored
      There was a problem with P2P1TaylorHoodFunction::enumerate().
      We use a loop over the dimension of the P2VectorFunction to avoid
      accessing non-existing 3rd component in 2D setting.
      Same issue and fix in P1StokesFunction and P2P2StokesFunction.
    • Marcus Mohr's avatar
      Fixes problem with ProjectNormalTest · 0982ffa0
      Marcus Mohr authored
      The issue was that the test failed for the two 2D sub-cases, as there
      was access to the non-existing 3rd component function of the velocity
      field of the Stokes function.
      * In P1ProjectNormalOperator this came from calling project() with a
        P1VectorFunction argument. The latter delegated the call to the
        project() version expecting three scalar functions as arguments. By
        doing so uvw[2] was accessed.
        Fixed this by implementing that project() variant directly.
      * In P2ProjectNormalOperator the problem is even more complicated.
        Basic issue was the same as for the P1 operator. However, additionally
        the existing implementation for the scalar arguments, delegates to
        implementations in the VertexDoF and EdgeDoF function spaces.
        However, we currently cannot ask a P2VectorFunction to give us its
        P1VectorFunction of EdgeDoFVectorFunction splitting.
        Implemented an rather ugly fix that just uses uvw[0] instead of uvw[2]
        in the 2D case when delegating to the scalar function argument project().
    • Marcus Mohr's avatar
      Starts replacing P[12]VectorFunction be their new AltKind implemtations · dafaae34
      Marcus Mohr authored
      Lots of replacing .u, .v, .w by [0], [1], [2]; some code reduction by
      combining scalar interpolate() and assign() calls.
      We have a design problem with assign() and add(). While the compiler can
      implicitely upcast a P2VectorFunction< vType > to a
      CFSVectorFunction< P2Function< vType > > in an initialiser list, it cannot
      do the same with the entries of an std::vector. This leads to problems
      e.g. in some other classes.
      Probably we can solve this be switching to true CRTP using
      CFSVectorFunction< P2VectorFunction< vType > >.
      Also we might run into problems with the enumerator stuff. But we will
    • Marcus Mohr's avatar
      Adds set/getBoundaryCondition method to CFSVectorFunction · 62804fc7
      Marcus Mohr authored
      additionally fixes a small bug in swap method of same class.
    • Marcus Mohr's avatar
      Adds P2VectorFunction_AltKind for testing · b0c3f033
      Marcus Mohr authored
      * requires small workaround in VTKOutput
      * small update to P1VectorFunction_AltKind
    • Dominik Thoennes's avatar
      disable inconsistent-missing-override waring in clang · 682fb068
      Dominik Thoennes authored and Marcus Mohr's avatar Marcus Mohr committed
    • Marcus Mohr's avatar
      Renames apply() to project() in projection operators · ff99d197
      Marcus Mohr authored
      While there is good reason to write operator.apply the interface of
      the method in the projection operators is different from the standard
      apply() in all other operators. With the new virtual apply() in the
      Operator base class this leads to shadowing.
    • Marcus Mohr's avatar
      Fixes placement of a const specifier · 9e15848f
      Marcus Mohr authored
    • Marcus Mohr's avatar
      Adds draft of a generic VectorToVectorOperator · bc863ac5
      Marcus Mohr authored
      The operator maps one VectorFunction onto another one. Both can potentially
      be of different type. The operator assumes that the function spaces are
      simply extensions of scalar spaces that that we have a VectorComponentType
      Currently the class only implements a constructor, an apply() method and
      a setSubOperator() method. The latter is used in the factory approach,
      see below.
      We also implement
      * a generic P1VectorOperator(); this one is initially empty and can be
        filled using setSubOperator(); which we do in the sample factory
         implementation generateP1VectorLaplaceOperator()
      * as an alternative we also derive by inheritance a
      Both approaches are used in the vecOpDemo app to apply the 2D Laplacian
      to two vector valued functions interpolated into the P1 and P2 spaces.
      Note that we needed to add a virtual apply() function in the Operator
      class for this to work.
    • Marcus Mohr's avatar
      Fixes templatisation approach for CFSVectorFunction class · 45f48b2f
      Marcus Mohr authored
      As with the Function class we now use a FunctionType template parameter,
      so that our demo implementation P1VectorFunction_AltKind now inherits
      in this fashion
      class P1VectorFunction_AltKind :
             public CSFVectorFunction< P1Function< ValueType > >
      Basic test VectorFunctionBasicTest runs through (after some other
      minor fixes and adding a quick work-around implementation for adding
      the new class to a VTKOutput object).
    • Marcus Mohr's avatar
      Makes private stuff visible in Doxygen · 6dcf6f3f
      Marcus Mohr authored
    • Marcus Mohr's avatar
    • Marcus Mohr's avatar
      Converts P1VectorFunction::filter() into a free function · 79168c57
      Marcus Mohr authored
      The new function is templated so that we can re-use it once we update
      also the P2VectorFunction class. To avoid name clashes it lives in the
      new vectorFunctionTools namespace. P1VectorFunction uses the free
      function now.
    • Marcus Mohr's avatar
      Extends and renames P2VectorFunctionTest · a893ec56
      Marcus Mohr authored
      Commit extends the test to run also basic testing for P1VectorFunctions
      and renames it to VectorFunctionBasicTest.
    • Dominik Thoennes's avatar
      Merge branch 'thoennes/fix-clang-9-problem' into 'master' · 4ca11cba
      Dominik Thoennes authored
      clang 9 produces INVALID floating point operations with vectorized divisions
      See merge request !405
  3. 31 Mar, 2021 3 commits