Flow123d  3.9.0-960b954f9
fe_rt.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file fe_rt.hh
15  * @brief Definitions of Raviart-Thomas finite elements.
16  * @author Jan Stebel
17  */
18 
19 #ifndef FE_RT_HH_
20 #define FE_RT_HH_
21 
22 #include "fem/finite_element.hh"
23 #include "system/logger.hh"
24 
25 /**
26  * Space of Raviart-Thomas polynomials of order 0 (affine functions).
27  * The basis functions are defined as
28  *
29  * x, x - e_1, ..., x - e_d,
30  *
31  * where x is the space variable, e_i is the i-th canonical basis vector in R^d
32  * and d is @p space_dim_.
33  */
34 class RT0_space : public FunctionSpace {
35 public:
36 
37  RT0_space(unsigned int dim);
38 
39  double basis_value(unsigned int basis_index,
40  const arma::vec &point,
41  unsigned int comp_index
42  ) const override;
43 
44  const arma::vec basis_grad(unsigned int basis_index,
45  const arma::vec &point,
46  unsigned int comp_index
47  ) const override;
48 
49  unsigned int dim() const override { return this->space_dim_+1; }
50 };
51 
52 
53 /**
54  * @brief Raviart-Thomas element of order 0.
55  *
56  * The lowest order Raviart-Thomas finite element with linear basis functions
57  * and continuous normal components across element sides.
58  */
59 template <unsigned int dim>
60 class FE_RT0 : public FiniteElement<dim>
61 {
62 public:
63 
64  /**
65  * @brief Constructor.
66  */
67  FE_RT0();
68 
69 };
70 
71 
72 
73 
74 /**
75  * @brief Discontinuous Raviart-Thomas element of order 0.
76  *
77  * The lowest order Raviart-Thomas finite element with linear basis functions
78  * and continuous normal components across element sides.
79  */
80 template <unsigned int dim>
81 class FE_RT0_disc : public FiniteElement<dim>
82 {
83 public:
84 
85  /**
86  * @brief Constructor.
87  */
88  FE_RT0_disc();
89 
90 };
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 #endif /* FE_RT_HH_ */
FE_RT0
Raviart-Thomas element of order 0.
Definition: fe_rt.hh:60
Armor::vec
ArmaVec< double, N > vec
Definition: armor.hh:885
FE_RT0_disc
Discontinuous Raviart-Thomas element of order 0.
Definition: fe_rt.hh:81
RT0_space::dim
unsigned int dim() const override
Dimension of function space (number of basis functions).
Definition: fe_rt.hh:49
FE_RT0::FE_RT0
FE_RT0()
Constructor.
Definition: fe_rt.cc:76
FunctionSpace
Definition: finite_element.hh:121
FE_RT0_disc::FE_RT0_disc
FE_RT0_disc()
Constructor.
Definition: fe_rt.cc:125
finite_element.hh
Abstract class for description of finite elements.
RT0_space::RT0_space
RT0_space(unsigned int dim)
Definition: fe_rt.cc:27
logger.hh
RT0_space
Definition: fe_rt.hh:34
FiniteElement
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
Definition: discrete_space.hh:26
RT0_space::basis_value
double basis_value(unsigned int basis_index, const arma::vec &point, unsigned int comp_index) const override
Value of the i th basis function at point point.
Definition: fe_rt.cc:32
FunctionSpace::space_dim_
unsigned int space_dim_
Space dimension of function arguments (i.e. 1, 2 or 3).
Definition: finite_element.hh:168
RT0_space::basis_grad
const arma::vec basis_grad(unsigned int basis_index, const arma::vec &point, unsigned int comp_index) const override
Gradient of the i th basis function at point point.
Definition: fe_rt.cc:46