Commit 5383a621 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 hybridVector implemented in differential.

parent e428065e
......@@ -152,15 +152,14 @@ namespace HappyHeart
decltype(auto) numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass_velocity_pressure));
auto& contribution = GetNonCstWorkRhsLike(); // \todo #820 Intermediate step for dev purpose only.
contribution.ZeroEntries(__FILE__, __LINE__);
auto& rhs = parent::GetNonCstSystemRhs(numbering_subset);
rhs.ZeroEntries(__FILE__, __LINE__);
{
GlobalVectorWithCoefficient contribution_with_coeff(contribution, 1.);
GlobalVectorWithCoefficient contribution_with_coeff(rhs, 1.);
GetHybridVectorOperator().Assemble(std::make_tuple(std::ref(contribution_with_coeff)),
GetSolidDifferentialVelocity());
}
// \todo #820 At the moment, I accept my norm is not the same as Bruno's; see what Petsc gives when
// SNES is applied (system_rhs's is what we got in hyperelastic model).
......@@ -456,34 +455,26 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
void VariationalFormulation<HyperelasticLawT>::SetSolidVelocityForDifferential(Vec petsc_solid_velocity)
{
// auto& work_vel = *work_solid_velocity_;
// auto& work_vel_fluid = GetNonCstWorkFluidVelocity();
//
// std::cout << "WORK VEL SIZE = " << work_vel.GetProgramWiseSize(__FILE__, __LINE__) << "\t" << work_vel_fluid.GetProgramWiseSize(__FILE__, __LINE__) << std::endl;
// std::cout << "WORK Interp = " << GetInterpVelocitySolid2Fluid().GetInterpolationMatrix().GetProgramWiseSize(__FILE__, __LINE__).first
// << "\t" << GetInterpVelocitySolid2Fluid().GetInterpolationMatrix().GetProgramWiseSize(__FILE__, __LINE__).second << std::endl;
// work_vel.SetFromPetscVec(petsc_solid_velocity, __FILE__, __LINE__);
// work_vel.Scale(parent::GetTimeManager().GetInverseTimeStep(), __FILE__, __LINE__);
// Wrappers::Petsc::MatMult(GetMatrixSolidToFluid(),
// work_vel,
// work_vel_fluid,
// __FILE__, __LINE__);
auto& work_vel = *work_solid_velocity_;
auto& work_vel_fluid = GetNonCstWorkFluidVelocity();
work_vel.SetFromPetscVec(petsc_solid_velocity, __FILE__, __LINE__);
work_vel.Scale(parent::GetTimeManager().GetInverseTimeStep(), __FILE__, __LINE__);
Wrappers::Petsc::MatMult(variable_holder_parent::GetVariableHolder().GetSolidOnFluidMesh().GetMatrixSolidToFluid(),
work_vel,
work_vel_fluid,
__FILE__, __LINE__);
auto& solid_differential_velocity = GetNonCstSolidDifferentialVelocity();
// auto& solid_differential_velocity = GetNonCstSolidDifferentialVelocity();
//
// Wrappers::Petsc::MatMult(GetExpandVelocity().GetInterpolationMatrix(),
// work_vel,
// solid_differential_velocity,
// __FILE__, __LINE__);
Wrappers::Petsc::MatMult(GetExpandVelocity().GetInterpolationMatrix(),
work_vel_fluid,
solid_differential_velocity,
__FILE__, __LINE__);
}
......@@ -498,4 +489,5 @@ namespace HappyHeart
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_INNER_LOOP_x_VARIATIONAL_FORMULATION_HXX_
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