The finite element method using deal.II - 2021/2022
poisson.h
Go to the documentation of this file.
1
/* ---------------------------------------------------------------------
2
*
3
* Copyright (C) 1999 - 2020 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
* Authors: Wolfgang Bangerth, 1999,
17
* Guido Kanschat, 2011
18
* Luca Heltai, 2021
19
*/
20
21
// Make sure we don't redefine things
22
#ifndef poisson_include_file
23
#define poisson_include_file
24
25
#include <
deal.II/base/function.h
>
26
#include <
deal.II/base/quadrature_lib.h
>
27
28
#include <
deal.II/dofs/dof_handler.h
>
29
#include <
deal.II/dofs/dof_tools.h
>
30
31
#include <
deal.II/fe/fe_q.h
>
32
#include <
deal.II/fe/fe_values.h
>
33
34
#include <
deal.II/grid/grid_generator.h
>
35
#include <
deal.II/grid/tria.h
>
36
37
#include <
deal.II/lac/dynamic_sparsity_pattern.h
>
38
#include <
deal.II/lac/full_matrix.h
>
39
#include <
deal.II/lac/precondition.h
>
40
#include <
deal.II/lac/solver_cg.h
>
41
#include <
deal.II/lac/sparse_matrix.h
>
42
#include <
deal.II/lac/vector.h
>
43
44
#include <
deal.II/numerics/data_out.h
>
45
#include <
deal.II/numerics/matrix_tools.h
>
46
#include <
deal.II/numerics/vector_tools.h
>
47
48
#include <fstream>
49
#include <iostream>
50
51
// Forward declare the tester class
52
class
PoissonTester
;
53
54
using namespace
dealii
;
55
class
Poisson
56
{
57
public
:
58
Poisson
();
59
void
60
run
();
61
62
protected
:
63
void
64
make_grid
();
65
void
66
setup_system();
67
void
68
assemble_system();
69
void
70
solve();
71
void
72
output_results()
const
;
73
74
Triangulation<2>
triangulation
;
75
FE_Q<2>
fe
;
76
DoFHandler<2>
dof_handler
;
77
SparsityPattern
sparsity_pattern
;
78
SparseMatrix<double>
system_matrix
;
79
Vector<double>
solution
;
80
Vector<double>
system_rhs
;
81
82
friend
class
PoissonTester
;
83
};
84
85
#endif
dynamic_sparsity_pattern.h
Poisson::dof_handler
DoFHandler< 2 > dof_handler
Definition:
poisson.h:76
FE_Q< 2 >
dealii
grid_generator.h
Triangulation< 2 >
Poisson::system_matrix
SparseMatrix< double > system_matrix
Definition:
poisson.h:78
Poisson::sparsity_pattern
SparsityPattern sparsity_pattern
Definition:
poisson.h:77
SparseMatrix< double >
Poisson::system_rhs
Vector< double > system_rhs
Definition:
poisson.h:80
Poisson::fe
FE_Q< 2 > fe
Definition:
poisson.h:75
matrix_tools.h
DoFHandler< 2 >
fe_values.h
function.h
sparse_matrix.h
vector_tools.h
tria.h
run
virtual void run(ParameterHandler &prm)=0
SparsityPattern
data_out.h
make_grid
void make_grid(Triangulation< 2 > &triangulation)
Definition:
step-2.cc:41
Poisson::solution
Vector< double > solution
Definition:
poisson.h:79
fe_q.h
dof_tools.h
precondition.h
Poisson::triangulation
Triangulation< 2 > triangulation
Definition:
poisson.h:74
PoissonTester
Definition:
poisson-tester.cc:10
Poisson
Solve the Poisson problem, with Dirichlet or Neumann boundary conditions, on all geometries that can ...
Definition:
poisson.h:55
full_matrix.h
dof_handler.h
Vector< double >
vector.h
solver_cg.h
quadrature_lib.h
labs
lab-04
include
poisson.h
Generated on Thu Jun 23 2022 07:19:45 for The finite element method using deal.II - 2021/2022 by
1.8.17