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

#820 Add missing ZeroEntries().

parent 6292f156
...@@ -374,6 +374,7 @@ namespace HappyHeart ...@@ -374,6 +374,7 @@ namespace HappyHeart
{ {
auto& delta_residual = GetNonCstDeltaResidual(); auto& delta_residual = GetNonCstDeltaResidual();
delta_residual.ZeroEntries(__FILE__, __LINE__);
GlobalVectorWithCoefficient with_coeff(delta_residual, 1.); GlobalVectorWithCoefficient with_coeff(delta_residual, 1.);
GetSolidDeltaResidualOperator().Assemble(std::make_tuple(std::ref(with_coeff)), GetSolidDeltaResidualOperator().Assemble(std::make_tuple(std::ref(with_coeff)),
this->GetVariableHolder().GetMidpointPosition()); this->GetVariableHolder().GetMidpointPosition());
...@@ -401,6 +402,8 @@ namespace HappyHeart ...@@ -401,6 +402,8 @@ namespace HappyHeart
+ DifferentialPreffix(differential::yes) + DifferentialPreffix(differential::yes)
+ "delta_residual_" + GetIterationTag() + ".m"; + "delta_residual_" + GetIterationTag() + ".m";
std::cout << "WRITE FILENAME " << filename << std::endl;
delta_residual.View(parent::MpiHappyHeart(), delta_residual.View(parent::MpiHappyHeart(),
filename, filename,
__FILE__, __LINE__, __FILE__, __LINE__,
...@@ -414,30 +417,30 @@ namespace HappyHeart ...@@ -414,30 +417,30 @@ namespace HappyHeart
delta_residual.Scale(-1., __FILE__, __LINE__); delta_residual.Scale(-1., __FILE__, __LINE__);
} }
decltype(auto) tangent_varf = GetTangentSolidVarf(); // decltype(auto) tangent_varf = GetTangentSolidVarf();
//
delta_solid_varf_solver_->SolveLinear(tangent_varf, // delta_solid_varf_solver_->SolveLinear(tangent_varf,
tangent_varf, // tangent_varf,
GetDeltaResidual(), // GetDeltaResidual(),
GetNonCstDeltaSolution(), // GetNonCstDeltaSolution(),
__FILE__, __LINE__); // __FILE__, __LINE__);
//
//
//
{ // {
decltype(auto) delta_sol = GetDeltaSolution(); // decltype(auto) delta_sol = GetDeltaSolution();
const auto filename = parent::GetOutputDirectory(numbering_subset) // const auto filename = parent::GetOutputDirectory(numbering_subset)
+ "/" // + "/"
+ DifferentialPreffix(differential::yes) // + DifferentialPreffix(differential::yes)
+ "solid_varf_sol_" + GetIterationTag() + ".m"; // + "solid_varf_sol_" + GetIterationTag() + ".m";
//
delta_sol.View(parent::MpiHappyHeart(), // delta_sol.View(parent::MpiHappyHeart(),
filename, // filename,
__FILE__, __LINE__, // __FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB); // PETSC_VIEWER_ASCII_MATLAB);
//
} // }
//
// \todo #820 At the moment, I accept my norm is not the same as Bruno's; see what Petsc gives when // \todo #820 At the moment, I accept my norm is not the same as Bruno's; see what Petsc gives when
......
Supports Markdown
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