← Back to team overview

dolfin team mailing list archive

Re: New mesh library

 

On Sat, Jun 17, 2006 at 12:10:26PM +0200, Garth N. Wells wrote:
> Great! The benchmarks look really good.
> 
> On Sat, 2006-06-17 at 01:09 +0200, Anders Logg wrote:
> > I just merged the new mesh library. All the basic functionality is in
> > place: automated computation of connectivity and entities, iteration
> > over mesh entities and (uniform) mesh refinement.
> > 
> > Still missing is computation of boundaries, adaptive mesh refinement
> 
> But one of the benchmarks was for mesh refinement?

Yes, uniform mesh refinement, which was just a couple of lines to
implement (same algorithm for all simplices: intervals, triangles,
tetrahedra, ...). It will take a little more effort to port the
adaptive mesh refinement.

There are two reasons the new mesh refinement is an order of magnitude
faster. First all data structures are much faster, and second the new
uniform mesh refinement just does straight-on uniform refinement. The
previous one marked all cells for refinement and then did adaptive
refinement.

Note that the interface has changed slightly:

    mesh.refine()

now does uniform refinement if no cells have been marked for
refinement. Mesh::refineUniformly() has been removed.

/Anders


> > and the parallelism.
> > 
> > Here's a quick overview. For more details, see the online manual at
> > 
> >     http://www.fenics.org/pub/documents/dolfin/dolfin-progr-reference/
> > 
> > Look for NewMesh and follow the links. (Should be generated in a few
> > hours, the cron job starts at 07.10 CET.) Note that some of the new
> > classes have a prefix "New" to avoid conflict with the current mesh.
> > Here's a list of the classes in the new mesh library:
> > 
> >     MeshConnectivity.h
> >     MeshEditor.h
> >     MeshEntity.h
> >     MeshEntityIterator.h
> >     MeshGeometry.h
> >     MeshTopology.h
> >     NewMesh.h
> >     NewMeshData.h
> >     MeshFunction.h
> >     NewVertex.h
> >     NewEdge.h
> >     NewFace.h
> >     NewFacet.h
> >     NewCell.h
> >     MeshAlgorithms.h
> >     CellType.h
> >     Interval.h
> >     NewTriangle.h
> >     NewTetrahedron.h
> >     UniformMeshRefinement.h
> >     NewPoint.h
> > 
> > A mesh consists of mesh entities (vertices, edges etc). An entity is
> > just a pair (dim, index), where dim is the topological dimension of
> > the entity and index is the number of the entity within its
> > topological dimension. An entity can be connected to other entities.
> > All connectivity is computed automatically when needed.
> > 
> > The best way to use the mesh is through the iterator interface. Here's
> > a couple of examples:
> > 
> >   NewMesh mesh;
> >   for (MeshEntityIterator e(mesh, dim); !e.end(); ++e)
> >   {
> >        e->foo();
> >   }
> >   
> >   MeshEntity f;
> >   for (MeshEntityIterator e(f, dim); !e.end(); ++e)
> >   {
> >       e->foo();
> >   }
> > 
> > There are also named entities and entity iterators for convenience:
> > Vertex (dimension 0), Edge (dimension 1), Face (dimension 2), Facet
> > (codimension 1) and Cell (codimension 0).
> > 
> > The new implementation is very clean and simple and it should not
> > require much work to extend with the remaining missing functionality.
> > 
> > It's also pretty fast. I will post some benchmarks in a separate
> > email.
> > 
> > The plan is now to clean up the linear algebra and ODE solvers so we
> > can make a new release and then concentrate on porting everything to
> > the new mesh (which should be simple since the interface is very
> > similar).
> > 
> > Use the new mesh at your own risk. I have not done any extensive
> > tests. Any feedback appreciated.
> > 
> > /Anders
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 
> 



References