Commit 302e85a3 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#723 FSI/Newton: get the beginning of the first loop to work.

parent 79d1b077
......@@ -264,7 +264,7 @@ EssentialBoundaryCondition3 = {
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${HOME}/Codes/HappyHeart/Data/Mesh/ThTotal2Dsmall.mesh",
mesh = "${HOME}/Codes/HappyHeart/Data/Mesh/ThTotal2D.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
......@@ -1021,7 +1021,8 @@ Result = {
-- Directory in which all the results will be written.
-- Expected format: "VALUE"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/FSI_EI/Newton"
output_directory = "/Volumes/Data/${USER}/HappyHeart/Results/FSI_EI"
--/Newton"
} -- Result
......
......@@ -197,14 +197,6 @@ namespace HappyHeart
auto& system_matrix = GetNonCstSystemMatrix(numbering_subset, numbering_subset);
system_matrix.Copy(residual_matrix, __FILE__, __LINE__);
std::cout << "EXPLICIT MATRIX = " << std::endl;
system_matrix.View(this->MpiHappyHeart(), "/Users/sebastien/Desktop/Explicit.m",
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB
);
}
......
......@@ -171,7 +171,7 @@ namespace HappyHeart
solid_to_fluid_velocity_on_fsi_interpolator_->Init();
solid_to_fluid_velocity_on_fsi_interpolator_->GetInterpolationMatrix().View(mpi, __FILE__, __LINE__);
// solid_to_fluid_velocity_on_fsi_interpolator_->GetInterpolationMatrix().View(mpi, __FILE__, __LINE__);
solid_velocity_on_interface_ = std::make_unique<GlobalVector>(fsi_solid_numbering_subset);
HappyHeart::AllocateGlobalVector(god_of_dof, *solid_velocity_on_interface_);
......@@ -246,6 +246,10 @@ namespace HappyHeart
template<class SolidVariationalFormulationPolicyT>
void Model<SolidVariationalFormulationPolicyT>::SupplFinalizeStep()
{
// \todo #723
std::cout << "[WARNING] Fluid velocity should be recomputed once the coupling Newton converged!" << std::endl;
const auto& mpi = this->MpiHappyHeart();
const auto& time_manager = this->GetTimeManager();
......@@ -257,8 +261,7 @@ namespace HappyHeart
explicit_step_formulation.GetSystemSolution(numbering_subset).template
Print<MpiScale::processor_wise>(mpi, output_dir + "solution_explicit_fluid.hhdata",
__FILE__, __LINE__);
__FILE__, __LINE__);
}
{
......
......@@ -38,6 +38,13 @@ namespace HappyHeart
UpdateFluidDirichletCondition();
ImplicitFluidStep();
ComputeSolidResidual();
ImplicitSolidStep(output_dir);
// do
// {
// const std::string aitken_output_dir = output_dir + "/aitken_" + std::to_string(aitken_index) + "/";
......@@ -154,8 +161,6 @@ namespace HappyHeart
std::cout << "=================\n";
}
{
auto& implicit_step_fluid_formulation = this->GetNonCstImplicitStepFluidVariationalFormulation();
const auto& numbering_subset = implicit_step_fluid_formulation.GetNumberingSubset();
......@@ -165,20 +170,12 @@ namespace HappyHeart
implicit_step_fluid_formulation.DefineFormulation();
// implicit_step_fluid_formulation.GetSystemRhs(numbering_subset).template Print<MpiScale::processor_wise>(mpi, aitken_output_dir + "implicit_step_fluid_rhs.hhdata", __FILE__, __LINE__);
implicit_step_fluid_formulation.template ApplyEssentialBoundaryCondition<OperatorNS::Nature::nonlinear>(numbering_subset,
numbering_subset);
// implicit_step_fluid_formulation.GetSystemMatrix(numbering_subset, numbering_subset).View(mpi, aitken_output_dir + "implicit_step_fluid_matrix.hhdata", __FILE__, __LINE__);
implicit_step_fluid_formulation.template SolveLinear<IsFactorized::no>(numbering_subset, numbering_subset);
implicit_step_fluid_formulation.WriteSolution(time_manager, numbering_subset);
// implicit_step_fluid_formulation.GetSystemSolution(numbering_subset).template Print<MpiScale::processor_wise>(mpi, aitken_output_dir + "implicit_step_fluid_solution.hhdata", __FILE__, __LINE__);
#ifndef NDEBUG
Wrappers::Petsc::AssertNumericValues(implicit_step_fluid_formulation.GetSystemRhs(numbering_subset), __FILE__, __LINE__);
Wrappers::Petsc::AssertNumericValues(implicit_step_fluid_formulation.GetSystemSolution(numbering_subset), __FILE__, __LINE__);
......
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