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
07904c18
Commit
07904c18
authored
May 10, 2021
by
niklas.baumgarten
Browse files
removed empiric measures
parent
3c2b5e5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
mlmc/src/montecarlo/MonteCarlo.cpp
View file @
07904c18
...
...
@@ -6,15 +6,6 @@ void MonteCarlo::Method() {
vout
(
1
)
<<
"Start with: "
<<
aggregate
;
method
();
aggregate
.
UpdateParallel
();
vout
(
2
)
<<
sums
;
avgs
.
Update
(
sums
,
aggregate
.
ctr
.
M
);
vars
.
Update
(
avgs
);
kurtosis
.
Update
(
avgs
,
vars
);
aggregate
.
SVarQ
=
vars
.
Q
;
aggregate
.
SVarY
=
vars
.
Y
;
vout
(
1
)
<<
"End with: "
<<
aggregate
;
mout
.
EndBlock
(
verbose
==
0
,
"Took"
);
}
...
...
@@ -22,14 +13,12 @@ void MonteCarlo::Method() {
void
MonteCarlo
::
method
()
{
SampleSolution
cSolution
(
pdeSolver
->
GetDisc
(),
cId
);
SampleSolution
fSolution
(
pdeSolver
->
GetDisc
(),
fId
);
while
(
aggregate
.
ctr
.
dMcomm
!=
0
)
{
computeSampleSolution
(
aggregate
.
index
(),
fId
,
fSolution
);
if
(
onlyFine
)
cSolution
.
Init
();
else
computeSampleSolution
(
aggregate
.
index
(),
cId
,
cSolution
);
aggregate
.
Update
(
fSolution
,
cSolution
);
sums
.
Update
(
fSolution
,
cSolution
);
// todo rmv
vout
(
3
)
<<
sums
;
// todo rmv
}
}
...
...
mlmc/src/montecarlo/MonteCarlo.hpp
View file @
07904c18
...
...
@@ -14,31 +14,23 @@ protected:
int
plotting
=
0
;
int
level
;
bool
onlyFine
;
bool
parallel
;
int
level
;
Meshes
*
meshes
;
PDESolver
*
pdeSolver
;
public:
WelfordAggregate
aggregate
;
Sums
sums
;
Averages
avgs
;
Variances
vars
;
Kurtosis
kurtosis
;
PDESolverCreator
pdeSolverCreator
;
MeshesCreator
meshesCreator
;
WelfordAggregate
aggregate
;
SampleID
cId
;
SampleID
fId
;
...
...
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