00001
00002 include '../Include_file/include_modulefiles_RNS_WL_peos.f90'
00003 include '../Include_file/include_interface_modulefiles_RNS_WL_peos.f90'
00004 include '../Include_file/include_subroutines_RNS_WL_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_WL_peos
00034
00035 use grid_parameter, only : indata_type, outdata_type, &
00036 & iter_max, num_sol_seq, &
00037 & sw_mass_iter, sw_art_deform, ntfxy
00038 use def_matter, only : emd
00039 use def_matter_parameter, only : emdc
00040 use def_formulation
00041 implicit none
00042 integer :: flag_restmass, count_adj
00043 integer :: iseq, iter_count, total_iteration, nmx
00044
00045 call coordinate_patch_kit_grav
00046 call read_parameter_drot
00047 call allocate_metric_and_matter_WL
00048 call allocate_SEM_tensor
00049 if (indata_type.eq.'1D') call IO_input_initial_1D
00050 if (indata_type.eq.'3D') call IO_input_initial_3D
00051 if (indata_type.eq.'3D') call IO_input_initial_3D_WL
00052 if (sw_mass_iter.eq.'y') then
00053 call search_emdmax_xaxis_grid(nmx)
00054 emdc = emd(nmx,ntfxy,0)
00055 end if
00056
00057 if (sw_art_deform.eq.'y') call artificial_deformation
00058
00059 call choose_formulation
00060
00061 call peos_initialize
00062 call initialize_field
00063
00064 do iseq = 1, num_sol_seq
00065 total_iteration = 0
00066 flag_restmass = 0
00067
00068
00069 count_adj = 0
00070 do
00071 call iteration_WL(iter_count)
00072 total_iteration = total_iteration + iter_count
00073 write(6,*)'-- Total # of iteration --', total_iteration
00074 call calc_physical_quantities_WL
00075 call printout_physq_console
00076 if (total_iteration.ge.iter_max) exit
00077 if (sw_mass_iter.ne.'y') exit
00078 call adjust_rest_mass(flag_restmass,count_adj)
00079 if (flag_restmass.eq.2) exit
00080 end do
00081 write(6,*)'== Solution sequence # == ', iseq
00082 if (total_iteration.ge.iter_max) then
00083 write(6,*)' ** Solution did not converge **'
00084 else
00085 if (sw_mass_iter.ne.'y') flag_restmass = 999
00086 end if
00087 call calc_physical_quantities_WL
00088 call calc_quad_pole_peos
00089
00090 call printout_physq_WL_MHD(iseq,flag_restmass)
00091 call printout_quad_pole(iseq)
00092 call printout_physq_plot(iseq,flag_restmass)
00093
00094 call printout_NS_shape_seq(iseq)
00095 call next_solution
00096 end do
00097 if (outdata_type.eq.'1D') call IO_output_solution_1D
00098 if (outdata_type.eq.'3D') call IO_output_solution_3D
00099 if (outdata_type.eq.'3D') call IO_output_solution_3D_WL
00100
00101 call printout_NS_shape
00102
00103 END PROGRAM Main_RNS_WL_peos