1 /*
2 XLiFE++ is an extended library of finite elements written in C++
3     Copyright (C) 2014  Lunéville, Eric; Kielbasiewicz, Nicolas; Lafranche, Yvon; Nguyen, Manh-Ha; Chambeyron, Colin
4 
5     This program is free software: you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation, either version 3 of the License, or
8     (at your option) any later version.
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13     You should have received a copy of the GNU General Public License
14     along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 /*!
18   \file CrouzeixRaviartTetrahedron.hpp
19   \authors D. Martin, N. Kielbasiewicz
20   \since 11 jan 2003
21   \date 6 aug 2012
22 
23   \brief Definition of the xlifepp::CrouzeixRaviartTetrahedron class
24 
25   xlifepp::CrouzeixRaviartTetrahedron defines Crouzeix-Raviart non-conforming interpolation data
26 
27   member functions
28     - interp   interpolation data
29     - sideNumbering  local numbering on edges
30     - pointCoordinates point coordinates
31 
32   child classes
33     - xlifepp::CrouzeixRaviartStdTetrahedronP1 Crouzeix-Raviart standard P1 Reference Element
34 */
35 
36 #ifndef CROUZEIX_RAVIART_TETRAHEDRON_HPP
37 #define CROUZEIX_RAVIART_TETRAHEDRON_HPP
38 
39 #include "config.h"
40 #include "RefTetrahedron.hpp"
41 
42 namespace xlifepp
43 {
44 
45 class Interpolation;
46 
47 /*!
48   \class CrouzeixRaviartTetrahedron
49   ( conforming elements )
50 
51   Parent class  : RefTetrahedron
52   Child classes : CrouzeixRaviartStdTetrahedronP1
53  */
54 class CrouzeixRaviartTetrahedron : public RefTetrahedron
55 {
56   public:
57     CrouzeixRaviartTetrahedron(const Interpolation* interp_p); //!< constructor by interpolation
58     virtual ~CrouzeixRaviartTetrahedron(); //!< destructor
59 
60   protected:
61     void interpolationData(); //!< builds iinterpolation data
62     void sideNumbering(); //!< builds side numbering
63 
64     virtual void pointCoordinates() = 0; //!< builds point coordinates
65 
66 }; // end of class CrouzeixRaviartTetrahedron
67 
68 /*!
69   \class CrouzeixRaviartStdTetrahedronP1
70  */
71 class CrouzeixRaviartStdTetrahedronP1: public CrouzeixRaviartTetrahedron
72 {
73   public:
74     CrouzeixRaviartStdTetrahedronP1(const Interpolation* interp_p); //!< constructor by interpolation
75     ~CrouzeixRaviartStdTetrahedronP1(); //!< destructor
76     using RefElement::computeShapeValues;     //to unmask computeShapeValues(vector<real_t>::const_iterator, const bool)
77     void computeShapeValues(std::vector<real_t>::const_iterator it_pt, ShapeValues& shv, const bool withDeriv = true) const; //!< shape functions
78 
79     void pointCoordinates(); //!< builds point coordinates on reference element
80 
81 }; // end of class CrouzeixRaviartStdTetrahedronP1
82 
83 } // end of namespace xlifepp
84 
85 #endif /* CROUZEIX_RAVIART_TETRAHEDRON_HPP */
86