- Thank you received: 0
adaptive mesh refinement in 3D
- Williamson
- Topic Author
- Offline
- New Member
Less
More
6 years 7 months ago #513
by Williamson
adaptive mesh refinement in 3D was created by Williamson
Hi.
I am trying to do adaptive mesh refinement in 3D, but the refinement process appears to be inefficient in that more elements are being refined than appear necessary. The attached script (refine_experiment.py) is an example of what I mean. The initial mesh has only 54 elements. However, when I mark only the first element for refinement, the refined mesh has 384 elements (global refinement produces 432 elements). Are there additional settings I need to obtain better adaptive refinement?
Thank you,
Kevin
I am trying to do adaptive mesh refinement in 3D, but the refinement process appears to be inefficient in that more elements are being refined than appear necessary. The attached script (refine_experiment.py) is an example of what I mean. The initial mesh has only 54 elements. However, when I mark only the first element for refinement, the refined mesh has 384 elements (global refinement produces 432 elements). Are there additional settings I need to obtain better adaptive refinement?
Thank you,
Kevin
Attachments:
6 years 7 months ago #514
by joachim
Replied by joachim on topic adaptive mesh refinement in 3D
Hi Kevin,
NGSolve uses refinement markers for 3D elements and 2D elements. Per default, all elements are marked for refinement, so you have to unmark all surface elements first:
for el in mesh.Elements(BND):
mesh.SetRefinementFlag(el, False)
then I get 82 elements after refinement,
Joachim
NGSolve uses refinement markers for 3D elements and 2D elements. Per default, all elements are marked for refinement, so you have to unmark all surface elements first:
for el in mesh.Elements(BND):
mesh.SetRefinementFlag(el, False)
then I get 82 elements after refinement,
Joachim
- Williamson
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
6 years 7 months ago #515
by Williamson
Replied by Williamson on topic adaptive mesh refinement in 3D
Hi Joachim,
Thank you very much! This works.
Thanks,
Kevin
Thank you very much! This works.
Thanks,
Kevin
Time to create page: 0.102 seconds