test Program

Uses

  • program~~test~~UsesGraph program~test test module~numerics numerics program~test->module~numerics module~all_integrators all_integrators program~test->module~all_integrators module~grid grid program~test->module~grid module~self_force_base self_force_base program~test->module~self_force_base module~observers observers program~test->module~observers module~time_info time_info program~test->module~time_info module~scalar_schw scalar_schw program~test->module~scalar_schw module~parameters parameters program~test->module~parameters module~world_tube world_tube program~test->module~world_tube module~singular_observer singular_observer program~test->module~singular_observer module~osculating_schwarzschild osculating_schwarzschild program~test->module~osculating_schwarzschild module~geodesic_schwarzschild geodesic_schwarzschild program~test->module~geodesic_schwarzschild module~dg_structures DG_structures program~test->module~dg_structures module~scalar_schw_eff scalar_schw_eff program~test->module~scalar_schw_eff module~analytic_circular_orbit analytic_circular_orbit program~test->module~analytic_circular_orbit module~self_force_observer self_force_observer program~test->module~self_force_observer module~kinds kinds module~numerics->module~kinds module~rk5_integrator rk5_integrator module~all_integrators->module~rk5_integrator module~rk4_integrator rk4_integrator module~all_integrators->module~rk4_integrator module~abmv5_integrator abmv5_integrator module~all_integrators->module~abmv5_integrator module~grid->module~kinds module~element element module~grid->module~element module~grid_function grid_function module~grid->module~grid_function module~self_force_base->module~kinds module~observers->module~kinds module~observers->module~grid_function module~time_info->module~kinds module~scalar_schw->module~dg_structures module~scalar_schw->module~scalar_schw_eff module~time_dependent_coordinate time_dependent_coordinate module~scalar_schw->module~time_dependent_coordinate module~orbit_base orbit_base module~scalar_schw->module~orbit_base module~scalar_schw->module~kinds module~scalar_schw->module~grid_function module~pde_equations pde_equations module~scalar_schw->module~pde_equations iso_c_binding iso_c_binding module~scalar_schw->iso_c_binding module~parameters->module~kinds module~world_tube->module~kinds module~world_tube->module~grid_function module~singular_observer->module~observers module~effective_source effective_source module~singular_observer->module~effective_source module~ode_equations ode_equations module~osculating_schwarzschild->module~ode_equations module~osculating_schwarzschild->module~kinds module~geodesic_schwarzschild->module~ode_equations module~geodesic_schwarzschild->module~kinds module~dg_structures->module~kinds module~scalar_schw_eff->module~effective_source module~scalar_schw_eff->module~kinds module~scalar_schw_eff->iso_c_binding module~equations equations module~analytic_circular_orbit->module~equations module~analytic_circular_orbit->module~kinds module~self_force_observer->module~observers module~self_force_observer->module~scalar_schw module~ode_equations->module~equations module~ode_equations->module~kinds module~time_dependent_coordinate->module~kinds module~time_dependent_coordinate->module~grid_function module~equations->module~kinds module~effective_source->module~world_tube module~effective_source->module~kinds module~effective_source->module~grid_function module~effective_source->iso_c_binding module~orbit_base->module~kinds module~rk5_integrator->module~kinds module~method_of_lines method_of_lines module~rk5_integrator->module~method_of_lines module~element->module~kinds module~grid_function->module~kinds module~grid_function->module~element module~rk4_integrator->module~kinds module~rk4_integrator->module~method_of_lines module~pde_equations->module~equations module~pde_equations->module~kinds module~pde_equations->module~grid_function module~abmv5_integrator->module~kinds module~abmv5_integrator->module~method_of_lines module~method_of_lines->module~equations module~method_of_lines->module~kinds
      call my_eq%eq_flux_data(j,i)%output(rho)

Calls

program~~test~~CallsGraph program~test test proc~init_time init_time program~test->proc~init_time proc~get_current_dtime get_current_dtime program~test->proc~get_current_dtime proc~read_parameters read_parameters program~test->proc~read_parameters interface~wtube wtube program~test->interface~wtube proc~get_current_time get_current_time program~test->proc~get_current_time interface~ref_element ref_element program~test->interface~ref_element proc~choose_integrator choose_integrator program~test->proc~choose_integrator proc~set_dtime set_dtime program~test->proc~set_dtime interface~init_grid_coordinates init_grid_coordinates program~test->interface~init_grid_coordinates interface~init_wtube init_wtube interface~wtube->interface~init_wtube interface~init_ref_element init_ref_element interface~ref_element->interface~init_ref_element proc~init_grid_coordinates init_grid_coordinates interface~init_grid_coordinates->proc~init_grid_coordinates proc~init_wtube init_wtube interface~init_wtube->proc~init_wtube proc~rstar_of_r rstar_of_r proc~init_grid_coordinates->proc~rstar_of_r interface~rgf rgf proc~init_grid_coordinates->interface~rgf particle_element particle_element proc~init_grid_coordinates->particle_element tplus_ind tplus_ind proc~init_grid_coordinates->tplus_ind tminus_ind tminus_ind proc~init_grid_coordinates->tminus_ind particle_node particle_node proc~init_grid_coordinates->particle_node proc~jacobian Jacobian proc~init_grid_coordinates->proc~jacobian proc~init_ref_element init_ref_element interface~init_ref_element->proc~init_ref_element interface~init_rgf init_rgf interface~rgf->interface~init_rgf proc~lift1d Lift1D proc~init_ref_element->proc~lift1d proc~inverse Inverse proc~init_ref_element->proc~inverse proc~vandermonde1d Vandermonde1D proc~init_ref_element->proc~vandermonde1d proc~gaussweigths GaussWeigths proc~init_ref_element->proc~gaussweigths proc~dmatrix1d Dmatrix1D proc~init_ref_element->proc~dmatrix1d proc~jacobigl JacobiGL proc~init_ref_element->proc~jacobigl proc~filter1d Filter1D proc~init_ref_element->proc~filter1d proc~init_wtube->interface~rgf interface~igfb igfb proc~init_wtube->interface~igfb dgesv dgesv proc~inverse->dgesv proc~jacobip JacobiP proc~vandermonde1d->proc~jacobip proc~gaussweigths->proc~jacobip interface~init_igfb init_igfb interface~igfb->interface~init_igfb proc~dmatrix1d->dgesv proc~gradvandermonde1d GradVandermonde1D proc~dmatrix1d->proc~gradvandermonde1d qgesv qgesv proc~dmatrix1d->qgesv proc~init_rgf init_rgf interface~init_rgf->proc~init_rgf interface~element_rdata element_rdata proc~init_rgf->interface~element_rdata proc~init_igfb init_igfb interface~init_igfb->proc~init_igfb proc~gradjacobip GradJacobiP proc~gradvandermonde1d->proc~gradjacobip interface~element_boundary_idata element_boundary_idata proc~init_igfb->interface~element_boundary_idata proc~gradjacobip->proc~jacobip interface~allocate_rdata allocate_rdata interface~element_rdata->interface~allocate_rdata proc~allocate_rdata allocate_rdata interface~allocate_rdata->proc~allocate_rdata interface~init_boundary_idata init_boundary_idata interface~element_boundary_idata->interface~init_boundary_idata proc~init_boundary_idata init_boundary_idata interface~init_boundary_idata->proc~init_boundary_idata

Contents

Source Code


Variables

Type AttributesNameInitial
class(equation), pointer:: eqp
type(scal_schw), allocatable, target:: my_eq
integer(kind=ip) :: i
integer(kind=ip) :: j
integer(kind=ip) :: k
type(ref_element) :: relem
class(equation_pointer), dimension(:), allocatable:: eqs
type(cobserver), dimension(:,:), allocatable:: cobs
type(sing_observer) :: sobs
class(equation), pointer:: orbit
complex(kind=wp), dimension(:,:), allocatable:: psi
complex(kind=wp), dimension(:,:), allocatable:: dpsidt
complex(kind=wp), dimension(:,:), allocatable:: dpsidr
real(kind=wp) :: r
real(kind=wp) :: phi
real(kind=wp) :: ur
real(kind=wp) :: En
real(kind=wp) :: Lz
real(kind=wp) :: tfac
real(kind=wp) :: dtfac_dt
real(kind=wp) :: dt2fac_dt2

