00001
00002
00003
00004
00005 include '../Include_file/include_modulefiles_RNS_CF_peos.f90'
00006 include '../Include_file/include_interface_modulefiles_RNS_CF_peos.f90'
00007 include '../Include_file/include_subroutines_RNS_CF_peos.f90'
00008 include '../Include_file/include_PEOS_modulefile.f90'
00009 include '../Include_file/include_PEOS_subroutines.f90'
00010 include '../Include_file/include_functions.f90'
00011
00012
00013
00014
00015 PROGRAM Main_RNS_CF_peos
00016
00017 use grid_parameter, only : indata_type, outdata_type, &
00018 & iter_max, num_sol_seq, &
00019 & sw_mass_iter, sw_art_deform, ntfxy
00020 use def_matter, only : emd
00021 use def_matter_parameter, only : emdc
00022 implicit none
00023 integer :: flag_restmass, count_adj
00024 integer :: iseq, iter_count, total_iteration, nmx
00025
00026 call coordinate_patch_kit_grav
00027 call read_parameter_drot
00028 call allocate_metric_and_matter
00029 call allocate_metric_on_SFC_CF
00030 if (indata_type.eq.'1D') call IO_input_initial_1D
00031 if (indata_type.eq.'3D') call IO_input_initial_3D
00032 if (sw_mass_iter.eq.'y') then
00033 call search_emdmax_xaxis_grid(nmx)
00034 emdc = emd(nmx,ntfxy,0)
00035 end if
00036
00037 if (sw_art_deform.eq.'y') call artificial_deformation
00038
00039 call peos_initialize
00040
00041 do iseq = 1, num_sol_seq
00042 total_iteration = 0
00043 flag_restmass = 0
00044
00045
00046 count_adj = 0
00047 do
00048 call iteration_peos(iter_count)
00049 total_iteration = total_iteration + iter_count
00050 write(6,*)'-- Total # of iteration --', total_iteration
00051 call calc_physical_quantities_peos
00052 call printout_physq_console
00053 if (total_iteration.ge.iter_max) exit
00054 if (sw_mass_iter.ne.'y') exit
00055 call adjust_rest_mass(flag_restmass,count_adj)
00056 if (flag_restmass.eq.2) exit
00057 end do
00058 write(6,*)'== Solution sequence # == ', iseq
00059 if (total_iteration.ge.iter_max) then
00060 write(6,*)' ** Solution did not converge **'
00061 else
00062 if (sw_mass_iter.ne.'y') flag_restmass = 999
00063 end if
00064 call calc_physical_quantities_peos
00065 call calc_quad_pole_peos
00066
00067 call printout_physq_peos(iseq,flag_restmass)
00068 call printout_quad_pole(iseq)
00069 call printout_physq_plot(iseq,flag_restmass)
00070
00071 if (outdata_type.eq.'3D') call IO_output_solution_3D
00072 call printout_NS_shape_seq(iseq)
00073 call next_solution
00074 end do
00075 if (outdata_type.eq.'1D') call IO_output_solution_1D
00076 if (outdata_type.eq.'3D') call IO_output_solution_3D
00077
00078 call printout_NS_shape
00079 call write_parameter_drot
00080
00081 END PROGRAM Main_RNS_CF_peos