Commit 104fa11d authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

Minor refactoring

parent 08ee6fde
......@@ -6,19 +6,24 @@
#include "IStochasticEllipticAssemble.hpp"
class DGEllipticAssemble : public IStochasticEllipticAssemble {
public:
protected:
DGDiscretization *disc;
double penalty = 20.0;
int sign = 1;
public:
DGEllipticAssemble(IDiscretization *disc, IStochasticEllipticProblem *problem)
: IStochasticEllipticAssemble(problem), disc(dynamic_cast<DGDiscretization *> (disc)) {
this->disc = dynamic_cast<DGDiscretizationT<> *>(disc);
: IStochasticEllipticAssemble(problem),
disc(dynamic_cast<DGDiscretization *> (disc)) {
config.get("penalty", penalty);
config.get("sign", sign);
}
IDiscretization *GetDisc() override {
return disc;
};
void PrintInfo() const override {
mout.PrintInfo("Assemble", verbose,
PrintInfoEntry("Assemble Name", Name()),
......
......@@ -5,14 +5,16 @@
#include "elements/Elements.h"
#include "IStochasticEllipticAssemble.hpp"
class LagrangeEllipticAssemble : public IStochasticEllipticAssemble {
public:
protected:
IDiscretization *disc;
public:
LagrangeEllipticAssemble(IDiscretization *disc, IStochasticEllipticProblem *problem)
: IStochasticEllipticAssemble(problem), disc(disc) {}
IDiscretization *GetDiscretization() override {
IDiscretization *GetDisc() override {
return disc;
};
......@@ -55,48 +57,6 @@ public:
virtual void SetFlux(const Vector &u, Vector &flux) override;
void AssembleTransfer(TransferMatrix &TM) const override;
//protected:
// virtual Element *createElement(const cell &c, const Vector &u) const {
// return new ScalarElement(*disc, u, c);
// }
//
// virtual FaceElement *createFaceElement(const cell &c, const Vector &u,
// int face) const {
// return new ScalarFaceElement(*disc, u, c, face);
// }
//
// virtual Scalar getValue(const cell &c, const Vector &u,
// Element *elem, int q) const {
// auto scalarElem = dynamic_cast<ScalarElement *>(elem);
// return scalarElem->Value(q, u);
// }
//
// virtual Scalar getFaceValue(const cell &c, const Vector &u,
// FaceElement *faceElem, int q, int face) const {
// auto scalarFaceElem = dynamic_cast<ScalarFaceElement *>(faceElem);
// return scalarFaceElem->Value(q, u);
// }
//
// virtual VectorField getFlux(const cell &c, const Vector &u,
// Element *elem, int q) const {
// auto scalarElem = dynamic_cast<ScalarElement *>(elem);
// Tensor K = problem->Permeability(c.Subdomain(), elem->QPoint(q));
// return K * scalarElem->Derivative(q, u);
// }
//
// virtual VectorField getFaceFlux(const cell &c, const Vector &u,
// FaceElement *faceElem, int q, int face) const {
// auto scalarFaceElem = dynamic_cast<ScalarFaceElement *>(faceElem);
// Tensor K = problem->Permeability(c.Subdomain(), scalarFaceElem->QPoint(q));
// return K * scalarFaceElem->Derivative(q, u);
// }
//
// virtual VectorField getGradient(const cell &c, const Vector &u,
// Element *elem, int q) const {
// auto scalarElem = dynamic_cast<ScalarElement *>(elem);
// return scalarElem->Derivative(q, u);
// }
};
#endif
......
......@@ -15,7 +15,7 @@ public:
MixedEllipticAssemble(IDiscretization *disc, IStochasticEllipticProblem *problem) :
IStochasticEllipticAssemble(problem), disc(disc) {};
IDiscretization *GetDiscretization() override {
IDiscretization *GetDisc() override {
return disc;
};
......
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