source: palm/trunk/SOURCE/lpm_write_exchange_statistics.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: 4.1 KB
Line 
1!> @file lpm_write_exchange_statistics.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: lpm_write_exchange_statistics.f90 1682 2015-10-07 23:56:08Z knoop $
26!
27! 1359 2014-04-11 17:15:14Z hoffmann
28! New particle structure integrated.
29!
30! 1320 2014-03-20 08:40:49Z raasch
31! ONLY-attribute added to USE-statements,
32! comment fields (!:) to be used for variable explanations added to
33! all variable declaration statements
34!
35! 1036 2012-10-22 13:43:42Z raasch
36! code put under GPL (PALM 3.9)
37!
38! 849 2012-03-15 10:35:09Z raasch
39! initial revision (former part of advec_particles)
40!
41!
42! Description:
43! ------------
44!> Write particle statistics (total particle numbers and number of particles
45!> exchanged between subdomains) on ASCII file.
46!>
47!> @attention Output format of this file could be further improved! At current
48!>            stage it is only a test output.
49!------------------------------------------------------------------------------!
50 SUBROUTINE lpm_write_exchange_statistics
51 
52
53    USE control_parameters,                                                    &
54        ONLY:  current_timestep_number, dt_3d, simulated_time
55
56    USE indices,                                                               &
57        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
58
59    USE particle_attributes,                                                   &
60        ONLY:  grid_particles, maximum_number_of_particles,                    &
61               number_of_particles, particles, prt_count,                      &
62               trlp_count_sum, trlp_count_recv_sum, trnp_count_sum,            &
63               trnp_count_recv_sum, trrp_count_sum, trrp_count_recv_sum,       &
64               trsp_count_sum, trsp_count_recv_sum
65
66    USE pegrid
67
68    IMPLICIT NONE
69
70    INTEGER(iwp) :: ip         !<
71    INTEGER(iwp) :: jp         !<
72    INTEGER(iwp) :: kp         !<
73
74!
75!-- Determine maximum number of particles (i.e., all possible particles that
76!-- have been allocated) and the current number of particles
77    number_of_particles         = 0
78    maximum_number_of_particles = 0
79    DO  ip = nxl, nxr
80       DO  jp = nys, nyn
81          DO  kp = nzb+1, nzt
82             number_of_particles = number_of_particles                         &
83                                     + prt_count(kp,jp,ip)
84             maximum_number_of_particles = maximum_number_of_particles         &
85                                     + SIZE(grid_particles(kp,jp,ip)%particles)
86          ENDDO
87       ENDDO
88    ENDDO
89
90    CALL check_open( 80 )
91#if defined( __parallel )
92    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
93                        number_of_particles, pleft, trlp_count_sum,      &
94                        trlp_count_recv_sum, pright, trrp_count_sum,     &
95                        trrp_count_recv_sum, psouth, trsp_count_sum,     &
96                        trsp_count_recv_sum, pnorth, trnp_count_sum,     &
97                        trnp_count_recv_sum, maximum_number_of_particles
98    CALL close_file( 80 )
99#else
100    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
101                        number_of_particles, maximum_number_of_particles
102#endif
103
104!
105!-- Formats
1068000 FORMAT (I6,1X,F7.2,4X,I10,5X,4(I3,1X,I4,'/',I4,2X),6X,I10)
107
108
109 END SUBROUTINE lpm_write_exchange_statistics
Note: See TracBrowser for help on using the repository browser.