Loading...
Searching...
No Matches
dolfin::PETScPreconditioner Class Reference

`#include <PETScPreconditioner.h>`

Inheritance diagram for dolfin::PETScPreconditioner:
[legend]
Collaboration diagram for dolfin::PETScPreconditioner:
[legend]

## Public Member Functions

| PETScPreconditioner (std::string type="default")
| Create a particular preconditioner object.
virtual | ~PETScPreconditioner ()
| Destructor.
virtual void | set (PETScKrylovSolver &solver)
| Set the preconditioner type and parameters.
void | set_coordinates (const std::vector< double > &x, std::size_t dim)
std::string | str (bool verbose) const
Public Member Functions inherited from dolfin::PETScObject
| PETScObject ()
| Constructor. Ensures that PETSc has been initialised.
virtual | ~PETScObject ()
| Destructor.
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

## Static Public Member Functions

static void | set_type (PETScKrylovSolver &solver, std::string type)
| Select type by name.
static void | set_fieldsplit (PETScKrylovSolver &solver, const std::vector< std::vector< dolfin::la_index > > &fields, const std::vector< std::string > &split_names)
static std::map< std::string, std::string > | preconditioners ()
| Return a list of available preconditioners.
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.

## Friends

class | PETScSNESSolver
class | PETScTAOSolver

## Additional Inherited Members

Public Attributes inherited from dolfin::Variable
Parameters | parameters
| Parameters.

## Detailed Description

This class is a wrapper for configuring PETSc preconditioners. It does not own a preconditioner. It can take a PETScKrylovSolver and set the preconditioner type and parameters.

## Member Function Documentation

## set_coordinates()

void PETScPreconditioner::set_coordinates | ( | const std::vector< double > & | x,
|  | std::size_t | dim )

Set the coordinates of the operator (matrix) rows and geometric dimension d. This is can be used by required for certain preconditioners, e.g. ML. The input for this function can be generated using GenericDofMap::tabulate_all_dofs.

## set_fieldsplit()

void PETScPreconditioner::set_fieldsplit | ( | PETScKrylovSolver & | solver,
|  | const std::vector< std::vector< dolfin::la_index > > & | fields,
|  | const std::vector< std::string > & | split_names )

static

Assign indices from fields as separate PETSc index sets, with given names

Parameters

  solver |
  fields |
  split_names |

## str()

std::string PETScPreconditioner::str | ( | bool | verbose | ) | const

virtual

Return informal string representation (pretty-print)

Parameters

  verbose |

Reimplemented from dolfin::Variable.

The documentation for this class was generated from the following files:

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/PETScPreconditioner.h
- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/PETScPreconditioner.cpp