Does generatemesh refine or remesh?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi folks, I understand that generatemesh can be used to increase mesh density near specified vertices or edges. Is this done smartly by refining elements in that region or is a complete remesh actually completed?
댓글 수: 2
Rik
2023년 1월 25일
Since the documentation doesn't show that can use the previous mesh, so my expectation is that a complete remesh will happen. I don't know whether there would be caching involved internally.
Why are you asking this?
답변 (1개)
Kartik
2023년 3월 20일
Hi,
The 'generatemesh' function can be used to increase the mesh density near specified vertices or edges. The function uses an adaptive refinement algorithm that refines elements in the specified region without remeshing the entire domain.
The algorithm works by first generating an initial mesh and then refining the elements in the specified region based on an error estimate. The error estimate is calculated using a refinement function that measures the error in the solution (e.g., the difference between the exact solution and the numerical solution) and compares it to a user-defined tolerance. If the error is above the tolerance, the elements in the specified region are refined by dividing them into smaller elements. This process is repeated until the error is below the tolerance or until a maximum number of refinement levels is reached.
The adaptive refinement algorithm used by 'generatemesh' is designed to be smart and efficient, as it only refines the elements that need to be refined and does not remesh the entire domain. This allows the function to generate meshes with high accuracy and resolution while minimizing the computational cost.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Splines에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!