Skip to content
Snippets Groups Projects
Commit 54e742a8 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

update names and includes

parent 4fa63469
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
#endif
#include "interface.hh"
#include "cg/fem.hh"
#include "cg/dune-fem-wrapper.hh"
#include "cg/pdelab.hh"
......@@ -47,7 +47,7 @@ private:
template <class G, int p, class R, size_t r, size_t rC>
struct SpaceChooser<G, p, R, r, rC, GDT::ChooseSpaceBackend::fem>
{
typedef GDT::Spaces::CG::FemBased<GridLayerType, p, R, r> Type;
typedef GDT::DuneFemCgSpaceWrapper<GridLayerType, p, R, r> Type;
};
template <class G, int p, class R, size_t r, size_t rC>
......
......@@ -3,8 +3,8 @@
// Copyright holders: Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#ifndef DUNE_GDT_SPACES_CG_FEM_HH
#define DUNE_GDT_SPACES_CG_FEM_HH
#ifndef DUNE_GDT_SPACES_CG_DUNE_FEM_WRAPPER_HH
#define DUNE_GDT_SPACES_CG_DUNE_FEM_WRAPPER_HH
#include <memory>
......@@ -19,33 +19,31 @@
#include <dune/gdt/spaces/parallel.hh>
#include "../../mapper/fem.hh"
#include "../../basefunctionset/fem.hh"
#include "../mapper/dune-fem-wrapper.hh"
#include "../basefunctionset/dune-fem-wrapper.hh"
#include "interface.hh"
#include "../constraints.hh"
namespace Dune {
namespace GDT {
namespace Spaces {
namespace CG {
#if HAVE_DUNE_FEM
// forward, to be used in the traits and to allow for specialization
template <class GridPartImp, int polynomialOrder, class RangeFieldImp, size_t rangeDim, size_t rangeDimCols = 1>
class FemBased
class DuneFemCgSpaceWrapper
{
static_assert(Dune::AlwaysFalse<GridPartImp>::value, "Untested for these dimensions!");
};
template <class GridPartImp, int polynomialOrder, class RangeFieldImp, size_t rangeDim, size_t rangeDimCols>
class FemBasedTraits
class DuneFemCgSpaceWrapperTraits
{
public:
typedef FemBased<GridPartImp, polynomialOrder, RangeFieldImp, rangeDim, rangeDimCols> derived_type;
typedef DuneFemCgSpaceWrapper<GridPartImp, polynomialOrder, RangeFieldImp, rangeDim, rangeDimCols> derived_type;
typedef GridPartImp GridPartType;
typedef typename GridPartType::GridViewType GridViewType;
static const int polOrder = polynomialOrder;
......@@ -72,21 +70,21 @@ public:
static const bool needs_grid_view = false;
typedef CommunicationChooser<GridViewType, false> CommunicationChooserType;
typedef typename CommunicationChooserType::Type CommunicatorType;
}; // class FemBasedTraits
}; // class DuneFemCgSpaceWrapperTraits
// untested for the vector-valued case, especially Spaces::CGInterface
template <class GridPartImp, int polynomialOrder, class RangeFieldImp, size_t r>
class FemBased<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>
: public Spaces::CGInterface<FemBasedTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>,
class DuneFemCgSpaceWrapper<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>
: public Spaces::CGInterface<DuneFemCgSpaceWrapperTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>,
GridPartImp::dimension, r, 1>
{
typedef Spaces::CGInterface<FemBasedTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>, GridPartImp::dimension,
r, 1> BaseType;
typedef FemBased<GridPartImp, polynomialOrder, RangeFieldImp, r, 1> ThisType;
typedef Spaces::CGInterface<DuneFemCgSpaceWrapperTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1>,
GridPartImp::dimension, r, 1> BaseType;
typedef DuneFemCgSpaceWrapper<GridPartImp, polynomialOrder, RangeFieldImp, r, 1> ThisType;
public:
typedef FemBasedTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1> Traits;
typedef DuneFemCgSpaceWrapperTraits<GridPartImp, polynomialOrder, RangeFieldImp, r, 1> Traits;
static const int polOrder = Traits::polOrder;
static const size_t dimDomain = BaseType::dimDomain;
......@@ -109,7 +107,7 @@ public:
using typename BaseType::DomainType;
using typename BaseType::BoundaryInfoType;
explicit FemBased(GridPartType gridP)
explicit DuneFemCgSpaceWrapper(GridPartType gridP)
: gridPart_(new GridPartType(gridP))
, gridView_(new GridViewType(gridPart_->gridView()))
, backend_(new BackendType(*gridPart_))
......@@ -118,8 +116,8 @@ public:
{
}
FemBased(const ThisType& other) = default;
explicit FemBased(ThisType&& source) = default;
DuneFemCgSpaceWrapper(const ThisType& other) = default;
explicit DuneFemCgSpaceWrapper(ThisType&& source) = default;
ThisType& operator=(const ThisType& other) = delete;
ThisType& operator=(ThisType&& source) = delete;
......@@ -171,14 +169,14 @@ private:
const std::shared_ptr<const BackendType> backend_;
const std::shared_ptr<const MapperType> mapper_;
mutable std::shared_ptr<CommunicatorType> communicator_;
}; // class FemBased< ..., 1 >
}; // class DuneFemCgSpaceWrapper< ..., 1 >
#else // HAVE_DUNE_FEM
template <class GridPartImp, int polynomialOrder, class RangeFieldImp, size_t rangeDim, size_t rangeDimCols = 1>
class FemBased
class DuneFemCgSpaceWrapper
{
static_assert(Dune::AlwaysFalse<GridPartImp>::value, "You are missing dune-fem!");
};
......@@ -187,9 +185,7 @@ class FemBased
#endif // HAVE_DUNE_FEM
} // namespace CG
} // namespace Spaces
} // namespace GDT
} // namespace Dune
#endif // DUNE_GDT_SPACES_CG_FEM_HH
#endif // DUNE_GDT_SPACES_CG_DUNE_FEM_WRAPPER_HH
......@@ -16,7 +16,7 @@
#include <dune/gdt/operators/laplace.hh>
#include <dune/gdt/operators/l2.hh>
#include <dune/gdt/spaces/tools.hh>
#include <dune/gdt/spaces/cg/fem.hh>
#include <dune/gdt/spaces/cg/dune-fem-wrapper.hh>
#include <dune/gdt/spaces/fv/default.hh>
#include <dune/gdt/spaces/rt/dune-pdelab-wrapper.hh>
......@@ -27,7 +27,7 @@ namespace Test {
/**
* \note This test assumes that DiscreteFunction, Operators::L2Projection, Products::L2, Products::H1Semi,
* Spaces::CG::FemBased, Spaces::RT::PdelabBased and Spaces::FV::Default work correctly.
* DuneFemCgSpaceWrapper, Spaces::RT::PdelabBased and Spaces::FV::Default work correctly.
* \todo This test is rather old and could be refactored in terms of the other operator tests.
* \todo Missing ctor and make_darcy_operator tests.
*/
......@@ -82,7 +82,7 @@ struct DarcyOperatorTest : public ::testing::Test
RangeFieldType expected_result_(const std::string type, const FunctionType& desired_output, const GV& grid_view) const
{
typedef typename SpaceTools::LeafGridPartView<GridType, RangeSpaceType::needs_grid_view>::Type GPV;
if (std::is_base_of<Spaces::CG::FemBased<GPV, 1, RangeFieldType, dimDomain>, RangeSpaceType>::value) {
if (std::is_base_of<DuneFemCgSpaceWrapper<GPV, 1, RangeFieldType, dimDomain>, RangeSpaceType>::value) {
if (type == "l2")
return 2.18e-16;
else if (type == "h1")
......
......@@ -15,7 +15,7 @@
#include <dune/stuff/common/ranges.hh>
#include <dune/stuff/grid/walker.hh>
#include <dune/gdt/spaces/cg/fem.hh>
#include <dune/gdt/spaces/cg/dune-fem-wrapper.hh>
#include <dune/gdt/spaces/cg/pdelab.hh>
#include <dune/gdt/spaces/mapper/interfaces.hh>
#include <dune/gdt/spaces/basefunctionset/interface.hh>
......
......@@ -6,16 +6,16 @@
#ifndef DUNE_GDT_TEST_SPACES_CG_FEM_HH
#define DUNE_GDT_TEST_SPACES_CG_FEM_HH
#include <dune/gdt/spaces/cg/fem.hh>
#include <dune/gdt/spaces/cg/dune-fem-wrapper.hh>
#include <dune/gdt/test/grids.hh>
#if HAVE_DUNE_FEM
#define SPACE_CG_FEM_SGRID(dd, rr, pp) Dune::GDT::Spaces::CG::FemBased<S##dd##dLeafGridPartType, pp, double, rr>
#define SPACE_CG_FEM_SGRID(dd, rr, pp) Dune::GDT::DuneFemCgSpaceWrapper<S##dd##dLeafGridPartType, pp, double, rr>
#define SPACE_CG_FEM_YASPGRID(dd, rr, pp) Dune::GDT::Spaces::CG::FemBased<Yasp##dd##dLeafGridPartType, pp, double, rr>
#define SPACE_CG_FEM_YASPGRID(dd, rr, pp) Dune::GDT::DuneFemCgSpaceWrapper<Yasp##dd##dLeafGridPartType, pp, double, rr>
#define SPACES_CG_FEM(pp) \
SPACE_CG_FEM_SGRID(1, 1, pp) \
......@@ -23,10 +23,10 @@
SPACE_CG_FEM_YASPGRID(2, 1, pp), SPACE_CG_FEM_YASPGRID(3, 1, pp)
#define SPACE_CG_FEM_SGRID_LEVEL(dd, rr, pp) Dune::GDT::Spaces::CG::FemBased<S##dd##dLevelGridPartType, pp, double, rr>
#define SPACE_CG_FEM_SGRID_LEVEL(dd, rr, pp) Dune::GDT::DuneFemCgSpaceWrapper<S##dd##dLevelGridPartType, pp, double, rr>
#define SPACE_CG_FEM_YASPGRID_LEVEL(dd, rr, pp) \
Dune::GDT::Spaces::CG::FemBased<Yasp##dd##dLevelGridPartType, pp, double, rr>
Dune::GDT::DuneFemCgSpaceWrapper<Yasp##dd##dLevelGridPartType, pp, double, rr>
#define SPACES_CG_FEM_LEVEL(pp) \
SPACE_CG_FEM_SGRID_LEVEL(1, 1, pp) \
......@@ -38,10 +38,10 @@
#define SPACE_CG_FEM_ALUCONFORMGRID(dd, rr, pp) \
Dune::GDT::Spaces::CG::FemBased<AluConform##dd##dLeafGridPartType, pp, double, rr>
Dune::GDT::DuneFemCgSpaceWrapper<AluConform##dd##dLeafGridPartType, pp, double, rr>
#define SPACE_CG_FEM_ALUCUBEGRID(dd, rr, pp) \
Dune::GDT::Spaces::CG::FemBased<AluCube##dd##dLeafGridPartType, pp, double, rr>
Dune::GDT::DuneFemCgSpaceWrapper<AluCube##dd##dLeafGridPartType, pp, double, rr>
#define SPACES_CG_FEM_ALUGRID(pp) \
SPACE_CG_FEM_ALUCONFORMGRID(2, 1, pp) \
......@@ -49,10 +49,10 @@
#define SPACE_CG_FEM_ALUCONFORMGRID_LEVEL(dd, rr, pp) \
Dune::GDT::Spaces::CG::FemBased<AluConform##dd##dLevelGridPartType, pp, double, rr>
Dune::GDT::DuneFemCgSpaceWrapper<AluConform##dd##dLevelGridPartType, pp, double, rr>
#define SPACE_CG_FEM_ALUCUBEGRID_LEVEL(dd, rr, pp) \
Dune::GDT::Spaces::CG::FemBased<AluCube##dd##dLevelGridPartType, pp, double, rr>
Dune::GDT::DuneFemCgSpaceWrapper<AluCube##dd##dLevelGridPartType, pp, double, rr>
#define SPACES_CG_FEM_ALUGRID_LEVEL(pp) \
SPACE_CG_FEM_ALUCONFORMGRID_LEVEL(2, 1, pp) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment