...
 
Commits (10)
......@@ -17,9 +17,20 @@ and this project does not adhere to [Semantic Versioning](http://semver.org/).
* ASTI: we now have one canonical definition of the test space inner
product. Previously we used different definitions depending on
whether we used normalized or unnormalized spaces.
* Rename all PQk... spaces to Lagrange... .
This adds the new spaces `LagrangeDGRefinedDGBasis`,
`LagrangeSubsampledDGBasis`, `LagrangeDGSubsampledDGBasis`,
`LagrangeFaceBasis` and `LagrangeTraceBasis`.
The old PQk... names of these spaces remain as deprecated typedefs.
* Large parts of our code have been refactored for readability and
to better adhere to modern C++ practices.
### Deprecated
* The spaces `PQkDGRefinedDGBasis`, `PQkSubsampledDGNodalBasis`,
`PQkDGSubsampledDGNodalBasis`, `PQkFaceNodalBasis` and
`PQkTraceNodalBasis` have been deprecated. All those spaces are
now available under a name starting with Lagrange... .
### Removed
* `bindLocalIndexSets` and `getLocalIndexSets` have been removed,
as IndexSets have been deprecated in dune-functions 2.6.
......
......@@ -38,7 +38,7 @@ namespace Functions {
class LagrangeDGPreBasis;
template<typename GV, int level, int k, class MI>
class PQkDGRefinedDGPreBasis;
class LagrangeDGRefinedDGPreBasis;
template<typename GV, int k, class MI>
class BernsteinPreBasis;
......@@ -50,13 +50,13 @@ namespace Functions {
class BernsteinDGRefinedDGPreBasis;
template<typename GV, int s, int k, class MI>
class PQkDGSubsampledDGPreBasis;
class LagrangeDGSubsampledDGPreBasis;
template<typename GV, int s, int k, class MI>
class PQkSubsampledDGPreBasis;
class LagrangeSubsampledDGPreBasis;
template<typename GV, int k, class MI>
class PQkTracePreBasis;
class LagrangeTracePreBasis;
template<typename TestspaceCoefficientMatrix, std::size_t testIndex,
class MI>
......@@ -144,7 +144,7 @@ struct is_DGRefinedFiniteElement : std::false_type {};
#ifndef DOXYGEN
template<typename GV, int level, int k>
struct is_DGRefinedFiniteElement<Functions::RefinedGlobalBasis<
Functions::PQkDGRefinedDGPreBasis
Functions::LagrangeDGRefinedDGPreBasis
<GV, level, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::true_type {};
......@@ -186,7 +186,7 @@ struct levelOfFE : std::integral_constant<int, 0> {};
#ifndef DOXYGEN
template<class GV, int level, int k>
struct levelOfFE<Functions::RefinedGlobalBasis<
Functions::PQkDGRefinedDGPreBasis
Functions::LagrangeDGRefinedDGPreBasis
<GV, level, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::integral_constant<int, level> {};
......@@ -218,13 +218,13 @@ struct is_SubsampledFiniteElement : std::false_type {};
#ifndef DOXYGEN
template<class GV, int s, int k>
struct is_SubsampledFiniteElement<Functions::DefaultGlobalBasis<
Functions::PQkDGSubsampledDGPreBasis
Functions::LagrangeDGSubsampledDGPreBasis
<GV, s, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::true_type {};
template<class GV, int s, int k>
struct is_SubsampledFiniteElement<Functions::DefaultGlobalBasis<
Functions::PQkSubsampledDGPreBasis
Functions::LagrangeSubsampledDGPreBasis
<GV, s, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::true_type {};
......@@ -244,13 +244,13 @@ struct numberOfSamples : std::integral_constant<int, 1> {};
#ifndef DOXYGEN
template<class GV, int s, int k>
struct numberOfSamples<Functions::DefaultGlobalBasis<
Functions::PQkDGSubsampledDGPreBasis
Functions::LagrangeDGSubsampledDGPreBasis
<GV, s, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::integral_constant<int, s> {};
template<class GV, int s, int k>
struct numberOfSamples<Functions::DefaultGlobalBasis<
Functions::PQkSubsampledDGPreBasis
Functions::LagrangeSubsampledDGPreBasis
<GV, s, k, Functions::FlatMultiIndex<std::size_t> > > >
: std::integral_constant<int, s> {};
......@@ -311,10 +311,10 @@ struct changeGridView<Functions::LagrangeDGPreBasis<GV, k, MI>, GridView>
};
template<typename GV, int level, int k, class MI, class GridView>
struct changeGridView<Functions::PQkDGRefinedDGPreBasis<GV, level, k, MI>,
struct changeGridView<Functions::LagrangeDGRefinedDGPreBasis<GV, level, k, MI>,
GridView>
{
typedef Functions::PQkDGRefinedDGPreBasis<GridView, level, k, MI> type;
typedef Functions::LagrangeDGRefinedDGPreBasis<GridView, level, k, MI> type;
};
template<typename GV, int k, class MI, class GridView>
......@@ -339,24 +339,24 @@ struct changeGridView<Functions::BernsteinDGRefinedDGPreBasis
};
template<typename GV, int s, int k, class MI, class GridView>
struct changeGridView<Functions::PQkDGSubsampledDGPreBasis<GV, s, k, MI>,
struct changeGridView<Functions::LagrangeDGSubsampledDGPreBasis<GV, s, k, MI>,
GridView>
{
typedef Functions::PQkDGSubsampledDGPreBasis<GridView, s, k, MI> type;
typedef Functions::LagrangeDGSubsampledDGPreBasis<GridView, s, k, MI> type;
};
template<typename GV, int s, int k, class MI, class GridView>
struct changeGridView<Functions::PQkSubsampledDGPreBasis<GV, s, k, MI>,
struct changeGridView<Functions::LagrangeSubsampledDGPreBasis<GV, s, k, MI>,
GridView>
{
typedef Functions::PQkSubsampledDGPreBasis<GridView, s, k, MI> type;
typedef Functions::LagrangeSubsampledDGPreBasis<GridView, s, k, MI> type;
};
template<typename GV, int k, class MI, class GridView>
struct changeGridView<Functions::PQkTracePreBasis<GV, k, MI>,
struct changeGridView<Functions::LagrangeTracePreBasis<GV, k, MI>,
GridView>
{
typedef Functions::PQkTracePreBasis<GridView, k, MI> type;
typedef Functions::LagrangeTracePreBasis<GridView, k, MI> type;
};
template<typename TestspaceCoefficientMatrix, std::size_t testIndex,
......
......@@ -10,11 +10,16 @@ install(FILES
constrainedlocalview.hh
hangingnodebernsteinp2basis.hh
hangingnodelagrangep2basis.hh
lagrangedgrefineddgbasis.hh
lagrangedgsubsampleddgbasis.hh
lagrangefacebasis.hh
lagrangesubsampleddgbasis.hh
lagrangetracebasis.hh
normalizedbasisadaptor.hh
normalizedrefinedbasisadaptor.hh
optimaltestbasis.hh
pqkdgrefineddgnodalbasis.hh
pqksubsampleddgbasis.hh
pqkdgsubsampleddgbasis.hh
pqkfacenodalbasis.hh
pqksubsampleddgbasis.hh
pqktracenodalbasis.hh
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -100,9 +100,9 @@ struct RefinementConstants : public EmptyPreBasisConstants {};
template<class GV, int level, int k>
struct RefinementConstants
< DefaultGlobalBasis<
PQkDGRefinedDGPreBasis
LagrangeDGRefinedDGPreBasis
<GV, level, k, FlatMultiIndex<std::size_t> > > >
: public PQkDGRefinedDGPreBasis<GV, level, k, FlatMultiIndex<std::size_t> >
: public LagrangeDGRefinedDGPreBasis<GV, level, k, FlatMultiIndex<std::size_t> >
::RefinementConstants {};
template<typename TestspaceCoefficientMatrix, std::size_t testIndex, class MI>
......
......@@ -15,9 +15,9 @@ dune_add_test(SOURCES normalizedbasistest.cc
dune_add_test(SOURCES normalizedrefinedbasistest.cc
LINK_LIBRARIES ${DUNE_LIBS})
dune_add_test(SOURCES pqkdgrefineddgbasistest.cc
dune_add_test(SOURCES lagrangedgrefineddgbasistest.cc
LINK_LIBRARIES ${DUNE_LIBS})
dune_add_test(SOURCES pqktracenodalbasistest.cc
dune_add_test(SOURCES lagrangetracebasistest.cc
LINK_LIBRARIES dunecommon dunegeometry
LABELS nompi)
......@@ -10,7 +10,7 @@
#include <dune/grid/yaspgrid.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include "refinedbasistest.hh"
......@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
typedef GridType::LeafGridView GridView;
const GridView gridView = grid.leafGridView();
Functions::PQkDGRefinedDGBasis<GridView, 1, 2> dgrefinedbasis(gridView);
Functions::LagrangeDGRefinedDGBasis<GridView, 1, 2> dgrefinedbasis(gridView);
TestSuite t = testRefinedScalarBasis(dgrefinedbasis);
return t.exit();
......
......@@ -10,7 +10,7 @@
#include <dune/grid/yaspgrid.hh>
#include <dune/functions/functionspacebases/pqktracenodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangetracebasis.hh>
#include "unrefinedbasistest.hh"
......@@ -33,16 +33,16 @@ int main(int argc, char* argv[])
TestSuite t;
PQkTraceNodalBasis<GridView, 1> pq1Basis(gridView);
LagrangeTraceBasis<GridView, 1> pq1Basis(gridView);
t.subTest(testScalarBasis(pq1Basis));
PQkTraceNodalBasis<GridView, 2> pq2Basis(gridView);
LagrangeTraceBasis<GridView, 2> pq2Basis(gridView);
t.subTest(testScalarBasis(pq2Basis));
PQkTraceNodalBasis<GridView, 3> pq3Basis(gridView);
LagrangeTraceBasis<GridView, 3> pq3Basis(gridView);
t.subTest(testScalarBasis(pq3Basis));
PQkTraceNodalBasis<GridView, 4> pq4Basis(gridView);
LagrangeTraceBasis<GridView, 4> pq4Basis(gridView);
t.subTest(testScalarBasis(pq4Basis));
return t.exit();
......
......@@ -16,7 +16,7 @@
#include <dune/grid/yaspgrid.hh>
#include <dune/functions/functionspacebases/normalizedrefinedbasisadaptor.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include "refinedbasistest.hh"
......@@ -58,7 +58,7 @@ int main(int argc, char* argv[])
const GridView gridView = grid.leafGridView();
TestSuite t
= testNormedAdaptorOn<PQkDGRefinedDGBasis<GridView, 1, 2>>(gridView);
= testNormedAdaptorOn<LagrangeDGRefinedDGBasis<GridView, 1, 2>>(gridView);
return t.exit();
}
......@@ -27,10 +27,8 @@
#include <dune/istl/umfpack.hh>
#include <dune/functions/functionspacebases/lagrangebasis.hh>
#include <dune/functions/functionspacebases/pqktracenodalbasis.hh>
#include <dune/functions/functionspacebases/pqkfacenodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include <dune/dpg/bilinearformfactory.hh>
#include <dune/dpg/innerproductfactory.hh>
......@@ -103,7 +101,7 @@ int main(int argc, char** argv)
// v search space
#if LEVEL_SEARCH>0
using FEBasisTest
= Functions::PQkDGRefinedDGBasis<GridView, LEVEL_SEARCH, K_SEARCH>;
= Functions::LagrangeDGRefinedDGBasis<GridView, LEVEL_SEARCH, K_SEARCH>;
#else
using FEBasisTest
= Functions::LagrangeDGBasis<GridView, K_SEARCH>;
......@@ -112,8 +110,8 @@ int main(int argc, char** argv)
// enriched test space for error estimation
using FEBasisTest_aposteriori
= Functions::PQkDGRefinedDGBasis<GridView, LEVEL_APOSTERIORI,
K_APOSTERIORI>;
= Functions::LagrangeDGRefinedDGBasis<GridView, LEVEL_APOSTERIORI,
K_APOSTERIORI>;
auto testSpaces_aposteriori
= make_space_tuple<FEBasisTest_aposteriori>(gridView);
......
......@@ -25,7 +25,7 @@
#include <dune/functions/functionspacebases/hangingnodelagrangep2basis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include <dune/dpg/functions/analyticgridviewfunction.hh>
#include <dune/dpg/boundarytools.hh>
......@@ -122,12 +122,12 @@ int main()
auto solutionSpaces
= make_space_tuple<FEBasisInterior, FEBasisTrace>(gridView);
using FEBasisTest = Functions::PQkDGRefinedDGBasis<GridView, 1, 3>;
using FEBasisTest = Functions::LagrangeDGRefinedDGBasis<GridView, 1, 3>;
auto testSpaces = make_space_tuple<FEBasisTest>(gridView);
// enriched test space for error estimation
using FEBasisTest_aposteriori
= Functions::PQkDGRefinedDGBasis<GridView, 1, 4>;
= Functions::LagrangeDGRefinedDGBasis<GridView, 1, 4>;
auto testSpaces_aposteriori
= make_space_tuple<FEBasisTest_aposteriori>(gridView);
......
......@@ -24,10 +24,8 @@
#include <dune/istl/umfpack.hh>
#include <dune/functions/functionspacebases/lagrangebasis.hh>
#include <dune/functions/functionspacebases/pqktracenodalbasis.hh>
#include <dune/functions/functionspacebases/pqkfacenodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include <dune/dpg/bilinearformfactory.hh>
#include <dune/dpg/innerproductfactory.hh>
......@@ -87,7 +85,7 @@ int main(int argc, char** argv)
= make_space_tuple<FEBasisInterior, FEBasisTrace>(gridView);
// v search space
typedef Functions::PQkDGRefinedDGBasis<GridView, 1, 3> FEBasisTest;
typedef Functions::LagrangeDGRefinedDGBasis<GridView, 1, 3> FEBasisTest;
//typedef Functions::LagrangeDGBasis<GridView, 3> FEBasisTest;
auto testSpaces = make_space_tuple<FEBasisTest>(gridView);
......
......@@ -19,7 +19,7 @@
#include <dune/istl/umfpack.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqktracenodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangetracebasis.hh>
#include <dune/dpg/bilinearformfactory.hh>
#include <dune/dpg/innerproductfactory.hh>
......@@ -54,7 +54,7 @@ int main()
// Choose finite element spaces
/////////////////////////////////////////////////////////
typedef Functions::PQkTraceNodalBasis<GridView, 2> FEBasisTrace; // u^
typedef Functions::LagrangeTraceBasis<GridView, 2> FEBasisTrace; // u^
typedef Functions::LagrangeDGBasis<GridView, 1> FEBasisInterior; // u
typedef Functions::LagrangeDGBasis<GridView, 4> FEBasisTest; // v
......
......@@ -25,7 +25,6 @@
#include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>
#include <dune/functions/functionspacebases/lagrangebasis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/dpg/boundarytools.hh>
#include <dune/dpg/dpg_system_assembler.hh>
......
......@@ -28,7 +28,7 @@
#include <dune/functions/functionspacebases/hangingnodebernsteinp2basis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include <dune/dpg/bilinearformfactory.hh>
#include <dune/dpg/innerproductfactory.hh>
......@@ -113,16 +113,16 @@ int main(int argc, char** argv)
= make_space_tuple<FEBasisInterior, FEBasisTrace>(gridView);
// v search space
using FEBasisTest = Functions::PQkDGRefinedDGBasis<GridView, 1, 3>;
using FEBasisTest = Functions::LagrangeDGRefinedDGBasis<GridView, 1, 3>;
auto testSpaces = make_space_tuple<FEBasisTest>(gridView);
// enriched test space for error estimation
using FEBasisTest_aposteriori
= Functions::PQkDGRefinedDGBasis<GridView, 1, 4>;
= Functions::LagrangeDGRefinedDGBasis<GridView, 1, 4>;
auto testSpaces_aposteriori
= make_space_tuple<FEBasisTest_aposteriori>(gridView);
FieldVector<double, dim> beta
const FieldVector<double, dim> beta
= {std::cos(boost::math::constants::pi<double>()/8),
std::sin(boost::math::constants::pi<double>()/8)};
const double c = 0;
......
......@@ -27,7 +27,7 @@
#include <dune/functions/functionspacebases/lagrangebasis.hh>
#include <dune/functions/functionspacebases/lagrangedgbasis.hh>
#include <dune/functions/functionspacebases/pqkdgrefineddgnodalbasis.hh>
#include <dune/functions/functionspacebases/lagrangedgrefineddgbasis.hh>
#include <dune/dpg/bilinearformfactory.hh>
#include <dune/dpg/innerproductfactory.hh>
......@@ -119,7 +119,7 @@ int main(int argc, char** argv)
#if LEVEL_SEARCH>0
using FEBasisTest
= Functions::PQkDGRefinedDGBasis<GridView, LEVEL_SEARCH, K_SEARCH>;
= Functions::LagrangeDGRefinedDGBasis<GridView, LEVEL_SEARCH, K_SEARCH>;
#else
using FEBasisTest
= Functions::LagrangeDGBasis<GridView, K_SEARCH>;
......