Commit 882f20f7 by GILLES Sebastien

### #718 FSI: simplify calls that update vectors and matrices.

parent aaa96c6d
 ... ... @@ -201,10 +201,7 @@ namespace HappyHeart * \brief Update the content of all the vectors and matrices relevant to the computation of the tangent * and the residual. */ void UpdateVectorsAndMatrices(); //! An helper method of \a UpdateVectorsAndMatrices(). void AssembleVectorsAndMatrices(); void UpdateVectorsAndMatrices(const Vec& a_evaluation_state); /*! * \brief Compute the matrix of the system. ... ...
 ... ... @@ -247,27 +247,7 @@ namespace HappyHeart { return &HyperelasticityNS::Impl::Snes::Viewer; } template < class LawPolicyT, HyperelasticityNS::TimeScheme TimeSchemeT > void VariationalFormulationHyperElasticity ::AssembleVectorsAndMatrices() { auto& vm = GetNonCstVectorsAndMatrices(); vm.GetEvaluationState().View(this->MpiHappyHeart(), __FILE__, __LINE__); // Assemble stiffness (depends upon the time scheme; vm types is used here to call the proper // assembling operation(s)). HyperelasticityNS::Private::AssembleStiffness(this->GetStiffnessOperator(), false, vm); } template < ... ... @@ -392,7 +372,6 @@ namespace HappyHeart vm.UpdateEvaluationState(a_evaluation_state); { // Compute some matrices and vectors through arithmetical operations (e.g. vector for midpoint position). const bool is_dynamic_iteration = true; ... ... @@ -405,8 +384,11 @@ namespace HappyHeart } { // Assemble into vectors and matrices the relevant operators AssembleVectorsAndMatrices(); // Assemble stiffness (depends upon the time scheme; vm types is used here to call the proper // assembling operation(s)). HyperelasticityNS::Private::AssembleStiffness(this->GetStiffnessOperator(), false, vm); } } ... ...
 ... ... @@ -32,8 +32,15 @@ namespace HappyHeart { static_cast(is_static_call); GlobalMatrixWithCoefficient mat(vm.GetNonCstMatrixNewStiffness(), 1.); GlobalVectorWithCoefficient vec(vm.GetNonCstVectorNewStiffness(), 1.); auto& matrix_stiffness = vm.GetNonCstMatrixNewStiffness(); auto& vector_stiffness = vm.GetNonCstVectorNewStiffness(); matrix_stiffness.ZeroEntries(__FILE__, __LINE__); vector_stiffness.ZeroEntries(__FILE__, __LINE__); GlobalMatrixWithCoefficient mat(matrix_stiffness, 1.); GlobalVectorWithCoefficient vec(vector_stiffness, 1.); the_operator.Assemble(std::make_tuple(std::ref(mat), std::ref(vec)), vm.GetMidpointPosition(), ... ...
 ... ... @@ -599,14 +599,6 @@ namespace HappyHeart auto& vm = this->GetNonCstVectorsAndMatrices(); vm.UpdateEvaluationState(a_evaluation_state); { // Zero all relevant matrices and vectors. vm.GetNonCstMatrixNewStiffness().ZeroEntries(__FILE__, __LINE__); vm.GetNonCstVectorNewStiffness().ZeroEntries(__FILE__, __LINE__); } { // Compute some matrices and vectors through arithmetical operations (e.g. vector for midpoint position). ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!