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
109c25f3
Commit
109c25f3
authored
Jul 13, 2021
by
niklas.baumgarten
Browse files
first version of parabolic pde solver
parent
b48daa3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
mluq/src/pdesolvers/ParabolicPDESolver.cpp
View file @
109c25f3
//
// Created by niklas on 11.05.21.
//
#include "ParabolicPDESolver.hpp"
void
ParabolicPDESolver
::
run
(
SampleSolution
&
solution
)
{
}
void
ParabolicPDESolver
::
computeQ
(
SampleSolution
&
solution
)
{
}
void
ParabolicPDESolver
::
computeCost
(
SampleSolution
&
solution
)
{
}
void
ParabolicPDESolver
::
plotSolution
(
SampleSolution
&
solution
)
{
}
mluq/src/pdesolvers/ParabolicPDESolver.hpp
View file @
109c25f3
...
...
@@ -4,7 +4,64 @@
#include "DGReactionAssemble.hpp"
#include "PGReactionAssemble.hpp"
class
ParabolicPDESolver
{
class
ParabolicPDESolver
:
public
PDESolver
{
private:
std
::
string
quantity
=
"L2"
;
std
::
string
costMeasure
=
"size"
;
std
::
unique_ptr
<
NonLinearTimeIntegrator
>
timeInt
;
IStochasticReactionAssemble
*
assemble
;
protected:
void
run
(
SampleSolution
&
solution
)
override
;
void
computeQ
(
SampleSolution
&
solution
)
override
;
void
computeCost
(
SampleSolution
&
solution
)
override
;
void
plotSolution
(
SampleSolution
&
solution
)
override
;
public:
ParabolicPDESolver
(
IStochasticReactionAssemble
*
assemble
,
const
string
&
quantity
,
const
string
&
costMeasure
)
:
PDESolver
(),
assemble
(
assemble
),
quantity
(
quantity
),
costMeasure
(
costMeasure
)
{
if
(
typeid
(
*
assemble
).
name
()
==
typeid
(
PGReactionAssemble
).
name
())
timeInt
=
TimeIntegratorCreator
(
IMPLICIT_EULER
).
WithNonLinearSolver
(
new
Newton
(
std
::
make_unique
<
GMRES
>
(
GetPC
(
"SuperLU"
)))).
CreateUniqueNonLinearTimeIntegrator
();
if
(
typeid
(
*
assemble
).
name
()
==
typeid
(
DGReactionAssemble
).
name
())
timeInt
=
TimeIntegratorCreator
(
IMPLICIT_EULER
).
WithNonLinearSolver
(
new
Newton
(
std
::
make_unique
<
GMRES
>
(
GetPC
(
"PointBlockJacobi_dG"
)))).
CreateUniqueNonLinearTimeIntegrator
();
if
(
verbose
)
mout
.
PrintInfo
(
"TransportPDESolver"
,
verbose
,
PrintInfoEntry
(
"Quantity"
,
quantity
),
PrintInfoEntry
(
"Cost measure"
,
costMeasure
));
}
~
ParabolicPDESolver
()
override
{
delete
assemble
;
}
IAssemble
*
GetAssemble
()
const
override
{
return
nullptr
;
// return assemble;
}
IDiscretization
*
GetDisc
()
const
override
{
return
nullptr
;
}
IStochasticProblem
*
GetProblem
()
const
override
{
return
nullptr
;
}
void
DrawSample
(
const
SampleID
&
id
)
override
{
}
std
::
string
Name
()
const
override
{
return
"ParabolicPDESolver"
;
}
};
#endif //PARABOLICPDESOLVER_HPP
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