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
7ca524f0
Commit
7ca524f0
authored
Nov 06, 2020
by
niklas.baumgarten
Browse files
included plotting for transport for now as a small hack
parent
d3c7e3f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
mlmc/src/montecarlo/PDESolver.cpp
View file @
7ca524f0
...
...
@@ -49,6 +49,8 @@ void TransportPDESolver::computeCost(SampleSolution &solution) {
}
void
TransportPDESolver
::
plotSolution
(
SampleSolution
&
solution
)
{
plotMap
.
Update
(
solution
.
id
.
level
,
solution
.
U
.
GetMesh
());
assemble
->
SetPlot
(
plotMap
[
solution
.
id
.
level
]);
}
TimeSeries
TransportPDESolver
::
createTimeSeries
(
SampleSolution
&
solution
)
{
...
...
mlmc/src/montecarlo/PDESolver.hpp
View file @
7ca524f0
...
...
@@ -22,12 +22,15 @@
#include
"assemble/DGReactionAssemble.hpp"
#include
"assemble/PGReactionAssemble.hpp"
#include
"LevelMap.hpp"
#include
<typeinfo>
class
PDESolver
{
protected:
Plot
*
plot
;
// Maybe desigin Multilevel Plot
Plot
Map
plot
Map
;
int
verbose
=
1
;
...
...
@@ -55,12 +58,13 @@ public:
}
virtual
~
PDESolver
()
{
delete
plot
;
//
delete plot
Map
;
};
void
Run
(
SampleSolution
&
solution
)
{
mout
.
StartBlock
(
"PDE Solver"
);
vout
(
1
)
<<
solution
.
id
.
Str
()
<<
endl
;
plotSolution
(
solution
);
// Todo remove or rename
run
(
solution
);
computeQ
(
solution
);
computeCost
(
solution
);
...
...
@@ -83,10 +87,6 @@ public:
Exit
(
string
(
typeName
)
+
" not found"
)
}
void
RegisterPlot
(
Meshes
&
meshes
)
{
plot
=
new
Plot
(
meshes
[
0
]);
// Todo
}
void
SetQuantity
(
const
std
::
string
&
_quantity
)
{
this
->
quantity
=
_quantity
;
}
...
...
@@ -158,7 +158,7 @@ public:
class
TransportPDESolver
:
public
PDESolver
{
private:
double
CFL
=
1.0
/
8
.0
;
// tau < C * h
double
CFL
=
1.0
/
2
.0
;
// tau < C * h
double
t0
=
0.0
;
...
...
@@ -288,7 +288,4 @@ public:
}
};
#endif //PDESOLVER_HPP
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