sfepy.solvers.solvers module¶
Base (abstract) solver classes.
- class sfepy.solvers.solvers.EigenvalueSolver(conf, mtx_a=None, mtx_b=None, n_eigs=None, eigenvectors=None, status=None, context=None, **kwargs)[source]¶
Abstract eigenvalue solver class.
- class sfepy.solvers.solvers.LinearSolver(conf, mtx=None, status=None, context=None, **kwargs)[source]¶
Abstract linear solver class.
- class sfepy.solvers.solvers.NonlinearSolver(conf, fun=None, fun_grad=None, lin_solver=None, iter_hook=None, status=None, context=None, **kwargs)[source]¶
Abstract nonlinear solver class.
- class sfepy.solvers.solvers.OptimizationSolver(conf, obj_fun=None, obj_fun_grad=None, status=None, obj_args=None, context=None, **kwargs)[source]¶
Abstract optimization solver class.
- class sfepy.solvers.solvers.QuadraticEVPSolver(conf, mtx_m=None, mtx_d=None, mtx_k=None, n_eigs=None, eigenvectors=None, status=None, context=None, **kwargs)[source]¶
Abstract quadratic eigenvalue problem solver class.
- class sfepy.solvers.solvers.Solver(conf=None, context=None, **kwargs)[source]¶
Base class for all solver kinds. Takes care of processing of common configuration options.
The factory method any_from_conf() can be used to create an instance of any subclass.
The subclasses have to reimplement __init__() and __call__().
All solvers use the following configuration parameters:
- Parameters:
- namestr
The name referred to in problem description options.
- kindstr
The solver kind, as given by the name class attribute of the Solver subclasses.
- report_statusbool (default: False)
If True, the solver can report the solution status.
- verbosebool (default: False)
If True, the solver can print more information about the solution.
- static any_from_conf(conf, **kwargs)¶
Create an instance of a solver class according to the configuration.
- class sfepy.solvers.solvers.SolverMeta(name, bases, ndict)[source]¶
Metaclass for solver classes that automatically adds configuration parameters to the solver class docstring from the
_parameters
class attribute.
- class sfepy.solvers.solvers.TimeStepController(conf, **kwargs)[source]¶
Abstract time step controller class.
- class sfepy.solvers.solvers.TimeSteppingSolver(conf, nls=None, status=None, tsc=None, context=None, **kwargs)[source]¶
Abstract time stepping solver class.
- sfepy.solvers.solvers.use_first_available(solver_list, context=None, **kwargs)[source]¶
Use the first available solver from solver_list.
- Parameters:
- solver_listlist of str or Struct
The list of solver names or configuration objects.
- contextobject, optional
An optional solver context to pass to the solver.
- **kwargskeyword arguments
Additional solver options, see the particular __init__() methods.
- Returns:
- outSolver
The first available solver.