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
8b938919
Commit
8b938919
authored
6 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[convergence-study] let run() return all computed data
parent
9a925837
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/xt/common/convergence-study.cc
+9
-1
9 additions, 1 deletion
dune/xt/common/convergence-study.cc
dune/xt/common/convergence-study.hh
+10
-1
10 additions, 1 deletion
dune/xt/common/convergence-study.hh
with
19 additions
and
2 deletions
dune/xt/common/convergence-study.cc
+
9
−
1
View file @
8b938919
...
...
@@ -146,7 +146,8 @@ void ConvergenceStudy::print_eoc(std::ostream& out,
}
}
// ... print_eoc(...)
void
ConvergenceStudy
::
run
(
const
std
::
vector
<
std
::
string
>&
only_these
,
std
::
ostream
&
out
)
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
map
<
size_t
,
double
>>>
ConvergenceStudy
::
run
(
const
std
::
vector
<
std
::
string
>&
only_these
,
std
::
ostream
&
out
)
{
auto
&
self
=
*
this
;
// check what we want to compute and print
...
...
@@ -340,6 +341,13 @@ void ConvergenceStudy::run(const std::vector<std::string>& only_these, std::ostr
out
<<
delim
;
out
<<
std
::
endl
;
}
// convert data
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
map
<
size_t
,
double
>>>
return_data
;
for
(
const
auto
&
level
:
data
)
for
(
const
auto
&
category
:
level
.
second
)
for
(
const
auto
&
type
:
category
.
second
)
return_data
[
category
.
first
][
type
.
first
][
level
.
first
]
=
type
.
second
;
return
return_data
;
}
// ... run(...)
...
...
This diff is collapsed.
Click to expand it.
dune/xt/common/convergence-study.hh
+
10
−
1
View file @
8b938919
...
...
@@ -138,7 +138,16 @@ protected:
const
std
::
string
&
target_id
)
const
;
public
:
void
run
(
const
std
::
vector
<
std
::
string
>&
only_these
=
{},
std
::
ostream
&
out
=
std
::
cout
);
/**
* \brief Runs the study and displays a table with all targets, norms, estimates and quantities given by the study
* (if only_these is empty) or only those which are contained in only_these (else).
*
* \return data with data[foo][bar][level] where 0 <= level <= num_refinements(), "foo" is one of
* {"target", "norm", "estimate", "quantity"} and bar is one of targets(), norms(), estimates() or
* quantities() (intersected with only_these), respectively.
**/
std
::
map
<
std
::
string
,
std
::
map
<
std
::
string
,
std
::
map
<
size_t
,
double
>>>
run
(
const
std
::
vector
<
std
::
string
>&
only_these
=
{},
std
::
ostream
&
out
=
std
::
cout
);
};
// class ConvergenceStudy
...
...
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