Fortran Definition and 858 Threads

  1. U

    Fortran How to buy Fortran Programming Software Commersial License

    Hello,, I want to know how to buy the Fortran software,? I use Fortran programming to simulate some my work for my study. Do you have any suggestion about that??
  2. U

    Fortran Fortran for Computational Fluid Dynamics Problems

    Dear, Everyone I am a new member here, nice to meet you.. First, I want to introduce my self, I am a master student of physics and I am studying CFD right now. It's a new topic for me and I will also do my research about simulation of fluid dynamics related to CFD. Actually, I got this topic...
  3. S

    Python Porting Python Code to Fortran for Parallel Computing

    I have a simulation that involves a lot of dense linear algebra with a lot of complex arrays, that was written in python's numpy and then sped up with cython. Unfortunately I'm stuck with python's GIL (global interpreter lock), which prevents the use of numpy with multi-threaded code. I'm...
  4. Y

    FORTRAN 90 How to plot the Poincaré section?

    Hi all, I'm writing a fortran 90 program to simulate the Duffing oscillator. I have it working and have produced a cos wave which I expected for D (the driving force) being set to 0. Here's the code: program rungekutta implicit none integer, parameter :: dp = selected_real_kind(15,300)...
  5. M

    Fortran Fortran Code problems linking to LAPACK library

    Hi, I have a main Fortran code (*.f90) which can calculate eigenvalues and eigenvectors using LAPACK library. Unfortunately, i can't excute this program because i can't link it to the library. I'm using Code Blocks as IDE environment. Any help please.
  6. V

    Fortran Fortran external functions vs subroutines

    Hello, I'm fortran beginner. I have problem with calling or definition of functions and subroutines. I decided to establish my routine file, where I collect all functions and subroutines who I code (for now I have there function for derivative, only this works). My first question, is it good...
  7. D

    Fortran FORTRAN: Differences between "cabs" and "csqrt"

    Assumung adding 3 complex vectrors (cvect1, cvect2 and cvect3). What is the difference between using command: CSQRT(cvect1**2+cvect2**2+cvect3**2) and command: CABS(cvect1+cvect2+cvect3) ?? The first one produces a complex vector (real and imaginary part), but the second only the real part has a...
  8. RJLiberator

    Comp Sci FORTRAN: 2 conditions in 1 DO statement

    Homework Statement I am working on a code that sends a 6480 x 10 data set into a 64800 line LAT / LON / DATA gridded set. In part of my code, I'd like to have 2 conditions in 1 DO statement and I am not sure if it is possible.Homework EquationsThe Attempt at a Solution [/B] DO x = 1...
  9. Y

    Fortran Program that reads data from a file and calculates the mean?

    Hi everyone. I'm trying to write a program that reads data from 2 files and then calculates the mean, standard deviation and standard error of both files (separate values for each). I'm struggling to get my head around simple I/O, so excuse the poor attempt, but this is what I have so far: (I'm...
  10. Telemachus

    Fortran Is Transposing Matrix Efficient for Fortran Matrix-Vector Multiplication?

    Hi there. I wanted to ask this question, which is about efficiency in matrix times vector multiplication in fortran. When I have some matrix ##\hat A## and vector ##\vec{x}##, and I want to compute the matrix times vector ##\hat A \vec{x}=\vec{b}## in Fortran, what I do is, I build the array...
  11. D

    Fortran File not written after subroutine call

    I'm testing a part of a code and I have a problem. After the subroutine call at line 44 (CALL ZEIGSUB), nothing is written in UNIT NRES. The other units are written correctly. Here's the code: PROGRAM TEST IMPLICIT NONE complex *16, allocatable :: KSTAR(:,:), VR(:,:), CM2(:,:) real *8...
  12. M

    Fortran Handling underflow errors in fortran 90

    I am using fortran 90 to solve a elliptic partial differential equation numerically(Poisson's equation) and I have encountered a underflow error. All the arrays involved are stored as real data types. The original expression is highlighted in the comments and the my attempt at refactoring into...
  13. Const@ntine

    Comp Sci 5x5 Arrays - Sum & Difference - (Fortran)

    Homework Statement Create two 5x5 arrays, A & B, and ask the person to fill them out. Save those numbers in matrix_a.txt & matrix_b.txt respectively. Then, save the sum and difference of those numbers in sum.txt & diff.txt respectively. Basically we need to create two arrays, fill them out...
  14. W

    Computational Fortran books/resources for beginners

    I have a background of undergraduate physics but I consider myself to be quite weak in programming. I'm aware of the usefulness of computational software/programming software in the sciences, particularly physics. I'd like to ask for recommendations on how to start learning fortran assuming I...
  15. E

    Fortran How does Fortran Execute this Statement?

    How does Fortran execute this statement? x = 0 read(5, *, end = 10) x if (x.eq.1) then ... endif 10 ... The ellipsis stands for a list of commands, i.e the 'if' condition and line 10 have several lines. I have looked in Google and if my understanding is correct, the 'read' statement will be...
  16. T

    Fortran Repeating Strings in Fortran: Why is My Output Not Matching My Key?

    Hi, guys. For my project this week I have to code a cipher, and I am just getting used to what, what with the code. The problem I am having is that I have assinged my key and instered that into the repeat function but I only get one output of maths and not seven, why is this? program Jason...
  17. T

    Fortran Fortran 90: Find Max & Min Values

    Hi guys, I am playing around with different functions on Fortran 90. I tried to create a simply program that would take five number that I select in a do loop and write to the screen the Max number in that list and the min number in the list. My code is below along with my output: what I...
  18. T

    Fortran Why Won't My Fortran 90 Loop Output to a File?

    Hi, guys I am very new to programming in fortran90 and I am just experimenting with stuff. I have been trying to get my output of my loop program to a text file. But for some reason it will not work. Could someone please advise. Code displayed below: PROGRAM loop IMPLICIT NONE integer ...
  19. Telemachus

    Fortran Permutation of indices in fortran

    Hi there. I am working with a numerical quadrature in some scheme to solve a set of equations. At this point I am working in two dimensions. The thing is that I have some function ##\psi_m(x,y,\Omega_m)## with ##\Omega_m=(\Omega_{x,i},\Omega_{y,j})## with ##\displaystyle...
  20. E

    Fortran How does Fortran know the Inputs and Outputs of Subroutines

    I have trouble understanding how Fortran knows the inputs and outputs of a subroutine. I am studying a code written in Fortran, but I do not have a compiler, so I cannot check how it works. Here is my problem; for example, I have a subroutine, subroutine test(x, y, z, a, b, c) The variables...
  21. Cassius1n

    Fortran Verifying Fortran MacCormack Algorithm at t=50*dt

    Hi i have a problem in solving the maccormack algorithm for the following : ∂p/∂t+8*∂p/∂x=0,x∈(-10,10) p(x,t=0)=e**-3x the exact solution is u exact(x,t)=e**-3(x-8t) I have to verify the solution with the exact solution at t=50* dt This is what I've done so far: implicit none...
  22. Carl Loomis-Anderson

    Fortran Fortran77 data compiler problem

    So I am doing a chemical simulation of titans atmosphere and I have potentially 1000 data files to sort through to retrieve concentration values written in Double format. The issue is that each chemical has its own line with well over 80 columns (1993 currently, though it is subject to...
  23. LeftMyHeartInErebor

    Courses Choose C++ and Fortran: Advice Needed

    My program only requires that I take C++ or Fortran. It seems like most students I have asked are only taking C++, I'm thinking of doing both. I'm planning on asking my advisor as well, but so far I've been really underwhelmed with my meetings with him. Thoughts? Thanks in advance!
  24. Arez

    Fortran How to Read Specific Data from a Fortran Table File?

    Hello I am very new to programming and fortran. I have a text file formatted the following way: Name Peter John Sally Joseph Luke Vader etc... age XXXX XXXX XXXX XXXX XXXX XXXX XXXX height XXXX XXXX XXXX XXXX XXXX XXXX XXXX weigh...
  25. J

    Fortran Why Does My Fortran Program Have an Integer Overflow on Assignment?

    Hey guys, I have an assignment on fortran, which basically is supposed to read grades of a class and print them in alphabetical order and wether if the student failed or passed the class. We're supposed to do everything using our basic knowledge of fortran. When I run it it says 'integer...
  26. Const@ntine

    Comp Sci Fortran: Find a triangle's side, plus angles

    The statement: In every ABC triangle, the laws of sine (a/sinA = b/sinB = c/sinC) & cosine (c2 = a2 + b2 -2*a*b*cosC) are valid, where a, b & c are the sides opposite to A, B & C respectively. Write a program that calculates and prints on the computer's screen, the length of c, and also the...
  27. A

    Fortran How to change data from linear scale to log scale

    I am trying to calculate and draw a relation between (IL) and the Growth rate (m). I have used Il as range from 10^15 to 10^18 in the calculation and when I draw the relation (x-axis ) is Il and (y-axis ) is m. I converted the IL to be in log scale. I noticed unacceptable output. So, I am...
  28. Telemachus

    Fortran Problem with fortran and lapack

    Hi there. I'm trying to solve a linear system which I have constructed with the aim of learning how to do this in fortran. The idea is to solve: ##A\vec{x}=\vec{b}## The thing is that when I call the subroutine degsv from lapack to solve the linear system, and then write the solution, it only...
  29. M

    Fortran I in Fortran please -- Bairstow's method & Newton-Raphson

    this is bairstow's method , i need to put Newton-raphson in a subroutine and i don't know what's wrong i keep getting the wrong answer when i execute please help parameter (np=100) parameter (eps=1e-3) real a(np) ,b(np),c(np) real r ,s ,ri,si integer n,i write(*,*)'n,r,s' read(*,*)n,r,s...
  30. M

    Fortran Double integration over infinite intervals in Fortran

    Hi.. I am stuck up with a double integration where one of the integration limit is infinity. I know quadpack (qagi) can handle integration over infinite intervals. But how to make it work for the double integration. Or if there is any other routine that can handle both double integration and...
  31. sukalp

    Self-Study or Classes: Which Path to Computer Engineering After High School?

    i wanted to ask you after high school passing grade 12 when we do computer engineering courses like Bachelor of computer applications, Bachelor in computer science,,B of technology we can do self study or classes is required for these courses as computer engineering courses will have subjects...
  32. C

    Comp Sci Fortran variable value changing randomly

    This isn't really a question for which the template is useful.. Can anyone explain to me why the value of the variable 'seed' in location 1 is different from the value in location 2? The only thing happening in between is the defining of the varaible v(1) using the real function. I don't see...
  33. C

    Comp Sci Fortran write statement working on 1 line & not the next

    Not really a question suited for the template...maybe shouldn't put this in Homework section, but it's for a class. My write files were being weird so I started some investigating. Below is an excerpt from the code. 58 OPEN(unit=33,file='random2.txt',status='unknown') 59...
  34. E

    Fortran What does this Fortran Line Mean?

    This is the line: read(A, *) B The variable A is defined earlier in the code. I searched around the internet, and the 'read' syntax requires an input from the keyboard. However, the syntax I saw is read(*, *) var, so the two arguments are both asterisks. What if the first asterisk is defined...
  35. I

    Fortran Help with FORTRAN: Ivan Needs Assistance

    Hi there, first of all i am new to the forum, my name is Ivan and i am on 4th year of grade in Physics, i am doing my final work to finish the grade and i need some help in fortran. The first thing is that i can't even run it, i am using windows 8, i don't know what compiler use or even how to...
  36. Telemachus

    Variable grid mesh in Numerov's method (Fortran)

    I was trying to implement a variable grid mesh in Numerov's method, while playing with fortran. Numerov method was working well with a standard discretization, but when I tried to implement this variable grid, things came to look as if the 'metric' of the function were depending on the...
  37. H

    Comp Sci Fortran90 SIGSEGV: Segmentation fault

    Hi, I have a project for a class in numerics, where I have to write a program with FORTRAN 90 that calculates the determinant of a matrix using Laplace. The program itself works now, but I have added a function that finds the row/column with most zeroes and reorganizes the matrix, so that they...
  38. P

    Fortran An advanced example in fortran 77

    Hello I have to search for a few solved examples in fortran and understand them so next week i can make a presentation and explain into the other students. It is a homework for everyone and i don't know which programm i should use. there are few homepages which have many examples but they are...
  39. RJLiberator

    Comp Sci Solving FORTRAN Code Error: Is Anything Wrong?

    Homework Statement Working on a FORTRAN based code for some work. Not sure what's wrong with it. Homework EquationsThe Attempt at a Solution The section of the code that is causing the problem is: OPEN( UNIT = 17,FILE='updateddata.txt',STATUS='UNKNOWN') DO I = 1, 146 READ( 17, 703)...
  40. A

    Fortran Parallel Fortran Programming Help Wanted

    Hi mates please are there anybody help me to make parallel program best regards
  41. A

    Fortran How to run command line scripts from within Fortran 90

    Hey! I'm currently making a program which is a three body problem. I managed to get working results which I can plot to gnuplot. The question is, how can I write this within the program itself, so it can automatically plot the information to gnuplot if the user wants it to? (I'm being lazy :P)...
  42. avikarto

    Fortran Modern variable precision and integer multipliers

    I learned Fortran from ancient people who disregard modern standards. As such, my code consists mainly of that older syntax. I am wondering how well this meshes with current Fortran environments, specifically regarding double precision calculations. This comes up mainly because I have been...
  43. J

    Comp Sci Errors during executing the program (Compaq Visual Fortran)

    Homework Statement First of all, I used the Window xp & Compaq Visual Fortran 6.6 installed in VMware workstation. In my case, there are no compile and link errors in source code, and excuting that program is also done. But I want to generate 300 random numbers by using my program (Log-normally...
  44. gabforse

    Fortran Why Does My Fortran Code Give an Unclassifiable Statement Error?

    Hey so I'm getting the error message: Euler_Method.f90:43.1: fun=(c)(1-c)/(d+2) 1 Error: Unclassifiable statement at (1) And here is my code: PROGRAM Euler_Method !------------------------------------------------------------------- ! The purpose of this program is to read in endpoints...
  45. A

    Fortran Data acquisition using Fortran and RS232 Port

    I'm on Linux, and I want to treat the flow of data through the RS232 port, using the Fortran language , how can I do?
  46. NicolasPan

    Fortran Fortran 90/95: Read a Function?

    Hello everyone! I've been wondering if it is possible in Fortran to 'read' a function.For instance when I code this: contains function f(x) double precision :: f double precision ::x f=(whatever the function) return end function end program It would be ideal if the program allowed...
  47. kelvin490

    Fortran Input/Output error with error code -5

    I got a problem running my FORTRAN program in high performance computer cluster. It runs well in my PC but I want to have mass production of data with different initial conditions so I put it in a cluster node with eight cores, simulate eight sets of data. The program can run without problem...
  48. S

    Fortran Rules for Fixed Format Fortran: A Comprehensive Guide

    Are there any rule guides on fixed format Fortran such as in .f77, .f, .for files? For example, http://www.physics.nau.edu/~bowman/PHY520/F77tutor/03_basics.html has a few snippets of rules for Fortran 77 such as Col. 1 : Blank, or a "c" or "*" for comments Col. 1-5 : Statement label...
  49. NicolasPan

    Comp Sci Error while calculating arc length of curve in Fortran

    The program must calculate the length of the curve of ƒ=3.1*x^2-5.3/x between x=1/2 and x=3/2.The legth should be calculated as the sum of n line segments starting with n=1 and ending with n=20. I really can't find why the result I'm getting is wrong.Thanks in advance I am giving you the code...
  50. T

    System of ODEs with RK4 & step doubling in Fortran : damping

    Hello, I'm recently trying to code a solver for a system of differential equations u'(t) = F(t,u), using a Runge Kutta 4 method with an adaptative stepsize. For this, I'm using the 'step doubling' method, which is the following : suppose that we now the solution u(i) at time t(i). Then, the...
Back
Top