example4 Program

Uses

  • program~~example4~~UsesGraph program~example4 example4 module~example4_model example4_model program~example4->module~example4_model module~odrpack odrpack program~example4->module~odrpack module~odrpack_kinds odrpack_kinds program~example4->module~odrpack_kinds module~example4_model->module~odrpack_kinds module~odrpack->module~odrpack_kinds iso_fortran_env iso_fortran_env module~odrpack->iso_fortran_env module~odrpack_kinds->iso_fortran_env

Default ODR job, with parameter bounds. This sample problem comes from Zwolak et al. 2001 (High Performance Computing Symposium, "Estimating rate constants in cell cycle models"). The call to odr is modified from the call the authors make to ODRPACK. This is done to illustrate the need for bounds. The authors could just have easily used the call statement here to solve their problem. Curious users are encouraged to remove the bounds in the call statement, run the code, and compare the results to the current call statement.


Calls

program~~example4~~CallsGraph program~example4 example4 proc~odr odr program~example4->proc~odr interface~ddot ddot proc~odr->interface~ddot proc~access_workspace access_workspace proc~odr->proc~access_workspace proc~check_inputs check_inputs proc~odr->proc~check_inputs proc~check_jac check_jac proc~odr->proc~check_jac proc~derstep derstep proc~odr->proc~derstep proc~eta_fcn eta_fcn proc~odr->proc~eta_fcn proc~eval_jac eval_jac proc~odr->proc~eval_jac proc~fctrw fctrw proc~odr->proc~fctrw proc~init_work init_work proc~odr->proc~init_work proc~loc_iwork loc_iwork proc~odr->proc~loc_iwork proc~loc_rwork loc_rwork proc~odr->proc~loc_rwork proc~move_beta move_beta proc~odr->proc~move_beta proc~pack_vec pack_vec proc~odr->proc~pack_vec proc~print_error_inputs print_error_inputs proc~odr->proc~print_error_inputs proc~print_errors print_errors proc~odr->proc~print_errors proc~print_header print_header proc~odr->proc~print_header proc~print_reports print_reports proc~odr->proc~print_reports proc~scale_mat scale_mat proc~odr->proc~scale_mat proc~select_row select_row proc~odr->proc~select_row proc~set_flags set_flags proc~odr->proc~set_flags proc~trust_region trust_region proc~odr->proc~trust_region proc~unpack_vec unpack_vec proc~odr->proc~unpack_vec proc~vcv_beta vcv_beta proc~odr->proc~vcv_beta proc~workspace_dimensions workspace_dimensions proc~odr->proc~workspace_dimensions proc~access_workspace->proc~loc_iwork proc~access_workspace->proc~loc_rwork proc~check_jac_value check_jac_value proc~check_jac->proc~check_jac_value proc~hstep hstep proc~check_jac->proc~hstep proc~derstep->proc~hstep proc~eval_jac->proc~scale_mat proc~eval_jac->proc~unpack_vec proc~jac_cdiff jac_cdiff proc~eval_jac->proc~jac_cdiff proc~jac_fwdiff jac_fwdiff proc~eval_jac->proc~jac_fwdiff proc~set_ifix set_ifix proc~eval_jac->proc~set_ifix proc~fctr fctr proc~fctrw->proc~fctr proc~init_work->proc~set_flags proc~scale_beta scale_beta proc~init_work->proc~scale_beta proc~scale_delta scale_delta proc~init_work->proc~scale_delta proc~move_beta->proc~hstep proc~print_errors->proc~print_error_inputs proc~print_errors->proc~print_header proc~print_error_derivative print_error_derivative proc~print_errors->proc~print_error_derivative proc~print_error_fcn print_error_fcn proc~print_errors->proc~print_error_fcn proc~print_reports->proc~print_header proc~print_reports->proc~set_flags proc~print_report_final print_report_final proc~print_reports->proc~print_report_final proc~print_report_initial print_report_initial proc~print_reports->proc~print_report_initial proc~print_report_iter print_report_iter proc~print_reports->proc~print_report_iter proc~trust_region->proc~scale_mat proc~lcstep lcstep proc~trust_region->proc~lcstep proc~scale_vec scale_vec proc~trust_region->proc~scale_vec dpodi dpodi proc~vcv_beta->dpodi proc~vcv_beta->proc~lcstep proc~check_jac_curv check_jac_curv proc~check_jac_value->proc~check_jac_curv proc~check_jac_zero check_jac_zero proc~check_jac_value->proc~check_jac_zero proc~fpvb fpvb proc~check_jac_value->proc~fpvb proc~fpvd fpvd proc~check_jac_value->proc~fpvd proc~jac_cdiff->proc~derstep proc~jac_cdiff->proc~hstep proc~jac_fwdiff->proc~derstep proc~jac_fwdiff->proc~hstep proc~lcstep->proc~scale_mat proc~lcstep->proc~fctr dchex dchex proc~lcstep->dchex dqrdc dqrdc proc~lcstep->dqrdc dqrsl dqrsl proc~lcstep->dqrsl dtrco dtrco proc~lcstep->dtrco dtrsl dtrsl proc~lcstep->dtrsl interface~drot drot proc~lcstep->interface~drot interface~drotg drotg proc~lcstep->interface~drotg proc~esubi esubi proc~lcstep->proc~esubi proc~solve_trl solve_trl proc~lcstep->proc~solve_trl proc~vevtr vevtr proc~lcstep->proc~vevtr proc~ppf_tstudent ppf_tstudent proc~print_report_final->proc~ppf_tstudent proc~print_report_initial->proc~hstep proc~check_jac_curv->proc~fpvb proc~check_jac_curv->proc~fpvd proc~check_jac_fp check_jac_fp proc~check_jac_curv->proc~check_jac_fp proc~check_jac_zero->proc~fpvb proc~check_jac_zero->proc~fpvd proc~ppf_normal ppf_normal proc~ppf_tstudent->proc~ppf_normal proc~vevtr->proc~solve_trl proc~check_jac_fp->proc~fpvb proc~check_jac_fp->proc~fpvd

