Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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-gdt
Commits
36633ff3
Commit
36633ff3
authored
9 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[test.stationary-eocstudy] do not return reference norm 1 for estimators
parent
2da1059f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gdt/test/stationary-eocstudy.hh
+19
-17
19 additions, 17 deletions
dune/gdt/test/stationary-eocstudy.hh
with
19 additions
and
17 deletions
dune/gdt/test/stationary-eocstudy.hh
+
19
−
17
View file @
36633ff3
...
...
@@ -81,24 +81,26 @@ public:
virtual
double
norm_reference_solution
(
const
std
::
string
type
)
override
final
{
if
(
is_norm
(
type
))
{
if
(
test_case_
.
provides_exact_solution
())
{
// visualize
if
(
!
visualize_prefix_
.
empty
())
{
test_case_
.
exact_solution
().
visualize
(
test_case_
.
reference_grid_view
(),
visualize_prefix_
+
"_exact_solution"
);
}
return
compute_norm
(
test_case_
.
reference_grid_view
(),
test_case_
.
exact_solution
(),
type
);
}
else
{
compute_reference_solution
();
assert
(
reference_discretization_
);
assert
(
reference_solution_vector_
);
const
ConstDiscreteFunctionType
reference_solution
(
reference_discretization_
->
ansatz_space
(),
*
reference_solution_vector_
,
"reference solution"
);
return
compute_norm
(
test_case_
.
reference_grid_view
(),
reference_solution
,
type
);
if
(
!
is_norm
(
type
))
DUNE_THROW
(
Stuff
::
Exceptions
::
you_are_using_this_wrong
,
"Do not call norm_reference_solution() for an estimator!
\n
"
<<
"type: "
<<
type
<<
"
\n
"
);
if
(
test_case_
.
provides_exact_solution
())
{
// visualize
if
(
!
visualize_prefix_
.
empty
())
{
test_case_
.
exact_solution
().
visualize
(
test_case_
.
reference_grid_view
(),
visualize_prefix_
+
"_exact_solution"
);
}
}
else
return
1.0
;
return
compute_norm
(
test_case_
.
reference_grid_view
(),
test_case_
.
exact_solution
(),
type
);
}
else
{
compute_reference_solution
();
assert
(
reference_discretization_
);
assert
(
reference_solution_vector_
);
const
ConstDiscreteFunctionType
reference_solution
(
reference_discretization_
->
ansatz_space
(),
*
reference_solution_vector_
,
"reference solution"
);
return
compute_norm
(
test_case_
.
reference_grid_view
(),
reference_solution
,
type
);
}
}
// ... norm_reference_solution(...)
virtual
size_t
current_num_DoFs
()
override
final
...
...
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