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

Last change on this file since 4227 was 4182, checked in by scharf, 5 years ago
  • corrected "Former revisions" section
  • minor formatting in "Former revisions" section
  • added "Author" section
  • Property svn:keywords set to Id
File size: 2.6 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 4182 2019-08-22 15:20:23Z gronemeier $
27! Corrected "Former revisions" section
28!
29! 3655 2019-01-07 16:51:22Z knoop
30! OpenACC port for SPEC
31!
32! Revision 1.1  2004/01/28 15:34:47  raasch
33! Initial revision
34!
35!
36! Description:
37! ------------
38!> Depending on the timestep scheme set the steering factors for the prognostic
39!> equations.
40!------------------------------------------------------------------------------!
41 SUBROUTINE timestep_scheme_steering
42 
43
44    USE control_parameters,                                                    &
45        ONLY:  intermediate_timestep_count, timestep_scheme, tsc
46
47    USE kinds
48
49    IMPLICIT NONE
50
51
52    IF ( timestep_scheme(1:5) == 'runge' )  THEN
53!
54!--    Runge-Kutta schemes (here the factors depend on the respective
55!--    intermediate step)
56       IF ( timestep_scheme == 'runge-kutta-2' )  THEN
57          IF ( intermediate_timestep_count == 1 )  THEN
58             tsc(1:5) = (/ 1.0_wp, 1.0_wp,  0.0_wp, 0.0_wp, 0.0_wp /)
59          ELSE
60             tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /)
61          ENDIF
62       ELSE
63          IF ( intermediate_timestep_count == 1 )  THEN
64             tsc(1:5) = (/ 1.0_wp,  1.0_wp /  3.0_wp,           0.0_wp, 0.0_wp, 0.0_wp /)
65          ELSEIF ( intermediate_timestep_count == 2 )  THEN
66             tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /)
67          ELSE
68             tsc(1:5) = (/ 1.0_wp,  8.0_wp / 15.0_wp,   1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /)
69          ENDIF         
70       ENDIF
71
72       !$ACC UPDATE DEVICE(tsc(1:5))
73
74    ELSEIF ( timestep_scheme == 'euler' )  THEN
75!
76!--    Euler scheme
77       tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /)
78
79    ENDIF
80
81
82 END SUBROUTINE timestep_scheme_steering
Note: See TracBrowser for help on using the repository browser.