From 0d0645f68df70c2aa4b645f03dd2182b4769c610 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 23 May 2020 19:33:38 +0200 Subject: [PATCH] Update to deal.II 9.1: Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity --- .../CMakeLists.txt | 2 +- .../viscoelastic_strip_with_hole.cc | 24 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/CMakeLists.txt b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/CMakeLists.txt index 4eb8a86..7a38132 100644 --- a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/CMakeLists.txt +++ b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/CMakeLists.txt @@ -19,7 +19,7 @@ SET(CLEAN_UP_FILES CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) -FIND_PACKAGE(deal.II 9.0 QUIET +FIND_PACKAGE(deal.II 9.1 QUIET HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR} ) IF(NOT ${deal.II_FOUND}) diff --git a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc index 8f42a11..4da4d7c 100644 --- a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc +++ b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc @@ -44,8 +44,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -743,10 +743,10 @@ namespace ViscoElasStripHole const QGauss qf_face; const unsigned int n_q_points; const unsigned int n_q_points_f; - ConstraintMatrix constraints; - LA::BlockSparseMatrix tangent_matrix; - LA::MPI::BlockVector system_rhs; - LA::MPI::BlockVector solution_n; + AffineConstraints constraints; + LA::BlockSparseMatrix tangent_matrix; + LA::MPI::BlockVector system_rhs; + LA::MPI::BlockVector solution_n; struct Errors { Errors() @@ -832,7 +832,7 @@ namespace ViscoElasStripHole make_grid(); setup_system(solution_delta); { - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.close(); const ComponentSelectFunction J_mask (J_component, n_components); @@ -1249,7 +1249,7 @@ namespace ViscoElasStripHole std::vector subdivision_width; subdivision_width.push_back(internal_width/2.0); const double width_remaining = (width - internal_width)/2.0; - const unsigned int n_subs = std::max(1.0,std::ceil(width_remaining/(internal_width/2.0))); + const unsigned int n_subs = static_cast(std::max(1.0,std::ceil(width_remaining/(internal_width/2.0)))); Assert(n_subs>0, ExcInternalError()); for (unsigned int s=0; s subdivision_length; subdivision_length.push_back(internal_width/2.0); const double length_remaining = (length - internal_width)/2.0; - const unsigned int n_subs = std::max(1.0,std::ceil(length_remaining/(internal_width/2.0))); + const unsigned int n_subs = static_cast(std::max(1.0,std::ceil(length_remaining/(internal_width/2.0)))); Assert(n_subs>0, ExcInternalError()); for (unsigned int s=0; s(parameters.load_time/time.get_delta_t()); const double delta_u_y = delta_length/2.0/n_stretch_steps; VectorTools::interpolate_boundary_values(dof_handler, boundary_id, @@ -1979,7 +1979,8 @@ namespace ViscoElasStripHole tangent_matrix.block(J_block, p_block), LA::PreconditionJacobi::AdditionalData()); ReductionControl solver_control_K_Jp_inv ( - tangent_matrix.block(J_block, p_block).m() * parameters.max_iterations_lin, + static_cast(tangent_matrix.block(J_block, p_block).m() + * parameters.max_iterations_lin), 1.0e-30, 1e-6); dealii::SolverCG solver_K_Jp_inv (solver_control_K_Jp_inv); @@ -1998,7 +1999,8 @@ namespace ViscoElasStripHole true /*elliptic*/, (parameters.poly_degree > 1 /*higher_order_elements*/)) ); ReductionControl solver_control_K_con_inv ( - tangent_matrix.block(u_block, u_block).m() * parameters.max_iterations_lin, + static_cast(tangent_matrix.block(u_block, u_block).m() + * parameters.max_iterations_lin), 1.0e-30, parameters.tol_lin); dealii::SolverSelector solver_K_con_inv; solver_K_con_inv.select(parameters.type_lin); -- 2.39.5