spx Program

SPH 瞬态力学求解器


Contents

Source Code

spx

Source Code

program spx

    use spx_command_line, only: cli_obj
    use spx_logger, only: lgr_obj, tmr_obj
    use fffc_module, only: terminal_obj, nowtime, sec2hms, display, is_env
    use spx_module, only: run
    implicit none

    ! 解析命令行参数
    call cli_obj%parse()
    if (cli_obj%debug_mode) then
        call lgr_obj%init()
    end if

    ! 输出程序信息
    print '(a)', 'Welcome to Smoothed Particle Hydrodynamics Transient Solver (SPX, v0.6.202310)'
    print '(a)', 'Copyright (c) 2021-2023, ZUO Zhihua. Licensed under the BSD-3 License.'

    ! 初始化
    call terminal_obj%init(use_color=.not.is_env('NO_COLOR'))
    call tmr_obj%tic()

    ! 核心功能:读取,计算,输出
    call terminal_obj%warning('this application is still under development.')
    call run()

    ! 结束
    if (cli_obj%debug_mode) call lgr_obj%destory()
    call terminal_obj%success("time elapsed: " // sec2hms(tmr_obj%toc()))
    call terminal_obj%success(nowtime())

end program spx