Commit 87d69934 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Poromechanics: equivalent of Freefem T13 matrix implemented.

parent cfe5cbab
......@@ -27,6 +27,7 @@ namespace HappyHeart
::VariationalFormulation(const Wrappers::Mpi& mpi,
const TimeManager& time_manager,
const GodOfDof& god_of_dof,
const ScalarParameter<>& fluid_density,
const ParameterAtDof<ParameterNS::Type::scalar, ParameterNS::TimeDependencyNS::None, 2u>::type& porosity,
const Parameter<ParameterNS::Type::vector, ParameterNS::TimeDependencyNS::None>& inlet_pressure,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list)
......@@ -35,6 +36,7 @@ namespace HappyHeart
god_of_dof,
std::move(boundary_condition_list)),
porosity_parent(porosity),
fluid_density_(fluid_density),
inlet_pressure_(inlet_pressure)
{ }
......@@ -69,17 +71,21 @@ namespace HappyHeart
auto& system_matrix = parent::GetNonCstSystemMatrix(numbering_subset, numbering_subset);
// [DEV] Equivalent of T13 in Freefem, except it's assembled directly into the bigger matrix.
{
GlobalMatrixWithCoefficient system_matrix_with_coeff(system_matrix, 1.);
GlobalMatrixWithCoefficient system_matrix_with_coeff(system_matrix, GetFluidDensity().GetConstantValue());
GetScalarDivVectorial().Assemble(std::make_tuple(std::ref(system_matrix_with_coeff)));
}
parent::ApplyEssentialBoundaryCondition<OperatorNS::Nature::nonlinear>(numbering_subset,
numbering_subset);
system_matrix.View(parent::MpiHappyHeart(),
parent::GetOutputDirectory(numbering_subset) + "/scalar_div_vect_" + std::to_string(time_manager.NtimeModified()) + ".hhdata",
__FILE__, __LINE__);
rhs.Print<MpiScale::processor_wise>(parent::MpiHappyHeart(),
parent::GetOutputDirectory(numbering_subset) + "/implicit_rhs_time_" + std::to_string(time_manager.NtimeModified()) + ".hhdata",
__FILE__, __LINE__);
......
......@@ -84,6 +84,7 @@ namespace HappyHeart
explicit VariationalFormulation(const Wrappers::Mpi& mpi,
const TimeManager& time_manager,
const GodOfDof& god_of_dof,
const ScalarParameter<>& fluid_density,
const ParameterAtDof<ParameterNS::Type::scalar, ParameterNS::TimeDependencyNS::None, 2u>::type& porosity,
const Parameter<ParameterNS::Type::vector, ParameterNS::TimeDependencyNS::None>& inlet_pressure,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list);
......@@ -184,6 +185,10 @@ namespace HappyHeart
*/
GlobalMatrix& GetNonCstMassMatrix() noexcept;
//! Density of the fluid.
const ScalarParameter<>& GetFluidDensity() const noexcept;
///@}
......@@ -218,6 +223,10 @@ namespace HappyHeart
private:
//! Density of the fluid.
const ScalarParameter<>& fluid_density_;
//! Inlet pressure parameter.
const Parameter<ParameterNS::Type::vector, ParameterNS::TimeDependencyNS::None>& inlet_pressure_;
......
......@@ -91,6 +91,13 @@ namespace HappyHeart
return *scalar_div_vectorial_;
}
inline const ScalarParameter<>& VariationalFormulation::GetFluidDensity() const noexcept
{
return fluid_density_;
}
} // namespace ImplicitStepFluidNS
......
......@@ -250,6 +250,7 @@ namespace HappyHeart
implicit_step_fluid_varf_ = std::make_unique<varf_type>(mpi,
time_manager,
fluid_god_of_dof,
fluid_density,
porosity_parameter.GetOnFluidMesh(),
GetInletPressure(),
std::move(bc_list));
......
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