|
[Sponsors] |
January 11, 2016, 09:01 |
User Fortran script failures
|
#1 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
Hi everyone,
I'm trying to implement a user subroutine that applies momentum at specific locations in the mesh. I'm using the MomentumSource1.F and ucf_template.F as a guide. One of the things I need are matrices, I've done a little bit of fortran tutorials before starting on this but they seem pointless. For instance I thought I should define a matrix like real dimension(4,4) :: MyMatrix or real (kind=ikind),dimension(4,4) :: MyMatrix but when I compile it using cfx5mkext and pgf95 it says there is a syntax error in this line. Are there different rules for these types of code? |
|
January 11, 2016, 10:02 |
|
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
In my Fortran code I define arrays as
Code:
REAL mk(3,10) |
|
January 12, 2016, 03:46 |
|
#3 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
thanks for the answer.
the definition actually does work but you need to put the comma after REAL. So that's solved I guess. |
|
Tags |
cfx-pre, fortran, user subroutine |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX User Fortran: Particle User Sources | hustxinxin | CFX | 0 | March 8, 2012 09:37 |
CFX User Fortran: Particle User Sources | hustxinxin | CFX | 0 | March 8, 2012 09:31 |
Particle Transport & Termination Control with User FORTRAN | Julian K. | CFX | 3 | January 12, 2012 10:48 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
User Fortran and interior node information | John | CFX | 0 | August 26, 2008 23:24 |