DOLFIN
DOLFIN C++ interface
|
#include <TAOLinearBoundSolver.h>
Public Member Functions | |
TAOLinearBoundSolver (MPI_Comm comm) | |
Create TAO bound constrained solver. | |
TAOLinearBoundSolver (const std::string method="default", const std::string ksp_type="default", const std::string pc_type="default") | |
Create TAO bound constrained solver. | |
~TAOLinearBoundSolver () | |
Destructor. | |
std::size_t | solve (const GenericMatrix &A, GenericVector &x, const GenericVector &b, const GenericVector &xl, const GenericVector &xu) |
std::size_t | solve (const PETScMatrix &A, PETScVector &x, const PETScVector &b, const PETScVector &xl, const PETScVector &xu) |
void | set_solver (const std::string &) |
Set the TAO solver type. | |
void | set_ksp (const std::string ksp_type="default") |
Set PETSC Krylov Solver (ksp) used by TAO. | |
Tao | tao () const |
Return TAO solver pointer. | |
std::shared_ptr< const PETScMatrix > | get_matrix () const |
Return Matrix shared pointer. | |
std::shared_ptr< const PETScVector > | get_vector () const |
Return load vector shared pointer. | |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
virtual std::string | str (bool verbose) const |
Return informal string representation (pretty-print) | |
Public Member Functions inherited from dolfin::PETScObject | |
PETScObject () | |
Constructor. Ensures that PETSc has been initialised. | |
virtual | ~PETScObject () |
Destructor. | |
Static Public Member Functions | |
static std::map< std::string, std::string > | methods () |
Return a list of available Tao solver methods. | |
static std::map< std::string, std::string > | krylov_solvers () |
Return a list of available krylov solvers. | |
static std::map< std::string, std::string > | preconditioners () |
Return a list of available preconditioners. | |
static Parameters | default_parameters () |
Default parameter values. | |
Static Public Member Functions inherited from dolfin::PETScObject | |
static void | petsc_error (int error_code, std::string filename, std::string petsc_function) |
Print error message for PETSc calls that return an error. | |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
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 :math:x_l\leq x\leq x_u
such that :math:(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.
std::size_t TAOLinearBoundSolver::solve | ( | const GenericMatrix & | A, |
GenericVector & | x, | ||
const GenericVector & | b, | ||
const GenericVector & | xl, | ||
const GenericVector & | xu | ||
) |
Solve the linear variational inequality defined by A and b with xl =< x <= xu
std::size_t TAOLinearBoundSolver::solve | ( | const PETScMatrix & | A, |
PETScVector & | x, | ||
const PETScVector & | b, | ||
const PETScVector & | xl, | ||
const PETScVector & | xu | ||
) |
Solve the linear variational inequality defined by A and b with xl =< x <= xu