Commit 84d3f851 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

made hybrid problems runnable in pdesolver

parent dd740707
Pipeline #117656 passed with stages
in 6 minutes and 11 seconds
......@@ -4,6 +4,7 @@
#include "Sample.hpp"
// General solving approaches
#include "dof/BasicDoFs.hpp"
#include "solver/Solver.hpp"
#include "solver/Newton.hpp"
#include "timestepping/TimeIntegrator.hpp"
......@@ -33,7 +34,7 @@ protected:
int verbose = 1;
int plotting = 1;
int plotting = 0;
InfoEntries entries;
......@@ -80,16 +81,22 @@ public:
MatrixGraphs *CreateSolutionMatrixGraphs(Meshes &meshes) {
auto disc = this->GetDisc();
auto typeName = typeid(*disc).name();
if (typeName == typeid(LagrangeDiscretization).name())
auto discType = typeid(*disc).name();
if (discType == typeid(LagrangeDiscretization).name())
return new MatrixGraphs(meshes, *disc);
if (typeName == typeid(RTLagrangeDiscretization).name())
return new MatrixGraphs(meshes, *disc);
if (typeName == typeid(DGDiscretization).name())
if (discType == typeid(RTLagrangeDiscretization).name()) {
auto assemble = this->GetAssemble();
auto assembleType = typeid(*assemble).name();
if (assembleType == typeid(HybridEllipticAssemble).name())
return new MatrixGraphs(meshes, dof(new FaceDoF(1)));
if (assembleType == typeid(MixedEllipticAssemble).name())
return new MatrixGraphs(meshes, *disc);
}
if (discType == typeid(DGDiscretization).name())
return new CellMatrixGraphs(meshes, *disc);
if (typeName == typeid(EGDiscretization).name())
if (discType == typeid(EGDiscretization).name())
return new CellVertexMatrixGraphs(meshes, *disc);
Exit(string(typeName) +" not found")
Exit(string(discType) +" not found")
}
void SetQuantity(const std::string &_quantity) {
......
......@@ -59,13 +59,13 @@ INSTANTIATE_TEST_CASE_P(TestPDESolver, TestLaplace1D, Values(
TestParams{"MixedElliptic", "Laplace1D", "EnergyError", 0.0},
TestParams{"MixedElliptic", "Laplace1D", "FluxError", 0.0},
TestParams{"MixedElliptic", "Laplace1D", "Inflow", -1.0},
TestParams{"MixedElliptic", "Laplace1D", "Outflow", 1.0}
TestParams{"MixedElliptic", "Laplace1D", "Outflow", 1.0},
// TestParams{"HybridElliptic", "Laplace1D", "L2CellAverageError", 0.0},
// TestParams{"HybridElliptic", "Laplace1D", "Inflow", -1.0},
// TestParams{"HybridElliptic", "Laplace1D", "Outflow", 1.0},
// TestParams{"HybridElliptic", "Laplace1D", "EnergyError", 0.0},
// TestParams{"HybridElliptic", "Laplace1D", "FluxError", 0.0}
TestParams{"HybridElliptic", "Laplace1D", "L2CellAverageError", 0.0},
TestParams{"HybridElliptic", "Laplace1D", "Inflow", -1.0},
TestParams{"HybridElliptic", "Laplace1D", "Outflow", 1.0},
TestParams{"HybridElliptic", "Laplace1D", "EnergyError", 0.0},
TestParams{"HybridElliptic", "Laplace1D", "FluxError", 0.0}
));
TEST_P(TestLaplace1D, TestRun) {
......@@ -90,13 +90,13 @@ INSTANTIATE_TEST_CASE_P(TestPDESolver, TestLaplace2D, Values(
TestParams{"MixedElliptic", "Laplace2D", "EnergyError", 0.0},
TestParams{"MixedElliptic", "Laplace2D", "FluxError", 0.0},
TestParams{"MixedElliptic", "Laplace2D", "Inflow", -1.0},
TestParams{"MixedElliptic", "Laplace2D", "Outflow", 1.0}
TestParams{"MixedElliptic", "Laplace2D", "Outflow", 1.0},
// TestParams{"HybridElliptic", "Laplace2D", "L2CellAverageError", 0.0},
// TestParams{"HybridElliptic", "Laplace2D", "EnergyError", 0.0},
// TestParams{"HybridElliptic", "Laplace2D", "FluxError", 0.0},
// TestParams{"HybridElliptic", "Laplace2D", "Inflow", -1.0},
// TestParams{"HybridElliptic", "Laplace2D", "Outflow", 1.0}
TestParams{"HybridElliptic", "Laplace2D", "L2CellAverageError", 0.0},
TestParams{"HybridElliptic", "Laplace2D", "EnergyError", 0.0},
TestParams{"HybridElliptic", "Laplace2D", "FluxError", 0.0},
TestParams{"HybridElliptic", "Laplace2D", "Inflow", -1.0},
TestParams{"HybridElliptic", "Laplace2D", "Outflow", 1.0}
// TestParams{"DGElliptic", "Laplace2D", "L2Error", 0.0},
// TestParams{"DGElliptic", "Laplace2D", "EnergyError", 0.0},
......
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