Loading [MathJax]/extensions/TeX/newcommand.js
Reference documentation for deal.II version 9.2.0
\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\}}
Main Page
Tutorial
Code gallery
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
u
v
w
z
Typedefs
a
b
c
g
i
l
m
o
p
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
i
m
o
p
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Functions
:
a
b
c
d
f
g
h
i
l
m
o
p
r
s
t
u
v
Related Pages
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
v
z
Variables
a
c
d
f
g
i
l
m
p
q
s
t
u
v
Typedefs
Enumerations
Enumerator
m
u
Macros
a
b
d
e
h
i
m
s
t
dealii.org
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
source
lac
exceptions.cc
Go to the documentation of this file.
1
// ---------------------------------------------------------------------
2
//
3
// Copyright (C) 2016 - 2018 by the deal.II authors
4
//
5
// This file is part of the deal.II library.
6
//
7
// The deal.II library is free software; you can use it, redistribute
8
// it, and/or modify it under the terms of the GNU Lesser General
9
// Public License as published by the Free Software Foundation; either
10
// version 2.1 of the License, or (at your option) any later version.
11
// The full text of the license can be found in the file LICENSE.md at
12
// the top level directory of deal.II.
13
//
14
// ---------------------------------------------------------------------
15
16
#include <
deal.II/base/config.h
>
17
18
#include <
deal.II/lac/exceptions.h
>
19
20
#ifdef DEAL_II_WITH_PETSC
21
# include <petscconf.h>
22
# include <petscsys.h>
23
#endif // DEAL_II_WITH_PETSC
24
25
DEAL_II_NAMESPACE_OPEN
26
27
namespace
LACExceptions
28
{
29
ExcPETScError::ExcPETScError
(
const
int
error_code)
30
: error_code(error_code)
31
{}
32
33
void
34
ExcPETScError::print_info
(std::ostream &out)
const
35
{
36
out <<
"deal.II encountered an error while calling a PETSc function."
37
<< std::endl;
38
#ifdef DEAL_II_WITH_PETSC
39
// PetscErrorMessage changes the value in a pointer to refer to a
40
// statically allocated description of the current error message.
41
const
char
* petsc_message;
42
const
PetscErrorCode ierr = PetscErrorMessage(
error_code
,
43
&petsc_message,
44
/*specific=*/
nullptr
);
45
if
(ierr == 0 && petsc_message !=
nullptr
)
46
{
47
out <<
"The description of the error provided by PETSc is \""
48
<< petsc_message <<
"\"."
<< std::endl;
49
}
50
else
51
{
52
out
53
<<
"PETSc was not able to determine a description for this particular error code."
54
<< std::endl;
55
}
56
#endif // DEAL_II_WITH_PETSC
57
out <<
"The numerical value of the original error code is "
<<
error_code
58
<<
"."
<< std::endl;
59
}
60
}
// namespace LACExceptions
61
62
DEAL_II_NAMESPACE_CLOSE
LACExceptions
Definition:
exceptions.h:25
exceptions.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition:
config.h:358
LACExceptions::ExcPETScError::error_code
const int error_code
Definition:
exceptions.h:64
LACExceptions::ExcPETScError::ExcPETScError
ExcPETScError(const int error_code)
Definition:
exceptions.cc:29
config.h
LACExceptions::ExcPETScError::print_info
virtual void print_info(std::ostream &out) const override
Definition:
exceptions.cc:34
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition:
config.h:359
Generated by
1.8.17