deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00:01+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
Modules | Namespaces | Classes | Typedefs | Functions
Collaboration diagram for PETScWrappers:

Modules

 SLEPcWrappers
 

Namespaces

namespace  PETScWrappers
 
namespace  PETScWrappers::MPI
 
namespace  internal
 

Classes

class  PETScWrappers::MPI::BlockSparseMatrix
 
class  PETScWrappers::MPI::BlockVector
 
class  PETScWrappers::FullMatrix
 
class  PETScWrappers::MPI::FullMatrix
 
class  PETScWrappers::MatrixIterators::const_iterator
 
class  PETScWrappers::MatrixBase
 
class  PETScWrappers::MatrixFree
 
class  PETScWrappers::PreconditionBase
 
class  PETScWrappers::PreconditionJacobi
 
class  PETScWrappers::PreconditionBlockJacobi
 
class  PETScWrappers::PreconditionSOR
 
class  PETScWrappers::PreconditionSSOR
 
class  PETScWrappers::PreconditionICC
 
class  PETScWrappers::PreconditionILU
 
class  PETScWrappers::PreconditionLU
 
class  PETScWrappers::PreconditionBoomerAMG
 
class  PETScWrappers::PreconditionParaSails
 
class  PETScWrappers::PreconditionNone
 
class  PETScWrappers::PreconditionBDDC< dim >
 
class  PETScWrappers::NonlinearSolver< VectorType, PMatrixType, AMatrixType >
 
class  PETScWrappers::SolverBase
 
class  PETScWrappers::SolverRichardson
 
class  PETScWrappers::SolverChebychev
 
class  PETScWrappers::SolverCG
 
class  PETScWrappers::SolverBiCG
 
class  PETScWrappers::SolverGMRES
 
class  PETScWrappers::SolverBicgstab
 
class  PETScWrappers::SolverCGS
 
class  PETScWrappers::SolverTFQMR
 
class  PETScWrappers::SolverTCQMR
 
class  PETScWrappers::SolverCR
 
class  PETScWrappers::SolverLSQR
 
class  PETScWrappers::SolverPreOnly
 
class  PETScWrappers::SparseDirectMUMPS
 
class  PETScWrappers::SparseMatrix
 
class  PETScWrappers::MPI::SparseMatrix
 
class  PETScWrappers::TimeStepper< VectorType, PMatrixType, AMatrixType >
 
class  PETScWrappers::MPI::Vector
 
class  PETScWrappers::VectorBase
 

Typedefs

using PETScWrappers::FullMatrix::size_type = types::global_dof_index
 
using PETScWrappers::MPI::FullMatrix::size_type = types::global_dof_index
 

Functions

 PETScWrappers::FullMatrix::FullMatrix ()
 
 PETScWrappers::FullMatrix::FullMatrix (const size_type m, const size_type n)
 
void PETScWrappers::FullMatrix::reinit (const size_type m, const size_type n)
 
FullMatrix & PETScWrappers::FullMatrix::operator= (const value_type d)
 
void PETScWrappers::FullMatrix::do_reinit (const size_type m, const size_type n)
 
 PETScWrappers::MPI::FullMatrix::FullMatrix ()
 
 PETScWrappers::MPI::FullMatrix::FullMatrix (const MPI_Comm communicator, const size_type m, const size_type n, const size_type local_rows_per_process, const size_type local_columns_per_process)
 
 PETScWrappers::MPI::FullMatrix::FullMatrix (const Mat &)
 
 PETScWrappers::MPI::FullMatrix::~FullMatrix () override
 
FullMatrix & PETScWrappers::MPI::FullMatrix::operator= (const value_type d)
 
void PETScWrappers::MPI::FullMatrix::reinit (const MPI_Comm communicator, const size_type m, const size_type n, const size_type local_rows_per_process, const size_type local_columns_per_process)
 
 PETScWrappers::NonlinearSolverData::NonlinearSolverData (const std::string &options_prefix="", const std::string &snes_type="", const std::string &snes_linesearch_type="", const real_type absolute_tolerance=0, const real_type relative_tolerance=0, const real_type step_tolerance=0, const int maximum_non_linear_iterations=-1, const int max_n_function_evaluations=-1)
 
 PETScWrappers::TimeStepperData::TimeStepperData (const std::string &options_prefix="", const std::string &ts_type="", const real_type initial_time=0.0, const real_type final_time=0.0, const real_type initial_step_size=0.0, const int max_steps=-1, const bool match_step=false, const bool restart_if_remesh=false, const std::string &ts_adapt_type="none", const real_type minimum_step_size=-1.0, const real_type maximum_step_size=-1.0, const real_type absolute_tolerance=-1.0, const real_type relative_tolerance=-1.0, const bool ignore_algebraic_lte=true)
 

Detailed Description

The classes in this group are wrappers around functionality provided by the PETSc library. They provide a modern object-oriented interface that is compatible with the interfaces of the other linear algebra classes in deal.II. All classes and functions in this group reside in a namespace PETScWrappers.

These classes are only available if a PETSc installation was detected during configuration of deal.II. Refer to the README file for more details about this.

Typedef Documentation

◆ size_type [1/2]

Declare type for container size.

Definition at line 53 of file petsc_full_matrix.h.

◆ size_type [2/2]

Declare type for container size.

Definition at line 113 of file petsc_full_matrix.h.

Function Documentation

◆ FullMatrix() [1/5]

FullMatrix< number >::FullMatrix ( )

Default constructor. Create an empty matrix.

Definition at line 29 of file petsc_full_matrix.cc.

◆ FullMatrix() [2/5]

FullMatrix< number >::FullMatrix ( const size_type  m,
const size_type  n 
)

Create a full matrix of dimensions m times n.

