source: palm/trunk/SOURCE/timestep_scheme_steering.f90 @ 4180

Last change on this file since 4180 was 4180, checked in by scharf, 5 years ago

removed comments in 'Former revisions' section that are older than 01.01.2019

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1!> @file timestep_scheme_steering.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2019 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: timestep_scheme_steering.f90 4180 2019-08-21 14:37:54Z scharf $
27! OpenACC port for SPEC
28!
29!
30! Description:
31! ------------
32!> Depending on the timestep scheme set the steering factors for the prognostic
33!> equations.
34!------------------------------------------------------------------------------!
35 SUBROUTINE timestep_scheme_steering
36 
37
38    USE control_parameters,                                                    &
39        ONLY:  intermediate_timestep_count, timestep_scheme, tsc
40
41    USE kinds
42
43    IMPLICIT NONE
44
45
46    IF ( timestep_scheme(1:5) == 'runge' )  THEN
47!
48!--    Runge-Kutta schemes (here the factors depend on the respective
49!--    intermediate step)
50       IF ( timestep_scheme == 'runge-kutta-2' )  THEN
51          IF ( intermediate_timestep_count == 1 )  THEN
52             tsc(1:5) = (/ 1.0_wp, 1.0_wp,  0.0_wp, 0.0_wp, 0.0_wp /)
53          ELSE
54             tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /)
55          ENDIF
56       ELSE
57          IF ( intermediate_timestep_count == 1 )  THEN
58             tsc(1:5) = (/ 1.0_wp,  1.0_wp /  3.0_wp,           0.0_wp, 0.0_wp, 0.0_wp /)
59          ELSEIF ( intermediate_timestep_count == 2 )  THEN
60             tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /)
61          ELSE
62             tsc(1:5) = (/ 1.0_wp,  8.0_wp / 15.0_wp,   1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /)
63          ENDIF         
64       ENDIF
65
66       !$ACC UPDATE DEVICE(tsc(1:5))
67
68    ELSEIF ( timestep_scheme == 'euler' )  THEN
69!
70!--    Euler scheme
71       tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /)
72
73    ENDIF
74
75
76 END SUBROUTINE timestep_scheme_steering
Note: See TracBrowser for help on using the repository browser.