Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
ac359be4
Commit
ac359be4
authored
Jan 17, 2020
by
niklas.baumgarten
Browse files
adapted new logger functions
parent
684e62a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
mlmc/src/mc/MonteCarloElliptic.C
View file @
ac359be4
...
...
@@ -4,12 +4,12 @@
using
namespace
std
;
void
MonteCarloElliptic
::
Method
()
{
logger
->
s
tartMethodM
SG
();
logger
->
S
tartMethodM
sg
();
if
(
!
onlyFineLevel
)
logger
->
l
ogM
SGV
1
(
"l: "
+
to_string
(
l
)
logger
->
L
ogM
sgv
1
(
"l: "
+
to_string
(
l
)
+
" dM: "
+
to_string
(
dM
));
else
logger
->
l
ogM
SGV
1
(
"l: "
+
to_string
(
l
)
logger
->
L
ogM
sgv
1
(
"l: "
+
to_string
(
l
)
+
" dM: "
+
to_string
(
dM
)
+
" onlyFineLevel: True"
);
...
...
@@ -60,9 +60,9 @@ void MonteCarloElliptic::Method() {
updateAvg
();
updateStatistic
();
logger
->
l
ogM
SGV
1
(
"|E[Y]|: "
+
to_string
(
avgY
)
logger
->
L
ogM
sgv
1
(
"|E[Y]|: "
+
to_string
(
avgY
)
+
" V[Y]: "
+
to_string
(
varY
));
logger
->
e
ndMethodM
SG
();
logger
->
E
ndMethodM
sg
();
}
void
MonteCarloElliptic
::
solveElliptic
(
int
l
,
double
&
valueQ
,
double
&
cost
,
...
...
@@ -80,7 +80,7 @@ void MonteCarloElliptic::solveElliptic(int l, double &valueQ, double &cost,
valueQ
=
assemble
->
getInflowOutflow
(
solution
).
second
;
if
(
functional
==
"Goal"
)
valueQ
=
assemble
->
getGoal
(
solution
);
logger
->
l
ogM
SGV
2
(
"Solving on level "
+
to_string
(
l
)
+
" took "
+
logger
->
L
ogM
sgv
2
(
"Solving on level "
+
to_string
(
l
)
+
" took "
+
to_string
((
startSolving
-
Date
()).
t
)
+
"s"
);
}
...
...
@@ -88,12 +88,12 @@ void MonteCarloElliptic::plotResults(int l, int m, const string &suffix,
const
Vector
&
u
,
const
Vector
&
flux
,
const
Vector
&
perm
)
{
const
char
*
name
=
build
String
(
m
,
"u"
,
suffix
);
string
name
=
build
Name
(
m
,
"u"
,
suffix
);
assemble
->
plotU
(
plot
,
u
,
name
);
name
=
build
String
(
m
,
"flux"
,
suffix
);
name
=
build
Name
(
m
,
"flux"
,
suffix
);
assemble
->
plotFlux
(
plot
,
flux
,
name
);
name
=
build
String
(
m
,
"perm"
,
suffix
);
name
=
build
Name
(
m
,
"perm"
,
suffix
);
assemble
->
plotPerm
(
plot
,
perm
,
name
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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