Commit 431180ef authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Remove unused non constant accessors.

parent 55c20bba
......@@ -19,7 +19,7 @@
# include "Geometry/Domain/Domain.hpp"
# include "Operators/GlobalVariationalOperatorInstances/BilinearForm/Mass.hpp"
# include "Operators/ConformInterpolatorInstances/SubsetOrSuperset.hpp" // \todo #820 for dev; might be removed in final clean-up.
# include "Operators/ConformInterpolatorInstances/SubsetOrSuperset.hpp"
# include "Operators/NonConformInterpolator/FromVertexMatching.hpp"
# include "FormulationSolver/VariationalFormulation.hpp"
......@@ -309,18 +309,9 @@ namespace HappyHeart
//! Constant accessor to the test interpolator to reduce from monolithic to only fluid pressure.
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithic2Pressure() const noexcept;
//! Non constant accessor to the test interpolator to reduce from monolithic to only fluid pressure.
ConformInterpolatorNS::SubsetOrSuperset& GetNonCstMonolithic2Pressure() noexcept;
//! Non constant accessor to the test interpolator to reduce from monolithic to only fluid velocity.
ConformInterpolatorNS::SubsetOrSuperset& GetNonCstMonolithic2Velocity() noexcept;
//! Constant accessor to the test interpolator to expand from fluid pressure to monolithic.
const ConformInterpolatorNS::SubsetOrSuperset& GetPressure2Monolithic() const noexcept;
//! Non constant accessor to the test interpolator to expand from fluid pressure to monolithic.
ConformInterpolatorNS::SubsetOrSuperset& GetNonCstPressure2Monolithic() noexcept;
//! Constant accessor to the \#820 [DEV] Vector defined on fluid mass numbering subset.
const GlobalVector& GetWorkFluidMass() const noexcept;
......@@ -342,10 +333,6 @@ namespace HappyHeart
//! Constant accessor to the test interpolator to expand from fluid velocity to monolithic.
const ConformInterpolatorNS::SubsetOrSuperset& GetExpandVelocity() const noexcept;
//! Non constant accessor to the test interpolator to expand from fluid velocity to monolithic.
ConformInterpolatorNS::SubsetOrSuperset& GetNonCstExpandVelocity() noexcept;
//! Constant accessor to the mass operator for fluid mass on solid mesh.
const ::HappyHeart::GlobalVariationalOperatorNS::Mass&
GetMassOperatorFluidMassOnSolidMesh() const noexcept;
......@@ -523,6 +510,20 @@ namespace HappyHeart
*/
GlobalVector& GetNonCstDeltaFluidMass() noexcept;
/*!
* \brief Constant accessor to the vector which holds the values to use within dH for non homogeneous
* Dirichlet boundary condition.
*/
const GlobalVector& GetNonHomogeneousRobinVector() const noexcept;
/*!
* \brief Non constant accessor to the vector which holds the values to use within dH for non
* homogeneous Dirichlet boundary condition.
*/
GlobalVector& GetNonCstNonHomogeneousRobinVector() noexcept;
///@}
......@@ -876,6 +877,9 @@ namespace HappyHeart
//! Parameter that encapsulates velSHalfVhf.
ParameterAtDof<ParameterNS::Type::vector>::type::const_unique_ptr velSHalfVhf_param_ = nullptr;
//! Vector which holds the values to use within dH for non homogeneous Dirichlet boundary condition.
GlobalVector::unique_ptr non_homogeneous_robin_vector_ = nullptr;
//! Value of the fluid mass at the end of previous time step.
const GlobalVector& previous_time_step_fluid_mass_on_solid_mesh_;
......
......@@ -177,7 +177,20 @@ namespace HappyHeart
filename,
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
// auto& robin_vector = GetNonCstNonHomogeneousRobinVector();
// robin_vector.Copy(GetSolidDifferentialVelocity(), __FILE__, __LINE__);
//
decltype(auto) bc_manager = DirichletBoundaryConditionManager::GetInstance();
decltype(auto) non_homogeneous_bc =
bc_manager.GetNonCstDirichletBoundaryCondition(EnumUnderlyingType(BoundaryConditionIndex::fluid_robin_interface_dH));
non_homogeneous_bc.UpdateValues(GetSolidDifferentialVelocity());
auto& robin_vector = GetNonCstNonHomogeneousRobinVector();
robin_vector.ZeroEntries(__FILE__, __LINE__);
god_of_dof.template ApplyBoundaryCondition<BoundaryConditionMethod::penalization>(non_homogeneous_bc, robin_vector);
// \todo #820 At the moment, I accept my norm is not the same as Bruno's; see what Petsc gives when
......
......@@ -105,14 +105,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetNonCstMonolithic2Pressure() noexcept
{
return const_cast<ConformInterpolatorNS::SubsetOrSuperset&>(GetMonolithic2Pressure());
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetMonolithic2Velocity() const noexcept
......@@ -122,14 +114,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetNonCstMonolithic2Velocity() noexcept
{
return const_cast<ConformInterpolatorNS::SubsetOrSuperset&>(GetMonolithic2Velocity());
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetPressure2Monolithic() const noexcept
......@@ -139,13 +123,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>::GetNonCstPressure2Monolithic() noexcept
{
return const_cast<ConformInterpolatorNS::SubsetOrSuperset&>(GetPressure2Monolithic());
}
template<class HyperelasticLawT>
inline const GlobalVector& VariationalFormulation<HyperelasticLawT>::GetWorkFluidMass() const noexcept
{
......@@ -203,13 +180,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>::GetNonCstExpandVelocity() noexcept
{
return const_cast<ConformInterpolatorNS::SubsetOrSuperset&>(GetExpandVelocity());
}
template<class HyperelasticLawT>
inline const ::HappyHeart::GlobalVariationalOperatorNS::Mass& VariationalFormulation<HyperelasticLawT>
::GetMassOperatorFluidMassOnSolidMesh() const noexcept
......@@ -622,6 +592,22 @@ namespace HappyHeart
return const_cast<GlobalVector&>(GetSolidDifferentialVelocity());
}
template<class HyperelasticLawT>
inline const GlobalVector& VariationalFormulation<HyperelasticLawT>::GetNonHomogeneousRobinVector() const noexcept
{
assert(!(!non_homogeneous_robin_vector_));
return *non_homogeneous_robin_vector_;
}
template<class HyperelasticLawT>
inline GlobalVector& VariationalFormulation<HyperelasticLawT>::GetNonCstNonHomogeneousRobinVector() noexcept
{
return const_cast<GlobalVector&>(GetNonHomogeneousRobinVector());
}
} // namespace InnerLoopNS
......
......@@ -67,6 +67,7 @@ namespace HappyHeart
work_vector_rhs_like_ = std::make_unique<GlobalVector>(parent::GetSystemSolution(numbering_subset));
corrected_values_ = std::make_unique<GlobalVector>(parent::GetSystemSolution(numbering_subset));
solid_differential_velocity_ = std::make_unique<GlobalVector>(parent::GetSystemSolution(numbering_subset));
non_homogeneous_robin_vector_ = std::make_unique<GlobalVector>(parent::GetSystemSolution(numbering_subset));
decltype(auto) system_matrix = parent::GetSystemMatrix(numbering_subset, numbering_subset);
mass_matrix_ = std::make_unique<GlobalMatrix>(system_matrix);
......
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