This commit is contained in:
@@ -493,6 +493,50 @@ contains
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine fem_get_contact_cache_stats
|
||||
|
||||
subroutine fem_record_convergence(increment, iteration, residual_norm, &
|
||||
correction_norm, converged)
|
||||
integer, intent(in) :: increment
|
||||
integer, intent(in) :: iteration
|
||||
real(rk), intent(in) :: residual_norm
|
||||
real(rk), intent(in) :: correction_norm
|
||||
logical, intent(in) :: converged
|
||||
|
||||
convergence_increment = increment
|
||||
convergence_iteration = iteration
|
||||
convergence_residual_norm = residual_norm
|
||||
convergence_correction_norm = correction_norm
|
||||
convergence_converged = converged
|
||||
end subroutine fem_record_convergence
|
||||
|
||||
subroutine fem_get_convergence_status(increment, iteration, residual_norm, &
|
||||
correction_norm, converged, ierr)
|
||||
integer, intent(out) :: increment
|
||||
integer, intent(out) :: iteration
|
||||
real(rk), intent(out) :: residual_norm
|
||||
real(rk), intent(out) :: correction_norm
|
||||
logical, intent(out) :: converged
|
||||
integer, intent(out) :: ierr
|
||||
|
||||
increment = 0
|
||||
iteration = 0
|
||||
residual_norm = ZERO
|
||||
correction_norm = ZERO
|
||||
converged = .false.
|
||||
|
||||
if (.not. api_initialized) then
|
||||
call error_set(FEM_ERR_INTERNAL, &
|
||||
'fem_get_convergence_status called before fem_initialize', ierr)
|
||||
return
|
||||
end if
|
||||
|
||||
increment = convergence_increment
|
||||
iteration = convergence_iteration
|
||||
residual_norm = convergence_residual_norm
|
||||
correction_norm = convergence_correction_norm
|
||||
converged = convergence_converged
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine fem_get_convergence_status
|
||||
|
||||
subroutine fem_get_boundary_facet_count(num_facets, max_face_nodes, ierr)
|
||||
integer, intent(out) :: num_facets
|
||||
integer, intent(out) :: max_face_nodes
|
||||
@@ -1236,6 +1280,7 @@ contains
|
||||
call implicit_solve_linear_static(current_time, max_iter, tol, iter, res_norm, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call fem_record_convergence(current_step + 1, iter, res_norm, ZERO, .true.)
|
||||
current_step = current_step + 1
|
||||
call log_info('implicit linear solve completed')
|
||||
end subroutine fem_solve_implicit_linear
|
||||
@@ -1260,6 +1305,7 @@ contains
|
||||
call implicit_solve_linear_static(solve_time, max_iter, tol, iter, res_norm, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call fem_record_convergence(current_step + 1, iter, res_norm, ZERO, .true.)
|
||||
call element_compute_internal_force(ierr, ZERO)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
@@ -1324,6 +1370,7 @@ contains
|
||||
max_iter, tol, iter, res_norm, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call fem_record_convergence(current_step + 1, iter, res_norm, ZERO, .true.)
|
||||
current_step = current_step + 1
|
||||
current_time = current_time + dt
|
||||
call log_info('implicit Newmark step completed')
|
||||
@@ -1361,6 +1408,7 @@ contains
|
||||
max_iter, tol, iter, res_norm, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call fem_record_convergence(current_step + 1, iter, res_norm, ZERO, .true.)
|
||||
current_step = current_step + 1
|
||||
current_time = current_time + dt
|
||||
call log_info('nonlinear Newmark step completed')
|
||||
|
||||
@@ -34,6 +34,11 @@ module fem_control
|
||||
integer :: max_newton_iter = 25
|
||||
integer :: max_cutback = 8
|
||||
integer :: output_interval = 1
|
||||
integer :: convergence_increment = 0
|
||||
integer :: convergence_iteration = 0
|
||||
real(rk) :: convergence_residual_norm = ZERO
|
||||
real(rk) :: convergence_correction_norm = ZERO
|
||||
logical :: convergence_converged = .false.
|
||||
logical :: use_sph_coupling = .false.
|
||||
logical :: use_user_dt = .false.
|
||||
logical :: large_deformation = .true.
|
||||
@@ -70,6 +75,11 @@ contains
|
||||
max_newton_iter = 25
|
||||
max_cutback = 8
|
||||
output_interval = 1
|
||||
convergence_increment = 0
|
||||
convergence_iteration = 0
|
||||
convergence_residual_norm = ZERO
|
||||
convergence_correction_norm = ZERO
|
||||
convergence_converged = .false.
|
||||
use_sph_coupling = .false.
|
||||
use_user_dt = .false.
|
||||
large_deformation = .true.
|
||||
|
||||
Reference in New Issue
Block a user