title: Make a better grid of points with python
body: <p>I can make simple grid of points in a rectangular domain by simply saying:</p>
  
  <pre><code>import numpy as np
  
  x = np.linspace(0,2,M+1)
  y = np.linspace(0,1,N+1)
  X,Y = np.meshgrid(x,y)
  </code></pre>
  
  <p>And put this value in a particular order that I want (I want the code to read through the points along the x and then shift to the following y)</p>
  
  <pre><code>positions = np.vstack([Y.ravel(), X.ravel()])
  </code></pre>
  
  <p>Now, i need my code to distinguish between perimeter points and internal points of the grid and be able to call them easily, because my function has know values on those points. How can this be done?</p>