Commit fd4c2e9d authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#531 Mass: modify Assemble prototype to allow assembling into several matrices.

parent 76a6ec29
......@@ -103,7 +103,8 @@ namespace HappyHeart
* for Assemble() method rather than figuring out what is a variadic method and which additional
* arguments are required (none for this specific operator).
*/
void Assemble(GlobalMatrixWithCoefficient&& global_matrix_with_coeff, const Domain& domain = Domain()) const;
template<class LinearAlgebraTupleT>
void Assemble(LinearAlgebraTupleT&& global_matrix_with_coeff, const Domain& domain = Domain()) const;
......
......@@ -18,9 +18,10 @@ namespace HappyHeart
{
inline void Mass::Assemble(GlobalMatrixWithCoefficient&& global_matrix_with_coeff, const Domain& domain) const
template<class LinearAlgebraTupleT>
inline void Mass::Assemble(LinearAlgebraTupleT&& linear_algebra_tuple, const Domain& domain) const
{
return Parent::Assemble531(std::make_tuple(global_matrix_with_coeff), domain);
return Parent::Assemble531(std::move(linear_algebra_tuple), domain);
}
......
......@@ -223,8 +223,8 @@ namespace HappyHeart
const double mass_coefficient = 2. * this->GetVolumicMass()
/ Utilities::Square(transient_parameters.GetTimeStep());
this->GetNonCstMassPerSquareTimeStepOperator().Assemble(GlobalMatrixWithCoefficient(vm.GetNonCstMassPerSquareTime(),
mass_coefficient));
this->GetNonCstMassPerSquareTimeStepOperator().Assemble(std::make_tuple(GlobalMatrixWithCoefficient(vm.GetNonCstMassPerSquareTime(),
mass_coefficient)));
}
}
......
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