The finite element method using deal.II - 2021/2022
main.cc
Go to the documentation of this file.
1
#include <
deal.II/base/utilities.h
>
2
3
#include "poisson.h"
4
24
int
25
main
(
int
argc,
char
**argv)
26
{
27
try
28
{
29
using namespace
dealii
;
30
31
Utilities::MPI::MPI_InitFinalize
mpi_initialization(argc, argv, 1);
32
std::string par_name =
""
;
33
if
(argc > 1)
34
par_name = argv[1];
35
36
if
(
Utilities::MPI::this_mpi_process
(MPI_COMM_WORLD) == 0)
37
deallog
.
depth_console
(2);
38
else
39
deallog
.
depth_console
(0);
40
41
Poisson<2>
laplace_problem;
42
laplace_problem.
initialize
(par_name);
43
laplace_problem.
run
();
44
}
45
catch
(std::exception &exc)
46
{
47
std::cerr << std::endl
48
<< std::endl
49
<<
"----------------------------------------------------"
50
<< std::endl;
51
std::cerr <<
"Exception on processing: "
<< std::endl
52
<< exc.what() << std::endl
53
<<
"Aborting!"
<< std::endl
54
<<
"----------------------------------------------------"
55
<< std::endl;
56
57
return
1;
58
}
59
catch
(...)
60
{
61
std::cerr << std::endl
62
<< std::endl
63
<<
"----------------------------------------------------"
64
<< std::endl;
65
std::cerr <<
"Unknown exception!"
<< std::endl
66
<<
"Aborting!"
<< std::endl
67
<<
"----------------------------------------------------"
68
<< std::endl;
69
return
1;
70
}
71
72
return
0;
73
}
dealii
utilities.h
Poisson::initialize
void initialize(const std::string &filename)
Definition:
poisson.cc:53
Poisson::run
void run()
Definition:
poisson.cc:133
deallog
LogStream deallog
LogStream::depth_console
unsigned int depth_console(const unsigned int n)
Utilities::MPI::this_mpi_process
unsigned int this_mpi_process(const MPI_Comm &mpi_communicator)
Poisson
Solve the Poisson problem, with Dirichlet or Neumann boundary conditions, on all geometries that can ...
Definition:
poisson.h:55
main
int main()
Definition:
main.cc:4
Utilities::MPI::MPI_InitFinalize
labs
lab-06
source
main.cc
Generated on Thu Jun 23 2022 07:19:45 for The finite element method using deal.II - 2021/2022 by
1.8.17