Commit 518301ad authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1022 HybridVector: use new fluid pressure rather than old one.

parent 6aee6fdf
......@@ -51,7 +51,7 @@ namespace HappyHeart
DoComputeProcessorWiseLocal2Global::no,
density,
porosity,
update_current_pressure_operator,
update_current_pressure_operator.GetPressureAtQuadPt(),
current_fluid_pressure,
fluid_source_term),
update_current_pressure_operator_(update_current_pressure_operator)
......@@ -91,7 +91,7 @@ namespace HappyHeart
const GlobalVector& current_velocity,
const Domain& domain) const
{
//update_current_pressure_operator_.Update
update_current_pressure_operator_.Update();
return parent::AssembleImpl(std::move(global_vector_with_coeff_tuple),
domain,
......
......@@ -95,7 +95,7 @@ namespace HappyHeart
typename parent::elementary_data_type&& elementary_data,
const ScalarParameter<>& density,
const ParameterAtDof<ParameterNS::Type::scalar, ParameterNS::TimeDependencyNS::None, 2u>& porosity,
GlobalParameterOperatorNS::UpdatePressureAtQuadPt<HyperelasticLawT, DataNS::TimeLabel2::current>& update_current_pressure_operator,
const ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>& pressure_at_quad_pt,
const ParameterAtDof<ParameterNS::Type::scalar>& current_fluid_pressure,
double fluid_source_term);
......@@ -140,6 +140,8 @@ namespace HappyHeart
//! Current fluid pressure.
const ParameterAtDof<ParameterNS::Type::scalar>& GetCurrentFluidPressure() const noexcept;
//! Pressure at quadrature point.
const ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>& GetPressureAtQuadPt() const noexcept;
public:
......@@ -163,8 +165,8 @@ namespace HappyHeart
//! Fluid source term ('beta' in Freefem).
const double fluid_source_term_;
//! Operator which updates the pressure at quadrature points (computed from fluidmass).
GlobalParameterOperatorNS::UpdatePressureAtQuadPt<HyperelasticLawT, DataNS::TimeLabel2::current>& update_current_pressure_operator_;
//! Pressure at quadrature point.
const ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>& pressure_at_quad_pt_;
};
......
......@@ -37,7 +37,7 @@ namespace HappyHeart
typename parent::elementary_data_type&& a_elementary_data,
const ScalarParameter<>& density,
const ParameterAtDof<ParameterNS::Type::scalar, ParameterNS::TimeDependencyNS::None, 2u>& porosity,
GlobalParameterOperatorNS::UpdatePressureAtQuadPt<HyperelasticLawT, DataNS::TimeLabel2::current>& update_current_pressure_operator,
const ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>& pressure_at_quad_pt,
const ParameterAtDof<ParameterNS::Type::scalar>& current_fluid_pressure,
double fluid_source_term)
: parent(unknown_list, std::move(a_elementary_data)),
......@@ -45,7 +45,7 @@ namespace HappyHeart
density_(density),
current_fluid_pressure_(current_fluid_pressure),
fluid_source_term_(fluid_source_term),
update_current_pressure_operator_(update_current_pressure_operator)
pressure_at_quad_pt_(pressure_at_quad_pt)
{
decltype(auto) elementary_data = GetElementaryData();
decltype(auto) vel_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(1));
......@@ -87,6 +87,8 @@ namespace HappyHeart
const auto fluid_source_term = GetFluidSourceTerm();
decltype(auto) current_fluid_pressure = GetCurrentFluidPressure();
decltype(auto) pressure_at_quad_pt = GetPressureAtQuadPt();
for (const auto& infos_at_quad_pt : infos_at_quad_pt_list)
{
const auto& phi = infos_at_quad_pt.GetRefFEltPhi();
......@@ -101,8 +103,7 @@ namespace HappyHeart
const auto density_value = density.GetValue(quad_pt, geom_elt);
const auto current_fluid_pressure_value = current_fluid_pressure.GetValue(quad_pt, geom_elt);
const auto current_fluid_pressure_value = pressure_at_quad_pt.GetValue(quad_pt, geom_elt);
for (int mass_node_index = 0; mass_node_index < Nmass_node; ++mass_node_index)
{
......@@ -182,6 +183,15 @@ namespace HappyHeart
{
return current_fluid_pressure_;
}
template<class HyperelasticLawT>
inline const ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>&
HybridVector<HyperelasticLawT>::GetPressureAtQuadPt() const noexcept
{
return pressure_at_quad_pt_;
}
} // namespace LocalVariationalOperatorNS
......
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