← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] merge

 

On Mon, May 11, 2009 at 09:22:06PM +0200, DOLFIN wrote:

> changeset:   6129:39f71fcf24ab35936d92fe66fa9867b092cd5c65
> parent:      6126:a0ffbce6e1d3a24085c51f5e31ff5e0ad691f2e8
> user:        Anders Logg <logg@xxxxxxxxx>
> date:        Mon May 11 21:21:42 2009 +0200
> files:       dolfin/common/Variable.cpp dolfin/common/Variable.h dolfin/la/KrylovSolver.h dolfin/log/log.cpp dolfin/log/log.h dolfin/ode/ODE.cpp dolfin/ode/ODE.h dolfin/parameter/NewParameter.cpp dolfin/parameter/NewParameter.h dolfin/parameter/NewParameters.cpp dolfin/parameter/NewParameters.h dolfin/parameter/Parametrized.cpp dolfin/parameter/Parametrized.h dolfin/parameter/dolfin_parameter.h sandbox/misc/cpp/main.cpp
> description:
> Add default_parameters() and parameters to Variable base class.
> Added default parameters to KrylovSolver class.

Most things should now be in place for the new parameter system.
Please have a look if you're interested. The plan is to use this
for the next release.

The Variable base class now has a method default_parameters() which
may be overloaded to return the default parameters for a class. The
Variable base class also has a member named parameters that can be
used for storing variables.

  KrylovSolver solver;
  solver.parameters("relative tolerance") = 1e-20;
  solver.parameters.parse(argc, argv);
  info(solver.parameters);

Where should the default values be specified? As it is now, they will
be specified in the default_parameters() method of each class. This is
different from before where parameters were specified in a common file
DefaultParameters.h. Is this ok, or is there a reason for storing the
default values in a central place?

Parameters are mostly used in the Krylov solvers, the Newton solver
and the ODE solvers. I can try moving the ODE solvers to the new
parameter system. It would be helpful if someone else could have a
look at the solvers.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References