uniform refinement is not working in gmsh
Hi,
I get 0 node and elements when I use -refine command line flag in gmsh: 'gmsh script.geo -2 -refine' Explicitly writing 'RefineMesh' in the script produces the original mesh and not a refined one.
Am I missing something while using refinement feature? I remember command line flag -refine used to work. I am using gmsh after a long a time and I wonder if something has been updated.
My geo script is as follows:
lx = 5.0; // domain length in x-dir
ly = 5.0; // domain length in y-dir
nx = 200; // no of points in x-dir
ny = 200; // no of points in y-dir
Point(1) = {-lx, -ly, 0};
Point(2) = { lx, -ly, 0};
Point(3) = { lx, ly, 0};
Point(4) = {-lx, ly, 0};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(1) = {1,2,3,4};
Plane Surface(1) = {1};
Transfinite Line{1,3} = nx;
Transfinite Line{2,4} = ny;
Transfinite Surface {1} = {1,2,3,4} AlternateLeft ; // "Left", "Right", "AlternateLeft" and "AlternateRight"
Physical Line(1) = {1}; // x dir: left
Physical Line(2) = {2}; // x dir: right
Physical Line(3) = {3}; // y dir: bottom
Physical Line(4) = {4}; // y dir: top
Physical Surface(101) = {1};
//RefineMesh;
I tried a mesh without Transfinite feature and refinement does not work in that setting either.
Best, Ashish B