I have created the following mesh for a slope stability problem:
<< NDSolve`FEM`
coordinates = {{0., 0.}, {75, 0}, {75, 30}, {45, 30}, {35, 40}, {0,
40}, {14, 14}, {60, 14}, {26, 26}, {47, 26}, {28, 28}, {45,
28}, {30, 30}, {47, 30}, {60, 30}, {14, 40}, {26, 40}, {28,
40}, {30, 40}};
e1 = QuadElement[{{1, 2, 8, 7}, {2, 3, 15, 8}, {7, 8, 10, 9}, {8, 15,
14, 10}, {10, 14, 4, 12}, {9, 10, 12, 11}, {11, 12, 4, 13}, {13,
4, 5, 19}, {11, 13, 19, 18}, {9, 11, 18, 17}, {7, 9, 17, 16}, {1,
7, 16, 6}}];
mesh = ToElementMesh["Coordinates" -> coordinates,
"MeshElements" -> {e1}, "MeshOrder" -> 2, MaxCellMeasure -> 1]
mesh["Wireframe"]
I'm specifing that the MaxCellMeasure
shouldn't be larger than one, but mma refuses to refine the mesh. Is there a way to refine this mesh?
This is what I need (mesh generated by GID):
I have also tried to create a Region
:
<< NDSolve`FEM`
top = {{1, 2, 8, 7}, {2, 3, 15, 8}, {7, 8, 10, 9}, {8, 15, 14,
10}, {10, 14, 4, 12}, {9, 10, 12, 11}, {11, 12, 4, 13}, {13, 4, 5,
19}, {11, 13, 19, 18}, {9, 11, 18, 17}, {7, 9, 17, 16}, {1, 7,
16, 6}};
node = {{0., 0.}, {75, 0}, {75, 30}, {45, 30}, {35, 40}, {0, 40}, {14,
14}, {60, 14}, {26, 26}, {47, 26}, {28, 28}, {45, 28}, {30,
30}, {47, 30}, {60, 30}, {14, 40}, {26, 40}, {28, 40}, {30, 40}};
reg = RegionUnion[
Flatten[Table[
Polygon[Table[{ node[[ top[[i]][[j]] ]][[1]],
node[[ top[[i]][[j]] ]][[2]] }, {j, 1, 4}]], {i, 1,
Length[top]}]]]
Region[reg]
But the function ToElementMesh
doesn't work:
me = ToElementMesh[reg]
me["Wireframe"]
DiscretizeRegion[Region[reg], MaxCellMeasure -> 1]
$\endgroup$