← Back to team overview

dolfin team mailing list archive

Re: uBLASKrylovMatrix and Python callbacks: now the fun begins

 

On Tue, Apr 14, 2009 at 4:18 AM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>
>
> Robert Kirby wrote:
>> I didn't see it as a sub of cpp.  thanks for pointing that out.  no_prec
>> is a better name
>> given what "None" means in python.
>>
>
> I find the enums is C++ clumsy, so is there a disadvantage in just using
> strings for setting solvers, preconditioners, etc?
>
> Garth

The advantage of enums over strings is that the compiler checks
correctness for you, so misspellings won't occur. Editors can detect
and show possible values of an enum. But as long as strings are used
all over the place, having enums only a few places doesn't really add
anything. Strings are of course easier to read and write to files.

Martin


References