hcurl_fe_transformation.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library 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 GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef LIBMESH_HCURL_FE_TRANSFORMATION_H
19 #define LIBMESH_HCURL_FE_TRANSFORMATION_H
20 
22 
23 namespace libMesh
24 {
25 
35 template<typename OutputShape>
36 class HCurlFETransformation : public FETransformationBase<OutputShape>
37 {
38 public:
39 
41  : FETransformationBase<OutputShape>(){}
42 
44 
48  virtual void init_map_phi(const FEGenericBase<OutputShape> & fe) const override;
49 
53  virtual void init_map_dphi(const FEGenericBase<OutputShape> & fe) const override;
54 
58  virtual void init_map_d2phi(const FEGenericBase<OutputShape> & fe) const override;
59 
68  virtual void map_phi(const unsigned int dim,
69  const Elem * const elem,
70  const std::vector<Point> & qp,
71  const FEGenericBase<OutputShape> & fe,
72  std::vector<std::vector<OutputShape>> & phi) const override;
73 
78  virtual void map_dphi(const unsigned int /*dim*/,
79  const Elem * const /*elem*/,
80  const std::vector<Point> & /*qp*/,
81  const FEGenericBase<OutputShape> & /*fe*/,
82  std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & /*dphi*/,
83  std::vector<std::vector<OutputShape>> & /*dphidx*/,
84  std::vector<std::vector<OutputShape>> & /*dphidy*/,
85  std::vector<std::vector<OutputShape>> & /*dphidz*/) const override
86  {
87  libmesh_warning("WARNING: Shape function gradients for HCurl elements are not currently being computed!");
88  }
89 
90 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
91 
95  virtual void map_d2phi(const unsigned int /*dim*/,
96  const std::vector<Point> & /*qp*/,
97  const FEGenericBase<OutputShape> & /*fe*/,
98  std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & /*d2phi*/,
99  std::vector<std::vector<OutputShape>> & /*d2phidx2*/,
100  std::vector<std::vector<OutputShape>> & /*d2phidxdy*/,
101  std::vector<std::vector<OutputShape>> & /*d2phidxdz*/,
102  std::vector<std::vector<OutputShape>> & /*d2phidy2*/,
103  std::vector<std::vector<OutputShape>> & /*d2phidydz*/,
104  std::vector<std::vector<OutputShape>> & /*d2phidz2*/) const override
105  {
106  libmesh_warning("WARNING: Shape function Hessians for HCurl elements are not currently being computed!");
107  }
108 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
109 
117  virtual void map_curl(const unsigned int dim,
118  const Elem * const elem,
119  const std::vector<Point> & qp,
120  const FEGenericBase<OutputShape> & fe,
121  std::vector<std::vector<OutputShape>> & curl_phi) const override;
122 
127  virtual void map_div(const unsigned int /*dim*/,
128  const Elem * const /*elem*/,
129  const std::vector<Point> & /*qp*/,
130  const FEGenericBase<OutputShape> & /*fe*/,
131  std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputDivergence>> & /*div_phi*/) const override
132  {
133  libmesh_warning("WARNING: Shape function divergences for HCurl elements are not currently being computed!");
134  }
135 
136 }; // class HCurlFETransformation
137 
138 }
139 
140 #endif // LIBMESH_HCURL_FE_TRANSFORMATION_H
virtual void init_map_phi(const FEGenericBase< OutputShape > &fe) const override
virtual void map_div(const unsigned int, const Elem *const, const std::vector< Point > &, const FEGenericBase< OutputShape > &, std::vector< std::vector< typename FEGenericBase< OutputShape >::OutputDivergence >> &) const override
The base class for all geometric element types.
Definition: elem.h:100
TensorTools::DecrementRank< OutputShape >::type OutputDivergence
Definition: fe_base.h:122
virtual void map_dphi(const unsigned int, const Elem *const, const std::vector< Point > &, const FEGenericBase< OutputShape > &, std::vector< std::vector< typename FEGenericBase< OutputShape >::OutputGradient >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &) const override
virtual void map_curl(const unsigned int dim, const Elem *const elem, const std::vector< Point > &qp, const FEGenericBase< OutputShape > &fe, std::vector< std::vector< OutputShape >> &curl_phi) const override
virtual void init_map_d2phi(const FEGenericBase< OutputShape > &fe) const override
virtual void map_d2phi(const unsigned int, const std::vector< Point > &, const FEGenericBase< OutputShape > &, std::vector< std::vector< typename FEGenericBase< OutputShape >::OutputTensor >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &, std::vector< std::vector< OutputShape >> &) const override
virtual void map_phi(const unsigned int dim, const Elem *const elem, const std::vector< Point > &qp, const FEGenericBase< OutputShape > &fe, std::vector< std::vector< OutputShape >> &phi) const override
virtual void init_map_dphi(const FEGenericBase< OutputShape > &fe) const override