CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Need a Fortran Function

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 30, 2008, 12:46
Default Need a Fortran Function
  #1
CFD girl
Guest
 
Posts: n/a
Hi, I need a function in Fortran to multiply a matrix by a scalar.Is there any? Thanks
  Reply With Quote

Old   July 30, 2008, 14:39
Default Re: Need a Fortran Function
  #2
mettler
Guest
 
Posts: n/a
that is a simple loop. You should be able to do that yourself..
  Reply With Quote

Old   July 30, 2008, 15:39
Default Re: Need a Fortran Function
  #3
jinwon park
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

  Reply With Quote

Old   August 10, 2008, 03:41
Default Re: Need a Fortran Function
  #4
Anishtain4
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
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 07:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 03:49.