dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #15153
Re: [HG DOLFIN] Handle real-valued parameters in Python-interface (conversion to float).
On Sunday 06 September 2009 20:54:13 Anders Logg wrote:
> On Sun, Sep 06, 2009 at 07:20:59PM +0200, Johan Hake wrote:
> > On Sunday 06 September 2009 18:11:31 DOLFIN wrote:
> > > One or more new changesets pushed to the primary dolfin repository.
> > > A short summary of the last three changesets is included below.
> > >
> > > changeset: 6952:a2283cc4b1f34624c6db78d3eb435f3eb531deaf
> > > tag: tip
> > > user: Anders Logg <logg@xxxxxxxxx>
> > > date: Sun Sep 06 18:11:23 2009 +0200
> > > files: dolfin/swig/parameter_post.i
> > > description:
> > > Handle real-valued parameters in Python-interface (conversion to
> > > float).
> >
> > From code:
> >
> > # FIXME: Is it possible to convert real to some high-precision Python
> > type? print "Warning: Converting real-valued parameter to double, might
> > looseprecision."
> >
> > There are high-precision algebra libraries for Python. One called
> > decimal, and is part of 2.4. However we need access to the c-api to write
> > typemaps. I haven't found any documentation (yet) for this.
> >
> > If anybody have other ideas for a solution please share!
>
> I don't think it's important enough for us to start thinking about
> adding new dependencies. It's probably enough with a warning for now.
Agree!
johan
> --
> Anders
>
> > Johan
> >
> > > changeset: 6951:b552e55f706da220bc3b205976f08e34f1c9a547
> > > user: Anders Logg <logg@xxxxxxxxx>
> > > date: Sun Sep 06 11:57:03 2009 +0200
> > > files: demo/parameters/cpp/main.cpp
> > > dolfin/fem/VariationalProblem.cpp dolfin/parameter/GlobalParameters.cpp
> > > dolfin/parameter/Parameters.cpp description:
> > > Automatically read parameters from the following files in increasing
> > > order of priority:
> > >
> > > $HOME/.dolfin/parameters.xml.gz
> > > $HOME/.dolfin/parameters.xml
> > > parameters.xml.gz
> > > parameters.xml
> > >
> > > The global parameter set will be *updated* with values found in
> > > these parameter sets.
> > >
> > > Not sure how the first two files work on a Windows system.
> > >
> > >
> > > changeset: 6950:e685bced17258c83ec9c55badc4ce3adf991c1d8
> > > user: Anders Logg <logg@xxxxxxxxx>
> > > date: Sat Sep 05 23:40:39 2009 +0200
> > > files: ChangeLog demo/parameters/cpp/main.cpp
> > > dolfin/main/SubSystemsManager.cpp dolfin/main/SubSystemsManager.h
> > > dolfin/parameter/GlobalParameters.cpp
> > > dolfin/parameter/GlobalParameters.h dolfin/parameter/Parameters.cpp
> > > dolfin/parameter/Parameters.h description: Filter out PETSc argument
> > > when parsing command-line parameters. The following should now work:
> > >
> > > ./demo <other options> --petsc.foo bar <other options>
> > >
> > > provided the program in question parses command-line arguments by
> > >
> > > parameters.parse(argc, argv).
> > >
> > > All arguments starting with "--petsc." will be sent to PETSc. In the
> > > above example,
> > >
> > > -foo bar
> > >
> > > will be sent to PETSc. (Note '-' instead of '--'.)
> > >
> > > Other arguments will be parsed by the parameter set in question.
> > >
> > > This only happens for the global DOLFIN parameter set (or any other
> > > parameter set named "dolfin").
> > >
> > > ----------------------------------------------------------------------
> > > For more details, visit http://www.fenics.org/hg/dolfin
> > > _______________________________________________
> > > DOLFIN-dev mailing list
> > > DOLFIN-dev@xxxxxxxxxx
> > > http://www.fenics.org/mailman/listinfo/dolfin-dev
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
>
References