← Back to team overview

dolfin team mailing list archive

Re: New refinement algorithm

 

On 02/10/2011 12:03 AM, Garth N. Wells wrote:

On 09/02/11 22:43, Anders Logg wrote:
On Wed, Feb 09, 2011 at 10:11:40AM -0800, Johan Hake wrote:
Hello!

I am pretty sure the reason the Macbot still complains (mesh unit test) is
that refine is broken for SWIG 2.0.

I think it is some premature destruction of a refined mesh. I would suggest we
implement a full shared_ptr version of the interface to get around this
problem. I have no clue of why it works for SWIG 1.3.40. Probably because a
faulty implementation.

I also suggest more developers upgrade to SWIG 2.0.1 and maybe one of the
linux build bots two? If it is only the Macbot that uses SWIG 2.0 it is easily
to think it is some Mac specific error.

Johan
I plan to merge with main tomorrow if my buildbot is green. Then Marie
also needs to merge (we have both touched refine.h/cpp). Then we can
sort out the shared_ptrs.

I really don't get the approach to hierarchies. Mesh refinement was
simple, and now something simple has become complex (with bugs that are
hard to track down because of the introduced complexity).


I really do get the approach to hierarchies. Mesh refinement was and is simple, but dealing with the consequences of mesh refinement has never been. A couple of different designs regarding the refinement of function spaces, functions, forms etc have been tested over the last year. I (and the AdaptiveSolver) find the current Hierarchical design transparent, elegant, and very much to the point.

--
Marie

This hierarchy business looks viral - now I get Swig warnings for
DirichleBC.

I would much rather keep basic classes simple, and have hierarchical
containers that can keep track of parent/child relationships. The
present approach seems to take a narrow/immediate view on the issue.

Garth

I've been working on a new (old) refinement algorithm which instead of
bisection divides marked triangles into 4 triangles, then fixes the
neighbors. It's sometimes a better option since fewer refinements are
needed and it guarantees that all edges of marked triangles will be
split during refinement.

We had this a while back but it was removed since it relied heavily on
parent-child relationships between the individual cells and vertices
of the mesh. We don't have that anymore (only between the meshes).

It's currently only implemented in 2D and can be enabled with the
global option "refinement_algoritm" set to "regular_cut". The default
value is "recursive_bisection". There are some other options that I
plan to remove since they don't work and are presumably not as good as
"recursive_bisection". In the near future, we will need to
remove/reimplement both algorithms to work in parallel, or (ideally)
wrap an external library that provides parallel mesh refinement (like
MAdLib). Niclas has some parallel mesh refinement but I don't know if
there are any plans to merge it into DOLFIN.

--
Anders

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp


Follow ups

References