Milentije
- 47
- 0
What I need is a 2d mesh,user specified.I have find some solutions on net but still have problems compiling.Anyone knows wheret o find more?
The discussion revolves around the creation of a user-specified 2D mesh, with participants exploring the definition and parameters involved in generating such a grid. The scope includes technical aspects of mesh generation and programming challenges related to compiling code.
Participants do not reach a consensus on the initial inquiry's clarity, with some expressing confusion while others provide technical details. The discussion remains unresolved regarding the specific needs and solutions for the 2D mesh.
The discussion includes assumptions about the familiarity with programming and mesh generation concepts, as well as the specific requirements for the mesh that remain unspecified.
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)