00001
00002 include '../Include_file/include_modulefiles.f90'
00003 include '../Include_file/include_interface_modulefiles.f90'
00004 include '../Include_file/include_subroutines.f90'
00005
00006
00007
00008
00009 PROGRAM Main_RNS_CF_polytrope
00010
00011 use grid_parameter, only : indata_type, outdata_type, &
00012 & iter_max, num_sol_seq, &
00013 & sw_mass_iter, sw_art_deform
00014 use def_matter, only : emd
00015 use def_matter_parameter, only : emdc
00016 implicit none
00017 integer :: flag_restmass, count_adj
00018 integer :: iseq, iter_count, total_iteration
00019
00020 call coordinate_patch_kit_grav
00021 call allocate_metric_and_matter
00022 if (indata_type.eq.'1D') call IO_input_initial_1D
00023 if (indata_type.eq.'3D') call IO_input_initial_3D
00024 if (sw_mass_iter.eq.'y') emdc = emd(0,0,0)
00025
00026 if (sw_art_deform.eq.'y') call artificial_deformation
00027
00028 do iseq = 1, num_sol_seq
00029 total_iteration = 0
00030 flag_restmass = 0
00031
00032
00033 count_adj = 0
00034 do
00035 call iteration(iter_count)
00036 total_iteration = total_iteration + iter_count
00037 write(6,*)'-- Total # of iteration --', total_iteration
00038 call calc_physical_quantities
00039 call printout_physq_console
00040 if (total_iteration.ge.iter_max) exit
00041 if (sw_mass_iter.ne.'y') exit
00042 call adjust_rest_mass(flag_restmass,count_adj)
00043 if (flag_restmass.eq.2) exit
00044 end do
00045 write(6,*)'== Solution sequence # == ', iseq
00046 if (total_iteration.ge.iter_max) then
00047 write(6,*)' ** Solution did not converge **'
00048 else
00049 if (sw_mass_iter.ne.'y') flag_restmass = 999
00050 end if
00051 call calc_physical_quantities
00052 call printout_physq(iseq,flag_restmass)
00053 call printout_physq_plot(iseq,flag_restmass)
00054
00055 call printout_NS_shape_seq(iseq)
00056 call next_solution
00057 end do
00058 if (outdata_type.eq.'1D') call IO_output_solution_1D
00059 if (outdata_type.eq.'3D') call IO_output_solution_3D
00060
00061 call printout_NS_shape
00062
00063 END PROGRAM Main_RNS_CF_polytrope