Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
b2135fc3
Commit
b2135fc3
authored
Mar 08, 2021
by
niklas.baumgarten
Browse files
sample adaption
parent
cf722a00
Changes
2
Hide whitespace changes
Inline
Side-by-side
mlmc/src/basics/Sample.cpp
View file @
b2135fc3
#include
"Sample.hpp"
int
SampleID
::
MGLevel
()
const
{
return
level
.
MGLevel
(
coarse
);
}
std
::
string
SampleID
::
Str
()
const
{
return
"l:"
+
std
::
to_string
(
level
.
fine
)
+
"-m:"
+
std
::
to_string
(
number
)
+
...
...
mlmc/src/basics/Sample.hpp
View file @
b2135fc3
...
...
@@ -26,6 +26,8 @@ struct SampleID {
int
MGLevel
()
const
;
int
l
()
const
{
return
level
.
ActualLevel
(
coarse
);
};
std
::
string
Str
()
const
;
};
...
...
@@ -40,9 +42,9 @@ struct SampleSolution {
Vector
U
;
SampleSolution
(
MatrixGraph
*
solMGraph
,
SampleSolution
(
IDiscretization
*
disc
,
const
std
::
string
&
name
=
"U"
)
:
U
(
Vector
((
*
solMGraph
))),
U
(
Vector
((
*
disc
))),
name
(
name
)
{
Init
();
}
...
...
@@ -58,7 +60,15 @@ struct SampleSolution {
SampleSolution
(
MatrixGraphs
*
solMGraphs
,
const
SampleID
&
id
,
const
std
::
string
&
name
=
"U"
)
:
id
(
id
),
U
(
Vector
((
*
solMGraphs
)[
id
.
MGLevel
()])),
id
(
id
),
U
(
Vector
((
*
solMGraphs
)[
id
.
l
()
-
id
.
level
.
pLevel
])),
name
(
name
)
{
Init
();
}
SampleSolution
(
IDiscretization
*
disc
,
const
SampleID
&
id
,
const
std
::
string
&
name
=
"U"
)
:
id
(
id
),
U
(
Vector
(
*
disc
,
id
.
l
())),
name
(
name
)
{
Init
();
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment