libMesh
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
libMesh::FEMap Class Reference

Class contained in FE that encapsulates mapping (i.e. More...

#include <fe_map.h>

Inheritance diagram for libMesh::FEMap:
[legend]

Public Member Functions

 FEMap (Real jtol=0)
 
virtual ~FEMap ()=default
 
template<unsigned int Dim>
void init_reference_to_physical_map (const std::vector< Point > &qp, const Elem *elem)
 
void init_reference_to_physical_map (unsigned int dim, const std::vector< Point > &qp, const Elem *elem)
 
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. More...
 
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. More...
 
virtual void compute_null_map (const unsigned int dim, const std::vector< Real > &qw)
 Assign a fake jacobian and some other additional data fields. More...
 
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. More...
 
virtual void compute_face_map (int dim, const std::vector< Real > &qw, const Elem *side)
 Same as compute_map, but for a side. More...
 
void compute_edge_map (int dim, const std::vector< Real > &qw, const Elem *side)
 Same as before, but for an edge. More...
 
template<unsigned int Dim>
void init_face_shape_functions (const std::vector< Point > &qp, const Elem *side)
 Initializes the reference to physical element map for a side. More...
 
template<unsigned int Dim>
void init_edge_shape_functions (const std::vector< Point > &qp, const Elem *edge)
 Same as before, but for an edge. More...
 
const std::vector< Point > & get_xyz () const
 
const std::vector< Real > & get_jacobian () const
 
const std::vector< Real > & get_JxW () const
 
const std::vector< RealGradient > & get_dxyzdxi () const
 
const std::vector< RealGradient > & get_dxyzdeta () const
 
const std::vector< RealGradient > & get_dxyzdzeta () const
 
const std::vector< RealGradient > & get_d2xyzdxi2 () const
 
const std::vector< RealGradient > & get_d2xyzdeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdzeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdxideta () const
 
const std::vector< RealGradient > & get_d2xyzdxidzeta () const
 
const std::vector< RealGradient > & get_d2xyzdetadzeta () const
 
const std::vector< Real > & get_dxidx () const
 
const std::vector< Real > & get_dxidy () const
 
const std::vector< Real > & get_dxidz () const
 
const std::vector< Real > & get_detadx () const
 
const std::vector< Real > & get_detady () const
 
const std::vector< Real > & get_detadz () const
 
const std::vector< Real > & get_dzetadx () const
 
const std::vector< Real > & get_dzetady () const
 
const std::vector< Real > & get_dzetadz () const
 
const std::vector< std::vector< Real > > & get_d2xidxyz2 () const
 Second derivatives of "xi" reference coordinate wrt physical coordinates. More...
 
const std::vector< std::vector< Real > > & get_d2etadxyz2 () const
 Second derivatives of "eta" reference coordinate wrt physical coordinates. More...
 
const std::vector< std::vector< Real > > & get_d2zetadxyz2 () const
 Second derivatives of "zeta" reference coordinate wrt physical coordinates. More...
 
const std::vector< std::vector< Real > > & get_psi () const
 
const std::vector< std::vector< Real > > & get_phi_map () const
 
const std::vector< std::vector< Real > > & get_dphidxi_map () const
 
const std::vector< std::vector< Real > > & get_dphideta_map () const
 
const std::vector< std::vector< Real > > & get_dphidzeta_map () const
 
const std::vector< std::vector< Point > > & get_tangents () const
 
const std::vector< Point > & get_normals () const
 
const std::vector< Real > & get_curvatures () const
 
void print_JxW (std::ostream &os) const
 Prints the Jacobian times the weight for each quadrature point. More...
 
void print_xyz (std::ostream &os) const
 Prints the spatial location of each quadrature point (on the physical element). More...
 
std::vector< std::vector< Real > > & get_psi ()
 
std::vector< std::vector< Real > > & get_dpsidxi ()
 
const std::vector< std::vector< Real > > & get_dpsidxi () const
 
std::vector< std::vector< Real > > & get_dpsideta ()
 
const std::vector< std::vector< Real > > & get_dpsideta () const
 
std::vector< std::vector< Real > > & get_d2psidxi2 ()
 
const std::vector< std::vector< Real > > & get_d2psidxi2 () const
 
std::vector< std::vector< Real > > & get_d2psidxideta ()
 
const std::vector< std::vector< Real > > & get_d2psidxideta () const
 
std::vector< std::vector< Real > > & get_d2psideta2 ()
 
const std::vector< std::vector< Real > > & get_d2psideta2 () const
 
std::vector< std::vector< Real > > & get_phi_map ()
 
std::vector< std::vector< Real > > & get_dphidxi_map ()
 
std::vector< std::vector< Real > > & get_dphideta_map ()
 
std::vector< std::vector< Real > > & get_dphidzeta_map ()
 
std::vector< std::vector< Real > > & get_d2phidxi2_map ()
 
std::vector< std::vector< Real > > & get_d2phidxideta_map ()
 
std::vector< std::vector< Real > > & get_d2phidxidzeta_map ()
 
std::vector< std::vector< Real > > & get_d2phideta2_map ()
 
std::vector< std::vector< Real > > & get_d2phidetadzeta_map ()
 
std::vector< std::vector< Real > > & get_d2phidzeta2_map ()
 
std::vector< Real > & get_JxW ()
 
void add_calculations ()
 Allows the user to prerequest additional calculations in between two calls to reinit();. More...
 
void set_jacobian_tolerance (Real tol)
 Set the Jacobian tolerance used for determining when the mapping fails. More...
 

Static Public Member Functions

static std::unique_ptr< FEMapbuild (FEType fe_type)
 
static FEFamily map_fe_type (const Elem &elem)
 
static Point map (const unsigned int dim, const Elem *elem, const Point &reference_point)
 
static Point map_deriv (const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
 
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)
 
static void inverse_map (unsigned int dim, const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
 Takes a number points in physical space (in the physical_points vector) and finds their location on the reference element for the input element elem. More...
 

Protected Member Functions

void determine_calculations ()
 Determine which values are to be calculated. More...
 
void resize_quadrature_map_vectors (const unsigned int dim, unsigned int n_qp)
 A utility function for use by compute_*_map. More...
 
Real dxdxi_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dydxi_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dzdxi_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dxdeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dydeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dzdeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dxdzeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dydzeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 
Real dzdzeta_map (const unsigned int p) const
 Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected. More...
 

Protected Attributes

std::vector< Pointxyz
 The spatial locations of the quadrature points. More...
 
std::vector< RealGradientdxyzdxi_map
 Vector of partial derivatives: d(x)/d(xi), d(y)/d(xi), d(z)/d(xi) More...
 
std::vector< RealGradientdxyzdeta_map
 Vector of partial derivatives: d(x)/d(eta), d(y)/d(eta), d(z)/d(eta) More...
 
std::vector< RealGradientdxyzdzeta_map
 Vector of partial derivatives: d(x)/d(zeta), d(y)/d(zeta), d(z)/d(zeta) More...
 
std::vector< RealGradientd2xyzdxi2_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. More...
 
std::vector< RealGradientd2xyzdxideta_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(xi)d(eta) More...
 
std::vector< RealGradientd2xyzdeta2_map
 Vector of second partial derivatives in eta: d^2(x)/d(eta)^2. More...
 
std::vector< RealGradientd2xyzdxidzeta_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) More...
 
std::vector< RealGradientd2xyzdetadzeta_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(z)/d(eta)d(zeta) More...
 
std::vector< RealGradientd2xyzdzeta2_map
 Vector of second partial derivatives in zeta: d^2(x)/d(zeta)^2. More...
 
std::vector< Realdxidx_map
 Map for partial derivatives: d(xi)/d(x). More...
 
std::vector< Realdxidy_map
 Map for partial derivatives: d(xi)/d(y). More...
 
std::vector< Realdxidz_map
 Map for partial derivatives: d(xi)/d(z). More...
 
std::vector< Realdetadx_map
 Map for partial derivatives: d(eta)/d(x). More...
 
std::vector< Realdetady_map
 Map for partial derivatives: d(eta)/d(y). More...
 
std::vector< Realdetadz_map
 Map for partial derivatives: d(eta)/d(z). More...
 
std::vector< Realdzetadx_map
 Map for partial derivatives: d(zeta)/d(x). More...
 
std::vector< Realdzetady_map
 Map for partial derivatives: d(zeta)/d(y). More...
 
std::vector< Realdzetadz_map
 Map for partial derivatives: d(zeta)/d(z). More...
 
std::vector< std::vector< Real > > d2xidxyz2_map
 Second derivatives of "xi" reference coordinate wrt physical coordinates. More...
 
std::vector< std::vector< Real > > d2etadxyz2_map
 Second derivatives of "eta" reference coordinate wrt physical coordinates. More...
 
std::vector< std::vector< Real > > d2zetadxyz2_map
 Second derivatives of "zeta" reference coordinate wrt physical coordinates. More...
 
std::vector< std::vector< Real > > phi_map
 Map for the shape function phi. More...
 
std::vector< std::vector< Real > > dphidxi_map
 Map for the derivative, d(phi)/d(xi). More...
 
std::vector< std::vector< Real > > dphideta_map
 Map for the derivative, d(phi)/d(eta). More...
 
std::vector< std::vector< Real > > dphidzeta_map
 Map for the derivative, d(phi)/d(zeta). More...
 
std::vector< std::vector< Real > > d2phidxi2_map
 Map for the second derivative, d^2(phi)/d(xi)^2. More...
 
std::vector< std::vector< Real > > d2phidxideta_map
 Map for the second derivative, d^2(phi)/d(xi)d(eta). More...
 
std::vector< std::vector< Real > > d2phidxidzeta_map
 Map for the second derivative, d^2(phi)/d(xi)d(zeta). More...
 
std::vector< std::vector< Real > > d2phideta2_map
 Map for the second derivative, d^2(phi)/d(eta)^2. More...
 
std::vector< std::vector< Real > > d2phidetadzeta_map
 Map for the second derivative, d^2(phi)/d(eta)d(zeta). More...
 
std::vector< std::vector< Real > > d2phidzeta2_map
 Map for the second derivative, d^2(phi)/d(zeta)^2. More...
 
std::vector< std::vector< Real > > psi_map
 Map for the side shape functions, psi. More...
 
std::vector< std::vector< Real > > dpsidxi_map
 Map for the derivative of the side functions, d(psi)/d(xi). More...
 
std::vector< std::vector< Real > > dpsideta_map
 Map for the derivative of the side function, d(psi)/d(eta). More...
 
std::vector< std::vector< Real > > d2psidxi2_map
 Map for the second derivatives (in xi) of the side shape functions. More...
 
std::vector< std::vector< Real > > d2psidxideta_map
 Map for the second (cross) derivatives in xi, eta of the side shape functions. More...
 
std::vector< std::vector< Real > > d2psideta2_map
 Map for the second derivatives (in eta) of the side shape functions. More...
 
std::vector< std::vector< Point > > tangents
 Tangent vectors on boundary at quadrature points. More...
 
std::vector< Pointnormals
 Normal vectors on boundary at quadrature points. More...
 
std::vector< Realcurvatures
 The mean curvature (= one half the sum of the principal curvatures) on the boundary at the quadrature points. More...
 
std::vector< Realjac
 Jacobian values at quadrature points. More...
 
std::vector< RealJxW
 Jacobian*Weight values at quadrature points. More...
 
bool calculations_started
 Have calculations with this object already been started? Then all get_* functions should already have been called. More...
 
bool calculate_xyz
 Should we calculate physical point locations? More...
 
bool calculate_dxyz
 Should we calculate mapping gradients? More...
 
bool calculate_d2xyz
 Should we calculate mapping hessians? More...
 
Real jacobian_tolerance
 The Jacobian tolerance used for determining when the mapping fails. More...
 

Private Member Functions

void compute_inverse_map_second_derivs (unsigned p)
 A helper function used by FEMap::compute_single_point_map() to compute second derivatives of the inverse map. More...
 

Private Attributes

std::vector< const Node * > _elem_nodes
 Work vector for compute_affine_map() More...
 

Detailed Description

Class contained in FE that encapsulates mapping (i.e.

from physical space to reference space and vice-versa) quantities and operations.

Author
Paul Bauman
Date
2012 Computes finite element mapping function values, gradients, etc.

Definition at line 47 of file fe_map.h.

Constructor & Destructor Documentation

◆ FEMap()

libMesh::FEMap::FEMap ( Real  jtol = 0)

Definition at line 62 of file fe_map.C.

62  :
63  calculations_started(false),
64  calculate_xyz(false),
65  calculate_dxyz(false),
66 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
67  calculate_d2xyz(false),
68 #endif
69  jacobian_tolerance(jtol)
70 {}
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
Real jacobian_tolerance
The Jacobian tolerance used for determining when the mapping fails.
Definition: fe_map.h:1032

◆ ~FEMap()

virtual libMesh::FEMap::~FEMap ( )
virtualdefault

Member Function Documentation

◆ add_calculations()

void libMesh::FEMap::add_calculations ( )

Allows the user to prerequest additional calculations in between two calls to reinit();.

Definition at line 88 of file fe_map.C.

References calculations_started, d2phideta2_map, d2phidetadzeta_map, d2phidxi2_map, d2phidxideta_map, d2phidxidzeta_map, d2phidzeta2_map, dphideta_map, dphidxi_map, dphidzeta_map, and phi_map.

89 {
90  this->calculations_started = false;
91  this->phi_map.clear();
92  this->dphidxi_map.clear();
93  this->dphideta_map.clear();
94  this->dphidzeta_map.clear();
95 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
96  this->d2phidxi2_map.clear();
97  this->d2phidxideta_map.clear();
98  this->d2phideta2_map.clear();
99  this->d2phidxidzeta_map.clear();
100  this->d2phidetadzeta_map.clear();
101  this->d2phidzeta2_map.clear();
102 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
103 }
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
Definition: fe_map.h:894
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 > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
Definition: fe_map.h:916
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< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
Definition: fe_map.h:921
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< std::vector< Real > > d2phidxideta_map
Map for the second derivative, d^2(phi)/d(xi)d(eta).
Definition: fe_map.h:906
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 > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
Definition: fe_map.h:901
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889

◆ build()

std::unique_ptr< FEMap > libMesh::FEMap::build ( FEType  fe_type)
static

Definition at line 74 of file fe_map.C.

References libMesh::FEType::family, and libMesh::XYZ.

75 {
76  switch( fe_type.family )
77  {
78  case XYZ:
79  return std::make_unique<FEXYZMap>();
80 
81  default:
82  return std::make_unique<FEMap>();
83  }
84 }

◆ compute_affine_map()

void libMesh::FEMap::compute_affine_map ( const unsigned int  dim,
const std::vector< Real > &  qw,
const Elem elem 
)
virtual

Compute the jacobian and some other additional data fields.

Takes the integration weights as input, along with a pointer to the element. The element is assumed to have a constant Jacobian

Definition at line 1281 of file fe_map.C.

References _elem_nodes, calculate_d2xyz, calculate_dxyz, calculate_xyz, compute_single_point_map(), d2xyzdeta2_map, d2xyzdetadzeta_map, d2xyzdxi2_map, d2xyzdxideta_map, d2xyzdxidzeta_map, d2xyzdzeta2_map, detadx_map, detady_map, detadz_map, dim, dxidx_map, dxidy_map, dxidz_map, dxyzdeta_map, dxyzdxi_map, dxyzdzeta_map, dzetadx_map, dzetady_map, dzetadz_map, libMesh::index_range(), jac, JxW, libMesh::libmesh_assert(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::node_ptr(), phi_map, resize_quadrature_map_vectors(), and xyz.

Referenced by compute_map().

1284 {
1285  // Start logging the map computation.
1286  LOG_SCOPE("compute_affine_map()", "FEMap");
1287 
1288  libmesh_assert(elem);
1289 
1290  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1291 
1292  // Resize the vectors to hold data at the quadrature points
1293  this->resize_quadrature_map_vectors(dim, n_qp);
1294 
1295  // Determine the nodes contributing to element elem
1296  unsigned int n_nodes = elem->n_nodes();
1297  _elem_nodes.resize(elem->n_nodes());
1298  for (unsigned int i=0; i<n_nodes; i++)
1299  _elem_nodes[i] = elem->node_ptr(i);
1300 
1301  // Compute map at quadrature point 0
1302  this->compute_single_point_map(dim, qw, elem, 0, _elem_nodes, /*compute_second_derivatives=*/false);
1303 
1304  // Compute xyz at all other quadrature points
1305  if (calculate_xyz)
1306  for (unsigned int p=1; p<n_qp; p++)
1307  {
1308  xyz[p].zero();
1309  for (auto i : index_range(phi_map)) // sum over the nodes
1310  xyz[p].add_scaled (*_elem_nodes[i], phi_map[i][p]);
1311  }
1312 
1313  // Copy other map data from quadrature point 0
1314  if (calculate_dxyz)
1315  for (unsigned int p=1; p<n_qp; p++) // for each extra quadrature point
1316  {
1317  dxyzdxi_map[p] = dxyzdxi_map[0];
1318  dxidx_map[p] = dxidx_map[0];
1319  dxidy_map[p] = dxidy_map[0];
1320  dxidz_map[p] = dxidz_map[0];
1321 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1322  // The map should be affine, so second derivatives are zero
1323  if (calculate_d2xyz)
1324  d2xyzdxi2_map[p] = 0.;
1325 #endif
1326  if (dim > 1)
1327  {
1328  dxyzdeta_map[p] = dxyzdeta_map[0];
1329  detadx_map[p] = detadx_map[0];
1330  detady_map[p] = detady_map[0];
1331  detadz_map[p] = detadz_map[0];
1332 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1333  if (calculate_d2xyz)
1334  {
1335  d2xyzdxideta_map[p] = 0.;
1336  d2xyzdeta2_map[p] = 0.;
1337  }
1338 #endif
1339  if (dim > 2)
1340  {
1341  dxyzdzeta_map[p] = dxyzdzeta_map[0];
1342  dzetadx_map[p] = dzetadx_map[0];
1343  dzetady_map[p] = dzetady_map[0];
1344  dzetadz_map[p] = dzetadz_map[0];
1345 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1346  if (calculate_d2xyz)
1347  {
1348  d2xyzdxidzeta_map[p] = 0.;
1349  d2xyzdetadzeta_map[p] = 0.;
1350  d2xyzdzeta2_map[p] = 0.;
1351  }
1352 #endif
1353  }
1354  }
1355  jac[p] = jac[0];
1356  JxW[p] = JxW[0] / qw[0] * qw[p];
1357  }
1358 }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
unsigned int dim
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
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
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
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< 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
const dof_id_type n_nodes
Definition: tecplot_io.C:67
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
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
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810
std::vector< const Node * > _elem_nodes
Work vector for compute_affine_map()
Definition: fe_map.h:1044
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
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
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835
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
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111
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

◆ compute_edge_map()

void libMesh::FEMap::compute_edge_map ( int  dim,
const std::vector< Real > &  qw,
const Elem side 
)

Same as before, but for an edge.

Useful for some projections.

Definition at line 1005 of file fe_boundary.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, compute_face_map(), curvatures, d2psidxi2_map, d2xyzdeta2_map, d2xyzdxi2_map, d2xyzdxideta_map, determine_calculations(), dim, dpsidxi_map, dxdxi_map(), dxyzdeta_map, dxyzdxi_map, dydxi_map(), dzdxi_map(), JxW, libMesh::libmesh_assert(), normals, libMesh::Elem::point(), psi_map, libMesh::Real, std::sqrt(), tangents, and xyz.

1008 {
1009  libmesh_assert(edge);
1010 
1011  if (dim == 2)
1012  {
1013  // A 2D finite element living in either 2D or 3D space.
1014  // The edges here are the sides of the element, so the
1015  // (misnamed) compute_face_map function does what we want
1016  this->compute_face_map(dim, qw, edge);
1017  return;
1018  }
1019 
1020  libmesh_assert_equal_to (dim, 3); // 1D is unnecessary and currently unsupported
1021 
1022  LOG_SCOPE("compute_edge_map()", "FEMap");
1023 
1024  // We're calculating now!
1025  this->determine_calculations();
1026 
1027  // The number of quadrature points.
1028  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1029 
1030  // Resize the vectors to hold data at the quadrature points
1031  if (calculate_xyz)
1032  this->xyz.resize(n_qp);
1033  if (calculate_dxyz)
1034  {
1035  this->dxyzdxi_map.resize(n_qp);
1036  this->dxyzdeta_map.resize(n_qp);
1037  this->tangents.resize(n_qp);
1038  this->normals.resize(n_qp);
1039  this->JxW.resize(n_qp);
1040  }
1041 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1042  if (calculate_d2xyz)
1043  {
1044  this->d2xyzdxi2_map.resize(n_qp);
1045  this->d2xyzdxideta_map.resize(n_qp);
1046  this->d2xyzdeta2_map.resize(n_qp);
1047  this->curvatures.resize(n_qp);
1048  }
1049 #endif
1050 
1051  // Clear the entities that will be summed
1052  for (unsigned int p=0; p<n_qp; p++)
1053  {
1054  if (calculate_xyz)
1055  this->xyz[p].zero();
1056  if (calculate_dxyz)
1057  {
1058  this->tangents[p].resize(1);
1059  this->dxyzdxi_map[p].zero();
1060  this->dxyzdeta_map[p].zero();
1061  }
1062 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1063  if (calculate_d2xyz)
1064  {
1065  this->d2xyzdxi2_map[p].zero();
1066  this->d2xyzdxideta_map[p].zero();
1067  this->d2xyzdeta2_map[p].zero();
1068  }
1069 #endif
1070  }
1071 
1072  // compute x, dxdxi at the quadrature points
1073  for (unsigned int i=0,
1074  psi_map_size=cast_int<unsigned int>(psi_map.size());
1075  i != psi_map_size; i++) // sum over the nodes
1076  {
1077  const Point & edge_point = edge->point(i);
1078 
1079  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
1080  {
1081  if (calculate_xyz)
1082  this->xyz[p].add_scaled (edge_point, this->psi_map[i][p]);
1083  if (calculate_dxyz)
1084  this->dxyzdxi_map[p].add_scaled (edge_point, this->dpsidxi_map[i][p]);
1085 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1086  if (calculate_d2xyz)
1087  this->d2xyzdxi2_map[p].add_scaled (edge_point, this->d2psidxi2_map[i][p]);
1088 #endif
1089  }
1090  }
1091 
1092  // Compute the tangents at the quadrature point
1093  // FIXME: normals (plural!) and curvatures are uncalculated
1094  if (calculate_dxyz)
1095  for (unsigned int p=0; p<n_qp; p++)
1096  {
1097  // const Point n = this->dxyzdxi_map[p].cross(this->dxyzdeta_map[p]);
1098  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
1099 
1100  // compute the jacobian at the quadrature points
1101  const Real the_jac = std::sqrt(this->dxdxi_map(p)*this->dxdxi_map(p) +
1102  this->dydxi_map(p)*this->dydxi_map(p) +
1103  this->dzdxi_map(p)*this->dzdxi_map(p));
1104 
1105  libmesh_assert_greater (the_jac, 0.);
1106 
1107  this->JxW[p] = the_jac*qw[p];
1108  }
1109 }
std::vector< std::vector< Real > > psi_map
Map for the side shape functions, psi.
Definition: fe_map.h:933
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
unsigned int dim
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
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:53
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
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< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
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
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
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
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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< std::vector< Point > > tangents
Tangent vectors on boundary at quadrature points.
Definition: fe_map.h:975
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
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
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
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

◆ compute_face_map()

void libMesh::FEMap::compute_face_map ( int  dim,
const std::vector< Real > &  qw,
const Elem side 
)
virtual

Same as compute_map, but for a side.

Useful for boundary integration.

Reimplemented in libMesh::FEXYZMap.

Definition at line 641 of file fe_boundary.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, libMesh::TypeVector< T >::cross(), curvatures, d2psideta2_map, d2psidxi2_map, d2psidxideta_map, d2xyzdeta2_map, d2xyzdxi2_map, d2xyzdxideta_map, libMesh::Elem::default_order(), determine_calculations(), dim, dpsideta_map, dpsidxi_map, dxdeta_map(), dxdxi_map(), dxyzdeta_map, dxyzdxi_map, dydeta_map(), dydxi_map(), dzdeta_map(), dzdxi_map(), libMesh::Elem::interior_parent(), inverse_map(), JxW, libMesh::libmesh_assert(), map_deriv(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), libMesh::Elem::node_id(), normals, libMesh::Elem::point(), psi_map, libMesh::Real, std::sqrt(), tangents, libMesh::TypeVector< T >::unit(), and xyz.

Referenced by compute_edge_map(), and libMesh::FEXYZMap::compute_face_map().

643 {
644  libmesh_assert(side);
645 
646  // We're calculating now!
647  this->determine_calculations();
648 
649  LOG_SCOPE("compute_face_map()", "FEMap");
650 
651  // The number of quadrature points.
652  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
653 
654  const FEFamily mapping_family = FEMap::map_fe_type(*side);
655  const Order mapping_order (side->default_order());
656  const FEType map_fe_type(mapping_order, mapping_family);
657 
658  // Do not use the p_level(), if any, that is inherited by the side.
659  const unsigned int n_mapping_shape_functions =
660  FEInterface::n_shape_functions(map_fe_type, /*extra_order=*/0, side);
661 
662  switch (dim)
663  {
664  case 1:
665  {
666  // A 1D finite element, currently assumed to be in 1D space
667  // This means the boundary is a "0D finite element", a
668  // NODEELEM.
669 
670  // Resize the vectors to hold data at the quadrature points
671  {
672  if (calculate_xyz)
673  this->xyz.resize(n_qp);
674  if (calculate_dxyz)
675  normals.resize(n_qp);
676 
677  if (calculate_dxyz)
678  this->JxW.resize(n_qp);
679  }
680 
681  // If we have no quadrature points, there's nothing else to do
682  if (!n_qp)
683  break;
684 
685  // We need to look back at the full edge to figure out the normal
686  // vector
687  const Elem * elem = side->interior_parent();
688  libmesh_assert (elem);
689  if (calculate_dxyz)
690  {
691  if (side->node_id(0) == elem->node_id(0))
692  normals[0] = Point(-1.);
693  else
694  {
695  libmesh_assert_equal_to (side->node_id(0),
696  elem->node_id(1));
697  normals[0] = Point(1.);
698  }
699  }
700 
701  // Calculate x at the point
702  if (calculate_xyz)
703  libmesh_assert_equal_to (this->psi_map.size(), 1);
704  // In the unlikely event we have multiple quadrature
705  // points, they'll be in the same place
706  for (unsigned int p=0; p<n_qp; p++)
707  {
708  if (calculate_xyz)
709  {
710  this->xyz[p].zero();
711  this->xyz[p].add_scaled (side->point(0), this->psi_map[0][p]);
712  }
713  if (calculate_dxyz)
714  {
715  normals[p] = normals[0];
716  this->JxW[p] = 1.0*qw[p];
717  }
718  }
719 
720  // done computing the map
721  break;
722  }
723 
724  case 2:
725  {
726  // A 2D finite element living in either 2D or 3D space.
727  // This means the boundary is a 1D finite element, i.e.
728  // and EDGE2 or EDGE3.
729  // Resize the vectors to hold data at the quadrature points
730  {
731  if (calculate_xyz)
732  this->xyz.resize(n_qp);
733  if (calculate_dxyz)
734  {
735  this->dxyzdxi_map.resize(n_qp);
736  this->tangents.resize(n_qp);
737  this->normals.resize(n_qp);
738 
739  this->JxW.resize(n_qp);
740  }
741 
742 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
743  if (calculate_d2xyz)
744  {
745  this->d2xyzdxi2_map.resize(n_qp);
746  this->curvatures.resize(n_qp);
747  }
748 #endif
749  }
750 
751  // Clear the entities that will be summed
752  // Compute the tangent & normal at the quadrature point
753  for (unsigned int p=0; p<n_qp; p++)
754  {
755  if (calculate_xyz)
756  this->xyz[p].zero();
757  if (calculate_dxyz)
758  {
759  this->tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
760  this->dxyzdxi_map[p].zero();
761  }
762 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
763  if (calculate_d2xyz)
764  this->d2xyzdxi2_map[p].zero();
765 #endif
766  }
767 
768  // compute x, dxdxi at the quadrature points
769  for (unsigned int i=0; i<n_mapping_shape_functions; i++) // sum over the nodes
770  {
771  const Point & side_point = side->point(i);
772 
773  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
774  {
775  if (calculate_xyz)
776  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
777  if (calculate_dxyz)
778  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
779 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
780  if (calculate_d2xyz)
781  this->d2xyzdxi2_map[p].add_scaled(side_point, this->d2psidxi2_map[i][p]);
782 #endif
783  }
784  }
785 
786  // Compute the tangent & normal at the quadrature point
787  if (calculate_dxyz)
788  {
789  for (unsigned int p=0; p<n_qp; p++)
790  {
791  // The first tangent comes from just the edge's Jacobian
792  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
793 
794 #if LIBMESH_DIM == 2
795  // For a 2D element living in 2D, the normal is given directly
796  // from the entries in the edge Jacobian.
797  this->normals[p] = (Point(this->dxyzdxi_map[p](1), -this->dxyzdxi_map[p](0), 0.)).unit();
798 
799 #elif LIBMESH_DIM == 3
800  // For a 2D element living in 3D, there is a second tangent.
801  // For the second tangent, we need to refer to the full
802  // element's (not just the edge's) Jacobian.
803  const Elem * elem = side->interior_parent();
804  libmesh_assert(elem);
805 
806  // Inverse map xyz[p] to a reference point on the parent...
807  Point reference_point = FEMap::inverse_map(2, elem, this->xyz[p]);
808 
809  // Get dxyz/dxi and dxyz/deta from the parent map.
810  Point dx_dxi = FEMap::map_deriv (2, elem, 0, reference_point);
811  Point dx_deta = FEMap::map_deriv (2, elem, 1, reference_point);
812 
813  // The second tangent vector is formed by crossing these vectors.
814  tangents[p][1] = dx_dxi.cross(dx_deta).unit();
815 
816  // Finally, the normal in this case is given by crossing these
817  // two tangents.
818  normals[p] = tangents[p][0].cross(tangents[p][1]).unit();
819 #endif
820 
821 
822 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
823  // The curvature is computed via the familiar Frenet formula:
824  // curvature = [d^2(x) / d (xi)^2] dot [normal]
825  // For a reference, see:
826  // F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill, p. 310
827  //
828  // Note: The sign convention here is different from the
829  // 3D case. Concave-upward curves (smiles) have a positive
830  // curvature. Concave-downward curves (frowns) have a
831  // negative curvature. Be sure to take that into account!
832  if (calculate_d2xyz)
833  {
834  const Real numerator = this->d2xyzdxi2_map[p] * this->normals[p];
835  const Real denominator = this->dxyzdxi_map[p].norm_sq();
836  libmesh_assert_not_equal_to (denominator, 0);
837  curvatures[p] = numerator / denominator;
838  }
839 #endif
840  }
841 
842  // compute the jacobian at the quadrature points
843  for (unsigned int p=0; p<n_qp; p++)
844  {
845  const Real the_jac = this->dxyzdxi_map[p].norm();
846 
847  libmesh_assert_greater (the_jac, 0.);
848 
849  this->JxW[p] = the_jac*qw[p];
850  }
851  }
852 
853  // done computing the map
854  break;
855  }
856 
857 
858 
859  case 3:
860  {
861  // A 3D finite element living in 3D space.
862  // Resize the vectors to hold data at the quadrature points
863  {
864  if (calculate_xyz)
865  this->xyz.resize(n_qp);
866  if (calculate_dxyz)
867  {
868  this->dxyzdxi_map.resize(n_qp);
869  this->dxyzdeta_map.resize(n_qp);
870  this->tangents.resize(n_qp);
871  this->normals.resize(n_qp);
872  this->JxW.resize(n_qp);
873  }
874 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
875  if (calculate_d2xyz)
876  {
877  this->d2xyzdxi2_map.resize(n_qp);
878  this->d2xyzdxideta_map.resize(n_qp);
879  this->d2xyzdeta2_map.resize(n_qp);
880  this->curvatures.resize(n_qp);
881  }
882 #endif
883  }
884 
885  // Clear the entities that will be summed
886  for (unsigned int p=0; p<n_qp; p++)
887  {
888  if (calculate_xyz)
889  this->xyz[p].zero();
890  if (calculate_dxyz)
891  {
892  this->tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
893  this->dxyzdxi_map[p].zero();
894  this->dxyzdeta_map[p].zero();
895  }
896 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
897  if (calculate_d2xyz)
898  {
899  this->d2xyzdxi2_map[p].zero();
900  this->d2xyzdxideta_map[p].zero();
901  this->d2xyzdeta2_map[p].zero();
902  }
903 #endif
904  }
905 
906  // compute x, dxdxi at the quadrature points
907  for (unsigned int i=0; i<n_mapping_shape_functions; i++) // sum over the nodes
908  {
909  const Point & side_point = side->point(i);
910 
911  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
912  {
913  if (calculate_xyz)
914  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
915  if (calculate_dxyz)
916  {
917  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
918  this->dxyzdeta_map[p].add_scaled(side_point, this->dpsideta_map[i][p]);
919  }
920 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
921  if (calculate_d2xyz)
922  {
923  this->d2xyzdxi2_map[p].add_scaled (side_point, this->d2psidxi2_map[i][p]);
924  this->d2xyzdxideta_map[p].add_scaled(side_point, this->d2psidxideta_map[i][p]);
925  this->d2xyzdeta2_map[p].add_scaled (side_point, this->d2psideta2_map[i][p]);
926  }
927 #endif
928  }
929  }
930 
931  // Compute the tangents, normal, and curvature at the quadrature point
932  if (calculate_dxyz)
933  {
934  for (unsigned int p=0; p<n_qp; p++)
935  {
936  const Point n = this->dxyzdxi_map[p].cross(this->dxyzdeta_map[p]);
937  this->normals[p] = n.unit();
938  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
939  this->tangents[p][1] = n.cross(this->dxyzdxi_map[p]).unit();
940 
941 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
942  if (calculate_d2xyz)
943  {
944  // Compute curvature using the typical nomenclature
945  // of the first and second fundamental forms.
946  // For reference, see:
947  // 1) http://mathworld.wolfram.com/MeanCurvature.html
948  // (note -- they are using inward normal)
949  // 2) F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill
950  const Real L = -this->d2xyzdxi2_map[p] * this->normals[p];
951  const Real M = -this->d2xyzdxideta_map[p] * this->normals[p];
952  const Real N = -this->d2xyzdeta2_map[p] * this->normals[p];
953  const Real E = this->dxyzdxi_map[p].norm_sq();
954  const Real F = this->dxyzdxi_map[p] * this->dxyzdeta_map[p];
955  const Real G = this->dxyzdeta_map[p].norm_sq();
956 
957  const Real numerator = E*N -2.*F*M + G*L;
958  const Real denominator = E*G - F*F;
959  libmesh_assert_not_equal_to (denominator, 0.);
960  curvatures[p] = 0.5*numerator/denominator;
961  }
962 #endif
963  }
964 
965  // compute the jacobian at the quadrature points, see
966  // http://sp81.msi.umn.edu:999/fluent/fidap/help/theory/thtoc.htm
967  for (unsigned int p=0; p<n_qp; p++)
968  {
969  const Real g11 = (dxdxi_map(p)*dxdxi_map(p) +
970  dydxi_map(p)*dydxi_map(p) +
971  dzdxi_map(p)*dzdxi_map(p));
972 
973  const Real g12 = (dxdxi_map(p)*dxdeta_map(p) +
974  dydxi_map(p)*dydeta_map(p) +
975  dzdxi_map(p)*dzdeta_map(p));
976 
977  const Real g21 = g12;
978 
979  const Real g22 = (dxdeta_map(p)*dxdeta_map(p) +
980  dydeta_map(p)*dydeta_map(p) +
981  dzdeta_map(p)*dzdeta_map(p));
982 
983 
984  const Real the_jac = std::sqrt(g11*g22 - g12*g21);
985 
986  libmesh_assert_greater (the_jac, 0.);
987 
988  this->JxW[p] = the_jac*qw[p];
989  }
990  }
991 
992  // done computing the map
993  break;
994  }
995 
996 
997  default:
998  libmesh_error_msg("Invalid dimension dim = " << dim);
999  }
1000 }
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
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
std::vector< std::vector< Real > > d2psideta2_map
Map for the second derivatives (in eta) of the side shape functions.
Definition: fe_map.h:968
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
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
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
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
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:53
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
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< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
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
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
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
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 > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939
std::vector< std::vector< Point > > tangents
Tangent vectors on boundary at quadrature points.
Definition: fe_map.h:975
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
static Point map_deriv(const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
Definition: fe_map.C:2101
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
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
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
FEFamily
defines an enum for finite element families.
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ compute_inverse_map_second_derivs()

void libMesh::FEMap::compute_inverse_map_second_derivs ( unsigned  p)
private

A helper function used by FEMap::compute_single_point_map() to compute second derivatives of the inverse map.

Definition at line 1506 of file fe_map.C.

References d2etadxyz2_map, d2xidxyz2_map, d2xyzdeta2_map, d2xyzdetadzeta_map, d2xyzdxi2_map, d2xyzdxideta_map, d2xyzdxidzeta_map, d2xyzdzeta2_map, d2zetadxyz2_map, detadx_map, detady_map, detadz_map, dxidx_map, dxidy_map, dxidz_map, dzetadx_map, dzetady_map, dzetadz_map, and libMesh::libmesh_ignore().

Referenced by compute_single_point_map().

1507 {
1508 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1509  // Only certain second derivatives are valid depending on the
1510  // dimension...
1511  std::set<unsigned> valid_indices;
1512 
1513  // Construct J^{-1}, A, and B matrices (see JWP's notes for details)
1514  // for cases in which the element dimension matches LIBMESH_DIM.
1515 #if LIBMESH_DIM==1
1516  RealTensor
1517  Jinv(dxidx_map[p], 0., 0.,
1518  0., 0., 0.,
1519  0., 0., 0.),
1520 
1521  A(d2xyzdxi2_map[p](0), 0., 0.,
1522  0., 0., 0.,
1523  0., 0., 0.),
1524 
1525  B(0., 0., 0.,
1526  0., 0., 0.,
1527  0., 0., 0.);
1528 
1530  dxi (dxidx_map[p], 0., 0.),
1531  deta (0., 0., 0.),
1532  dzeta(0., 0., 0.);
1533 
1534  // In 1D, we have only the xx second derivative
1535  valid_indices.insert(0);
1536 
1537 #elif LIBMESH_DIM==2
1538  RealTensor
1539  Jinv(dxidx_map[p], dxidy_map[p], 0.,
1540  detadx_map[p], detady_map[p], 0.,
1541  0., 0., 0.),
1542 
1543  A(d2xyzdxi2_map[p](0), d2xyzdeta2_map[p](0), 0.,
1544  d2xyzdxi2_map[p](1), d2xyzdeta2_map[p](1), 0.,
1545  0., 0., 0.),
1546 
1547  B(d2xyzdxideta_map[p](0), 0., 0.,
1548  d2xyzdxideta_map[p](1), 0., 0.,
1549  0., 0., 0.);
1550 
1552  dxi (dxidx_map[p], dxidy_map[p], 0.),
1553  deta (detadx_map[p], detady_map[p], 0.),
1554  dzeta(0., 0., 0.);
1555 
1556  // In 2D, we have xx, xy, and yy second derivatives
1557  const unsigned tmp[3] = {0,1,3};
1558  valid_indices.insert(tmp, tmp+3);
1559 
1560 #elif LIBMESH_DIM==3
1561  RealTensor
1562  Jinv(dxidx_map[p], dxidy_map[p], dxidz_map[p],
1563  detadx_map[p], detady_map[p], detadz_map[p],
1564  dzetadx_map[p], dzetady_map[p], dzetadz_map[p]),
1565 
1566  A(d2xyzdxi2_map[p](0), d2xyzdeta2_map[p](0), d2xyzdzeta2_map[p](0),
1567  d2xyzdxi2_map[p](1), d2xyzdeta2_map[p](1), d2xyzdzeta2_map[p](1),
1568  d2xyzdxi2_map[p](2), d2xyzdeta2_map[p](2), d2xyzdzeta2_map[p](2)),
1569 
1573 
1575  dxi (dxidx_map[p], dxidy_map[p], dxidz_map[p]),
1576  deta (detadx_map[p], detady_map[p], detadz_map[p]),
1577  dzeta(dzetadx_map[p], dzetady_map[p], dzetadz_map[p]);
1578 
1579  // In 3D, we have xx, xy, xz, yy, yz, and zz second derivatives
1580  const unsigned tmp[6] = {0,1,2,3,4,5};
1581  valid_indices.insert(tmp, tmp+6);
1582 
1583 #endif
1584 
1585  // For (s,t) in {(x,x), (x,y), (x,z), (y,y), (y,z), (z,z)}, compute the
1586  // vector of inverse map second derivatives [xi_{s t}, eta_{s t}, zeta_{s t}]
1587  unsigned ctr=0;
1588  for (unsigned s=0; s<3; ++s)
1589  for (unsigned t=s; t<3; ++t)
1590  {
1591  if (valid_indices.count(ctr))
1592  {
1594  v1(dxi(s)*dxi(t),
1595  deta(s)*deta(t),
1596  dzeta(s)*dzeta(t)),
1597 
1598  v2(dxi(s)*deta(t) + deta(s)*dxi(t),
1599  dxi(s)*dzeta(t) + dzeta(s)*dxi(t),
1600  deta(s)*dzeta(t) + dzeta(s)*deta(t));
1601 
1602  // Compute the inverse map second derivatives
1603  RealVectorValue v3 = -Jinv*(A*v1 + B*v2);
1604 
1605  // Store them in the appropriate locations in the class data structures
1606  d2xidxyz2_map[p][ctr] = v3(0);
1607 
1608  if (LIBMESH_DIM > 1)
1609  d2etadxyz2_map[p][ctr] = v3(1);
1610 
1611  if (LIBMESH_DIM > 2)
1612  d2zetadxyz2_map[p][ctr] = v3(2);
1613  }
1614 
1615  // Increment the counter
1616  ctr++;
1617  }
1618 #else
1619  // to avoid compiler warnings:
1620  libmesh_ignore(p);
1621 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
1622 }
std::vector< std::vector< Real > > d2etadxyz2_map
Second derivatives of "eta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:867
VectorValue< Real > RealVectorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
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
std::vector< std::vector< Real > > d2xidxyz2_map
Second derivatives of "xi" reference coordinate wrt physical coordinates.
Definition: fe_map.h:861
RealTensorValue RealTensor
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
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
std::vector< Real > dzetadx_map
Map for partial derivatives: d(zeta)/d(x).
Definition: fe_map.h:842
Definition: assembly.h:38
void libmesh_ignore(const Args &...)
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
std::vector< std::vector< Real > > d2zetadxyz2_map
Second derivatives of "zeta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:873
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
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
Definition: fe_map.h:804
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823
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

◆ compute_map()

void libMesh::FEMap::compute_map ( const unsigned int  dim,
const std::vector< Real > &  qw,
const Elem elem,
bool  calculate_d2phi 
)
virtual

Compute the jacobian and some other additional data fields.

Takes the integration weights as input, along with a pointer to the element. Also takes a boolean parameter indicating whether second derivatives need to be calculated, allowing us to potentially skip unnecessary, expensive computations.

Definition at line 1437 of file fe_map.C.

References _elem_nodes, compute_affine_map(), compute_null_map(), compute_single_point_map(), dim, libMesh::MeshTools::Subdivision::find_one_ring(), libMesh::Elem::has_affine_map(), libMesh::libmesh_assert(), libMesh::Elem::n_nodes(), libMesh::Elem::node_index_range(), libMesh::Elem::node_ptr(), resize_quadrature_map_vectors(), libMesh::TRI3SUBDIVISION, and libMesh::Elem::type().

Referenced by libMesh::Elem::has_invertible_map().

1441 {
1442  if (!elem)
1443  {
1444  compute_null_map(dim, qw);
1445  return;
1446  }
1447 
1448  if (elem->has_affine_map())
1449  {
1450  compute_affine_map(dim, qw, elem);
1451  return;
1452  }
1453 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES
1454  libmesh_assert(!calculate_d2phi);
1455 #endif
1456 
1457  // Start logging the map computation.
1458  LOG_SCOPE("compute_map()", "FEMap");
1459 
1460  libmesh_assert(elem);
1461 
1462  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1463 
1464  // Resize the vectors to hold data at the quadrature points
1465  this->resize_quadrature_map_vectors(dim, n_qp);
1466 
1467  // Determine the nodes contributing to element elem
1468  if (elem->type() == TRI3SUBDIVISION)
1469  {
1470  // Subdivision surface FE require the 1-ring around elem
1471  libmesh_assert_equal_to (dim, 2);
1472  const Tri3Subdivision * sd_elem = static_cast<const Tri3Subdivision *>(elem);
1474  }
1475  else
1476  {
1477  // All other FE use only the nodes of elem itself
1478  _elem_nodes.resize(elem->n_nodes(), nullptr);
1479  for (auto i : elem->node_index_range())
1480  _elem_nodes[i] = elem->node_ptr(i);
1481  }
1482 
1483  // Compute map at all quadrature points
1484  for (unsigned int p=0; p!=n_qp; p++)
1485  this->compute_single_point_map(dim, qw, elem, p, _elem_nodes, calculate_d2phi);
1486 }
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
unsigned int dim
void find_one_ring(const Tri3Subdivision *elem, std::vector< const Node *> &nodes)
Determines the 1-ring of element elem, and writes it to the nodes vector.
libmesh_assert(ctx)
std::vector< const Node * > _elem_nodes
Work vector for compute_affine_map()
Definition: fe_map.h:1044
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
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
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

◆ compute_null_map()

void libMesh::FEMap::compute_null_map ( const unsigned int  dim,
const std::vector< Real > &  qw 
)
virtual

Assign a fake jacobian and some other additional data fields.

Takes the integration weights as input. For use on non-element evaluations.

Definition at line 1362 of file fe_map.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, d2xyzdeta2_map, d2xyzdetadzeta_map, d2xyzdxi2_map, d2xyzdxideta_map, d2xyzdxidzeta_map, d2xyzdzeta2_map, detadx_map, detady_map, detadz_map, dim, dxidx_map, dxidy_map, dxidz_map, dxyzdeta_map, dxyzdxi_map, dxyzdzeta_map, dzetadx_map, dzetady_map, dzetadz_map, jac, JxW, resize_quadrature_map_vectors(), and xyz.

Referenced by compute_map().

1364 {
1365  // Start logging the map computation.
1366  LOG_SCOPE("compute_null_map()", "FEMap");
1367 
1368  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1369 
1370  // Resize the vectors to hold data at the quadrature points
1371  this->resize_quadrature_map_vectors(dim, n_qp);
1372 
1373  // Compute "fake" xyz
1374  for (unsigned int p=1; p<n_qp; p++)
1375  {
1376  if (calculate_xyz)
1377  xyz[p].zero();
1378 
1379  if (calculate_dxyz)
1380  {
1381  dxyzdxi_map[p] = 0;
1382  dxidx_map[p] = 0;
1383  dxidy_map[p] = 0;
1384  dxidz_map[p] = 0;
1385  }
1386 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1387  if (calculate_d2xyz)
1388  {
1389  d2xyzdxi2_map[p] = 0;
1390  }
1391 #endif
1392  if (dim > 1)
1393  {
1394  if (calculate_dxyz)
1395  {
1396  dxyzdeta_map[p] = 0;
1397  detadx_map[p] = 0;
1398  detady_map[p] = 0;
1399  detadz_map[p] = 0;
1400  }
1401 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1402  if (calculate_d2xyz)
1403  {
1404  d2xyzdxideta_map[p] = 0.;
1405  d2xyzdeta2_map[p] = 0.;
1406  }
1407 #endif
1408  if (dim > 2)
1409  {
1410  if (calculate_dxyz)
1411  {
1412  dxyzdzeta_map[p] = 0;
1413  dzetadx_map[p] = 0;
1414  dzetady_map[p] = 0;
1415  dzetadz_map[p] = 0;
1416  }
1417 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1418  if (calculate_d2xyz)
1419  {
1420  d2xyzdxidzeta_map[p] = 0;
1421  d2xyzdetadzeta_map[p] = 0;
1422  d2xyzdzeta2_map[p] = 0;
1423  }
1424 #endif
1425  }
1426  }
1427  if (calculate_dxyz)
1428  {
1429  jac[p] = 1;
1430  JxW[p] = qw[p];
1431  }
1432  }
1433 }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
unsigned int dim
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
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
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
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< 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< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
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
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
Definition: fe_map.h:804
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
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
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823
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

◆ compute_single_point_map()

void libMesh::FEMap::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.

Takes the integration weights as input, along with a pointer to the element and a list of points that contribute to the element. Also takes a boolean flag telling whether second derivatives should actually be computed.

Definition at line 447 of file fe_map.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, calculations_started, compute_inverse_map_second_derivs(), d2etadxyz2_map, d2phideta2_map, d2phidetadzeta_map, d2phidxi2_map, d2phidxideta_map, d2phidxidzeta_map, d2phidzeta2_map, d2xidxyz2_map, d2xyzdeta2_map, d2xyzdetadzeta_map, d2xyzdxi2_map, d2xyzdxideta_map, d2xyzdxidzeta_map, d2xyzdzeta2_map, d2zetadxyz2_map, detadx_map, detady_map, detadz_map, dim, dphideta_map, dphidxi_map, dphidzeta_map, dxdeta_map(), dxdxi_map(), dxdzeta_map(), dxidx_map, dxidy_map, dxidz_map, dxyzdeta_map, dxyzdxi_map, dxyzdzeta_map, dydeta_map(), dydxi_map(), dydzeta_map(), dzdeta_map(), dzdxi_map(), dzdzeta_map(), dzetadx_map, dzetady_map, dzetadz_map, libMesh::err, libMesh::DofObject::id(), libMesh::index_range(), jac, jacobian_tolerance, JxW, libMesh::libmesh_assert(), libMesh::libmesh_ignore(), phi_map, libMesh::Elem::print_info(), libMesh::Real, std::sqrt(), libMesh::DenseMatrix< T >::vector_mult(), and xyz.

Referenced by compute_affine_map(), and compute_map().

453 {
454  libmesh_assert(elem);
456 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES
457  libmesh_assert(!compute_second_derivatives);
458 #endif
459 
460  // this parameter is only accounted for if LIBMESH_DIM==2.
461  libmesh_ignore(compute_second_derivatives);
462 
463  if (calculate_xyz)
464  libmesh_assert_equal_to(phi_map.size(), elem_nodes.size());
465 
466  switch (dim)
467  {
468  //--------------------------------------------------------------------
469  // 0D
470  case 0:
471  {
472  libmesh_assert(elem_nodes[0]);
473  if (calculate_xyz)
474  xyz[p] = *elem_nodes[0];
475  if (calculate_dxyz)
476  {
477  jac[p] = 1.0;
478  JxW[p] = qw[p];
479  }
480  break;
481  }
482 
483  //--------------------------------------------------------------------
484  // 1D
485  case 1:
486  {
487  // Clear the entities that will be summed
488  if (calculate_xyz)
489  xyz[p].zero();
490  if (calculate_dxyz)
491  dxyzdxi_map[p].zero();
492 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
493  if (calculate_d2xyz)
494  {
495  d2xyzdxi2_map[p].zero();
496  // Inverse map second derivatives
497  d2xidxyz2_map[p].assign(6, 0.);
498  }
499 #endif
500 
501  // compute x, dx, d2x at the quadrature point
502  for (auto i : index_range(elem_nodes)) // sum over the nodes
503  {
504  // Reference to the point, helps eliminate
505  // excessive temporaries in the inner loop
506  libmesh_assert(elem_nodes[i]);
507  const Point & elem_point = *elem_nodes[i];
508 
509  if (calculate_xyz)
510  xyz[p].add_scaled (elem_point, phi_map[i][p] );
511  if (calculate_dxyz)
512  dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p]);
513 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
514  if (calculate_d2xyz)
515  d2xyzdxi2_map[p].add_scaled(elem_point, d2phidxi2_map[i][p]);
516 #endif
517  }
518 
519  // Compute the jacobian
520  //
521  // 1D elements can live in 2D or 3D space.
522  // The transformation matrix from local->global
523  // coordinates is
524  //
525  // T = | dx/dxi |
526  // | dy/dxi |
527  // | dz/dxi |
528  //
529  // The generalized determinant of T (from the
530  // so-called "normal" eqns.) is
531  // jac = "det(T)" = sqrt(det(T'T))
532  //
533  // where T'= transpose of T, so
534  //
535  // jac = sqrt( (dx/dxi)^2 + (dy/dxi)^2 + (dz/dxi)^2 )
536 
537  if (calculate_dxyz)
538  {
539  jac[p] = dxyzdxi_map[p].norm();
540 
541  if (jac[p] <= jacobian_tolerance)
542  {
543  // Don't call print_info() recursively if we're already
544  // failing. print_info() calls Elem::volume() which may
545  // call FE::reinit() and trigger the same failure again.
546  static bool failing = false;
547  if (!failing)
548  {
549  failing = true;
550  elem->print_info(libMesh::err);
551  failing = false;
552  if (calculate_xyz)
553  {
554  libmesh_error_msg("ERROR: negative Jacobian " \
555  << jac[p] \
556  << " at point " \
557  << xyz[p] \
558  << " in element " \
559  << elem->id());
560  }
561  else
562  {
563  // In this case xyz[p] is not defined, so don't
564  // try to print it out.
565  libmesh_error_msg("ERROR: negative Jacobian " \
566  << jac[p] \
567  << " at point index " \
568  << p \
569  << " in element " \
570  << elem->id());
571  }
572  }
573  else
574  {
575  // We were already failing when we called this, so just
576  // stop the current computation and return with
577  // incomplete results.
578  return;
579  }
580  }
581 
582  // The inverse Jacobian entries also come from the
583  // generalized inverse of T (see also the 2D element
584  // living in 3D code).
585  const Real jacm2 = 1./jac[p]/jac[p];
586  dxidx_map[p] = jacm2*dxdxi_map(p);
587 #if LIBMESH_DIM > 1
588  dxidy_map[p] = jacm2*dydxi_map(p);
589 #endif
590 #if LIBMESH_DIM > 2
591  dxidz_map[p] = jacm2*dzdxi_map(p);
592 #endif
593 
594  JxW[p] = jac[p]*qw[p];
595  }
596 
597 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
598 
599  if (calculate_d2xyz)
600  {
601 #if LIBMESH_DIM == 1
602  // Compute inverse map second derivatives for 1D-element-living-in-1D case
604 #elif LIBMESH_DIM == 2
605  // Compute inverse map second derivatives for 1D-element-living-in-2D case
606  // See JWP notes for details
607 
608  // numer = x_xi*x_{xi xi} + y_xi*y_{xi xi}
609  Real numer =
610  dxyzdxi_map[p](0)*d2xyzdxi2_map[p](0) +
611  dxyzdxi_map[p](1)*d2xyzdxi2_map[p](1);
612 
613  // denom = (x_xi)^2 + (y_xi)^2 must be >= 0.0
614  Real denom =
615  dxyzdxi_map[p](0)*dxyzdxi_map[p](0) +
616  dxyzdxi_map[p](1)*dxyzdxi_map[p](1);
617 
618  if (denom <= 0.0)
619  {
620  // Don't call print_info() recursively if we're already
621  // failing. print_info() calls Elem::volume() which may
622  // call FE::reinit() and trigger the same failure again.
623  static bool failing = false;
624  if (!failing)
625  {
626  failing = true;
627  elem->print_info(libMesh::err);
628  failing = false;
629  libmesh_error_msg("Encountered invalid 1D element!");
630  }
631  else
632  {
633  // We were already failing when we called this, so just
634  // stop the current computation and return with
635  // incomplete results.
636  return;
637  }
638  }
639 
640  // xi_{x x}
641  d2xidxyz2_map[p][0] = -numer * dxidx_map[p]*dxidx_map[p] / denom;
642 
643  // xi_{x y}
644  d2xidxyz2_map[p][1] = -numer * dxidx_map[p]*dxidy_map[p] / denom;
645 
646  // xi_{y y}
647  d2xidxyz2_map[p][3] = -numer * dxidy_map[p]*dxidy_map[p] / denom;
648 
649 #elif LIBMESH_DIM == 3
650  // Compute inverse map second derivatives for 1D-element-living-in-3D case
651  // See JWP notes for details
652 
653  // numer = x_xi*x_{xi xi} + y_xi*y_{xi xi} + z_xi*z_{xi xi}
654  Real numer =
655  dxyzdxi_map[p](0)*d2xyzdxi2_map[p](0) +
656  dxyzdxi_map[p](1)*d2xyzdxi2_map[p](1) +
657  dxyzdxi_map[p](2)*d2xyzdxi2_map[p](2);
658 
659  // denom = (x_xi)^2 + (y_xi)^2 + (z_xi)^2 must be >= 0.0
660  Real denom =
661  dxyzdxi_map[p](0)*dxyzdxi_map[p](0) +
662  dxyzdxi_map[p](1)*dxyzdxi_map[p](1) +
663  dxyzdxi_map[p](2)*dxyzdxi_map[p](2);
664 
665  if (denom <= 0.0)
666  {
667  // Don't call print_info() recursively if we're already
668  // failing. print_info() calls Elem::volume() which may
669  // call FE::reinit() and trigger the same failure again.
670  static bool failing = false;
671  if (!failing)
672  {
673  failing = true;
674  elem->print_info(libMesh::err);
675  failing = false;
676  libmesh_error_msg("Encountered invalid 1D element!");
677  }
678  else
679  {
680  // We were already failing when we called this, so just
681  // stop the current computation and return with
682  // incomplete results.
683  return;
684  }
685  }
686 
687  // xi_{x x}
688  d2xidxyz2_map[p][0] = -numer * dxidx_map[p]*dxidx_map[p] / denom;
689 
690  // xi_{x y}
691  d2xidxyz2_map[p][1] = -numer * dxidx_map[p]*dxidy_map[p] / denom;
692 
693  // xi_{x z}
694  d2xidxyz2_map[p][2] = -numer * dxidx_map[p]*dxidz_map[p] / denom;
695 
696  // xi_{y y}
697  d2xidxyz2_map[p][3] = -numer * dxidy_map[p]*dxidy_map[p] / denom;
698 
699  // xi_{y z}
700  d2xidxyz2_map[p][4] = -numer * dxidy_map[p]*dxidz_map[p] / denom;
701 
702  // xi_{z z}
703  d2xidxyz2_map[p][5] = -numer * dxidz_map[p]*dxidz_map[p] / denom;
704 #endif //LIBMESH_DIM == 3
705  } // calculate_d2xyz
706 
707 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
708 
709  // done computing the map
710  break;
711  }
712 
713 
714  //--------------------------------------------------------------------
715  // 2D
716  case 2:
717  {
718  //------------------------------------------------------------------
719  // Compute the (x,y) values at the quadrature points,
720  // the Jacobian at the quadrature points
721 
722  if (calculate_xyz)
723  xyz[p].zero();
724 
725  if (calculate_dxyz)
726  {
727  dxyzdxi_map[p].zero();
728  dxyzdeta_map[p].zero();
729  }
730 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
731  if (calculate_d2xyz)
732  {
733  d2xyzdxi2_map[p].zero();
734  d2xyzdxideta_map[p].zero();
735  d2xyzdeta2_map[p].zero();
736  // Inverse map second derivatives
737  d2xidxyz2_map[p].assign(6, 0.);
738  d2etadxyz2_map[p].assign(6, 0.);
739  }
740 #endif
741 
742 
743  // compute (x,y) at the quadrature points, derivatives once
744  for (auto i : index_range(elem_nodes)) // sum over the nodes
745  {
746  // Reference to the point, helps eliminate
747  // excessive temporaries in the inner loop
748  libmesh_assert(elem_nodes[i]);
749  const Point & elem_point = *elem_nodes[i];
750 
751  if (calculate_xyz)
752  xyz[p].add_scaled (elem_point, phi_map[i][p] );
753 
754  if (calculate_dxyz)
755  {
756  dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p] );
757  dxyzdeta_map[p].add_scaled (elem_point, dphideta_map[i][p]);
758  }
759 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
760  if (calculate_d2xyz)
761  {
762  d2xyzdxi2_map[p].add_scaled (elem_point, d2phidxi2_map[i][p]);
763  d2xyzdxideta_map[p].add_scaled (elem_point, d2phidxideta_map[i][p]);
764  d2xyzdeta2_map[p].add_scaled (elem_point, d2phideta2_map[i][p]);
765  }
766 #endif
767  }
768 
769  if (calculate_dxyz)
770  {
771  // compute the jacobian once
772  const Real dx_dxi = dxdxi_map(p),
773  dx_deta = dxdeta_map(p),
774  dy_dxi = dydxi_map(p),
775  dy_deta = dydeta_map(p);
776 
777 #if LIBMESH_DIM == 2
778  // Compute the Jacobian. This assumes the 2D face
779  // lives in 2D space
780  //
781  // Symbolically, the matrix determinant is
782  //
783  // | dx/dxi dx/deta |
784  // jac = | dy/dxi dy/deta |
785  //
786  // jac = dx/dxi*dy/deta - dx/deta*dy/dxi
787  jac[p] = (dx_dxi*dy_deta - dx_deta*dy_dxi);
788 
789  if (jac[p] <= jacobian_tolerance)
790  {
791  // Don't call print_info() recursively if we're already
792  // failing. print_info() calls Elem::volume() which may
793  // call FE::reinit() and trigger the same failure again.
794  static bool failing = false;
795  if (!failing)
796  {
797  failing = true;
798  elem->print_info(libMesh::err);
799  failing = false;
800  if (calculate_xyz)
801  {
802  libmesh_error_msg("ERROR: negative Jacobian " \
803  << jac[p] \
804  << " at point " \
805  << xyz[p] \
806  << " in element " \
807  << elem->id());
808  }
809  else
810  {
811  // In this case xyz[p] is not defined, so don't
812  // try to print it out.
813  libmesh_error_msg("ERROR: negative Jacobian " \
814  << jac[p] \
815  << " at point index " \
816  << p \
817  << " in element " \
818  << elem->id());
819  }
820  }
821  else
822  {
823  // We were already failing when we called this, so just
824  // stop the current computation and return with
825  // incomplete results.
826  return;
827  }
828  }
829 
830  JxW[p] = jac[p]*qw[p];
831 
832  // Compute the shape function derivatives wrt x,y at the
833  // quadrature points
834  const Real inv_jac = 1./jac[p];
835 
836  dxidx_map[p] = dy_deta*inv_jac; //dxi/dx = (1/J)*dy/deta
837  dxidy_map[p] = -dx_deta*inv_jac; //dxi/dy = -(1/J)*dx/deta
838  detadx_map[p] = -dy_dxi* inv_jac; //deta/dx = -(1/J)*dy/dxi
839  detady_map[p] = dx_dxi* inv_jac; //deta/dy = (1/J)*dx/dxi
840 
841  dxidz_map[p] = detadz_map[p] = 0.;
842 
843 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
844  if (compute_second_derivatives)
846 #endif
847 #else // LIBMESH_DIM == 3
848 
849  const Real dz_dxi = dzdxi_map(p),
850  dz_deta = dzdeta_map(p);
851 
852  // Compute the Jacobian. This assumes a 2D face in
853  // 3D space.
854  //
855  // The transformation matrix T from local to global
856  // coordinates is
857  //
858  // | dx/dxi dx/deta |
859  // T = | dy/dxi dy/deta |
860  // | dz/dxi dz/deta |
861  // note det(T' T) = det(T')det(T) = det(T)det(T)
862  // so det(T) = std::sqrt(det(T' T))
863  //
864  //----------------------------------------------
865  // Notes:
866  //
867  // dX = R dXi -> R'dX = R'R dXi
868  // (R^-1)dX = dXi [(R'R)^-1 R']dX = dXi
869  //
870  // so R^-1 = (R'R)^-1 R'
871  //
872  // and R^-1 R = (R'R)^-1 R'R = I.
873  //
874  const Real g11 = (dx_dxi*dx_dxi +
875  dy_dxi*dy_dxi +
876  dz_dxi*dz_dxi);
877 
878  const Real g12 = (dx_dxi*dx_deta +
879  dy_dxi*dy_deta +
880  dz_dxi*dz_deta);
881 
882  const Real g21 = g12;
883 
884  const Real g22 = (dx_deta*dx_deta +
885  dy_deta*dy_deta +
886  dz_deta*dz_deta);
887 
888  const Real det = (g11*g22 - g12*g21);
889 
890  if (det <= jacobian_tolerance)
891  {
892  // Don't call print_info() recursively if we're already
893  // failing. print_info() calls Elem::volume() which may
894  // call FE::reinit() and trigger the same failure again.
895  static bool failing = false;
896  if (!failing)
897  {
898  failing = true;
899  elem->print_info(libMesh::err);
900  failing = false;
901  if (calculate_xyz)
902  {
903  libmesh_error_msg("ERROR: negative Jacobian " \
904  << det \
905  << " at point " \
906  << xyz[p] \
907  << " in element " \
908  << elem->id());
909  }
910  else
911  {
912  // In this case xyz[p] is not defined, so don't
913  // try to print it out.
914  libmesh_error_msg("ERROR: negative Jacobian " \
915  << det \
916  << " at point index " \
917  << p \
918  << " in element " \
919  << elem->id());
920  }
921  }
922  else
923  {
924  // We were already failing when we called this, so just
925  // stop the current computation and return with
926  // incomplete results.
927  return;
928  }
929  }
930 
931  const Real inv_det = 1./det;
932  jac[p] = std::sqrt(det);
933 
934  JxW[p] = jac[p]*qw[p];
935 
936  const Real g11inv = g22*inv_det;
937  const Real g12inv = -g12*inv_det;
938  const Real g21inv = -g21*inv_det;
939  const Real g22inv = g11*inv_det;
940 
941  dxidx_map[p] = g11inv*dx_dxi + g12inv*dx_deta;
942  dxidy_map[p] = g11inv*dy_dxi + g12inv*dy_deta;
943  dxidz_map[p] = g11inv*dz_dxi + g12inv*dz_deta;
944 
945  detadx_map[p] = g21inv*dx_dxi + g22inv*dx_deta;
946  detady_map[p] = g21inv*dy_dxi + g22inv*dy_deta;
947  detadz_map[p] = g21inv*dz_dxi + g22inv*dz_deta;
948 
949 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
950 
951  if (calculate_d2xyz)
952  {
953  // Compute inverse map second derivative values for
954  // 2D-element-living-in-3D case. We pursue a least-squares
955  // solution approach for this "non-square" case, see JWP notes
956  // for details.
957 
958  // A = [ x_{xi xi} x_{eta eta} ]
959  // [ y_{xi xi} y_{eta eta} ]
960  // [ z_{xi xi} z_{eta eta} ]
961  DenseMatrix<Real> A(3,2);
962  A(0,0) = d2xyzdxi2_map[p](0); A(0,1) = d2xyzdeta2_map[p](0);
963  A(1,0) = d2xyzdxi2_map[p](1); A(1,1) = d2xyzdeta2_map[p](1);
964  A(2,0) = d2xyzdxi2_map[p](2); A(2,1) = d2xyzdeta2_map[p](2);
965 
966  // J^T, the transpose of the Jacobian matrix
967  DenseMatrix<Real> JT(2,3);
968  JT(0,0) = dx_dxi; JT(0,1) = dy_dxi; JT(0,2) = dz_dxi;
969  JT(1,0) = dx_deta; JT(1,1) = dy_deta; JT(1,2) = dz_deta;
970 
971  // (J^T J)^(-1), this has already been computed for us above...
972  DenseMatrix<Real> JTJinv(2,2);
973  JTJinv(0,0) = g11inv; JTJinv(0,1) = g12inv;
974  JTJinv(1,0) = g21inv; JTJinv(1,1) = g22inv;
975 
976  // Some helper variables
978  dxi (dxidx_map[p], dxidy_map[p], dxidz_map[p]),
979  deta (detadx_map[p], detady_map[p], detadz_map[p]);
980 
981  // To be filled in below
982  DenseVector<Real> tmp1(2);
983  DenseVector<Real> tmp2(3);
984  DenseVector<Real> tmp3(2);
985 
986  // For (s,t) in {(x,x), (x,y), (x,z), (y,y), (y,z), (z,z)}, compute the
987  // vector of inverse map second derivatives [xi_{s t}, eta_{s t}]
988  unsigned ctr=0;
989  for (unsigned s=0; s<3; ++s)
990  for (unsigned t=s; t<3; ++t)
991  {
992  // Construct tmp1 = [xi_s*xi_t, eta_s*eta_t]
993  tmp1(0) = dxi(s)*dxi(t);
994  tmp1(1) = deta(s)*deta(t);
995 
996  // Compute tmp2 = A * tmp1
997  A.vector_mult(tmp2, tmp1);
998 
999  // Compute scalar value "alpha"
1000  Real alpha = dxi(s)*deta(t) + deta(s)*dxi(t);
1001 
1002  // Compute tmp2 <- tmp2 + alpha * x_{xi eta}
1003  for (unsigned i=0; i<3; ++i)
1004  tmp2(i) += alpha*d2xyzdxideta_map[p](i);
1005 
1006  // Compute tmp3 = J^T * tmp2
1007  JT.vector_mult(tmp3, tmp2);
1008 
1009  // Compute tmp1 = (J^T J)^(-1) * tmp3. tmp1 is available for us to reuse.
1010  JTJinv.vector_mult(tmp1, tmp3);
1011 
1012  // Fill in appropriate entries, don't forget to multiply by -1!
1013  d2xidxyz2_map[p][ctr] = -tmp1(0);
1014  d2etadxyz2_map[p][ctr] = -tmp1(1);
1015 
1016  // Increment the counter
1017  ctr++;
1018  }
1019  }
1020 
1021 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
1022 
1023 #endif // LIBMESH_DIM == 3
1024  }
1025  // done computing the map
1026  break;
1027  }
1028 
1029 
1030 
1031  //--------------------------------------------------------------------
1032  // 3D
1033  case 3:
1034  {
1035  //------------------------------------------------------------------
1036  // Compute the (x,y,z) values at the quadrature points,
1037  // the Jacobian at the quadrature point
1038 
1039  // Clear the entities that will be summed
1040  if (calculate_xyz)
1041  xyz[p].zero ();
1042  if (calculate_dxyz)
1043  {
1044  dxyzdxi_map[p].zero ();
1045  dxyzdeta_map[p].zero ();
1046  dxyzdzeta_map[p].zero ();
1047  }
1048 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1049  if (calculate_d2xyz)
1050  {
1051  d2xyzdxi2_map[p].zero();
1052  d2xyzdxideta_map[p].zero();
1053  d2xyzdxidzeta_map[p].zero();
1054  d2xyzdeta2_map[p].zero();
1055  d2xyzdetadzeta_map[p].zero();
1056  d2xyzdzeta2_map[p].zero();
1057  // Inverse map second derivatives
1058  d2xidxyz2_map[p].assign(6, 0.);
1059  d2etadxyz2_map[p].assign(6, 0.);
1060  d2zetadxyz2_map[p].assign(6, 0.);
1061  }
1062 #endif
1063 
1064 
1065  // compute (x,y,z) at the quadrature points,
1066  // dxdxi, dydxi, dzdxi,
1067  // dxdeta, dydeta, dzdeta,
1068  // dxdzeta, dydzeta, dzdzeta all once
1069  for (auto i : index_range(elem_nodes)) // sum over the nodes
1070  {
1071  // Reference to the point, helps eliminate
1072  // excessive temporaries in the inner loop
1073  libmesh_assert(elem_nodes[i]);
1074  const Point & elem_point = *elem_nodes[i];
1075 
1076  if (calculate_xyz)
1077  xyz[p].add_scaled (elem_point, phi_map[i][p] );
1078  if (calculate_dxyz)
1079  {
1080  dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p] );
1081  dxyzdeta_map[p].add_scaled (elem_point, dphideta_map[i][p] );
1082  dxyzdzeta_map[p].add_scaled (elem_point, dphidzeta_map[i][p]);
1083  }
1084 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1085  if (calculate_d2xyz)
1086  {
1087  d2xyzdxi2_map[p].add_scaled (elem_point,
1088  d2phidxi2_map[i][p]);
1089  d2xyzdxideta_map[p].add_scaled (elem_point,
1090  d2phidxideta_map[i][p]);
1091  d2xyzdxidzeta_map[p].add_scaled (elem_point,
1092  d2phidxidzeta_map[i][p]);
1093  d2xyzdeta2_map[p].add_scaled (elem_point,
1094  d2phideta2_map[i][p]);
1095  d2xyzdetadzeta_map[p].add_scaled (elem_point,
1096  d2phidetadzeta_map[i][p]);
1097  d2xyzdzeta2_map[p].add_scaled (elem_point,
1098  d2phidzeta2_map[i][p]);
1099  }
1100 #endif
1101  }
1102 
1103  if (calculate_dxyz)
1104  {
1105  // compute the jacobian
1106  const Real
1107  dx_dxi = dxdxi_map(p), dy_dxi = dydxi_map(p), dz_dxi = dzdxi_map(p),
1108  dx_deta = dxdeta_map(p), dy_deta = dydeta_map(p), dz_deta = dzdeta_map(p),
1109  dx_dzeta = dxdzeta_map(p), dy_dzeta = dydzeta_map(p), dz_dzeta = dzdzeta_map(p);
1110 
1111  // Symbolically, the matrix determinant is
1112  //
1113  // | dx/dxi dy/dxi dz/dxi |
1114  // jac = | dx/deta dy/deta dz/deta |
1115  // | dx/dzeta dy/dzeta dz/dzeta |
1116  //
1117  // jac = dx/dxi*(dy/deta*dz/dzeta - dz/deta*dy/dzeta) +
1118  // dy/dxi*(dz/deta*dx/dzeta - dx/deta*dz/dzeta) +
1119  // dz/dxi*(dx/deta*dy/dzeta - dy/deta*dx/dzeta)
1120 
1121  jac[p] = (dx_dxi*(dy_deta*dz_dzeta - dz_deta*dy_dzeta) +
1122  dy_dxi*(dz_deta*dx_dzeta - dx_deta*dz_dzeta) +
1123  dz_dxi*(dx_deta*dy_dzeta - dy_deta*dx_dzeta));
1124 
1125  if (jac[p] <= jacobian_tolerance)
1126  {
1127  // Don't call print_info() recursively if we're already
1128  // failing. print_info() calls Elem::volume() which may
1129  // call FE::reinit() and trigger the same failure again.
1130  static bool failing = false;
1131  if (!failing)
1132  {
1133  failing = true;
1134  elem->print_info(libMesh::err);
1135  failing = false;
1136  if (calculate_xyz)
1137  {
1138  libmesh_error_msg("ERROR: negative Jacobian " \
1139  << jac[p] \
1140  << " at point " \
1141  << xyz[p] \
1142  << " in element " \
1143  << elem->id());
1144  }
1145  else
1146  {
1147  // In this case xyz[p] is not defined, so don't
1148  // try to print it out.
1149  libmesh_error_msg("ERROR: negative Jacobian " \
1150  << jac[p] \
1151  << " at point index " \
1152  << p \
1153  << " in element " \
1154  << elem->id());
1155  }
1156  }
1157  else
1158  {
1159  // We were already failing when we called this, so just
1160  // stop the current computation and return with
1161  // incomplete results.
1162  return;
1163  }
1164  }
1165 
1166  JxW[p] = jac[p]*qw[p];
1167 
1168  // Compute the shape function derivatives wrt x,y at the
1169  // quadrature points
1170  const Real inv_jac = 1./jac[p];
1171 
1172  dxidx_map[p] = (dy_deta*dz_dzeta - dz_deta*dy_dzeta)*inv_jac;
1173  dxidy_map[p] = (dz_deta*dx_dzeta - dx_deta*dz_dzeta)*inv_jac;
1174  dxidz_map[p] = (dx_deta*dy_dzeta - dy_deta*dx_dzeta)*inv_jac;
1175 
1176  detadx_map[p] = (dz_dxi*dy_dzeta - dy_dxi*dz_dzeta )*inv_jac;
1177  detady_map[p] = (dx_dxi*dz_dzeta - dz_dxi*dx_dzeta )*inv_jac;
1178  detadz_map[p] = (dy_dxi*dx_dzeta - dx_dxi*dy_dzeta )*inv_jac;
1179 
1180  dzetadx_map[p] = (dy_dxi*dz_deta - dz_dxi*dy_deta )*inv_jac;
1181  dzetady_map[p] = (dz_dxi*dx_deta - dx_dxi*dz_deta )*inv_jac;
1182  dzetadz_map[p] = (dx_dxi*dy_deta - dy_dxi*dx_deta )*inv_jac;
1183  }
1184 
1185 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1186  if (compute_second_derivatives)
1188 #endif
1189  // done computing the map
1190  break;
1191  }
1192 
1193  default:
1194  libmesh_error_msg("Invalid dim = " << dim);
1195  }
1196 }
OStreamProxy err
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 > > 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
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
VectorValue< Real > RealVectorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
template class LIBMESH_EXPORT DenseVector< Real >
Definition: dense_vector.C:29
unsigned int dim
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
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
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
std::vector< std::vector< Real > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
Definition: fe_map.h:916
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
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:53
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
Definition: fe_map.h:921
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
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< 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
void libmesh_ignore(const Args &...)
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
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
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
template class LIBMESH_EXPORT DenseMatrix< Real >
Definition: dense_matrix.C:35
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
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
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
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
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< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
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
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
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
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995
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 > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
Definition: fe_map.h:901
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111
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

