← Back to team overview

dolfin team mailing list archive

Re: Plotting from dolfin in C++

 

On Wed, Dec 17, 2008 at 06:08:14PM +0100, Johan Hake wrote:
> On Wednesday 17 December 2008 17:54:23 Martin Sandve Alnæs wrote:
> > On Wed, Dec 17, 2008 at 5:42 PM, Johan Hake <hake@xxxxxxxxx> wrote:
> > > On Wednesday 17 December 2008 16:34:16 Anders Logg wrote:
> > >> On Wed, Dec 17, 2008 at 01:58:35PM +0100, Martin Sandve Alnæs wrote:
> > >> > Using latest hg versions of everything, I'm trying to plot a Function
> > >> > from C++ based on a SFC-generated function space and I get:
> > >> >
> > >> > Failed to read DOLFIN mesh or function XML file for plotting:
> > >> >   *** Error: Unable to find dof map in library:
> > >> > "FiniteElement('Lagrange', 'triangle', 1)".
> > >> > Unable to plot (DOLFIN Python module or Viper plotter not available).
> > >> >
> > >> > Can I suggest using Function::interpolate to make a .vtu file to plot
> > >> > instead of relying on a form compiler specific precompiled element
> > >> > library?
> > >> >
> > >> > Martin
> > >>
> > >> Sounds like a good idea. We now generate Python script that loads the
> > >> Function (or Mesh) from file and then calls Viper from Python.
> > >>
> > >> Does Viper support direct plotting of .vtu files? In that case, we
> > >> would not need to call Python from C++. We could generate a .vtu file
> > >> and then call Viper with that file (using system()).
> > >>
> > >> I don't have time to fix this now, so either find someone to fix it or
> > >> put it on the TODO list.
> >
> > What is in use, the text file or bugzilla?
> >
> > > We could also plot a cpp.Function instead of a dolfin.Function. That fix
> > > would not be so extensive. I had a brief look at it but couldn't find out
> > > where
> > >
> > >   Function(filename)
> > >
> > > was called.
> > >
> > > Johan
> >
> > I also want to write a Function to file in C++.
> > What are the requirements on the FunctionSpace
> > to be able to do that?
> 
> I think that the only requirement is that the element should be defined in 
> 
>   dolfin/elements/elements.py

That should only be required for reading.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References