Commit 851994cf authored by niklas.baumgarten's avatar niklas.baumgarten

Merge branch 'adaption-to-209' into 'feature'

Adaption to 209

See merge request !10
parents 507f812c 5e6e422d
Pipeline #140415 failed with stages
in 10 minutes and 39 seconds
......@@ -3,7 +3,6 @@
#include "Assemble.hpp"
#include "Elements.hpp"
#include <iomanip>
class IStochasticReactionAssemble : public TAssemble {
......
......@@ -44,7 +44,7 @@ void DummyPDESolver::computeCost(SampleSolution &solution) {
void DummyPDESolver::plotSolution(SampleSolution &solution) {}
void EllipticPDESolver::run(SampleSolution &solution) {
newton(*assemble, solution.U);
NewtonMethod(assemble, solution.U);
}
void EllipticPDESolver::computeQ(SampleSolution &solution) {
......
......@@ -17,9 +17,9 @@
// Mpp imports
#include "dof/BasicDoFs.hpp"
#include "Solver.hpp"
#include "Newton.hpp"
#include "TimeIntegrator.hpp"
#include "GMRES.hpp"
// Standard library
#include <typeinfo>
......@@ -143,10 +143,6 @@ public:
class EllipticPDESolver : public PDESolver {
private:
Solver solver;
Newton newton;
MatrixGraphs *fluxMGraphs;
MatrixGraphs *pressureMGraphs;
......@@ -167,17 +163,12 @@ protected:
void createOtherMatrixGraphs() override;
public:
EllipticPDESolver(IStochasticEllipticAssemble *assemble,
Meshes &meshes,
EllipticPDESolver(IStochasticEllipticAssemble *assemble, Meshes &meshes,
const std::string &quantity = "L2",
const std::string &costMeasure = "size",
const std::string &pc = "SuperLU") :
PDESolver(meshes, quantity, costMeasure), assemble(assemble),
solver(Solver(GetPC(pc))),
newton(Newton(solver)) {
const std::string &costMeasure = "size") :
PDESolver(meshes, quantity, costMeasure), assemble(assemble) {
solMGraphs = CreateSolutionMatrixGraphs();
PrintInfo();
solver.PrintInfo();
}
~EllipticPDESolver() {
......
......@@ -22,7 +22,7 @@ void DGReactionAssemble::Dirichlet(double t, Vector &u) const {
}
}
}
DirichletConsistent(u);
u.DirichletConsistent();
}
double DGReactionAssemble::Residual(double t, const Vector &u, Vector &r) const {
......@@ -134,7 +134,7 @@ double DGReactionAssemble::Residual(double t, const Vector &u, Vector &r) const
}
}
}
Collect(r);
r.Collect();
return r.norm();
}
......@@ -294,7 +294,7 @@ void DGReactionAssemble::SetInitialValue(Vector &u) const {
u(r, j) = problem
->Concentration(0, lambda * c() + (1 - lambda) * elem.NodalPoint(j));
}
Accumulate(u);
u.Accumulate();
}
double DGReactionAssemble::Mass(const Vector &u) const {
......
......@@ -233,7 +233,7 @@ void DGLinearTransportAssemble::SetExactSolution(double t, Vector &u_ex) const {
for (int j = 0; j < Elem.NodalPoints(); ++j)
u_ex(r, j) = problem->Solution(t, Elem.NodalPoint(j));
}
Accumulate(u_ex);
u_ex.Accumulate();
}
void DGNonLinearTransportAssemble::AssembleTransfer(TransferMatrix &TM) const {
......@@ -267,7 +267,7 @@ void DGLinearTransportAssemble::SetInitialValue(Vector &u) const {
u(r, j) =
problem->Solution(0, lambda * c() + (1 - lambda) * Elem.NodalPoint(j));
}
Accumulate(u);
u.Accumulate();
}
void DGLinearTransportAssemble::PrintMatrixInfo(Matrix &A, int diagonal) const {
......@@ -375,7 +375,7 @@ double DGNonLinearTransportAssemble::Residual(const Vector &u, Vector &b) const
b -= dt_ * rhs;
b.ClearDirichletValues();
Collect(b);
b.Collect();
delete fluxMatrix;
delete massMatrix;
return b.norm();
......
......@@ -29,7 +29,7 @@ void MixedEllipticAssemble::Initialize(Vector &u) const {
}
}
}
DirichletConsistent(u);
u.DirichletConsistent();
}
double MixedEllipticAssemble::Energy(const Vector &u) const {
......
......@@ -77,7 +77,7 @@ double PGReactionAssemble::Residual(double t, const Vector &u, Vector &r) const
}
}
r.ClearDirichletValues();
Collect(r);
r.Collect();
return r.norm();
}
......
Subproject commit 1a82583f0d6a8d5aaae93f0daaa73adbdcb65162
Subproject commit 3adb3000b51b347d233889317e80f48fab8c471f
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