libMesh
fe_map.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2024 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 
19 
20 #ifndef LIBMESH_FE_MAP_H
21 #define LIBMESH_FE_MAP_H
22 
23 // libMesh includes
24 #include "libmesh/reference_counted_object.h"
25 #include "libmesh/point.h"
26 #include "libmesh/vector_value.h"
27 #include "libmesh/fe_type.h"
28 
29 // C++ includes
30 #include <memory>
31 
32 namespace libMesh
33 {
34 
35 // forward declarations
36 class Elem;
37 class Node;
38 
47 class FEMap
48 {
49 public:
50 
51  FEMap(Real jtol = 0);
52  virtual ~FEMap() = default;
53 
54  static std::unique_ptr<FEMap> build(FEType fe_type);
55 
56  static FEFamily map_fe_type(const Elem & elem);
57 
58  template<unsigned int Dim>
59  void init_reference_to_physical_map(const std::vector<Point> & qp,
60  const Elem * elem);
61 
62  // Non-templated version for runtime selection
63  void init_reference_to_physical_map(unsigned int dim,
64  const std::vector<Point> & qp,
65  const Elem * elem);
66 
74  void compute_single_point_map(const unsigned int dim,
75  const std::vector<Real> & qw,
76  const Elem * elem,
77  unsigned int p,
78  const std::vector<const Node *> & elem_nodes,
79  bool compute_second_derivatives);
80 
87  virtual void compute_affine_map(const unsigned int dim,
88  const std::vector<Real> & qw,
89  const Elem * elem);
90 
96  virtual void compute_null_map(const unsigned int dim,
97  const std::vector<Real> & qw);
98 
99 
108  virtual void compute_map(const unsigned int dim,
109  const std::vector<Real> & qw,
110  const Elem * elem,
111  bool calculate_d2phi);
112 
116  virtual void compute_face_map(int dim,
117  const std::vector<Real> & qw,
118  const Elem * side);
119 
123  void compute_edge_map(int dim,
124  const std::vector<Real> & qw,
125  const Elem * side);
126 
131  template<unsigned int Dim>
132  void init_face_shape_functions(const std::vector<Point> & qp,
133  const Elem * side);
134 
139  template<unsigned int Dim>
140  void init_edge_shape_functions(const std::vector<Point> & qp,
141  const Elem * edge);
142 
147  static Point map (const unsigned int dim,
148  const Elem * elem,
149  const Point & reference_point);
150 
155  static Point map_deriv (const unsigned int dim,
156  const Elem * elem,
157  const unsigned int j,
158  const Point & reference_point);
159 
189  static Point inverse_map (const unsigned int dim,
190  const Elem * elem,
191  const Point & p,
192  const Real tolerance = TOLERANCE,
193  const bool secure = true,
194  const bool extra_checks = true);
195 
204  static void inverse_map (unsigned int dim,
205  const Elem * elem,
206  const std::vector<Point> & physical_points,
207  std::vector<Point> & reference_points,
208  const Real tolerance = TOLERANCE,
209  const bool secure = true,
210  const bool extra_checks = true);
211 
216  const std::vector<Point> & get_xyz() const
218  calculate_xyz = true; return xyz; }
219 
223  const std::vector<Real> & get_jacobian() const
225  calculate_dxyz = true; return jac; }
226 
231  const std::vector<Real> & get_JxW() const
233  calculate_dxyz = true; return JxW; }
234 
239  const std::vector<RealGradient> & get_dxyzdxi() const
241  calculate_dxyz = true; return dxyzdxi_map; }
242 
247  const std::vector<RealGradient> & get_dxyzdeta() const
249  calculate_dxyz = true; return dxyzdeta_map; }
250 
255  const std::vector<RealGradient> & get_dxyzdzeta() const
257  calculate_dxyz = true; return dxyzdzeta_map; }
258 
259 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
260 
264  const std::vector<RealGradient> & get_d2xyzdxi2() const
266  calculate_d2xyz = true; return d2xyzdxi2_map; }
267 
271  const std::vector<RealGradient> & get_d2xyzdeta2() const
273  calculate_d2xyz = true; return d2xyzdeta2_map; }
274 
278  const std::vector<RealGradient> & get_d2xyzdzeta2() const
280  calculate_d2xyz = true; return d2xyzdzeta2_map; }
281 
285  const std::vector<RealGradient> & get_d2xyzdxideta() const
287  calculate_d2xyz = true; return d2xyzdxideta_map; }
288 
292  const std::vector<RealGradient> & get_d2xyzdxidzeta() const
294  calculate_d2xyz = true; return d2xyzdxidzeta_map; }
295 
299  const std::vector<RealGradient> & get_d2xyzdetadzeta() const
301  calculate_d2xyz = true; return d2xyzdetadzeta_map; }
302 
303 #endif
304 
309  const std::vector<Real> & get_dxidx() const
311  calculate_dxyz = true; return dxidx_map; }
312 
317  const std::vector<Real> & get_dxidy() const
319  calculate_dxyz = true; return dxidy_map; }
320 
325  const std::vector<Real> & get_dxidz() const
327  calculate_dxyz = true; return dxidz_map; }
328 
333  const std::vector<Real> & get_detadx() const
335  calculate_dxyz = true; return detadx_map; }
336 
341  const std::vector<Real> & get_detady() const
343  calculate_dxyz = true; return detady_map; }
344 
349  const std::vector<Real> & get_detadz() const
351  calculate_dxyz = true; return detadz_map; }
352 
357  const std::vector<Real> & get_dzetadx() const
359  calculate_dxyz = true; return dzetadx_map; }
360 
365  const std::vector<Real> & get_dzetady() const
367  calculate_dxyz = true; return dzetady_map; }
368 
373  const std::vector<Real> & get_dzetadz() const
375  calculate_dxyz = true; return dzetadz_map; }
376 
377 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
378 
381  const std::vector<std::vector<Real>> & get_d2xidxyz2() const
383  calculate_d2xyz = true; return d2xidxyz2_map; }
384 
388  const std::vector<std::vector<Real>> & get_d2etadxyz2() const
390  calculate_d2xyz = true; return d2etadxyz2_map; }
391 
395  const std::vector<std::vector<Real>> & get_d2zetadxyz2() const
397  calculate_d2xyz = true; return d2zetadxyz2_map; }
398 #endif
399 
403  const std::vector<std::vector<Real>> & get_psi() const
404  { return psi_map; }
405 
409  const std::vector<std::vector<Real>> & get_phi_map() const
411  calculate_xyz = true; return phi_map; }
412 
416  const std::vector<std::vector<Real>> & get_dphidxi_map() const
418  calculate_dxyz = true; return dphidxi_map; }
419 
423  const std::vector<std::vector<Real>> & get_dphideta_map() const
425  calculate_dxyz = true; return dphideta_map; }
426 
430  const std::vector<std::vector<Real>> & get_dphidzeta_map() const
432  calculate_dxyz = true; return dphidzeta_map; }
433 
437  const std::vector<std::vector<Point>> & get_tangents() const
439  calculate_dxyz = true; return tangents; }
440 
444  const std::vector<Point> & get_normals() const
446  calculate_dxyz = true; return normals; }
447 
448 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
449 
453  const std::vector<Real> & get_curvatures() const
455  calculate_d2xyz = true; return curvatures;}
456 
457 #endif
458 
462  void print_JxW(std::ostream & os) const;
463 
468  void print_xyz(std::ostream & os) const;
469 
470  /* FIXME: PB: The public functions below break encapsulation! I'm not happy
471  about it, but I don't have time to redo the infinite element routines.
472  These are needed in inf_fe_boundary.C and inf_fe.C. A proper implementation
473  would subclass this class and hide all the radial function business. */
477  std::vector<std::vector<Real>> & get_psi()
478  { return psi_map; }
479 
483  std::vector<std::vector<Real>> & get_dpsidxi()
485  calculate_dxyz = true; return dpsidxi_map; }
486 
487  const std::vector<std::vector<Real>> & get_dpsidxi() const
489  calculate_dxyz = true; return dpsidxi_map; }
490 
494  std::vector<std::vector<Real>> & get_dpsideta()
496  calculate_dxyz = true; return dpsideta_map; }
497 
498  const std::vector<std::vector<Real>> & get_dpsideta() const
500  calculate_dxyz = true; return dpsideta_map; }
501 
502 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
503 
507  std::vector<std::vector<Real>> & get_d2psidxi2()
509  calculate_d2xyz = true; return d2psidxi2_map; }
510 
514  const std::vector<std::vector<Real>> & get_d2psidxi2() const
516  calculate_d2xyz = true; return d2psidxi2_map; }
517 
521  std::vector<std::vector<Real>> & get_d2psidxideta()
523  calculate_d2xyz = true; return d2psidxideta_map; }
524 
528  const std::vector<std::vector<Real>> & get_d2psidxideta() const
530  calculate_d2xyz = true; return d2psidxideta_map; }
531 
535  std::vector<std::vector<Real>> & get_d2psideta2()
537  calculate_d2xyz = true; return d2psideta2_map; }
538 
539 
543  const std::vector<std::vector<Real>> & get_d2psideta2() const
545  calculate_d2xyz = true; return d2psideta2_map; }
546 
547 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
548 
552  std::vector<std::vector<Real>> & get_phi_map()
554  calculate_xyz = true; return phi_map; }
555 
559  std::vector<std::vector<Real>> & get_dphidxi_map()
561  calculate_dxyz = true; return dphidxi_map; }
562 
566  std::vector<std::vector<Real>> & get_dphideta_map()
568  calculate_dxyz = true; return dphideta_map; }
569 
573  std::vector<std::vector<Real>> & get_dphidzeta_map()
575  calculate_dxyz = true; return dphidzeta_map; }
576 
577 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
578 
581  std::vector<std::vector<Real>> & get_d2phidxi2_map()
583  calculate_d2xyz = true; return d2phidxi2_map; }
584 
588  std::vector<std::vector<Real>> & get_d2phidxideta_map()
590  calculate_d2xyz = true; return d2phidxideta_map; }
591 
595  std::vector<std::vector<Real>> & get_d2phidxidzeta_map()
597  calculate_d2xyz = true; return d2phidxidzeta_map; }
598 
602  std::vector<std::vector<Real>> & get_d2phideta2_map()
604  calculate_d2xyz = true; return d2phideta2_map; }
605 
609  std::vector<std::vector<Real>> & get_d2phidetadzeta_map()
611  calculate_d2xyz = true; return d2phidetadzeta_map; }
612 
616  std::vector<std::vector<Real>> & get_d2phidzeta2_map()
618  calculate_d2xyz = true; return d2phidzeta2_map; }
619 #endif
620 
621  /* FIXME: PB: This function breaks encapsulation! Needed in FE<>::reinit and
622  InfFE<>::reinit. Not sure yet if the algorithm can be redone to avoid this. */
627  std::vector<Real> & get_JxW()
629  calculate_dxyz = true; return JxW; }
630 
635  void add_calculations();
636 
642 
643 protected:
644 
649  {
650  calculations_started = true;
651 
652 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
653  // Second derivative calculations currently have first derivative
654  // calculations as a prerequisite
655  if (calculate_d2xyz)
656  calculate_dxyz = true;
657 #endif
658  }
659 
663  void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp);
664 
671  Real dxdxi_map(const unsigned int p) const { return dxyzdxi_map[p](0); }
672 
679  Real dydxi_map(const unsigned int p) const { return dxyzdxi_map[p](1); }
680 
687  Real dzdxi_map(const unsigned int p) const { return dxyzdxi_map[p](2); }
688 
695  Real dxdeta_map(const unsigned int p) const { return dxyzdeta_map[p](0); }
696 
703  Real dydeta_map(const unsigned int p) const { return dxyzdeta_map[p](1); }
704 
711  Real dzdeta_map(const unsigned int p) const { return dxyzdeta_map[p](2); }
712 
719  Real dxdzeta_map(const unsigned int p) const { return dxyzdzeta_map[p](0); }
720 
727  Real dydzeta_map(const unsigned int p) const { return dxyzdzeta_map[p](1); }
728 
735  Real dzdzeta_map(const unsigned int p) const { return dxyzdzeta_map[p](2); }
736 
740  std::vector<Point> xyz;
741 
746  std::vector<RealGradient> dxyzdxi_map;
747 
752  std::vector<RealGradient> dxyzdeta_map;
753 
758  std::vector<RealGradient> dxyzdzeta_map;
759 
760 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
761 
766  std::vector<RealGradient> d2xyzdxi2_map;
767 
772  std::vector<RealGradient> d2xyzdxideta_map;
773 
778  std::vector<RealGradient> d2xyzdeta2_map;
779 
784  std::vector<RealGradient> d2xyzdxidzeta_map;
785 
790  std::vector<RealGradient> d2xyzdetadzeta_map;
791 
796  std::vector<RealGradient> d2xyzdzeta2_map;
797 
798 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
799 
804  std::vector<Real> dxidx_map;
805 
810  std::vector<Real> dxidy_map;
811 
816  std::vector<Real> dxidz_map;
817 
818 
823  std::vector<Real> detadx_map;
824 
829  std::vector<Real> detady_map;
830 
835  std::vector<Real> detadz_map;
836 
837 
842  std::vector<Real> dzetadx_map;
843 
848  std::vector<Real> dzetady_map;
849 
854  std::vector<Real> dzetadz_map;
855 
856 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
857 
861  std::vector<std::vector<Real>> d2xidxyz2_map;
862 
867  std::vector<std::vector<Real>> d2etadxyz2_map;
868 
873  std::vector<std::vector<Real>> d2zetadxyz2_map;
874 #endif
875 
879  std::vector<std::vector<Real>> phi_map;
880 
884  std::vector<std::vector<Real>> dphidxi_map;
885 
889  std::vector<std::vector<Real>> dphideta_map;
890 
894  std::vector<std::vector<Real>> dphidzeta_map;
895 
896 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
897 
901  std::vector<std::vector<Real>> d2phidxi2_map;
902 
906  std::vector<std::vector<Real>> d2phidxideta_map;
907 
911  std::vector<std::vector<Real>> d2phidxidzeta_map;
912 
916  std::vector<std::vector<Real>> d2phideta2_map;
917 
921  std::vector<std::vector<Real>> d2phidetadzeta_map;
922 
926  std::vector<std::vector<Real>> d2phidzeta2_map;
927 
928 #endif
929 
933  std::vector<std::vector<Real>> psi_map;
934 
939  std::vector<std::vector<Real>> dpsidxi_map;
940 
945  std::vector<std::vector<Real>> dpsideta_map;
946 
947 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
948 
954  std::vector<std::vector<Real>> d2psidxi2_map;
955 
961  std::vector<std::vector<Real>> d2psidxideta_map;
962 
968  std::vector<std::vector<Real>> d2psideta2_map;
969 
970 #endif
971 
975  std::vector<std::vector<Point>> tangents;
976 
980  std::vector<Point> normals;
981 
982 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
983 
988  std::vector<Real> curvatures;
989 
990 #endif
991 
995  std::vector<Real> jac;
996 
1000  std::vector<Real> JxW;
1001 
1006  mutable bool calculations_started;
1007 
1011  mutable bool calculate_xyz;
1012 
1016  mutable bool calculate_dxyz;
1017 
1018 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1019 
1023  mutable bool calculate_d2xyz;
1024 
1025 #endif
1026 
1033 
1034 private:
1039  void compute_inverse_map_second_derivs(unsigned p);
1040 
1044  std::vector<const Node *> _elem_nodes;
1045 };
1046 
1047 
1048 
1049 inline void
1051  const std::vector<Point> & qp,
1052  const Elem * elem)
1053 {
1054  switch (dim)
1055  {
1056  case 0:
1057  this->init_reference_to_physical_map<0>(qp, elem);
1058  break;
1059  case 1:
1060  this->init_reference_to_physical_map<1>(qp, elem);
1061  break;
1062  case 2:
1063  this->init_reference_to_physical_map<2>(qp, elem);
1064  break;
1065  case 3:
1066  this->init_reference_to_physical_map<3>(qp, elem);
1067  break;
1068  default:
1069  libmesh_error();
1070  }
1071 }
1072 
1073 }
1074 
1075 #endif // LIBMESH_FE_MAP_H
const std::vector< std::vector< Real > > & get_d2psidxi2() const
Definition: fe_map.h:514
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:182
virtual void compute_affine_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem)
Compute the jacobian and some other additional data fields.
Definition: fe_map.C:1281
std::vector< std::vector< Real > > & get_dphidzeta_map()
Definition: fe_map.h:573
void init_edge_shape_functions(const std::vector< Point > &qp, const Elem *edge)
Same as before, but for an edge.
Definition: fe_boundary.C:565
Real dzdeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:711
std::vector< std::vector< Real > > dpsideta_map
Map for the derivative of the side function, d(psi)/d(eta).
Definition: fe_map.h:945
std::vector< std::vector< Real > > psi_map
Map for the side shape functions, psi.
Definition: fe_map.h:933
std::vector< std::vector< Real > > d2psideta2_map
Map for the second derivatives (in eta) of the side shape functions.
Definition: fe_map.h:968
std::vector< std::vector< Real > > & get_d2phidxideta_map()
Definition: fe_map.h:588
std::vector< std::vector< Real > > & get_d2phideta2_map()
Definition: fe_map.h:602
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
Definition: fe_map.h:894
void compute_inverse_map_second_derivs(unsigned p)
A helper function used by FEMap::compute_single_point_map() to compute second derivatives of the inve...
Definition: fe_map.C:1506
virtual void compute_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem, bool calculate_d2phi)
Compute the jacobian and some other additional data fields.
Definition: fe_map.C:1437
std::vector< std::vector< Real > > dphidxi_map
Map for the derivative, d(phi)/d(xi).
Definition: fe_map.h:884
std::vector< std::vector< Real > > d2etadxyz2_map
Second derivatives of "eta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:867
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
void compute_edge_map(int dim, const std::vector< Real > &qw, const Elem *side)
Same as before, but for an edge.
Definition: fe_boundary.C:1005
static constexpr Real TOLERANCE
std::vector< std::vector< Real > > & get_d2phidxi2_map()
Definition: fe_map.h:581
static std::unique_ptr< FEMap > build(FEType fe_type)
Definition: fe_map.C:74
unsigned int dim
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1626
std::vector< RealGradient > d2xyzdzeta2_map
Vector of second partial derivatives in zeta: d^2(x)/d(zeta)^2.
Definition: fe_map.h:796
std::vector< Real > dzetady_map
Map for partial derivatives: d(zeta)/d(y).
Definition: fe_map.h:848
const std::vector< std::vector< Real > > & get_dphidzeta_map() const
Definition: fe_map.h:430
std::vector< std::vector< Real > > d2xidxyz2_map
Second derivatives of "xi" reference coordinate wrt physical coordinates.
Definition: fe_map.h:861
Real dxdeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:695
const std::vector< Real > & get_detadz() const
Definition: fe_map.h:349
Real dzdxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:687
const std::vector< Real > & get_curvatures() const
Definition: fe_map.h:453
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
std::vector< std::vector< Real > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
Definition: fe_map.h:916
const std::vector< Point > & get_normals() const
Definition: fe_map.h:444
std::vector< std::vector< Real > > d2phidxidzeta_map
Map for the second derivative, d^2(phi)/d(xi)d(zeta).
Definition: fe_map.h:911
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
const std::vector< std::vector< Real > > & get_phi_map() const
Definition: fe_map.h:409
std::vector< Real > & get_JxW()
Definition: fe_map.h:627
const std::vector< std::vector< Real > > & get_dpsidxi() const
Definition: fe_map.h:487
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
const std::vector< RealGradient > & get_dxyzdzeta() const
Definition: fe_map.h:255
The libMesh namespace provides an interface to certain functionality in the library.
const std::vector< std::vector< Real > > & get_dpsideta() const
Definition: fe_map.h:498
const std::vector< std::vector< Real > > & get_d2etadxyz2() const
Second derivatives of "eta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:388
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
Definition: fe_map.h:921
const std::vector< Real > & get_dxidz() const
Definition: fe_map.h:325
std::vector< std::vector< Real > > d2psidxideta_map
Map for the second (cross) derivatives in xi, eta of the side shape functions.
Definition: fe_map.h:961
std::vector< RealGradient > d2xyzdxideta_map
Vector of mixed second partial derivatives in xi-eta: d^2(x)/d(xi)d(eta) d^2(y)/d(xi)d(eta) d^2(z)/d(...
Definition: fe_map.h:772
const std::vector< std::vector< Real > > & get_dphideta_map() const
Definition: fe_map.h:423
const std::vector< std::vector< Point > > & get_tangents() const
Definition: fe_map.h:437
std::vector< RealGradient > dxyzdzeta_map
Vector of partial derivatives: d(x)/d(zeta), d(y)/d(zeta), d(z)/d(zeta)
Definition: fe_map.h:758
std::vector< std::vector< Real > > & get_dpsidxi()
Definition: fe_map.h:483
std::vector< std::vector< Real > > & get_d2phidxidzeta_map()
Definition: fe_map.h:595
std::vector< Real > dzetadx_map
Map for partial derivatives: d(zeta)/d(x).
Definition: fe_map.h:842
std::vector< RealGradient > dxyzdxi_map
Vector of partial derivatives: d(x)/d(xi), d(y)/d(xi), d(z)/d(xi)
Definition: fe_map.h:746
std::vector< std::vector< Real > > & get_d2phidetadzeta_map()
Definition: fe_map.h:609
void set_jacobian_tolerance(Real tol)
Set the Jacobian tolerance used for determining when the mapping fails.
Definition: fe_map.h:641
const std::vector< RealGradient > & get_d2xyzdeta2() const
Definition: fe_map.h:271
std::vector< std::vector< Real > > & get_d2psideta2()
Definition: fe_map.h:535
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
const std::vector< std::vector< Real > > & get_d2zetadxyz2() const
Second derivatives of "zeta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:395
const std::vector< RealGradient > & get_dxyzdxi() const
Definition: fe_map.h:239
std::vector< std::vector< Real > > & get_d2psidxideta()
Definition: fe_map.h:521
std::vector< RealGradient > d2xyzdxi2_map
Vector of second partial derivatives in xi: d^2(x)/d(xi)^2, d^2(y)/d(xi)^2, d^2(z)/d(xi)^2.
Definition: fe_map.h:766
std::vector< std::vector< Real > > & get_dphidxi_map()
Definition: fe_map.h:559
std::vector< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
const std::vector< std::vector< Real > > & get_psi() const
Definition: fe_map.h:403
Real dzdzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:735
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
std::vector< std::vector< Real > > d2zetadxyz2_map
Second derivatives of "zeta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:873
const std::vector< Real > & get_dzetadx() const
Definition: fe_map.h:357
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
std::vector< RealGradient > d2xyzdetadzeta_map
Vector of mixed second partial derivatives in eta-zeta: d^2(x)/d(eta)d(zeta) d^2(y)/d(eta)d(zeta) d^2...
Definition: fe_map.h:790
libmesh_assert(ctx)
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
Definition: fe_map.h:804
const std::vector< std::vector< Real > > & get_d2psidxideta() const
Definition: fe_map.h:528
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
Real dxdzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:719
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810
const std::vector< Real > & get_jacobian() const
Definition: fe_map.h:223
Real dydzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:727
const std::vector< Real > & get_dxidx() const
Definition: fe_map.h:309
std::vector< Real > curvatures
The mean curvature (= one half the sum of the principal curvatures) on the boundary at the quadrature...
Definition: fe_map.h:988
const std::vector< RealGradient > & get_d2xyzdxi2() const
Definition: fe_map.h:264
const std::vector< Real > & get_dzetady() const
Definition: fe_map.h:365
const std::vector< Real > & get_JxW() const
Definition: fe_map.h:231
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954
const std::vector< Real > & get_dxidy() const
Definition: fe_map.h:317
std::vector< const Node * > _elem_nodes
Work vector for compute_affine_map()
Definition: fe_map.h:1044
std::vector< std::vector< Real > > & get_d2psidxi2()
Definition: fe_map.h:507
void init_reference_to_physical_map(const std::vector< Point > &qp, const Elem *elem)
Definition: fe_map.C:108
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
std::vector< std::vector< Real > > d2phidxideta_map
Map for the second derivative, d^2(phi)/d(xi)d(eta).
Definition: fe_map.h:906
const std::vector< Point > & get_xyz() const
Definition: fe_map.h:216
const std::vector< RealGradient > & get_d2xyzdetadzeta() const
Definition: fe_map.h:299
std::vector< Point > normals
Normal vectors on boundary at quadrature points.
Definition: fe_map.h:980
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
const std::vector< Real > & get_dzetadz() const
Definition: fe_map.h:373
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real dydeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:703
std::vector< std::vector< Real > > & get_d2phidzeta2_map()
Definition: fe_map.h:616
const std::vector< Real > & get_detady() const
Definition: fe_map.h:341
virtual void compute_null_map(const unsigned int dim, const std::vector< Real > &qw)
Assign a fake jacobian and some other additional data fields.
Definition: fe_map.C:1362
static Point map(const unsigned int dim, const Elem *elem, const Point &reference_point)
Definition: fe_map.C:2067
std::vector< std::vector< Real > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
const std::vector< RealGradient > & get_d2xyzdzeta2() const
Definition: fe_map.h:278
const std::vector< std::vector< Real > > & get_dphidxi_map() const
Definition: fe_map.h:416
std::vector< std::vector< Point > > tangents
Tangent vectors on boundary at quadrature points.
Definition: fe_map.h:975
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).
Definition: fe_map.C:1498
std::vector< std::vector< Real > > & get_dpsideta()
Definition: fe_map.h:494
std::vector< RealGradient > dxyzdeta_map
Vector of partial derivatives: d(x)/d(eta), d(y)/d(eta), d(z)/d(eta)
Definition: fe_map.h:752
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
A utility function for use by compute_*_map.
Definition: fe_map.C:1200
static Point map_deriv(const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
Definition: fe_map.C:2101
virtual ~FEMap()=default
std::vector< std::vector< Real > > & get_psi()
Definition: fe_map.h:477
FEMap(Real jtol=0)
Definition: fe_map.C:62
Real dxdxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:671
const std::vector< RealGradient > & get_dxyzdeta() const
Definition: fe_map.h:247
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
const std::vector< RealGradient > & get_d2xyzdxidzeta() const
Definition: fe_map.h:292
Real dydxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Definition: fe_map.h:679
virtual void compute_face_map(int dim, const std::vector< Real > &qw, const Elem *side)
Same as compute_map, but for a side.
Definition: fe_boundary.C:641
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995
FEFamily
defines an enum for finite element families.
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835
std::vector< std::vector< Real > > d2phidzeta2_map
Map for the second derivative, d^2(phi)/d(zeta)^2.
Definition: fe_map.h:926
std::vector< std::vector< Real > > & get_phi_map()
Definition: fe_map.h:552
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
Definition: fe_map.C:1490
const std::vector< std::vector< Real > > & get_d2xidxyz2() const
Second derivatives of "xi" reference coordinate wrt physical coordinates.
Definition: fe_map.h:381
std::vector< std::vector< Real > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
Definition: fe_map.h:901
Class contained in FE that encapsulates mapping (i.e.
Definition: fe_map.h:47
const std::vector< RealGradient > & get_d2xyzdxideta() const
Definition: fe_map.h:285
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823
void compute_single_point_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem, unsigned int p, const std::vector< const Node *> &elem_nodes, bool compute_second_derivatives)
Compute the jacobian and some other additional data fields at the single point with index p...
Definition: fe_map.C:447
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889
std::vector< std::vector< Real > > & get_dphideta_map()
Definition: fe_map.h:566
void add_calculations()
Allows the user to prerequest additional calculations in between two calls to reinit();.
Definition: fe_map.C:88
const std::vector< std::vector< Real > > & get_d2psideta2() const
Definition: fe_map.h:543
void init_face_shape_functions(const std::vector< Point > &qp, const Elem *side)
Initializes the reference to physical element map for a side.
Definition: fe_boundary.C:437
const std::vector< Real > & get_detadx() const
Definition: fe_map.h:333
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45
std::vector< RealGradient > d2xyzdxidzeta_map
Vector of second partial derivatives in xi-zeta: d^2(x)/d(xi)d(zeta), d^2(y)/d(xi)d(zeta), d^2(z)/d(xi)d(zeta)
Definition: fe_map.h:784
Real jacobian_tolerance
The Jacobian tolerance used for determining when the mapping fails.
Definition: fe_map.h:1032