Class PETScOptionsDatabase

Nested Relationships

Nested Types

Class Documentation

class PETScOptionsDatabase

PETSc options that belong to one solver.

Options inserted into the global database stay there and reach every later solver whose prefix they carry, such as the diffusion solvers of the other groupsets of a problem, which share one prefix, or the solvers of a later problem with the same name. The options held here are in the global database only while a Scope of this object exists, so the solver creates one around each of its PETSc calls that read options. Objects that PETSc creates inside those calls, such as the blocks of a block Jacobi preconditioner and direct solver packages, read the options too.

Public Functions

PETScOptionsDatabase()
~PETScOptionsDatabase()
PETScOptionsDatabase(const PETScOptionsDatabase&) = delete
PETScOptionsDatabase &operator=(const PETScOptionsDatabase&) = delete
PETScOptionsDatabase(PETScOptionsDatabase&&) = delete
PETScOptionsDatabase &operator=(PETScOptionsDatabase&&) = delete
void Insert(const std::string &options_string)

Inserts options given in the form of a PETSc command line. Later values replace earlier ones.

class Scope

Puts the options of a database into the global database and, when destroyed, restores the values that those options had in the global database before.

The options therefore take precedence over those of PETSC_OPTIONS and the .petscrc files, which apply to every solver. Scopes must be destroyed in the reverse order of their creation.

Public Functions

explicit Scope(const PETScOptionsDatabase &database)
~Scope()
Scope(const Scope&) = delete
Scope &operator=(const Scope&) = delete
Scope(Scope&&) = delete
Scope &operator=(Scope&&) = delete