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