Commit 4bac08c9 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#531 Assembling in several matrices has been tested successfully. Before...

#531 Assembling in several matrices has been tested successfully. Before removing the test, I'll modify the code to avoid some of the local matrix rescaling.
parent fd4c2e9d
......@@ -215,6 +215,10 @@ namespace HappyHeart
*/
VectorsAndMatrices<TimeSchemeT>& GetNonCstVectorsAndMatrices() noexcept;
public:
GlobalMatrix::unique_ptr foo = nullptr;
GlobalMatrix::unique_ptr bar = nullptr;
///@}
......
......@@ -142,6 +142,9 @@ namespace HappyHeart
const auto& system_solution = this->GetSystemSolution(numbering_subset);
const auto& system_matrix = this->GetSystemMatrix(numbering_subset, numbering_subset);
foo = std::make_unique<GlobalMatrix>(system_matrix);
bar = std::make_unique<GlobalMatrix>(system_matrix);
{
std::lock_guard<std::mutex> lock(this->GetMutex());
......@@ -223,8 +226,29 @@ namespace HappyHeart
const double mass_coefficient = 2. * this->GetVolumicMass()
/ Utilities::Square(transient_parameters.GetTimeStep());
this->GetNonCstMassPerSquareTimeStepOperator().Assemble(std::make_tuple(GlobalMatrixWithCoefficient(vm.GetNonCstMassPerSquareTime(),
mass_coefficient)));
auto&& matrix1 = GlobalMatrixWithCoefficient(vm.GetNonCstMassPerSquareTime(),
mass_coefficient);
auto&& matrix2 = GlobalMatrixWithCoefficient(*foo,
mass_coefficient * 2);
auto&& matrix3 = GlobalMatrixWithCoefficient(*bar,
mass_coefficient * 20);
this->GetNonCstMassPerSquareTimeStepOperator().
Assemble(std::make_tuple(std::move(matrix1), std::move(matrix2), std::move(matrix3)));
vm.GetNonCstMassPerSquareTime().View(this->MpiHappyHeart(),
"/Users/sebastien/Desktop/original.txt", __FILE__, __LINE__);
foo->View(this->MpiHappyHeart(),
"/Users/sebastien/Desktop/foo.txt", __FILE__, __LINE__);
bar->View(this->MpiHappyHeart(),
"/Users/sebastien/Desktop/bar.txt", __FILE__, __LINE__);
}
}
......
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