◆ determine_calculations()

void libMesh::FEMap::determine_calculations ( )
inlineprotected

Determine which values are to be calculated.

Definition at line 648 of file fe_map.h.

References calculate_d2xyz, calculate_dxyz, and calculations_started.

Referenced by compute_edge_map(), compute_face_map(), init_edge_shape_functions(), init_face_shape_functions(), init_reference_to_physical_map(), and resize_quadrature_map_vectors().

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  }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006

◆ dxdeta_map()

Real libMesh::FEMap::dxdeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The x value of the pth entry of the dxzydeta_map.

Definition at line 695 of file fe_map.h.

References dxyzdeta_map.

Referenced by compute_face_map(), and compute_single_point_map().

695 { return dxyzdeta_map[p](0); }
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

◆ dxdxi_map()

Real libMesh::FEMap::dxdxi_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The x value of the pth entry of the dxzydxi_map.

Definition at line 671 of file fe_map.h.

References dxyzdxi_map.

Referenced by compute_edge_map(), compute_face_map(), and compute_single_point_map().

671 { return dxyzdxi_map[p](0); }
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

◆ dxdzeta_map()

Real libMesh::FEMap::dxdzeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The x value of the pth entry of the dxzydzeta_map.

Definition at line 719 of file fe_map.h.

References dxyzdzeta_map.

