Skip to content
Snippets Groups Projects
Commit 5da059a9 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[spaces.fv] remove ProductFVInterface

parent 74f8fc14
No related branches found
No related tags found
No related merge requests found
......@@ -222,7 +222,7 @@ public:
void evaluate(const DomainType& xx, RangeType& ret) const override final
{
assert(this->is_a_valid_point(xx));
if (!(GDT::is_fv_space<SpaceType>::value || GDT::is_product_fv_space<SpaceType>::value)) {
if (!GDT::is_fv_space<SpaceType>::value) {
std::fill(ret.begin(), ret.end(), RangeFieldType(0));
std::vector<RangeType> tmpBaseValues(base_->size(), RangeType(0));
assert(localVector_->size() == tmpBaseValues.size());
......@@ -239,7 +239,7 @@ public:
virtual void jacobian(const DomainType& xx, JacobianRangeType& ret) const override final
{
assert(this->is_a_valid_point(xx));
if (!(GDT::is_fv_space<SpaceType>::value || GDT::is_product_fv_space<SpaceType>::value)) {
if (!GDT::is_fv_space<SpaceType>::value) {
std::fill(ret.begin(), ret.end(), RangeFieldType(0));
std::vector<JacobianRangeType> tmpBaseJacobianValues(base_->size(), JacobianRangeType(0));
assert(localVector_->size() == tmpBaseJacobianValues.size());
......
......@@ -65,7 +65,7 @@ public:
template <class E, class D, size_t d, class R, size_t r, size_t rC, class RangeSpaceType, class VectorType>
typename std::enable_if<StaticCheck<E, D, d, R, r, rC, RangeSpaceType, VectorType>::value
&& !(is_fv_space<RangeSpaceType>::value || is_product_fv_space<RangeSpaceType>::value),
&& !is_fv_space<RangeSpaceType>::value,
void>::type
apply(const Stuff::LocalizableFunctionInterface<E, D, d, R, r, rC>& source,
LocalDiscreteFunction<RangeSpaceType, VectorType>& local_range) const
......@@ -106,7 +106,7 @@ public:
// TODO: do not use product evaluation to avoid a lot of multiplications with 0
template <class E, class D, size_t d, class R, size_t r, size_t rC, class RangeSpaceType, class VectorType>
typename std::enable_if<StaticCheck<E, D, d, R, r, rC, RangeSpaceType, VectorType>::value
&& (is_fv_space<RangeSpaceType>::value || is_product_fv_space<RangeSpaceType>::value),
&& is_fv_space<RangeSpaceType>::value,
void>::type
apply(const Stuff::LocalizableFunctionInterface<E, D, d, R, r, rC>& source,
LocalDiscreteFunction<RangeSpaceType, VectorType>& local_range) const
......
......@@ -69,7 +69,7 @@ class Default<GridViewImp, RangeFieldImp, rangeDim, 1>
rangeDim, 1> BaseType;
public:
using typename BaseType::Traits;
typedef typename internal::DefaultTraits<GridViewImp, RangeFieldImp, rangeDim, 1> Traits;
using typename BaseType::GridViewType;
using typename BaseType::BackendType;
using typename BaseType::MapperType;
......
......@@ -55,9 +55,8 @@ template <class GridViewImp, class RangeFieldImp, size_t rangeDim>
class DefaultProduct<GridViewImp, RangeFieldImp, rangeDim, 1>
: public Dune::GDT::Spaces::FVInterface<internal::DefaultProductTraits<GridViewImp, RangeFieldImp, rangeDim, 1>,
GridViewImp::dimension, rangeDim, 1>,
public Dune::GDT::Spaces::ProductFVInterface<internal::DefaultProductTraits<GridViewImp, RangeFieldImp, rangeDim,
1>,
GridViewImp::dimension, rangeDim, 1>
public Dune::GDT::ProductSpaceInterface<internal::DefaultProductTraits<GridViewImp, RangeFieldImp, rangeDim, 1>,
GridViewImp::dimension, rangeDim, 1>
{
typedef DefaultProduct<GridViewImp, RangeFieldImp, rangeDim, 1> ThisType;
typedef Dune::GDT::Spaces::FVInterface<internal::DefaultProductTraits<GridViewImp, RangeFieldImp, rangeDim, 1>,
......@@ -65,7 +64,7 @@ class DefaultProduct<GridViewImp, RangeFieldImp, rangeDim, 1>
typedef Default<GridViewImp, RangeFieldImp, rangeDim, 1> DefaultFVSpaceType;
public:
using typename BaseType::Traits;
typedef typename internal::DefaultProductTraits<GridViewImp, RangeFieldImp, rangeDim, 1> Traits;
using typename BaseType::GridViewType;
using typename BaseType::BackendType;
using typename BaseType::MapperType;
......
......@@ -15,13 +15,12 @@ namespace GDT {
namespace Spaces {
template <class ImpTraits, size_t domainDim, size_t rangeDim, size_t rangeDimCols = 1>
class FVInterface : public SpaceInterface<ImpTraits, domainDim, rangeDim, rangeDimCols>
template <class Traits, size_t domainDim, size_t rangeDim, size_t rangeDimCols = 1>
class FVInterface : public SpaceInterface<Traits, domainDim, rangeDim, rangeDimCols>
{
typedef SpaceInterface<ImpTraits, domainDim, rangeDim, rangeDimCols> BaseType;
typedef SpaceInterface<Traits, domainDim, rangeDim, rangeDimCols> BaseType;
public:
typedef ImpTraits Traits;
using typename BaseType::EntityType;
using typename BaseType::PatternType;
......@@ -44,12 +43,6 @@ public:
}; // class FVInterface
template <class ImpTraits, size_t domainDim, size_t rangeDim, size_t rangeDimCols = 1>
class ProductFVInterface : public ProductSpaceInterface<ImpTraits, domainDim, rangeDim, rangeDimCols>
{
}; // class ProductFVInterface
} // namespace Spaces
namespace internal {
......@@ -80,18 +73,6 @@ struct is_fv_space<S, false> : public std::false_type
{
};
template <class S, bool candidate = internal::is_fv_space_helper<S>::is_candidate>
struct is_product_fv_space
: public std::is_base_of<Spaces::ProductFVInterface<typename S::Traits, S::dimDomain, S::dimRange, S::dimRangeCols>,
S>
{
};
template <class S>
struct is_product_fv_space<S, false> : public std::false_type
{
};
} // namespace GDT
} // namespace Dune
......
......@@ -472,11 +472,10 @@ public:
* as a vector, i.e. rangeDimCols has to be specified as 1 and the dimensions have to be added up in rangeDim. In the
* example, this gives rangeDim = 5;
* */
template <class ImpTraits, size_t domainDim, size_t rangeDim, size_t rangeDimCols = 1>
template <class Traits, size_t domainDim, size_t rangeDim, size_t rangeDimCols = 1>
class ProductSpaceInterface
{
public:
typedef ImpTraits Traits;
static_assert(std::is_base_of<IsProductMapper, typename Traits::MapperType>::value,
"MapperType has to be derived from ProductMapperInterface");
typedef typename Traits::SpaceTupleType SpaceTupleType;
......
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