Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Commits
299dce18
Commit
299dce18
authored
5 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
removed dependency on dune-functions interpolate due to breaking changes
parent
cf41b398
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/DataTransferTest.hpp
+4
-4
4 additions, 4 deletions
test/DataTransferTest.hpp
with
4 additions
and
4 deletions
test/DataTransferTest.hpp
+
4
−
4
View file @
299dce18
...
...
@@ -84,22 +84,22 @@ double calcError(Problem const& prob, Fcts const& funcs)
auto
&
globalBasis
=
*
prob
->
globalBasis
();
auto
localView
=
globalBasis
.
localView
();
auto
const
&
sol
=
prob
->
solution
().
coefficients
();
std
::
vector
<
double
>
ref
;
ref
.
resize
(
globalBasis
.
dimension
()
);
auto
ref
=
makeDOFVector
(
globalBasis
,
DataTransferOperation
::
NO_OPERATION
);
int
k
=
0
;
// interpolate given function onto reference vector
for_each_leaf_node
(
localView
.
tree
(),
[
&
](
auto
const
&
node
,
auto
tp
)
{
auto
gf
=
makeGridFunction
(
funcs
[
k
],
globalBasis
.
gridView
());
Dune
::
Functions
::
interpolate
(
globalBasis
,
tp
,
ref
,
gf
);
AMDiS
::
interpolate
(
globalBasis
,
ref
,
gf
,
tp
);
k
++
;
});
// compare the solution with the reference
double
maxError
=
0
;
sol
.
forEach
([
&
](
auto
dof
,
double
coeff
)
{
double
error
=
std
::
abs
(
ref
[
dof
]
-
coeff
);
double
error
=
std
::
abs
(
ref
.
at
(
dof
)
-
coeff
);
maxError
=
std
::
max
(
maxError
,
error
);
});
return
maxError
;
...
...
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