Referenced by compute_single_point_map().

719 { return dxyzdzeta_map[p](0); }
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

◆ dydeta_map()

Real libMesh::FEMap::dydeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The y value of the pth entry of the dxzydeta_map.

Definition at line 703 of file fe_map.h.

References dxyzdeta_map.

Referenced by compute_face_map(), and compute_single_point_map().

703 { return dxyzdeta_map[p](1); }
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

◆ dydxi_map()

Real libMesh::FEMap::dydxi_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The y value of the pth entry of the dxzydxi_map.

Definition at line 679 of file fe_map.h.

References dxyzdxi_map.

Referenced by compute_edge_map(), compute_face_map(), and compute_single_point_map().

679 { return dxyzdxi_map[p](1); }
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

◆ dydzeta_map()

Real libMesh::FEMap::dydzeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The y value of the pth entry of the dxzydzeta_map.

Definition at line 727 of file fe_map.h.

References dxyzdzeta_map.

Referenced by compute_single_point_map().

727 { return dxyzdzeta_map[p](1); }
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

◆ dzdeta_map()

Real libMesh::FEMap::dzdeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The z value of the pth entry of the dxzydeta_map.

Definition at line 711 of file fe_map.h.

References dxyzdeta_map.

Referenced by compute_face_map(), and compute_single_point_map().

