fortran

Compact if check involving multiple strings in Fortran [duplicate]

给你一囗甜甜゛ 提交于 2020-08-26 09:25:26
问题 This question already has an answer here : How to check if Fortran array contains value? (1 answer) Closed 12 days ago . Is there a way to check if a string is equal to any of the list together instead of individually explicitly check with a == ? For example, if(color=='violet' .or. color=='indigo' .or. color=='blue' .or.& color=='green' .or. color=='yellow' .or. color=='orange' .or. color=='red') then print *, "It is a rainbow color" end if Is there a way compact way to do this? Something

How to call a Fortran program from R

心不动则不痛 提交于 2020-08-25 07:09:40
问题 I am totally new to Fortran and well versed with R. I was handed down a huge Fortran program with about 30 subroutines and about 15 functions and many other lines of code. I was told that I needed to call the Fortran program from R. I have been searching online for ways to create this bridge between R and Fortran with very little success. I can successfully execute the Fortran exe file from the command line and create the desired outputs. The fortran file is called "FortFish.f" A question:

FORTRAN pointer encompassing multiple arrays

流过昼夜 提交于 2020-08-20 07:46:59
问题 I'm working on a project where I have a number of arrays of the same size in the 1st, 2nd and 3rd dimension, although the sizes may vary in the 4th dimension. I would like to group these arrays by constructing a pointer which concatenates these arrays. To make this less abstract, let's say I have 2 arrays: A (size: N1 x N2 x N3 x N4a) B (size: N1 x N2 x N3 x N4b) in previous versions of the project these arrays where copied to an array C of size N1 x N2 x N3 x (N4a + N4b) which would then be

包云岗:“Matlab被禁”事件启发:10年时间,我们能做出卡别人脖子的软件么?

给你一囗甜甜゛ 提交于 2020-08-20 05:35:11
     作者 | 包云岗   编辑 | 王金旺   今年6月,哈尔滨工业大学、哈尔滨工程大学因被列入美国商务部实体名单,并被禁用数学基础软件Matlab,引发了关于国产软件的大规模讨论。   对于大多数理工科学生而言,Matlab并不陌生,Matlab是一款被广泛应用于教学、科研、工业领域的基础软件,而这类EDA(Electronic Design Automation,电子设计自动化)软件,却刚好又是我国的短板。正因如此,不少行业人士感慨,这次我们真的是被卡脖子了。   6月19日,中科院计算所研究员、先进计算机系统研究中心主任,中国开放指令生态联盟秘书长包云岗在微博上分享了他在「CCF YOCSEF杭州· Matlab被禁之特别论坛」上关于“Matlab被禁”事件带来的思考与启发的发言。   包云岗指出,当我们在思考如何解“Matlab被禁”这个燃眉之急的同时,更需要考虑如何才能在未来做出像Matlab这样的工具,做出能卡别人脖子的技术。   至于如何做出像Matlab这样能卡别人脖子的软件,包云岗总结为如下四点:   第一,把东西做出来,而不是追求把论文发出来;   第二,把东西用起来,而不是做完就扔了;   第三,把教学场景用起来,而不是把教学当作负担;   第四,把持久战意识树立起来,而不是期望速胜论。      以下为包云岗在「CCF YOCSEF杭州·