Skip to content
Snippets Groups Projects
Commit 6bd32df6 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[projector] improve docu

parent 43d71dae
No related branches found
No related tags found
1 merge request!1609Feature/projector
......@@ -67,9 +67,14 @@ public:
//! delete default constructor
Projector() = delete;
//! Constructor
Projector(Matrix&& M, Matrix&& P)
: M_(std::move(M)) , P_(std::move(P))
/*!
* \brief Constructor. Receives the mass and projection
* matrix that define the linear system describing
* the L2-projection from a function space into another.
*/
Projector(Matrix&& massMatrix, Matrix&& projectionMatrix)
: massMat_(std::move(massMatrix))
, projMat_(std::move(projectionMatrix))
{}
/*!
......@@ -81,21 +86,21 @@ public:
void project(const DomainSolution& u, TargetSolution& up) const
{
// be picky about size of u
if ( u.size() != P_.M())
if ( u.size() != projMat_.M())
DUNE_THROW(Dune::InvalidStateException, "Vector size mismatch" );
up.resize(M_.N());
up.resize(massMat_.N());
auto rhs = up;
P_.mv(u, rhs);
projMat_.mv(u, rhs);
SSORCGBackend solver;
solver.solve(M_, up, rhs);
solver.solve(massMat_, up, rhs);
}
private:
Matrix M_;
Matrix P_;
Matrix massMat_;
Matrix projMat_;
};
/*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment