autopdex.solver.solve_nonlinear_minimization
- autopdex.solver.solve_nonlinear_minimization(dofs, settings, static_settings, **kwargs)[source]
Solves a nonlinear minimization problem using specified optimization methods.
This function wraps nonlinear minimization solvers provided by jaxopt to minimize a functional and solve the given problem.
- Parameters:
dofs (jnp.ndarray or dict) – Degrees of freedom or initial guess for the solution.
settings (dict) – Dictionary containing various settings and parameters required for assembling the problem.
static_settings (dict) – Dictionary containing static settings such as solver type, verbose level, and variational schemes.
**kwargs (dict) – Additional keyword arguments passed to the specific solver functions.
- Returns:
The optimized solution obtained from the selected solver.
- Return type:
jnp.ndarray
- Solver Types
‘gradient descent’ : Uses gradient descent for optimization.
‘lbfgs’ : Uses Limited-memory Broyden-Fletcher-Goldfarb-Shanno (LBFGS) algorithm for optimization.
‘bfgs’ : Uses Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm for optimization.
‘nonlinear cg’ : Uses nonlinear conjugate gradient method for optimization.
‘gauss newton’ : Uses Gauss-Newton method for optimization.
‘levenberg marquart’ : Uses Levenberg-Marquardt algorithm for optimization.
Default : If solver name is not set or not available, uses ‘lbfgs’ as the default solver.
Notes
This function should just be called, if the variational scheme involves the definition of a functional that is to be minimized, e.g. ‘least square pde loss’. The modes ‘gauss newton’ and ‘levenberg marquart’ are an exeption, since they utilize the residual.
The function conducts the assembler.integrate_functional and assembler.assemble_residual functions in order to set up suitable optimization functions or residual functions, depending on what the solver needs.
The current implementation does not support nodal imposition of DOFs.