Dune::Copasi
Loading...
Searching...
No Matches
grid.hh
Go to the documentation of this file.
1#ifndef DUNE_COPASI_CONCEPTS_GRID_HH
2#define DUNE_COPASI_CONCEPTS_GRID_HH
3
4#include <dune-copasi-config.hh>
5
6#include <dune/grid/concepts/grid.hh>
7
11namespace Dune::Copasi::Concept {
12
13using namespace Dune::Concept;
14
15template<class E, class IS>
17 Dune::Concept::Entity<E> && Dune::Concept::IndexSet<IS> && requires(const E entity, const IS is) {
18 {
19 is.index(entity)
20 } -> std::same_as<typename IS::IndexType>;
21 };
22
30template<class G>
32 Dune::Concept::Grid<G> && std::same_as<G, typename G::MultiDomainGrid::SubDomainGrid> &&
33 requires(const G cg, typename G::SubDomainIndex sub_domain) {
34 {
35 cg.multiDomainGrid()
36 } -> std::convertible_to<const typename G::MultiDomainGrid&>;
37 {
38 cg.domain()
39 } -> std::convertible_to<typename G::SubDomainIndex>;
40 // Some other things missing but this is enough for now
41 };
42
50template<class G>
52 SubDomainGrid<typename G::SubDomainGrid> && Dune::Concept::Grid<G> &&
53 Dune::Concept::Grid<typename G::HostGrid> &&
54 requires(const G cg, typename G::SubDomainIndex sub_domain) {
55 {
56 G::maxSubDomainIndexIsStatic()
57 } -> std::convertible_to<bool>;
58 typename G::LeafSubDomainInterfaceIterator;
59 typename G::LevelSubDomainInterfaceIterator;
60 typename G::LeafAllSubDomainInterfacesIterator;
61 typename G::LevelAllSubDomainInterfacesIterator;
62 {
63 cg.maxSubDomainIndex()
64 } -> std::convertible_to<typename G::SubDomainIndex>;
65 {
66 cg.subDomain(sub_domain)
67 } -> std::convertible_to<const typename G::SubDomainGrid&>;
68 {
69 cg.maxAssignedSubDomainIndex()
70 } -> std::convertible_to<typename G::SubDomainIndex>;
71 {
72 cg.supportLevelIndexSets()
73 } -> std::convertible_to<bool>;
74 requires requires(G g, const typename G::template Codim<0>::Entity& entity) {
75 g.startSubDomainMarking();
76 g.preUpdateSubDomains();
77 g.updateSubDomains();
78 g.postUpdateSubDomains();
79 g.addToSubDomain(sub_domain, entity);
80 g.removeFromSubDomain(sub_domain, entity);
81 g.assignToSubDomain(sub_domain, entity);
82 g.removeFromAllSubDomains(entity);
83 };
84 };
85
86} // namespace Dune::Copasi::Concept
87
88#endif // DUNE_COPASI_CONCEPTS_GRID_HH
Concept for dune multidomain grids.
Definition grid.hh:51
Concept for dune subdomain grids of multidomain grids.
Definition grid.hh:31
Definition compartment_tree.hh:12
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24