Buckets:
| subroutine advance(u, u_1, u_2, f, Cx2, Cy2, dt2, Nx, Ny) | |
| integer Nx, Ny | |
| real*8 u(0:Nx,0:Ny), u_1(0:Nx,0:Ny), u_2(0:Nx,0:Ny) | |
| real*8 f(0:Nx,0:Ny), Cx2, Cy2, dt2 | |
| integer i, j | |
| real*8 u_xx, u_yy | |
| Cf2py intent(in, out) u | |
| C Scheme at interior points | |
| do j = 1, Ny-1 | |
| do i = 1, Nx-1 | |
| u_xx = u_1(i-1,j) - 2*u_1(i,j) + u_1(i+1,j) | |
| u_yy = u_1(i,j-1) - 2*u_1(i,j) + u_1(i,j+1) | |
| u(i,j) = 2*u_1(i,j) - u_2(i,j) + Cx2*u_xx + Cy2*u_yy + | |
| & dt2*f(i,j) | |
| end do | |
| end do | |
| C Boundary conditions | |
| j = 0 | |
| do i = 0, Nx | |
| u(i,j) = 0 | |
| end do | |
| j = Ny | |
| do i = 0, Nx | |
| u(i,j) = 0 | |
| end do | |
| i = 0 | |
| do j = 0, Ny | |
| u(i,j) = 0 | |
| end do | |
| i = Nx | |
| do j = 0, Ny | |
| u(i,j) = 0 | |
| end do | |
| return | |
| end | |
Xet Storage Details
- Size:
- 877 Bytes
- Xet hash:
- 00f0a776c456646aa97e8fae6b85376e8324bff16761799b2f8fca611a4f67a6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.