6
$\begingroup$

I am new in Mathematica.

Is it possible to create QuadElements from a set of points? In this link there is an explanation for creating triangleElement. Suppose I have only coordinates of my points as follows

dd = {{0.25, 0.25}, {0.5, 0.25}, {0.75, 0.25}, {0.25, 0.5}, {0.5, 
    0.5}, {0.75, 0.5}, {0.25, 0.75}, {0.5, 0.75}, {0.75, 0.75}, {0.25,
     1}, {0.5, 1}, {0.75, 1}, {0.25, 1.25}, {0.5, 1.25}, {0.75, 
    1.25}, {0.25, 1.5}, {0.5, 1.5}, {0.75, 1.5}, {0.25, 1.75}, {0.5, 
    1.75}, {0.75, 1.75}, {0, 0}, {1, 0}, {0, 0.25}, {1, 0.25}, {0, 
    0.5}, {1, 0.5}, {0, 0.75}, {1, 0.75}, {0, 1}, {1, 1}, {0, 
    1.25}, {1, 1.25}, {0, 1.5}, {1, 1.5}, {0, 1.75}, {1, 1.75}, {0, 
    2}, {1, 2}, {0.25, 0}, {0.5, 0}, {0.75, 0}, {0.25, 2}, {0.5, 
    2}, {0.75, 2}};

I want to create quadElements from this set. Thank you for your help.

$\endgroup$
4
  • $\begingroup$ Can you be more specific? What are QuadElements? $\endgroup$
    – lericr
    Commented Jun 25 at 22:25
  • 1
    $\begingroup$ I mean quadrilateral mesh. See for example here $\endgroup$
    – Merakli
    Commented Jun 25 at 22:39
  • $\begingroup$ I want to understand QuadElements is always well-defined or not. Suppose you have just five points --- the vertices of a regular pentagon. Then, what is the expected answer? $\endgroup$
    – A. Kato
    Commented Jun 26 at 1:11
  • $\begingroup$ The command ToElementMesh[Rectangle[{0, 0}, {1, 2}], MaxCellMeasure -> 1/16] will create a mesh of QuadElements through those particular points. $\endgroup$
    – LouisB
    Commented Jun 26 at 7:06

1 Answer 1

9
$\begingroup$
ResourceFunction["FEMAddOnsInstall"][]
Needs["FEMAddOns`"]
Needs["NDSolve`FEM`"];
triMesh = ToElementMesh[dd];
mesh = ToQuadMesh[triMesh];
mesh["Wireframe"]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much. $\endgroup$
    – Merakli
    Commented Jun 26 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.