Source Code

program test

  use parameters
  use time_info
  use DG_structures
  use grid
  use scalar_schw
  use all_integrators
  use observers
  use geodesic_schwarzschild
  use osculating_schwarzschild
  use world_tube
  use scalar_schw_eff
  use self_force_observer
  use self_force_base
  use numerics, only : time_window
  use analytic_circular_orbit
  use singular_observer

  implicit none

  class(equation), pointer  :: eqp
  type(scal_schw), allocatable, target :: my_eq
  integer(ip) :: i, j, k
  type(ref_element) :: relem
  class(equation_pointer), dimension(:), allocatable :: eqs
  type(cobserver), dimension(:,:), allocatable :: cobs
  type(sing_observer) :: sobs
  class(equation), pointer :: orbit
  complex(wp), dimension(:,:), allocatable :: psi, dpsidt, dpsidr
  real(wp) :: r, phi, ur, En, Lz, tfac, dtfac_dt, dt2fac_dt2

  call read_parameters ()

  print*,'p_orb = ', p_orb
  print*,'ecc = ', ecc
  relem = ref_element( order )

  call init_grid_coordinates ( relem )

  call init_time ( t_initial )

  if (use_world_tube) then
    wt = wtube()

!    call wt%win%output(rho)
!    call wt%dwin%output(rho)
!    call wt%d2win%output(rho)
!    call wt%boundary_info%output(rho)
  end if

  if ( use_generic_orbit ) then
    if ( use_osculating_orbit ) then
      allocate ( osc_schw :: orbit )
    else
      allocate ( geod_schw :: orbit )
    end if
  else
    allocate ( circular_orbit :: orbit )
  end if 
  call orbit%init ( )

  print*,'rho%vname = ', rho%vname
  print*,'equation_name = ', equation_name
  print*,'n_elems = ', n_elems
  print*,'order = ', order
  allocate(my_eq)
  call my_eq%init ( )

  if ( output_coords_for_exact ) then
    call my_eq%output_coords ( )
  end if

  call sobs%init ( (/ p_orb /), my_eq%r_star, my_eq%effs )

  allocate(eqs(2))
  eqs(1)%p => my_eq
  eqs(2)%p => orbit
!  allocate(eqs(2))
!  eqs(1)%p => orbit
  print*,'my_eq%eq_data(1,1)%vname = ', my_eq%eq_data(1,1)%vname
  print*,'my_eq%eq_data(2,1)%vname = ', my_eq%eq_data(2,1)%vname
  print*,'my_eq%eq_data(3,1)%vname = ', my_eq%eq_data(3,1)%vname

  if (use_particle) then
    call time_window ( get_current_time (), tsigma, torder, tfac, &
                                     dtfac_dt, dt2fac_dt2 )
    print*,'Setting time window: ', get_current_time ( ), tfac, dtfac_dt, dt2fac_dt2
! Tell the effective source about the time 
    if ( turn_on_source_smoothly ) then
      call my_eq%effs%set_time_window ( tfac, dtfac_dt, dt2fac_dt2, -1 )
    else
      call my_eq%effs%set_time_window ( tfac, dtfac_dt, dt2fac_dt2, &
                                      exact_initial_data_lmax )
    end if
    print*,'Setting particle position'
    call orbit_info%get_orbit ( r, phi, ur, En, Lz )
    call my_eq%effs%set_particle_pos ( r, phi, ur, En, Lz,  &
                               0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp )
    print*,'Particle position set'
    print*,'Evaluating effective source'
    call my_eq%effs%evaluate_source ( my_eq%r_schw, wt )
    print*,'Effective source evaluated'
  end if
  if (use_exact_initial_data) then
    call my_eq%read_all_modes ( )
  end if

  do i = 1, my_eq%effs%nmodes
    call my_eq%effs%source(1,i)%output(rho)
