Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
b13c625e
Commit
b13c625e
authored
Apr 29, 2018
by
Praetorius, Simon
Browse files
decltype bug in DOFVectorView corrected
parent
f8f4faa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/gridfunctions/DOFVectorView.inc.hpp
View file @
b13c625e
...
...
@@ -17,9 +17,6 @@ LocalFunction::operator()(LocalDomain const& x) const
{
using
Node
=
std
::
decay_t
<
decltype
(
node
)
>
;
using
LocalBasisRange
=
typename
LocalFunction
::
template
LocalBasisRange
<
Node
>;
using
MultiIndex
=
typename
LocalIndexSet
::
MultiIndex
;
using
CoefficientBlock
=
typename
std
::
decay
<
decltype
(
std
::
declval
<
Vector
>
()[
std
::
declval
<
MultiIndex
>
()])
>::
type
;
using
RangeBlock
=
std
::
decay_t
<
decltype
(
std
::
declval
<
NodeToRangeEntry
>
()(
node
,
y
))
>
;
auto
&&
fe
=
node
.
finiteElement
();
auto
&&
localBasis
=
fe
.
localBasis
();
...
...
@@ -29,12 +26,14 @@ LocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node
auto
&&
re
=
nodeToRangeEntry
(
node
,
y
);
using
RangeBlock
=
std
::
decay_t
<
decltype
(
re
)
>
;
for
(
std
::
size_t
i
=
0
;
i
<
localBasis
.
size
();
++
i
)
{
auto
&&
multiIndex
=
localIndexSet_
.
index
(
node
.
localIndex
(
i
));
// Get coefficient associated to i-th shape function
auto
&&
c
=
coefficients
[
multiIndex
];
using
CoefficientBlock
=
std
::
decay_t
<
decltype
(
c
)
>
;
// Get value of i-th shape function
auto
&&
v
=
shapeFunctionValues
[
i
];
...
...
@@ -74,9 +73,6 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// TODO: may DOFVectorView::Range to FieldVector type if necessary
using
LocalDerivativeTraits
=
Dune
::
Functions
::
DefaultDerivativeTraits
<
Dune
::
FieldVector
<
double
,
1
>
(
Domain
)
>
;
using
GradientBlock
=
typename
LocalDerivativeTraits
::
Range
;
using
MultiIndex
=
typename
LocalIndexSet
::
MultiIndex
;
using
CoefficientBlock
=
typename
std
::
decay
<
decltype
(
std
::
declval
<
Vector
>
()[
std
::
declval
<
MultiIndex
>
()])
>::
type
;
using
RangeBlock
=
std
::
decay_t
<
decltype
(
std
::
declval
<
NodeToRangeEntry
>
()(
node
,
dy
))
>
;
auto
&&
fe
=
node
.
finiteElement
();
auto
&&
localBasis
=
fe
.
localBasis
();
...
...
@@ -94,12 +90,14 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node
auto
&&
re
=
nodeToRangeEntry
(
node
,
dy
);
using
RangeBlock
=
std
::
decay_t
<
decltype
(
re
)
>
;
for
(
std
::
size_t
i
=
0
;
i
<
localBasis
.
size
();
++
i
)
{
auto
&&
multiIndex
=
localIndexSet_
.
index
(
node
.
localIndex
(
i
));
// Get coefficient associated to i-th shape function
auto
&&
c
=
coefficients
[
multiIndex
];
using
CoefficientBlock
=
std
::
decay_t
<
decltype
(
c
)
>
;
// Get value of i-th transformed reference gradient
auto
&&
grad
=
gradients
[
i
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment