mesh_timestep_rk4 Subroutine

private subroutine mesh_timestep_rk4(minLevel, maxLevel, currentLevel, cubes, tree, timestep_list, nSteps, equation, general, commStateTimer, poly_proj_list)

Subroutine for timestepping with explicit runge kutta of order 4. It contains four Euler forwarding substeps: 0.1 temp = u0 1.1 u1 = rk4_substep(temp) = rhs(temp) 1.2 temp = u0 + dt/2 * u1 2.1 u2 = rk4_substep(temp) = rhs(temp) 2.2 temp = u0 + dt/2 * u2 3.1 u3 = rk4_substep(temp) = rhs(temp) 3.2 temp = u0 + dt * u3 4.1 u4 = rk4_substep(temp) = rhs(temp) 4.2 u0 = u0 + dt/6 * ( u1 + 2*(u2+u3) + u4 ) After each substep, the results are stabilized

VK call tem_startTimer( timerHandle = atl_timerHandles%preciceWrite ) VK call tem_stopTimer( timerHandle = atl_timerHandles%preciceWrite )

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: minLevel

The minimum refinement level of the mesh.

integer, intent(in) :: maxLevel

The maximum refinement level of the mesh.

integer, intent(in) :: currentLevel

The level the timestep has to be performed for.

type(atl_cube_container_type), intent(inout) :: cubes

Container for the cubical elements.

type(treelmesh_type), intent(in) :: tree

treelm mesh

type(atl_timestep_type), intent(inout) :: timestep_list(minLevel:)

List of levelwise timestepping algorihtms

integer, intent(in) :: nSteps

The number of steps of the time stepping scheme (assumed to be 4)

type(atl_Equations_type), intent(inout) :: equation

The equation you are operating with.

type(tem_general_type), intent(inout) :: general

General treelm settings

integer, intent(inout) :: commStateTimer

Timer for measuring the communication time inside this routine.

type(ply_poly_project_type), intent(inout) :: poly_proj_list(:)

unique list for projection methods


Calls

proc~~mesh_timestep_rk4~~CallsGraph proc~mesh_timestep_rk4 mesh_timestep_rk4 none~substep substep proc~mesh_timestep_rk4->none~substep proc~atl_write_precice atl_write_precice proc~mesh_timestep_rk4->proc~atl_write_precice none~compute_intermediate~2 compute_intermediate none~substep->none~compute_intermediate~2 proc~rk4_substep rk4_substep none~substep->proc~rk4_substep proc~atl_stabilize atl_stabilize none~substep->proc~atl_stabilize none~compute_final compute_final none~substep->none~compute_final tem_precice_write tem_precice_write proc~atl_write_precice->tem_precice_write proc~rk4_substep->proc~rk4_substep interface~atl_compute_rhs atl_compute_rhs proc~rk4_substep->interface~atl_compute_rhs interface~atl_preprocess_rhs atl_preprocess_rhs proc~rk4_substep->interface~atl_preprocess_rhs interface~atl_postprocess_rhs atl_postprocess_rhs proc~rk4_substep->interface~atl_postprocess_rhs proc~tem_abort tem_abort proc~atl_stabilize->proc~tem_abort proc~atl_cheb_spectral_visc_1d atl_cheb_spectral_visc_1d proc~atl_stabilize->proc~atl_cheb_spectral_visc_1d proc~atl_covolume_1d atl_covolume_1d proc~atl_stabilize->proc~atl_covolume_1d proc~atl_spectral_visc_1d atl_spectral_visc_1d proc~atl_stabilize->proc~atl_spectral_visc_1d proc~tem_starttimer tem_startTimer proc~atl_stabilize->proc~tem_starttimer proc~atl_spectral_visc_3d atl_spectral_visc_3d proc~atl_stabilize->proc~atl_spectral_visc_3d interface~ply_poly_project_m2n ply_poly_project_m2n proc~atl_stabilize->interface~ply_poly_project_m2n proc~atl_spectral_visc_2d atl_spectral_visc_2d proc~atl_stabilize->proc~atl_spectral_visc_2d proc~atl_positivity_preserv atl_positivity_preserv proc~atl_stabilize->proc~atl_positivity_preserv proc~tem_stoptimer tem_stopTimer proc~atl_stabilize->proc~tem_stoptimer proc~ply_convert2oversample ply_convert2oversample proc~atl_stabilize->proc~ply_convert2oversample proc~atl_cons_positivity_preserv_2d atl_cons_positivity_preserv_2d proc~atl_stabilize->proc~atl_cons_positivity_preserv_2d proc~atl_covolume atl_covolume proc~atl_stabilize->proc~atl_covolume proc~ply_change_poly_space ply_change_poly_space proc~atl_stabilize->proc~ply_change_poly_space proc~atl_cons_positivity_preserv atl_cons_positivity_preserv proc~atl_stabilize->proc~atl_cons_positivity_preserv proc~atl_positivity_preserv_2d atl_positivity_preserv_2d proc~atl_stabilize->proc~atl_positivity_preserv_2d proc~atl_get_numbndelems atl_get_numBndElems proc~atl_stabilize->proc~atl_get_numbndelems proc~atl_covolume_2d atl_covolume_2d proc~atl_stabilize->proc~atl_covolume_2d

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iLevel
integer, private :: iStep
type(atl_statedata_type), private :: statedata_list_temp(minLevel:maxLevel)

Subroutines

subroutine substep(iSubstep, currentLevel, minLevel, maxLevel, cubes, tree, statedata_list_temp, poly_proj_list, timestep_list, equation, general, commStateTimer)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: iSubstep

the substep within the RK4

integer, intent(in) :: currentLevel

The level the timestep has to be performed for.

integer, intent(in) :: minLevel

The minimum refinement level of the mesh.

integer, intent(in) :: maxLevel

The maximum refinement level of the mesh.

type(atl_cube_container_type), intent(inout) :: cubes

Container for the cubical elements.

type(treelmesh_type), intent(in) :: tree

treelm mesh

type(atl_statedata_type), intent(inout) :: statedata_list_temp(minLevel:maxLevel)

Temporary state data

type(ply_poly_project_type), intent(inout) :: poly_proj_list(:)

unique list for projection methods

type(atl_timestep_type), intent(inout) :: timestep_list(minLevel:)

List of levelwise timestepping algorihtms

type(atl_Equations_type), intent(inout) :: equation

The equation you are operating with.

type(tem_general_type), intent(inout) :: general

General treelm settings

integer, intent(inout) :: commStateTimer

Timer for measuring the communication time inside this routine.

subroutine compute_intermediate(nTotal, nDofs, nScalars, state_tmp, state1, state2, factor)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nTotal
integer, intent(in) :: nDofs
integer, intent(in) :: nScalars
real(kind=rk), intent(out) :: state_tmp(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state1(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state2(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: factor

subroutine compute_final(nTotal, nDofs, nScalars, state, state0, state1, state2, state3, state4, dt)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nTotal
integer, intent(in) :: nDofs
integer, intent(in) :: nScalars
real(kind=rk), intent(out) :: state(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state0(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state1(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state2(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state3(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: state4(nTotal,nDofs,nScalars)
real(kind=rk), intent(in) :: dt