!    if (use_particle) then
!      call my_eq%eq_lcoeffs(i)%output(rho)
!    end if
  end do
  call my_eq%r_schw%output(rho)
!  do i = 1, 4
!    call my_eq%eq_coeffs(i)%output(rho)
!  end do
!  do i = 1, 2
!    call my_eq%eq_lambda(i)%output(rho)
!    do j = 1, 2
!      call my_eq%eq_s(i,j)%output(rho)
!      call my_eq%eq_sinv(i,j)%output(rho)
!    end do
!  end do 

  do i = 1, my_eq%nmodes
    do j = 1, 3
      call my_eq%eq_data(j,i)%output(rho)
      call my_eq%eq_rhs_data(j,i)%output(rho)
    end do
!    do j = 1, 2
!      call my_eq%eq_flux_data(j,i)%output(rho)
!    end do
  end do
  print*,'Calling orbit output'
  call orbit%output()

  allocate ( cobs(3,my_eq%nmodes) )
  do i = 1, my_eq%nmodes
    do j = 1, 3
      call cobs(j,i)%init( (/ rho_min, rho_max /), rho, my_eq%eq_data(j,i) )
      call cobs(j,i)%extract ( )
      call cobs(j,i)%output ( )
    end do
  end do
  print*,'elem_index = ', cobs(1,1)%elem_index
  print*,'node_index = ', cobs(1,1)%node_index

  if (use_particle) then
    call sfobs%init( (/ rho_particle /), rho, my_eq )
    call sfobs%extract ( )
    call sfobs%output ( )
    call sf%output ( )
  end if

  call choose_integrator ( )

  if (use_particle .and. use_generic_orbit) then
      call set_dtime ( coufac*delta_rho_min/my_eq%time_dep_coord%maxspeed )
  else
    call set_dtime ( coufac*delta_rho_min )
  end if
  print*,'dtime = ', get_current_dtime ( )

  call mol_int%init(eqs)
  print*,'ntemp for integrator ', mol_integrator, ' = ', mol_int%ntemp()

  if ( use_particle ) then
    print*,'turn_on_source_smoothly = ', turn_on_source_smoothly
    print*,'exact_initial_data_lmax = ', exact_initial_data_lmax, lmax
    if ( turn_on_source_smoothly .or. &
         (use_exact_initial_data .and. exact_initial_data_lmax < lmax ) ) then
      if (get_current_dtime()*100.0_wp>4.0_wp*tsigma) then
        print*,'In order to turn on the source smoothly, using dtime = ', 4.0_wp*tsigma/100
        call set_dtime ( 4.0_wp*tsigma/100 )
        short_timesteps_active = .true.
      end if
    end if
  end if

  print*,'Starting evolution at time = ', get_current_time ( )
  k = 0
  do 
    if ( get_current_time () > t_final ) exit
    k = k+1
!    print*,'time = ', get_current_time ( )
    call mol_int%step( )

    if (out1d_every>0 .and. mod(k,out1d_every)==0) then
      do i = 1, my_eq%nmodes
        do j = 1, 3
          call my_eq%eq_data(j,i)%output(rho)
          call my_eq%eq_rhs_data(j,i)%output(rho)
        end do
!        do j = 1, 2
!!          call my_eq%eq_flux_data(j,i)%output(rho)
!        end do
        if (use_particle) then
          call my_eq%effs%source(1,i)%output(rho)
        end if
      end do
!      do j = 1, 4
!        call my_eq%eq_coeffs(j)%output(rho)
!      end do 
!      call my_eq%r_star%output(rho)
!      call my_eq%r_schw%output(rho)
    end if
    if (out0d_every>0 .and. mod(k,out0d_every)==0) then
      do i = 1, my_eq%nmodes
        do j = 1, 3
          call cobs(j,i)%extract ( )
          call cobs(j,i)%output ( )
        end do
      end do
      if (use_particle) then
        call sfobs%extract ( )
        call sfobs%output ( )
      end if
      call orbit%output ( )
      call sf%output ( )
    end if
  end do

  print*,'Program ended after ', k, ' iterations.'
end program test