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