Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: milenko76
  • Content: Threads
  • Order by date
  1. milenko76

    allocatable arrays problem!

    I got this: Subscript #2 of the array X has value 3 which is greater than the upper bound of 2 How to set up bounds? integer :: i,j,k,c,n,a real,dimension(:,:),allocatable :: x Then comes main program: read(10,*)n,c a=n*c allocate(x(n,c)) Reads 4,2 but latter...
  2. milenko76

    fortran 90 only

    I want to use one subrutine from Press Numerical Recipees: SUBROUTINE powell(p,xi,ftol,iter,fret) USE nrtype; USE nrutil, ONLY : assert_eq,nrerror So should I compile nrtype and nrutil as a module or there is an easier way ?
  3. milenko76

    is this intrinsic function?

    I have subroutine like this: Subroutine FuncSub(N, PP, F) Implicit None integer :: N real :: PP(N), F, func F = func(PP) end Subroutine FuncSub I do not understand F = func(PP)?
  4. milenko76

    how to manipulate 2d array

    I have calculated some matrixes,I want to call from the main code and put that into one matrix.I have eight (7,7) arrays and I want to write them on diagonal of new array to create (56,56) array.Any ideas?
  5. milenko76

    subroutine problem

    I have iterative process but my subroutine has problems. c ====================================== subroutine datainpe c ====================================== use definitions use mt2ddat implicit none write(*,*)iper id1=iper/10 id2=iper-id1*10...
  6. milenko76

    reshape issue!

    I have a file with 1680 numerical values,I want to read it and reshape it,later use that array for further calculations.Like this: integer:: i,j real,dimension(1680) :: s real, dimension(21,80) :: ist integer,dimension(80,80) :: wd,wd2...
  7. milenko76

    char intrinsic

    I am trying this: id1=iter/10 id2=iter-id1*10 tfile(3:4)=char(id1+48)//char(id2+48) I have defined: data tfile/'nr .res'/ Still i get file like this: nr .res I would like to be nr01.res,... and so on. Where could be a problem?
  8. milenko76

    reading from array

    When I read from file model 1: do i=2,nc read(5,*)icd,res(icd),ivar(icd) cond(icd)=1./res(icd) In next iteration I read from array: xn=xnbig(:,:,iter) icdar1=xn(:,1) resar1=xn(:,2) ivarar1 =xn(:,3) How to denote that icdar1 has 57 elements icd,resar1...
  9. milenko76

    logical true. false. issue

    I have array and want to use intrinsic pack functions.The problem is that my array is quite a big one so creating mask can be done by repeating true and false.Is there any simple way how I can write witout repeating 80 falses while creating mask?
  10. milenko76

    writing to array again!

    Well I have already posted before,but even with much help from other collegues it didn't work. do i=1,nsites do ico=1,nc if(ivarp(ico).ne.0)then iprd=ivarp(ico) apr4sens(1,i,iprd)=apr1dsens(i,iprd)...
  11. milenko76

    f77 versus ifort

    I am trying to work with the code,but I am using Intel Fortran Compiler and the guy how make it used f77.I wrote my one makefile and compile it,but it is not working properly.Where should I look for error? FC= ifort LD = ifort -align all FCFLAGS = -O2 -g -ipo -traceback -warn noalign LDFLAGS =...
  12. milenko76

    passing array as dummy argument problem

    I have already posted regarding this,but I will try to explain.I calculate some functions,store them in arrays and then want to send them to main program but there I get some wrong values.My module: module s2em contains c --------------------------- subroutine...
  13. milenko76

    merge rank 3 arrays

    I have problem like this:real*4 apr1dsens(nmax,nfmax,ncmax) apr1dsens(j,1,iprd),apr1dsens(j,2,iprd),apr1dsens(j,3,iprd),apr1dsens(j,4,iprd) All have 420 numerical values.How to join them into single array?Can merge intinsic function be used for 4 arrays?I have tried like this but got some apsurd...
  14. milenko76

    iteration process problem!

    I have come to the point that I have xn array,model as a result of first iteration.Defined like this: real,dimension(57,3) :: xn How to store it and how to use it in further iterations?Is global module with allocatable array best solution?
  15. milenko76

    3d array problem

    Well I am trying to read a file and make it rank3 array. forrtl: severe (24): end-of-file during read, unit 5, file /home/milenko/ircg/test_res1.dat program praviar implicit none integer*4 k,n,m integer,dimension(3) ::s real,dimension(57,57,57) :: x...
  16. milenko76

    allocate issue

    I have problems with my code.As a result of calculation I got rank2 l(21,1) array.Due to the THE ITERATIVE PROCESS I will get the same array in every iteration.How to allocate values and use them later.Should I create new array like lbig(iter,nmax,1)=l(nmax,1)?
  17. milenko76

    reshape problem

    My module: module kstep implicit none contains subroutine kpr(iter,l,lt,koef) integer:: i,j real,allocatable,dimension(:),intent(in) :: l real,allocatable,dimension(:),intent(in) :: lt real,allocatable,dimension(:),intent(out) :: koef...
  18. milenko76

    rank 2 array problem!

    I am writing in my code some values to file,but I want to write them to new array. apr1dsens(j,3,iprd)=2*g*(real(sens_zyx)*real(zyx) & +aimag(sens_zyx)*aimag(zyx)) apr1dsens(j,4,iprd)=g1*(aimag(sens_zyx)*real(zyx) & -aimag(zyx)*real(sens_zyx))...
  19. milenko76

    how to create 3dimensional array

    I need this because of easy array maniplulation. I tryed like this: program arrayc implicit none integer :: i integer,dimension(57) :: a real,dimension(57) :: b(1,1.8,63.39,472.97,801.43,3.71,35.07,15.63...
  20. milenko76

    how to solve this

    I have calculated some corections but now I have problem to add them to original values. rewind(5) do i=2,nc read(5,*)icd,res(icd),ivar(icd) if(ivar(icd).ne.0)then ivarprd=ivarprd+1 ivarp(ivarprd)=icd endif I want to add 21 real values to res(icd) res(icd)=res(icd)+cor(icd) But it...

Part and Inventory Search

Back
Top