Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
Parent class(es)
This class provides a bound constrained solver for a linear variational inequality defined by a matrix A and a vector b. It solves the problem:
Find \(x_l\leq x\leq x_u\) such that \((Ax-b)\cdot (y-x)\geq 0,\; \forall x_l\leq y\leq x_u\)
It is a wrapper for the TAO bound constrained solver.
# Assemble the linear system
A, b = assemble_system(a, L, bc)
# Define the constraints
constraint_u = Constant(1.)
constraint_l = Constant(0.)
u_min = interpolate(constraint_l, V)
u_max = interpolate(constraint_u, V)
# Define the function to store the solution
usol=Function(V)
# Create the TAOLinearBoundSolver
solver=TAOLinearBoundSolver("tao_gpcg","gmres")
# Set some parameters
solver.parameters["monitor_convergence"]=True
solver.parameters["report"]=True
# Solve the problem
solver.solve(A, usol.vector(), b , u_min.vector(), u_max.vector())
info(solver.parameters,True)
Create TAO bound constrained solver
Solve the linear variational inequality defined by A and b with xl =< x <= xu
Solve the linear variational inequality defined by A and b with xl =< x <= xu
Set PETSC Krylov Solver (ksp) used by TAO
Return a list of available Tao solver methods
Return a list of available krylov solvers
Return a list of available preconditioners
Default parameter values