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
a680b43c
Commit
a680b43c
authored
Jul 11, 2021
by
niklas.baumgarten
Browse files
using weight in SampleSolution
parent
c5fd45be
Changes
1
Hide whitespace changes
Inline
Side-by-side
mluq/src/pdesolvers/PDESolver.hpp
View file @
a680b43c
...
...
@@ -33,18 +33,19 @@ protected:
virtual
void
plotSolution
(
SampleSolution
&
solution
)
=
0
;
void
weightSolution
(
SampleSolution
&
solution
)
const
{
solution
.
Q
=
GetProblem
()
->
SampleWeight
(
solution
.
id
)
*
solution
.
Q
;
solution
.
W
=
GetProblem
()
->
SampleWeight
(
solution
.
id
);
}
public:
PDESolver
(
const
Meshes
&
meshes
,
const
std
::
string
&
quantity
,
PDESolver
(
const
Meshes
&
meshes
,
const
std
::
string
&
quantity
,
const
std
::
string
&
costMeasure
)
:
meshes
(
meshes
),
quantity
(
quantity
),
costMeasure
(
costMeasure
)
{
config
.
get
(
"PDESolverVerbose"
,
verbose
);
config
.
get
(
"PDESolverPlotting"
,
plotting
);
}
virtual
~
PDESolver
()
{}
;
virtual
~
PDESolver
()
=
default
;
virtual
void
PrintInfo
()
const
{
if
(
verbose
>
0
)
...
...
@@ -61,7 +62,6 @@ public:
computeCost
(
solution
);
plotSolution
(
solution
);
weightSolution
(
solution
);
// Todo other idea: Add weight as class member of solution
vout
(
2
)
<<
"Q="
<<
solution
.
Q
<<
" cost="
<<
solution
.
C
<<
endl
;
mout
.
EndBlock
(
verbose
<=
1
);
}
...
...
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