I would like to refine a 2D mesh in the pde toolbox using the "new" flow. I am basically looking for the new version of the old function "refinemesh"

I would like to refine a 2D mesh in the pde toolbox using the "new" flow. I am basically looking for the new version of the old function "refinemesh"

1 Comment

Hi, Devin
I still ask the same question. Now, if you have any answer for your question, please provide us.

Sign in to comment.

Answers (1)

Sorry, the new way to do it is to construct an entirely new mesh using generateMesh using a smaller Hmax value. It is indeed different than using refinemesh, but I believe that it should work as well.
Alan Weiss
MATLAB mathematical toolbox documentation

3 Comments

Alan, thanks for the answer. However, this doesn't seem straight forward. I created the model object and used the new flow to create a mesh. However, I subsequently refine my mesh to be non-uniform. There are regions that require a very fine mesh that is then graded. I also use my own solver so I plan to estimate a local upper error bound and use this to subsequently refine the mesh. With refinemesh I can specify specific triangles that should be refined. This is what I need. Thanks in advance for your assistance.
Devin Crawford
Indeed, this doesn't seem straightforward. You can extract the mesh using meshToPet, then use refinemesh as you like. But your PDEModel object will no longer contain the mesh, so you would have to use the older workflow from there on.
Alan Weiss
MATLAB mathematical toolbox documentation
What if you want to refine the mesh in only one direction? I have a 3D cube and I want a finer mesh in only the z-direction. Can I do this and solve with the PDE Toolbox?

Sign in to comment.

Products

Tags

Asked:

on 15 Jun 2016

Commented:

on 21 Jul 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!