Commit 5e61c960 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Dev print to identify the current issue at second implicit iteration.

parent c35955a1
......@@ -47,7 +47,8 @@ namespace HappyHeart
porosity,
velocity_solution,
pressure_solution,
internal_friction)
internal_friction),
velocity_solution_(velocity_solution)
{ }
......
......@@ -137,7 +137,17 @@ namespace HappyHeart
SetComputeEltArrayArguments(const LocalFEltSpace& local_felt_space,
typename parent::local_variational_operator_type& local_operator,
std::tuple<ImplicitStepFluidNS::IsFullDarcy>&& additional_arguments) const;
public:
// \todo #820 Just for debug purpose!
const ParameterAtDof<ParameterNS::Type::vector>::type& GetVelocitySolutionParam() const noexcept;
private:
// \todo #820 Just for debug purpose!
const ParameterAtDof<ParameterNS::Type::vector>::type& velocity_solution_;
};
......
......@@ -35,6 +35,12 @@ namespace HappyHeart
is_full_darcy);
}
inline const ParameterAtDof<ParameterNS::Type::vector>::type& Darcy::GetVelocitySolutionParam() const noexcept
{
return velocity_solution_;
}
} // namespace GlobalVariationalOperatorNS
......
......@@ -653,7 +653,7 @@ namespace HappyHeart
//! Non constant accessor to the delta displacement (dispDelta in Freefem).
GlobalVector& GetNonCstDeltaDisplacement() noexcept;
private:
/*!
......
......@@ -485,7 +485,7 @@ namespace HappyHeart
// disappear once model is validated.
variable_holder.template DevPrint<DevPhase::newton_fp>(rhs,
"darcy");
"darcy");
// \todo #820 Add the contribution from pressure to the rhs.
{
......@@ -581,13 +581,27 @@ namespace HappyHeart
GlobalVectorWithCoefficient contribution_with_coeff(contribution, 1.);
{
auto& vel_only = GetNonCstWorkFluidVelocity();
Wrappers::Petsc::MatMult(GetMonolithic2Velocity().GetInterpolationMatrix(),
GetDarcyOperator().GetVelocitySolutionParam().GetGlobalVector(),
vel_only,
__FILE__, __LINE__);
this->GetVariableHolder().template DevPrint<DevPhase::newton_fp>(vel_only,
"fluid_vel_before_darcy");
}
GetDarcyOperator().Assemble(std::make_tuple(std::ref(contribution_with_coeff)),
is_full_darcy);
Wrappers::Petsc::AXPY(factor,
contribution,
out,
__FILE__, __LINE__); // \todo #820 Remove this when buf is discarded!
__FILE__, __LINE__);
}
......
......@@ -80,7 +80,6 @@ namespace HappyHeart
delta_darcy_vector_ =
std::make_unique<GlobalVector>(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity)));
AllocateGlobalVector(god_of_dof, GetNonCstDeltaDarcyVector());
solid_differential_velocity_on_robin_interface_ =
std::make_unique<GlobalVector>(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity_on_robin_interface)));
......@@ -260,7 +259,7 @@ namespace HappyHeart
{
using scalar_at_dof_type = ParameterAtDof<ParameterNS::Type::scalar>::type;
using vector_at_dof_type = ParameterAtDof<ParameterNS::Type::vector>::type;
using vector_at_dof_type = ParameterAtDof<ParameterNS::Type::vector>::type;
velocity_solution_param_ = std::make_unique<vector_at_dof_type>("Fluid velocity solution",
mesh,
......
......@@ -43,15 +43,11 @@ namespace HappyHeart
auto& solid_displacement = GetNonCstVector<SolidIndex::displacement>();
while (absolute_error > 1.e-10 && relative_error > 1.e-6 && iteration_index < 3u) // \todo #820 Should not remain hardcoded!
while (absolute_error > 1.e-10 && relative_error > 1.e-6 && iteration_index < 6u) // \todo #820 Should not remain hardcoded!
// \todo #820 iteration index sup value is obviously temporary for dev purposes...
{
std::cout << "ABSOLUTE ERROR = " << absolute_error << " REL = " << relative_error << std::endl;
{
decltype(auto) solid_varf = SolidVariationalFormulationPolicyT::GetVariationalFormulation();
decltype(auto) numbering_subset = solid_varf.GetNumberingSubset();
decltype(auto) sol = solid_varf.GetSystemSolution(numbering_subset);
// \todo #820 Swap...
GetNonCstVector<SolidIndex::displacement_k0>().Copy(solid_displacement, __FILE__, __LINE__);
}
......@@ -136,8 +132,8 @@ namespace HappyHeart
variable_holder.template DevPrint<DevPhase::none>(solid_displacement,
"solid_disp_after_dH");
}
std::cout << "ABSOLUTE ERROR = " << absolute_error << " REL = " << relative_error << std::endl;
++iteration_index;
}
}
......
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