Loading [MathJax]/extensions/tex2jax.js
ug4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
util_domain_algebra_dependent.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2015: G-CSC, Goethe University Frankfurt
3 * Author: Martin Rupp
4 *
5 * This file is part of UG4.
6 *
7 * UG4 is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License version 3 (as published by the
9 * Free Software Foundation) with the following additional attribution
10 * requirements (according to LGPL/GPL v3 §7):
11 *
12 * (1) The following notice must be displayed in the Appropriate Legal Notices
13 * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14 *
15 * (2) The following notice must be displayed at a prominent place in the
16 * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17 *
18 * (3) The following bibliography is recommended for citation and must be
19 * preserved in all covered files:
20 * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21 * parallel geometric multigrid solver on hierarchically distributed grids.
22 * Computing and visualization in science 16, 4 (2013), 151-164"
23 * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24 * flexible software system for simulating pde based models on high performance
25 * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26 *
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 */
32
33
34#ifndef UTIL_DOMAIN_ALGEBRA_DEPENDENT_H
35#define UTIL_DOMAIN_ALGEBRA_DEPENDENT_H
36
39
40namespace ug{
41namespace bridge{
42
45
46template < typename Functionality,
47 typename DomainList = CompileDomainList,
48 typename AlgebraList = CompileAlgebraList>
50{
52 {
53 static const bool domainIsEmpty = boost::mpl::empty<DomainList>::value;
54 typename boost::mpl::if_c<domainIsEmpty, RegEnd, RegNextDomain>::type (reg,grp);
55 }
56 struct RegEnd{ RegEnd(Registry& reg, std::string grp){} };
57
58 template <typename CurrAlgebraList>
60 {
61 RegNextDomainAlgebra(Registry& reg, std::string grp)
62 {
63 typedef typename boost::mpl::front<DomainList>::type DomainType;
64 typedef typename boost::mpl::front<CurrAlgebraList>::type AlgebraType;
65 typedef typename boost::mpl::pop_front<CurrAlgebraList>::type NextAlgebraList;
66
67 Functionality::template DomainAlgebra<DomainType, AlgebraType>(reg,grp);
69 }
70 };
71
72 template <typename CurrAlgebraList>
74 {
75 RegAlgebra(Registry& reg, std::string grp)
76 {
77 static const bool algebraIsEmpty = boost::mpl::empty<CurrAlgebraList>::value;
78 typename boost::mpl::if_c<algebraIsEmpty, RegEnd, RegNextDomainAlgebra<CurrAlgebraList> >::type (reg,grp);
79 }
80 };
81
83 {
84 RegNextDomain(Registry& reg, std::string grp)
85 {
86 typedef typename boost::mpl::pop_front<DomainList>::type NextDomainList;
87
90 }
91 };
92};
93
94
95template < typename Functionality, typename AlgebraList = CompileAlgebraList>
97{
99 {
100#ifdef UG_DIM_1
102#endif
103 }
104};
105
106template < typename Functionality, typename AlgebraList = CompileAlgebraList>
108{
110 {
111#ifdef UG_DIM_2
113#endif
114 }
115};
116
117
118template < typename Functionality, typename AlgebraList = CompileAlgebraList>
120{
122 {
123#ifdef UG_DIM_3
125#endif
126 }
127};
128
129template < typename Functionality, typename AlgebraList = CompileAlgebraList>
138
139// end group bridge
141
142}
143}
144#endif /* UTIL_DOMAIN_ALGEBRA_DEPENDENT_H */
145
class describing the type of an algebra
Definition algebra_type.h:49
Registry for functions and classes that are exported to scripts and visualizations.
Definition registry.h:138
boost::mpl::list<> CompileDomainList
Definition util_domain_dependent.h:76
boost::mpl::list< end_boost_list > CompileAlgebraList
Definition util_algebra_dependent.h:98
the ug namespace
Definition util_domain_algebra_dependent.h:97
RegisterDomain1dAlgebraDependent(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:98
Definition util_domain_algebra_dependent.h:131
RegisterDomain2d3dAlgebraDependent(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:132
Definition util_domain_algebra_dependent.h:108
RegisterDomain2dAlgebraDependent(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:109
Definition util_domain_algebra_dependent.h:120
RegisterDomain3dAlgebraDependent(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:121
Definition util_domain_algebra_dependent.h:74
RegAlgebra(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:75
Definition util_domain_algebra_dependent.h:56
RegEnd(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:56
Definition util_domain_algebra_dependent.h:60
RegNextDomainAlgebra(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:61
Definition util_domain_algebra_dependent.h:83
RegNextDomain(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:84
Definition util_domain_algebra_dependent.h:50
RegisterDomainAlgebraDependent(Registry &reg, std::string grp)
Definition util_domain_algebra_dependent.h:51