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 !              Main Program
00008 !______________________________________________
00009 ! ==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+=
00010 !
00011 !     General relativistic binary in equilibrium. 
00012 !     Einstein field equation and equations for irrotational 
00013 !     fluid flow are solved assuming the helical symmetry.  
00014 !     Using self-consistent field method.
00015 !
00016 !     Parameters
00017 !     chrot == i : Irrotational flow  |  chope == L : invert Laplacian
00018 !           == c : Corotational flow  |        == H : invert Helmholtz
00019 !
00020 !     chgra == h : Helically symmetric source
00021 !           == w : SUF Waveless source
00022 !           == i : IWM formalism
00023 !           == c : Waveless Helical cut off source for Laplacian
00024 !           == C : Waveless Helical cut off source for Helmholtz
00025 !           == H : Helical cut off source (Simple cutoff)
00026 !           == W : Helical -> Waveless source for Helmholtz op.
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 ! 0, 1 = iterate for a constant rest mass
00059 !                       !    2 = rest mass converged
00060 !                       !  999 = no rest mass iteration and converged
00061     count_adj       = 0 ! count number of adjustment of the rest mass
00062     do                  ! -- iteration for a constant rest mass
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 !testtest    if (sw_mass_iter.ne.'y') exit
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 !!  call printout_debug
00092   call printout_NS_shape
00093 !
00094 END PROGRAM Main_MagneticRNS_WL_peos

Generated on 27 Oct 2011 for Cocal by  doxygen 1.6.1