Module to compute or load the integrals of the correlation matrices.
More...
|
subroutine, public | init_corrint |
| Subroutine to initialise the integrated matrices and tensors. More...
|
|
real(kind=8) function | func_ij (s) |
| Function that returns the component oi and oj of the correlation matrix at time s. More...
|
|
real(kind=8) function | func_ijkl (s) |
| Function that returns the component oi,oj,ok and ol of the outer product of the correlation matrix with itself at time s. More...
|
|
subroutine, public | comp_corrint |
| Routine that actually compute or load the integrals. More...
|
|
|
integer | oi |
|
integer | oj |
|
integer | ok |
|
integer | ol |
| Integers that specify the matrices and tensor component considered as a function of time. More...
|
|
real(kind=8), parameter | real_eps = 2.2204460492503131e-16 |
| Small epsilon constant to determine equality with zero. More...
|
|
real(kind=8), dimension(:,:), allocatable, public | corrint |
| Matrix holding the integral of the correlation matrix. More...
|
|
type(coolist4), dimension(:), allocatable, public | corr2int |
| Tensor holding the integral of the correlation outer product with itself. More...
|
|
Module to compute or load the integrals of the correlation matrices.
- Copyright
- 2018 Jonathan Demaeyer. See LICENSE.txt for license information.
subroutine, public int_corr::comp_corrint |
( |
| ) |
|
Routine that actually compute or load the integrals.
Definition at line 75 of file int_corr.f90.
76 INTEGER :: i,j,k,l,n,allocstat
80 INQUIRE(file=
'corrint.def',exist=ex)
81 SELECT CASE (int_corr_mode)
84 OPEN(30,file=
'corrint.def',status=
'old')
88 stop
"*** File corrint.def not found ! ***" 95 CALL integrate(func_ij,ss)
96 corrint(ind(i),ind(j))=ss
100 OPEN(30,file=
'corrint.def')
106 INQUIRE(file=
'corr2int.def',exist=ex)
107 SELECT CASE (int_corr_mode)
110 CALL load_tensor4_from_file(
"corr2int.def",corr2int)
112 stop
"*** File corr2int.def not found ! ***" 125 CALL integrate(func_ijkl,ss)
126 IF (abs(ss)>real_eps) n=n+1
131 ALLOCATE(corr2int(ind(i))%elems(n),
stat=allocstat)
132 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 143 CALL integrate(func_ijkl,ss)
144 IF (abs(ss)>real_eps)
THEN 146 corr2int(ind(i))%elems(n)%j=ind(j)
147 corr2int(ind(i))%elems(n)%k=ind(k)
148 corr2int(ind(i))%elems(n)%l=ind(l)
149 corr2int(ind(i))%elems(n)%v=ss
154 corr2int(ind(i))%nelems=n
158 CALL write_tensor4_to_file(
"corr2int.def",corr2int)
160 stop
'*** INT_CORR_MODE variable not properly defined in corrmod.nml ***'
real(kind=8) function int_corr::func_ij |
( |
real(kind=8) |
s | ) |
|
|
private |
Function that returns the component oi and oj of the correlation matrix at time s.
- Parameters
-
s | time at which the function is evaluated |
Definition at line 55 of file int_corr.f90.
56 REAL(KIND=8) :: s,func_ij
58 func_ij=corr_ij(oi,oj)
real(kind=8) function int_corr::func_ijkl |
( |
real(kind=8) |
s | ) |
|
|
private |
Function that returns the component oi,oj,ok and ol of the outer product of the correlation matrix with itself at time s.
- Parameters
-
s | time at which the function is evaluated |
Definition at line 66 of file int_corr.f90.
67 REAL(KIND=8) :: s,func_ijkl
69 func_ijkl=corr_ij(oi,oj)*corr_ij(ok,ol)
subroutine, public int_corr::init_corrint |
( |
| ) |
|
Subroutine to initialise the integrated matrices and tensors.
Definition at line 38 of file int_corr.f90.
41 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 43 ALLOCATE(corr2int(
ndim),
stat=allocstat)
44 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" integer ndim
Number of variables (dimension of the model)
type(coolist4), dimension(:), allocatable, public int_corr::corr2int |
Tensor holding the integral of the correlation outer product with itself.
Definition at line 30 of file int_corr.f90.
30 TYPE(
coolist4),
DIMENSION(:),
ALLOCATABLE,
PUBLIC :: corr2int
4d coordinate list. Type used to represent the rank-4 sparse tensor.
real(kind=8), dimension(:,:), allocatable, public int_corr::corrint |
Matrix holding the integral of the correlation matrix.
Definition at line 29 of file int_corr.f90.
29 REAL(KIND=8),
DIMENSION(:,:),
ALLOCATABLE,
PUBLIC :: corrint
Integers that specify the matrices and tensor component considered as a function of time.
Definition at line 26 of file int_corr.f90.
real(kind=8), parameter int_corr::real_eps = 2.2204460492503131e-16 |
|
private |
Small epsilon constant to determine equality with zero.
Definition at line 27 of file int_corr.f90.
27 REAL(KIND=8),
PARAMETER :: real_eps = 2.2204460492503131e-16