Commit 02c93349 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Introduce a class similar to VariableHolder to hold all interpolators.

parent 3ab65749
......@@ -1491,6 +1491,7 @@
BEDEB9541C3C0A4F00B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEDEB9481C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.cpp */; };
BEDEB9551C3C0A4F00B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BEDEB9491C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hpp */; };
BEDEB9561C3C0A4F00B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BEDEB94A1C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hxx */; };
BEE1A9FD1D5B5FCB00100A39 /* InterpolatorHolder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEE1A9FA1D5B5FCB00100A39 /* InterpolatorHolder.cpp */; };
BEE79A221C995B7200F05519 /* libSeldon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEE79A1F1C995B5F00F05519 /* libSeldon.a */; };
BEE79A271C995B7E00F05519 /* libSeldon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEE79A1F1C995B5F00F05519 /* libSeldon.a */; };
BEE79A2A1C995B8700F05519 /* libSeldon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEE79A1F1C995B5F00F05519 /* libSeldon.a */; };
......@@ -5562,6 +5563,11 @@
BEDEB9481C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DofProgramWiseIndexListPerVertexCoordIndexManager.cpp; sourceTree = "<group>"; };
BEDEB9491C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = DofProgramWiseIndexListPerVertexCoordIndexManager.hpp; sourceTree = "<group>"; };
BEDEB94A1C3C0A4700B1C71B /* DofProgramWiseIndexListPerVertexCoordIndexManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = DofProgramWiseIndexListPerVertexCoordIndexManager.hxx; sourceTree = "<group>"; };
BEE1A9FA1D5B5FCB00100A39 /* InterpolatorHolder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InterpolatorHolder.cpp; sourceTree = "<group>"; };
BEE1A9FB1D5B5FCB00100A39 /* InterpolatorHolder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InterpolatorHolder.hpp; sourceTree = "<group>"; };
BEE1A9FC1D5B5FCB00100A39 /* InterpolatorHolder.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InterpolatorHolder.hxx; sourceTree = "<group>"; };
BEE1A9FE1D5B66E700100A39 /* InterpolatorHolder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = InterpolatorHolder.hpp; path = Crtp/InterpolatorHolder.hpp; sourceTree = "<group>"; };
BEE1A9FF1D5B66E700100A39 /* InterpolatorHolder.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = InterpolatorHolder.hxx; path = Crtp/InterpolatorHolder.hxx; sourceTree = "<group>"; };
BEE543591CBAE75B00AD52FA /* HappyHeart.doxygen */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = HappyHeart.doxygen; sourceTree = "<group>"; };
BEE5435A1CBAE93600AD52FA /* VariationalFormulation.doxygen */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = VariationalFormulation.doxygen; sourceTree = "<group>"; };
BEE8A2821C90488700CD25F0 /* Viscosity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Viscosity.cpp; path = Parameter/Solid/Viscosity.cpp; sourceTree = "<group>"; };
......@@ -10705,6 +10711,9 @@
BED04D4C1D22B4F100E22AC3 /* VariableHolder.cpp */,
BED04D4D1D22B4F100E22AC3 /* VariableHolder.hpp */,
BED04D4E1D22B4F100E22AC3 /* VariableHolder.hxx */,
BEE1A9FA1D5B5FCB00100A39 /* InterpolatorHolder.cpp */,
BEE1A9FB1D5B5FCB00100A39 /* InterpolatorHolder.hpp */,
BEE1A9FC1D5B5FCB00100A39 /* InterpolatorHolder.hxx */,
BEA78BAE1CE092CA00A6A185 /* Porosity */,
BEA78B901CE0925D00A6A185 /* ExplicitStep */,
BEA78B941CE0925D00A6A185 /* ImplicitStepFluid */,
......@@ -10799,6 +10808,8 @@
BEF1832D1C6DE69C008A6F1E /* Crtp */ = {
isa = PBXGroup;
children = (
BEE1A9FE1D5B66E700100A39 /* InterpolatorHolder.hpp */,
BEE1A9FF1D5B66E700100A39 /* InterpolatorHolder.hxx */,
BEF183331C6DE715008A6F1E /* Porosity.hpp */,
BEF183341C6DE715008A6F1E /* Porosity.hxx */,
BEDE212E1D22C0B800A1A6C2 /* VariableHolder.hpp */,
......@@ -13381,6 +13392,7 @@
BE82A89C1D0AA4F200D3B579 /* Darcy.cpp in Sources */,
BE5657461D3CFF8F0091F063 /* Differential.cpp in Sources */,
BE60DBFE1C7F417C007B334C /* Porosity.cpp in Sources */,
BEE1A9FD1D5B5FCB00100A39 /* InterpolatorHolder.cpp in Sources */,
BE9680051CB7F66E003F658B /* InternalFriction.cpp in Sources */,
BEAE0D251CB2AF1600CE333D /* ScalarDivVectorial.cpp in Sources */,
BE83AF3F1C73669D002C6FA3 /* BulkSolid.cpp in Sources */,
//! \file
//
//
// InterpolatorHolder.hpp
// HappyHeart
//
// Created by Sebastien Gilles on 28/06/16.
// Copyright © 2016 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HPP_
# include <memory>
# include <vector>
# include "ModelInstances/UnderDevelopment/Poromechanics/InterpolatorHolder.hpp"
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace Crtp
{
/*!
* \brief Crtp to give InterpolatorHolder access to a class (typically a VariationalFormulation).
*/
template<class DerivedT>
class InterpolatorHolder
{
public:
//! Convenient alias.
using enclosed_type = ::HappyHeart::PoromechanicsNS::InterpolatorHolder;
public:
/// \name Special members.
///@{
//! Constructor.
explicit InterpolatorHolder(const enclosed_type& enclosed_object);
//! Destructor.
~InterpolatorHolder() = default;
//! Copy constructor.
InterpolatorHolder(const InterpolatorHolder&) = default;
//! Move constructor.
InterpolatorHolder(InterpolatorHolder&&) = default;
//! Copy affectation.
InterpolatorHolder& operator=(const InterpolatorHolder&) = default;
//! Move affectation.
InterpolatorHolder& operator=(InterpolatorHolder&&) = default;
///@}
public:
//! Constant accessor to enclosed object.
const enclosed_type& GetInterpolatorHolder() const noexcept;
private:
/*!
* \brief Non constant reference to enclosed object.
*
* The object is managed by Model.
*/
const enclosed_type& interpolator_holder_;
};
} // namespace Crtp
} // namespace PoromechanicsNS
} // namespace HappyHeart
# include "ModelInstances/UnderDevelopment/Poromechanics/Crtp/InterpolatorHolder.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HPP_
//! \file
//
//
// ValueHolder.hxx
// HappyHeart
//
// Created by Sebastien Gilles on 28/06/16.
// Copyright © 2016 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HXX_
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace Crtp
{
template<class DerivedT>
InterpolatorHolder<DerivedT>::InterpolatorHolder(const enclosed_type& enclosed_object)
: interpolator_holder_(enclosed_object)
{ }
template<class DerivedT>
inline const typename InterpolatorHolder<DerivedT>::enclosed_type& InterpolatorHolder<DerivedT>
::GetInterpolatorHolder() const noexcept
{
return interpolator_holder_;
}
} // namespace Crtp
} // namespace PoromechanicsNS
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_CRTP_x_INTERPOLATOR_HOLDER_HXX_
......@@ -19,8 +19,6 @@
# include "Geometry/Domain/Domain.hpp"
# include "Operators/GlobalVariationalOperatorInstances/BilinearForm/Mass.hpp"
# include "Operators/ConformInterpolatorInstances/SubsetOrSuperset.hpp"
# include "Operators/NonConformInterpolator/FromVertexMatching.hpp"
# include "FormulationSolver/VariationalFormulation.hpp"
......@@ -37,6 +35,7 @@
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/GlobalVariationalOperatorInstances/HybridVector.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/Differential.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/Crtp/VariableHolder.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/Crtp/InterpolatorHolder.hpp"
namespace HappyHeart
......@@ -84,7 +83,8 @@ namespace HappyHeart
<
VariationalFormulation<HyperelasticLawT>
>,
public ::HappyHeart::PoromechanicsNS::Crtp::VariableHolder<VariationalFormulation<HyperelasticLawT>>
public ::HappyHeart::PoromechanicsNS::Crtp::VariableHolder<VariationalFormulation<HyperelasticLawT>>,
public ::HappyHeart::PoromechanicsNS::Crtp::InterpolatorHolder<VariationalFormulation<HyperelasticLawT>>
{
private:
......@@ -104,6 +104,10 @@ namespace HappyHeart
//! Alias to variable holder parent.
using variable_holder_parent =
::HappyHeart::PoromechanicsNS::Crtp::VariableHolder<VariationalFormulation<HyperelasticLawT>>;
//! Alias to variable holder parent.
using interpolator_holder_parent =
::HappyHeart::PoromechanicsNS::Crtp::InterpolatorHolder<VariationalFormulation<HyperelasticLawT>>;
//! Friendship to parent class, so this one can access private methods defined below through CRTP.
......@@ -138,6 +142,7 @@ namespace HappyHeart
const GlobalVector& solid_displacement,
const GlobalMatrix& tangent_solid_varf,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list,
const InterpolatorHolder& interpolator_holder,
VariableHolder& variable_holder);
//! Destructor.
......@@ -214,9 +219,6 @@ namespace HappyHeart
void ComputeDarcy(double factor, IsFullDarcy is_full_darcy, GlobalVector& out);
//! Constant accessor to the test interpolator to reduce from monolithic to only fluid velocity.
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithic2Velocity() const noexcept;
/*!
* \brief Set the differential solid velocity (and prepare differential solve accordingly).
*
......@@ -315,12 +317,6 @@ namespace HappyHeart
const ScalarParameter<>& GetFluidDensity() const noexcept;
//! Constant accessor to the test interpolator to reduce from monolithic to only fluid pressure.
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithic2Pressure() const noexcept;
//! Constant accessor to the test interpolator to expand from fluid pressure to monolithic.
const ConformInterpolatorNS::SubsetOrSuperset& GetPressure2Monolithic() const noexcept;
//! Constant accessor to the \#820 [DEV] Vector defined on fluid mass numbering subset.
const GlobalVector& GetWorkFluidMass() const noexcept;
......@@ -339,9 +335,6 @@ namespace HappyHeart
//! Constant accessor to the pressure div Velocity operator.
const GlobalVariationalOperatorNS::ScalarDivVectorial& GetPressureDivVelocity() const noexcept;
//! Constant accessor to the test interpolator to expand from fluid velocity to monolithic.
const ConformInterpolatorNS::SubsetOrSuperset& GetExpandVelocity() const noexcept;
//! Constant accessor to the mass operator for fluid mass on solid mesh.
const ::HappyHeart::GlobalVariationalOperatorNS::Mass&
GetMassOperatorFluidMassOnSolidMesh() const noexcept;
......@@ -380,35 +373,11 @@ namespace HappyHeart
GlobalMatrix& GetNonCstWorkMatrixFluidMassMatrixOnFluidMesh() noexcept;
//! Constant accessor to the interpolator to expand from fluid mass to monolithic (on fluid mesh).
const ConformInterpolatorNS::SubsetOrSuperset& GetMass2Monolithic() const noexcept;
/*!
* \brief Constant accessor to the interpolator that expands a velocity vector on the robin interface
* to the whole mesh.
*/
const ConformInterpolatorNS::SubsetOrSuperset& GetVelocityRobinInterfaceToFullMesh() const noexcept;
public:
//! Constant accessor to the interpolator to reduce from monolithic to only fluid mass (on fluid mesh).
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithic2Mass() const noexcept;
private:
//! Constant accessor to the interpolator fluid mass on solid mesh -> fluid mass on fluid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetInterpMassSolid2Fluid() const noexcept;
//! Constant accessor to the interpolator fluid mass on fluid mesh -> fluid mass on solid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetInterpMassFluid2Solid() const noexcept;
//! Constant accessor to the interpolator fluid mass on solid mesh -> fluid pressure on fluid mesh.
// \todo #820 This weird interpolator is there due to a current shortcoming of HappyHeart: currently
// test functions are assumed to use the same unknown, which is not the case for matrix (fluid mass, pressure).
const NonConformInterpolatorNS::FromVertexMatching& GetInterpFluidMassOnSolid2FluidPressure() const noexcept;
const NonConformInterpolatorNS::FromVertexMatching& GetInterpFluidPressure2FluidMassOnSolid() const noexcept;
/*!
* \brief Work matrix that gets the exact same structure as system matrix.
*
......@@ -542,22 +511,7 @@ namespace HappyHeart
*/
GlobalVector& GetNonCstNonHomogeneousRobinVector() noexcept;
/*!
* \brief Constant accessor to the interpolator that limit a velocity vector to the dofs on the robin
* interface.
*/
const ConformInterpolatorNS::SubsetOrSuperset& GetVelocityToRobinInterface() const noexcept;
//! Constant accessor to the matrix to go from (whole mesh, monolithic) to (robin interface, velocity).
const GlobalMatrix& GetMonolithic2RobinVelocity() const noexcept;
/*!
* \brief Non constant accessor to the matrix to go from (whole mesh, monolithic) to (robin interface,
* velocity).
*/
GlobalMatrix& GetNonCstMonolithic2RobinVelocity() noexcept;
//! Constant accessor to the load state correction (see Freefem script).
const GlobalVector& GetDirichletLoadStateCorrection() const noexcept;
......@@ -765,55 +719,7 @@ namespace HappyHeart
///@}
//! Interpolator fluid mass on solid mesh -> fluid mass on fluid mesh.
NonConformInterpolatorNS::FromVertexMatching::const_unique_ptr interp_mass_solid_2_fluid_ = nullptr;
//! Interpolator fluid mass on fluid mesh -> fluid mass on solid mesh.
NonConformInterpolatorNS::FromVertexMatching::const_unique_ptr interp_mass_fluid_2_solid_ = nullptr;
//! Interpolator fluid mass on solid mesh -> fluid pressure on fluid mesh.
// \todo #820 This weird interpolator is there due to a current shortcoming of HappyHeart: currently
// test functions are assumed to use the same unknown, which is not the case for matrix (fluid mass, pressure).
NonConformInterpolatorNS::FromVertexMatching::const_unique_ptr
interp_fluid_mass_fluid_on_solid_2_fluid_pressure_ = nullptr;
NonConformInterpolatorNS::FromVertexMatching::const_unique_ptr
interp_fluid_pressure_2_fluid_mass_on_solid_ = nullptr;
//! Interpolator to expand from fluid mass to monolithic (on fluid mesh.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr mass_2_monolithic_ = nullptr;
//! Interpolator to reduce from monolithic to only fluid mass (on fluid mesh).
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr monolithic_2_mass_ = nullptr;
/// \name Interpolators (#820: temporary!)
// These are there only for dev purposes (to extract submatrices and compare
// to Freefem) and can be removed once development is done. #820.
///@{
//! Test interpolator to reduce from monolithic to only fluid pressure.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr monolithic_2_pressure_ = nullptr;
//! Test interpolator to reduce from monolithic to only fluid velocity.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr monolithic_2_velocity_ = nullptr;
//! Test interpolator to expand from fluid pressure to monolithic.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr pressure_2_monolithic_ = nullptr;
//! Test interpolator to expand from fluid velocity to monolithic.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr velocity_2_monolithic_ = nullptr;
//! Interpolator that limit a velocity vector to the dofs on the robin interface.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr velocity_to_robin_interface_ = nullptr;
//! Interpolator that expands a velocity vector on the robin interface to the whole mesh.
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr velocity_robin_interface_to_full_mesh_ = nullptr;
///@}
private:
......@@ -893,10 +799,7 @@ namespace HappyHeart
GlobalMatrix::unique_ptr t32_block_ = nullptr;
//! Matrix to go from (whole mesh, monolithic) to (robin interface, velocity).
GlobalMatrix::unique_ptr monolithic_2_robin_velocity_ = nullptr;
//! T21 on the non monolithic \a FEltSpace.
GlobalMatrix::unique_ptr t21_on_fluid_mesh_ = nullptr;
......
......@@ -44,6 +44,7 @@ namespace HappyHeart
: Wrappers::Petsc::DoReuseMatrix::yes;
decltype(auto) variable_holder = this->GetVariableHolder();
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
if (variable_holder.newton_fp_index == 0)
{
......@@ -55,12 +56,12 @@ namespace HappyHeart
auto& fluid_mass_on_fluid_mesh = GetNonCstPreviousTimeStepFluidMassOnFluidMesh();
Wrappers::Petsc::MatMult(GetInterpMassSolid2Fluid().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetInterpMassSolid2Fluid().GetInterpolationMatrix(),
GetPreviousTimeStepFluidMassOnSolidMesh(),
fluid_mass_on_fluid_mesh,
__FILE__, __LINE__);
Wrappers::Petsc::MatMult(GetMass2Monolithic().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMass2Monolithic().GetInterpolationMatrix(),
fluid_mass_on_fluid_mesh,
corrected_values,
__FILE__, __LINE__);
......@@ -166,7 +167,9 @@ namespace HappyHeart
auto& solid_differential_vel_on_robin_interface = GetNonCstSolidDifferentialVelocityOnRobinInterface();
Wrappers::Petsc::MatMult(GetMonolithic2RobinVelocity(),
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
Wrappers::Petsc::MatMult(interpolator_holder.GetMonolithic2RobinVelocity(),
GetSolidDifferentialVelocity(),
solid_differential_vel_on_robin_interface,
__FILE__, __LINE__);
......@@ -250,7 +253,7 @@ namespace HappyHeart
ImplicitStepFluidNS::IsFullDarcy::no);
}
Wrappers::Petsc::MatMult(GetMonolithic2Velocity().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMonolithic2Velocity().GetInterpolationMatrix(),
monolithic_delta_darcy_vector,
delta_darcy_vector,
__FILE__, __LINE__);
......@@ -285,7 +288,7 @@ namespace HappyHeart
auto& delta_fluid_mass = GetNonCstDeltaFluidMass();
delta_fluid_mass.ZeroEntries(__FILE__, __LINE__);
Wrappers::Petsc::MatMult(GetMonolithic2Mass().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMonolithic2Mass().GetInterpolationMatrix(),
delta_mixt_variables,
delta_fluid_mass,
__FILE__, __LINE__);
......@@ -481,6 +484,7 @@ namespace HappyHeart
rhs.ZeroEntries(__FILE__, __LINE__);
decltype(auto) variable_holder = this->GetVariableHolder();
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
ComputeDarcy(1., IsFullDarcy::yes, rhs);
......@@ -508,7 +512,7 @@ namespace HappyHeart
auto& delta_fluid_mass = GetNonCstDeltaFluidMass();
decltype(auto) current_solution = GetCorrectedValues();
Wrappers::Petsc::MatMult(GetMonolithic2Mass().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMonolithic2Mass().GetInterpolationMatrix(),
current_solution,
delta_fluid_mass,
__FILE__, __LINE__);
......@@ -531,7 +535,7 @@ namespace HappyHeart
contrib_to_rhs,
__FILE__, __LINE__);
Wrappers::Petsc::MatMult(GetMass2Monolithic().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMass2Monolithic().GetInterpolationMatrix(),
contrib_to_rhs,
contribution, // replace buf_for_test by rhs!
__FILE__, __LINE__);
......@@ -584,10 +588,12 @@ namespace HappyHeart
GlobalVectorWithCoefficient contribution_with_coeff(contribution, 1.);
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
{
auto& vel_only = GetNonCstWorkFluidVelocity();
Wrappers::Petsc::MatMult(GetMonolithic2Velocity().GetInterpolationMatrix(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMonolithic2Velocity().GetInterpolationMatrix(),
GetDarcyOperator().GetVelocitySolutionParam().GetGlobalVector(),
vel_only,
__FILE__, __LINE__);
......@@ -663,7 +669,9 @@ namespace HappyHeart
auto& solid_differential_velocity = GetNonCstSolidDifferentialVelocity();
Wrappers::Petsc::MatMult(GetExpandVelocity().GetInterpolationMatrix(),
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
Wrappers::Petsc::MatMult(interpolator_holder.GetExpandVelocity().GetInterpolationMatrix(),
work_vel_fluid,
solid_differential_velocity,
__FILE__, __LINE__);
......
......@@ -106,33 +106,7 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetMonolithic2Pressure() const noexcept
{
assert(!(!monolithic_2_pressure_));
return *monolithic_2_pressure_;
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetMonolithic2Velocity() const noexcept
{
assert(!(!monolithic_2_velocity_));
return *monolithic_2_velocity_;
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetPressure2Monolithic() const noexcept
{
assert(!(!pressure_2_monolithic_));
return *pressure_2_monolithic_;
}
template<class HyperelasticLawT>
inline const GlobalVector& VariationalFormulation<HyperelasticLawT>::GetWorkFluidMass() const noexcept
{
......@@ -181,15 +155,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetExpandVelocity() const noexcept
{
assert(!(!velocity_2_monolithic_));
return *velocity_2_monolithic_;
}
template<class HyperelasticLawT>
inline const ::HappyHeart::GlobalVariationalOperatorNS::Mass& VariationalFormulation<HyperelasticLawT>
::GetMassOperatorFluidMassOnSolidMesh() const noexcept
......@@ -245,60 +210,7 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetMass2Monolithic() const noexcept
{
assert(!(!mass_2_monolithic_));
return *mass_2_monolithic_;
}
template<class HyperelasticLawT>
inline const ConformInterpolatorNS::SubsetOrSuperset& VariationalFormulation<HyperelasticLawT>
::GetMonolithic2Mass() const noexcept
{
assert(!(!monolithic_2_mass_));
return *monolithic_2_mass_;
}