Commit 9e9acd58 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#982 Small modifications related to #982, and a bit of rebranding.

parent 1858b4ed
......@@ -48,6 +48,7 @@ namespace HappyHeart
}
# ifndef NDEBUG
void AssertSameNumberingSubset(const GlobalMatrix& matrix1,
const GlobalMatrix& matrix2)
{
......@@ -63,6 +64,7 @@ namespace HappyHeart
<< matrix.GetRowNumberingSubset().GetUniqueId() << " and col -> "
<< matrix.GetColNumberingSubset().GetUniqueId() << std::endl;
}
# endif // NDEBUG
} // namespace HappyHeart
......@@ -79,7 +79,7 @@ namespace HappyHeart
* A VertexMatching interpolator actually requires two such class: one for source and the other for target.
*
* \attention This class is intended at a very specific point of GodOfDof initialization (namely in GodOfDof::Init2(),
* after some data have been initializaed but before any processor-wise redutciton occurred).
* after some data have been initialized but before any processor-wise reduction occurred).
*/
class DofProgramWiseIndexListPerVertexCoordIndex
: public ::HappyHeart::Crtp::UniqueId<DofProgramWiseIndexListPerVertexCoordIndex, UniqueIdNS::AssignationMode::manual>
......
......@@ -128,7 +128,7 @@ namespace HappyHeart
if (on_solid_tag_ != GetValueTag())
{
// Project current onto solid mesh.
Wrappers::Petsc::MatMult(GetInterpolationFluid2Solid(),
Wrappers::Petsc::MatMult(GetInterpolationFluidToSolid(),
new_value,
ret,
__FILE__, __LINE__);
......
......@@ -195,7 +195,7 @@ namespace HappyHeart
//! Interpolator fluid pressure fluid -> solid.
const GlobalMatrix& GetInterpolationFluid2Solid() const noexcept;
const GlobalMatrix& GetInterpolationFluidToSolid() const noexcept;
private:
......
......@@ -56,7 +56,7 @@ namespace HappyHeart
}
inline const GlobalMatrix& FluidPressure::GetInterpolationFluid2Solid() const noexcept
inline const GlobalMatrix& FluidPressure::GetInterpolationFluidToSolid() const noexcept
{
return interpolation_fluid_2_solid_;
}
......
......@@ -49,7 +49,7 @@ namespace HappyHeart
auto& fluid_mass_on_fluid_mesh = fluid_mass_data.GetNonCstCurrentOnFluid();
Wrappers::Petsc::MatMult(interpolator_holder.GetMatrixFluidmassSolid2Fluid(),
Wrappers::Petsc::MatMult(interpolator_holder.GetMatrixFluidmassSolidToFluid(),
fluid_mass_data.GetCurrent(),
fluid_mass_on_fluid_mesh,
__FILE__, __LINE__);
......
......@@ -36,10 +36,10 @@ namespace HappyHeart
{
auto& t11_in_monolithic = GetNonCstT11InMonolithic();
decltype(auto) god_of_dof = parent::GetGodOfDof();
decltype(auto) fluid_god_of_dof = parent::GetGodOfDof();
decltype(auto) numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass_velocity_pressure));
fluid_god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_mass_velocity_pressure));
auto& system_matrix = parent::GetNonCstSystemMatrix(numbering_subset, numbering_subset);
decltype(auto) interpolator_holder = this->GetInterpolatorHolder();
......@@ -75,27 +75,28 @@ namespace HappyHeart
GodOfDofManager::GetInstance().GetGodOfDof(EnumUnderlyingType(MeshIndex::solid));
AssertMatrixRespectPattern(solid_god_of_dof,
fluid_mass_matrix_on_solid_mesh,
__FILE__, __LINE__);
fluid_mass_matrix_on_solid_mesh,
__FILE__, __LINE__);
}
#endif // NDEBUG
auto& t11 = GetNonCstFluidMassMatrixOnFluidMesh();
Wrappers::Petsc::PtAP(fluid_mass_matrix_on_solid_mesh,
interpolator_holder.GetMatrixFluidmassFluid2Solid(),
interpolator_holder.GetMatrixFluidmassFluidToSolid(),
t11,
__FILE__, __LINE__,
do_reuse_matrix);
#ifndef NDEBUG
AssertMatrixRespectPattern(god_of_dof,
AssertMatrixRespectPattern(fluid_god_of_dof,
t11,
__FILE__, __LINE__);
#endif // NDEBUG
decltype(auto) monolithic_to_mass = interpolator_holder.GetMatrixMonolithicToFluidmassOnFluid();
decltype(auto) monolithic_to_mass =
interpolator_holder.GetMatrixMonolithicToFluidmassOnFluid();
Wrappers::Petsc::PtAP(t11,
monolithic_to_mass,
......@@ -104,7 +105,7 @@ namespace HappyHeart
do_reuse_matrix);
#ifndef NDEBUG
AssertMatrixRespectPattern(god_of_dof,
AssertMatrixRespectPattern(fluid_god_of_dof,
t11_in_monolithic,
__FILE__, __LINE__);
#endif // NDEBUG
......@@ -169,7 +170,7 @@ namespace HappyHeart
__FILE__, __LINE__,
do_reuse_matrix);
Wrappers::Petsc::MatMatMult(interpolator_holder.GetMatrixFluidmassSolid2Fluid(),
Wrappers::Petsc::MatMatMult(interpolator_holder.GetMatrixFluidmassSolidToFluid(),
*intermediate_t21_,
t21_on_fluid_mesh,
__FILE__, __LINE__,
......
......@@ -261,7 +261,7 @@ namespace HappyHeart
std::make_unique<GlobalMatrix>(target_numbering_subset, source_numbering_subset);
Wrappers::Petsc::MatMatMult(GetMatrixFluidmassOnFluidToMonolithic(),
GetFluidmassSolid2Fluid().GetInterpolationMatrix(),
GetFluidmassSolidToFluid().GetInterpolationMatrix(),
*matrix_fluidmass_on_solid_to_monolithic_,
__FILE__, __LINE__);
......@@ -269,7 +269,7 @@ namespace HappyHeart
matrix_monolithic_to_fluidmass_on_solid_ =
std::make_unique<GlobalMatrix>(source_numbering_subset, target_numbering_subset);
Wrappers::Petsc::MatMatMult(GetMatrixFluidmassFluid2Solid(),
Wrappers::Petsc::MatMatMult(GetMatrixFluidmassFluidToSolid(),
GetMatrixMonolithicToFluidmassOnFluid(),
*matrix_monolithic_to_fluidmass_on_solid_,
__FILE__, __LINE__);
......@@ -288,7 +288,7 @@ namespace HappyHeart
std::make_unique<GlobalMatrix>(target_numbering_subset, source_numbering_subset);
Wrappers::Petsc::MatMatMult(GetMatrixFluidPressureOnFluidToMonolithic(),
GetFluidPressureSolid2Fluid().GetInterpolationMatrix(),
GetFluidPressureSolidToFluid().GetInterpolationMatrix(),
*matrix_pressure_on_solid_to_monolithic_,
__FILE__, __LINE__);
}
......
......@@ -151,10 +151,10 @@ namespace HappyHeart
///@{
//! Interpolation matrix that performs: fluid mass on solid mesh -> fluid mass on fluid mesh.
const GlobalMatrix& GetMatrixFluidmassSolid2Fluid() const noexcept;
const GlobalMatrix& GetMatrixFluidmassSolidToFluid() const noexcept;
//! Interpolation matrix that performs: fluid pressure on solid mesh -> fluid pressure on fluid mesh.
const GlobalMatrix& GetMatrixFluidPressureSolid2Fluid() const noexcept;
const GlobalMatrix& GetMatrixFluidPressureSolidToFluid() const noexcept;
//! Interpolation matrix that performs: porosity on solid -> porosity on fluid.
const GlobalMatrix& GetMatrixPorositySolidToFluid() const noexcept;
......@@ -170,10 +170,10 @@ namespace HappyHeart
//! Interpolation matrix that performs: fluid mass on fluid mesh -> fluid mass on solid mesh.
const GlobalMatrix& GetMatrixFluidmassFluid2Solid() const noexcept;
const GlobalMatrix& GetMatrixFluidmassFluidToSolid() const noexcept;
//! Interpolation matrix that performs: fluid pressure on fluid mesh -> fluid pressure on solid mesh.
const GlobalMatrix& GetMatrixFluidPressureFluid2Solid() const noexcept;
const GlobalMatrix& GetMatrixFluidPressureFluidToSolid() const noexcept;
///@}
......@@ -278,10 +278,10 @@ namespace HappyHeart
///@{
//! Interpolator fluid mass on solid mesh -> fluid mass on fluid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetFluidmassSolid2Fluid() const noexcept;
const NonConformInterpolatorNS::FromVertexMatching& GetFluidmassSolidToFluid() const noexcept;
//! Interpolator fluid pressure on solid mesh -> fluid pressure on fluid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetFluidPressureSolid2Fluid() const noexcept;
const NonConformInterpolatorNS::FromVertexMatching& GetFluidPressureSolidToFluid() const noexcept;
//! Interpolator porosity on solid -> porosity on fluid.
const NonConformInterpolatorNS::FromVertexMatching& GetPorositySolidToFluid() const noexcept;
......@@ -297,10 +297,10 @@ namespace HappyHeart
//! Interpolator fluid mass on fluid mesh -> fluid mass on solid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetFluidmassFluid2Solid() const noexcept;
const NonConformInterpolatorNS::FromVertexMatching& GetFluidmassFluidToSolid() const noexcept;
//! Interpolator fluid pressure on fluid mesh -> fluid pressure on solid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetFluidPressureFluid2Solid() const noexcept;
const NonConformInterpolatorNS::FromVertexMatching& GetFluidPressureFluidToSolid() const noexcept;
///@}
......
......@@ -79,15 +79,15 @@ namespace HappyHeart
}
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidmassSolid2Fluid() const noexcept
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidmassSolidToFluid() const noexcept
{
return GetFluidmassSolid2Fluid().GetInterpolationMatrix();
return GetFluidmassSolidToFluid().GetInterpolationMatrix();
}
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidPressureSolid2Fluid() const noexcept
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidPressureSolidToFluid() const noexcept
{
return GetFluidPressureSolid2Fluid().GetInterpolationMatrix();
return GetFluidPressureSolidToFluid().GetInterpolationMatrix();
}
......@@ -139,15 +139,15 @@ namespace HappyHeart
}
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidmassFluid2Solid() const noexcept
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidmassFluidToSolid() const noexcept
{
return GetFluidmassFluid2Solid().GetInterpolationMatrix();
return GetFluidmassFluidToSolid().GetInterpolationMatrix();
}
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidPressureFluid2Solid() const noexcept
inline const GlobalMatrix& InterpolatorHolder::GetMatrixFluidPressureFluidToSolid() const noexcept
{
return GetFluidPressureFluid2Solid().GetInterpolationMatrix();
return GetFluidPressureFluidToSolid().GetInterpolationMatrix();
}
......@@ -168,7 +168,7 @@ namespace HappyHeart
inline const NonConformInterpolatorNS::FromVertexMatching& InterpolatorHolder
::GetFluidmassSolid2Fluid() const noexcept
::GetFluidmassSolidToFluid() const noexcept
{
assert(!(!fluidmass_solid_to_fluid_));
return *fluidmass_solid_to_fluid_;
......@@ -176,16 +176,15 @@ namespace HappyHeart
inline const NonConformInterpolatorNS::FromVertexMatching& InterpolatorHolder
::GetFluidmassFluid2Solid() const noexcept
::GetFluidmassFluidToSolid() const noexcept
{
assert(!(!fluidmass_fluid_to_solid));
return *fluidmass_fluid_to_solid;
}
inline const NonConformInterpolatorNS::FromVertexMatching& InterpolatorHolder
::GetFluidPressureFluid2Solid() const noexcept
::GetFluidPressureFluidToSolid() const noexcept
{
assert(!(!fluid_pressure_fluid_2_solid_));
return *fluid_pressure_fluid_2_solid_;
......@@ -193,7 +192,7 @@ namespace HappyHeart
inline const NonConformInterpolatorNS::FromVertexMatching& InterpolatorHolder
::GetFluidPressureSolid2Fluid() const noexcept
::GetFluidPressureSolidToFluid() const noexcept
{
assert(!(!fluid_pressure_solid_2_fluid_));
return *fluid_pressure_solid_2_fluid_;
......
......@@ -70,7 +70,7 @@ namespace HappyHeart
fluid_pressure_data_ =
std::make_unique<DataNS::FluidPressure>(monolithic_data,
interpolator_holder.GetMatrixMonolithicToFluidPressureOnFluid(),
interpolator_holder.GetMatrixFluidPressureFluid2Solid()
interpolator_holder.GetMatrixFluidPressureFluidToSolid()
);
}
......@@ -97,9 +97,6 @@ namespace HappyHeart
monolithic_data.SetInitialValue(GetFluidmassData(),
interpolator_holder,
fluid_density * phi_0);
monolithic_data.GetNew().View(this->MpiHappyHeart(),
"/Users/sebastien/Desktop/tmp.hhdata",
__FILE__, __LINE__);
// Set as well fluid_mass_data!
decltype(auto) fluid_mass_data = GetNonCstFluidmassData();
......
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