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 HermiteSegment.hpp 19 \authors D. Martin, N. Kielbasiewicz 20 \since 11 jan 2003 21 \date 6 aug 2012 22 23 \brief Definition of the xlifepp::HermiteSegment class 24 25 xlifepp::HermiteSegment defines Hermite Reference Element interpolation data on a segment 26 27 child class 28 ----------- 29 - xlifepp::HermiteStdSegment Hermite standard Reference Element 30 31 member functions 32 ---------------- 33 - interpolationData interpolation data 34 - outputAsP1 35 - pointCoordinates point coordinates 36 37 Local D.o.F numbering of Hermite P_3 1D element 38 \verbatim 39 o-->-----<--o 40 3 4 2 1 41 k=3 42 \endverbatim 43 */ 44 45 #ifndef HERMITE_SEGMENT_HPP 46 #define HERMITE_SEGMENT_HPP 47 48 #include "config.h" 49 #include "RefSegment.hpp" 50 51 namespace xlifepp 52 { 53 54 class Interpolation; 55 56 /*! 57 \class HermiteSegment 58 Grand-Parent class: ReferenceElement 59 Parent class : ReferenceSegment 60 Child class : HermiteStdSegment 61 */ 62 class HermiteSegment : public RefSegment 63 { 64 public: 65 HermiteSegment(const Interpolation* interp_p); //!< constructor 66 virtual ~HermiteSegment(); //!< destructor 67 68 virtual void pointCoordinates() = 0; //!< defines coordinates of points 69 70 protected: 71 void interpolationData(); //!< defines interpolation data 72 73 //! output of D.o.f's numbers on underlyin P1 D.o.f's outputAsP1(std::ofstream & os,const int,const std::vector<number_t> & ranks) const74 void outputAsP1(std::ofstream& os, const int, const std::vector<number_t>& ranks) const { noSuchFunction("outputAsP1"); } 75 76 }; // end of class HermiteSegment 77 78 /*! 79 \class HermiteStdSegment 80 template class (order is template parameter) 81 */ 82 template<number_t Pk> 83 class HermiteStdSegment : public HermiteSegment 84 { 85 public: 86 HermiteStdSegment(const Interpolation* interp_p); //!< constructor by interpolation ~HermiteStdSegment()87 ~HermiteStdSegment() {} //!< destructor 88 using RefElement::computeShapeValues; //to unmask computeShapeValues(vector<real_t>::const_iterator, const bool) 89 void computeShapeValues(std::vector<real_t>::const_iterator it_pt, ShapeValues& shv, const bool withDeriv = true) const; //!< shape functions 90 void pointCoordinates(); //!< point coordinates (!) 91 92 }; // end of class HermiteStdSegment 93 94 } // end of namespace xlifepp 95 96 #endif /* HERMITE_SEGMENT_HPP */ 97