Commit 894f5da4 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Poromechanics: remove the data attribute numbering subset in implicit...

#820 Poromechanics: remove the data attribute numbering subset in implicit step fluid variational formulation. Introduce the scalar div vectorial operator there.
parent afc60bd1
......@@ -35,8 +35,7 @@ namespace HappyHeart
god_of_dof,
std::move(boundary_condition_list)),
porosity_parent(porosity),
inlet_pressure_(inlet_pressure),
fluid_velocity_numbering_subset_(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity)))
inlet_pressure_(inlet_pressure)
{ }
......@@ -44,8 +43,10 @@ namespace HappyHeart
{
decltype(auto) time_manager = parent::GetTimeManager();
const auto time = time_manager.GetTime();
decltype(auto) god_of_dof = parent::GetGodOfDof();
decltype(auto) numbering_subset = GetFluidVelocityNumberingSubset();
decltype(auto) numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity));
auto& rhs = parent::GetNonCstSystemRhs(numbering_subset);
rhs.ZeroEntries(__FILE__, __LINE__);
......@@ -84,7 +85,11 @@ namespace HappyHeart
void VariationalFormulation::AllocateMatricesAndVectors()
{
decltype(auto) numbering_subset = GetFluidVelocityNumberingSubset();
decltype(auto) god_of_dof = parent::GetGodOfDof();
decltype(auto) numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity));
parent::AllocateSystemMatrix(numbering_subset, numbering_subset);
parent::AllocateSystemVector(numbering_subset);
......@@ -144,6 +149,26 @@ namespace HappyHeart
porosity,
DoComputeProcessorWiseLocal2Global::yes); // \todo #820 Check if no is ok.
decltype(auto) monolithic_felt_space = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::fluid_monolithic));
{
using type = GVO::ScalarDivVectorial;
decltype(auto) fluid_pressure =
unknown_manager.GetUnknown(EnumUnderlyingType(UnknownIndex::fluid_pressure));
scalar_div_vectorial_
= std::make_unique<type>(monolithic_felt_space,
fluid_velocity,
fluid_pressure,
mesh_dimension,
default_quadrature_rule_set,
porosity,
DoComputeProcessorWiseLocal2Global::yes); // \todo #820 Check if no is ok.
}
}
......
......@@ -26,6 +26,7 @@
# include "ModelInstances/UnderDevelopment/Poromechanics/Crtp/Porosity.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/GlobalVariationalOperatorInstances/TransientSource.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/GlobalVariationalOperatorInstances/Mass.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/GlobalVariationalOperatorInstances/ScalarDivVectorial.hpp"
namespace HappyHeart
......@@ -166,8 +167,8 @@ namespace HappyHeart
//! Constant accessor to the inlet pressure parameter.
const Parameter<ParameterNS::Type::vector, ParameterNS::TimeDependencyNS::None>& GetInletPressure() const noexcept;
//! Constant accessor to the numbering subset associated to fluid velocity.
const NumberingSubset& GetFluidVelocityNumberingSubset() const noexcept;
//! Constant accessor to the scalar div vectorial operator.
const GlobalVariationalOperatorNS::ScalarDivVectorial& GetScalarDivVectorial() const noexcept;
/*!
......@@ -198,6 +199,9 @@ namespace HappyHeart
//! Mass operator for fluid velocity.
GlobalVariationalOperatorNS::Mass::const_unique_ptr mass_operator_ = nullptr;
//! Scalar div vectorial operator.
GlobalVariationalOperatorNS::ScalarDivVectorial::const_unique_ptr scalar_div_vectorial_ = nullptr;
///@}
private:
......@@ -217,9 +221,6 @@ namespace HappyHeart
//! Inlet pressure parameter.
const Parameter<ParameterNS::Type::vector, ParameterNS::TimeDependencyNS::None>& inlet_pressure_;
//! Numbering subset associated to fluid velocity.
const NumberingSubset& fluid_velocity_numbering_subset_;
};
......
......@@ -62,14 +62,7 @@ namespace HappyHeart
return inlet_pressure_;
}
inline const NumberingSubset& ImplicitStepFluidNS::VariationalFormulation
::GetFluidVelocityNumberingSubset() const noexcept
{
return fluid_velocity_numbering_subset_;
}
inline const GlobalVariationalOperatorNS::Mass& VariationalFormulation::GetMassOperator() const noexcept
{
assert(!(!mass_operator_));
......@@ -91,6 +84,13 @@ namespace HappyHeart
}
inline const GlobalVariationalOperatorNS::ScalarDivVectorial& VariationalFormulation
::GetScalarDivVectorial() const noexcept
{
assert(!(!scalar_div_vectorial_));
return *scalar_div_vectorial_;
}
} // namespace ImplicitStepFluidNS
......
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