Commit 019c962a by niklas.baumgarten

### added set Solution for HybridEllipticAssemble

parent 8732d315
 ... ... @@ -156,6 +156,29 @@ FluxPair HybridEllipticAssemble::OutflowLeftRight(const Vector &p) const { return {PPM->Sum(outflowLeft), PPM->Sum(outflowRight)}; } void HybridEllipticAssemble::SetSolution(const Vector &u, Vector &p) const { for (cell c = u.cells(); c != u.cells_end(); ++c) { int N = c.Faces(); SmallMatrix A(N); SmallVector B(N); SmallVector R(N); LocalProblem(c, u, A, B, R); InverseSmallMatrix IA(A); SmallVector IAB(IA, B); Scalar BIAB = B * IAB; SmallVector RU(R); SmallVector UU(R); RTLagrangeElement elem(*disc, u, c); for (int i = 0; i < c.Faces(); ++i) UU[i] = u(elem[i], 0); for (int i = 0; i < c.Faces(); ++i) RU[i] *= UU[i]; SmallVector IARU(IA, RU); Scalar BIARU = B * IARU; p(c(), 0) = BIARU / BIAB; } } void HybridEllipticAssemble::SetFlux(const Vector &u, Vector &flux) { for (cell c = u.cells(); c != u.cells_end(); ++c) { int N = c.Faces(); ... ...
 ... ... @@ -55,6 +55,8 @@ public: virtual void SetExactSolution(Vector &uEx) const override; void SetSolution(const Vector &u, Vector &p) const override; virtual void SetFlux(const Vector &u, Vector &flux) override; void AssembleTransfer(TransferMatrix &TM) const override; ... ...
 ... ... @@ -72,6 +72,8 @@ public: virtual void SetExactSolution(Vector &u_ex) const = 0; virtual void SetSolution(const Vector &u, Vector &p) const {}; virtual void SetFlux(const Vector &u, Vector &flux) = 0; void AssembleTransfer(TransferMatrix &TM) const override = 0; ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!