← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Move implementation of some default_parameters functions to .cpp files.

 



Anders Logg wrote:
On Wed, Jul 08, 2009 at 01:36:51AM +0200, 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:   6445:98b0bd7af851ce137e409dbca52a45966c472d85
tag:         tip
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Wed Jul 08 00:36:27 2009 +0100
files:       dolfin/fem/VariationalProblem.h dolfin/la/KrylovSolver.h dolfin/la/LinearSolver.h dolfin/la/PETScKrylovSolver.cpp dolfin/la/PETScKrylovSolver.h dolfin/la/UmfpackLUSolver.cpp dolfin/la/UmfpackLUSolver.h dolfin/la/uBLASKrylovSolver.cpp dolfin/la/uBLASKrylovSolver.h dolfin/parameter/Parameter.cpp dolfin/parameter/Parameter.h dolfin/parameter/Parameters.cpp dolfin/parameter/Parameters.h
description:
Move implementation of some default_parameters functions to .cpp files.

This avoids nasty dependencies and lenthy recompilation.

I originally wanted the parameters to be defined in the header files
to make it simple to see which parameters were available by
inspection, but perhaps it's enough to check parameters by

  info(foo.parameters);


I put the function at the top of the .cpp file to help with this.

I couldn't resolve circular dependencies with the some of the header files (e.g. KrylovSolver and PETScKrylovSolver) when the implementation was in the header file. Also, the code would compile, but then small changes in one header file would lead to errors elsewhere which I couldn't follow.

Perhaps we should add a note of this to the header file (class
documentation) of every class that offers parameters. Some standard
text we can reuse:


Ultimately the parameters should go in the manual/documentation :). I don't read the PETSc code to find the parameters. I look at the documentation.

Garth

/// The behavior of this class may be controlled by a set of
/// parameters. The parameters may be listed by either
///
///   info(VariationalProblem::default_parameters());
///
/// or
///
///   info(variational_problem.parameters);
///
/// Only the latter option is available from the DOLFIN Python interface.



------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




References