Choral
R2d_mod.F90
Go to the documentation of this file.
1 
23 
24 module r2d_mod
25 
26  use real_type, only: rp
27  use basic_tools
28  !$ use OMP_LIB
29 
30  implicit none
31  private
32 
33  ! %----------------------------------------%
34  ! | |
35  ! | PUBLIC DATA |
36  ! | |
37  ! %----------------------------------------%
38  public :: copy
39 
40  ! %----------------------------------------%
41  ! | |
42  ! | GENERIc SUBROUTINES |
43  ! | |
44  ! %----------------------------------------%
45 
47  interface copy
48  module procedure r2d_copy !! TESTED
49  end interface copy
50 
51 
52 contains
53 
54 
57  subroutine r2d_copy(y, x)
58  real(RP), dimension(:,:), intent(out) :: y
59  real(RP), dimension(:,:), intent(in) :: x
60 
61  integer :: ii, n1, n2
62 
63 #if DBG>0
64  if ( size(x,1) < size(y,1)) call quit(&
65  &"R2d_mod: R2d_copy: 1" )
66  if ( size(x,2) < size(y,2)) call quit(&
67  &"R2d_mod: R2d_copy: 2" )
68 #endif
69 
70  n1 = size(y,1)
71  n2 = size(y,2)
72  !$OMP PARALLEL
73  !$OMP DO
74  do ii=1, n2
75  y(1:n1, ii) = x(1:n1, ii)
76  end do
77  !$OMP END DO
78  !$OMP END PARALLEL
79 
80  end subroutine r2d_copy
81 
82 
83 end module r2d_mod
BASIC TOOLS
Definition: basic_tools.F90:8
subroutine r2d_copy(y, x)
y(:,:) := x(:,:)
Definition: R2d_mod.F90:58
integer, parameter, public rp
real(kind=RP) = real precision in the code REAL_TOL = epsilon to test real equality ...
Definition: real_type.F90:90
subroutine, public quit(message)
Stop program execution, display an error messahe.
REAL NUMBERS PRECISION IN CHORAL: selects simple/double/quad
Definition: real_type.F90:33
y = x
Definition: R2d_mod.F90:47
OPENMP OPERATIONS ON 2-DIMENSIONAL REAL ARRAYS
Definition: R2d_mod.F90:24