interface ! ! Subroutine for storing the initial values ! subroutine initial( solver, initial_data ) type(ode_solver) :: solver real, dimension(:) :: initial_data end subroutine initial ! ! Function to compute the derivative ! function eval_deriv( x, t ) real, dimension(:) :: x real, dimension(size(x)) :: eval_deriv ! Derivative is array of ! same size as x real :: t end function eval_deriv ! ! Interface function to hide the internal workings ! function next(solver, time, time_step) type(ode_solver) :: solver real :: time real :: time_step real, dimension(size(ode_solver%state)) :: next_step end function next_step ! ! Function to actually compute the new values ! function solve_step(solver, time, time_step) type(ode_solver) :: solver real :: time real :: time_step real, dimension(size(ode_solver%state)) :: next_step 9 ACM Fortran Forum, December 2008, 27, 3 end function next_step end interface ! ! Declaration of the functions ! procedure(initial) :: initial_values procedure(next) :: next_step procedure(solve_step) :: solve_euler procedure(solve_step) :: solve_heun procedure(solve_step) :: solve_runge_kutta procedure(solve_step) :: ... ! ! Definition of the specific methods for ! solving the ODE ! type(ode_method), dimension(10) :: solvers = & (/ ode_method(solve_euler), ode_method(solve_heun), & ode_method(solve_runge_kutta), ... /)
界面!! 存储初始值的子程序!子程序initial(solver, initial_data) type(ode_solver):: solver real, dimension(:):: initial_data结束子程序initial !! 计算函数的导数!函数eval_deriv(x, t) real, dimension(:):: x real, dimension(size(x)):: eval_deriv !导数是数组!与x real:: t大小相同end function eval_deriv !! 接口功能隐藏内部工作原理!Function next(solver, time, time_step) type(ode_solver):: solver real:: time real:: time_step real, dimension(size(ode_solver%state)):: next_step end Function next_step !! 函数来实际计算新值!function solve_step(solver, time, time_step) type(ode_solver):: solver real:: time real:: time_step real, dimension(size(ode_solver%state)):: next_step 9 ACM Fortran论坛,2008年12月27日! 函数的声明!过程(initial):: initial_values过程(next):: next_step过程(solve_step):: solve_euler过程(solve_step):: solve_heun过程(solve_step):: solve_runge_kutta过程(solve_step)::…! ! 定义具体方法为!解ODE !类型(ode_method),维度(10)::solvers = & (/ ode_method(solve_euler), ode_method(solve_heun), & ode_method(solve_runge_kutta),…/)
{"title":"Design patterns and Fortran 2003","authors":"A. Markus","doi":"10.1145/1462614.1462615","DOIUrl":"https://doi.org/10.1145/1462614.1462615","url":null,"abstract":"interface ! ! Subroutine for storing the initial values ! subroutine initial( solver, initial_data ) type(ode_solver) :: solver real, dimension(:) :: initial_data end subroutine initial ! ! Function to compute the derivative ! function eval_deriv( x, t ) real, dimension(:) :: x real, dimension(size(x)) :: eval_deriv ! Derivative is array of ! same size as x real :: t end function eval_deriv ! ! Interface function to hide the internal workings ! function next(solver, time, time_step) type(ode_solver) :: solver real :: time real :: time_step real, dimension(size(ode_solver%state)) :: next_step end function next_step ! ! Function to actually compute the new values ! function solve_step(solver, time, time_step) type(ode_solver) :: solver real :: time real :: time_step real, dimension(size(ode_solver%state)) :: next_step 9 ACM Fortran Forum, December 2008, 27, 3 end function next_step end interface ! ! Declaration of the functions ! procedure(initial) :: initial_values procedure(next) :: next_step procedure(solve_step) :: solve_euler procedure(solve_step) :: solve_heun procedure(solve_step) :: solve_runge_kutta procedure(solve_step) :: ... ! ! Definition of the specific methods for ! solving the ODE ! type(ode_method), dimension(10) :: solvers = & (/ ode_method(solve_euler), ode_method(solve_heun), & ode_method(solve_runge_kutta), ... /)","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"23 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-11-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123658951","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Statements and intrinsic procedures in consecutive Fortran standards","authors":"A. Gorelik","doi":"10.1145/1462614.1462616","DOIUrl":"https://doi.org/10.1145/1462614.1462616","url":null,"abstract":"This paper contains the tables of statements and intrinsic procedures in consecutive Fortran standards: from Fortran 66 up to Fortran 2003.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"27 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-11-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122046123","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The aim of this paper is to summarize the new features of the draft Fortran 2008 standard (ISO/IEC 2008). We take as our starting point Fortran 2003 (ISO/IEC 2008). An official extension for enhanced module facilities (ISO/IEC 2005) that has been published as a Type 2 Technical Report (TR), and WG5 is committed to include this in Fortran 2008. For an informal description of Fortran 2003 and Enhanced Module Facilities see Metcalf, Reid, and Cohen (2004). The major proposed extension consists of coarrays for parallel computing. Since the author has already summarised coarrays in another WG5 paper (Reid 2008), we refer the reader to this for further details. This is not an official document and has not been approved by either of the Fortran committees WG5 or J3.
{"title":"The new features of Fortran 2008","authors":"J. Reid","doi":"10.1145/1408643.1408645","DOIUrl":"https://doi.org/10.1145/1408643.1408645","url":null,"abstract":"The aim of this paper is to summarize the new features of the draft Fortran 2008 standard (ISO/IEC 2008). We take as our starting point Fortran 2003 (ISO/IEC 2008). An official extension for enhanced module facilities (ISO/IEC 2005) that has been published as a Type 2 Technical Report (TR), and WG5 is committed to include this in Fortran 2008. For an informal description of Fortran 2003 and Enhanced Module Facilities see Metcalf, Reid, and Cohen (2004). The major proposed extension consists of coarrays for parallel computing. Since the author has already summarised coarrays in another WG5 paper (Reid 2008), we refer the reader to this for further details.\u0000 This is not an official document and has not been approved by either of the Fortran committees WG5 or J3.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"6 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124887666","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper discusses a portable, standard conforming method for passing data arrays between C and Fortran 90.
本文讨论了一种在C和Fortran 90之间传递数据数组的可移植的、符合标准的方法。
{"title":"A method for passing data between C and Opaque Fortran 90 pointers","authors":"V. Decyk","doi":"10.1145/1408643.1408644","DOIUrl":"https://doi.org/10.1145/1408643.1408644","url":null,"abstract":"This paper discusses a portable, standard conforming method for passing data arrays between C and Fortran 90.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121202826","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
One feature of Fortran that deserves more attention in my opinion is the use of array-valued functions. In particular this feature can be used to achieve a high-level programming style, much like what John Backus advocated in his ACM speech (Backus, 1978). Many of the intrinsic functions return arrays and Fortran's array operations are further examples, be it implicit.
{"title":"Note on array-valued functions","authors":"A. Markus","doi":"10.1145/1373277.1373278","DOIUrl":"https://doi.org/10.1145/1373277.1373278","url":null,"abstract":"One feature of Fortran that deserves more attention in my opinion is the use of array-valued functions. In particular this feature can be used to achieve a high-level programming style, much like what John Backus advocated in his ACM speech (Backus, 1978). Many of the intrinsic functions return arrays and Fortran's array operations are further examples, be it implicit.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"6 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125277028","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper explains some of the technical decisions made during the incorporation of co-arrays in Fortran 2008. Familiarity with John Reid's summary of co-arrays [R07] is assumed. This document is by no means exhaustive: It is a selection of issues from my recollection. This article is not an official document and has not been approved by J3 or WG5. Many thanks to John Reid and Bill Long for helping me write this Rationale.
{"title":"Rationale for co-arrays in Fortran 2008","authors":"A. Donev","doi":"10.1145/1330585.1330586","DOIUrl":"https://doi.org/10.1145/1330585.1330586","url":null,"abstract":"This paper explains some of the technical decisions made during the incorporation of co-arrays in Fortran 2008. Familiarity with John Reid's summary of co-arrays [R07] is assumed. This document is by no means exhaustive: It is a selection of issues from my recollection. This article is not an official document and has not been approved by J3 or WG5. Many thanks to John Reid and Bill Long for helping me write this Rationale.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114676396","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This article is an introduction to the NAG Fortran Builder product. Fortran Builder is an Integrated Development Environment or IDE for Fortran. The product runs under Windows and was developed in Japan. The version tested included release 5.1 of the NAGWare Fortran compiler. The compiler can also be used from a command prompt if required. As of going to press NAG have not formally released Fortran Builder. If you would like more information could you please contact John Holden at NAG. His email address is: John.Holden@nag.co.uk
{"title":"Introduction to NAG Fortran builder","authors":"I. Chivers, J. Sleightholme","doi":"10.1145/1279941.1279943","DOIUrl":"https://doi.org/10.1145/1279941.1279943","url":null,"abstract":"This article is an introduction to the NAG Fortran Builder product. Fortran Builder is an Integrated Development Environment or IDE for Fortran. The product runs under Windows and was developed in Japan. The version tested included release 5.1 of the NAGWare Fortran compiler. The compiler can also be used from a command prompt if required. As of going to press NAG have not formally released Fortran Builder. If you would like more information could you please contact John Holden at NAG. His email address is: John.Holden@nag.co.uk","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"32 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121231691","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The GNU scientific library is a collection of numerical routines for scientific computing. This article discusses some aspects of the design of a fully standard-conforming Fortran binding for GSL via incremental usage of Fortran 2003 features, in particular C interoperation. Suggestions are made on how to deal with function dummy arguments and polymorphic C objects of type void*.
{"title":"A Fortran binding for the GNU scientific library","authors":"Reinhold Bader","doi":"10.1145/1279941.1279942","DOIUrl":"https://doi.org/10.1145/1279941.1279942","url":null,"abstract":"The GNU scientific library is a collection of numerical routines for scientific computing. This article discusses some aspects of the design of a fully standard-conforming Fortran binding for GSL via incremental usage of Fortran 2003 features, in particular C interoperation. Suggestions are made on how to deal with function dummy arguments and polymorphic C objects of type void*.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"13 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122213683","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The aim of this paper is to summarize the new features of the Fortran 2003 standard (WG5 2004). We take as our starting point Fortran 95 plus the two official extensions (Cohen 2001, Reid 2001) that have been published as Type 2 Technical Reports (TRs). These provide features for • Allocatable dummy arguments and type components, and • Support for the five exceptions of the IEEE Floating Point Standard (IEEE 1989) and for other features of this Standard.
{"title":"The new features of Fortran 2003","authors":"J. Reid","doi":"10.1145/1243413.1243415","DOIUrl":"https://doi.org/10.1145/1243413.1243415","url":null,"abstract":"The aim of this paper is to summarize the new features of the Fortran 2003 standard (WG5 2004). We take as our starting point Fortran 95 plus the two official extensions (Cohen 2001, Reid 2001) that have been published as Type 2 Technical Reports (TRs). These provide features for\u0000 • Allocatable dummy arguments and type components, and\u0000 • Support for the five exceptions of the IEEE Floating Point Standard (IEEE 1989) and for other features of this Standard.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116935452","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}