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
0e58ee31
Commit
0e58ee31
authored
4 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
[grid.integrals] fix compilation with icc
parent
0ac79729
No related branches found
No related tags found
1 merge request
!41
Fix compilation with icc, several other changes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/xt/grid/integrals.hh
+16
-17
16 additions, 17 deletions
dune/xt/grid/integrals.hh
with
16 additions
and
17 deletions
dune/xt/grid/integrals.hh
+
16
−
17
View file @
0e58ee31
...
...
@@ -18,6 +18,8 @@
#include
<dune/geometry/quadraturerules.hh>
#include
<dune/grid/common/entity.hh>
#include
<dune/xt/grid/type_traits.hh>
namespace
Dune
{
namespace
XT
{
namespace
Grid
{
...
...
@@ -26,20 +28,17 @@ namespace Grid {
/**
* \brief Computes the integral of a given function over a given element [most general variant].
*/
// We would have liked to use
// std::function<F(const FieldVector<typename Entity<0, d, G, E>::Geometry::ctype, d>& point_in_reference_element)>
// (note the d), which did not compile for generic lambdas. Thus we use
// G::dimension
// instead.
template
<
class
RangeType
,
int
d
,
class
G
,
template
<
int
,
int
,
class
>
class
E
>
RangeType
element_integral
(
const
Entity
<
0
,
d
,
G
,
E
>&
element
,
std
::
function
<
RangeType
(
const
FieldVector
<
typename
Entity
<
0
,
d
,
G
,
E
>::
Geometry
::
ctype
,
G
::
dimension
>&
point_in_reference_element
)
>
function
,
const
int
polynomial_order_of_the_function
)
template
<
class
RangeType
,
class
Element
>
RangeType
element_integral
(
const
Element
&
element
,
std
::
function
<
RangeType
(
const
FieldVector
<
typename
Element
::
Geometry
::
ctype
,
Element
::
dimension
>&
point_in_reference_element
)
>
function
,
const
int
polynomial_order_of_the_function
)
{
static_assert
(
XT
::
Grid
::
is_entity
<
Element
>::
value
,
"element has to be a codim-0 grid entity"
);
static_assert
(
Element
::
codimension
==
0
,
"element has to be a codim-0 grid entity"
);
RangeType
result
(
0.
),
local_result
;
for
(
auto
&&
quadrature_point
:
QuadratureRules
<
typename
E
ntity
<
0
,
d
,
G
,
E
>
::
Geometry
::
ctype
,
G
::
dimension
>::
rule
(
for
(
auto
&&
quadrature_point
:
QuadratureRules
<
typename
E
lement
::
Geometry
::
ctype
,
Element
::
dimension
>::
rule
(
element
.
type
(),
polynomial_order_of_the_function
))
{
const
auto
point_in_reference_element
=
quadrature_point
.
position
();
const
auto
quadrature_weight
=
quadrature_point
.
weight
();
...
...
@@ -55,13 +54,13 @@ element_integral(const Entity<0, d, G, E>& element,
/**
* \brief Computes the integral of a given function over a given element [uses double as FieldType].
*/
template
<
int
d
,
class
G
,
template
<
int
,
int
,
class
>
class
E
>
double
element_integral
(
const
E
ntity
<
0
,
d
,
G
,
E
>
&
element
,
std
::
function
<
double
(
const
FieldVector
<
typename
E
ntity
<
0
,
d
,
G
,
E
>
::
Geometry
::
ctype
,
G
::
dimension
>&
point_in_reference_element
)
>
function
,
template
<
class
E
lement
>
double
element_integral
(
const
E
lement
&
element
,
std
::
function
<
double
(
const
FieldVector
<
typename
E
lement
::
Geometry
::
ctype
,
Element
::
dimension
>&
point_in_reference_element
)
>
function
,
const
int
polynomial_order_of_the_function
)
{
return
element_integral
<
double
>
(
element
,
function
,
polynomial_order_of_the_function
);
return
element_integral
<
double
,
Element
>
(
element
,
function
,
polynomial_order_of_the_function
);
}
...
...
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