EFTCAMB  Reference documentation for version 3.0
05p0_neutral_parametrizations_2D.f90
Go to the documentation of this file.
1 !----------------------------------------------------------------------------------------
2 !
3 ! This file is part of EFTCAMB.
4 !
5 ! Copyright (C) 2013-2016 by the EFTCAMB authors
6 !
7 ! The EFTCAMB code is free software;
8 ! You can use it, redistribute it, and/or modify it under the terms
9 ! of the GNU General Public License as published by the Free Software Foundation;
10 ! either version 3 of the License, or (at your option) any later version.
11 ! The full text of the license can be found in the file eftcamb/LICENSE at
12 ! the top level of the EFTCAMB distribution.
13 !
14 !----------------------------------------------------------------------------------------
15 
19 
20 
21 !----------------------------------------------------------------------------------------
24 
26 
28 
29  use precision
30  use eftcamb_cache
32 
33  implicit none
34 
35  private
36 
37  public zero_parametrization_2d
38 
39  ! ---------------------------------------------------------------------------------------------
42  type, extends ( parametrized_function_2d ) :: zero_parametrization_2d
43 
44  contains
45 
46  ! initialization:
47  procedure :: set_param_number => zeroparametrized2dsetparamnumber
48  procedure :: init_parameters => zeroparametrized2dinitparams
49  procedure :: parameter_value => zeroparametrized2dparametervalues
50 
51  ! evaluation procedures:
52  procedure :: value => zeroparametrized2dvalue
53  procedure :: first_derivative_x => zeroparametrized2dfirstderivativex
54  procedure :: first_derivative_y => zeroparametrized2dfirstderivativey
55  procedure :: second_derivative_x => zeroparametrized2dsecondderivativex
56  procedure :: second_derivative_y => zeroparametrized2dsecondderivativey
57  procedure :: second_derivative_xy => zeroparametrized2dsecondderivativexy
58 
59  end type zero_parametrization_2d
60 
61 contains
62 
63  ! ---------------------------------------------------------------------------------------------
64  ! Implementation of the constant zero function.
65  ! ---------------------------------------------------------------------------------------------
66 
67  ! ---------------------------------------------------------------------------------------------
69  subroutine zeroparametrized2dsetparamnumber( self )
70 
71  implicit none
72 
73  class(zero_parametrization_2d) :: self
74 
75  self%parameter_number = 0
76 
77  end subroutine zeroparametrized2dsetparamnumber
78 
79 
80  ! ---------------------------------------------------------------------------------------------
82  subroutine zeroparametrized2dinitparams( self, array )
83 
84  implicit none
85 
86  class(zero_parametrization_2d) :: self
87  real(dl), dimension(self%parameter_number), intent(in) :: array
88 
89  end subroutine zeroparametrized2dinitparams
90 
91  ! ---------------------------------------------------------------------------------------------
93  subroutine zeroparametrized2dparametervalues( self, i, value )
94 
95  implicit none
96 
97  class(zero_parametrization_2d) :: self
98  integer , intent(in) :: i
99  real(dl), intent(out) :: value
100 
101  value = 0._dl
102 
103  end subroutine zeroparametrized2dparametervalues
104 
105  ! ---------------------------------------------------------------------------------------------
107  function zeroparametrized2dvalue( self, x, y, eft_cache )
108 
109  implicit none
110 
111  class(zero_parametrization_2d) :: self
112  real(dl), intent(in) :: x
113  real(dl), intent(in) :: y
114  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
115  real(dl) :: zeroparametrized2dvalue
116 
117  zeroparametrized2dvalue = 0._dl
118 
119  end function zeroparametrized2dvalue
120 
121  ! ---------------------------------------------------------------------------------------------
123  function zeroparametrized2dfirstderivativex( self, x, y, eft_cache )
124 
125  implicit none
126 
127  class(zero_parametrization_2d) :: self
128  real(dl), intent(in) :: x
129  real(dl), intent(in) :: y
130  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
131  real(dl) :: zeroparametrized2dfirstderivativex
132 
133  zeroparametrized2dfirstderivativex = 0._dl
134 
135  end function zeroparametrized2dfirstderivativex
136 
137  ! ---------------------------------------------------------------------------------------------
139  function zeroparametrized2dfirstderivativey( self, x, y, eft_cache )
140 
141  implicit none
142 
143  class(zero_parametrization_2d) :: self
144  real(dl), intent(in) :: x
145  real(dl), intent(in) :: y
146  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
147  real(dl) :: zeroparametrized2dfirstderivativey
148 
149  zeroparametrized2dfirstderivativey = 0._dl
150 
151  end function zeroparametrized2dfirstderivativey
152 
153  ! ---------------------------------------------------------------------------------------------
155  function zeroparametrized2dsecondderivativex( self, x, y, eft_cache )
156 
157  implicit none
158 
159  class(zero_parametrization_2d) :: self
160  real(dl), intent(in) :: x
161  real(dl), intent(in) :: y
162  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
163  real(dl) :: zeroparametrized2dsecondderivativex
164 
165  zeroparametrized2dsecondderivativex = 0._dl
166 
167  end function zeroparametrized2dsecondderivativex
168 
169  ! ---------------------------------------------------------------------------------------------
171  function zeroparametrized2dsecondderivativey( self, x, y, eft_cache )
172 
173  implicit none
174 
175  class(zero_parametrization_2d) :: self
176  real(dl), intent(in) :: x
177  real(dl), intent(in) :: y
178  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
179  real(dl) :: zeroparametrized2dsecondderivativey
180 
181  zeroparametrized2dsecondderivativey = 0._dl
182 
183  end function zeroparametrized2dsecondderivativey
184 
185  ! ---------------------------------------------------------------------------------------------
187  function zeroparametrized2dsecondderivativexy( self, x, y, eft_cache )
188 
189  implicit none
190 
191  class(zero_parametrization_2d) :: self
192  real(dl), intent(in) :: x
193  real(dl), intent(in) :: y
194  type(eftcamb_timestep_cache), intent(in), optional :: eft_cache
195  real(dl) :: zeroparametrized2dsecondderivativexy
196 
197  zeroparametrized2dsecondderivativexy = 0._dl
198 
199  end function zeroparametrized2dsecondderivativexy
200 
201  !----------------------------------------------------------------------------------------
202 
204 
205 !----------------------------------------------------------------------------------------
This module contains the definition of the EFTCAMB caches. These are used to store parameters that ca...
This module contains the abstract class for generic parametrizations for 2D functions that are used b...
This module contains the definition of neutral parametrizations that can be used when parametrized fu...