Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Time splitting issue

$
0
0

 Hello Everyone,

I'm trying to solve a problem use time splitting method.  For this i have to solve linear systems  of equation using tridag (fortran ) routine.

I have two problems

The first one is that the coefficients  use in tridag are 2 D array while this routine use 1 D array.

What i did to overcome this is the following (just a example):

  do  k=1,NT         ! Main loop over the time step

!Compute  the solution of the first equation 

do i=1, N1

do j= 1, N2

   A(j) = x(i)*y(j)

  B(j)= x(i)*y(j)

  C(j)=x(i)*y(j)

 End do 

 Call tridag( A,B,C,F0, F1, N)     !F0  is a two dimensional function , F1, a one dimensional function

 End do 

!Once done i will use F1 as the initial condition for the second equation

 Do j =1, N2

 Do i=1,N1

  E(i)= xx(i)*y(jj)

 F(i) =xx(i)*yy(j)

 G(i)= xx(i)*yy(i)

End do 

  Call tridag(E,F,G,F1,F2,n1)

end do 

!Next step Write result in the file, for different time

!Finally   i update my initial condition

   DO i=1,N1

 DO j=1,N2

   F0(i,j) =F2(i,j)

  end do

end do

END DO         !ENd of the time loop

 

****** The second  problem is that , i have the same result for different  time that i print the solution.

 I am doing something wrong?

 sorry for the long text

 

  Thank you


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>