← Back to team overview

dolfin team mailing list archive

Re: convdiff demo

 

On Fri, Jul 22, 2005 at 12:11:02PM -0400, Faheem Mitha wrote:
> 
> Hi Anders,
> 
> I thought you were on vacation. :-)

Yes, but I might answer email occasionally (don't count on it...) :-)

> On Fri, 22 Jul 2005, Anders Logg wrote:
> 
> >I suggest looking at the demo program in src/demo/poisson/. This is a
> >complete self-contained program for solving Poisson's equation with
> >DOLFIN (and FFC). There will be a manual shortly after the summer.
> 
> How is this different from the convdiff demo?

The convdiff demo uses the convdiff module, which adds an extra layer
of complexity. The poisson demo is completely self-contained and
implements everything using the basic tools (mesh, assembler, linear
algebra).

Note that there is also a poisson demo in src/demo/solvers/poisson
that uses the poisson module (this is different from the demo program
in src/demo/poisson).

> We are actually more interested in the convdiff stuff, 'cos it is more 
> closely connected with what we need to do.

ok, then take a look at the code in src/modules/convdiff.

> Just to clarify, when I was asking about simple exercises, I meant things 
> that I could change in the demo that would not be completely trivial, but 
> simple enough that I could do it, that would make it behave
> differently.

You can change the velocity field and the boundary conditions in
src/demo/solvers/convdiff/main.cpp.
 
> BTW, is there some way to see the diffusion in real time?

I don't know what you mean by this. You want to plot the solution at
the same time as it is computed? Then, yes in some sense but you need
to do it yourself. When you implement your solver, you can for example
choose to append the solution in each time step to a file, or you
could create a new file for each time step and have an external
program check for new files and plot as you go along, or you could use
the C system() call to do something like

    system("octave plotsolution.m");

where 'plotsolution.m' is an Octave script that reads the solution
file and plots it. But there is no built-in visualization in DOLFIN,
you have to use an external program for post-processing.

> >DOLFIN does not have a mesh generator (but you can automatically
> >create simple meshes like the unit square and unit cube) so you need
> >to supply DOLFIN with a mesh in the form of an XML file. See the
> >examples in data/meshes/ for the mesh format.
> >
> >The mesh for the dolphin was created with MATLABs PDE toolbox. I have
> >also generated some meshes earlier with GiD. Unfortunately, both are
> >proprietary. Does anyone have experience with generating meshes for
> >DOLFIN using an open-source tool?
> 
> There is something in Debian called gmsh. This is advertised as a 3D mesh 
> generator. Do you know anything about this?

Yes, I have looked at it but only briefly. We could of course add an
interface for gmsh at some point.

/Anders



References