// FEATool Multiphysics ( https://www.featool.com ) geometry -> Gmsh GEO format

// Points.
hmax = 0.33;
Point (1) = { 0, 0, 0, hmax };
Point (2) = { 1, 0, 0, hmax };
Point (3) = { 1, 1, 0, hmax };
Point (4) = { 0, 1, 0, hmax };


// Lines.
Line (1) = { 1, 2 };
Line (2) = { 2, 3 };
Line (3) = { 3, 4 };
Line (4) = { 4, 1 };

Physical Curve (1) = { 1 };
Physical Curve (2) = { 2 };
Physical Curve (3) = { 3 };
Physical Curve (4) = { 4 };


// Line Loops.
Curve Loop (1) = { 1, 2, 3, 4 };


// Surfaces.
Plane Surface    (1) = { 1 };
Physical Surface (1) = { 1 };


// Boundary Layer for edge and boundary 1.
Field[1] = BoundaryLayer;
Field[1].EdgesList = {1};
Field[1].NodesList = {1,2};
Field[1].hfar = 0.1;
Field[1].hwall_n = 0.025;
Field[1].thickness = 0.15;
Field[1].ratio = 1.1;
Field[1].AnisoMax = 1000;
Field[1].Quads = 0;
Field[1].IntersectMetrics = 0;
BoundaryLayer Field = 1;

// Boundary Layer for edge and boundary 2.
Field[2] = BoundaryLayer;
Field[2].EdgesList = {3};
Field[2].NodesList = {3,4};
Field[2].hfar = 0.1;
Field[2].hwall_n = 0.025;
Field[2].thickness = 0.15;
Field[2].ratio = 1.1;
Field[2].AnisoMax = 1000;
Field[2].Quads = 0;
Field[2].IntersectMetrics = 0;
BoundaryLayer Field = 2;

Mesh 2;
Mesh.MshFileVersion = 2;
Save "unit-square-boundary-layer.msh";
