From 97a0811a8dcc20f119aeaad5c53952e332701ef9 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Sat, 18 Aug 2018 11:53:47 +0200
Subject: [PATCH] Replace PQkNodalBasis by LagrangeBasis

It's the same code, but the old name is deprecated.
---
 dune/gfe/cosseratenergystiffness.hh |  4 ++--
 dune/gfe/cosseratvtkwriter.hh       |  6 +++---
 dune/gfe/parallel/p2mapper.hh       |  6 +++---
 dune/gfe/riemanniantrsolver.cc      |  6 +++---
 dune/gfe/riemanniantrsolver.hh      | 12 +++++++-----
 5 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh
index 1ff24720..bcc3b950 100644
--- a/dune/gfe/cosseratenergystiffness.hh
+++ b/dune/gfe/cosseratenergystiffness.hh
@@ -45,10 +45,10 @@ public:
 
 /** \brief Specialize for scalar bases, here we cannot call tree().child() */
 template <class GridView, int order, std::size_t i>
-class LocalFiniteElementFactory<Dune::Functions::PQkNodalBasis<GridView,order>,i>
+class LocalFiniteElementFactory<Dune::Functions::LagrangeBasis<GridView,order>,i>
 {
 public:
-  static auto get(const typename Dune::Functions::PQkNodalBasis<GridView,order>::LocalView& localView,
+  static auto get(const typename Dune::Functions::LagrangeBasis<GridView,order>::LocalView& localView,
            std::integral_constant<std::size_t, i> iType)
     -> decltype(localView.tree().finiteElement())
   {
diff --git a/dune/gfe/cosseratvtkwriter.hh b/dune/gfe/cosseratvtkwriter.hh
index 463a4f7d..0f1a9d88 100644
--- a/dune/gfe/cosseratvtkwriter.hh
+++ b/dune/gfe/cosseratvtkwriter.hh
@@ -4,7 +4,7 @@
 #include <dune/grid/io/file/vtk/vtkwriter.hh>
 #include <dune/grid/io/file/vtk/pvtuwriter.hh>
 
-#include <dune/functions/functionspacebases/pqknodalbasis.hh>
+#include <dune/functions/functionspacebases/lagrangebasis.hh>
 #include <dune/functions/functionspacebases/interpolate.hh>
 #include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>
 
@@ -129,7 +129,7 @@ public:
         //  Downsample 3rd-order functions onto a P2-space.  That's all VTK can visualize today.
         if (order>=3)
         {
-          typedef Dune::Functions::PQkNodalBasis<typename GridType::LeafGridView,2> P2Basis;
+          typedef Dune::Functions::LagrangeBasis<typename GridType::LeafGridView,2> P2Basis;
           P2Basis p2Basis(gridView);
 
         std::vector<RigidBodyMotion<double,3> > downsampledConfig;
@@ -338,7 +338,7 @@ public:
 
         std::vector<RealTuple<double,3> > displacementConfiguration = deformationConfiguration;
         typedef typename GridType::LeafGridView GridView;
-        typedef Dune::Functions::PQkNodalBasis<GridView,2> P2DeformationBasis;
+        typedef Dune::Functions::LagrangeBasis<GridView,2> P2DeformationBasis;
         P2DeformationBasis p2DeformationBasis(gridView);
 
         if (order == 3)
diff --git a/dune/gfe/parallel/p2mapper.hh b/dune/gfe/parallel/p2mapper.hh
index 8c299fbd..3f9384d3 100644
--- a/dune/gfe/parallel/p2mapper.hh
+++ b/dune/gfe/parallel/p2mapper.hh
@@ -6,7 +6,7 @@
 #include <dune/geometry/type.hh>
 #include <dune/common/typetraits.hh>
 
-#include <dune/functions/functionspacebases/pqknodalbasis.hh>
+#include <dune/functions/functionspacebases/lagrangebasis.hh>
 
 /** \brief Mimic a dune-grid mapper for a P2 space, using the dune-functions dof ordering of such a space
  */
@@ -16,7 +16,7 @@ class P2BasisMapper
   typedef typename GridView::Grid::template Codim<0>::Entity Element;
 public:
 
-  typedef typename Dune::Functions::PQkNodalBasis<GridView,2>::MultiIndex::value_type Index;
+  typedef typename Dune::Functions::LagrangeBasis<GridView,2>::MultiIndex::value_type Index;
 
   P2BasisMapper(const GridView& gridView)
   : p2Basis_(gridView)
@@ -58,7 +58,7 @@ public:
     return false;
   }
 
-  Dune::Functions::PQkNodalBasis<GridView,2> p2Basis_;
+  Dune::Functions::LagrangeBasis<GridView,2> p2Basis_;
 };
 
 #endif
diff --git a/dune/gfe/riemanniantrsolver.cc b/dune/gfe/riemanniantrsolver.cc
index 67bb76e3..0c3958e0 100644
--- a/dune/gfe/riemanniantrsolver.cc
+++ b/dune/gfe/riemanniantrsolver.cc
@@ -194,7 +194,7 @@ setup(const GridType& grid,
     //  On the lower grid levels a hierarchy of P1/Q1 spaces is used again.
     ////////////////////////////////////////////////////////////////////////
 
-    bool isP1Basis = std::is_same<Basis,Dune::Functions::PQkNodalBasis<typename Basis::GridView,1> >::value;
+    bool isP1Basis = std::is_same<Basis,Dune::Functions::LagrangeBasis<typename Basis::GridView,1> >::value;
 
     if (isP1Basis)
       mmgStep->mgTransfer_.resize(numLevels-1);
@@ -205,11 +205,11 @@ setup(const GridType& grid,
     if (not isP1Basis)
     {
         typedef typename TruncatedCompressedMGTransfer<CorrectionType>::TransferOperatorType TransferOperatorType;
-        DuneFunctionsBasis<Dune::Functions::PQkNodalBasis<typename GridType::LeafGridView,1> > p1Basis(grid_->leafGridView());
+        DuneFunctionsBasis<Dune::Functions::LagrangeBasis<typename GridType::LeafGridView,1> > p1Basis(grid_->leafGridView());
 
         TransferOperatorType pkToP1TransferMatrix;
         assembleBasisInterpolationMatrix<TransferOperatorType,
-                                         DuneFunctionsBasis<Dune::Functions::PQkNodalBasis<typename GridType::LeafGridView,1> >,
+                                         DuneFunctionsBasis<Dune::Functions::LagrangeBasis<typename GridType::LeafGridView,1> >,
                                          FufemBasis>(pkToP1TransferMatrix,p1Basis,basis);
 #if HAVE_MPI
         // If we are on more than 1 processors, join all local transfer matrices on rank 0,
diff --git a/dune/gfe/riemanniantrsolver.hh b/dune/gfe/riemanniantrsolver.hh
index d9e34eab..add3d56d 100644
--- a/dune/gfe/riemanniantrsolver.hh
+++ b/dune/gfe/riemanniantrsolver.hh
@@ -8,6 +8,8 @@
 #include <dune/istl/bcrsmatrix.hh>
 #include <dune/istl/bvector.hh>
 
+#include <dune/functions/functionspacebases/lagrangebasis.hh>
+
 #include <dune/solvers/common/boxconstraint.hh>
 #include <dune/solvers/norms/h1seminorm.hh>
 #include <dune/solvers/solvers/iterativesolver.hh>
@@ -26,9 +28,9 @@ template <typename GridView, typename Basis>
 struct MapperFactory
 {};
 
-/** \brief Specialization for PQ1NodalBasis */
+/** \brief Specialization for LagrangeBasis<1> */
 template <typename GridView>
-struct MapperFactory<GridView, Dune::Functions::PQkNodalBasis<GridView,1> >
+struct MapperFactory<GridView, Dune::Functions::LagrangeBasis<GridView,1> >
 {
     typedef Dune::GlobalP1Mapper<GridView> GlobalMapper;
     typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> LocalMapper;
@@ -48,7 +50,7 @@ struct MapperFactory<GridView, Dune::Functions::Periodic1DPQ1NodalBasis<GridView
 };
 
 template <typename GridView>
-struct MapperFactory<GridView, Dune::Functions::PQkNodalBasis<GridView,2> >
+struct MapperFactory<GridView, Dune::Functions::LagrangeBasis<GridView,2> >
 {
     typedef Dune::GlobalP2Mapper<GridView> GlobalMapper;
     typedef P2BasisMapper<GridView> LocalMapper;
@@ -58,9 +60,9 @@ struct MapperFactory<GridView, Dune::Functions::PQkNodalBasis<GridView,2> >
     }
 };
 
-/** \brief Specialization for PQ3NodalBasis */
+/** \brief Specialization for LagrangeBasis<3> */
 template <typename GridView>
-struct MapperFactory<GridView, Dune::Functions::PQkNodalBasis<GridView,3> >
+struct MapperFactory<GridView, Dune::Functions::LagrangeBasis<GridView,3> >
 {
     // Error: we don't currently have a global P3 mapper
 };
-- 
GitLab