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
c3fb8e29
Commit
c3fb8e29
authored
Jan 27, 2021
by
niklas.baumgarten
Browse files
pdesolver is handling matrix graph now, here not needed anymore
parent
c5a08f32
Changes
3
Hide whitespace changes
Inline
Side-by-side
mlmc/src/generators/algorithms/HybridFluxGenerator.cpp
View file @
c3fb8e29
...
...
@@ -15,14 +15,10 @@ void HybridFaceNormalFluxGenerator::createPDESolver() {
Create
(
meshes
);
}
void
HybridFaceNormalFluxGenerator
::
createMGraphs
()
{
faceMGraphs
=
pdeSolver
->
CreateSolutionMatrixGraphs
(
meshes
);
}
void
HybridFaceNormalFluxGenerator
::
drawSample
(
const
SampleID
&
id
)
{
pdeSolver
->
DrawSample
(
id
);
solutionFaceValues
=
new
SampleSolution
(
face
MGraphs
,
id
);
solutionFaceFlux
=
new
SampleSolution
(
face
MGraphs
,
id
);
solutionFaceValues
=
new
SampleSolution
(
pdeSolver
->
MGraphs
()
,
id
);
solutionFaceFlux
=
new
SampleSolution
(
pdeSolver
->
MGraphs
()
,
id
);
pdeSolver
->
Run
(
*
solutionFaceValues
);
auto
assemble
=
dynamic_cast
<
HybridEllipticAssemble
*>
(
pdeSolver
->
GetAssemble
());
assemble
->
SetNormalFlux
(
solutionFaceValues
->
U
,
solutionFaceFlux
->
U
);
...
...
@@ -35,7 +31,6 @@ Scalar HybridFaceNormalFluxGenerator::EvalSample(int face, const cell &c) {
}
HybridFaceNormalFluxGenerator
::~
HybridFaceNormalFluxGenerator
()
{
delete
faceMGraphs
;
// delete cellMGraphs;
delete
pdeSolver
;
delete
solutionFaceValues
;
...
...
mlmc/src/generators/algorithms/HybridFluxGenerator.hpp
View file @
c3fb8e29
...
...
@@ -9,15 +9,10 @@ class PDESolver;
class
HybridFaceNormalFluxGenerator
:
public
SampleGenerator
<
Scalar
>
{
private:
// Created in constructor
MatrixGraphs
*
faceMGraphs
;
// MatrixGraphs *cellMGraphs;
void
createPDESolver
();
void
createMGraphs
();
void
drawSample
(
const
SampleID
&
id
)
override
;
public:
...
...
@@ -34,7 +29,6 @@ public:
HybridFaceNormalFluxGenerator
(
Meshes
&
meshes
)
:
SampleGenerator
(
meshes
)
{
createPDESolver
();
createMGraphs
();
}
~
HybridFaceNormalFluxGenerator
();
...
...
mlmc/tests/pdesolver/TestPDESolver.cpp
View file @
c3fb8e29
...
...
@@ -24,8 +24,6 @@ protected:
PDESolver
*
pdeSolver
;
MatrixGraphs
*
mGraphs
;
SampleID
id
;
TestPDESolver
(
const
std
::
string
&
meshName
,
int
commSplit
=
0
)
:
id
(
3
,
0
,
false
)
{
...
...
@@ -42,8 +40,6 @@ protected:
WithProblem
(
GetParam
().
problem
).
WithQuantity
(
GetParam
().
quantity
).
Create
(
*
meshes
);
mGraphs
=
pdeSolver
->
CreateSolutionMatrixGraphs
(
*
meshes
);
}
std
::
string
GetOverlap
()
{
...
...
@@ -56,7 +52,6 @@ protected:
}
void
TearDown
()
override
{
delete
mGraphs
;
delete
pdeSolver
;
delete
meshes
;
}
...
...
@@ -94,7 +89,7 @@ INSTANTIATE_TEST_CASE_P(TestPDESolver, TestLaplace1D, Values(
));
TEST_P
(
TestLaplace1D
,
TestRun
)
{
SampleSolution
solution
(
m
Graphs
,
id
);
SampleSolution
solution
(
pdeSolver
->
M
Graphs
()
,
id
);
pdeSolver
->
Run
(
solution
);
EXPECT_NEAR
(
solution
.
Q
,
GetParam
().
Q
,
PDESOLVER_TEST_TOLERANCE
);
}
...
...
@@ -131,7 +126,7 @@ INSTANTIATE_TEST_CASE_P(TestPDESolver, TestLaplace2D, Values(
));
TEST_P
(
TestLaplace2D
,
TestRun
)
{
SampleSolution
solution
(
m
Graphs
,
id
);
SampleSolution
solution
(
pdeSolver
->
M
Graphs
()
,
id
);
pdeSolver
->
Run
(
solution
);
EXPECT_NEAR
(
solution
.
Q
,
GetParam
().
Q
,
PDESOLVER_TEST_TOLERANCE
);
}
...
...
@@ -146,7 +141,7 @@ INSTANTIATE_TEST_CASE_P(TestPDESolver, TestGaussHat, Values(
));
TEST_P
(
TestGaussHat
,
TestRun
)
{
SampleSolution
solution
(
m
Graphs
,
id
);
SampleSolution
solution
(
pdeSolver
->
M
Graphs
()
,
id
);
pdeSolver
->
Run
(
solution
);
EXPECT_NEAR
(
solution
.
Q
,
GetParam
().
Q
,
PDESOLVER_TEST_TOLERANCE
);
}
...
...
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