- #1

Milentije

- 48

- 0

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Fortran
- Thread starter Milentije
- Start date

- #1

Milentije

- 48

- 0

- #2

minger

Science Advisor

- 1,496

- 2

What do you mean 2D mesh?

- #3

Milentije

- 48

- 0

I mean 2dimensions grid,where I can set the parameters.

- #4

minger

Science Advisor

- 1,496

- 2

Code:

```
integer :: ni,nj,i,j
real,dimension(:,:),allocatable :: x,y
real :: dx,dy,xc,yc
!--Set parameters
ni = 10 !--number of points in the x-direction
nj = 10 !--number of points in the y-direction
dx = 0.1 !--grid spacing in the x-direction
dy = 0.1 !--grid spacing in the y-direction
allocate( x(ni,nj),y(ni,nj) )
xc = 0.0
yc = 0.0
DO i=1,ni
DO j=1,nj
x(i,j) = xc
y(i,j) = yc
xc = xc + dx
END DO
yc = yc + dy
xc = 0.0
END DO
deallocate(x,y)
```

That's my idea of a simple orthogonal 2D mesh.

- #5

Milentije

- 48

- 0

Thanks for the answer.

Oh,yes I am deliberately vague.

Oh,yes I am deliberately vague.

Share:

- Last Post

- Replies
- 12

- Views
- 434

- Last Post

- Replies
- 9

- Views
- 566

- Last Post

- Replies
- 8

- Views
- 438

- Last Post

- Replies
- 5

- Views
- 279

- Last Post

- Replies
- 4

- Views
- 436

- Last Post

- Replies
- 2

- Views
- 330

- Replies
- 14

- Views
- 258

- Last Post

- Replies
- 8

- Views
- 936

- Replies
- 37

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 755