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

#820 Add missing ZeroEntries().

parent 6292f156
......@@ -374,6 +374,7 @@ namespace HappyHeart
{
auto& delta_residual = GetNonCstDeltaResidual();
delta_residual.ZeroEntries(__FILE__, __LINE__);
GlobalVectorWithCoefficient with_coeff(delta_residual, 1.);
GetSolidDeltaResidualOperator().Assemble(std::make_tuple(std::ref(with_coeff)),
this->GetVariableHolder().GetMidpointPosition());
......@@ -401,6 +402,8 @@ namespace HappyHeart
+ DifferentialPreffix(differential::yes)
+ "delta_residual_" + GetIterationTag() + ".m";
std::cout << "WRITE FILENAME " << filename << std::endl;
delta_residual.View(parent::MpiHappyHeart(),
filename,
__FILE__, __LINE__,
......@@ -414,30 +417,30 @@ namespace HappyHeart
delta_residual.Scale(-1., __FILE__, __LINE__);
}
decltype(auto) tangent_varf = GetTangentSolidVarf();
delta_solid_varf_solver_->SolveLinear(tangent_varf,
tangent_varf,
GetDeltaResidual(),
GetNonCstDeltaSolution(),
__FILE__, __LINE__);
{
decltype(auto) delta_sol = GetDeltaSolution();
const auto filename = parent::GetOutputDirectory(numbering_subset)
+ "/"
+ DifferentialPreffix(differential::yes)
+ "solid_varf_sol_" + GetIterationTag() + ".m";
delta_sol.View(parent::MpiHappyHeart(),
filename,
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
}
// decltype(auto) tangent_varf = GetTangentSolidVarf();
//
// delta_solid_varf_solver_->SolveLinear(tangent_varf,
// tangent_varf,
// GetDeltaResidual(),
// GetNonCstDeltaSolution(),
// __FILE__, __LINE__);
//
//
//
// {
// decltype(auto) delta_sol = GetDeltaSolution();
// const auto filename = parent::GetOutputDirectory(numbering_subset)
// + "/"
// + DifferentialPreffix(differential::yes)
// + "solid_varf_sol_" + GetIterationTag() + ".m";
//
// delta_sol.View(parent::MpiHappyHeart(),
// filename,
// __FILE__, __LINE__,
// 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
......
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