711 { return dxyzdeta_map[p](2); }
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

◆ dzdxi_map()

Real libMesh::FEMap::dzdxi_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The z value of the pth entry of the dxzydxi_map.

Definition at line 687 of file fe_map.h.

References dxyzdxi_map.

Referenced by compute_edge_map(), compute_face_map(), and compute_single_point_map().

687 { return dxyzdxi_map[p](2); }
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

◆ dzdzeta_map()

Real libMesh::FEMap::dzdzeta_map ( const unsigned int  p) const
inlineprotected

Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected.

Returns
The z value of the pth entry of the dxzydzeta_map.

Definition at line 735 of file fe_map.h.

References dxyzdzeta_map.

Referenced by compute_single_point_map().

735 { return dxyzdzeta_map[p](2); }
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

◆ get_curvatures()

const std::vector<Real>& libMesh::FEMap::get_curvatures ( ) const
inline
Returns
The curvatures for use in face integration.

Definition at line 453 of file fe_map.h.

References calculate_d2xyz, calculations_started, curvatures, and libMesh::libmesh_assert().

455  calculate_d2xyz = true; return curvatures;}
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
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

◆ get_d2etadxyz2()

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2etadxyz2 ( ) const
inline

Second derivatives of "eta" reference coordinate wrt physical coordinates.

Definition at line 388 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2etadxyz2_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

390  calculate_d2xyz = true; return d2etadxyz2_map; }
std::vector< std::vector< Real > > d2etadxyz2_map
Second derivatives of "eta" reference coordinate wrt physical coordinates.
Definition: fe_map.h:867
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2phideta2_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phideta2_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 602 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phideta2_map, and libMesh::libmesh_assert().

604  calculate_d2xyz = true; return d2phideta2_map; }
std::vector< std::vector< Real > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
Definition: fe_map.h:916
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2phidetadzeta_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidetadzeta_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 609 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phidetadzeta_map, and libMesh::libmesh_assert().

611  calculate_d2xyz = true; return d2phidetadzeta_map; }
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
Definition: fe_map.h:921
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2phidxi2_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxi2_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 581 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phidxi2_map, and libMesh::libmesh_assert().

583  calculate_d2xyz = true; return d2phidxi2_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
Definition: fe_map.h:901

◆ get_d2phidxideta_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxideta_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 588 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phidxideta_map, and libMesh::libmesh_assert().

590  calculate_d2xyz = true; return d2phidxideta_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > d2phidxideta_map
Map for the second derivative, d^2(phi)/d(xi)d(eta).
Definition: fe_map.h:906

◆ get_d2phidxidzeta_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxidzeta_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 595 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phidxidzeta_map, and libMesh::libmesh_assert().

597  calculate_d2xyz = true; return d2phidxidzeta_map; }
std::vector< std::vector< Real > > d2phidxidzeta_map
Map for the second derivative, d^2(phi)/d(xi)d(zeta).
Definition: fe_map.h:911
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2phidzeta2_map()

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidzeta2_map ( )
inline
Returns
The reference to physical map 2nd derivative

Definition at line 616 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2phidzeta2_map, and libMesh::libmesh_assert().

618  calculate_d2xyz = true; return d2phidzeta2_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > d2phidzeta2_map
Map for the second derivative, d^2(phi)/d(zeta)^2.
Definition: fe_map.h:926

◆ get_d2psideta2() [1/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psideta2 ( )
inline
Returns
The reference to physical map 2nd derivative for the side/edge

Definition at line 535 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psideta2_map, and libMesh::libmesh_assert().

537  calculate_d2xyz = true; return d2psideta2_map; }
std::vector< std::vector< Real > > d2psideta2_map
Map for the second derivatives (in eta) of the side shape functions.
Definition: fe_map.h:968
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2psideta2() [2/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psideta2 ( ) const
inline
Returns
const reference to physical map 2nd derivative for the side/edge

Definition at line 543 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psideta2_map, and libMesh::libmesh_assert().

545  calculate_d2xyz = true; return d2psideta2_map; }
std::vector< std::vector< Real > > d2psideta2_map
Map for the second derivatives (in eta) of the side shape functions.
Definition: fe_map.h:968
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2psidxi2() [1/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psidxi2 ( )
inline
Returns
The reference to physical map 2nd derivative for the side/edge

Definition at line 507 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psidxi2_map, and libMesh::libmesh_assert().

509  calculate_d2xyz = true; return d2psidxi2_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954

◆ get_d2psidxi2() [2/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psidxi2 ( ) const
inline
Returns
const reference to physical map 2nd derivative for the side/edge

Definition at line 514 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psidxi2_map, and libMesh::libmesh_assert().

516  calculate_d2xyz = true; return d2psidxi2_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954

◆ get_d2psidxideta() [1/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psidxideta ( )
inline
Returns
The reference to physical map 2nd derivative for the side/edge

Definition at line 521 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psidxideta_map, and libMesh::libmesh_assert().

523  calculate_d2xyz = true; return d2psidxideta_map; }
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2psidxideta() [2/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2psidxideta ( ) const
inline
Returns
const reference to physical map 2nd derivative for the side/edge

Definition at line 528 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2psidxideta_map, and libMesh::libmesh_assert().

530  calculate_d2xyz = true; return d2psidxideta_map; }
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2xidxyz2()

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2xidxyz2 ( ) const
inline

Second derivatives of "xi" reference coordinate wrt physical coordinates.

Definition at line 381 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xidxyz2_map, and libMesh::libmesh_assert().

Referenced by libMesh::HCurlFETransformation< OutputShape >::init_map_d2phi(), libMesh::HDivFETransformation< OutputShape >::init_map_d2phi(), libMesh::H1FETransformation< OutputShape >::init_map_d2phi(), and libMesh::H1FETransformation< OutputShape >::map_d2phi().

383  calculate_d2xyz = true; return d2xidxyz2_map; }
std::vector< std::vector< Real > > d2xidxyz2_map
Second derivatives of "xi" reference coordinate wrt physical coordinates.
Definition: fe_map.h:861
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2xyzdeta2()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdeta2 ( ) const
inline
Returns
The second partial derivatives in eta.

Definition at line 271 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdeta2_map, and libMesh::libmesh_assert().

273  calculate_d2xyz = true; return d2xyzdeta2_map; }
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2xyzdetadzeta()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdetadzeta ( ) const
inline
Returns
The second partial derivatives in eta-zeta.

Definition at line 299 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdetadzeta_map, and libMesh::libmesh_assert().

301  calculate_d2xyz = true; return d2xyzdetadzeta_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
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)

◆ get_d2xyzdxi2()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxi2 ( ) const
inline
Returns
The second partial derivatives in xi.

Definition at line 264 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdxi2_map, and libMesh::libmesh_assert().

266  calculate_d2xyz = true; return d2xyzdxi2_map; }
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2xyzdxideta()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxideta ( ) const
inline
Returns
The second partial derivatives in xi-eta.

Definition at line 285 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdxideta_map, and libMesh::libmesh_assert().

287  calculate_d2xyz = true; return d2xyzdxideta_map; }
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
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2xyzdxidzeta()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxidzeta ( ) const
inline
Returns
The second partial derivatives in xi-zeta.

Definition at line 292 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdxidzeta_map, and libMesh::libmesh_assert().

294  calculate_d2xyz = true; return d2xyzdxidzeta_map; }
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
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

◆ get_d2xyzdzeta2()

const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdzeta2 ( ) const
inline
Returns
The second partial derivatives in zeta.

Definition at line 278 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2xyzdzeta2_map, and libMesh::libmesh_assert().

280  calculate_d2xyz = true; return d2xyzdzeta2_map; }
std::vector< RealGradient > d2xyzdzeta2_map
Vector of second partial derivatives in zeta: d^2(x)/d(zeta)^2.
Definition: fe_map.h:796
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_d2zetadxyz2()

const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2zetadxyz2 ( ) const
inline

Second derivatives of "zeta" reference coordinate wrt physical coordinates.

Definition at line 395 of file fe_map.h.

References calculate_d2xyz, calculations_started, d2zetadxyz2_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

397  calculate_d2xyz = true; return d2zetadxyz2_map; }
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
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_detadx()

const std::vector<Real>& libMesh::FEMap::get_detadx ( ) const
inline
Returns
The deta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 333 of file fe_map.h.

References calculate_dxyz, calculations_started, detadx_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

335  calculate_dxyz = true; return detadx_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823

◆ get_detady()

const std::vector<Real>& libMesh::FEMap::get_detady ( ) const
inline
Returns
The deta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 341 of file fe_map.h.

References calculate_dxyz, calculations_started, detady_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

343  calculate_dxyz = true; return detady_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829

◆ get_detadz()

const std::vector<Real>& libMesh::FEMap::get_detadz ( ) const
inline
Returns
The deta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 349 of file fe_map.h.

References calculate_dxyz, calculations_started, detadz_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

351  calculate_dxyz = true; return detadz_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835

◆ get_dphideta_map() [1/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphideta_map ( ) const
inline
Returns
The reference to physical map derivative

Definition at line 423 of file fe_map.h.

References calculate_dxyz, calculations_started, dphideta_map, and libMesh::libmesh_assert().

425  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889

◆ get_dphideta_map() [2/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_dphideta_map ( )
inline
Returns
The reference to physical map derivative

Definition at line 566 of file fe_map.h.

References calculate_dxyz, calculations_started, dphideta_map, and libMesh::libmesh_assert().

568  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889

◆ get_dphidxi_map() [1/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidxi_map ( ) const
inline
Returns
The reference to physical map derivative

Definition at line 416 of file fe_map.h.

References calculate_dxyz, calculations_started, dphidxi_map, and libMesh::libmesh_assert().

418  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Map for the derivative, d(phi)/d(xi).
Definition: fe_map.h:884
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dphidxi_map() [2/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidxi_map ( )
inline
Returns
The reference to physical map derivative

Definition at line 559 of file fe_map.h.

References calculate_dxyz, calculations_started, dphidxi_map, and libMesh::libmesh_assert().

561  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Map for the derivative, d(phi)/d(xi).
Definition: fe_map.h:884
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dphidzeta_map() [1/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidzeta_map ( ) const
inline
Returns
The reference to physical map derivative

Definition at line 430 of file fe_map.h.

References calculate_dxyz, calculations_started, dphidzeta_map, and libMesh::libmesh_assert().

432  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
Definition: fe_map.h:894
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dphidzeta_map() [2/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidzeta_map ( )
inline
Returns
The reference to physical map derivative

Definition at line 573 of file fe_map.h.

References calculate_dxyz, calculations_started, dphidzeta_map, and libMesh::libmesh_assert().

575  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
Definition: fe_map.h:894
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dpsideta() [1/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsideta ( )
inline
Returns
The reference to physical map derivative for the side/edge

Definition at line 494 of file fe_map.h.

References calculate_dxyz, calculations_started, dpsideta_map, and libMesh::libmesh_assert().

496  calculate_dxyz = true; return dpsideta_map; }
std::vector< std::vector< Real > > dpsideta_map
Map for the derivative of the side function, d(psi)/d(eta).
Definition: fe_map.h:945
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dpsideta() [2/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsideta ( ) const
inline

Definition at line 498 of file fe_map.h.

References calculate_dxyz, calculations_started, dpsideta_map, and libMesh::libmesh_assert().

500  calculate_dxyz = true; return dpsideta_map; }
std::vector< std::vector< Real > > dpsideta_map
Map for the derivative of the side function, d(psi)/d(eta).
Definition: fe_map.h:945
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dpsidxi() [1/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsidxi ( )
inline
Returns
The reference to physical map derivative for the side/edge

Definition at line 483 of file fe_map.h.

References calculate_dxyz, calculations_started, dpsidxi_map, and libMesh::libmesh_assert().

485  calculate_dxyz = true; return dpsidxi_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939

◆ get_dpsidxi() [2/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsidxi ( ) const
inline

Definition at line 487 of file fe_map.h.

References calculate_dxyz, calculations_started, dpsidxi_map, and libMesh::libmesh_assert().

489  calculate_dxyz = true; return dpsidxi_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Real > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939

◆ get_dxidx()

const std::vector<Real>& libMesh::FEMap::get_dxidx ( ) const
inline
Returns
The dxi/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 309 of file fe_map.h.

References calculate_dxyz, calculations_started, dxidx_map, and libMesh::libmesh_assert().

Referenced by libMesh::HCurlFETransformation< OutputShape >::init_map_d2phi(), libMesh::HDivFETransformation< OutputShape >::init_map_d2phi(), libMesh::H1FETransformation< OutputShape >::init_map_d2phi(), libMesh::HCurlFETransformation< OutputShape >::init_map_dphi(), libMesh::HDivFETransformation< OutputShape >::init_map_dphi(), libMesh::H1FETransformation< OutputShape >::init_map_dphi(), libMesh::HDivFETransformation< OutputShape >::init_map_phi(), libMesh::HCurlFETransformation< OutputShape >::init_map_phi(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

311  calculate_dxyz = true; return dxidx_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
Definition: fe_map.h:804

◆ get_dxidy()

const std::vector<Real>& libMesh::FEMap::get_dxidy ( ) const
inline
Returns
The dxi/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 317 of file fe_map.h.

References calculate_dxyz, calculations_started, dxidy_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

319  calculate_dxyz = true; return dxidy_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810

◆ get_dxidz()

const std::vector<Real>& libMesh::FEMap::get_dxidz ( ) const
inline
Returns
The dxi/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 325 of file fe_map.h.

References calculate_dxyz, calculations_started, dxidz_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

327  calculate_dxyz = true; return dxidz_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dxyzdeta()

const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdeta ( ) const
inline
Returns
The element tangents in eta-direction at the quadrature points.

Definition at line 247 of file fe_map.h.

References calculate_dxyz, calculations_started, dxyzdeta_map, and libMesh::libmesh_assert().

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), and libMesh::HDivFETransformation< OutputShape >::map_phi().

249  calculate_dxyz = true; return dxyzdeta_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
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

◆ get_dxyzdxi()

const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdxi ( ) const
inline
Returns
The element tangents in xi-direction at the quadrature points.

Definition at line 239 of file fe_map.h.

References calculate_dxyz, calculations_started, dxyzdxi_map, and libMesh::libmesh_assert().

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), and libMesh::HDivFETransformation< OutputShape >::map_phi().

241  calculate_dxyz = true; return dxyzdxi_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
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
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dxyzdzeta()

const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdzeta ( ) const
inline
Returns
The element tangents in zeta-direction at the quadrature points.

Definition at line 255 of file fe_map.h.

References calculate_dxyz, calculations_started, dxyzdzeta_map, and libMesh::libmesh_assert().

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), and libMesh::HDivFETransformation< OutputShape >::map_phi().

257  calculate_dxyz = true; return dxyzdzeta_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
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
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dzetadx()

const std::vector<Real>& libMesh::FEMap::get_dzetadx ( ) const
inline
Returns
The dzeta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 357 of file fe_map.h.

References calculate_dxyz, calculations_started, dzetadx_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

359  calculate_dxyz = true; return dzetadx_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
std::vector< Real > dzetadx_map
Map for partial derivatives: d(zeta)/d(x).
Definition: fe_map.h:842
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dzetady()

const std::vector<Real>& libMesh::FEMap::get_dzetady ( ) const
inline
Returns
The dzeta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 365 of file fe_map.h.

References calculate_dxyz, calculations_started, dzetady_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

367  calculate_dxyz = true; return dzetady_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
std::vector< Real > dzetady_map
Map for partial derivatives: d(zeta)/d(y).
Definition: fe_map.h:848
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_dzetadz()

const std::vector<Real>& libMesh::FEMap::get_dzetadz ( ) const
inline
Returns
The dzeta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 373 of file fe_map.h.

References calculate_dxyz, calculations_started, dzetadz_map, and libMesh::libmesh_assert().

Referenced by libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().

375  calculate_dxyz = true; return dzetadz_map; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
std::vector< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)

◆ get_jacobian()

const std::vector<Real>& libMesh::FEMap::get_jacobian ( ) const
inline
Returns
The element Jacobian for each quadrature point.

Definition at line 223 of file fe_map.h.

References calculate_dxyz, calculations_started, jac, and libMesh::libmesh_assert().

Referenced by libMesh::Elem::has_invertible_map(), libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::HDivFETransformation< OutputShape >::map_div(), and libMesh::HDivFETransformation< OutputShape >::map_phi().

225  calculate_dxyz = true; return jac; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995

◆ get_JxW() [1/2]

const std::vector<Real>& libMesh::FEMap::get_JxW ( ) const
inline
Returns
The element Jacobian times the quadrature weight for each quadrature point.

Definition at line 231 of file fe_map.h.

References calculate_dxyz, calculations_started, JxW, and libMesh::libmesh_assert().

233  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000

◆ get_JxW() [2/2]

std::vector<Real>& libMesh::FEMap::get_JxW ( )
inline
Returns
Writable reference to the element Jacobian times the quadrature weight for each quadrature point.

Definition at line 627 of file fe_map.h.

References calculate_dxyz, calculations_started, JxW, and libMesh::libmesh_assert().

629  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000

◆ get_normals()

const std::vector<Point>& libMesh::FEMap::get_normals ( ) const
inline
Returns
The outward pointing normal vectors for face integration.

Definition at line 444 of file fe_map.h.

References calculate_dxyz, calculations_started, libMesh::libmesh_assert(), and normals.

446  calculate_dxyz = true; return normals; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< Point > normals
Normal vectors on boundary at quadrature points.
Definition: fe_map.h:980

◆ get_phi_map() [1/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_phi_map ( ) const
inline
Returns
The reference to physical map for the element

Definition at line 409 of file fe_map.h.

References calculate_xyz, calculations_started, libMesh::libmesh_assert(), and phi_map.

411  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011

◆ get_phi_map() [2/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_phi_map ( )
inline
Returns
The reference to physical map for the element

Definition at line 552 of file fe_map.h.

References calculate_xyz, calculations_started, libMesh::libmesh_assert(), and phi_map.

554  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011

◆ get_psi() [1/2]

const std::vector<std::vector<Real> >& libMesh::FEMap::get_psi ( ) const
inline
Returns
The reference to physical map for the side/edge

Definition at line 403 of file fe_map.h.

References psi_map.

404  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Map for the side shape functions, psi.
Definition: fe_map.h:933

◆ get_psi() [2/2]

std::vector<std::vector<Real> >& libMesh::FEMap::get_psi ( )
inline
Returns
The reference to physical map for the side/edge

Definition at line 477 of file fe_map.h.

References psi_map.

478  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Map for the side shape functions, psi.
Definition: fe_map.h:933

◆ get_tangents()

const std::vector<std::vector<Point> >& libMesh::FEMap::get_tangents ( ) const
inline
Returns
The tangent vectors for face integration.

Definition at line 437 of file fe_map.h.

References calculate_dxyz, calculations_started, libMesh::libmesh_assert(), and tangents.

439  calculate_dxyz = true; return tangents; }
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
std::vector< std::vector< Point > > tangents
Tangent vectors on boundary at quadrature points.
Definition: fe_map.h:975

◆ get_xyz()

const std::vector<Point>& libMesh::FEMap::get_xyz ( ) const
inline
Returns
The xyz spatial locations of the quadrature points on the element.

Definition at line 216 of file fe_map.h.

References calculate_xyz, calculations_started, libMesh::libmesh_assert(), and xyz.

218  calculate_xyz = true; return xyz; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_map.h:1006
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740

◆ init_edge_shape_functions()

template<unsigned int Dim>
void libMesh::FEMap::init_edge_shape_functions ( const std::vector< Point > &  qp,
const Elem edge 
)

Same as before, but for an edge.

This is used for some projection operators.

Definition at line 565 of file fe_boundary.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, d2psidxi2_map, libMesh::Elem::default_order(), determine_calculations(), dpsidxi_map, libMesh::libmesh_assert(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), psi_map, libMesh::FEInterface::shape_deriv_function(), libMesh::FEInterface::shape_function(), and libMesh::FEInterface::shape_second_deriv_function().

567 {
568  // Start logging the shape function initialization
569  LOG_SCOPE("init_edge_shape_functions()", "FEMap");
570 
571  libmesh_assert(edge);
572 
573  // We're calculating now!
574  this->determine_calculations();
575 
576  // The element type and order to use in
577  // the map
578  const FEFamily mapping_family = FEMap::map_fe_type(*edge);
579  const FEType map_fe_type(edge->default_order(), mapping_family);
580 
581  // The number of quadrature points.
582  const unsigned int n_qp = cast_int<unsigned int>(qp.size());
583 
584  // Do not use the p_level(), if any, that is inherited by the side.
585  const unsigned int n_mapping_shape_functions =
586  FEInterface::n_shape_functions(map_fe_type, /*extra_order=*/0, edge);
587 
588  // resize the vectors to hold current data
589  // Psi are the shape functions used for the FE mapping
590  if (calculate_xyz)
591  this->psi_map.resize (n_mapping_shape_functions);
592  if (calculate_dxyz)
593  this->dpsidxi_map.resize (n_mapping_shape_functions);
594 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
595  if (calculate_d2xyz)
596  this->d2psidxi2_map.resize (n_mapping_shape_functions);
597 #endif
598 
599  FEInterface::shape_ptr shape_ptr =
601 
602  FEInterface::shape_deriv_ptr shape_deriv_ptr =
604 
605 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
606  FEInterface::shape_second_deriv_ptr shape_second_deriv_ptr =
608 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
609 
610  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
611  {
612  // Allocate space to store the values of the shape functions
613  // and their first and second derivatives at the quadrature points.
614  if (calculate_xyz)
615  this->psi_map[i].resize (n_qp);
616  if (calculate_dxyz)
617  this->dpsidxi_map[i].resize (n_qp);
618 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
619  if (calculate_d2xyz)
620  this->d2psidxi2_map[i].resize (n_qp);
621 #endif
622 
623  // Compute the value of mapping shape function i, and its first
624  // and second derivatives at quadrature point p
625  for (unsigned int p=0; p<n_qp; p++)
626  {
627  if (calculate_xyz)
628  this->psi_map[i][p] = shape_ptr (map_fe_type, edge, i, qp[p], false);
629  if (calculate_dxyz)
630  this->dpsidxi_map[i][p] = shape_deriv_ptr (map_fe_type, edge, i, 0, qp[p], false);
631 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
632  if (calculate_d2xyz)
633  this->d2psidxi2_map[i][p] = shape_second_deriv_ptr(map_fe_type, edge, i, 0, qp[p], false);
634 #endif
635  }
636  }
637 }
Real(* shape_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function derivative values.
Definition: fe_interface.h:623
std::vector< std::vector< Real > > psi_map
Map for the side shape functions, psi.
Definition: fe_map.h:933
static shape_ptr shape_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
Real(* shape_ptr)(const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function values.
Definition: fe_interface.h:516
static shape_second_deriv_ptr shape_second_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< std::vector< Real > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939
Real(* shape_second_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function second derivative values...
Definition: fe_interface.h:727
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
FEFamily
defines an enum for finite element families.
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ init_face_shape_functions()

template<unsigned int Dim>
void libMesh::FEMap::init_face_shape_functions ( const std::vector< Point > &  qp,
const Elem side 
)

Initializes the reference to physical element map for a side.

This is used for boundary integration.

Definition at line 437 of file fe_boundary.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, d2psideta2_map, d2psidxi2_map, d2psidxideta_map, libMesh::Elem::default_order(), determine_calculations(), dpsideta_map, dpsidxi_map, libMesh::libmesh_assert(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), psi_map, libMesh::FEInterface::shape_deriv_function(), libMesh::FEInterface::shape_function(), and libMesh::FEInterface::shape_second_deriv_function().

439 {
440  // Start logging the shape function initialization
441  LOG_SCOPE("init_face_shape_functions()", "FEMap");
442 
443  libmesh_assert(side);
444 
445  // We're calculating now!
446  this->determine_calculations();
447 
448  // The element type and order to use in
449  // the map
450  const FEFamily mapping_family = FEMap::map_fe_type(*side);
451  const FEType map_fe_type(side->default_order(), mapping_family);
452 
453  // The number of quadrature points.
454  const unsigned int n_qp = cast_int<unsigned int>(qp.size());
455 
456  // Do not use the p_level(), if any, that is inherited by the side.
457  const unsigned int n_mapping_shape_functions =
458  FEInterface::n_shape_functions(map_fe_type, /*extra_order=*/0, side);
459 
460  // resize the vectors to hold current data
461  // Psi are the shape functions used for the FE mapping
462  if (calculate_xyz)
463  this->psi_map.resize (n_mapping_shape_functions);
464 
465  if (Dim > 1)
466  {
467  if (calculate_dxyz)
468  this->dpsidxi_map.resize (n_mapping_shape_functions);
469 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
470  if (calculate_d2xyz)
471  this->d2psidxi2_map.resize (n_mapping_shape_functions);
472 #endif
473  }
474 
475  if (Dim == 3)
476  {
477  if (calculate_dxyz)
478  this->dpsideta_map.resize (n_mapping_shape_functions);
479 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
480  if (calculate_d2xyz)
481  {
482  this->d2psidxideta_map.resize (n_mapping_shape_functions);
483  this->d2psideta2_map.resize (n_mapping_shape_functions);
484  }
485 #endif
486  }
487 
488  FEInterface::shape_ptr shape_ptr =
490 
491  FEInterface::shape_deriv_ptr shape_deriv_ptr =
493 
494 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
495  FEInterface::shape_second_deriv_ptr shape_second_deriv_ptr =
497 #endif
498 
499  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
500  {
501  // Allocate space to store the values of the shape functions
502  // and their first and second derivatives at the quadrature points.
503  if (calculate_xyz)
504  this->psi_map[i].resize (n_qp);
505  if (Dim > 1)
506  {
507  if (calculate_dxyz)
508  this->dpsidxi_map[i].resize (n_qp);
509 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
510  if (calculate_d2xyz)
511  this->d2psidxi2_map[i].resize (n_qp);
512 #endif
513  }
514  if (Dim == 3)
515  {
516  if (calculate_dxyz)
517  this->dpsideta_map[i].resize (n_qp);
518 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
519  if (calculate_d2xyz)
520  {
521  this->d2psidxideta_map[i].resize (n_qp);
522  this->d2psideta2_map[i].resize (n_qp);
523  }
524 #endif
525  }
526 
527 
528  // Compute the value of mapping shape function i, and its first
529  // and second derivatives at quadrature point p
530  for (unsigned int p=0; p<n_qp; p++)
531  {
532  if (calculate_xyz)
533  this->psi_map[i][p] = shape_ptr (map_fe_type, side, i, qp[p], false);
534  if (Dim > 1)
535  {
536  if (calculate_dxyz)
537  this->dpsidxi_map[i][p] = shape_deriv_ptr (map_fe_type, side, i, 0, qp[p], false);
538 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
539  if (calculate_d2xyz)
540  this->d2psidxi2_map[i][p] = shape_second_deriv_ptr(map_fe_type, side, i, 0, qp[p], false);
541 #endif
542  }
543  // libMesh::out << "this->d2psidxi2_map["<<i<<"][p]=" << d2psidxi2_map[i][p] << std::endl;
544 
545  // If we are in 3D, then our sides are 2D faces.
546  // For the second derivatives, we must also compute the cross
547  // derivative d^2() / dxi deta
548  if (Dim == 3)
549  {
550  if (calculate_dxyz)
551  this->dpsideta_map[i][p] = shape_deriv_ptr (map_fe_type, side, i, 1, qp[p], false);
552 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
553  if (calculate_d2xyz)
554  {
555  this->d2psidxideta_map[i][p] = shape_second_deriv_ptr(map_fe_type, side, i, 1, qp[p], false);
556  this->d2psideta2_map[i][p] = shape_second_deriv_ptr(map_fe_type, side, i, 2, qp[p], false);
557  }
558 #endif
559  }
560  }
561  }
562 }
Real(* shape_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function derivative values.
Definition: fe_interface.h:623
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
static shape_ptr shape_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
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
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
libmesh_assert(ctx)
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< std::vector< Real > > d2psidxi2_map
Map for the second derivatives (in xi) of the side shape functions.
Definition: fe_map.h:954
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
Real(* shape_ptr)(const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function values.
Definition: fe_interface.h:516
static shape_second_deriv_ptr shape_second_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< std::vector< Real > > dpsidxi_map
Map for the derivative of the side functions, d(psi)/d(xi).
Definition: fe_map.h:939
Real(* shape_second_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function second derivative values...
Definition: fe_interface.h:727
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
FEFamily
defines an enum for finite element families.
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ init_reference_to_physical_map() [1/2]

template<unsigned int Dim>
void libMesh::FEMap::init_reference_to_physical_map ( const std::vector< Point > &  qp,
const Elem elem 
)

Definition at line 108 of file fe_map.C.

References libMesh::FEInterface::all_shape_derivs(), libMesh::FEInterface::all_shapes(), calculate_d2xyz, calculate_dxyz, calculate_xyz, d2phideta2_map, d2phidetadzeta_map, d2phidxi2_map, d2phidxideta_map, d2phidxidzeta_map, d2phidzeta2_map, libMesh::Elem::default_order(), determine_calculations(), dphideta_map, dphidxi_map, dphidzeta_map, libMesh::Elem::is_linear(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), phi_map, libMesh::FEInterface::shape_deriv_function(), and libMesh::FEInterface::shape_second_deriv_function().

Referenced by libMesh::Elem::has_invertible_map().

110 {
111  // Start logging the reference->physical map initialization
112  LOG_SCOPE("init_reference_to_physical_map()", "FEMap");
113 
114  // We're calculating now!
115  this->determine_calculations();
116 
117  // The number of quadrature points.
118  const std::size_t n_qp = qp.size();
119 
120  // The element type and order to use in
121  // the map
122  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
123  const FEType map_fe_type(elem->default_order(), mapping_family);
124 
125  // Number of shape functions used to construct the map
126  // (Lagrange shape functions are used for mapping)
127  // Do not consider the Elem::p_level(), if any, when computing the
128  // number of shape functions.
129  const unsigned int n_mapping_shape_functions =
130  FEInterface::n_shape_functions (map_fe_type, /*extra_order=*/0, elem);
131 
132  // Maybe we already have correctly-sized data? Check data sizes,
133  // and get ready to break out of a "loop" if all these resize()
134  // calls are redundant.
135  unsigned int old_n_qp = 0;
136 
137  do
138  {
139  if (calculate_xyz)
140  {
141  if (this->phi_map.size() == n_mapping_shape_functions)
142  {
143  old_n_qp = n_mapping_shape_functions ? this->phi_map[0].size() : 0;
144  break;
145  }
146  this->phi_map.resize (n_mapping_shape_functions);
147  }
148  if (Dim > 0)
149  {
150  if (calculate_dxyz)
151  {
152  if (this->dphidxi_map.size() == n_mapping_shape_functions)
153  {
154  old_n_qp = n_mapping_shape_functions ? this->dphidxi_map[0].size() : 0;
155  break;
156  }
157  this->dphidxi_map.resize (n_mapping_shape_functions);
158  }
159 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
160  // Don't waste time considering early break here; if we
161  // asked for d2xyz then we surely asked for dxyz too and
162  // considered early break above.
163  if (calculate_d2xyz)
164  this->d2phidxi2_map.resize (n_mapping_shape_functions);
165 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
166  }
167 
168  if (Dim > 1)
169  {
170  if (calculate_dxyz)
171  this->dphideta_map.resize (n_mapping_shape_functions);
172 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
173  if (calculate_d2xyz)
174  {
175  this->d2phidxideta_map.resize (n_mapping_shape_functions);
176  this->d2phideta2_map.resize (n_mapping_shape_functions);
177  }
178 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
179  }
180 
181  if (Dim > 2)
182  {
183  if (calculate_dxyz)
184  this->dphidzeta_map.resize (n_mapping_shape_functions);
185 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
186  if (calculate_d2xyz)
187  {
188  this->d2phidxidzeta_map.resize (n_mapping_shape_functions);
189  this->d2phidetadzeta_map.resize (n_mapping_shape_functions);
190  this->d2phidzeta2_map.resize (n_mapping_shape_functions);
191  }
192 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
193  }
194  }
195  while (false);
196 
197  if (old_n_qp != n_qp)
198  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
199  {
200  if (calculate_xyz)
201  this->phi_map[i].resize (n_qp);
202  if (Dim > 0)
203  {
204  if (calculate_dxyz)
205  this->dphidxi_map[i].resize (n_qp);
206 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
207  if (calculate_d2xyz)
208  {
209  this->d2phidxi2_map[i].resize (n_qp);
210  if (Dim > 1)
211  {
212  this->d2phidxideta_map[i].resize (n_qp);
213  this->d2phideta2_map[i].resize (n_qp);
214  }
215  if (Dim > 2)
216  {
217  this->d2phidxidzeta_map[i].resize (n_qp);
218  this->d2phidetadzeta_map[i].resize (n_qp);
219  this->d2phidzeta2_map[i].resize (n_qp);
220  }
221  }
222 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
223 
224  if (Dim > 1 && calculate_dxyz)
225  this->dphideta_map[i].resize (n_qp);
226 
227  if (Dim > 2 && calculate_dxyz)
228  this->dphidzeta_map[i].resize (n_qp);
229  }
230  }
231 
232  // Optimize for the *linear* geometric elements case:
233  bool is_linear = elem->is_linear();
234 
235  FEInterface::shape_deriv_ptr shape_deriv_ptr =
237 
238 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
239  FEInterface::shape_second_deriv_ptr shape_second_deriv_ptr =
241 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
242 
243  if (calculate_xyz)
244  FEInterface::all_shapes(Dim, map_fe_type, elem, qp, this->phi_map, false);
245 
246  switch (Dim)
247  {
248  //------------------------------------------------------------
249  // 0D
250  case 0:
251  {
252  // No mapping derivatives here
253  break;
254  }
255 
256  //------------------------------------------------------------
257  // 1D
258  case 1:
259  {
260  // Compute gradients of mapping shape functions i at quadrature points p
261 
262  // TODO: optimizations for the RATIONAL_BERNSTEIN+linear case
263  if (is_linear)
264  {
265  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
266  {
267  if (calculate_dxyz)
268  {
269  this->dphidxi_map[i][0] =
270  shape_deriv_ptr(map_fe_type, elem, i, 0, qp[0], false);
271  for (std::size_t p=1; p<n_qp; p++)
272  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
273  }
274 
275 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
276  if (calculate_d2xyz)
277  {
278  this->d2phidxi2_map[i][0] =
279  shape_second_deriv_ptr(map_fe_type, elem, i, 0, qp[0], false);
280  for (std::size_t p=1; p<n_qp; p++)
281  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
282  }
283 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
284  }
285  }
286  else
287  {
288  if (calculate_dxyz)
289  {
290  std::vector<std::vector<Real>> * comps[3]
291  { &this->dphidxi_map, &this->dphideta_map, &this->dphidzeta_map };
292  FEInterface::all_shape_derivs(Dim, map_fe_type, elem, qp, comps, false);
293  }
294 
295 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
296  if (calculate_d2xyz)
297  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
298  for (std::size_t p=0; p<n_qp; p++)
299  this->d2phidxi2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 0, qp[p], false);
300 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
301  }
302 
303  break;
304  }
305  //------------------------------------------------------------
306  // 2D
307  case 2:
308  {
309  // Compute gradients of mapping shape functions i at quadrature points p
310 
311  // TODO: optimizations for the RATIONAL_BERNSTEIN+linear case
312  if (is_linear)
313  {
314  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
315  {
316  if (calculate_dxyz)
317  {
318  this->dphidxi_map[i][0] = shape_deriv_ptr (map_fe_type, elem, i, 0, qp[0], false);
319  this->dphideta_map[i][0] = shape_deriv_ptr (map_fe_type, elem, i, 1, qp[0], false);
320  for (std::size_t p=1; p<n_qp; p++)
321  {
322  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
323  this->dphideta_map[i][p] = this->dphideta_map[i][0];
324  }
325  }
326 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
327  if (calculate_d2xyz)
328  {
329  this->d2phidxi2_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 0, qp[0], false);
330  this->d2phidxideta_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 1, qp[0], false);
331  this->d2phideta2_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 2, qp[0], false);
332  for (std::size_t p=1; p<n_qp; p++)
333  {
334  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
335  this->d2phidxideta_map[i][p] = this->d2phidxideta_map[i][0];
336  this->d2phideta2_map[i][p] = this->d2phideta2_map[i][0];
337  }
338  }
339 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
340  }
341  }
342  else
343  {
344  if (calculate_dxyz)
345  {
346  std::vector<std::vector<Real>> * comps[3]
347  { &this->dphidxi_map, &this->dphideta_map, &this->dphidzeta_map };
348  FEInterface::all_shape_derivs(Dim, map_fe_type, elem, qp, comps, false);
349  }
350 
351 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
352  if (calculate_d2xyz)
353  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
354  for (std::size_t p=0; p<n_qp; p++)
355  {
356  this->d2phidxi2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 0, qp[p], false);
357  this->d2phidxideta_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 1, qp[p], false);
358  this->d2phideta2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 2, qp[p], false);
359  }
360 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
361  }
362 
363  break;
364  }
365 
366  //------------------------------------------------------------
367  // 3D
368  case 3:
369  {
370  // Compute gradients of mapping shape functions i at quadrature points p
371 
372  // TODO: optimizations for the RATIONAL_BERNSTEIN+linear case
373  if (is_linear)
374  {
375  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
376  {
377  if (calculate_dxyz)
378  {
379  this->dphidxi_map[i][0] = shape_deriv_ptr (map_fe_type, elem, i, 0, qp[0], false);
380  this->dphideta_map[i][0] = shape_deriv_ptr (map_fe_type, elem, i, 1, qp[0], false);
381  this->dphidzeta_map[i][0] = shape_deriv_ptr (map_fe_type, elem, i, 2, qp[0], false);
382 
383  for (std::size_t p=1; p<n_qp; p++)
384  {
385  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
386  this->dphideta_map[i][p] = this->dphideta_map[i][0];
387  this->dphidzeta_map[i][p] = this->dphidzeta_map[i][0];
388  }
389  }
390 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
391  if (calculate_d2xyz)
392  {
393  this->d2phidxi2_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 0, qp[0], false);
394  this->d2phidxideta_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 1, qp[0], false);
395  this->d2phideta2_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 2, qp[0], false);
396  this->d2phidxidzeta_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 3, qp[0], false);
397  this->d2phidetadzeta_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 4, qp[0], false);
398  this->d2phidzeta2_map[i][0] = shape_second_deriv_ptr (map_fe_type, elem, i, 5, qp[0], false);
399 
400  for (std::size_t p=1; p<n_qp; p++)
401  {
402  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
403  this->d2phidxideta_map[i][p] = this->d2phidxideta_map[i][0];
404  this->d2phideta2_map[i][p] = this->d2phideta2_map[i][0];
405  this->d2phidxidzeta_map[i][p] = this->d2phidxidzeta_map[i][0];
406  this->d2phidetadzeta_map[i][p] = this->d2phidetadzeta_map[i][0];
407  this->d2phidzeta2_map[i][p] = this->d2phidzeta2_map[i][0];
408  }
409  }
410 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
411  }
412  }
413  else
414  {
415  if (calculate_dxyz)
416  {
417  std::vector<std::vector<Real>> * comps[3]
418  { &this->dphidxi_map, &this->dphideta_map, &this->dphidzeta_map };
419  FEInterface::all_shape_derivs(Dim, map_fe_type, elem, qp, comps, false);
420  }
421 
422 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
423  if (calculate_d2xyz)
424  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
425  for (std::size_t p=0; p<n_qp; p++)
426  {
427  this->d2phidxi2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 0, qp[p], false);
428  this->d2phidxideta_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 1, qp[p], false);
429  this->d2phideta2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 2, qp[p], false);
430  this->d2phidxidzeta_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 3, qp[p], false);
431  this->d2phidetadzeta_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 4, qp[p], false);
432  this->d2phidzeta2_map[i][p] = shape_second_deriv_ptr (map_fe_type, elem, i, 5, qp[p], false);
433  }
434 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
435  }
436 
437  break;
438  }
439 
440  default:
441  libmesh_error_msg("Invalid Dim = " << Dim);
442  }
443 }
Real(* shape_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function derivative values.
Definition: fe_interface.h:623
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
Definition: fe_map.h:894
std::vector< std::vector< Real > > dphidxi_map
Map for the derivative, d(phi)/d(xi).
Definition: fe_map.h:884
bool calculate_dxyz
Should we calculate mapping gradients?
Definition: fe_map.h:1016
std::vector< std::vector< Real > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
Definition: fe_map.h:916
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< std::vector< Real > > phi_map
Map for the shape function phi.
Definition: fe_map.h:879
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
Definition: fe_map.h:921
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
bool calculate_d2xyz
Should we calculate mapping hessians?
Definition: fe_map.h:1023
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< std::vector< Real > > d2phidxideta_map
Map for the second derivative, d^2(phi)/d(xi)d(eta).
Definition: fe_map.h:906
static shape_second_deriv_ptr shape_second_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
Real(* shape_second_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function second derivative values...
Definition: fe_interface.h:727
void determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
FEFamily
defines an enum for finite element families.
std::vector< std::vector< Real > > d2phidzeta2_map
Map for the second derivative, d^2(phi)/d(zeta)^2.
Definition: fe_map.h:926
static void all_shape_derivs(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType >> *comps[3], const bool add_p_level=true)
std::vector< std::vector< Real > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
Definition: fe_map.h:901
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
Definition: fe_map.h:889
static void all_shapes(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType >> &phi, const bool add_p_level=true)
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ init_reference_to_physical_map() [2/2]

void libMesh::FEMap::init_reference_to_physical_map ( unsigned int  dim,
const std::vector< Point > &  qp,
const Elem elem 
)
inline

Definition at line 1050 of file fe_map.h.

References dim.

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 }
unsigned int dim

◆ inverse_map() [1/2]

Point libMesh::FEMap::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 
)
static
Returns
The location (on the reference element) of the point p located in physical space. This function requires inverting the (possibly nonlinear) transformation map, so it is not trivial. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence \( \{ p_n \} \), and the iteration is terminated when \( \|p - p_n\| < \mbox{\texttt{tolerance}} \)

When secure == true, the following checks are enabled:

In DEBUG mode only: .) dim==1,2: throw an error if det(J) <= 0 for any Newton iteration. .) Print warning for every iteration beyond max_cnt in which the Newton scheme has not converged.

In !DEBUG mode only: .) Print a single warning (1 warning for the entire simulation) if the Newton scheme ever requires more than max_cnt iterations.

In both DEBUG and !DEBUG modes: .) dim==3: Throw an exception for singular Jacobian. .) Throw an error if the Newton iteration has not converged in 2*max_cnt iterations.

In addition to the checks above, the "extra_checks" parameter can be used to turn on some additional tests. In particular, when extra_checks == true and compiled in DEBUG mode: .) Print a warning if p != map(inverse_map(p)) to within tolerance. .) Print a warning if the inverse-mapped point is not on the reference element to within tolerance.

Definition at line 1626 of file fe_map.C.

References libMesh::TypeVector< T >::add(), dim, libMesh::err, libMesh::DofObject::id(), libMesh::Elem::infinite(), libMesh::invalid_uint, libMesh::InfFEMap::inverse_map(), libMesh::libmesh_assert(), libMesh::libmesh_ignore(), libMesh::Elem::local_singular_node(), map(), map_deriv(), libMesh::Elem::master_point(), libMesh::Elem::n_nodes(), libMesh::TypeVector< T >::norm(), libMesh::FEAbstract::on_reference_element(), libMesh::Elem::print_info(), libMesh::Real, and libMesh::Elem::type().

Referenced by libMesh::MeshFunction::_gradient_on_elem(), libMesh::HPCoarsenTest::add_projection(), assemble_ellipticdg(), assemble_poisson(), InfFERadialTest::base_point(), libMesh::FEMContext::build_new_fe(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), compute_face_map(), compute_jacobian(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), compute_residual(), libMesh::MeshFunction::discontinuous_value(), libMesh::DTKEvaluator::evaluate(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::RBEIMConstruction::initialize_qp_data(), libMesh::InfFEMap::inverse_map(), inverse_map(), libMesh::FE< Dim, LAGRANGE_VEC >::inverse_map(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), libMesh::MeshFunction::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::Elem::point_test(), libMesh::System::point_value(), libMesh::JumpErrorEstimator::reinit_sides(), libMesh::HPCoarsenTest::select_refinement(), NavierSystem::side_constraint(), FETest< order, family, elem_type >::testLoop(), and MeshInputTest::testMasterCenters().

1634 {
1635  libmesh_assert(elem);
1636  libmesh_assert_greater_equal (tolerance, 0.);
1637 
1638  libmesh_ignore(extra_checks);
1639 
1640 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1641 
1642  // TODO: possibly use the extra_checks parameter in InfFEMap::inverse_map() as well.
1643 
1644  if (elem->infinite())
1645  return InfFEMap::inverse_map(dim, elem, physical_point, tolerance,
1646  secure);
1647 #endif
1648 
1649  // Start logging the map inversion.
1650  LOG_SCOPE("inverse_map()", "FEMap");
1651 
1652  // How much did the point on the reference
1653  // element change by in this Newton step?
1654  Real inverse_map_error = 0.;
1655 
1656  // The point on the reference element. This is
1657  // the "initial guess" for Newton's method. The
1658  // centroid seems like a good idea, but computing
1659  // it is a little more intensive than, say taking
1660  // the zero point.
1661  //
1662  // Convergence should be insensitive of this choice
1663  // for "good" elements.
1664  Point p; // the zero point. No computation required
1665 
1666  // The number of iterations in the map inversion process.
1667  unsigned int cnt = 0;
1668 
1669  // The number of iterations after which we give up and declare
1670  // divergence
1671  const unsigned int max_cnt = 10;
1672 
1673  // The distance (in master element space) beyond which we give up
1674  // and declare divergence. This is no longer used...
1675  // Real max_step_length = 4.;
1676 
1677 
1678 
1679  // Newton iteration loop.
1680  do
1681  {
1682  // Where our current iterate \p p maps to.
1683  const Point physical_guess = map(dim, elem, p);
1684 
1685  // How far our current iterate is from the actual point.
1686  const Point delta = physical_point - physical_guess;
1687 
1688  // Increment in current iterate \p p, will be computed.
1689  Point dp;
1690 
1691 
1692  // The form of the map and how we invert it depends
1693  // on the dimension that we are in.
1694  switch (dim)
1695  {
1696  // ------------------------------------------------------------------
1697  // 0D map inversion is trivial
1698  case 0:
1699  {
1700  break;
1701  }
1702 
1703  // ------------------------------------------------------------------
1704  // 1D map inversion
1705  //
1706  // Here we find the point on a 1D reference element that maps to
1707  // the point \p physical_point in the domain. This is a bit tricky
1708  // since we do not want to assume that the point \p physical_point
1709  // is also in a 1D domain. In particular, this method might get
1710  // called on the edge of a 3D element, in which case
1711  // \p physical_point actually lives in 3D.
1712  case 1:
1713  {
1714  const Point dxi = map_deriv (dim, elem, 0, p);
1715 
1716  // Newton's method in this case looks like
1717  //
1718  // {X} - {X_n} = [J]*dp
1719  //
1720  // Where {X}, {X_n} are 3x1 vectors, [J] is a 3x1 matrix
1721  // d(x,y,z)/dxi, and we seek dp, a scalar. Since the above
1722  // system is either overdetermined or rank-deficient, we will
1723  // solve the normal equations for this system
1724  //
1725  // [J]^T ({X} - {X_n}) = [J]^T [J] {dp}
1726  //
1727  // which involves the trivial inversion of the scalar
1728  // G = [J]^T [J]
1729  const Real G = dxi*dxi;
1730 
1731  if (secure)
1732  libmesh_assert_greater (G, 0.);
1733 
1734  const Real Ginv = 1./G;
1735 
1736  const Real dxidelta = dxi*delta;
1737 
1738  dp(0) = Ginv*dxidelta;
1739 
1740  // No master elements have radius > 4, but sometimes we
1741  // can take a step that big while still converging
1742  // if (secure)
1743  // libmesh_assert_less (dp.size(), max_step_length);
1744 
1745  break;
1746  }
1747 
1748 
1749 
1750  // ------------------------------------------------------------------
1751  // 2D map inversion
1752  //
1753  // Here we find the point on a 2D reference element that maps to
1754  // the point \p physical_point in the domain. This is a bit tricky
1755  // since we do not want to assume that the point \p physical_point
1756  // is also in a 2D domain. In particular, this method might get
1757  // called on the face of a 3D element, in which case
1758  // \p physical_point actually lives in 3D.
1759  case 2:
1760  {
1761  const Point dxi = map_deriv (dim, elem, 0, p);
1762  const Point deta = map_deriv (dim, elem, 1, p);
1763 
1764  // Newton's method in this case looks like
1765  //
1766  // {X} - {X_n} = [J]*{dp}
1767  //
1768  // Where {X}, {X_n} are 3x1 vectors, [J] is a 3x2 matrix
1769  // d(x,y,z)/d(xi,eta), and we seek {dp}, a 2x1 vector. Since
1770  // the above system is either over-determined or rank-deficient,
1771  // we will solve the normal equations for this system
1772  //
1773  // [J]^T ({X} - {X_n}) = [J]^T [J] {dp}
1774  //
1775  // which involves the inversion of the 2x2 matrix
1776  // [G] = [J]^T [J]
1777  const Real
1778  G11 = dxi*dxi, G12 = dxi*deta,
1779  G21 = dxi*deta, G22 = deta*deta;
1780 
1781 
1782  const Real det = (G11*G22 - G12*G21);
1783 
1784  if (secure)
1785  libmesh_assert_not_equal_to (det, 0.);
1786 
1787  const Real inv_det = 1./det;
1788 
1789  const Real
1790  Ginv11 = G22*inv_det,
1791  Ginv12 = -G12*inv_det,
1792 
1793  Ginv21 = -G21*inv_det,
1794  Ginv22 = G11*inv_det;
1795 
1796 
1797  const Real dxidelta = dxi*delta;
1798  const Real detadelta = deta*delta;
1799 
1800  dp(0) = (Ginv11*dxidelta + Ginv12*detadelta);
1801  dp(1) = (Ginv21*dxidelta + Ginv22*detadelta);
1802 
1803  // No master elements have radius > 4, but sometimes we
1804  // can take a step that big while still converging
1805  // if (secure)
1806  // libmesh_assert_less (dp.size(), max_step_length);
1807 
1808  break;
1809  }
1810 
1811 
1812 
1813  // ------------------------------------------------------------------
1814  // 3D map inversion
1815  //
1816  // Here we find the point in a 3D reference element that maps to
1817  // the point \p physical_point in a 3D domain. Nothing special
1818  // has to happen here, since (unless the map is singular because
1819  // you have a BAD element) the map will be invertible and we can
1820  // apply Newton's method directly.
1821  case 3:
1822  {
1823  const Point dxi = map_deriv (dim, elem, 0, p);
1824  const Point deta = map_deriv (dim, elem, 1, p);
1825  const Point dzeta = map_deriv (dim, elem, 2, p);
1826 
1827  // Newton's method in this case looks like
1828  //
1829  // {X} = {X_n} + [J]*{dp}
1830  //
1831  // Where {X}, {X_n} are 3x1 vectors, [J] is a 3x3 matrix
1832  // d(x,y,z)/d(xi,eta,zeta), and we seek {dp}, a 3x1 vector.
1833  // Since the above system is nonsingular for invertible maps
1834  // we will solve
1835  //
1836  // {dp} = [J]^-1 ({X} - {X_n})
1837  //
1838  // which involves the inversion of the 3x3 matrix [J]
1839  libmesh_try
1840  {
1841  RealTensorValue(dxi(0), deta(0), dzeta(0),
1842  dxi(1), deta(1), dzeta(1),
1843  dxi(2), deta(2), dzeta(2)).solve(delta, dp);
1844  }
1845  libmesh_catch (ConvergenceFailure &)
1846  {
1847  // If we encountered a singular Jacobian, but are at
1848  // a singular node, return said singular node.
1849  const unsigned int local_singular_node =
1850  elem->local_singular_node(physical_point, tolerance);
1851  if (local_singular_node != invalid_uint)
1852  {
1853  libmesh_assert_less(local_singular_node, elem->n_nodes());
1854  return elem->master_point(local_singular_node);
1855  }
1856 
1857  // We encountered a singular Jacobian. The value of
1858  // dp is zero, since it was never changed during the
1859  // call to RealTensorValue::solve(). We don't want to
1860  // continue iterating until max_cnt since there is no
1861  // update to the Newton iterate, and we don't want to
1862  // print the inverse_map_error value since it will
1863  // confusingly be 0. Therefore, in the secure case we
1864  // need to throw an error message while in the !secure
1865  // case we can just return a far away point.
1866  if (secure)
1867  {
1868  libMesh::err << "ERROR: Newton scheme encountered a singular Jacobian in element: "
1869  << elem->id()
1870  << std::endl;
1871 
1872  elem->print_info(libMesh::err);
1873 
1874  libmesh_error_msg("Exiting...");
1875  }
1876  else
1877  {
1878  for (unsigned int i=0; i != dim; ++i)
1879  p(i) = 1e6;
1880  return p;
1881  }
1882  }
1883 
1884  // No master elements have radius > 4, but sometimes we
1885  // can take a step that big while still converging
1886  // if (secure)
1887  // libmesh_assert_less (dp.size(), max_step_length);
1888 
1889  break;
1890  }
1891 
1892 
1893  // Some other dimension?
1894  default:
1895  libmesh_error_msg("Invalid dim = " << dim);
1896  } // end switch(Dim), dp now computed
1897 
1898 
1899 
1900  // ||P_n+1 - P_n||
1901  inverse_map_error = dp.norm();
1902 
1903  // P_n+1 = P_n + dp
1904  p.add (dp);
1905 
1906  // Increment the iteration count.
1907  cnt++;
1908 
1909  // Watch for divergence of Newton's
1910  // method. Here's how it goes:
1911  // (1) For good elements, we expect convergence in 10
1912  // iterations, with no too-large steps.
1913  // - If called with (secure == true) and we have not yet converged
1914  // print out a warning message.
1915  // - If called with (secure == true) and we have not converged in
1916  // 20 iterations abort
1917  // (2) This method may be called in cases when the target point is not
1918  // inside the element and we have no business expecting convergence.
1919  // For these cases if we have not converged in 10 iterations forget
1920  // about it.
1921  if (cnt > max_cnt)
1922  {
1923  // Warn about divergence when secure is true - this
1924  // shouldn't happen
1925  if (secure)
1926  {
1927  // Print every time in devel/dbg modes
1928 #ifndef NDEBUG
1929  libmesh_here();
1930  libMesh::err << "WARNING: Newton scheme has not converged in "
1931  << cnt << " iterations:" << std::endl
1932  << " physical_point="
1933  << physical_point
1934  << " physical_guess="
1935  << physical_guess
1936  << " dp="
1937  << dp
1938  << " p="
1939  << p
1940  << " error=" << inverse_map_error
1941  << " in element " << elem->id()
1942  << std::endl;
1943 
1944  elem->print_info(libMesh::err);
1945 #else
1946  // In optimized mode, just print once that an inverse_map() call
1947  // had trouble converging its Newton iteration.
1948  libmesh_do_once(libMesh::err << "WARNING: At least one element took more than "
1949  << max_cnt
1950  << " iterations to converge in inverse_map()...\n"
1951  << "Rerun in devel/dbg mode for more details."
1952  << std::endl;);
1953 
1954 #endif // NDEBUG
1955 
1956  if (cnt > 2*max_cnt)
1957  {
1958  libMesh::err << "ERROR: Newton scheme FAILED to converge in "
1959  << cnt
1960  << " iterations in element "
1961  << elem->id()
1962  << " for physical point = "
1963  << physical_point
1964  << std::endl;
1965 
1966  elem->print_info(libMesh::err);
1967 
1968  libmesh_error_msg("Exiting...");
1969  }
1970  }
1971  // Return a far off point when secure is false - this
1972  // should only happen when we're trying to map a point
1973  // that's outside the element
1974  else
1975  {
1976  for (unsigned int i=0; i != dim; ++i)
1977  p(i) = 1e6;
1978 
1979  return p;
1980  }
1981  }
1982  }
1983  while (inverse_map_error > tolerance);
1984 
1985 
1986 
1987  // If we are in debug mode and the user requested it, do two extra sanity checks.
1988 #ifdef DEBUG
1989 
1990  if (extra_checks)
1991  {
1992  // Make sure the point \p p on the reference element actually
1993  // does map to the point \p physical_point within a tolerance.
1994 
1995  const Point check = map (dim, elem, p);
1996  const Point diff = physical_point - check;
1997 
1998  if (diff.norm() > tolerance)
1999  {
2000  libmesh_here();
2001  libMesh::err << "WARNING: diff is "
2002  << diff.norm()
2003  << std::endl
2004  << " point="
2005  << physical_point;
2006  libMesh::err << " local=" << check;
2007  libMesh::err << " lref= " << p;
2008 
2009  elem->print_info(libMesh::err);
2010  }
2011 
2012  // Make sure the point \p p on the reference element actually
2013  // is
2014 
2015  if (!FEAbstract::on_reference_element(p, elem->type(), 2*tolerance))
2016  {
2017  libmesh_here();
2018  libMesh::err << "WARNING: inverse_map of physical point "
2019  << physical_point
2020  << " is not on element." << '\n';
2021  elem->print_info(libMesh::err);
2022  }
2023  }
2024 
2025 #endif
2026 
2027  return p;
2028 }
OStreamProxy err
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:286
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)
Definition: inf_fe_map.C:96
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
Definition: fe_abstract.C:601
TensorValue< Real > RealTensorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
void libmesh_ignore(const Args &...)
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static Point map(const unsigned int dim, const Elem *elem, const Point &reference_point)
Definition: fe_map.C:2067
static Point map_deriv(const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
Definition: fe_map.C:2101

◆ inverse_map() [2/2]

void libMesh::FEMap::inverse_map ( unsigned int  dim,
const Elem elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true,
const bool  extra_checks = true 
)
static

Takes a number points in physical space (in the physical_points vector) and finds their location on the reference element for the input element elem.

The values on the reference element are returned in the vector reference_points. The other parameters have the same meaning as the single Point version of inverse_map() above.

Definition at line 2032 of file fe_map.C.

References dim, libMesh::Elem::infinite(), libMesh::InfFEMap::inverse_map(), inverse_map(), and libMesh::libmesh_ignore().

2039 {
2040 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
2041  if (elem->infinite())
2042  {
2043  // TODO: possibly use the extra_checks parameter in InfFEMap::inverse_map() as well.
2044  libmesh_ignore(extra_checks);
2045 
2046  return InfFEMap::inverse_map(dim, elem, physical_points, reference_points, tolerance, secure);
2047  }
2048 #endif
2049 
2050  // The number of points to find the
2051  // inverse map of
2052  const std::size_t n_points = physical_points.size();
2053 
2054  // Resize the vector to hold the points
2055  // on the reference element
2056  reference_points.resize(n_points);
2057 
2058  // Find the coordinates on the reference
2059  // element of each point in physical space
2060  for (std::size_t p=0; p<n_points; p++)
2061  reference_points[p] =
2062  inverse_map (dim, elem, physical_points[p], tolerance, secure, extra_checks);
2063 }
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
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe_map.C:96
void libmesh_ignore(const Args &...)

◆ map()

Point libMesh::FEMap::map ( const unsigned int  dim,
const Elem elem,
const Point reference_point 
)
static
Returns
The location (in physical space) of the point p located on the reference element.

Definition at line 2067 of file fe_map.C.

References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), dim, libMesh::Elem::infinite(), libMesh::libmesh_assert(), libMesh::libmesh_ignore(), libMesh::InfFEMap::map(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), libMesh::Elem::point(), and libMesh::FEInterface::shape_function().

Referenced by libMesh::RBEIMConstruction::initialize_qp_data(), inverse_map(), libMesh::InfFEMap::map(), libMesh::FE< Dim, LAGRANGE_VEC >::map(), libMesh::Elem::point_test(), and MeshInputTest::testMasterCenters().

2070 {
2071  libmesh_assert(elem);
2073 
2074 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
2075  if (elem->infinite())
2076  return InfFEMap::map(dim, elem, reference_point);
2077 #endif
2078 
2079  Point p;
2080 
2081  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
2082  const FEType fe_type (elem->default_order(), mapping_family);
2083 
2084  // Do not consider the Elem::p_level(), if any, when computing the
2085  // number of shape functions.
2086  const unsigned int n_sf = FEInterface::n_shape_functions(fe_type, /*extra_order=*/0, elem);
2087 
2088  FEInterface::shape_ptr shape_ptr =
2089  FEInterface::shape_function(fe_type, elem);
2090 
2091  // Lagrange basis functions are used for mapping
2092  for (unsigned int i=0; i<n_sf; i++)
2093  p.add_scaled (elem->point(i),
2094  shape_ptr(fe_type, elem, i, reference_point, false));
2095 
2096  return p;
2097 }
static shape_ptr shape_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40
unsigned int dim
void libmesh_ignore(const Args &...)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
libmesh_assert(ctx)
Real(* shape_ptr)(const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function values.
Definition: fe_interface.h:516
FEFamily
defines an enum for finite element families.
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ map_deriv()

Point libMesh::FEMap::map_deriv ( const unsigned int  dim,
const Elem elem,
const unsigned int  j,
const Point reference_point 
)
static
Returns
component j of d(xyz)/d(xi eta zeta) (in physical space) of the point p located on the reference element.

Definition at line 2101 of file fe_map.C.

References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), dim, libMesh::Elem::infinite(), libMesh::libmesh_assert(), libMesh::libmesh_ignore(), map_fe_type(), libMesh::FEInterface::n_shape_functions(), libMesh::Elem::point(), and libMesh::FEInterface::shape_deriv_function().

Referenced by compute_face_map(), inverse_map(), libMesh::FE< Dim, LAGRANGE_VEC >::map_eta(), libMesh::FE< Dim, LAGRANGE_VEC >::map_xi(), and libMesh::FE< Dim, LAGRANGE_VEC >::map_zeta().

2105 {
2106  libmesh_assert(elem);
2108 
2109  if (elem->infinite())
2110  libmesh_not_implemented();
2111 
2112  Point p;
2113 
2114  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
2115  const FEType fe_type (elem->default_order(), mapping_family);
2116 
2117  // Do not consider the Elem::p_level(), if any, when computing the
2118  // number of shape functions.
2119  const unsigned int n_sf =
2120  FEInterface::n_shape_functions(fe_type, /*total_order=*/0, elem);
2121 
2122  FEInterface::shape_deriv_ptr shape_deriv_ptr =
2123  FEInterface::shape_deriv_function(fe_type, elem);
2124 
2125  // Lagrange basis functions are used for mapping
2126  for (unsigned int i=0; i<n_sf; i++)
2127  p.add_scaled (elem->point(i),
2128  shape_deriv_ptr(fe_type, elem, i, j, reference_point,
2129  /*add_p_level=*/false));
2130 
2131  return p;
2132 }
Real(* shape_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function derivative values.
Definition: fe_interface.h:623
unsigned int dim
void libmesh_ignore(const Args &...)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:515
libmesh_assert(ctx)
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
FEFamily
defines an enum for finite element families.
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45

◆ map_fe_type()

FEFamily libMesh::FEMap::map_fe_type ( const Elem elem)
static

◆ print_JxW()

void libMesh::FEMap::print_JxW ( std::ostream &  os) const

Prints the Jacobian times the weight for each quadrature point.

Definition at line 1490 of file fe_map.C.

References libMesh::index_range(), and JxW.

1491 {
1492  for (auto i : index_range(JxW))
1493  os << " [" << i << "]: " << JxW[i] << std::endl;
1494 }
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111

◆ print_xyz()

void libMesh::FEMap::print_xyz ( std::ostream &  os) const

Prints the spatial location of each quadrature point (on the physical element).

Definition at line 1498 of file fe_map.C.

References libMesh::index_range(), and xyz.

1499 {
1500  for (auto i : index_range(xyz))
1501  os << " [" << i << "]: " << xyz[i];
1502 }
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111

◆ resize_quadrature_map_vectors()

void libMesh::FEMap::resize_quadrature_map_vectors ( const unsigned int  dim,
unsigned int  n_qp 
)
protected

A utility function for use by compute_*_map.

Definition at line 1200 of file fe_map.C.

References calculate_d2xyz, calculate_dxyz, calculate_xyz, d2etadxyz2_map, d2xidxyz2_map, d2xyzdeta2_map, d2xyzdetadzeta_map, d2xyzdxi2_map, d2xyzdxideta_map, d2xyzdxidzeta_map, d2xyzdzeta2_map, d2zetadxyz2_map, detadx_map, detady_map, detadz_map, determine_calculations(), dim, dxidx_map, dxidy_map, dxidz_map, dxyzdeta_map, dxyzdxi_map, dxyzdzeta_map, dzetadx_map, dzetady_map, dzetadz_map, libMesh::index_range(), jac, JxW, and xyz.

Referenced by compute_affine_map(), compute_map(), and compute_null_map().

1201 {
1202  // We're calculating now!
1203  this->determine_calculations();
1204 
1205  // Resize the vectors to hold data at the quadrature points
1206  if (calculate_xyz)
1207  xyz.resize(n_qp);
1208  if (calculate_dxyz)
1209  {
1210  dxyzdxi_map.resize(n_qp);
1211  dxidx_map.resize(n_qp);
1212  dxidy_map.resize(n_qp); // 1D element may live in 2D ...
1213  dxidz_map.resize(n_qp); // ... or 3D
1214  }
1215 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1216  if (calculate_d2xyz)
1217  {
1218  d2xyzdxi2_map.resize(n_qp);
1219 
1220  // Inverse map second derivatives
1221  d2xidxyz2_map.resize(n_qp);
1222  for (auto i : index_range(d2xidxyz2_map))
1223  d2xidxyz2_map[i].assign(6, 0.);
1224  }
1225 #endif
1226  if (dim > 1)
1227  {
1228  if (calculate_dxyz)
1229  {
1230  dxyzdeta_map.resize(n_qp);
1231  detadx_map.resize(n_qp);
1232  detady_map.resize(n_qp);
1233  detadz_map.resize(n_qp);
1234  }
1235 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1236  if (calculate_d2xyz)
1237  {
1238  d2xyzdxideta_map.resize(n_qp);
1239  d2xyzdeta2_map.resize(n_qp);
1240 
1241  // Inverse map second derivatives
1242  d2etadxyz2_map.resize(n_qp);
1243  for (auto i : index_range(d2etadxyz2_map))
1244  d2etadxyz2_map[i].assign(6, 0.);
1245  }
1246 #endif
1247  if (dim > 2)
1248  {
1249  if (calculate_dxyz)
1250  {
1251  dxyzdzeta_map.resize (n_qp);
1252  dzetadx_map.resize (n_qp);
1253  dzetady_map.resize (n_qp);
1254  dzetadz_map.resize (n_qp);
1255  }
1256 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1257  if (calculate_d2xyz)
1258  {
1259  d2xyzdxidzeta_map.resize(n_qp);
1260  d2xyzdetadzeta_map.resize(n_qp);
1261  d2xyzdzeta2_map.resize(n_qp);
1262 
1263  // Inverse map second derivatives
1264  d2zetadxyz2_map.resize(n_qp);
1265  for (auto i : index_range(d2zetadxyz2_map))
1266  d2zetadxyz2_map[i].assign(6, 0.);
1267  }
1268 #endif
1269  }
1270  }
1271 
1272  if (calculate_dxyz)
1273  {
1274  jac.resize(n_qp);
1275  JxW.resize(n_qp);
1276  }
1277 }
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
unsigned int dim
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
std::vector< std::vector< Real > > d2xidxyz2_map
Second derivatives of "xi" reference coordinate wrt physical coordinates.
Definition: fe_map.h:861
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
Definition: fe_map.h:816
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
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< 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< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
Definition: fe_map.h:778
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< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Definition: fe_map.h:854
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
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
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
Definition: fe_map.h:804
bool calculate_xyz
Should we calculate physical point locations?
Definition: fe_map.h:1011
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
Definition: fe_map.h:810
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
Definition: fe_map.h:1000
std::vector< Point > xyz
The spatial locations of the quadrature points.
Definition: fe_map.h:740
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
Definition: fe_map.h:829
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 determine_calculations()
Determine which values are to be calculated.
Definition: fe_map.h:648
std::vector< Real > jac
Jacobian values at quadrature points.
Definition: fe_map.h:995
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
Definition: fe_map.h:835
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
Definition: fe_map.h:823
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111
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

◆ set_jacobian_tolerance()

void libMesh::FEMap::set_jacobian_tolerance ( Real  tol)
inline

Set the Jacobian tolerance used for determining when the mapping fails.

The mapping is determined to fail if jac <= jacobian_tolerance.

Definition at line 641 of file fe_map.h.

References jacobian_tolerance.

641 { jacobian_tolerance = tol; }
Real jacobian_tolerance
The Jacobian tolerance used for determining when the mapping fails.
Definition: fe_map.h:1032

Member Data Documentation

◆ _elem_nodes

std::vector<const Node *> libMesh::FEMap::_elem_nodes
private

Work vector for compute_affine_map()

Definition at line 1044 of file fe_map.h.

Referenced by compute_affine_map(), and compute_map().

◆ calculate_d2xyz

bool libMesh::FEMap::calculate_d2xyz
mutableprotected

◆ calculate_dxyz

bool libMesh::FEMap::calculate_dxyz
mutableprotected

◆ calculate_xyz

bool libMesh::FEMap::calculate_xyz
mutableprotected

◆ calculations_started

bool libMesh::FEMap::calculations_started
mutableprotected

◆ curvatures

std::vector<Real> libMesh::FEMap::curvatures
protected

The mean curvature (= one half the sum of the principal curvatures) on the boundary at the quadrature points.

The mean curvature is a scalar value.

Definition at line 988 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), and get_curvatures().

◆ d2etadxyz2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2etadxyz2_map
protected

Second derivatives of "eta" reference coordinate wrt physical coordinates.

At each qp: (eta_{xx}, eta_{xy}, eta_{xz}, eta_{yy}, eta_{yz}, eta_{zz})

Definition at line 867 of file fe_map.h.

Referenced by compute_inverse_map_second_derivs(), compute_single_point_map(), get_d2etadxyz2(), and resize_quadrature_map_vectors().

◆ d2phideta2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phideta2_map
protected

Map for the second derivative, d^2(phi)/d(eta)^2.

Definition at line 916 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phideta2_map(), and init_reference_to_physical_map().

◆ d2phidetadzeta_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phidetadzeta_map
protected

Map for the second derivative, d^2(phi)/d(eta)d(zeta).

Definition at line 921 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phidetadzeta_map(), and init_reference_to_physical_map().

◆ d2phidxi2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phidxi2_map
protected

Map for the second derivative, d^2(phi)/d(xi)^2.

Definition at line 901 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phidxi2_map(), and init_reference_to_physical_map().

◆ d2phidxideta_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phidxideta_map
protected

Map for the second derivative, d^2(phi)/d(xi)d(eta).

Definition at line 906 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phidxideta_map(), and init_reference_to_physical_map().

◆ d2phidxidzeta_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phidxidzeta_map
protected

Map for the second derivative, d^2(phi)/d(xi)d(zeta).

Definition at line 911 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phidxidzeta_map(), and init_reference_to_physical_map().

◆ d2phidzeta2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2phidzeta2_map
protected

Map for the second derivative, d^2(phi)/d(zeta)^2.

Definition at line 926 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_d2phidzeta2_map(), and init_reference_to_physical_map().

◆ d2psideta2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2psideta2_map
protected

Map for the second derivatives (in eta) of the side shape functions.

Useful for computing the curvature at the quadrature points.

Definition at line 968 of file fe_map.h.

Referenced by compute_face_map(), get_d2psideta2(), and init_face_shape_functions().

◆ d2psidxi2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2psidxi2_map
protected

Map for the second derivatives (in xi) of the side shape functions.

Useful for computing the curvature at the quadrature points.

Definition at line 954 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), get_d2psidxi2(), init_edge_shape_functions(), and init_face_shape_functions().

◆ d2psidxideta_map

std::vector<std::vector<Real> > libMesh::FEMap::d2psidxideta_map
protected

Map for the second (cross) derivatives in xi, eta of the side shape functions.

Useful for computing the curvature at the quadrature points.

Definition at line 961 of file fe_map.h.

Referenced by compute_face_map(), get_d2psidxideta(), and init_face_shape_functions().

◆ d2xidxyz2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2xidxyz2_map
protected

Second derivatives of "xi" reference coordinate wrt physical coordinates.

At each qp: (xi_{xx}, xi_{xy}, xi_{xz}, xi_{yy}, xi_{yz}, xi_{zz})

Definition at line 861 of file fe_map.h.

Referenced by compute_inverse_map_second_derivs(), compute_single_point_map(), get_d2xidxyz2(), and resize_quadrature_map_vectors().

◆ d2xyzdeta2_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdeta2_map
protected

◆ d2xyzdetadzeta_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdetadzeta_map
protected

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(z)/d(eta)d(zeta)

Definition at line 790 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_d2xyzdetadzeta(), and resize_quadrature_map_vectors().

◆ d2xyzdxi2_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdxi2_map
protected

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 at line 766 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_d2xyzdxi2(), and resize_quadrature_map_vectors().

◆ d2xyzdxideta_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdxideta_map
protected

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(xi)d(eta)

Definition at line 772 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_d2xyzdxideta(), and resize_quadrature_map_vectors().

◆ d2xyzdxidzeta_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdxidzeta_map
protected

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 at line 784 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_d2xyzdxidzeta(), and resize_quadrature_map_vectors().

◆ d2xyzdzeta2_map

std::vector<RealGradient> libMesh::FEMap::d2xyzdzeta2_map
protected

Vector of second partial derivatives in zeta: d^2(x)/d(zeta)^2.

Definition at line 796 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_d2xyzdzeta2(), and resize_quadrature_map_vectors().

◆ d2zetadxyz2_map

std::vector<std::vector<Real> > libMesh::FEMap::d2zetadxyz2_map
protected

Second derivatives of "zeta" reference coordinate wrt physical coordinates.

At each qp: (zeta_{xx}, zeta_{xy}, zeta_{xz}, zeta_{yy}, zeta_{yz}, zeta_{zz})

Definition at line 873 of file fe_map.h.

Referenced by compute_inverse_map_second_derivs(), compute_single_point_map(), get_d2zetadxyz2(), and resize_quadrature_map_vectors().

◆ detadx_map

std::vector<Real> libMesh::FEMap::detadx_map
protected

Map for partial derivatives: d(eta)/d(x).

Needed for the Jacobian.

Definition at line 823 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_detadx(), and resize_quadrature_map_vectors().

◆ detady_map

std::vector<Real> libMesh::FEMap::detady_map
protected

Map for partial derivatives: d(eta)/d(y).

Needed for the Jacobian.

Definition at line 829 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_detady(), and resize_quadrature_map_vectors().

◆ detadz_map

std::vector<Real> libMesh::FEMap::detadz_map
protected

Map for partial derivatives: d(eta)/d(z).

Needed for the Jacobian.

Definition at line 835 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_detadz(), and resize_quadrature_map_vectors().

◆ dphideta_map

std::vector<std::vector<Real> > libMesh::FEMap::dphideta_map
protected

Map for the derivative, d(phi)/d(eta).

Definition at line 889 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_dphideta_map(), and init_reference_to_physical_map().

◆ dphidxi_map

std::vector<std::vector<Real> > libMesh::FEMap::dphidxi_map
protected

Map for the derivative, d(phi)/d(xi).

Definition at line 884 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_dphidxi_map(), and init_reference_to_physical_map().

◆ dphidzeta_map

std::vector<std::vector<Real> > libMesh::FEMap::dphidzeta_map
protected

Map for the derivative, d(phi)/d(zeta).

Definition at line 894 of file fe_map.h.

Referenced by add_calculations(), compute_single_point_map(), get_dphidzeta_map(), and init_reference_to_physical_map().

◆ dpsideta_map

std::vector<std::vector<Real> > libMesh::FEMap::dpsideta_map
protected

Map for the derivative of the side function, d(psi)/d(eta).

Definition at line 945 of file fe_map.h.

Referenced by compute_face_map(), get_dpsideta(), and init_face_shape_functions().

◆ dpsidxi_map

std::vector<std::vector<Real> > libMesh::FEMap::dpsidxi_map
protected

Map for the derivative of the side functions, d(psi)/d(xi).

Definition at line 939 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), get_dpsidxi(), init_edge_shape_functions(), and init_face_shape_functions().

◆ dxidx_map

std::vector<Real> libMesh::FEMap::dxidx_map
protected

Map for partial derivatives: d(xi)/d(x).

Needed for the Jacobian.

Definition at line 804 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dxidx(), and resize_quadrature_map_vectors().

◆ dxidy_map

std::vector<Real> libMesh::FEMap::dxidy_map
protected

Map for partial derivatives: d(xi)/d(y).

Needed for the Jacobian.

Definition at line 810 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dxidy(), and resize_quadrature_map_vectors().

◆ dxidz_map

std::vector<Real> libMesh::FEMap::dxidz_map
protected

Map for partial derivatives: d(xi)/d(z).

Needed for the Jacobian.

Definition at line 816 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dxidz(), and resize_quadrature_map_vectors().

◆ dxyzdeta_map

std::vector<RealGradient> libMesh::FEMap::dxyzdeta_map
protected

Vector of partial derivatives: d(x)/d(eta), d(y)/d(eta), d(z)/d(eta)

Definition at line 752 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_null_map(), compute_single_point_map(), dxdeta_map(), dydeta_map(), dzdeta_map(), get_dxyzdeta(), and resize_quadrature_map_vectors().

◆ dxyzdxi_map

std::vector<RealGradient> libMesh::FEMap::dxyzdxi_map
protected

Vector of partial derivatives: d(x)/d(xi), d(y)/d(xi), d(z)/d(xi)

Definition at line 746 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_null_map(), compute_single_point_map(), dxdxi_map(), dydxi_map(), dzdxi_map(), get_dxyzdxi(), and resize_quadrature_map_vectors().

◆ dxyzdzeta_map

std::vector<RealGradient> libMesh::FEMap::dxyzdzeta_map
protected

Vector of partial derivatives: d(x)/d(zeta), d(y)/d(zeta), d(z)/d(zeta)

Definition at line 758 of file fe_map.h.

Referenced by compute_affine_map(), compute_null_map(), compute_single_point_map(), dxdzeta_map(), dydzeta_map(), dzdzeta_map(), get_dxyzdzeta(), and resize_quadrature_map_vectors().

◆ dzetadx_map

std::vector<Real> libMesh::FEMap::dzetadx_map
protected

Map for partial derivatives: d(zeta)/d(x).

Needed for the Jacobian.

Definition at line 842 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dzetadx(), and resize_quadrature_map_vectors().

◆ dzetady_map

std::vector<Real> libMesh::FEMap::dzetady_map
protected

Map for partial derivatives: d(zeta)/d(y).

Needed for the Jacobian.

Definition at line 848 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dzetady(), and resize_quadrature_map_vectors().

◆ dzetadz_map

std::vector<Real> libMesh::FEMap::dzetadz_map
protected

Map for partial derivatives: d(zeta)/d(z).

Needed for the Jacobian.

Definition at line 854 of file fe_map.h.

Referenced by compute_affine_map(), compute_inverse_map_second_derivs(), compute_null_map(), compute_single_point_map(), get_dzetadz(), and resize_quadrature_map_vectors().

◆ jac

std::vector<Real> libMesh::FEMap::jac
protected

Jacobian values at quadrature points.

Definition at line 995 of file fe_map.h.

Referenced by compute_affine_map(), compute_null_map(), compute_single_point_map(), get_jacobian(), and resize_quadrature_map_vectors().

◆ jacobian_tolerance

Real libMesh::FEMap::jacobian_tolerance
protected

The Jacobian tolerance used for determining when the mapping fails.

The mapping is determined to fail if jac <= jacobian_tolerance. If not set by the user, this number defaults to 0

Definition at line 1032 of file fe_map.h.

Referenced by compute_single_point_map(), and set_jacobian_tolerance().

◆ JxW

std::vector<Real> libMesh::FEMap::JxW
protected

Jacobian*Weight values at quadrature points.

Definition at line 1000 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_null_map(), compute_single_point_map(), get_JxW(), print_JxW(), and resize_quadrature_map_vectors().

◆ normals

std::vector<Point> libMesh::FEMap::normals
protected

Normal vectors on boundary at quadrature points.

Definition at line 980 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), and get_normals().

◆ phi_map

std::vector<std::vector<Real> > libMesh::FEMap::phi_map
protected

Map for the shape function phi.

Definition at line 879 of file fe_map.h.

Referenced by add_calculations(), compute_affine_map(), compute_single_point_map(), get_phi_map(), and init_reference_to_physical_map().

◆ psi_map

std::vector<std::vector<Real> > libMesh::FEMap::psi_map
protected

Map for the side shape functions, psi.

Definition at line 933 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), get_psi(), init_edge_shape_functions(), and init_face_shape_functions().

◆ tangents

std::vector<std::vector<Point> > libMesh::FEMap::tangents
protected

Tangent vectors on boundary at quadrature points.

Definition at line 975 of file fe_map.h.

Referenced by compute_edge_map(), compute_face_map(), and get_tangents().

◆ xyz

std::vector<Point> libMesh::FEMap::xyz
protected

The spatial locations of the quadrature points.

Definition at line 740 of file fe_map.h.

Referenced by compute_affine_map(), compute_edge_map(), compute_face_map(), compute_null_map(), compute_single_point_map(), get_xyz(), print_xyz(), and resize_quadrature_map_vectors().


The documentation for this class was generated from the following files: