Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ag-ohlberger
dune-community
dune-xt
Commits
f7e2b450
Commit
f7e2b450
authored
4 years ago
by
René Fritze
Committed by
René Fritze
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[py|functions] simplify bind_Spe10Model1Function
parent
d3fad21b
No related branches found
No related tags found
1 merge request
!31
Sfinae and stuff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/xt/functions/spe10.hh
+8
-12
8 additions, 12 deletions
python/dune/xt/functions/spe10.hh
with
8 additions
and
12 deletions
python/dune/xt/functions/spe10.hh
+
8
−
12
View file @
f7e2b450
...
@@ -29,11 +29,6 @@ namespace XT {
...
@@ -29,11 +29,6 @@ namespace XT {
namespace
Functions
{
namespace
Functions
{
template
<
class
G
,
size_t
d
,
size_t
r
,
size_t
rC
>
typename
std
::
enable_if
<
Grid
::
is_grid
<
G
>::
value
&&
d
!=
2
,
void
>::
type
bind_Spe10Model1Function
(
pybind11
::
module
&
/*m*/
,
const
std
::
string
&
/*grid_id*/
)
{}
/**
/**
* \note We would like to drop the d template parameter and use either of
* \note We would like to drop the d template parameter and use either of
\code
\code
...
@@ -44,11 +39,7 @@ static const constexpr size_t d = G::dimension;
...
@@ -44,11 +39,7 @@ static const constexpr size_t d = G::dimension;
* everywhere: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
* everywhere: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59937
*/
*/
template
<
class
G
,
size_t
d
,
size_t
r
,
size_t
rC
>
template
<
class
G
,
size_t
d
,
size_t
r
,
size_t
rC
>
typename
std
::
enable_if
<
auto
bind_Spe10Model1Function_2D
(
pybind11
::
module
&
m
,
const
std
::
string
&
grid_id
)
Grid
::
is_grid
<
G
>::
value
&&
d
==
2
,
pybind11
::
class_
<
Spe10
::
Model1Function
<
typename
G
::
template
Codim
<
0
>
::
Entity
,
r
,
rC
,
double
>
,
GridFunctionInterface
<
typename
G
::
template
Codim
<
0
>
::
Entity
,
r
,
rC
,
double
>>>::
type
bind_Spe10Model1Function
(
pybind11
::
module
&
m
,
const
std
::
string
&
grid_id
)
{
{
namespace
py
=
pybind11
;
namespace
py
=
pybind11
;
using
namespace
pybind11
::
literals
;
using
namespace
pybind11
::
literals
;
...
@@ -113,10 +104,15 @@ bind_Spe10Model1Function(pybind11::module& m, const std::string& grid_id)
...
@@ -113,10 +104,15 @@ bind_Spe10Model1Function(pybind11::module& m, const std::string& grid_id)
"min"
_a
=
Spe10
::
internal
::
model1_min_value
,
"min"
_a
=
Spe10
::
internal
::
model1_min_value
,
"max"
_a
=
Spe10
::
internal
::
model1_max_value
,
"max"
_a
=
Spe10
::
internal
::
model1_max_value
,
"name"
_a
=
C
::
static_id
());
"name"
_a
=
C
::
static_id
());
return
c
;
}
// ... bind_Spe10Model1Function(...)
}
// ... bind_Spe10Model1Function(...)
template
<
class
G
,
size_t
d
,
size_t
r
,
size_t
rC
>
void
bind_Spe10Model1Function
(
pybind11
::
module
&
m
,
const
std
::
string
&
grid_id
)
{
if
constexpr
(
Grid
::
is_grid
<
G
>::
value
&&
d
==
2
)
{
bind_Spe10Model1Function_2D
<
G
,
d
,
r
,
rC
>
(
m
,
grid_id
);
}
}
}
// namespace Functions
}
// namespace Functions
}
// namespace XT
}
// namespace XT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment