Advance V5 nonlinear benchmarks and shell solver
This commit is contained in:
@@ -99,6 +99,9 @@ contains
|
||||
close(unit_id)
|
||||
history_header_written = .true.
|
||||
|
||||
call output_csv_write_path(ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
call output_csv_write_nodes(step, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) return
|
||||
|
||||
@@ -129,6 +132,17 @@ contains
|
||||
end if
|
||||
end subroutine output_csv_filename
|
||||
|
||||
subroutine output_csv_path_filename(filename)
|
||||
character(len=*), intent(out) :: filename
|
||||
|
||||
filename = ' '
|
||||
if (trim(csv_output_directory) .eq. '.') then
|
||||
filename = 'continuation_path.csv'
|
||||
else
|
||||
filename = trim(csv_output_directory)//'/continuation_path.csv'
|
||||
end if
|
||||
end subroutine output_csv_path_filename
|
||||
|
||||
subroutine output_csv_step_filename(prefix, step, filename)
|
||||
character(len=*), intent(in) :: prefix
|
||||
integer, intent(in) :: step
|
||||
@@ -258,6 +272,76 @@ contains
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine output_csv_write_reactions
|
||||
|
||||
subroutine output_csv_write_path(ierr)
|
||||
integer, intent(out) :: ierr
|
||||
character(len=512) :: filename
|
||||
integer :: unit_id
|
||||
integer :: ios
|
||||
integer :: row
|
||||
|
||||
if (nlc_path_count .le. 0) then
|
||||
ierr = FEM_SUCCESS
|
||||
return
|
||||
end if
|
||||
|
||||
call output_csv_path_filename(filename)
|
||||
unit_id = 68
|
||||
open(unit=unit_id, file=trim(filename), status='replace', &
|
||||
action='write', iostat=ios)
|
||||
if (ios .ne. 0) then
|
||||
call error_set(FEM_ERR_OUTPUT, &
|
||||
'failed to open continuation path CSV output', ierr)
|
||||
return
|
||||
end if
|
||||
|
||||
write(unit_id,'(A)',iostat=ios) &
|
||||
'step,time,control_parameter,control_dof_count,'// &
|
||||
'prescribed_l2,prescribed_max,actual_l2,actual_max,'// &
|
||||
'constraint_residual_linf,constraint_residual_l2,'// &
|
||||
'control_reaction_sum,control_reaction_generalized,control_work,'// &
|
||||
'iterations,residual_norm,relative_residual,correction_norm,'// &
|
||||
'status_code,failure_code'
|
||||
if (ios .ne. 0) then
|
||||
close(unit_id)
|
||||
call error_set(FEM_ERR_OUTPUT, &
|
||||
'failed to write continuation path CSV header', ierr)
|
||||
return
|
||||
end if
|
||||
|
||||
do row = 1, nlc_path_count
|
||||
write(unit_id,'(I12,2(A,ES24.16),A,I12,9(A,ES24.16),'// &
|
||||
'A,I12,3(A,ES24.16),2(A,I12))',iostat=ios) &
|
||||
nlc_path_int(NLC_PATH_I_STEP, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_TIME, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_PARAMETER, row), &
|
||||
',', nlc_path_int(NLC_PATH_I_CONTROL_DOF_COUNT, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_PRESCRIBED_L2, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_PRESCRIBED_MAX, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_ACTUAL_L2, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_ACTUAL_MAX, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_RESIDUAL_LINF, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_RESIDUAL_L2, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_REACTION_SUM, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_REACTION_GENERALIZED, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_WORK, row), &
|
||||
',', nlc_path_int(NLC_PATH_I_ITERATION, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_RESIDUAL_NORM, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_RELATIVE_RESIDUAL, row), &
|
||||
',', nlc_path_real(NLC_PATH_R_CORRECTION_NORM, row), &
|
||||
',', nlc_path_int(NLC_PATH_I_STATUS_CODE, row), &
|
||||
',', nlc_path_int(NLC_PATH_I_FAILURE_CODE, row)
|
||||
if (ios .ne. 0) then
|
||||
close(unit_id)
|
||||
call error_set(FEM_ERR_OUTPUT, &
|
||||
'failed to write continuation path CSV row', ierr)
|
||||
return
|
||||
end if
|
||||
end do
|
||||
|
||||
close(unit_id)
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine output_csv_write_path
|
||||
|
||||
subroutine output_csv_write_elements(step, ierr)
|
||||
integer, intent(in) :: step
|
||||
integer, intent(out) :: ierr
|
||||
|
||||
Reference in New Issue
Block a user