← Back to team overview

dolfin team mailing list archive

Re: new refinement method

 

On 31/12/08 12:51 AM, Anders Logg wrote:
On Tue, Dec 30, 2008 at 04:54:05PM -0700, Bartosz Sawicki wrote:
I'm starting to work on implementation of more advanced algorithm for mesh refinement. At this moment the simplest version of the Longest-Edge-Bisection is used inside the Mesh::refine().

I plan to develop some algorithm based on Edge-Bisection with two set of markers and iterative swapping. There are some papers about this method. It is thought to be robust and produce good quality mesh.

This sounds good. Our current refinement algorithm sometimes produces
bad quality mesh (very thin triangles) if called many times without
intermediate calls to mesh.smooth().

Today I was stopped by the first problem related with edge global index.
We know that every bisection of triangle produces 3 new edges, and removes 1 old edge. The question is, if there is method to find what will be the global index of the new edges. If I understand correctly edge index can created (mesh.init(1)) only after mesh object is created and fulfilled by Vertexes and Cells. Maybe I'm wrong and there is simple way to get edge index even without calling mesh.init(1)?

Unfortunately no. It would be very good if there were a way to know
global edge numbers. It would also help with the parallel implementation
currently in progress.

But there might be some clever numbering strategy that could work. If
anyone knows of such a numbering strategy (uniquely assigning global
edge numbers based on global vertex numbers) we could implement that
as a post-processing step in TopologyComputation.

One first suggestion would be to numberthe first edge of the first
vertex 0, then the second edge connected to the first vertex etc.


I have finished first working version of new mesh refinement algorithm. The code is quite dirty now, but I will try to make it more readable for everyone. I'll send you a patch.

Edge numbering problem was solved by using std:map<Array<int>, int, cmp>. I've used two vertex number as a no-changing edge identifier. This works quite fast, but I'm open for new ideas. Maybe someone has better idea how to build MeshFunction connected with edges, and transform it into different mesh?

Similar problem would be crucial for implementation of MeshFunctions transformations connected with mesh refinement. As boundary indicators, and material properties should be preserved when we change the mesh.
I plan to implement this in the next step.

regrd.
BArtek





------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References