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
9fad2221
Commit
9fad2221
authored
May 05, 2021
by
niklas.baumgarten
Browse files
removed plotting from generator
parent
91a96ed9
Changes
8
Hide whitespace changes
Inline
Side-by-side
mlmc/conf/mlmc_elliptic.conf
View file @
9fad2221
...
...
@@ -29,7 +29,6 @@ lambda = [0.15, 0.15]
smoothing
=
1
.
0
# ----- Plotting -----
GeneratorPlotting
=
0
PDESolverPlotting
=
0
# ----- Verbose -----
...
...
mlmc/conf/mlmc_transport.conf
View file @
9fad2221
...
...
@@ -48,8 +48,7 @@ lambda = [0.15, 0.15]
smoothing
=
1
.
0
# ----- Plotting -----
GeneratorPlotting
=
1
MCPlotting
=
1
PDESolverPlotting
=
1
# ----- Verbose -----
MCVerbose
=
1
...
...
mlmc/conf/mlmc_vs_sg.conf
View file @
9fad2221
...
...
@@ -47,8 +47,7 @@ NewtonSteps = 1
NewtonLineSearchSteps
=
0
# ----- Plotting -----
GeneratorPlotting
=
1
MCPlotting
=
1
PDESolverPlotting
=
1
# ----- Verbose -----
MCVerbose
=
1
...
...
mlmc/src/generators/SampleGenerator.hpp
View file @
9fad2221
...
...
@@ -20,16 +20,12 @@ static double abs_compl(const Complex &complex) {
template
<
typename
T
>
class
SampleGenerator
{
protected:
int
plotting
=
0
;
int
verbose
=
0
;
int
commSplit
;
virtual
void
drawSample
(
const
SampleID
&
id
)
=
0
;
virtual
void
plotSample
(
const
SampleID
&
id
)
{};
public:
Meshes
&
meshes
;
// todo make const ref or remove completely
...
...
@@ -45,7 +41,6 @@ public:
mout
.
StartBlock
(
Name
());
vout
(
1
)
<<
id
.
IdString
()
<<
endl
;
drawSample
(
id
);
// if (plotting) plotSample(id);
mout
.
EndBlock
(
verbose
==
0
);
}
...
...
mlmc/src/generators/algorithms/CirculantEmbedding.cpp
View file @
9fad2221
...
...
@@ -95,13 +95,6 @@ void CirculantEmbedding1D::initVec(const SampleID &id) {
*
sampleVec
=
0.0
;
}
void
CirculantEmbedding1D
::
plotSample
(
const
SampleID
&
id
)
{
if
(
sampleVec
!=
nullptr
)
mpp
::
plot
(
id
.
IdString
(
"Kappa"
))
<<
*
sampleVec
<<
mpp
::
endp
;
else
Exit
(
"Vector is nullptr"
)
}
void
CirculantEmbedding1D
::
drawSample
(
const
SampleID
&
id
)
{
initVec
(
id
);
...
...
@@ -191,10 +184,6 @@ void CirculantEmbedding2D::initVec(const SampleID &id) {
*
sampleVec
=
0.0
;
}
void
CirculantEmbedding2D
::
plotSample
(
const
SampleID
&
id
)
{
mpp
::
plot
(
id
.
IdString
(
"Kappa"
))
<<
*
sampleVec
<<
mpp
::
endp
;
}
void
CirculantEmbedding2D
::
drawSample
(
const
SampleID
&
id
)
{
initVec
(
id
);
...
...
mlmc/src/generators/algorithms/CirculantEmbedding.hpp
View file @
9fad2221
...
...
@@ -6,7 +6,6 @@
#include
"basics/Utilities.hpp"
#include
"Algebra.hpp"
#include
"generators/NormalDistribution.hpp"
#include
"Plotting.hpp"
#include
"FFT.hpp"
...
...
@@ -41,8 +40,6 @@ private:
protected:
void
initVec
(
const
SampleID
&
id
);
void
plotSample
(
const
SampleID
&
id
)
override
;
void
drawSample
(
const
SampleID
&
id
)
override
;
public:
...
...
@@ -99,8 +96,6 @@ private:
protected:
void
initVec
(
const
SampleID
&
id
);
void
plotSample
(
const
SampleID
&
id
)
override
;
void
drawSample
(
const
SampleID
&
id
)
override
;
public:
...
...
mlmc/tests/TestMain.hpp
View file @
9fad2221
...
...
@@ -11,8 +11,7 @@ using ConfigMap = std::map<std::string, std::string>;
*
* Todo
* 1D
* kwargs={"GeneratorPlotting": 1,
"PDESolverPlotting": 1,
* kwargs={"PDESolverPlotting": 1,
"Problem": "StochasticLaplace1D",
"initLevels": [5, 6, 7]}
mpp.run(4, config="mlmc_elliptic", kwargs=kwargs)
...
...
@@ -42,7 +41,6 @@ const ConfigMap DefaultEllipticConfigMap = {
{
"smoothing"
,
"1.8"
},
// ----- Plotting -----
{
"GeneratorPlotting"
,
"1"
},
{
"PDESolverPlotting"
,
"1"
},
// ----- Verbose -----
...
...
@@ -96,7 +94,6 @@ const ConfigMap DefaultTransportConfigMap = {
{
"evtol"
,
"1e-10"
},
// ----- Plotting -----
{
"GeneratorPlotting"
,
"0"
},
{
"PDESolverPlotting"
,
"0"
},
// ----- Verbose -----
...
...
mlmc/tests/generators/TestCirculantEmbedding.cpp
View file @
9fad2221
...
...
@@ -53,7 +53,6 @@ TEST_F(TestCirculantEmbedding, TestDrawSample) {
int
main
(
int
argc
,
char
**
argv
)
{
return
MppTest
(
MppTestBuilder
(
argc
,
argv
).
WithConfigEntry
(
"GeneratorPlotting"
,
1
).
WithConfigEntry
(
"GeneratorVerbose"
,
0
).
WithScreenLogging
().
WithPPM
()
...
...
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