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
d245784b
Commit
d245784b
authored
Jul 10, 2021
by
niklas.baumgarten
Browse files
renaming to GeneratorValue to FunctionEvaluation
parent
fe8aeb3c
Changes
6
Hide whitespace changes
Inline
Side-by-side
mluq/src/pdesolvers/PDESolver.hpp
View file @
d245784b
...
...
@@ -79,7 +79,7 @@ protected:
void
run
(
SampleSolution
&
solution
)
override
{}
void
computeQ
(
SampleSolution
&
solution
)
override
{
if
(
quantity
==
"
GeneratorValue
"
)
solution
.
Q
=
assemble
->
GeneratorValue
();
if
(
quantity
==
"
FunctionEvaluation
"
)
solution
.
Q
=
assemble
->
FunctionEvaluation
();
else
Exit
(
"Quantity of interest not implemented"
)
}
...
...
mluq/src/pdesolvers/PDESolverCreator.hpp
View file @
d245784b
...
...
@@ -10,7 +10,7 @@ private:
std
::
string
_pc
;
std
::
string
_model
=
"DummyPDESolver"
;
std
::
string
_problem
=
"StochasticDummyProblem"
;
std
::
string
_quantity
=
"
GeneratorValue
"
;
std
::
string
_quantity
=
"
FunctionEvaluation
"
;
std
::
string
_costMeasure
=
"size"
;
std
::
string
_linearSolver
=
"GMRES"
;
...
...
mluq/src/pdesolvers/assembling/IStochasticDummyAssemble.hpp
View file @
d245784b
...
...
@@ -55,8 +55,8 @@ public:
return
0.0
;
};
double
GeneratorValue
()
const
{
return
problem
->
GeneratorValue
();
double
FunctionEvaluation
()
const
{
return
problem
->
FunctionEvaluation
();
}
};
...
...
mluq/src/problems/IStochasticProblem.hpp
View file @
d245784b
...
...
@@ -29,7 +29,7 @@ public:
explicit
StochasticDummyProblem
(
const
Meshes
&
meshes
)
:
IStochasticProblem
(
meshes
)
{}
virtual
double
GeneratorValue
()
=
0
;
virtual
double
FunctionEvaluation
()
=
0
;
};
class
StochasticDummyScalarGeneratorProblem
:
public
StochasticDummyProblem
{
...
...
@@ -43,7 +43,7 @@ public:
scalarGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
this
->
scalarGenerator
.
EvalSample
();
}
...
...
@@ -63,7 +63,7 @@ public:
complexGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
abs_compl
(
this
->
complexGenerator
.
EvalSample
());
}
...
...
@@ -80,7 +80,7 @@ public:
void
DrawSample
(
const
SampleID
&
id
)
override
{}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
0.0
;
}
...
...
@@ -97,7 +97,7 @@ public:
void
DrawSample
(
const
SampleID
&
id
)
override
{}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
0.0
;
}
...
...
@@ -117,7 +117,7 @@ public:
rVectorGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
this
->
rVectorGenerator
.
EvalSample
().
Mean
();
}
...
...
@@ -137,7 +137,7 @@ public:
cVectorGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
abs_compl
(
this
->
cVectorGenerator
.
EvalSample
().
Mean
());
}
...
...
@@ -157,7 +157,7 @@ public:
rMatrixGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
abs_compl
(
this
->
rMatrixGenerator
.
EvalSample
().
Mean
());
}
...
...
@@ -177,7 +177,7 @@ public:
cMatrixGenerator
.
DrawSample
(
id
);
}
double
GeneratorValue
()
override
{
double
FunctionEvaluation
()
override
{
return
abs_compl
(
this
->
cMatrixGenerator
.
EvalSample
().
Mean
());
}
...
...
mluq/tests/estimators/TestMonteCarlo.cpp
View file @
d245784b
...
...
@@ -2,14 +2,14 @@
INSTANTIATE_TEST_SUITE_P
(
TestMonteCarlo
,
TestMonteCarloWithoutEpsilon
,
Values
(
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
GeneratorValue
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
FunctionEvaluation
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticLaplace2DTest"
,
"L2"
,
"LagrangeElliptic"
},
TestParams
{
"StochasticLaplace2DTest"
,
"Outflow"
,
"HybridElliptic"
}
// Todo add more test cases
));
INSTANTIATE_TEST_SUITE_P
(
TestMonteCarlo
,
TestMonteCarloWithEpsilon
,
Values
(
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
GeneratorValue
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
FunctionEvaluation
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticLaplace2DTest"
,
"L2"
,
"LagrangeElliptic"
},
TestParams
{
"StochasticLaplace2DTest"
,
"Outflow"
,
"HybridElliptic"
}
// Todo add more test cases
...
...
mluq/tests/estimators/TestMultilevelMonteCarlo.cpp
View file @
d245784b
...
...
@@ -3,7 +3,7 @@
INSTANTIATE_TEST_SUITE_P
(
TestMultilevelMonteCarlo
,
TestMultilevelMonteCarloWithoutEpsilon
,
Values
(
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
GeneratorValue
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticDummyScalarGeneratorProblem"
,
"
FunctionEvaluation
"
,
"DummyPDESolver"
},
TestParams
{
"StochasticLaplace2DTest"
,
"L2"
,
"LagrangeElliptic"
},
TestParams
{
"StochasticLaplace2DTest"
,
"Outflow"
,
"HybridElliptic"
}
));
...
...
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