Loading...
Searching...
No Matches
basistags.hh
Go to the documentation of this file.
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BASISTAGS_HH
#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BASISTAGS_HH
#include <type_traits>
#include <dune/common/concept.hh>
namespace Dune {
namespace Functions {
namespace Concept {
struct IndexMergingStrategy
{
template<typename T>
auto require(T&& t) -> decltype(
registerIndexMergingStrategy(t)
);
};
template<typename T>
static constexpr bool isIndexMergingStrategy()
{
return models<Concept::IndexMergingStrategy,T>();
}
template<typename T>
static constexpr bool isIndexMergingStrategy(T&& t)
{
return models<Concept::IndexMergingStrategy,std::decay_t<T>>();
}
} // namespace Concept
namespace BasisFactory {
struct IndexMergingStrategy {};
void registerIndexMergingStrategy(IndexMergingStrategy);
struct FlatLexicographic
: public IndexMergingStrategy
{};
struct FlatInterleaved
: public IndexMergingStrategy
{};
struct BlockedLexicographic
: public IndexMergingStrategy
{};
struct BlockedInterleaved : public IndexMergingStrategy {};
constexpr FlatLexicographic flatLexicographic()
{
return {};
}
constexpr FlatInterleaved flatInterleaved()
{
return {};
}
constexpr BlockedLexicographic blockedLexicographic()
{
return {};
}
constexpr BlockedInterleaved blockedInterleaved()
{
return {};
}
} // end namespace BasisFactory
} // end namespace Functions
} // end namespace Dune
#endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_BASISTAGS_HH
Dune::Functions::BasisFactory::flatLexicographic
constexpr FlatLexicographic flatLexicographic()
Creates a lexicographic merging of direct children without blocking.
Definition basistags.hh:192
Dune::Functions::BasisFactory::blockedInterleaved
constexpr BlockedInterleaved blockedInterleaved()
Creates an interleaved merging of direct children with blocking (i.e. creating blocks at the leaves c...
Definition basistags.hh:222
Dune::Functions::BasisFactory::flatInterleaved
constexpr FlatInterleaved flatInterleaved()
Creates an interleaved merging of direct children without blocking.
Definition basistags.hh:202
Dune::Functions::BasisFactory::blockedLexicographic
constexpr BlockedLexicographic blockedLexicographic()
Creates a lexicographic merging of direct children with blocking (i.e. creating one block per direct ...
Definition basistags.hh:212
Dune
Definition monomialset.hh:19
Dune::Functions
Definition monomialset.hh:19
Dune::Functions::Concept
Definition backends/concepts.hh:17
Dune::Functions::Concept::isIndexMergingStrategy
static constexpr bool isIndexMergingStrategy()
Definition basistags.hh:27
Dune::Functions::BasisFactory::registerIndexMergingStrategy
void registerIndexMergingStrategy(IndexMergingStrategy)
Dune::Functions::Concept::IndexMergingStrategy
Definition basistags.hh:19
Dune::Functions::Concept::IndexMergingStrategy::require
auto require(T &&t) -> decltype(registerIndexMergingStrategy(t))
Dune::Functions::BasisFactory::IndexMergingStrategy
Base class for index merging strategies to simplify detection.
Definition basistags.hh:48
Dune::Functions::BasisFactory::FlatLexicographic
Lexicographic merging of direct children without blocking.
Definition basistags.hh:84
Dune::Functions::BasisFactory::FlatInterleaved
Interleaved merging of direct children without blocking.
Definition basistags.hh:118
Dune::Functions::BasisFactory::BlockedLexicographic
Lexicographic merging of direct children with blocking (i.e. creating one block per direct child).
Definition basistags.hh:152
Dune::Functions::BasisFactory::BlockedInterleaved
Interleaved merging of direct children with blocking (i.e. creating blocks at the leaves containing o...
Definition basistags.hh:184