Commit 7237c931 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 SolidOnFluidMesh: lighten the constructor arguments, as some of them...

#820 SolidOnFluidMesh: lighten the constructor arguments, as some of them could be reached directly from the god of dof.
parent fa23bc60
......@@ -78,19 +78,8 @@ namespace HappyHeart
{
const auto& numbering_subset_p1 =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::solid_displacement_in_fluid_mesh));
const auto& numbering_subset_p1b =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity));
solid_on_fluid_mesh_ =
std::make_unique<Private::SolidOnFluidMesh>(input_parameter_data,
god_of_dof,
numbering_subset_p1,
numbering_subset_p1b,
std::make_unique<Private::SolidOnFluidMesh>(god_of_dof,
GetSolidDisplacement(),
time_manager);
}
......
......@@ -34,10 +34,7 @@ namespace HappyHeart
{
SolidOnFluidMesh::SolidOnFluidMesh(const InputParameterList& input_parameter_data,
const GodOfDof& god_of_dof,
const NumberingSubset& numbering_subset_p1,
const NumberingSubset& numbering_subset_p1b,
SolidOnFluidMesh::SolidOnFluidMesh(const GodOfDof& god_of_dof,
const GlobalVector& solid_displacement_on_solid_mesh,
const TimeManager& time_manager)
: time_manager_(time_manager),
......@@ -48,16 +45,27 @@ namespace HappyHeart
half_sum_velocity_on_solid_mesh_ = std::make_unique<GlobalVector>(solid_displacement_on_solid_mesh);
current_displacement_ = std::make_unique<GlobalVector>(numbering_subset_p1);
{
const auto& numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::solid_displacement_in_fluid_mesh));
current_displacement_ = std::make_unique<GlobalVector>(numbering_subset);
}
auto& current_displacement = GetNonCstCurrentDisplacement();
AllocateGlobalVector(god_of_dof, current_displacement);
half_sum_velocity_ = std::make_unique<GlobalVector>(numbering_subset_p1b);
{
const auto& numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_velocity));
half_sum_velocity_ = std::make_unique<GlobalVector>(numbering_subset);
}
auto& half_sum_velocity = GetNonCstHalfSumVelocity();
AllocateGlobalVector(god_of_dof, half_sum_velocity);
InitInterpolationMatrix(input_parameter_data, god_of_dof);
InitInterpolationMatrix(god_of_dof);
}
......@@ -101,18 +109,8 @@ namespace HappyHeart
}
void SolidOnFluidMesh::InitInterpolationMatrix(const InputParameterList& input_parameter_data,
const GodOfDof& god_of_dof)
void SolidOnFluidMesh::InitInterpolationMatrix(const GodOfDof& god_of_dof)
{
// auto& init_vertex_matching_manager =
// ::HappyHeart::Private::DofProgramWiseIndexListPerVertexCoordIndexManager::GetInstance();
//
// NonConformInterpolatorNS::FromVertexMatching vertex_matching
// (input_parameter_data,
// init_vertex_matching_manager.GetDofProgramWiseIndexListPerVertexCoordIndex(EnumUnderlyingType(InitVertexMatchingInterpolator::solid)),
// init_vertex_matching_manager.GetDofProgramWiseIndexListPerVertexCoordIndex(EnumUnderlyingType(InitVertexMatchingInterpolator::fluid)));
//
decltype(auto) felt_space = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::fluid));
decltype(auto) unknown_manager = UnknownManager::GetInstance();
......@@ -144,10 +142,6 @@ namespace HappyHeart
GetNonCstMatrixSolidToFluid().CompleteCopy(interpolator_P1_to_P1b.GetInterpolationMatrix(),
__FILE__, __LINE__);
// Wrappers::Petsc::MatMatMult(
// vertex_matching.GetInterpolationMatrix(),
// GetNonCstMatrixSolidToFluid(),
// __FILE__, __LINE__);
}
......
......@@ -75,18 +75,11 @@ namespace HappyHeart
/*!
* \brief Constructor.
*
* \param[in] input_parameter_data Objects which stores the content extracted from the input parameter
* file.
* \param[in] god_of_dof God of dof related to the fluid mesh.
* \param[in] numbering_subset_p1 Numbering subset upon which solid displacement is defined (on fluid god of dof...)
* \param[in] numbering_subset_p1b Numbering subset upon which fluid velocity is defined.
* \param[in] solid_displacement_on_solid_mesh Solid displacement as computed on the solid mesh.
* \param[in] time_manager Time manager.
*/
explicit SolidOnFluidMesh(const InputParameterList& input_parameter_data,
const GodOfDof& god_of_dof,
const NumberingSubset& numbering_subset_p1,
const NumberingSubset& numbering_subset_p1b,
explicit SolidOnFluidMesh(const GodOfDof& god_of_dof,
const GlobalVector& solid_displacement_on_solid_mesh,
const TimeManager& time_manager);
......@@ -136,12 +129,9 @@ namespace HappyHeart
* \brief Init the interpolation matrix that transforms solid displacement on solid mesh (P1) into
* P1b displacement on fluid mesh.
*
* \param[in] input_parameter_data Objects which stores the content extracted from the input parameter
* file.
* \param[in] god_of_dof God of dof related to the fluid mesh.
*/
void InitInterpolationMatrix(const InputParameterList& input_parameter_data,
const GodOfDof& god_of_dof);
void InitInterpolationMatrix(const GodOfDof& god_of_dof);
private:
......
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