← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Some enum -> std::string for la norms.

 

On Wednesday 06 May 2009 14:07:11 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:   6098:4b3c43f72124bd0be03b6eaa0d7d2dd1f7b03d65
> tag:         tip
> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> date:        Wed May 06 13:06:55 2009 +0100
> files:       dolfin/la/BlockVector.cpp dolfin/la/BlockVector.h
> dolfin/la/EpetraVector.cpp dolfin/la/EpetraVector.h
> dolfin/la/GenericVector.h dolfin/la/MTL4Vector.cpp dolfin/la/MTL4Vector.h
> dolfin/la/PETScLUSolver.cpp dolfin/la/PETScMatrix.cpp
> dolfin/la/PETScMatrix.h dolfin/la/PETScVector.cpp dolfin/la/PETScVector.h
> dolfin/la/Vector.h dolfin/la/enums_la.h dolfin/la/solve.cpp
> dolfin/la/uBLASVector.cpp dolfin/la/uBLASVector.h
> dolfin/nls/NewtonSolver.cpp dolfin/ode/MonoAdaptiveNewtonSolver.cpp
> dolfin/ode/MultiAdaptiveNewtonSolver.cpp site-packages/dolfin/__init__.py
> site-packages/dolfin/errornorm.py description:
> Some enum -> std::string for la norms.

The nice thing with enums was that I could easily get hold of the possible 
values. I just took a look in enum_la.h. Now I have to look into the 
different .cpp files and scan the 'if' statements. 

Could we predefine some variables for this purpose? Something like this for 
preconditioners:

  std::string no_prec("no_prec");  // Instead of "none" due to PyDOLFIN?
  std::string jacobi("jacobi"); 
  std::string sor("sor");
  std::string ilu("ilu");
  std::string icc("icc");
  std::string amg_hypre("amg_hypre");
  std::string amg_ml("amg_ml");
  std::string default("default");

If I misspell the string I will not get an error but rather the default 
version. Predefined variables will help for this.

I parameter system with "allowed" values would ofcourse solve this.


Johan


> changeset:   6097:d05dd72709198e021212959f62dc171520504b3f
> user:        Johannes Ring <johannr@xxxxxxxxx>
> date:        Wed May 06 10:04:27 2009 +0200
> files:       SConstruct dolfin/SConscript
> description:
> Enable using help (scons -h) without configuring.
>
>
> changeset:   6096:0466e894d46f3b6034fd2e83af46afa9da83421c
> user:        "Ola Skavhaug <skavhaug@xxxxxxxxx>"
> date:        Tue May 05 14:59:42 2009 +0200
> files:       dolfin/mesh/MeshPartitioning.cpp
> description:
> Use const_iterator where appropriate.
>
> ----------------------------------------------------------------------
> 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




Follow ups

References