Commit 013c828e authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1022 One difference with old T21 is that now integration is performed on...

#1022 One difference with old T21 is that now integration is performed on fluid mesh, not on solid one. Still not working.
parent 6a80f4d0
......@@ -512,13 +512,7 @@ namespace HappyHeart
GlobalMatrix& GetNonCstT22Block() noexcept;
/*!
* \brief Non constant accessor to the matrix into which mass operator for fluid mass / fluid pressure
* on solid mesh is assembled.
// \todo #820 Should be in interpolator_holder.
*/
GlobalMatrix& GetNonCstFluidMassPressureMatrixOnSolidMesh() noexcept;
//! Non constant accessor to the t21 on the non monolithic FEltSpace.
GlobalMatrix& GetNonCstT21OnFluidMesh() noexcept;
......@@ -647,9 +641,6 @@ namespace HappyHeart
//! Matrix into which mass operator for fluid mass on solid mesh is assembled.
GlobalMatrix::unique_ptr fluid_mass_matrix_on_solid_mesh_ = nullptr;
//! Matrix into which mass operator for fluid mass / fluid pressure on solid mesh is assembled.
GlobalMatrix::unique_ptr fluid_mass_pressure_matrix_on_solid_mesh_ = nullptr;
//! Matrix obtained from \a fluid_mass_matrix_on_solid_mesh_ following interpolation.
GlobalMatrix::unique_ptr fluid_mass_matrix_on_fluid_mesh_ = nullptr;
......@@ -694,9 +685,6 @@ namespace HappyHeart
GlobalMatrix::unique_ptr t22_in_monolithic_ = nullptr;
//! Intermediate work matrix to transfer T21 from solid to fluid.
GlobalMatrix::unique_ptr intermediate_t21_ = nullptr;
//! Intermediate work matrix to transfer T21 from block to monolithic.
GlobalMatrix::unique_ptr intermediate_t21_monolithic_ = nullptr;
......
......@@ -211,14 +211,6 @@ namespace HappyHeart
}
template<class HyperelasticLawT>
inline GlobalMatrix& VariationalFormulation<HyperelasticLawT>
::GetNonCstFluidMassPressureMatrixOnSolidMesh() noexcept
{
assert(!(!fluid_mass_pressure_matrix_on_solid_mesh_));
return *fluid_mass_pressure_matrix_on_solid_mesh_;
}
template<class HyperelasticLawT>
inline const GlobalVariationalOperatorNS::T21<HyperelasticLawT>& VariationalFormulation<HyperelasticLawT>
::GetT21Operator() const noexcept
......
......@@ -277,29 +277,15 @@ namespace HappyHeart
break;
case DoRecomputeBlock::yes:
{
auto& t21_on_solid_mesh = GetNonCstFluidMassPressureMatrixOnSolidMesh();
t21_on_solid_mesh.ZeroEntries(__FILE__, __LINE__);
auto& t21_on_fluid_mesh = GetNonCstT21OnFluidMesh();
t21_on_fluid_mesh.ZeroEntries(__FILE__, __LINE__);
{
GlobalMatrixWithCoefficient matrix_with_coeff(t21_on_solid_mesh, 1.);
GlobalMatrixWithCoefficient matrix_with_coeff(t21_on_fluid_mesh, 1.);
GetT21Operator().Assemble(std::make_tuple(std::ref(matrix_with_coeff)));
}
auto& t21_on_fluid_mesh = GetNonCstT21OnFluidMesh();
Wrappers::Petsc::MatMatMult(t21_on_solid_mesh,
interpolator_holder.GetMatrixFluidmassFluidToSolid(),
*intermediate_t21_,
__FILE__, __LINE__,
do_reuse_matrix);
Wrappers::Petsc::MatMatMult(interpolator_holder.GetMatrixFluidmassSolidToFluid(),
*intermediate_t21_,
t21_on_fluid_mesh,
__FILE__, __LINE__,
do_reuse_matrix);
# ifndef NDEBUG
AssertMatrixRespectPattern(god_of_dof, t21_on_fluid_mesh, __FILE__, __LINE__);
# endif // NDEBUG
......
......@@ -95,7 +95,6 @@ namespace HappyHeart
t22_in_monolithic_ = std::make_unique<GlobalMatrix>(parent::GetSystemMatrix(numbering_subset, numbering_subset));
intermediate_t12_ = std::make_unique<GlobalMatrix>(numbering_subset, numbering_subset); // Numbering subset inexact but we don't care here!
intermediate_t21_ = std::make_unique<GlobalMatrix>(numbering_subset, numbering_subset); // Numbering subset inexact but we don't care here!
t12_block_ =
std::make_unique<GlobalMatrix>(god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass)),
......@@ -111,7 +110,8 @@ namespace HappyHeart
AllocateGlobalMatrix(god_of_dof, GetNonCstT22Block());
AllocateGlobalMatrix(god_of_dof, GetNonCstT12Block());
AllocateGlobalMatrix(god_of_dof, *t21_on_fluid_mesh_);
{
decltype(auto) god_of_dof_manager = GodOfDofManager::GetInstance();
......@@ -126,14 +126,6 @@ namespace HappyHeart
std::make_unique<GlobalMatrix>(fluid_mass_numbering_subset, fluid_mass_numbering_subset);
AllocateGlobalMatrix(solid_god_of_dof, GetNonCstFluidMassMatrixOnSolidMesh());
// \todo #820 It would be more accurate to use another numbering subset for test function, but
// it needs first #905 to be completed! So currently it's more of a hack, with the interpolator
// in charge of cleaning-up...
fluid_mass_pressure_matrix_on_solid_mesh_ =
std::make_unique<GlobalMatrix>(fluid_mass_numbering_subset, fluid_mass_numbering_subset);
AllocateGlobalMatrix(solid_god_of_dof, GetNonCstFluidMassPressureMatrixOnSolidMesh());
// Do not allocate this one on purpose: it will be set by a result of MatMatMult operation.
fluid_mass_interpolation_matrix_ =
std::make_unique<GlobalMatrix>(numbering_subset, fluid_mass_numbering_subset);
......
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