deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+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\}}\)
Loading...
Searching...
No Matches
Namespaces | Classes | Functions

Namespaces

namespace  internal
 
namespace  internals
 
namespace  MatrixIterators
 
namespace  MPI
 

Classes

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

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)
 
PetscErrorCode pc_set_failed_reason (PC pc, PCFailedReason reason)
 
void snes_reset_domain_flags (SNES snes)
 
void snes_set_jacobian_domain_error (SNES snes)
 
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_reset_dm (TS ts)
 
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)
 
bool ts_has_snes (TS ts)
 
void swap (VectorBase &u, VectorBase &v) noexcept
 

Detailed Description

A namespace in which wrapper classes for PETSc objects reside.

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 54 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 71 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 86 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 103 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 45 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 51 of file petsc_compatibility.cc.

◆ pc_set_failed_reason()

PetscErrorCode PETScWrappers::pc_set_failed_reason ( PC  pc,
PCFailedReason  reason 
)

Set the failed reason for the preconditioner.

Definition at line 57 of file petsc_compatibility.cc.

◆ snes_reset_domain_flags()

void PETScWrappers::snes_reset_domain_flags ( SNES  snes)

Resets internal domain error flags in the SNES object.

Definition at line 68 of file petsc_compatibility.cc.

◆ snes_set_jacobian_domain_error()

void PETScWrappers::snes_set_jacobian_domain_error ( SNES  snes)

Resets internal domain error flags in the SNES object.

Definition at line 77 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 89 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 102 of file petsc_compatibility.cc.

◆ ts_reset_dm()

void PETScWrappers::ts_reset_dm ( TS  ts)

Reset DM (no public API).

Definition at line 132 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 121 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 110 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 138 of file petsc_compatibility.cc.

◆ ts_has_snes()

bool PETScWrappers::ts_has_snes ( TS  ts)

Return true if the TS has a SNES object.

Definition at line 150 of file petsc_compatibility.cc.

◆ swap()

void swap ( VectorBase u,
VectorBase v 
)
inlinenoexcept

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 868 of file petsc_vector_base.h.