dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #13710
Re: [HG DOLFIN] Some changes for the NewParameters interface
On Sunday 24 May 2009 17:08:59 Anders Logg wrote:
> On Sun, May 24, 2009 at 03:42:21PM +0100, Garth N. Wells wrote:
> > Will it still be possible to use PETSc command-line options?
> >
> > Garth
>
> No, an error is given for any parameter that is not in the parameter
> database.
>
> I suggest we prefix PETSc options with "petsc." and make a special
> treatment of those: not checking that the options are valid and
> stripping them of the "petsc." prefix before sending them to PETSc.
Not sure this will work, as we need to parse the PETSc options before we know
anything about any Parameters, right?
At:
<http://www.boost.org/doc/libs/1_37_0/doc/html/boost/program_options/basic_command_line_parser.html>
I see that we can create a basic_command_line_parser, which we can specify to
allow_unregistered()
This is pretty self explainatory, however we are also allowed to check which
unregistered options that were passed.
In an IFDEF HAS_PETSc we can add all possible options in PETSc (and SLEPc) and
check if the unregistered options are one of these, if not we can throw an
error. Should we keep a global such list so other component can add such
parameters?
Johan
Follow ups
References