Finding 2D Mesh Solutions for User-Specified Needs

  • Context: Fortran 
  • Thread starter Thread starter Milentije
  • Start date Start date
  • Tags Tags
    2d Mesh
Click For Summary

Discussion Overview

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.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant requests assistance in finding solutions for creating a 2D mesh and mentions difficulties with compiling existing solutions.
  • Another participant seeks clarification on what is meant by "2D mesh," prompting a discussion on the definition.
  • A participant clarifies that they are referring to a two-dimensional grid where parameters can be set, indicating a need for specific configurations.
  • A further response critiques the vagueness of the initial inquiry and provides a code snippet for generating a simple orthogonal 2D mesh, detailing the parameters and allocation of arrays.
  • The original poster acknowledges their vagueness in the inquiry, suggesting a deliberate choice to be less specific.

Areas of Agreement / Disagreement

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.

Contextual Notes

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.

Milentije
Messages
47
Reaction score
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?
 
Technology news on Phys.org
What do you mean 2D mesh?
 
I mean 2dimensions grid,where I can set the parameters.
 
You mean 2D means 2 dimensions?? In all honesty, you're vagueness is epic.
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.
 
  • Like
Likes   Reactions: mariem.makh
Thanks for the answer.
Oh,yes I am deliberately vague.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K