Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 59aa117c authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1053 Test FromVertexMatching: improve interface of model.

parent 5a47bbb0
......@@ -30,12 +30,6 @@ namespace HappyHeart
using result_type = std::unordered_map<unsigned int, std::vector<unsigned int> >;
void PerformComputationForRankAndNumberingSubset(const PostProcessingNS::PostProcessing& post_processing,
unsigned int rank,
NumberingSubsetIndex numbering_subset,
result_type& result);
result_type PerformComputationForNumberingSubset(const GodOfDof& god_of_dof,
const PostProcessingNS::PostProcessing& post_processing,
NumberingSubsetIndex numbering_subset);
......
......@@ -24,16 +24,13 @@ namespace HappyHeart
{
void WriteInterpolatorMatrix(const NonConformInterpolatorNS::FromVertexMatching& interpolator,
void WriteInterpolatorMatrix(const GlobalMatrix& interpolation_matrix,
const std::string& output_directory,
const Wrappers::Mpi& mpi)
{
const auto& matrix = interpolator.GetInterpolationMatrix();
std::ostringstream oconv;
oconv << output_directory << "/interpolation_" << interpolator.GetInterpolationMatrix().GetColNumberingSubset().GetUniqueId() << '_'
<< interpolator.GetInterpolationMatrix().GetRowNumberingSubset().GetUniqueId() << ".hhdata";
oconv << output_directory << "/interpolation_" << interpolation_matrix.GetColNumberingSubset().GetUniqueId() << '_'
<< interpolation_matrix.GetRowNumberingSubset().GetUniqueId() << ".hhdata";
std::string output_file(oconv.str());
......@@ -45,7 +42,7 @@ namespace HappyHeart
mpi.Barrier();
matrix.View(mpi, output_file, __FILE__, __LINE__);
interpolation_matrix.View(mpi, output_file, __FILE__, __LINE__);
}
......@@ -77,10 +74,10 @@ namespace HappyHeart
const auto& output_directory = GetOutputDirectory();
const auto& mpi = MpiHappyHeart();
WriteInterpolatorMatrix(*velocity_solid_2_fluid_,
WriteInterpolatorMatrix(GetMatrixVelocitySolidToFluid(),
output_directory,
mpi);
WriteInterpolatorMatrix(*pressure_solid_2_fluid_,
WriteInterpolatorMatrix(GetMatrixPressureSolidToFluid(),
output_directory,
mpi);
......
......@@ -111,9 +111,21 @@ namespace HappyHeart
//! Output directory.
const std::string& GetOutputDirectory() const noexcept;
//! Interpolation matrix to interpolate velocity from solid mesh to fluid mesh.
const GlobalMatrix& GetMatrixVelocitySolidToFluid() const noexcept;
//! Interpolation matrix to interpolate pressure from solid mesh to fluid mesh.
const GlobalMatrix& GetMatrixPressureSolidToFluid() const noexcept;
private:
//! Vertex matching operator to interpolate velocity from solid mesh to fluid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetOperatorVelocitySolidToFluid() const noexcept;
//! Vertex matching operator to interpolate pressure from solid mesh to fluid mesh.
const NonConformInterpolatorNS::FromVertexMatching& GetOperatorPressureSolidToFluid() const noexcept;
private:
private:
/*!
......
......@@ -40,6 +40,34 @@ namespace HappyHeart
{
return output_directory_;
}
inline const NonConformInterpolatorNS::FromVertexMatching& Model
::GetOperatorVelocitySolidToFluid() const noexcept
{
assert(!(!velocity_solid_2_fluid_));
return *velocity_solid_2_fluid_;
}
inline const NonConformInterpolatorNS::FromVertexMatching& Model
::GetOperatorPressureSolidToFluid() const noexcept
{
assert(!(!pressure_solid_2_fluid_));
return *pressure_solid_2_fluid_;
}
inline const GlobalMatrix& Model::GetMatrixVelocitySolidToFluid() const noexcept
{
return GetOperatorVelocitySolidToFluid().GetInterpolationMatrix();
}
inline const GlobalMatrix& Model::GetMatrixPressureSolidToFluid() const noexcept
{
return GetOperatorPressureSolidToFluid().GetInterpolationMatrix();
}
} // namespace TestVertexMatchingNS
......
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