Flow123d  release_2.2.0-914-gf1a3a4f
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  const 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  const 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, unsigned int spacedim>
60 class FE_RT0 : public FiniteElement<dim,spacedim>
61 {
62 public:
63 
64  /**
65  * @brief Constructor.
66  */
67  FE_RT0();
68 
69 };
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 #endif /* FE_RT_HH_ */
RT0_space(unsigned int dim)
Definition: fe_rt.cc:25
const unsigned int dim() const override
Dimension of function space (number of basis functions).
Definition: fe_rt.hh:49
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:44
Raviart-Thomas element of order 0.
Definition: fe_rt.hh:60
const 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:30
Abstract class for description of finite elements.
unsigned int space_dim_
Space dimension of function arguments (i.e. 1, 2 or 3).
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
Definition: dofhandler.hh:30