Variables

Type Attributes Name Initial
real(kind=wp) :: beta(3)
integer :: n
integer :: m
integer :: np
integer :: q
integer :: lunrpt

Source Code

program example4
!! Default ODR job, with parameter bounds.
!!   This sample problem comes from Zwolak et al. 2001 (High Performance Computing
!! Symposium, "Estimating rate constants in cell cycle models"). The call to
!! [[odr]] is modified from the call the authors make to ODRPACK. This is
!! done to illustrate the need for bounds. The authors could just have easily
!! used the call statement here to solve their problem.
!!   Curious users are encouraged to remove the bounds in the call statement,
!! run the code, and compare the results to the current call statement.

   use odrpack_kinds, only: wp
   use odrpack, only: odr
   use example4_model, only: fcn, mpf
   implicit none

   real(kind=wp) :: beta(3)
   integer :: n, m, np, q, lunrpt
   ! integer :: i
   ! real (kind=wp) :: u, c, tout

   open (newunit=lunrpt, file="./example/report4.dat")

   n = 5
   m = 1
   np = 3
   q = 1

   beta = [1.1E-0_wp, 3.3E+0_wp, 8.7_wp]

   call odr(fcn, n, m, q, np, beta, &
            y=reshape([55.0_wp, 45.0_wp, 40.0_wp, 30.0_wp, 20.0_wp], [n, q]), &
            x=reshape([0.15_wp, 0.20_wp, 0.25_wp, 0.30_wp, 0.50_wp], [n, m]), &
            lower=[0.0_wp, 0.0_wp, 0.0_wp], &
            upper=[1000.0_wp, 1000.0_wp, 1000.0_wp], &
            iprint=2122, &
            lunrpt=lunrpt, &
            maxit=20)

   close (lunrpt)

   ! The following code will reproduce the plot in Figure 2 of Zwolak et al. 2001.
   ! do i = 0, 100
   !    c = 0.05_wp + (0.7_wp - 0.05_wp)*i/100
   !    tout = 1440.0_wp
   !    !call mpf(u, c, 1.1e-10_wp, 3.3e-3_wp, 8.7_wp, 0.0_wp, tout, c/2)
   !    call mpf(u, c, 1.15395968E-02_wp, 2.61676386E-03_wp, &
   !             9.23138811_wp, 0.0_wp, tout, c/2)
   !    write (*, *) c, tout
   ! end do

end program example4