Changeset 5159 for LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/math_lib.F90
- Timestamp:
- Aug 2, 2024, 9:58:25 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/math_lib.F90
r5158 r5159 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! July 2006: John Haynes - Initial version … … 49 49 ! evalues the integral (f ds) between f(index=i1) and f(index=i2) 50 50 ! using the AVINT procedure 51 ! 51 52 52 ! Inputs: 53 53 ! [f] functional values … … 55 55 ! [i1] index of lower limit 56 56 ! [i2] index of upper limit 57 ! 57 58 58 ! Returns: 59 59 ! result of path integral 60 ! 60 61 61 ! Notes: 62 62 ! [s] may be in forward or reverse numerical order 63 ! 63 64 64 ! Requires: 65 65 ! mrgrnk package 66 ! 66 67 67 ! Created: 68 68 ! 02/02/06 John Haynes (haynes@atmos.colostate.edu) … … 114 114 ! Purpose: 115 115 ! estimate the integral of unevenly spaced data 116 ! 116 117 117 ! Inputs: 118 118 ! [ftab] functional values … … 121 121 ! [a] lower limit of integration 122 122 ! [b] upper limit of integration 123 ! 123 124 124 ! Outputs: 125 125 ! [result] approximate value of integral 126 ! 126 127 127 ! Reference: 128 128 ! From SLATEC libraries, in public domain 129 ! 129 130 130 !*********************************************************************** 131 ! 131 132 132 ! AVINT estimates the integral of unevenly spaced data. 133 ! 133 134 134 ! Discussion: 135 ! 135 136 136 ! The method uses overlapping parabolas and smoothing. 137 ! 137 138 138 ! Modified: 139 ! 139 140 140 ! 30 October 2000 141 141 ! 4 January 2008, A. Bodas-Salcedo. Error control for XTAB taken out of 142 142 ! loop to allow vectorization. 143 ! 143 144 144 ! Reference: 145 ! 145 146 146 ! Philip Davis and Philip Rabinowitz, 147 147 ! Methods of Numerical Integration, 148 148 ! Blaisdell Publishing, 1967. 149 ! 149 150 150 ! P E Hennion, 151 151 ! Algorithm 77, … … 153 153 ! Communications of the Association for Computing Machinery, 154 154 ! Volume 5, page 96, 1962. 155 ! 155 156 156 ! Parameters: 157 ! 157 158 158 ! Input, real ( kind = 8 ) FTAB(NTAB), the function values, 159 159 ! FTAB(I) = F(XTAB(I)). 160 ! 160 161 161 ! Input, real ( kind = 8 ) XTAB(NTAB), the abscissas at which the 162 162 ! function values are given. The XTAB's must be distinct 163 163 ! and in ascending order. 164 ! 164 165 165 ! Input, integer NTAB, the number of entries in FTAB and 166 166 ! XTAB. NTAB must be at least 3. 167 ! 167 168 168 ! Input, real ( kind = 8 ) A, the lower limit of integration. A should 169 169 ! be, but need not be, near one endpoint of the interval 170 170 ! (X(1), X(NTAB)). 171 ! 171 172 172 ! Input, real ( kind = 8 ) B, the upper limit of integration. B should 173 173 ! be, but need not be, near one endpoint of the interval 174 174 ! (X(1), X(NTAB)). 175 ! 175 176 176 ! Output, real ( kind = 8 ) RESULT, the approximate value of the integral. 177 177 ! ########################################################################## … … 328 328 ! Purpose: 329 329 ! Returns the gamma function 330 ! 330 331 331 ! Input: 332 332 ! [x] value to compute gamma function of 333 ! 333 334 334 ! Returns: 335 335 ! gamma(x) 336 ! 336 337 337 ! Coded: 338 338 ! 02/02/06 John Haynes (haynes@atmos.colostate.edu)
Note: See TracChangeset
for help on using the changeset viewer.