Definition at line 35 of file petsc_full_matrix.cc.

◆ reinit() [1/2]

void FullMatrix< number >::reinit ( const size_type  m,
const size_type  n 
)

Throw away the present matrix and generate one that has the same properties as if it were created by the constructor of this class with the same argument list as the present function.

Definition at line 41 of file petsc_full_matrix.cc.

◆ operator=() [1/2]

FullMatrix & PETScWrappers::FullMatrix::operator= ( const value_type  d)

This operator assigns a scalar to a matrix. Since this does usually not make much sense (should we set all matrix entries to this value?), this operation is only allowed if the actual value to be assigned is zero. This operator only exists to allow for the obvious notation matrix=0, which sets all elements of the matrix to zero.

◆ do_reinit()

void FullMatrix< number >::do_reinit ( const size_type  m,
const size_type  n 
)
private

Do the actual work for the respective reinit() function and the matching constructor, i.e. create a matrix. Getting rid of the previous matrix is left to the caller.

Definition at line 52 of file petsc_full_matrix.cc.

◆ FullMatrix() [3/5]

FullMatrix< number >::FullMatrix ( )

Default constructor. Create an empty matrix.

Definition at line 34 of file petsc_parallel_full_matrix.cc.

◆ FullMatrix() [4/5]

FullMatrix< number >::FullMatrix ( const MPI_Comm  communicator,
const size_type  m,
const size_type  n,
const size_type  local_rows_per_process,
const size_type  local_columns_per_process 
)

Definition at line 61 of file petsc_parallel_full_matrix.cc.

◆ FullMatrix() [5/5]

FullMatrix< number >::FullMatrix ( const Mat &  A)
explicit

Initialize a FullMatrix from a PETSc Mat object. Note that we do not copy the matrix. The Mat object is referenced by the newly created instance of the class using PetscObjectReference. This is in line with the PETSc approach to object ownership, which mimics std::shared_ptr.

Definition at line 47 of file petsc_parallel_full_matrix.cc.

◆ ~FullMatrix()

FullMatrix< number >::~FullMatrix ( )
override

Destructor to free the PETSc object.

Definition at line 53 of file petsc_parallel_full_matrix.cc.

◆ operator=() [2/2]

FullMatrix & FullMatrix< number >::operator= ( const value_type  d)

This operator assigns a scalar to a matrix. Since this does usually not make much sense (should we set all matrix entries to this value?), this operation is only allowed if the actual value to be assigned is zero. This operator only exists to allow for the obvious notation matrix=0, which sets all elements of the matrix to zero.

Definition at line 62 of file petsc_full_matrix.cc.

◆ reinit() [2/2]

void FullMatrix< number >::reinit ( const MPI_Comm  communicator,
const size_type  m,
const size_type  n,
const size_type  local_rows_per_process,
const size_type  local_columns_per_process 
)

Definition at line 74 of file petsc_parallel_full_matrix.cc.

◆ NonlinearSolverData()

PETScWrappers::NonlinearSolverData::NonlinearSolverData ( const std::string &  options_prefix = "",
const std::string &  snes_type = "",
const std::string &  snes_linesearch_type = "",
const real_type  absolute_tolerance = 0,
const real_type  relative_tolerance = 0,
const real_type  step_tolerance = 0,
const int  maximum_non_linear_iterations = -1,
const int  max_n_function_evaluations = -1 
)
inline

Initialization parameters for NonlinearSolverData.

Running parameters:

Parameters
options_prefixThe string indicating the options prefix for command line customization.
snes_typeThe string indicating the PETSc SNES solver type.
snes_linesearch_typeThe string indicating the PETSc linesearch type.
absolute_toleranceAbsolute error tolerance.
relative_toleranceRelative error tolerance.
step_toleranceStep tolerance.
maximum_non_linear_iterationsMaximum number of iterations allowed.
max_n_function_evaluationsMaximum number of function evaluations allowed.
Note
All parameters values specified here can be overridden by command line choices.

Definition at line 74 of file petsc_snes.h.

◆ TimeStepperData()

PETScWrappers::TimeStepperData::TimeStepperData ( const std::string &  options_prefix = "",
const std::string &  ts_type = "",
const real_type  initial_time = 0.0,
const real_type  final_time = 0.0,
const real_type  initial_step_size = 0.0,
const int  max_steps = -1,
const bool  match_step = false,
const bool  restart_if_remesh = false,
const std::string &  ts_adapt_type = "none",
const real_type  minimum_step_size = -1.0,
const real_type  maximum_step_size = -1.0,
const real_type  absolute_tolerance = -1.0,
const real_type  relative_tolerance = -1.0,
const bool  ignore_algebraic_lte = true 
)
inline

Initialization parameters for TimeStepper.

Running parameters:

Parameters
options_prefixThe string indicating the options prefix for command line customization.
ts_typeThe string indicating the PETSc solver type.
initial_timeInitial simulation time.
final_timeFinal simulation time.
initial_step_sizeInitial step size.
max_stepsMaximum number of steps allowed.
match_stepWhether or not to exactly stop at final time or step over it.
restart_if_remeshWhether or not to restart the step when remeshing is flagged.

Error parameters:

Parameters
ts_adapt_typeThe string indicating the PETSc time step adaptor type.
minimum_step_sizeMinimum step size allowed.
maximum_step_sizeMaximum step size allowed.
absolute_toleranceAbsolute error tolerance.
relative_toleranceRelative error tolerance.
ignore_algebraic_lteIgnore algebraic terms for error computations

Note that one between final_time or max_steps must be specified by the user, otherwise PETSc will complain. Adaptive time stepping is disabled by default. Negative values indicate using PETSc's default.

Note
All parameters values specified here can be overridden by command line choices.

Definition at line 89 of file petsc_ts.h.