Hello, Ondrej:

> Do you have some example worksheet doing this? That's the exact same
> workflow that we want to use in FEMhub --- only we want to use our C++
> PDE solvers (http://hpfem.org/
> <http://www.google.com/url?sa=D&q=http://hpfem.org/&usg=AFQjCNGeqv6JoTc2MKrXb5G6x8cbvLNKXg>),
> that we wrapped in Python.
I've taken a look around your place, and I'm impressed. I'm working on
such a worksheet, it should be ready by the weekend. Maybe when I've
finished my worksheet I can borrow one of yours to have more examples.
Do you have a license policy regarding the published worksheets.

> > By the way, Ondrej Certik just mentioned he's using Flex to work in a
> > mesh editor:
> >
> http://groups.google.com/group/sage-devel/browse_thread/thread/c26290...
> <http://www.google.com/url?sa=D&q=http://groups.google.com/group/sage-devel/browse_thread/thread/c262901cfafd3f45&usg=AFQjCNH505zaCxBLUuEZrzLwRORSaox3GQ>
>
>
> Yes, Aayush in our group in Reno knows flex, so he started to develop
> the mesh editor in that. Just yesterday I have discovered the graph
> editor and realized that it does exactly what we need.
Honestly, I'd like SAGE not to depend on Flash, if at all possible. With
the awesome javascript libraries now available, and the graph_editor
lightning the way, I think I can produce a good-enough widget, with some
guidance from your team and other users.

>  I have one more question --- does your code produce elements?
>
The output is a list of coordinates, a list of tuples with the indices
of the triangles. That's how the people that taught me used to work.
Then I take it from there to build the elements at plain sight. It's
only for instructional use.

> I was thinking yesterday, that if I take the graph (generated using
> the graph editor), I have vertices (and their coordinates), and then I
> have a set of edges (pairs of vertices, connected by a line). How can
> I convert this to a FE mesh? FE mesh is a set of triangles and quads.
>
In my limited knowledge of FE, I thought a mesh was either a set of
triangles, or a set of quads. I haven't read about mixing both.

> So here is a crude algorithm, that we have in mind:
>
> 1) find some boundary edge
> 2) get neighboring vertices (follow edges) and try to construct a
> triangle, that contains the edge. If success, cut the triangle out
> (add it to the list of triangles) and go to 1)
> 3) try to construct a quad, make sure it is not composed of two
> triangles. If success (e.g. either a quad, or two triangles), cut it
> out (add it to the list of quads or triangles) and go to 1)
>
> Isn't this already implemented in Sage somewhere?
>
Well, I'd rather adapt the code. The graph editor has a lot of stuff
that is only going to confuse the users. In the editor I wrote, there is
no posible way of introducing a graph with crossings. The only possible
way that you can produce a wrong triangulation is that there is a vertex
in the boundary of several triangles, with gaps between the triangles.
To me, the goal is to have a 2D SimplicialComplex such that all faces
are triangles, and every point (of the underlying topological space) has
a neighborhood that is either a ball or a circular sector.

> In any case, your code (which just produces triangles) would also be
> fine, at the beginning.
>
I can add quads, if we decide a good way to add it to the GUI.

Please let me ask you two questions:
 * I added some javascript code I found (from some Joshua Bell) to
compute the Delaunay triangulation. This speeds up the process, as you
only have to drop the points, and hit the "delaunay" button. Then you
can remove some triangles if needed (for example, if you're working with
a non-convex domain). Do you approve of this methodology?
 * Do you think that circular arcs are important to add? It would work
this way: in the initial triangulation, you mark an edge as circular
(with a certain center). In the triangulation, this edge is straight,
but the information that it was circular is used when the mesh is
refined. Otherwise, if you approximate a curve by straight segments, the
approximation will not improve when you refine.

Regards!

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

To unsubscribe from this group, send email to 
sage-devel+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to