WAVEWATCH III  beta 0.0.1
yowelementpool.F90
Go to the documentation of this file.
1 !PDLIB Software License
2 !
3 !Software, as understood herein, shall be broadly interpreted as being inclusive of algorithms,
4 !source code, object code, data bases and related documentation, all of which shall be furnished
5 !free of charge to the Licensee. Corrections, upgrades or enhancements may be furnished and, if
6 !furnished, shall also be furnished to the Licensee without charge. NOAA, however, is not
7 !required to develop or furnish such corrections, upgrades or enhancements.
8 !Roland & Partner software, whether that initially furnished or corrections or upgrades,
9 !are furnished "as is". Roland & Partner furnishes its software without any warranty
10 !whatsoever and is not responsible for any direct, indirect or consequential damages
11 !that may be incurred by the Licensee. Warranties of merchantability, fitness for any
12 !particular purpose, title, and non-infringement, are specifically negated.
13 !The Licensee is not required to develop any software related to the licensed software.
14 !However, in the event that the Licensee does so, the Licensee is required to offer same
15 !to Roland & Partner for inclusion under the instant licensing terms with Roland & Partner
16 !licensed software along with documentation regarding its principles, use and its advantages.
17 !This includes changes to the wave model proper including numerical and physical approaches
18 !to wave modeling, and boundary layer parameterizations embedded in the wave model
19 !A Licensee may reproduce sufficient software to satisfy its needs.
20 !All copies shall bear the name of the software with any version number
21 !as well as replicas of any applied copyright notice, trademark notice,
22 !other notices and credit lines. Additionally, if the copies have been modified,
23 !e.g. with deletions or additions, this shall be so stated and identified.
24 !All of Licensee's employees who have a need to use the software may have access
25 !to the software but only after reading the instant license and stating, in writing,
26 !that they have read and understood the license and have agreed to its terms.
27 !Licensee is responsible for employing reasonable efforts to assure
28 !that only those of its employees that should have access to the software, in fact, have access.
29 !The Licensee may use the software for any purpose relating to sea state prediction.
30 !No disclosure of any portion of the software, whether by means of a media or verbally,
31 !may be made to any third party by the Licensee or the Licensee's employees
32 !The Licensee is responsible for compliance with any applicable export or
33 !import control laws of the United States, the European Union and Germany.
34 !
35 !© 2009 Roland&Partner, Georgenstr.32, 64297 Germany. All rights reserved.
36 !PDLIB is a trademark of Roland & Partner. No unauthorized use without permission.
37 !
39  implicit none
40  private
41  public :: finalizeelementpool, belongto
42 
43 
45  integer, public :: ne_global = 0
46 
48  integer, public :: ne = 0
49 
51 
56  integer, public, target, allocatable :: ine(:,:)
57 
61  !integer, public, allocatable :: INE_global(:,:)
62 
65  integer, public, target, allocatable :: ielg(:)
66 
67 contains
68 
69 
73  function belongto(ele_in, rank)
75  use yownodepool, only: t_node, nodes_global
76  implicit none
77  integer, intent(in) :: ele_in(3)
78  integer, intent(in), optional :: rank
79  logical :: belongto
80 
81  integer :: mydomainid
82  integer :: nodes(3)
83  integer j
84 
85  if(present(rank) .eqv. .true.) then
86  mydomainid = rank +1
87  else
88  mydomainid = myrank + 1
89  endif
90 
91  ! check if this element adjoint to three different domains.
92  belongto = .false.
93  DO j=1,3
94  IF (nodes_global(ele_in(j)) % domainID == mydomainid) THEN
95  belongto = .true.
96  END IF
97  END DO
98  end function belongto
99 
100 
101  subroutine finalizeelementpool()
102  implicit none
103 
104  if(allocated(ine)) deallocate(ine)
105  !if(allocated(INE_global)) deallocate(INE_global)
106  if(allocated(ielg)) deallocate(ielg)
107  end subroutine finalizeelementpool
108 end module yowelementpool
yowelementpool::ielg
integer, dimension(:), allocatable, target, public ielg
global element array.
Definition: yowelementpool.F90:65
yowelementpool
Definition: yowelementpool.F90:38
yowelementpool::finalizeelementpool
subroutine, public finalizeelementpool()
Definition: yowelementpool.F90:102
yowelementpool::ne
integer, public ne
number of local elements
Definition: yowelementpool.F90:48
yowdatapool::myrank
integer, save myrank
The thread id.
Definition: yowdatapool.F90:62
yownodepool
Has data that belong to nodes.
Definition: yownodepool.F90:39
yowelementpool::belongto
logical function, public belongto(ele_in, rank)
Returns true if the element belongs to rank.
Definition: yowelementpool.F90:74
yownodepool::t_node
Holds the nodes data.
Definition: yownodepool.F90:48
yowdatapool
Has fancy data.
Definition: yowdatapool.F90:39
yowelementpool::ine
integer, dimension(:,:), allocatable, target, public ine
number of elements of the augmented domain
Definition: yowelementpool.F90:56
yowelementpool::ne_global
integer, public ne_global
number of elements, global
Definition: yowelementpool.F90:45
yownodepool::nodes_global
type(t_node), dimension(:), allocatable, target, public nodes_global
all nodes with their data.
Definition: yownodepool.F90:103
yowdatapool::ntasks
integer, save ntasks
Number of threads.
Definition: yowdatapool.F90:58