00001
00002 include '../Include_file/include_modulefiles_RNS_HS_peos.f90'
00003 include '../Include_file/include_interface_modulefiles_RNS_HS_peos.f90'
00004 include '../Include_file/include_subroutines_RNS_HS_peos.f90'
00005 include '../Include_file/include_PEOS_modulefile.f90'
00006 include '../Include_file/include_PEOS_subroutines.f90'
00007 include '../Include_file/include_functions.f90'
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 PROGRAM Main_RNS_HS_peos
00034
00035 use grid_parameter, only : indata_type, outdata_type, &
00036 & iter_max, num_sol_seq, &
00037 & sw_mass_iter, sw_art_deform
00038 use def_matter, only : emd
00039 use def_matter_parameter, only : emdc
00040 use def_formulation
00041 use radial_green_fn_helmholtz
00042 use radial_green_fn_hrethadv
00043 use radial_green_fn_hret_mi_hadv
00044 implicit none
00045 integer :: flag_restmass, count_adj
00046 integer :: iseq, iter_count, total_iteration
00047
00048 call coordinate_patch_kit_grav
00049 call allocate_metric_and_matter_WL
00050 call allocate_SEM_tensor
00051 call allocate_radial_green_fn_helmholtz
00052 call allocate_radial_green_fn_hrethadv
00053 call allocate_radial_green_fn_hret_mi_hadv
00054 if (indata_type.eq.'1D') call IO_input_initial_1D
00055 if (indata_type.eq.'3D') call IO_input_initial_3D
00056 if (indata_type.eq.'3D') call IO_input_initial_3D_WL
00057 if (sw_mass_iter.eq.'y') emdc = emd(0,0,0)
00058
00059 if (sw_art_deform.eq.'y') call artificial_deformation
00060
00061 call choose_formulation
00062
00063 call peos_initialize
00064 call initialize_field
00065
00066 do iseq = 1, num_sol_seq
00067 total_iteration = 0
00068 flag_restmass = 0
00069
00070
00071 count_adj = 0
00072 do
00073 call iteration_HS(iter_count)
00074 total_iteration = total_iteration + iter_count
00075 write(6,*)'-- Total # of iteration --', total_iteration
00076 call calc_physical_quantities_WL
00077 call printout_physq_console
00078 if (total_iteration.ge.iter_max) exit
00079 if (sw_mass_iter.ne.'y') exit
00080 call adjust_rest_mass(flag_restmass,count_adj)
00081 if (flag_restmass.eq.2) exit
00082 end do
00083 write(6,*)'== Solution sequence # == ', iseq
00084 if (total_iteration.ge.iter_max) then
00085 write(6,*)' ** Solution did not converge **'
00086 else
00087 if (sw_mass_iter.ne.'y') flag_restmass = 999
00088 end if
00089 call calc_physical_quantities_WL
00090 call calc_quad_pole_peos
00091
00092 call printout_physq_WL_MHD(iseq,flag_restmass)
00093 call printout_quad_pole(iseq)
00094 call printout_physq_plot(iseq,flag_restmass)
00095
00096 call printout_NS_shape_seq(iseq)
00097 call next_solution
00098 end do
00099 if (outdata_type.eq.'1D') call IO_output_solution_1D
00100 if (outdata_type.eq.'3D') call IO_output_solution_3D
00101 if (outdata_type.eq.'3D') call IO_output_solution_3D_WL
00102
00103 call printout_NS_shape
00104
00105 END PROGRAM Main_RNS_HS_peos