Commit c3fb8e29 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

pdesolver is handling matrix graph now, here not needed anymore

parent c5a08f32
......@@ -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(faceMGraphs, id);
solutionFaceFlux = new SampleSolution(faceMGraphs, 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;
......
......@@ -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();
......
......@@ -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(mGraphs, id);
SampleSolution solution(pdeSolver->MGraphs(), 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(mGraphs, id);
SampleSolution solution(pdeSolver->MGraphs(), 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(mGraphs, id);
SampleSolution solution(pdeSolver->MGraphs(), id);
pdeSolver->Run(solution);
EXPECT_NEAR(solution.Q, GetParam().Q, PDESOLVER_TEST_TOLERANCE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment