From d04b05b656e7bd9da3c77b016b318fe6dad2263b Mon Sep 17 00:00:00 2001 From: Antoine <antoine.hoffmann@epfl.ch> Date: Wed, 27 Sep 2023 15:10:43 +0200 Subject: [PATCH] added explicit euler --- src/time_integration_mod.F90 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/time_integration_mod.F90 b/src/time_integration_mod.F90 index e8cff1d4..ce550814 100644 --- a/src/time_integration_mod.F90 +++ b/src/time_integration_mod.F90 @@ -70,6 +70,9 @@ CONTAINS use parallel, ONLY: my_id IMPLICIT NONE SELECT CASE (numerical_scheme) + ! Order 1 method + CASE ('EE') + CALL EE ! Order 2 methods CASE ('RK2') CALL RK2 @@ -95,6 +98,22 @@ CONTAINS IF (my_id .EQ. 0) WRITE(*,*) " Time integration with ", numerical_scheme END SUBROUTINE set_numerical_scheme + !!! first order time schemes + SUBROUTINE EE + ! Butcher coeff for Euler Explicit scheme + USE basic + USE prec_const + IMPLICIT NONE + INTEGER,PARAMETER :: nbstep = 1 + CALL allocate_array(c_E,1,nbstep) + CALL allocate_array(b_E,1,nbstep,1,1) + CALL allocate_array(A_E,1,nbstep,1,nbstep) + ntimelevel = 1 + c_E(1) = 0._xp + b_E(1,1) = 1._xp + A_E(1,1) = 0._xp + END SUBROUTINE EE + !!! second order time schemes SUBROUTINE RK2 ! Butcher coeff for clasical RK2 (Heun's) -- GitLab