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
d10d321b
Commit
d10d321b
authored
Feb 02, 2021
by
niklas.baumgarten
Browse files
bug fix space dim flux
parent
18c0cb9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
mlmc/src/pdesolver/PDESolver.cpp
View file @
d10d321b
...
...
@@ -73,8 +73,8 @@ void EllipticPDESolver::computeCost(SampleSolution &solution) {
void
EllipticPDESolver
::
plotSolution
(
SampleSolution
&
solution
)
{
if
(
!
plotting
)
return
;
SampleSolution
solutionCellFlux
(
fluxMGraphs
,
solution
.
id
,
"Flux"
);
SampleSolution
solutionPressure
(
pressureMGraphs
,
solution
.
id
,
"Pressure"
);
SampleSolution
solutionCellFlux
(
fluxMGraphs
,
solution
.
id
,
"Flux"
);
assemble
->
SetPressure
(
solution
.
U
,
solutionPressure
.
U
);
assemble
->
SetFlux
(
solution
.
U
,
solutionCellFlux
.
U
);
...
...
@@ -85,7 +85,7 @@ void EllipticPDESolver::plotSolution(SampleSolution &solution) {
void
EllipticPDESolver
::
createOtherMatrixGraphs
()
{
if
(
plotting
)
{
fluxMGraphs
=
new
MatrixGraphs
(
meshes
,
new
LagrangeDoF
(
0
,
3
));
fluxMGraphs
=
new
MatrixGraphs
(
meshes
,
new
LagrangeDoF
(
0
,
SpaceDimension
));
if
(
typeid
(
*
assemble
).
name
()
==
typeid
(
HybridEllipticAssemble
).
name
())
pressureMGraphs
=
new
MatrixGraphs
(
meshes
,
new
LagrangeDoF
(
0
,
1
));
else
...
...
mlmc/src/pdesolver/PDESolver.hpp
View file @
d10d321b
...
...
@@ -27,20 +27,20 @@
class
PDESolver
{
protected:
Meshes
&
meshes
;
MatrixGraphs
*
solMGraphs
;
PlotMap
plotMap
;
int
verbose
;
int
plotting
;
Meshes
&
meshes
;
PlotMap
plotMap
;
std
::
string
quantity
;
std
::
string
costMeasure
;
MatrixGraphs
*
solMGraphs
;
virtual
void
run
(
SampleSolution
&
solution
)
=
0
;
virtual
void
computeQ
(
SampleSolution
&
solution
)
=
0
;
...
...
@@ -146,12 +146,12 @@ private:
Newton
newton
;
IStochasticEllipticAssemble
*
assemble
;
MatrixGraphs
*
fluxMGraphs
;
MatrixGraphs
*
pressureMGraphs
;
IStochasticEllipticAssemble
*
assemble
;
protected:
void
run
(
SampleSolution
&
solution
)
override
;
...
...
@@ -180,6 +180,7 @@ public:
}
~
EllipticPDESolver
()
{
if
(
!
assemble
)
delete
assemble
;
if
(
!
solMGraphs
)
delete
solMGraphs
;
if
(
!
fluxMGraphs
)
delete
fluxMGraphs
;
if
(
!
pressureMGraphs
)
delete
pressureMGraphs
;
...
...
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