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

Last change on this file since 1682 was 1682, checked in by knoop, 9 years ago

Code annotations made doxygen readable

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1!> @file timestep_scheme_steering.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2014 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! ------------------
21! Code annotations made doxygen readable
22!
23! Former revisions:
24! -----------------
25! $Id: timestep_scheme_steering.f90 1682 2015-10-07 23:56:08Z knoop $
26!
27! 1322 2014-03-20 16:38:49Z raasch
28! REAL constants defined as wp-kind
29!
30! 1320 2014-03-20 08:40:49Z raasch
31! ONLY-attribute added to USE-statements
32!
33! 1036 2012-10-22 13:43:42Z raasch
34! code put under GPL (PALM 3.9)
35!
36! 1001 2012-09-13 14:08:46Z raasch
37! all actions concerning leapfrog scheme removed
38!
39! Revision 1.1  2004/01/28 15:34:47  raasch
40! Initial revision
41!
42!
43! Description:
44! ------------
45!> Depending on the timestep scheme set the steering factors for the prognostic
46!> equations.
47!------------------------------------------------------------------------------!
48 SUBROUTINE timestep_scheme_steering
49 
50
51    USE control_parameters,                                                    &
52        ONLY:  intermediate_timestep_count, timestep_scheme, tsc
53
54    USE kinds
55
56    IMPLICIT NONE
57
58
59    IF ( timestep_scheme(1:5) == 'runge' )  THEN
60!
61!--    Runge-Kutta schemes (here the factors depend on the respective
62!--    intermediate step)
63       IF ( timestep_scheme == 'runge-kutta-2' )  THEN
64          IF ( intermediate_timestep_count == 1 )  THEN
65             tsc(1:5) = (/ 1.0_wp, 1.0_wp,  0.0_wp, 0.0_wp, 0.0_wp /)
66          ELSE
67             tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /)
68          ENDIF
69       ELSE
70          IF ( intermediate_timestep_count == 1 )  THEN
71             tsc(1:5) = (/ 1.0_wp,  1.0_wp /  3.0_wp,           0.0_wp, 0.0_wp, 0.0_wp /)
72          ELSEIF ( intermediate_timestep_count == 2 )  THEN
73             tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /)
74          ELSE
75             tsc(1:5) = (/ 1.0_wp,  8.0_wp / 15.0_wp,   1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /)
76          ENDIF         
77       ENDIF
78
79    ELSEIF ( timestep_scheme == 'euler' )  THEN
80!
81!--    Euler scheme
82       tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /)
83
84    ENDIF
85
86
87 END SUBROUTINE timestep_scheme_steering
Note: See TracBrowser for help on using the repository browser.