Flow123d  DF_patch_fe_data_tables-b828b90
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_ */
Discontinuous Raviart-Thomas element of order 0.
Definition: fe_rt.hh:82
FE_RT0_disc()
Constructor.
Definition: fe_rt.cc:125
Raviart-Thomas element of order 0.
Definition: fe_rt.hh:61
FE_RT0()
Constructor.
Definition: fe_rt.cc:76
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
unsigned int space_dim_
Space dimension of function arguments (i.e. 1, 2 or 3).
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
RT0_space(unsigned int dim)
Definition: fe_rt.cc:27
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
unsigned int dim() const override
Dimension of function space (number of basis functions).
Definition: fe_rt.hh:49
Abstract class for description of finite elements.
ArmaVec< double, N > vec
Definition: armor.hh:933