1
$\begingroup$

Now I'm trying to solve a PDE by FEM, and I need creat the 2D mesh on the cube's surface, the figrue below shows my idea.

enter image description here

Both the quadrilateral elements and triangle element are OK. I read the Element Mesh Generation Tutorial but didn't find good way.

The field variable is not continuous when crossing the edges, so I want to use the standard FEM procedure rather than the built-in function to solve it, therefore I need to know every nodes' coordinates and the elements incidents, and then write the program by myself.

Besides, how can I get the coordinates of the nodes located at the edges if the mesh is created?

Thanks in advance :)

$\endgroup$
2
  • $\begingroup$ By "edges", you mean the blue lines in your figure? $\endgroup$
    – Virgil
    Commented Jan 2, 2016 at 15:18
  • $\begingroup$ Yes, this is a problem of energy transfer, when the energy meet the "edge" it will partly reflected and partly transmission, so I need some special operation on the nodes located at the "edge". $\endgroup$
    – Ice0cean
    Commented Jan 2, 2016 at 15:24

1 Answer 1

3
$\begingroup$

You can use something like:

Needs["NDSolve`FEM`"]
mesh = ToElementMesh[Cuboid[], MaxCellMeasure -> 0.0125];
mesh["Wireframe"]

enter image description here

to make the mesh. For the second question, there is no direct way to extract the edges but using the "Methods" documented in ElementMesh found in the scope section this should not be impossible.

$\endgroup$
1
  • $\begingroup$ ToElementMesh[Cuboid[]] creates a 3D mesh. Use ToBoundaryMesh[Cuboid[]] to get the 2D surface mesh. $\endgroup$
    – Virgil
    Commented Jan 2, 2016 at 20:40

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.