Parameters of the solver

Hello,

I have the same problem as in this post

Looks like I cannot find documentation for solver’s parameters. Browsing documented and undocumented cpp examples is not very informative. The doxygen – generated documentation that can be found in libdolfin-doc does not help. The FEniCS book does not list the parameters.

What is the right way for the users of the C++ interface to learn about the solver’s parameters?

I am using C++ dolfin interface. The dolfin is installed by apt-get in Debian 11. Output of /usr/bin/./dolfin-version is 2019.2.0.dev0.

Thanks!
Kenneth

Having a quick look at the source code:
https://bitbucket.org/fenics-project/dolfin/src/3eacdb46ed4e6dcdcbfb3b2f5eefa73f32e1b8a8/dolfin/adaptivity/AdaptiveNonlinearVariationalSolver.cpp?at=master#lines-54:58
indicates that the parameters for the AdaptiveNonlinearVariationalSolver is the union of:
GenericAdaptiveVariationalSolver::default_parameters() and NonlinearVariationalSolver::default_parameters(),
and to have a look at them, you acn call:

 dict(solver.parameters)

on the solver from Bitbucket
to get:

{'data_label': 'default/adaptivity',
 'error_control': <dolfin.cpp.parameter.Parameters at 0x7f9b5fd720a0>,
 'marking_fraction': 0.5,
 'marking_strategy': 'dorfler',
 'max_dimension': 0,
 'max_iterations': 50,
 'nonlinear_variational_solver': <dolfin.cpp.parameter.Parameters at 0x7f9b5fd72b58>,
 'reference': 0.0,
 'save_data': False}

1 Like