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

#1022 Use in sub-varf classes the NewFluidPressure data class, rather than...

#1022 Use in sub-varf classes the NewFluidPressure data class, rather than just a reference to some of its members.
parent 3565f771
......@@ -124,7 +124,13 @@ namespace HappyHeart
VariationalFormulation<HyperelasticLawT>,
Utilities::Access::read_and_write
>,
public Crtp::CauchyGreenAccess<VariationalFormulation<HyperelasticLawT>>
public Crtp::CauchyGreenAccess<VariationalFormulation<HyperelasticLawT>>,
public ::HappyHeart::PoromechanicsNS::Crtp::NewFluidPressureData
<
VariationalFormulation<HyperelasticLawT>,
HyperelasticLawT,
Utilities::Access::read_and_write
>
{
private:
......@@ -200,15 +206,16 @@ namespace HappyHeart
using pressure_parameter_type =
ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>;
//! Alias to pressure parameter operator.
template
//! Alias to fluid pressure data crtp.
using new_fluid_pressure_data_parent =
::HappyHeart::PoromechanicsNS::Crtp::NewFluidPressureData
<
DataNS::TimeLabel2 TimeLabelT
>
using pressure_parameter_operator_type =
GlobalParameterOperatorNS::UpdatePressureAtQuadPt<HyperelasticLawT, TimeLabelT>;
self,
HyperelasticLawT,
Utilities::Access::read_and_write
>;
public:
//! Name of the class.
......@@ -243,9 +250,8 @@ namespace HappyHeart
DataNS::Fluidmass& fluid_mass_data,
DataNS::SolidDisplacement& solid_displacement_data,
DataNS::SolidVelocity& solid_velocity_data,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_solid_operator,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator);
DataNS::NewFluidPressure<HyperelasticLawT>& new_pressure_data);
//! Destructor.
~VariationalFormulation() = default;
......@@ -556,12 +562,6 @@ namespace HappyHeart
//! Constant accessor to the local hyperelastic law.
const HyperelasticLawT& GetHyperelasticLaw() const noexcept;
//! Operator which updates pressure parameter on solid mesh.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& GetNonCstUpdatePressureParamOnSolid() noexcept;
//! Operator which updates pressure parameter on solid mesh.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& GetNonCstUpdatePressureParamOnFluid() noexcept;
public:
//! Monolithic numbering subset.
......@@ -774,14 +774,7 @@ namespace HappyHeart
//! Monolithic numbering subset.
const NumberingSubset& numbering_subset_;
//! Operator which updates pressure parameter.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_solid_operator_;
//! Operator which updates pressure parameter.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator_;
};
......
......@@ -372,22 +372,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline typename VariationalFormulation<HyperelasticLawT>::template pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>&
VariationalFormulation<HyperelasticLawT>::GetNonCstUpdatePressureParamOnSolid() noexcept
{
return pressure_on_solid_operator_;
}
template<class HyperelasticLawT>
inline typename VariationalFormulation<HyperelasticLawT>::template pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>&
VariationalFormulation<HyperelasticLawT>::GetNonCstUpdatePressureParamOnFluid() noexcept
{
return pressure_on_fluid_operator_;
}
} // namespace NewtonFixedPointNS
......
......@@ -54,8 +54,7 @@ namespace HappyHeart
DataNS::Fluidmass& fluid_mass_data,
DataNS::SolidDisplacement& solid_displacement_data,
DataNS::SolidVelocity& solid_velocity_data,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_solid_operator,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator)
DataNS::NewFluidPressure<HyperelasticLawT>& new_pressure_data)
: parent(mpi,
time_manager,
god_of_dof,
......@@ -70,11 +69,10 @@ namespace HappyHeart
solid_displacement_data_parent(solid_displacement_data),
monolithic_data_parent(monolithic_data),
Crtp::CauchyGreenAccess<self>(cauchy_green_tensor),
new_fluid_pressure_data_parent(new_pressure_data),
hyperelastic_law_(hyperelastic_law),
inlet_pressure_(inlet_pressure),
numbering_subset_(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass_velocity_pressure))),
pressure_on_solid_operator_(pressure_on_solid_operator),
pressure_on_fluid_operator_(pressure_on_fluid_operator)
numbering_subset_(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass_velocity_pressure)))
{ }
......@@ -267,7 +265,7 @@ namespace HappyHeart
GetInternalFriction(),
GetHyperelasticLaw(),
this->GetCauchyGreenTensor(),
GetNonCstUpdatePressureParamOnFluid(),
this->GetNonCstNewFluidPressureData().GetNonCstUpdatePressureParamOnFluidNew(),
parent::GetTimeManager());
namespace ipl = Utilities::InputParameterListNS;
......
......@@ -101,7 +101,13 @@ namespace HappyHeart
VariationalFormulation<HyperelasticLawT>,
Utilities::Access::read_and_write
>,
public Crtp::CauchyGreenAccess<VariationalFormulation<HyperelasticLawT>>
public Crtp::CauchyGreenAccess<VariationalFormulation<HyperelasticLawT>>,
public ::HappyHeart::PoromechanicsNS::Crtp::NewFluidPressureData
<
VariationalFormulation<HyperelasticLawT>,
HyperelasticLawT,
Utilities::Access::read_and_write
>
{
private:
......@@ -155,6 +161,16 @@ namespace HappyHeart
using monolithic_data_parent =
::HappyHeart::PoromechanicsNS::Crtp::MonolithicData<self, Utilities::Access::read_and_write>;
//! Alias to fluid pressure data crtp.
using new_fluid_pressure_data_parent =
::HappyHeart::PoromechanicsNS::Crtp::NewFluidPressureData
<
self,
HyperelasticLawT,
Utilities::Access::read_and_write
>;
//! Alias to differential_darcy.
using differential_darcy_operator_type =
GlobalVariationalOperatorNS::DifferentialDarcy;
......@@ -167,14 +183,6 @@ namespace HappyHeart
using solid_delta_residual_operator_type =
::HappyHeart::PoromechanicsNS::GlobalVariationalOperatorNS::SolidDeltaResidual<HyperelasticLawT>;
//! Alias to pressure parameter operator.
template
<
DataNS::TimeLabel2 TimeLabelT
>
using pressure_parameter_operator_type =
GlobalParameterOperatorNS::UpdatePressureAtQuadPt<HyperelasticLawT, TimeLabelT>;
//! Alias to pressure parameter.
using pressure_parameter_type =
ParameterAtQuadraturePoint<::HappyHeart::ParameterNS::Type::scalar>;
......@@ -213,7 +221,7 @@ namespace HappyHeart
DataNS::Monolithic& monolithic_data,
DataNS::Fluidmass& fluid_mass_data,
DataNS::FluidVelocity& fluid_velocity_data,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator);
DataNS::NewFluidPressure<HyperelasticLawT>& new_pressure_data);
//! Destructor.
~VariationalFormulation() = default;
......@@ -419,10 +427,6 @@ namespace HappyHeart
*/
const GlobalVector& PerformImpl();
//! Operator which updates pressure parameter on solid mesh.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& GetNonCstUpdatePressureParamOnFluid() noexcept;
private:
......@@ -535,9 +539,6 @@ namespace HappyHeart
typename Wrappers::Petsc::ShellMatrix<self>::unique_ptr gmres_shell_matrix_ = nullptr;
///@}
//! Operator which updates pressure parameter.
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator_;
};
......
......@@ -283,15 +283,7 @@ namespace HappyHeart
return *gmres_shell_matrix_;
}
template<class HyperelasticLawT>
inline typename VariationalFormulation<HyperelasticLawT>::template pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>&
VariationalFormulation<HyperelasticLawT>::GetNonCstUpdatePressureParamOnFluid() noexcept
{
return pressure_on_fluid_operator_;
}
} // namespace dHNS
......
......@@ -49,7 +49,7 @@ namespace HappyHeart
DataNS::Monolithic& monolithic_data,
DataNS::Fluidmass& fluid_mass_data,
DataNS::FluidVelocity& fluid_velocity_data,
pressure_parameter_operator_type<DataNS::TimeLabel2::new_value>& pressure_on_fluid_operator)
DataNS::NewFluidPressure<HyperelasticLawT>& new_pressure_data)
: parent(mpi,
time_manager,
god_of_dof,
......@@ -62,13 +62,13 @@ namespace HappyHeart
fluid_pressure_data_parent(fluid_pressure_data),
porosity_data_parent(porosity_data),
solid_displacement_data_parent(solid_displacement_data),
monolithic_data_parent(monolithic_data),
Crtp::CauchyGreenAccess<self>(cauchy_green_tensor),
monolithic_data_parent(monolithic_data),
new_fluid_pressure_data_parent(new_pressure_data),
tangent_solid_varf_(tangent_solid_varf),
hyperelastic_law_(hyperelastic_law),
monolithic_matrix_(monolithic_matrix),
monolithic_matrix_without_dirichlet_(monolithic_matrix_without_dirichlet),
pressure_on_fluid_operator_(pressure_on_fluid_operator)
monolithic_matrix_without_dirichlet_(monolithic_matrix_without_dirichlet)
{ }
......@@ -186,9 +186,7 @@ namespace HappyHeart
GetInternalFriction(),
GetHyperelasticLaw(),
this->GetCauchyGreenTensor(),
GetNonCstUpdatePressureParamOnFluid(),
parent::GetTimeManager());
this->GetNonCstNewFluidPressureData().GetNonCstUpdatePressureParamOnFluidNew(), parent::GetTimeManager());
differential_darcy_operator_ =
std::make_unique<differential_darcy_operator_type>(monolithic_felt_space,
......
......@@ -193,8 +193,7 @@ namespace HappyHeart
this->GetNonCstFluidmassData(),
this->GetNonCstSolidDisplacementData(),
this->GetNonCstSolidVelocityData(),
new_fluid_pressure_data.GetNonCstUpdatePressureParamOnSolidNew(),
new_fluid_pressure_data.GetNonCstUpdatePressureParamOnFluidNew()
new_fluid_pressure_data
);
implicit_step_fluid_newton_FP_varf_->Init(input_parameter_data);
......@@ -223,7 +222,7 @@ namespace HappyHeart
this->GetNonCstMonolithicData(),
this->GetNonCstFluidmassData(),
this->GetNonCstFluidVelocityData(),
new_fluid_pressure_data.GetNonCstUpdatePressureParamOnFluidNew());
new_fluid_pressure_data);
}
implicit_step_fluid_differential_varf_->Init(input_parameter_data);
......
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