at_module.f90
Go to the documentation of this file.
1 ! -*- mode: f90; coding: utf-8 -*-
2 !----------------------------------------------------------------------
3 ! Copyright(c) 2019 SPMDODEL Development Group. All rights reserved.
4 !
5 ! 履歴 2019/03/28 竹広真一
6 ! 2019/09/28 佐々木洋平
7 ! 2019/10/09 佐々木洋平
8 !----------------------------------------------------------------------
77 
78 module at_module
79 
80  use dc_types, only: dp
81  use dc_message, only: messagenotify
82  use spml_utils, only: pi
83  use lumatrix, only: lusolve, ludecomp
84  use ae_module, only: ae_initial, ae_ag, ag_ae
85  implicit none
86 
87  private
88  public g_x
89  public g_x_weight
90  public at_initial
91  public at_finalize
92  public ag_at
93  public at_ag
94  public g_t
95  public t_g
96  public at_dx_at
97  public t_dx_t
98  public interpolate_t
99  public a_interpolate_at
100  public at_boundaries
101  public t_boundaries
102  public at_boundaries_dd
103  public at_boundaries_dn
104  public at_boundaries_nd
105  public at_boundaries_nn
106  public at_boundariestau_dd
107  public at_boundariestau_dn
108  public at_boundariestau_nd
109  public at_boundariestau_nn
110  public at_boundariesgrid
111  public t_boundariesgrid
112  public at_boundariesgrid_dd
113  public at_boundariesgrid_dn
114  public at_boundariesgrid_nd
115  public at_boundariesgrid_nn
116  public a_int_ag
117  public int_g
118  public a_avr_ag
119  public avr_g
120 
121  !----------------------------------------------------------------------
123  interface at_boundaries_dd
124  module procedure at_boundariestau_dd_1d
125  module procedure at_boundariestau_dd_2d
126  end interface at_boundaries_dd
127 
128  !----------------------------------------------------------------------
131  interface at_boundaries_dn
132  module procedure at_boundariestau_dn_1d
133  module procedure at_boundariestau_dn_2d
134  end interface at_boundaries_dn
135 
136  !----------------------------------------------------------------------
139  interface at_boundaries_nd
140  module procedure at_boundariestau_nd_1d
141  module procedure at_boundariestau_nd_2d
142  end interface at_boundaries_nd
143 
144  !----------------------------------------------------------------------
147  interface at_boundaries_nn
148  module procedure at_boundariestau_nn_1d
149  module procedure at_boundariestau_nn_2d
150  end interface at_boundaries_nn
151 
152  !----------------------------------------------------------------------
155  interface at_boundariestau_dd
156  module procedure at_boundariestau_dd_1d
157  module procedure at_boundariestau_dd_2d
158  end interface at_boundariestau_dd
159 
160  !----------------------------------------------------------------------
163  interface at_boundariestau_dn
164  module procedure at_boundariestau_dn_1d
165  module procedure at_boundariestau_dn_2d
166  end interface at_boundariestau_dn
167 
168  !----------------------------------------------------------------------
171  interface at_boundariestau_nd
172  module procedure at_boundariestau_nd_1d
173  module procedure at_boundariestau_nd_2d
174  end interface at_boundariestau_nd
175 
176  !----------------------------------------------------------------------
179  interface at_boundariestau_nn
180  module procedure at_boundariestau_nn_1d
181  module procedure at_boundariestau_nn_2d
182  end interface at_boundariestau_nn
183 
184  !----------------------------------------------------------------------
187  interface at_boundariesgrid_dd
188  module procedure at_boundariesgrid_dd_1d
189  module procedure at_boundariesgrid_dd_2d
190  end interface at_boundariesgrid_dd
191 
192  !----------------------------------------------------------------------
195  interface at_boundariesgrid_dn
196  module procedure at_boundariesgrid_dn_1d
197  module procedure at_boundariesgrid_dn_2d
198  end interface at_boundariesgrid_dn
199 
200  !----------------------------------------------------------------------
203  interface at_boundariesgrid_nd
204  module procedure at_boundariesgrid_nd_1d
205  module procedure at_boundariesgrid_nd_2d
206  end interface at_boundariesgrid_nd
207 
208  !----------------------------------------------------------------------
211  interface at_boundariesgrid_nn
212  module procedure at_boundariesgrid_nn_1d
213  module procedure at_boundariesgrid_nn_2d
214  end interface at_boundariesgrid_nn
215 
216  !----------------------------------------------------------------------
218  real(DP), allocatable :: g_x(:)
220  real(DP), allocatable :: g_x_weight(:)
221 
222  !----------------------------------------------------------------------
223  integer(8), dimension(:), allocatable :: it
224  real(DP), dimension(:), allocatable :: t
226  integer(8) :: im
228  integer(8) :: km
230  real(DP) :: xl
232  logical :: at_initialize = .false.
234  logical :: at_boundariestau_dd_first = .true.
236  logical :: at_boundariestau_dn_first = .true.
238  logical :: at_boundariestau_nd_first = .true.
240  logical :: at_boundariestau_nn_first = .true.
242  logical :: at_boundariesgrid_dd_first = .true.
244  logical :: at_boundariesgrid_dn_first = .true.
246  logical :: at_boundariesgrid_nd_first = .true.
248  logical :: at_boundariesgrid_nn_first = .true.
249 
250  ! save :: im, km, xl, it, t, g_X, g_X_Weight, at_Initialize
251  save :: im, km, xl, g_x, g_x_weight, at_initialize
252  save :: at_boundariestau_dd_first
253  save :: at_boundariestau_dn_first
254  save :: at_boundariestau_nd_first
255  save :: at_boundariestau_nn_first
256  save :: at_boundariesgrid_dd_first
257  save :: at_boundariesgrid_dn_first
258  save :: at_boundariesgrid_nd_first
259  save :: at_boundariesgrid_nn_first
260 
261 contains
262  !-----------------------------------------------------------------------
267  subroutine at_initial(i,k,xmin,xmax)
269  integer,intent(in) :: i
271  integer,intent(in) :: k
273  real(DP),intent(in) :: xmin, xmax
274  integer(8) :: ii,kk
275 
276  im=i
277  km=k
278  xl = xmax-xmin
279 
280  if ( im <= 0 .or. km <= 0 ) then
281  call messagenotify('E','at_initial', &
282  & 'Number of grid points and waves should be positive')
283  elseif ( mod(im,2_8) /= 0 ) then
284  call messagenotify('E','at_initial', &
285  & 'Number of grid points should be even')
286  elseif ( km > im ) then
287  call messagenotify('E','at_initial', &
288  & 'KM shoud be less equal IM')
289  endif
290 
291  allocate(it(im),t(3*im))
292  call fxrini(2*im,it,t)
293 
294  allocate(g_x(0:im))
295  do ii=0,im
296  g_x(ii) = (xmax+xmin)/2 + xl/2 * cos(pi*ii/im)
297  end do
298 
299  allocate(g_x_weight(0:im))
300 
301  do ii=0,im
302  g_x_weight(ii) = 1.0d0
303  do kk=2,km,2
304  g_x_weight(ii) = g_x_weight(ii) &
305  + 2.0d0/(1.0d0 - kk**2) * cos(kk*ii*pi/im)
306  enddo
307  ! 最後の和は factor 1/2.
308  if ( (km == im) .and. (mod(im,2_8) == 0) ) then
309  g_x_weight(ii) = g_x_weight(ii) &
310  - 1.0d0/(1.0d0 - km**2)* cos(km*ii*pi/im)
311  endif
312  g_x_weight(ii) = 2.0d0/im * g_x_weight(ii) * (xl/2.0d0)
313  enddo
314  ! g_X_Weight(0) = g_X_Weight(0) / 2
315  ! g_X_Weight(im) = g_X_Weight(im) / 2
316  g_x_weight(0) = g_x_weight(0) * 0.5d0
317  g_x_weight(im) = g_x_weight(im) * 0.5d0
318 
319  at_initialize = .true.
320 
321  call messagenotify('M','at_initial',&
322  & 'at_module (2019/09/28) is initialized')
323  end subroutine at_initial
324 
325  !-----------------------------------------------------------------------
327  function ag_at(at_data)
329  real(DP), dimension(:,0:), intent(in) :: at_data
331  real(DP), dimension(size(at_data,1),0:im) :: ag_at
332 
333  real(DP), dimension(size(at_data,1),0:2*im-1) :: y
334  integer(8) :: nm, k
335 
336  nm=size(at_data,1)
337 
338  y = 0.0d0
339  y(:,0) = at_data(:,0)
340  do k=1,min(km,im-1)
341  y(:,2*k) = at_data(:,k)
342  y(:,2*k+1) = 0.0d0
343  enddo
344  if ( km == im ) then
345  y(:,1) = at_data(:,km)
346  endif
347 
348  call fxrtba(nm,2*im,y,it,t)
349  ! ag_at = y(:,0:im)/2
350  ag_at = y(:,0:im)*0.50d0
351 
352  end function ag_at
353 
354  !-----------------------------------------------------------------------
356  function g_t(t_data)
358  real(DP), dimension(:), intent(in) :: t_data
360  real(DP), dimension(0:im) :: g_t
361 
362  real(DP), dimension(1,size(t_data)) :: t_work
363  real(DP), dimension(1,0:im) :: g_work
364 
365  t_work(1,:) = t_data
366  g_work = ag_at(t_work)
367  g_t = g_work(1,:)
368 
369  end function g_t
370 
371  !-----------------------------------------------------------------------
373  function at_ag(ag_data)
375  real(DP), dimension(:,0:), intent(in) :: ag_data
377  real(DP), dimension(size(ag_data,1),0:km) :: at_ag
378 
379  real(DP), dimension(size(ag_data,1),0:2*im-1) :: y
380  integer(8) :: nm, k
381 
382  nm=size(ag_data,1)
383 
384  y(:,0) = ag_data(:,0)
385  do k=1,im-1
386  y(:,2*k) = ag_data(:,k)
387  y(:,2*k+1) = 0.0d0
388  enddo
389  y(:,1) = ag_data(:,im)
390 
391  call fxrtba(nm,2*im,y,it,t)
392  at_ag = y(:,0:km)/im
393 
394  end function at_ag
395 
396  !-----------------------------------------------------------------------
398  function t_g(g_data)
400  real(DP), dimension(:), intent(in) :: g_data
402  real(DP), dimension(0:km) :: t_g
403 
404 
405  real(DP), dimension(1,size(g_data)) :: ag_work
406  real(DP), dimension(1,0:km) :: at_work
407 
408  ag_work(1,:) = g_data
409  at_work = at_ag(ag_work)
410  t_g = at_work(1,:)
411 
412  end function t_g
413 
414  !-----------------------------------------------------------------------
419  function at_dx_at(at_data)
421  real(DP), dimension(:,0:), intent(in) :: at_data
423  real(DP), dimension(size(at_data,1),0:size(at_data,2)-1) :: at_Dx_at
424 
425  integer(8) :: m, k
426  integer(8) :: nm, kmax
427 
428  nm=size(at_data,1)
429  kmax=size(at_data,2)-1
430 
431  ! TODO: loop 併合できないか?
432  if ( kmax == im ) then
433  do m=1,nm
434  at_dx_at(m,kmax) = 0.0d0
435  ! at_Dx_at(m,kmax-1) = 2.0D0 * km * at_data(m,kmax) /2
436  at_dx_at(m,kmax-1) = 2.0d0 * km * at_data(m,kmax)* 0.5d0
437  enddo
438  else
439  do m=1,nm
440  at_dx_at(m,kmax) = 0.0d0
441  ! スタートはグリッド対応最大波数未満. Factor 1/2 不要
442  at_dx_at(m,kmax-1) = 2.0d0 * km * at_data(m,kmax)
443  enddo
444  endif
445 
446  do k=kmax-2,0,-1
447  do m=1,nm
448  at_dx_at(m,k) = at_dx_at(m,k+2) + 2.0d0*(k+1)*at_data(m,k+1)
449  enddo
450  enddo
451 
452  do k=0,kmax
453  do m=1,nm
454  at_dx_at(m,k) = 2.0d0/xl * at_dx_at(m,k)
455  enddo
456  enddo
457 
458  end function at_dx_at
459 
460 
461  !-----------------------------------------------------------------------
466  function t_dx_t(t_data)
468  real(DP), dimension(:), intent(in) :: t_data
470  real(DP), dimension(size(t_data)) :: t_Dx_t
471 
472  real(DP), dimension(1,size(t_data)) :: at_work
473 
474  at_work(1,:) = t_data
475  at_work = at_dx_at(at_work)
476  t_dx_t = at_work(1,:)
477 
478  end function t_dx_t
479 
480  !-----------------------------------------------------------------------
482  function a_int_ag(ag)
484  real(DP), dimension(:,0:), intent(in) :: ag
486  real(DP), dimension(size(ag,1)) :: a_Int_ag
487 
488  integer(8) :: i
489 
490  if ( size(ag,2) < im+1 ) then
491  call messagenotify('E','ae_ag', &
492  'The Grid points of input data too small.')
493  elseif ( size(ag,2) > im+1 ) then
494  call messagenotify('W','ae_ag', &
495  'The Grid points of input data too large.')
496  endif
497 
498  a_int_ag = 0.0d0
499  do i=0,im
500  a_int_ag(:) = a_int_ag(:) + ag(:,i)*g_x_weight(i)
501  enddo
502  end function a_int_ag
503 
504  !-----------------------------------------------------------------------
506  function int_g(g)
508  real(DP), dimension(0:im), intent(in) :: g
510  real(DP) :: Int_g
511  int_g = sum(g*g_x_weight)
512  end function int_g
513 
514  !-----------------------------------------------------------------------
516  function a_avr_ag(ag)
518  real(DP), dimension(:,0:), intent(in) :: ag
520  real(DP), dimension(size(ag,1)) :: a_Avr_ag
521  a_avr_ag = a_int_ag(ag)/sum(g_x_weight)
522 
523  end function a_avr_ag
524 
525  !-----------------------------------------------------------------------
527  function avr_g(g)
529  real(DP), dimension(0:im), intent(in) :: g
531  real(DP) :: Avr_g
532 
533  avr_g = int_g(g)/sum(g_x_weight)
534  end function avr_g
535 
536  !-----------------------------------------------------------------------
538  function interpolate_t(t_data,xval)
540  real(DP), dimension(0:), intent(in) :: t_data
542  real(DP), intent(in) :: xval
544  real(DP) :: Interpolate_t
545 
546  integer :: kmax
547  ! Crenshow's reccurence formula 計算用変数
548  real(DP) :: y2, y1, y0, x
549  integer :: k
550  ! DO 文変数
551 
552  kmax = size(t_data)-1
553 
554  ! x =(xval -(g_X(0)+g_X(im))/2 )/(g_X(0)-g_X(im))*2
555  x =(xval -(g_x(0)+g_x(im))*0.50d0 )/(g_x(0)-g_x(im))*2.0d0
556 
557  y2 = 0.0d0
558  y1 = 0.0d0
559  do k=kmax,1,-1
560  y0 = 2.0d0*x*y1 - y2 + t_data(k)
561  y2 = y1
562  y1 = y0
563  enddo
564 
565  ! Interpolate_t = - y2 + x*y1 + t_data(0)/2
566  interpolate_t = - y2 + x*y1 + t_data(0)*0.5d0
567  if ( kmax == int(im) ) then
568  interpolate_t = interpolate_t -t_data(kmax)/2.0d0*cos(kmax*acos(x))
569  endif
570 
571  end function interpolate_t
572 
573  !-----------------------------------------------------------------------
575  function a_interpolate_at(at_data,xval)
577  real(DP), dimension(:,0:), intent(in) :: at_data
579  real(DP), intent(in) :: xval
581  real(DP), dimension(size(at_data,1)) :: a_Interpolate_at
582 
583 
584  integer :: kmax
585  ! 入力配列の最大次数
586  real(DP), dimension(size(at_data,1)) :: y2, y1, y0
587  real(DP) :: x
588  ! Crenshow's reccurence formula 計算用変数
589  integer :: k
590  ! DO 文変数
591 
592  kmax = size(at_data,2)-1
593 
594  ! x =(xval -(g_X(0)+g_X(im))/2 )/(g_X(0)-g_X(im))*2
595  x =(xval -(g_x(0)+g_x(im))*0.5d0 )/(g_x(0)-g_x(im))*2.0d0
596 
597  y2 = 0.0d0
598  y1 = 0.0d0
599  do k=kmax,1,-1
600  y0 = 2.0d0*x*y1 - y2 + at_data(:,k)
601  y2 = y1
602  y1 = y0
603  enddo
604 
605  ! a_Interpolate_at = - y2 + x*y1 + at_data(:,0)/2
606  a_interpolate_at = - y2 + x*y1 + at_data(:,0)*0.5d0
607  if ( kmax == int(im) ) then
608  a_interpolate_at = a_interpolate_at &
609  & - at_data(:,kmax)/2.0d0*cos(kmax*acos(x))
610  endif
611  end function a_interpolate_at
612 
613  !-----------------------------------------------------------------------
618  subroutine at_boundaries(at_data,cond,values)
620  real(DP), intent(INOUT) :: at_data(:,:)
626  character(len=2), intent(IN), optional :: cond
628  real(DP), dimension(:,:), intent(in), optional :: values
629 
630  real(DP) :: BCvalues(size(at_data),2)
631  character(len=2) :: BC
632 
633  if ( present(cond) ) then
634  bc = cond
635  else
636  bc = 'DD'
637  endif
638 
639  if ( present(values) ) then
640  bcvalues = values
641  else
642  bcvalues = 0.0d0
643  endif
644  select case(bc)
645  case ('DD')
646  call at_boundaries_dd(at_data,bcvalues)
647  case ('DN')
648  call at_boundaries_dn(at_data,bcvalues)
649  case ('ND')
650  call at_boundaries_nd(at_data,bcvalues)
651  case ('NN')
652  call at_boundaries_nn(at_data,bcvalues)
653  case default
654  call at_boundaries_dd(at_data,bcvalues)
655  end select
656 
657  end subroutine at_boundaries
658 
659  !---------------------------------------------------------------------
663  subroutine t_boundaries(t_data,cond,values)
665  real(DP), intent(INOUT) :: t_data(:)
671  character(len=2), intent(IN), optional :: cond
673  real(DP), dimension(2), intent(in), optional :: values
674 
675  real(DP) :: BCvalues(2)
676  character(len=2) :: BC
677 
678 
679  if ( present(cond) ) then
680  bc = cond
681  else
682  bc = 'DD'
683  endif
684 
685  if ( present(values) ) then
686  bcvalues = values
687  else
688  bcvalues = 0.0d0
689  endif
690 
691  select case(bc)
692  case ('DD' )
693  call at_boundaries_dd(t_data,bcvalues)
694  case ('DN' )
695  call at_boundaries_dn(t_data,bcvalues)
696  case ('ND' )
697  call at_boundaries_nd(t_data,bcvalues)
698  case ('NN' )
699  call at_boundaries_nn(t_data,bcvalues)
700  case default
701  call at_boundaries_dd(t_data,bcvalues)
702  end select
703 
704  end subroutine t_boundaries
705 
706  !---------------------------------------------------------------------
710  subroutine at_boundariesgrid(at_data,cond,values)
712  real(DP), intent(INOUT) :: at_data(:,:)
718  character(len=2), intent(IN), optional :: cond
720  real(DP), dimension(:,:), intent(in), optional :: values
721 
722  real(DP) :: BCvalues(size(at_data),2)
723  character(len=2) :: BC
724 
725  if ( present(cond) ) then
726  bc = cond
727  else
728  bc = 'DD'
729  endif
730 
731  if ( present(values) ) then
732  bcvalues = values
733  else
734  bcvalues = 0.0d0
735  endif
736 
737  select case(bc)
738  case ('DD')
739  call at_boundariesgrid_dd(at_data,bcvalues)
740  case ('DN')
741  call at_boundariesgrid_dn(at_data,bcvalues)
742  case ('ND')
743  call at_boundariesgrid_nd(at_data,bcvalues)
744  case ('NN')
745  call at_boundariesgrid_nn(at_data,bcvalues)
746  end select
747 
748  end subroutine at_boundariesgrid
749 
750  !---------------------------------------------------------------------
754  subroutine t_boundariesgrid(t_data,cond,values)
756  real(DP), intent(INOUT) :: t_data(:)
762  character(len=2), intent(IN), optional :: cond
764  real(DP), dimension(2), intent(in), optional :: values
765 
766  real(DP) :: BCvalues(2)
767  character(len=2) :: BC
768 
769  if ( present(cond) ) then
770  bc = cond
771  else
772  bc = 'DD'
773  endif
774 
775  if ( present(values) ) then
776  bcvalues = values
777  else
778  bcvalues = 0.0d0
779  endif
780  select case(bc)
781  case ('DD')
782  call at_boundariesgrid_dd(t_data,bcvalues)
783  case ('DN')
784  call at_boundariesgrid_dn(t_data,bcvalues)
785  case ('ND')
786  call at_boundariesgrid_nd(t_data,bcvalues)
787  case ('NN')
788  call at_boundariesgrid_nn(t_data,bcvalues)
789  end select
790 
791  end subroutine t_boundariesgrid
792 
793  !----------------------------------------------------------------------
795  subroutine at_finalize
796  if ( .not. at_initialize ) then
797  call messagenotify('W','at_Finalize',&
798  'at_module not initialized yet')
799  return
800  endif
801 
802  deallocate(t) ! 変換用配列
803  deallocate(it) ! 変換用配列
804  deallocate(g_x)
805  deallocate(g_x_weight) ! 格子点座標格納配列
806 
807  at_initialize = .false.
808 
809  at_boundariestau_dd_first = .true.
810  at_boundariestau_dn_first = .true.
811  at_boundariestau_nd_first = .true.
812  at_boundariestau_nn_first = .true.
813  at_boundariesgrid_dd_first = .true.
814  at_boundariesgrid_dn_first = .true.
815  at_boundariesgrid_nd_first = .true.
816  at_boundariesgrid_nn_first = .true.
817 
818  call messagenotify('M','at_Finalize',&
819  & 'at_module (2019/09/29) is finalized')
820 
821  end subroutine at_finalize
822 
823  !----------------------------------------------------------
824  ! Private function
825  !----------------------------------------------------------
826 
827  !----------------------------------------------------------
830  subroutine at_boundariestau_dd_2d(at_data,values)
831 
832  real(DP), dimension(:,0:),intent(inout) :: at_data
834  real(DP), dimension(:,:), intent(in), optional :: values
835 
836  real(DP), dimension(:,:), allocatable :: alu
837  integer, dimension(:), allocatable :: kp
838  real(DP), dimension(0:km,0:km) :: tt_data
839  real(DP), dimension(0:km,0:im) :: tg_data
840  real(DP), dimension(size(at_data,1)) :: value1, value2 ! 境界値
841 
842  integer(8) :: k
843  save :: alu, kp
844 
845  if ( size(at_data,2)-1 < km ) then
846  call messagenotify('E','at_BoundariesTau_DD', &
847  'The Chebyshev dimension of input data too small.')
848  elseif ( size(at_data,2)-1 > km ) then
849  call messagenotify('W','at_BoundariesTau_DD', &
850  'The Chebyshev dimension of input data too large.')
851  endif
852 
853  if (.not. present(values)) then
854  value1=0.0d0
855  value2=0.0d0
856  else
857  value1 = values(:,1)
858  value2 = values(:,2)
859  endif
860 
861  if ( at_boundariestau_dd_first ) then
862  at_boundariestau_dd_first = .false.
863 
864  if (allocated(alu)) deallocate(alu)
865  if (allocated(kp)) deallocate(kp)
866 
867  allocate(alu(0:km,0:km),kp(0:km))
868 
869  tt_data=0.0d0
870  do k=0,km
871  tt_data(k,k)=1.0d0
872  enddo
873  alu = tt_data
874 
875  tg_data = ag_at(tt_data)
876  alu(km-1,:) = tg_data(:,0)
877  alu(km,:) = tg_data(:,im)
878 
879  call ludecomp(alu,kp)
880  endif
881 
882  at_data(:,km-1) = value1
883  at_data(:,km) = value2
884  at_data = lusolve(alu,kp,at_data)
885 
886  end subroutine at_boundariestau_dd_2d
887 
888  !----------------------------------------------------------
891  subroutine at_boundariestau_dd_1d(t_data,values)
892 
893  real(DP), dimension(0:km),intent(inout) :: t_data
895  real(DP), dimension(2), intent(in), optional :: values
896 
897  real(DP), dimension(1,0:km) :: at_work
898  real(DP), dimension(1,2) :: vwork
899 
900  if (.not. present(values)) then
901  vwork(1,1)=0.0d0
902  vwork(1,2)=0.0d0
903  else
904  vwork(1,:) = values
905  endif
906 
907  at_work(1,:)=t_data
908  call at_boundariestau_dd_2d(at_work,vwork)
909  t_data=at_work(1,:)
910 
911  end subroutine at_boundariestau_dd_1d
912 
913 
914  !----------------------------------------------------------
917  subroutine at_boundariestau_dn_2d(at_data,values)
918 
919  real(DP), dimension(:,0:),intent(inout) :: at_data
921  real(DP), dimension(:,:), intent(in), optional :: values
922 
923  real(DP), dimension(:,:), allocatable :: alu
924  integer, dimension(:), allocatable :: kp
925  real(DP), dimension(0:km,0:km) :: tt_data
926  real(DP), dimension(0:km,0:im) :: tg_data
927  real(DP), dimension(size(at_data,1)) :: value1, value2
928 
929  integer(8) :: k
930  save :: alu, kp
931 
932  if ( size(at_data,2)-1 < km ) then
933  call messagenotify('E','at_BoundariesTau_DN', &
934  'The Chebyshev dimension of input data too small.')
935  elseif ( size(at_data,2)-1 > km ) then
936  call messagenotify('W','at_BoundariesTau_DN', &
937  'The Chebyshev dimension of input data too large.')
938  endif
939 
940  if (.not. present(values)) then
941  value1=0.0d0
942  value2=0.0d0
943  else
944  value1 = values(:,1)
945  value2 = values(:,2)
946  endif
947 
948  if ( at_boundariestau_dn_first ) then
949  at_boundariestau_dn_first = .false.
950 
951  if (allocated(alu)) deallocate(alu)
952  if (allocated(kp)) deallocate(kp)
953 
954  allocate(alu(0:km,0:km),kp(0:km))
955 
956  tt_data = 0.0d0
957  do k=0,km
958  tt_data(k,k)=1.0d0
959  enddo
960  alu = tt_data
961 
962  tg_data = ag_at(tt_data)
963  alu(km-1,:) = tg_data(:,0)
964  tg_data = ag_at(at_dx_at(tt_data))
965  alu(km,:) = tg_data(:,im)
966 
967  call ludecomp(alu,kp)
968  endif
969 
970  at_data(:,km-1) = value1
971  at_data(:,km) = value2
972  at_data = lusolve(alu,kp,at_data)
973 
974  end subroutine at_boundariestau_dn_2d
975 
976  !----------------------------------------------------------
979  subroutine at_boundariestau_dn_1d(t_data,values)
980 
981  real(DP), dimension(0:km),intent(inout) :: t_data
983 
984  real(DP), dimension(2), intent(in), optional :: values
985  real(DP), dimension(1,0:km) :: at_work
986  real(DP), dimension(1,2) :: vwork
987 
988  if (.not. present(values)) then
989  vwork(1,1)=0.0d0
990  vwork(1,2)=0.0d0
991  else
992  vwork(1,:) = values
993  endif
994 
995  at_work(1,:)=t_data
996  call at_boundariestau_dn_2d(at_work,vwork)
997  t_data=at_work(1,:)
998 
999  end subroutine at_boundariestau_dn_1d
1000 
1001  !----------------------------------------------------------
1004  subroutine at_boundariestau_nd_2d(at_data,values)
1005 
1006  real(DP), dimension(:,0:),intent(inout) :: at_data
1008  real(DP), dimension(:,:), intent(in), optional :: values
1009 
1010  real(DP), dimension(:,:), allocatable :: alu
1011  integer, dimension(:), allocatable :: kp
1012  real(DP), dimension(0:km,0:km) :: tt_data
1013  real(DP), dimension(0:km,0:im) :: tg_data
1014  real(DP), dimension(size(at_data,1)) :: value1, value2
1015 
1016  integer(8) :: k
1017  save :: alu, kp
1018 
1019  if ( size(at_data,2)-1 < km ) then
1020  call messagenotify('E','at_BoundariesTau_ND', &
1021  'The Chebyshev dimension of input data too small.')
1022  elseif ( size(at_data,2)-1 > km ) then
1023  call messagenotify('W','at_BoundariesTau_ND', &
1024  'The Chebyshev dimension of input data too large.')
1025  endif
1026 
1027  if (.not. present(values)) then
1028  value1=0.0d0
1029  value2=0.0d0
1030  else
1031  value1 = values(:,1)
1032  value2 = values(:,2)
1033  endif
1034 
1035  if ( at_boundariestau_nd_first ) then
1036  at_boundariestau_nd_first = .false.
1037 
1038  if (allocated(alu)) deallocate(alu)
1039  if (allocated(kp)) deallocate(kp)
1040 
1041  allocate(alu(0:km,0:km),kp(0:km))
1042 
1043  tt_data = 0.0d0
1044  do k=0,km
1045  tt_data(k,k)=1.0d0
1046  enddo
1047  alu = tt_data
1048 
1049  tg_data = ag_at(at_dx_at(tt_data))
1050  alu(km-1,:) = tg_data(:,0)
1051  tg_data = ag_at(tt_data)
1052  alu(km,:) = tg_data(:,im)
1053 
1054  call ludecomp(alu,kp)
1055  endif
1056 
1057  at_data(:,km-1) = value1
1058  at_data(:,km) = value2
1059  at_data = lusolve(alu,kp,at_data)
1060 
1061  end subroutine at_boundariestau_nd_2d
1062 
1063  !----------------------------------------------------------
1066  subroutine at_boundariestau_nd_1d(t_data,values)
1067 
1068  real(DP), dimension(0:km),intent(inout) :: t_data
1070  real(DP), dimension(2), intent(in), optional :: values
1071 
1072  real(DP), dimension(1,0:km) :: at_work
1073  real(DP), dimension(1,2) :: vwork
1074 
1075  if (.not. present(values)) then
1076  vwork(1,1)=0.0d0
1077  vwork(1,2)=0.0d0
1078  else
1079  vwork(1,:) = values
1080  endif
1081 
1082  at_work(1,:)=t_data
1083  call at_boundariestau_nd_2d(at_work,vwork)
1084  t_data=at_work(1,:)
1085 
1086  end subroutine at_boundariestau_nd_1d
1087 
1088  !----------------------------------------------------------
1091  subroutine at_boundariestau_nn_2d(at_data,values)
1092 
1093  real(DP), dimension(:,0:),intent(inout) :: at_data
1095  real(DP), dimension(:,:), intent(in), optional :: values
1096 
1097  real(DP), dimension(:,:), allocatable :: alu
1098  integer, dimension(:), allocatable :: kp
1099  real(DP), dimension(0:km,0:km) :: tt_data
1100  real(DP), dimension(0:km,0:im) :: tg_data
1101  real(DP), dimension(size(at_data,1)) :: value1, value2
1102 
1103  integer(8) :: k
1104  save :: alu, kp
1105 
1106  if ( size(at_data,2)-1 < km ) then
1107  call messagenotify('E','at_BoundariesTau_NN', &
1108  'The Chebyshev dimension of input data too small.')
1109  elseif ( size(at_data,2)-1 > km ) then
1110  call messagenotify('W','at_BoundariesTau_NN', &
1111  'The Chebyshev dimension of input data too large.')
1112  endif
1113 
1114  if (.not. present(values)) then
1115  value1 = 0.0d0
1116  value2 = 0.0d0
1117  else
1118  value1 = values(:,1)
1119  value2 = values(:,2)
1120  endif
1121 
1122  if ( at_boundariestau_nn_first ) then
1123  at_boundariestau_nn_first = .false.
1124 
1125  if (allocated(alu)) deallocate(alu)
1126  if (allocated(kp)) deallocate(kp)
1127 
1128  allocate(alu(0:km,0:km),kp(0:km))
1129 
1130  tt_data = 0.0d0
1131  do k=0,km
1132  tt_data(k,k)=1.0d0
1133  enddo
1134  alu = tt_data
1135 
1136  tg_data = ag_at(at_dx_at(tt_data))
1137  alu(km-1,:) = tg_data(:,0)
1138  alu(km,:) = tg_data(:,im)
1139 
1140  call ludecomp(alu,kp)
1141  endif
1142 
1143  at_data(:,km-1) = value1
1144  at_data(:,km) = value2
1145  at_data = lusolve(alu,kp,at_data)
1146 
1147  end subroutine at_boundariestau_nn_2d
1148 
1149  !----------------------------------------------------------
1152  subroutine at_boundariestau_nn_1d(t_data,values)
1153 
1154  real(DP), dimension(0:km),intent(inout) :: t_data
1156  real(DP), dimension(2), intent(in), optional :: values
1157 
1158  real(DP), dimension(1,0:km) :: at_work
1159  real(DP), dimension(1,2) :: vwork
1160 
1161  if (.not. present(values)) then
1162  vwork(1,1)=0.0d0
1163  vwork(1,2)=0.0d0
1164  else
1165  vwork(1,:) = values
1166  endif
1167 
1168  at_work(1,:)=t_data
1169  call at_boundariestau_nn_2d(at_work,vwork)
1170  t_data=at_work(1,:)
1171 
1172  end subroutine at_boundariestau_nn_1d
1173 
1174  !----------------------------------------------------------
1177  subroutine at_boundariesgrid_dd_2d(at_data,values)
1178 
1179  real(DP), dimension(:,0:),intent(inout) :: at_data
1181  real(DP), dimension(:,:), intent(in), optional :: values
1182 
1183  real(DP), dimension(:,:), allocatable :: alu
1184  integer, dimension(:), allocatable :: kp
1185  real(DP), dimension(size(at_data,1),0:im) :: ag_data
1186  real(DP), dimension(0:km,0:km) :: tt_data
1187  real(DP), dimension(0:km,0:im) :: tg_data
1188  real(DP), dimension(size(at_data,1)) :: value1, value2 ! 境界値
1189 
1190  integer(8) :: k
1191  save :: alu, kp
1192 
1193  if ( im /= km ) then
1194  call messagenotify('E','at_BoundariesGrid_DD', &
1195  'Chebyshev truncation and number of grid points should be same.')
1196  endif
1197 
1198  if ( size(at_data,2)-1 < km ) then
1199  call messagenotify('E','at_BoundariesGrid_DD', &
1200  'The Chebyshev dimension of input data too small.')
1201  elseif ( size(at_data,2)-1 > km ) then
1202  call messagenotify('W','at_BoundariesGrid_DD', &
1203  'The Chebyshev dimension of input data too large.')
1204  endif
1205 
1206  if (.not. present(values)) then
1207  value1=0.0d0
1208  value2=0.0d0
1209  else
1210  value1 = values(:,1)
1211  value2 = values(:,2)
1212  endif
1213 
1214  if ( at_boundariesgrid_dd_first ) then
1215  at_boundariesgrid_dd_first = .false.
1216 
1217  if (allocated(alu)) deallocate(alu)
1218  if (allocated(kp)) deallocate(kp)
1219 
1220  allocate(alu(0:im,0:km),kp(0:im))
1221 
1222  tt_data = 0.0d0
1223  do k=0,km
1224  tt_data(k,k)=1.0d0
1225  enddo
1226  tg_data = ag_at(tt_data)
1227  alu = transpose(tg_data)
1228  ! alu(km-1,:) = tg_data(:,0)
1229  ! alu(km,:) = tg_data(:,im)
1230 
1231  call ludecomp(alu,kp)
1232  endif
1233 
1234  ag_data = ag_at(at_data)
1235  ag_data(:,0) = value1
1236  ag_data(:,im) = value2
1237  at_data = lusolve(alu,kp,ag_data)
1238 
1239  end subroutine at_boundariesgrid_dd_2d
1240 
1241  !----------------------------------------------------------
1244  subroutine at_boundariesgrid_dd_1d(t_data,values)
1245 
1246  real(DP), dimension(0:km),intent(inout) :: t_data
1248  real(DP), dimension(2), intent(in), optional :: values
1249 
1250  real(DP), dimension(1,0:km) :: at_work
1251  real(DP), dimension(1,2) :: vwork ! 境界値
1252 
1253  if (.not. present(values)) then
1254  vwork(1,1)=0.0d0
1255  vwork(1,2)=0.0d0
1256  else
1257  vwork(1,:) = values
1258  endif
1259 
1260  at_work(1,:)=t_data
1261  call at_boundariesgrid_dd_2d(at_work,vwork)
1262  t_data=at_work(1,:)
1263 
1264  end subroutine at_boundariesgrid_dd_1d
1265 
1266  !----------------------------------------------------------
1269  subroutine at_boundariesgrid_dn_2d(at_data,values)
1270 
1271  real(DP), dimension(:,0:),intent(inout) :: at_data
1273  real(DP), dimension(:,:), intent(in), optional :: values
1274 
1275  real(DP), dimension(:,:), allocatable :: alu
1276  integer, dimension(:), allocatable :: kp
1277  real(DP), dimension(size(at_data,1),0:im) :: ag_data
1278  real(DP), dimension(0:km,0:km) :: tt_data
1279  real(DP), dimension(0:km,0:im) :: tg_data
1280  real(DP), dimension(size(at_data,1)) :: value1, value2 ! 境界値
1281 
1282  integer(8) :: k
1283  save :: alu, kp
1284 
1285  if ( im /= km ) then
1286  call messagenotify('E','at_BoundariesGrid_DN', &
1287  'Chebyshev truncation and number of grid points should be same.')
1288  endif
1289 
1290  if ( size(at_data,2)-1 < km ) then
1291  call messagenotify('E','at_BoundariesGrid_DN', &
1292  'The Chebyshev dimension of input data too small.')
1293  elseif ( size(at_data,2)-1 > km ) then
1294  call messagenotify('W','at_BoundariesGrid_DN', &
1295  'The Chebyshev dimension of input data too large.')
1296  endif
1297 
1298  if (.not. present(values)) then
1299  value1=0.0d0
1300  value2=0.0d0
1301  else
1302  value1 = values(:,1)
1303  value2 = values(:,2)
1304  endif
1305 
1306  if ( at_boundariesgrid_dn_first ) then
1307  at_boundariesgrid_dn_first = .false.
1308 
1309  if (allocated(alu)) deallocate(alu)
1310  if (allocated(kp)) deallocate(kp)
1311 
1312  allocate(alu(0:im,0:km),kp(0:im))
1313 
1314  tt_data = 0.0d0
1315  do k=0,km
1316  tt_data(k,k)=1.0d0
1317  enddo
1318  tg_data = ag_at(tt_data)
1319  alu = transpose(tg_data)
1320 
1321  tg_data = ag_at(at_dx_at(tt_data))
1322  alu(im,:) = tg_data(:,im)
1323 
1324  call ludecomp(alu,kp)
1325  endif
1326 
1327  ag_data = ag_at(at_data)
1328  ag_data(:,0) = value1
1329  ag_data(:,im) = value2
1330  at_data = lusolve(alu,kp,ag_data)
1331 
1332  end subroutine at_boundariesgrid_dn_2d
1333 
1334  !----------------------------------------------------------------------
1337  subroutine at_boundariesgrid_dn_1d(t_data,values)
1338 
1339  real(DP), dimension(0:km),intent(inout) :: t_data
1341  real(DP), dimension(2), intent(in), optional :: values
1342 
1343  real(DP), dimension(1,0:km) :: at_work
1344  real(DP), dimension(1,2) :: vwork ! 境界値
1345 
1346  if (.not. present(values)) then
1347  vwork(1,1)=0.0d0
1348  vwork(1,2)=0.0d0
1349  else
1350  vwork(1,:) = values
1351  endif
1352 
1353  at_work(1,:)=t_data
1354  call at_boundariesgrid_dn_2d(at_work,vwork)
1355  t_data=at_work(1,:)
1356 
1357  end subroutine at_boundariesgrid_dn_1d
1358 
1359  !----------------------------------------------------------------------
1362  !----------------------------------------------------------------------
1363  subroutine at_boundariesgrid_nd_2d(at_data,values)
1364 
1365  real(DP), dimension(:,0:),intent(inout) :: at_data
1367  real(DP), dimension(:,:), intent(in), optional :: values
1368 
1369  real(DP), dimension(:,:), allocatable :: alu
1370  integer, dimension(:), allocatable :: kp
1371  real(DP), dimension(size(at_data,1),0:im) :: ag_data
1372  real(DP), dimension(0:km,0:km) :: tt_data
1373  real(DP), dimension(0:km,0:im) :: tg_data
1374  real(DP), dimension(size(at_data,1)) :: value1, value2 ! 境界値
1375 
1376  integer(8) :: k
1377  save :: alu, kp
1378 
1379  if ( im /= km ) then
1380  call messagenotify('E','at_BoundariesGrid_ND', &
1381  'Chebyshev truncation and number of grid points should be same.')
1382  endif
1383 
1384  if ( size(at_data,2)-1 < km ) then
1385  call messagenotify('E','at_BoundariesGrid_ND', &
1386  'The Chebyshev dimension of input data too small.')
1387  elseif ( size(at_data,2)-1 > km ) then
1388  call messagenotify('W','at_BoundariesGrid_DD', &
1389  'The Chebyshev dimension of input data too large.')
1390  endif
1391 
1392  if (.not. present(values)) then
1393  value1=0.0d0
1394  value2=0.0d0
1395  else
1396  value1 = values(:,1)
1397  value2 = values(:,2)
1398  endif
1399 
1400  if ( at_boundariesgrid_nd_first ) then
1401  at_boundariesgrid_nd_first = .false.
1402 
1403  if (allocated(alu)) deallocate(alu)
1404  if (allocated(kp)) deallocate(kp)
1405 
1406  allocate(alu(0:im,0:km),kp(0:im))
1407 
1408  tt_data = 0.0d0
1409  do k=0,km
1410  tt_data(k,k)=1.0d0
1411  enddo
1412  tg_data = ag_at(tt_data)
1413  alu = transpose(tg_data)
1414 
1415  tg_data = ag_at(at_dx_at(tt_data))
1416  alu(0,:) = tg_data(:,0)
1417 
1418  call ludecomp(alu,kp)
1419  endif
1420 
1421  ag_data = ag_at(at_data)
1422  ag_data(:,0) = value1
1423  ag_data(:,im) = value2
1424  at_data = lusolve(alu,kp,ag_data)
1425 
1426  end subroutine at_boundariesgrid_nd_2d
1427 
1428  !----------------------------------------------------------------------
1431  !----------------------------------------------------------------------
1432  subroutine at_boundariesgrid_nd_1d(t_data,values)
1433 
1434  real(DP), dimension(0:km),intent(inout) :: t_data
1436  real(DP), dimension(2), intent(in), optional :: values
1437 
1438  real(DP), dimension(1,0:km) :: at_work
1439  real(DP), dimension(1,2) :: vwork ! 境界値
1440 
1441  if (.not. present(values)) then
1442  vwork(1,1)=0.0d0
1443  vwork(1,2)=0.0d0
1444  else
1445  vwork(1,:) = values
1446  endif
1447 
1448  at_work(1,:)=t_data
1449  call at_boundariesgrid_nd_2d(at_work,vwork)
1450  t_data=at_work(1,:)
1451 
1452  end subroutine at_boundariesgrid_nd_1d
1453 
1454  !----------------------------------------------------------------------
1457  !----------------------------------------------------------------------
1458  subroutine at_boundariesgrid_nn_2d(at_data,values)
1459 
1460  real(DP), dimension(:,0:),intent(inout) :: at_data
1462  real(DP), dimension(:,:), intent(in), optional :: values
1463 
1464 
1465  real(DP), dimension(:,:), allocatable :: alu
1466  integer, dimension(:), allocatable :: kp
1467  real(DP), dimension(size(at_data,1),0:im) :: ag_data
1468  real(DP), dimension(0:km,0:km) :: tt_data
1469  real(DP), dimension(0:km,0:im) :: tg_data
1470  real(DP), dimension(size(at_data,1)) :: value1, value2 ! 境界値
1471 
1472  integer(8) :: k
1473  save :: alu, kp
1474 
1475  if ( im /= km ) then
1476  call messagenotify('E','at_BoundariesGrid_NN', &
1477  'Chebyshev truncation and number of grid points should be same.')
1478  endif
1479 
1480  if ( size(at_data,2)-1 < km ) then
1481  call messagenotify('E','at_BoundariesGrid_NN', &
1482  'The Chebyshev dimension of input data too small.')
1483  elseif ( size(at_data,2)-1 > km ) then
1484  call messagenotify('W','at_BoundariesGrid_NN', &
1485  'The Chebyshev dimension of input data too large.')
1486  endif
1487 
1488  if (.not. present(values)) then
1489  value1=0.0d0
1490  value2=0.0d0
1491  else
1492  value1 = values(:,1)
1493  value2 = values(:,2)
1494  endif
1495 
1496  if ( at_boundariesgrid_nn_first ) then
1497  at_boundariesgrid_nn_first = .false.
1498 
1499  if (allocated(alu)) deallocate(alu)
1500  if (allocated(kp)) deallocate(kp)
1501 
1502  allocate(alu(0:im,0:km),kp(0:im))
1503 
1504  tt_data = 0.0d0
1505  do k=0,km
1506  tt_data(k,k)=1.0d0
1507  enddo
1508  tg_data = ag_at(tt_data)
1509  alu = transpose(tg_data)
1510 
1511  tg_data = ag_at(at_dx_at(tt_data))
1512  alu(0,:) = tg_data(:,0)
1513  alu(im,:) = tg_data(:,im)
1514 
1515  call ludecomp(alu,kp)
1516  endif
1517 
1518  ag_data = ag_at(at_data)
1519  ag_data(:,0) = value1
1520  ag_data(:,im) = value2
1521  at_data = lusolve(alu,kp,ag_data)
1522 
1523  end subroutine at_boundariesgrid_nn_2d
1524 
1525  !----------------------------------------------------------------------
1528  !----------------------------------------------------------------------
1529  subroutine at_boundariesgrid_nn_1d(t_data,values)
1530 
1531  real(DP), dimension(0:km),intent(inout) :: t_data
1533  real(DP), dimension(2), intent(in), optional :: values
1534  real(DP), dimension(1,0:km) :: at_work
1535  real(DP), dimension(1,2) :: vwork ! 境界値
1536 
1537  if (.not. present(values)) then
1538  vwork(1,1)=0.0d0
1539  vwork(1,2)=0.0d0
1540  else
1541  vwork(1,:) = values
1542  endif
1543 
1544  at_work(1,:)=t_data
1545  call at_boundariesgrid_nn_2d(at_work,vwork)
1546  t_data=at_work(1,:)
1547 
1548  end subroutine at_boundariesgrid_nn_1d
1549 
1550 end module at_module
real(dp) function, dimension(size(at_data, 1), 0:size(at_data, 2) -1), public at_dx_at(at_data)
入力チェビシェフデータに X 微分を作用する(2 次元配列用).
Definition: at_module.f90:420
real(dp) function, dimension(size(ag_data, 1), 0:km), public at_ag(ag_data)
格子データからチェビシェフデータへ変換する(2 次元配列用).
Definition: at_module.f90:374
real(dp) function, dimension(size(ae, 1), 0:im-1), public ag_ae(ae)
スペクトルデータから格子点データへ逆変換する(2 次元データ用)
Definition: ae_module.f90:176
real(dp) function, public avr_g(g)
1 次元格子点データの平均
Definition: at_module.f90:528
1 次元有限領域: チェビシェフ変換
Definition: at_module.f90:78
subroutine, public at_finalize
モジュールの終了処理(割り付け配列の解放)をおこなう.
Definition: at_module.f90:796
real(dp) function, dimension(size(ag, 1)), public a_int_ag(ag)
1 次元格子点データが並んだ 2 次元配列の積分
Definition: at_module.f90:483
subroutine, public t_boundaries(t_data, cond, values)
境界条件の適用(タウ法, 1 次元配列用) 境界条件と両境界での値をオプションで与える. デフォルトは DD...
Definition: at_module.f90:664
subroutine, public at_boundariesgrid(at_data, cond, values)
境界条件の適用(実空間での評価, 2 次元配列用) 境界条件と両境界での値をオプションで与える. デフォルトは DD, values = 0
Definition: at_module.f90:711
real(dp) function, public int_g(g)
1 次元格子点データの積分
Definition: at_module.f90:507
subroutine, public t_boundariesgrid(t_data, cond, values)
境界条件の適用(タウ法, 1 次元配列用) 境界条件と両境界での値をオプションで与える. デフォルトは DD...
Definition: at_module.f90:755
real(dp) function, public interpolate_t(t_data, xval)
1 次元データの補間
Definition: at_module.f90:539
real(dp) function, dimension(size(ag, 1),-km:km), public ae_ag(ag)
格子点データからスペクトルデータへ正変換する(2 次元データ用)
Definition: ae_module.f90:245
subroutine, public ae_initial(i, k, xmin, xmax)
スペクトル変換の格子点数, 波数, 領域の大きさを設定する.
Definition: ae_module.f90:122
subroutine, public at_boundaries(at_data, cond, values)
境界条件の適用(タウ法, 2 次元配列用)
Definition: at_module.f90:619
real(dp) function, dimension(size(at_data, 1)), public a_interpolate_at(at_data, xval)
1 次元データの並んだ 2次元配列の補間
Definition: at_module.f90:576
real(dp) function, dimension(0:km), public t_g(g_data)
格子データからチェビシェフデータへ変換する(1 次元配列用).
Definition: at_module.f90:399
real(dp), dimension(:), allocatable, save, public g_x
格子点座標(X)を格納した 1 次元配列
Definition: at_module.f90:218
1 次元周期境界: 実フーリエ変換
Definition: ae_module.f90:78
real(dp) function, dimension(size(at_data, 1), 0:im), public ag_at(at_data)
チェビシェフデータから格子データへ変換する(2 次元配列用).
Definition: at_module.f90:328
subroutine, public at_initial(i, k, xmin, xmax)
チェビシェフ変換の格子点数, 波数, 領域の大きさを設定する.
Definition: at_module.f90:268
real(dp) function, dimension(size(t_data)), public t_dx_t(t_data)
入力チェビシェフデータに X 微分を作用する(1 次元配列用).
Definition: at_module.f90:467
real(dp) function, dimension(size(ag, 1)), public a_avr_ag(ag)
1 次元格子点データが並んだ 2 次元配列の平均
Definition: at_module.f90:517
real(dp), dimension(:), allocatable, save, public g_x_weight
重み座標を格納した 1 次元配列
Definition: at_module.f90:220
real(dp) function, dimension(0:im), public g_t(t_data)
チェビシェフデータから格子データへ変換する(1 次元配列用).
Definition: at_module.f90:357