Reference documentation for deal.II version GIT 112f7bbc69 2023-05-28 21:25:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Namespaces | Classes | Typedefs | Functions
PETScWrappers Namespace Reference

Namespaces

 internal
 
 internals
 
 MatrixIterators
 
 MPI
 

Classes

class  CommunicationPattern
 
class  Partitioner
 
class  FullMatrix
 
class  MatrixBase
 
class  MatrixFree
 
class  PreconditionBase
 
class  PreconditionJacobi
 
class  PreconditionBlockJacobi
 
class  PreconditionSOR
 
class  PreconditionSSOR
 
class  PreconditionICC
 
class  PreconditionILU
 
class  PreconditionLU
 
class  PreconditionBoomerAMG
 
class  PreconditionParaSails
 
class  PreconditionNone
 
class  PreconditionBDDC
 
class  PreconditionShell
 
class  NonlinearSolverData
 
class  NonlinearSolver
 
class  SolverBase
 
class  SolverRichardson
 
class  SolverChebychev
 
class  SolverCG
 
class  SolverBiCG
 
class  SolverGMRES
 
class  SolverBicgstab
 
class  SolverCGS
 
class  SolverTFQMR
 
class  SolverTCQMR
 
class  SolverCR
 
class  SolverLSQR
 
class  SolverPreOnly
 
class  SparseDirectMUMPS
 
class  SparseMatrix
 
class  TimeStepperData
 
class  VectorBase
 

Typedefs

using PreconditionerBase = PreconditionBase
 

Functions

void set_option_value (const std::string &name, const std::string &value)
 
void set_matrix_option (Mat &matrix, const MatOption option_name, const PetscBool option_value=PETSC_FALSE)
 
void close_matrix (Mat &matrix)
 
void set_keep_zero_rows (Mat &matrix)
 
void petsc_increment_state_counter (Vec v)
 
void petsc_increment_state_counter (Mat A)
 
void set_use_matrix_free (SNES snes, const bool mf_operator, const bool mf)
 
void set_use_matrix_free (TS ts, const bool mf_operator, const bool mf)
 
void ts_set_max_time (TS ts, const PetscReal maxtime)
 
void ts_set_max_steps (TS ts, const PetscInt maxsteps)
 
unsigned int ts_get_step_number (TS ts)
 
template<typename VectorType = PETScWrappers::VectorBase, typename PMatrixType = PETScWrappers::MatrixBase, typename AMatrixType = PMatrixType>
 DEAL_II_CXX20_REQUIRES ((concepts::is_dealii_petsc_vector_type< VectorType >||std::constructible_from< VectorType, Vec >)) class TimeStepper
 
void swap (VectorBase &u, VectorBase &v)
 

Detailed Description

A namespace in which wrapper classes for PETSc objects reside.

Typedef Documentation

◆ PreconditionerBase

Alias for backwards-compatibility.

Deprecated:
Use PETScWrappers::PreconditionBase instead.

Definition at line 1145 of file petsc_precondition.h.

Function Documentation

◆ set_option_value()

void PETScWrappers::set_option_value ( const std::string &  name,
const std::string &  value 
)
inline

Set an option in the global PETSc database. This function just wraps PetscOptionsSetValue and checks the error return value.

Definition at line 47 of file petsc_compatibility.h.

◆ set_matrix_option()

void PETScWrappers::set_matrix_option ( Mat &  matrix,
const MatOption  option_name,
const PetscBool  option_value = PETSC_FALSE 
)
inline

Set a PETSc matrix option. This function wraps MatSetOption with a version check.

Warning
The argument option_value is ignored in versions of PETSc before 3.0.0 since the corresponding function did not take this argument.

Definition at line 64 of file petsc_compatibility.h.

◆ close_matrix()

void PETScWrappers::close_matrix ( Mat &  matrix)
inline

Tell PETSc that we are not planning on adding new entries to the matrix. Generate errors in debug mode.

Definition at line 79 of file petsc_compatibility.h.

◆ set_keep_zero_rows()

void PETScWrappers::set_keep_zero_rows ( Mat &  matrix)
inline

Tell PETSc to keep the SparsityPattern entries even if we delete a row with clear_rows() which calls MatZeroRows(). Otherwise one can not write into that row afterwards.

Definition at line 96 of file petsc_compatibility.h.

◆ petsc_increment_state_counter() [1/2]

void PETScWrappers::petsc_increment_state_counter ( Vec  v)

Tell PETSc that the status of the vector has changed.

Definition at line 48 of file petsc_compatibility.cc.

◆ petsc_increment_state_counter() [2/2]

void PETScWrappers::petsc_increment_state_counter ( Mat  A)

Tell PETSc that the status of the matrix has changed.

Definition at line 54 of file petsc_compatibility.cc.

◆ set_use_matrix_free() [1/2]

void PETScWrappers::set_use_matrix_free ( SNES  snes,
const bool  mf_operator,
const bool  mf 
)

Tell PETSc nonlinear solver to use matrix free finite differencing (MFFD).

mf_operator indicates to use MFFD for the linear system matrix but use a user defined matrix for preconditioning purposed.

mf indicates to use MFFD for the both the linear system matrix and the preconditioning matrix.

Definition at line 60 of file petsc_compatibility.cc.

◆ set_use_matrix_free() [2/2]

void PETScWrappers::set_use_matrix_free ( TS  ts,
const bool  mf_operator,
const bool  mf 
)

Tell PETSc ODE solver to use matrix free finite differencing (MFFD).

mf_operator indicates to use MFFD for the linear system matrix but use a user defined matrix for preconditioning purposed.

mf indicates to use MFFD for the both the linear system matrix and the preconditioning matrix.

Definition at line 73 of file petsc_compatibility.cc.

◆ ts_set_max_time()

void PETScWrappers::ts_set_max_time ( TS  ts,
const PetscReal  maxtime 
)

Set final time for ODE integration.

Definition at line 92 of file petsc_compatibility.cc.

◆ ts_set_max_steps()

void PETScWrappers::ts_set_max_steps ( TS  ts,
const PetscInt  maxsteps 
)

Set maximum number of steps for ODE integration.

Definition at line 81 of file petsc_compatibility.cc.

◆ ts_get_step_number()

unsigned int PETScWrappers::ts_get_step_number ( TS  ts)

Return current step number.

Definition at line 103 of file petsc_compatibility.cc.

◆ swap()

void swap ( VectorBase u,
VectorBase v 
)
inline

Global function swap which overloads the default implementation of the C++ standard library which uses a temporary object. The function simply exchanges the data of the two vectors.

Definition at line 872 of file petsc_vector_base.h.