|
[Sponsors] |
July 30, 2008, 12:46 |
Need a Fortran Function
|
#1 |
Guest
Posts: n/a
|
Hi, I need a function in Fortran to multiply a matrix by a scalar.Is there any? Thanks
|
|
July 30, 2008, 14:39 |
Re: Need a Fortran Function
|
#2 |
Guest
Posts: n/a
|
that is a simple loop. You should be able to do that yourself..
|
|
July 30, 2008, 15:39 |
Re: Need a Fortran Function
|
#3 |
Guest
Posts: n/a
|
Function multMat(a,Mat,m,n) implicit double precision(a-h,o-z) DIMENSION Mat(m,n),multMat(m,n) !---------------------------------- DO i=1,m
DO j=1,n multMat(i,j)=a*Mat(i,j) ENDDO ENDDO ! or just multMat=a*Mat ! same as the above routine end function |
|
August 10, 2008, 03:41 |
Re: Need a Fortran Function
|
#4 |
Guest
Posts: n/a
|
If you don't write an index fortran consider it all. for example: mat = mat*s mat(i,=mat(i,*s mat(:,j)=mat(:,j)*s
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 04:37 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |