libMesh::FEXYZMap Class Reference

An implementation of FEMap for "XYZ" elements. More...

#include <fe_xyz_map.h>

Inheritance diagram for libMesh::FEXYZMap:

Public Member Functions

 FEXYZMap ()
 
virtual ~FEXYZMap ()
 
virtual void compute_face_map (int dim, const std::vector< Real > &qw, const Elem *side) override
 
template<unsigned int Dim>
void init_reference_to_physical_map (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)
 
virtual void compute_affine_map (const unsigned int dim, const std::vector< Real > &qw, const Elem *elem)
 
virtual void compute_null_map (const unsigned int dim, const std::vector< Real > &qw)
 
virtual void compute_map (const unsigned int dim, const std::vector< Real > &qw, const Elem *elem, bool calculate_d2phi)
 
void compute_edge_map (int dim, const std::vector< Real > &qw, const Elem *side)
 
template<unsigned int Dim>
void init_face_shape_functions (const std::vector< Point > &qp, const Elem *side)
 
template<unsigned int Dim>
void init_edge_shape_functions (const std::vector< Point > &qp, const Elem *edge)
 
const std::vector< Point > & get_xyz () const
 
const std::vector< Real > & get_jacobian () const
 
const std::vector< Real > & get_JxW () const
 
std::vector< Real > & get_JxW ()
 
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
 
const std::vector< std::vector< Real > > & get_d2etadxyz2 () const
 
const std::vector< std::vector< Real > > & get_d2zetadxyz2 () const
 
const std::vector< std::vector< Real > > & get_psi () const
 
std::vector< std::vector< Real > > & get_psi ()
 
const std::vector< std::vector< Real > > & get_phi_map () const
 
std::vector< std::vector< Real > > & get_phi_map ()
 
const std::vector< std::vector< Real > > & get_dphidxi_map () const
 
std::vector< std::vector< Real > > & get_dphidxi_map ()
 
const std::vector< std::vector< Real > > & get_dphideta_map () const
 
std::vector< std::vector< Real > > & get_dphideta_map ()
 
const std::vector< std::vector< Real > > & get_dphidzeta_map () const
 
std::vector< std::vector< Real > > & get_dphidzeta_map ()
 
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
 
void print_xyz (std::ostream &os) const
 
std::vector< std::vector< Real > > & get_dpsidxi ()
 
std::vector< std::vector< Real > > & get_dpsideta ()
 
std::vector< std::vector< Real > > & get_d2psidxi2 ()
 
std::vector< std::vector< Real > > & get_d2psidxideta ()
 
std::vector< std::vector< Real > > & get_d2psideta2 ()
 
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 ()
 

Static Public Member Functions

static std::unique_ptr< FEMapbuild (FEType fe_type)
 

Protected Member Functions

void determine_calculations ()
 
void resize_quadrature_map_vectors (const unsigned int dim, unsigned int n_qp)
 
Real dxdxi_map (const unsigned int p) const
 
Real dydxi_map (const unsigned int p) const
 
Real dzdxi_map (const unsigned int p) const
 
Real dxdeta_map (const unsigned int p) const
 
Real dydeta_map (const unsigned int p) const
 
Real dzdeta_map (const unsigned int p) const
 
Real dxdzeta_map (const unsigned int p) const
 
Real dydzeta_map (const unsigned int p) const
 
Real dzdzeta_map (const unsigned int p) const
 

Protected Attributes

std::vector< Pointxyz
 
std::vector< RealGradientdxyzdxi_map
 
std::vector< RealGradientdxyzdeta_map
 
std::vector< RealGradientdxyzdzeta_map
 
std::vector< RealGradientd2xyzdxi2_map
 
std::vector< RealGradientd2xyzdxideta_map
 
std::vector< RealGradientd2xyzdeta2_map
 
std::vector< RealGradientd2xyzdxidzeta_map
 
std::vector< RealGradientd2xyzdetadzeta_map
 
std::vector< RealGradientd2xyzdzeta2_map
 
std::vector< Realdxidx_map
 
std::vector< Realdxidy_map
 
std::vector< Realdxidz_map
 
std::vector< Realdetadx_map
 
std::vector< Realdetady_map
 
std::vector< Realdetadz_map
 
std::vector< Realdzetadx_map
 
std::vector< Realdzetady_map
 
std::vector< Realdzetadz_map
 
std::vector< std::vector< Real > > d2xidxyz2_map
 
std::vector< std::vector< Real > > d2etadxyz2_map
 
std::vector< std::vector< Real > > d2zetadxyz2_map
 
std::vector< std::vector< Real > > phi_map
 
std::vector< std::vector< Real > > dphidxi_map
 
std::vector< std::vector< Real > > dphideta_map
 
std::vector< std::vector< Real > > dphidzeta_map
 
std::vector< std::vector< Real > > d2phidxi2_map
 
std::vector< std::vector< Real > > d2phidxideta_map
 
std::vector< std::vector< Real > > d2phidxidzeta_map
 
std::vector< std::vector< Real > > d2phideta2_map
 
std::vector< std::vector< Real > > d2phidetadzeta_map
 
std::vector< std::vector< Real > > d2phidzeta2_map
 
std::vector< std::vector< Real > > psi_map
 
std::vector< std::vector< Real > > dpsidxi_map
 
std::vector< std::vector< Real > > dpsideta_map
 
std::vector< std::vector< Real > > d2psidxi2_map
 
std::vector< std::vector< Real > > d2psidxideta_map
 
std::vector< std::vector< Real > > d2psideta2_map
 
std::vector< std::vector< Point > > tangents
 
std::vector< Pointnormals
 
std::vector< Realcurvatures
 
std::vector< Realjac
 
std::vector< RealJxW
 
bool calculations_started
 
bool calculate_xyz
 
bool calculate_dxyz
 
bool calculate_d2xyz
 

Detailed Description

An implementation of FEMap for "XYZ" elements.

An implementation of FEMap for "XYZ" elements.

Author
Paul Bauman
Date
2012

Definition at line 39 of file fe_xyz_map.h.

Constructor & Destructor Documentation

◆ FEXYZMap()

libMesh::FEXYZMap::FEXYZMap ( )
inline

Definition at line 43 of file fe_xyz_map.h.

References libMesh::FEMap::calculate_xyz.

44  : FEMap()
45  {
46  // All FEXYZ objects are going to be querying xyz coordinates
47  calculate_xyz = true;
48  }
bool calculate_xyz
Definition: fe_map.h:882

◆ ~FEXYZMap()

virtual libMesh::FEXYZMap::~FEXYZMap ( )
inlinevirtual

Definition at line 50 of file fe_xyz_map.h.

50 {}

Member Function Documentation

◆ build()

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

Definition at line 53 of file fe_map.C.

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

54 {
55  switch( fe_type.family )
56  {
57  case XYZ:
58  return libmesh_make_unique<FEXYZMap>();
59 
60  default:
61  return libmesh_make_unique<FEMap>();
62  }
63 }

◆ compute_affine_map()

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

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 1232 of file fe_map.C.

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

Referenced by libMesh::FEMap::compute_map().

1235 {
1236  // Start logging the map computation.
1237  LOG_SCOPE("compute_affine_map()", "FEMap");
1238 
1239  libmesh_assert(elem);
1240 
1241  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1242 
1243  // Resize the vectors to hold data at the quadrature points
1244  this->resize_quadrature_map_vectors(dim, n_qp);
1245 
1246  // Determine the nodes contributing to element elem
1247  unsigned int n_nodes = elem->n_nodes();
1248  _elem_nodes.resize(elem->n_nodes());
1249  for (unsigned int i=0; i<n_nodes; i++)
1250  _elem_nodes[i] = elem->node_ptr(i);
1251 
1252  // Compute map at quadrature point 0
1253  this->compute_single_point_map(dim, qw, elem, 0, _elem_nodes, /*compute_second_derivatives=*/false);
1254 
1255  // Compute xyz at all other quadrature points
1256  if (calculate_xyz)
1257  for (unsigned int p=1; p<n_qp; p++)
1258  {
1259  xyz[p].zero();
1260  for (auto i : index_range(phi_map)) // sum over the nodes
1261  xyz[p].add_scaled (*_elem_nodes[i], phi_map[i][p]);
1262  }
1263 
1264  // Copy other map data from quadrature point 0
1265  if (calculate_dxyz)
1266  for (unsigned int p=1; p<n_qp; p++) // for each extra quadrature point
1267  {
1268  dxyzdxi_map[p] = dxyzdxi_map[0];
1269  dxidx_map[p] = dxidx_map[0];
1270  dxidy_map[p] = dxidy_map[0];
1271  dxidz_map[p] = dxidz_map[0];
1272 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1273  // The map should be affine, so second derivatives are zero
1274  if (calculate_d2xyz)
1275  d2xyzdxi2_map[p] = 0.;
1276 #endif
1277  if (dim > 1)
1278  {
1279  dxyzdeta_map[p] = dxyzdeta_map[0];
1280  detadx_map[p] = detadx_map[0];
1281  detady_map[p] = detady_map[0];
1282  detadz_map[p] = detadz_map[0];
1283 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1284  if (calculate_d2xyz)
1285  {
1286  d2xyzdxideta_map[p] = 0.;
1287  d2xyzdeta2_map[p] = 0.;
1288  }
1289 #endif
1290  if (dim > 2)
1291  {
1292  dxyzdzeta_map[p] = dxyzdzeta_map[0];
1293  dzetadx_map[p] = dzetadx_map[0];
1294  dzetady_map[p] = dzetady_map[0];
1295  dzetadz_map[p] = dzetadz_map[0];
1296 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1297  if (calculate_d2xyz)
1298  {
1299  d2xyzdxidzeta_map[p] = 0.;
1300  d2xyzdetadzeta_map[p] = 0.;
1301  d2xyzdzeta2_map[p] = 0.;
1302  }
1303 #endif
1304  }
1305  }
1306  jac[p] = jac[0];
1307  JxW[p] = JxW[0] / qw[0] * qw[p];
1308  }
1309 }
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:674
std::vector< Real > dzetady_map
Definition: fe_map.h:726
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Definition: int_range.h:104
std::vector< Real > dxidz_map
Definition: fe_map.h:694
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:757
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636
std::vector< Real > dzetadx_map
Definition: fe_map.h:720
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
const dof_id_type n_nodes
Definition: tecplot_io.C:68
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
std::vector< Real > dzetadz_map
Definition: fe_map.h:732
bool calculate_d2xyz
Definition: fe_map.h:892
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:668
std::vector< Real > dxidx_map
Definition: fe_map.h:682
bool calculate_xyz
Definition: fe_map.h:882
std::vector< Real > dxidy_map
Definition: fe_map.h:688
std::vector< const Node * > _elem_nodes
Definition: fe_map.h:911
std::vector< Real > JxW
Definition: fe_map.h:871
std::vector< Point > xyz
Definition: fe_map.h:618
std::vector< Real > detady_map
Definition: fe_map.h:707
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1151
std::vector< Real > jac
Definition: fe_map.h:866
std::vector< Real > detadz_map
Definition: fe_map.h:713
std::vector< Real > detadx_map
Definition: fe_map.h:701
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)
Definition: fe_map.C:412
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:662

◆ compute_edge_map()

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

Same as before, but for an edge. Useful for some projections.

Definition at line 922 of file fe_boundary.C.

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

925 {
926  libmesh_assert(edge);
927 
928  if (dim == 2)
929  {
930  // A 2D finite element living in either 2D or 3D space.
931  // The edges here are the sides of the element, so the
932  // (misnamed) compute_face_map function does what we want
933  this->compute_face_map(dim, qw, edge);
934  return;
935  }
936 
937  libmesh_assert_equal_to (dim, 3); // 1D is unnecessary and currently unsupported
938 
939  LOG_SCOPE("compute_edge_map()", "FEMap");
940 
941  // We're calculating now!
942  this->determine_calculations();
943 
944  // The number of quadrature points.
945  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
946 
947  // Resize the vectors to hold data at the quadrature points
948  if (calculate_xyz)
949  this->xyz.resize(n_qp);
950  if (calculate_dxyz)
951  {
952  this->dxyzdxi_map.resize(n_qp);
953  this->dxyzdeta_map.resize(n_qp);
954  this->tangents.resize(n_qp);
955  this->normals.resize(n_qp);
956  this->JxW.resize(n_qp);
957  }
958  if (calculate_d2xyz)
959  {
960  this->d2xyzdxi2_map.resize(n_qp);
961  this->d2xyzdxideta_map.resize(n_qp);
962  this->d2xyzdeta2_map.resize(n_qp);
963  this->curvatures.resize(n_qp);
964  }
965 
966  // Clear the entities that will be summed
967  for (unsigned int p=0; p<n_qp; p++)
968  {
969  if (calculate_xyz)
970  this->xyz[p].zero();
971  if (calculate_dxyz)
972  {
973  this->tangents[p].resize(1);
974  this->dxyzdxi_map[p].zero();
975  this->dxyzdeta_map[p].zero();
976  }
977  if (calculate_d2xyz)
978  {
979  this->d2xyzdxi2_map[p].zero();
980  this->d2xyzdxideta_map[p].zero();
981  this->d2xyzdeta2_map[p].zero();
982  }
983  }
984 
985  // compute x, dxdxi at the quadrature points
986  for (unsigned int i=0,
987  psi_map_size=cast_int<unsigned int>(psi_map.size());
988  i != psi_map_size; i++) // sum over the nodes
989  {
990  const Point & edge_point = edge->point(i);
991 
992  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
993  {
994  if (calculate_xyz)
995  this->xyz[p].add_scaled (edge_point, this->psi_map[i][p]);
996  if (calculate_dxyz)
997  this->dxyzdxi_map[p].add_scaled (edge_point, this->dpsidxi_map[i][p]);
998  if (calculate_d2xyz)
999  this->d2xyzdxi2_map[p].add_scaled (edge_point, this->d2psidxi2_map[i][p]);
1000  }
1001  }
1002 
1003  // Compute the tangents at the quadrature point
1004  // FIXME: normals (plural!) and curvatures are uncalculated
1005  if (calculate_dxyz)
1006  for (unsigned int p=0; p<n_qp; p++)
1007  {
1008  const Point n = this->dxyzdxi_map[p].cross(this->dxyzdeta_map[p]);
1009  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
1010 
1011  // compute the jacobian at the quadrature points
1012  const Real the_jac = std::sqrt(this->dxdxi_map(p)*this->dxdxi_map(p) +
1013  this->dydxi_map(p)*this->dydxi_map(p) +
1014  this->dzdxi_map(p)*this->dzdxi_map(p));
1015 
1016  libmesh_assert_greater (the_jac, 0.);
1017 
1018  this->JxW[p] = the_jac*qw[p];
1019  }
1020 }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811
bool calculate_dxyz
Definition: fe_map.h:887
Real dzdxi_map(const unsigned int p) const
Definition: fe_map.h:565
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculate_xyz
Definition: fe_map.h:882
std::vector< Real > curvatures
Definition: fe_map.h:861
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:830
std::vector< Real > JxW
Definition: fe_map.h:871
std::vector< Point > normals
Definition: fe_map.h:854
std::vector< Point > xyz
Definition: fe_map.h:618
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:817
std::vector< std::vector< Point > > tangents
Definition: fe_map.h:849
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630
Real dxdxi_map(const unsigned int p) const
Definition: fe_map.h:549
void determine_calculations()
Definition: fe_map.h:527
Real dydxi_map(const unsigned int p) const
Definition: fe_map.h:557
virtual void compute_face_map(int dim, const std::vector< Real > &qw, const Elem *side)
Definition: fe_boundary.C:574

◆ compute_face_map()

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

Special implementation for XYZ finite elements

Reimplemented from libMesh::FEMap.

Definition at line 24 of file fe_xyz_map.C.

References libMesh::TypeVector< T >::cross(), libMesh::FEMap::curvatures, libMesh::FEMap::d2psideta2_map, libMesh::FEMap::d2psidxi2_map, libMesh::FEMap::d2psidxideta_map, libMesh::FEMap::d2xyzdeta2_map, libMesh::FEMap::d2xyzdxi2_map, libMesh::FEMap::d2xyzdxideta_map, libMesh::FEMap::dpsideta_map, libMesh::FEMap::dpsidxi_map, libMesh::FEMap::dxdeta_map(), libMesh::FEMap::dxdxi_map(), libMesh::FEMap::dxyzdeta_map, libMesh::FEMap::dxyzdxi_map, libMesh::FEMap::dydeta_map(), libMesh::FEMap::dydxi_map(), libMesh::FEMap::dzdeta_map(), libMesh::FEMap::dzdxi_map(), libMesh::FEMap::JxW, libMesh::FEMap::normals, libMesh::FEMap::psi_map, libMesh::Real, side, libMesh::FEMap::tangents, libMesh::TypeVector< T >::unit(), and libMesh::FEMap::xyz.

25 {
26  libmesh_assert(side);
27 
28  LOG_SCOPE("compute_face_map()", "FEXYZMap");
29 
30  // The number of quadrature points.
31  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
32 
33  switch(dim)
34  {
35  case 2:
36  {
37 
38  // Resize the vectors to hold data at the quadrature points
39  {
40  this->xyz.resize(n_qp);
41  this->dxyzdxi_map.resize(n_qp);
42  this->d2xyzdxi2_map.resize(n_qp);
43  this->tangents.resize(n_qp);
44  this->normals.resize(n_qp);
45  this->curvatures.resize(n_qp);
46 
47  this->JxW.resize(n_qp);
48  }
49 
50  // Clear the entities that will be summed
51  // Compute the tangent & normal at the quadrature point
52  for (unsigned int p=0; p<n_qp; p++)
53  {
54  this->tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
55  this->xyz[p].zero();
56  this->dxyzdxi_map[p].zero();
57  this->d2xyzdxi2_map[p].zero();
58  }
59 
60  // compute x, dxdxi at the quadrature points
61  for (unsigned int i=0,
62  n_psi_map = cast_int<unsigned int>(this->psi_map.size());
63  i != n_psi_map; i++) // sum over the nodes
64  {
65  const Point & side_point = side->point(i);
66 
67  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
68  {
69  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
70  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
71  this->d2xyzdxi2_map[p].add_scaled(side_point, this->d2psidxi2_map[i][p]);
72  }
73  }
74 
75  // Compute the tangent & normal at the quadrature point
76  for (unsigned int p=0; p<n_qp; p++)
77  {
78  const Point n(this->dxyzdxi_map[p](1), -this->dxyzdxi_map[p](0), 0.);
79 
80  this->normals[p] = n.unit();
81  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
82 #if LIBMESH_DIM == 3 // Only good in 3D space
83  this->tangents[p][1] = this->dxyzdxi_map[p].cross(n).unit();
84 #endif
85  // The curvature is computed via the familiar Frenet formula:
86  // curvature = [d^2(x) / d (xi)^2] dot [normal]
87  // For a reference, see:
88  // F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill, p. 310
89  //
90  // Note: The sign convention here is different from the
91  // 3D case. Concave-upward curves (smiles) have a positive
92  // curvature. Concave-downward curves (frowns) have a
93  // negative curvature. Be sure to take that into account!
94  const Real numerator = this->d2xyzdxi2_map[p] * this->normals[p];
95  const Real denominator = this->dxyzdxi_map[p].norm_sq();
96  libmesh_assert_not_equal_to (denominator, 0);
97  this->curvatures[p] = numerator / denominator;
98  }
99 
100  // compute the jacobian at the quadrature points
101  for (unsigned int p=0; p<n_qp; p++)
102  {
103  const Real the_jac = std::sqrt(this->dxdxi_map(p)*this->dxdxi_map(p) +
104  this->dydxi_map(p)*this->dydxi_map(p));
105 
106  libmesh_assert_greater (the_jac, 0.);
107 
108  this->JxW[p] = the_jac*qw[p];
109  }
110 
111  break;
112  }
113 
114  case 3:
115  {
116  // Resize the vectors to hold data at the quadrature points
117  {
118  this->xyz.resize(n_qp);
119  this->dxyzdxi_map.resize(n_qp);
120  this->dxyzdeta_map.resize(n_qp);
121  this->d2xyzdxi2_map.resize(n_qp);
122  this->d2xyzdxideta_map.resize(n_qp);
123  this->d2xyzdeta2_map.resize(n_qp);
124  this->tangents.resize(n_qp);
125  this->normals.resize(n_qp);
126  this->curvatures.resize(n_qp);
127 
128  this->JxW.resize(n_qp);
129  }
130 
131  // Clear the entities that will be summed
132  for (unsigned int p=0; p<n_qp; p++)
133  {
134  this->tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
135  this->xyz[p].zero();
136  this->dxyzdxi_map[p].zero();
137  this->dxyzdeta_map[p].zero();
138  this->d2xyzdxi2_map[p].zero();
139  this->d2xyzdxideta_map[p].zero();
140  this->d2xyzdeta2_map[p].zero();
141  }
142 
143  // compute x, dxdxi at the quadrature points
144  for (unsigned int i=0,
145  n_psi_map = cast_int<unsigned int>(this->psi_map.size());
146  i != n_psi_map; i++) // sum over the nodes
147  {
148  const Point & side_point = side->point(i);
149 
150  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
151  {
152  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
153  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
154  this->dxyzdeta_map[p].add_scaled (side_point, this->dpsideta_map[i][p]);
155  this->d2xyzdxi2_map[p].add_scaled (side_point, this->d2psidxi2_map[i][p]);
156  this->d2xyzdxideta_map[p].add_scaled(side_point, this->d2psidxideta_map[i][p]);
157  this->d2xyzdeta2_map[p].add_scaled (side_point, this->d2psideta2_map[i][p]);
158  }
159  }
160 
161  // Compute the tangents, normal, and curvature at the quadrature point
162  for (unsigned int p=0; p<n_qp; p++)
163  {
164  const Point n = this->dxyzdxi_map[p].cross(this->dxyzdeta_map[p]);
165  this->normals[p] = n.unit();
166  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
167  this->tangents[p][1] = n.cross(this->dxyzdxi_map[p]).unit();
168 
169  // Compute curvature using the typical nomenclature
170  // of the first and second fundamental forms.
171  // For reference, see:
172  // 1) http://mathworld.wolfram.com/MeanCurvature.html
173  // (note -- they are using inward normal)
174  // 2) F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill
175  const Real L = -this->d2xyzdxi2_map[p] * this->normals[p];
176  const Real M = -this->d2xyzdxideta_map[p] * this->normals[p];
177  const Real N = -this->d2xyzdeta2_map[p] * this->normals[p];
178  const Real E = this->dxyzdxi_map[p].norm_sq();
179  const Real F = this->dxyzdxi_map[p] * this->dxyzdeta_map[p];
180  const Real G = this->dxyzdeta_map[p].norm_sq();
181 
182  const Real numerator = E*N -2.*F*M + G*L;
183  const Real denominator = E*G - F*F;
184  libmesh_assert_not_equal_to (denominator, 0.);
185  this->curvatures[p] = 0.5*numerator/denominator;
186  }
187 
188  // compute the jacobian at the quadrature points, see
189  // http://sp81.msi.umn.edu:999/fluent/fidap/help/theory/thtoc.htm
190  for (unsigned int p=0; p<n_qp; p++)
191  {
192  const Real g11 = (this->dxdxi_map(p)*this->dxdxi_map(p) +
193  this->dydxi_map(p)*this->dydxi_map(p) +
194  this->dzdxi_map(p)*this->dzdxi_map(p));
195 
196  const Real g12 = (this->dxdxi_map(p)*this->dxdeta_map(p) +
197  this->dydxi_map(p)*this->dydeta_map(p) +
198  this->dzdxi_map(p)*this->dzdeta_map(p));
199 
200  const Real g21 = g12;
201 
202  const Real g22 = (this->dxdeta_map(p)*this->dxdeta_map(p) +
203  this->dydeta_map(p)*this->dydeta_map(p) +
204  this->dzdeta_map(p)*this->dzdeta_map(p));
205 
206 
207  const Real the_jac = std::sqrt(g11*g22 - g12*g21);
208 
209  libmesh_assert_greater (the_jac, 0.);
210 
211  this->JxW[p] = the_jac*qw[p];
212  }
213 
214  break;
215  }
216  default:
217  libmesh_error_msg("Invalid dim = " << dim);
218 
219  } // switch(dim)
220 }
Real dzdeta_map(const unsigned int p) const
Definition: fe_map.h:589
std::vector< std::vector< Real > > dpsideta_map
Definition: fe_map.h:823
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811
std::vector< std::vector< Real > > d2psideta2_map
Definition: fe_map.h:844
Real dxdeta_map(const unsigned int p) const
Definition: fe_map.h:573
unsigned short int side
Definition: xdr_io.C:50
Real dzdxi_map(const unsigned int p) const
Definition: fe_map.h:565
std::vector< std::vector< Real > > d2psidxideta_map
Definition: fe_map.h:837
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
std::vector< Real > curvatures
Definition: fe_map.h:861
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:830
std::vector< Real > JxW
Definition: fe_map.h:871
std::vector< Point > normals
Definition: fe_map.h:854
std::vector< Point > xyz
Definition: fe_map.h:618
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real dydeta_map(const unsigned int p) const
Definition: fe_map.h:581
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:817
std::vector< std::vector< Point > > tangents
Definition: fe_map.h:849
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630
Real dxdxi_map(const unsigned int p) const
Definition: fe_map.h:549
Real dydxi_map(const unsigned int p) const
Definition: fe_map.h:557

◆ compute_map()

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

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 1388 of file fe_map.C.

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

1392 {
1393  if (!elem)
1394  {
1395  compute_null_map(dim, qw);
1396  return;
1397  }
1398 
1399  if (elem->has_affine_map())
1400  {
1401  compute_affine_map(dim, qw, elem);
1402  return;
1403  }
1404 
1405  // Start logging the map computation.
1406  LOG_SCOPE("compute_map()", "FEMap");
1407 
1408  libmesh_assert(elem);
1409 
1410  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1411 
1412  // Resize the vectors to hold data at the quadrature points
1413  this->resize_quadrature_map_vectors(dim, n_qp);
1414 
1415  // Determine the nodes contributing to element elem
1416  if (elem->type() == TRI3SUBDIVISION)
1417  {
1418  // Subdivision surface FE require the 1-ring around elem
1419  libmesh_assert_equal_to (dim, 2);
1420  const Tri3Subdivision * sd_elem = static_cast<const Tri3Subdivision *>(elem);
1422  }
1423  else
1424  {
1425  // All other FE use only the nodes of elem itself
1426  _elem_nodes.resize(elem->n_nodes(), nullptr);
1427  for (unsigned int i=0; i<elem->n_nodes(); i++)
1428  _elem_nodes[i] = elem->node_ptr(i);
1429  }
1430 
1431  // Compute map at all quadrature points
1432  for (unsigned int p=0; p!=n_qp; p++)
1433  this->compute_single_point_map(dim, qw, elem, p, _elem_nodes, calculate_d2phi);
1434 }
virtual void compute_affine_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem)
Definition: fe_map.C:1232
void find_one_ring(const Tri3Subdivision *elem, std::vector< const Node *> &nodes)
std::vector< const Node * > _elem_nodes
Definition: fe_map.h:911
virtual void compute_null_map(const unsigned int dim, const std::vector< Real > &qw)
Definition: fe_map.C:1313
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1151
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)
Definition: fe_map.C:412

◆ compute_null_map()

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

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 1313 of file fe_map.C.

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

Referenced by libMesh::FEMap::compute_map().

1315 {
1316  // Start logging the map computation.
1317  LOG_SCOPE("compute_null_map()", "FEMap");
1318 
1319  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1320 
1321  // Resize the vectors to hold data at the quadrature points
1322  this->resize_quadrature_map_vectors(dim, n_qp);
1323 
1324  // Compute "fake" xyz
1325  for (unsigned int p=1; p<n_qp; p++)
1326  {
1327  if (calculate_xyz)
1328  xyz[p].zero();
1329 
1330  if (calculate_dxyz)
1331  {
1332  dxyzdxi_map[p] = 0;
1333  dxidx_map[p] = 0;
1334  dxidy_map[p] = 0;
1335  dxidz_map[p] = 0;
1336  }
1337 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1338  if (calculate_d2xyz)
1339  {
1340  d2xyzdxi2_map[p] = 0;
1341  }
1342 #endif
1343  if (dim > 1)
1344  {
1345  if (calculate_dxyz)
1346  {
1347  dxyzdeta_map[p] = 0;
1348  detadx_map[p] = 0;
1349  detady_map[p] = 0;
1350  detadz_map[p] = 0;
1351  }
1352 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1353  if (calculate_d2xyz)
1354  {
1355  d2xyzdxideta_map[p] = 0.;
1356  d2xyzdeta2_map[p] = 0.;
1357  }
1358 #endif
1359  if (dim > 2)
1360  {
1361  if (calculate_dxyz)
1362  {
1363  dxyzdzeta_map[p] = 0;
1364  dzetadx_map[p] = 0;
1365  dzetady_map[p] = 0;
1366  dzetadz_map[p] = 0;
1367  }
1368 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1369  if (calculate_d2xyz)
1370  {
1371  d2xyzdxidzeta_map[p] = 0;
1372  d2xyzdetadzeta_map[p] = 0;
1373  d2xyzdzeta2_map[p] = 0;
1374  }
1375 #endif
1376  }
1377  }
1378  if (calculate_dxyz)
1379  {
1380  jac[p] = 1;
1381  JxW[p] = qw[p];
1382  }
1383  }
1384 }
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:674
std::vector< Real > dzetady_map
Definition: fe_map.h:726
std::vector< Real > dxidz_map
Definition: fe_map.h:694
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636
std::vector< Real > dzetadx_map
Definition: fe_map.h:720
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
std::vector< Real > dzetadz_map
Definition: fe_map.h:732
bool calculate_d2xyz
Definition: fe_map.h:892
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:668
std::vector< Real > dxidx_map
Definition: fe_map.h:682
bool calculate_xyz
Definition: fe_map.h:882
std::vector< Real > dxidy_map
Definition: fe_map.h:688
std::vector< Real > JxW
Definition: fe_map.h:871
std::vector< Point > xyz
Definition: fe_map.h:618
std::vector< Real > detady_map
Definition: fe_map.h:707
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1151
std::vector< Real > jac
Definition: fe_map.h:866
std::vector< Real > detadz_map
Definition: fe_map.h:713
std::vector< Real > detadx_map
Definition: fe_map.h:701
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:662

◆ 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 
)
inherited

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 412 of file fe_map.C.

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

Referenced by libMesh::FEMap::compute_affine_map(), and libMesh::FEMap::compute_map().

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

◆ determine_calculations()

void libMesh::FEMap::determine_calculations ( )
inlineprotectedinherited

Determine which values are to be calculated

Definition at line 527 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculate_dxyz, and libMesh::FEMap::calculations_started.

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

527  {
528  calculations_started = true;
529 
530 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
531  // Second derivative calculations currently have first derivative
532  // calculations as a prerequisite
533  if (calculate_d2xyz)
534  calculate_dxyz = true;
535 #endif
536  }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ dxdeta_map()

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

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 573 of file fe_map.h.

References libMesh::FEMap::dxyzdeta_map.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

573 { return dxyzdeta_map[p](0); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630

◆ dxdxi_map()

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

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 549 of file fe_map.h.

References libMesh::FEMap::dxyzdxi_map.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

549 { return dxyzdxi_map[p](0); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624

◆ dxdzeta_map()

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

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 597 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

Referenced by libMesh::FEMap::compute_single_point_map().

597 { return dxyzdzeta_map[p](0); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636

◆ dydeta_map()

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

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 581 of file fe_map.h.

References libMesh::FEMap::dxyzdeta_map.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

581 { return dxyzdeta_map[p](1); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630

◆ dydxi_map()

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

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 557 of file fe_map.h.

References libMesh::FEMap::dxyzdxi_map.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

557 { return dxyzdxi_map[p](1); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624

◆ dydzeta_map()

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

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 605 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

Referenced by libMesh::FEMap::compute_single_point_map().

605 { return dxyzdzeta_map[p](1); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636

◆ dzdeta_map()

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

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 589 of file fe_map.h.

References libMesh::FEMap::dxyzdeta_map.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

589 { return dxyzdeta_map[p](2); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630

◆ dzdxi_map()

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

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 565 of file fe_map.h.

References libMesh::FEMap::dxyzdxi_map.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::compute_single_point_map().

565 { return dxyzdxi_map[p](2); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624

◆ dzdzeta_map()

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

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 613 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

Referenced by libMesh::FEMap::compute_single_point_map().

613 { return dxyzdzeta_map[p](2); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636

◆ get_curvatures()

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

Definition at line 380 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::curvatures.

381  { libmesh_assert(!calculations_started || calculate_d2xyz);
382  calculate_d2xyz = true; return curvatures;}
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< Real > curvatures
Definition: fe_map.h:861

◆ get_d2etadxyz2()

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

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

Definition at line 317 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2etadxyz2_map.

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

318  { libmesh_assert(!calculations_started || calculate_d2xyz);
319  calculate_d2xyz = true; return d2etadxyz2_map; }
std::vector< std::vector< Real > > d2etadxyz2_map
Definition: fe_map.h:745
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2phideta2_map()

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

Definition at line 493 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phideta2_map.

494  { libmesh_assert(!calculations_started || calculate_d2xyz);
495  calculate_d2xyz = true; return d2phideta2_map; }
std::vector< std::vector< Real > > d2phideta2_map
Definition: fe_map.h:794
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2phidetadzeta_map()

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

Definition at line 500 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phidetadzeta_map.

501  { libmesh_assert(!calculations_started || calculate_d2xyz);
502  calculate_d2xyz = true; return d2phidetadzeta_map; }
std::vector< std::vector< Real > > d2phidetadzeta_map
Definition: fe_map.h:799
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2phidxi2_map()

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

Definition at line 472 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phidxi2_map.

473  { libmesh_assert(!calculations_started || calculate_d2xyz);
474  calculate_d2xyz = true; return d2phidxi2_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > d2phidxi2_map
Definition: fe_map.h:779

◆ get_d2phidxideta_map()

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

Definition at line 479 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phidxideta_map.

480  { libmesh_assert(!calculations_started || calculate_d2xyz);
481  calculate_d2xyz = true; return d2phidxideta_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > d2phidxideta_map
Definition: fe_map.h:784

◆ get_d2phidxidzeta_map()

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

Definition at line 486 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phidxidzeta_map.

487  { libmesh_assert(!calculations_started || calculate_d2xyz);
488  calculate_d2xyz = true; return d2phidxidzeta_map; }
std::vector< std::vector< Real > > d2phidxidzeta_map
Definition: fe_map.h:789
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2phidzeta2_map()

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

Definition at line 507 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2phidzeta2_map.

508  { libmesh_assert(!calculations_started || calculate_d2xyz);
509  calculate_d2xyz = true; return d2phidzeta2_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > d2phidzeta2_map
Definition: fe_map.h:804

◆ get_d2psideta2()

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

Definition at line 436 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2psideta2_map.

437  { libmesh_assert(!calculations_started || calculate_d2xyz);
438  calculate_d2xyz = true; return d2psideta2_map; }
std::vector< std::vector< Real > > d2psideta2_map
Definition: fe_map.h:844
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2psidxi2()

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

Definition at line 422 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2psidxi2_map.

423  { libmesh_assert(!calculations_started || calculate_d2xyz);
424  calculate_d2xyz = true; return d2psidxi2_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:830

◆ get_d2psidxideta()

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

Definition at line 429 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2psidxideta_map.

430  { libmesh_assert(!calculations_started || calculate_d2xyz);
431  calculate_d2xyz = true; return d2psidxideta_map; }
std::vector< std::vector< Real > > d2psidxideta_map
Definition: fe_map.h:837
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2xidxyz2()

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

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

Definition at line 310 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xidxyz2_map.

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

311  { libmesh_assert(!calculations_started || calculate_d2xyz);
312  calculate_d2xyz = true; return d2xidxyz2_map; }
std::vector< std::vector< Real > > d2xidxyz2_map
Definition: fe_map.h:739
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2xyzdeta2()

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

Definition at line 194 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdeta2_map.

195  { libmesh_assert(!calculations_started || calculate_d2xyz);
196  calculate_d2xyz = true; return d2xyzdeta2_map; }
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2xyzdetadzeta()

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

Definition at line 228 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdetadzeta_map.

229  { libmesh_assert(!calculations_started || calculate_d2xyz);
230  calculate_d2xyz = true; return d2xyzdetadzeta_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:668

◆ get_d2xyzdxi2()

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

Definition at line 187 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdxi2_map.

188  { libmesh_assert(!calculations_started || calculate_d2xyz);
189  calculate_d2xyz = true; return d2xyzdxi2_map; }
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2xyzdxideta()

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

Definition at line 212 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdxideta_map.

213  { libmesh_assert(!calculations_started || calculate_d2xyz);
214  calculate_d2xyz = true; return d2xyzdxideta_map; }
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2xyzdxidzeta()

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

Definition at line 221 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdxidzeta_map.

222  { libmesh_assert(!calculations_started || calculate_d2xyz);
223  calculate_d2xyz = true; return d2xyzdxidzeta_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:662

◆ get_d2xyzdzeta2()

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

Definition at line 203 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2xyzdzeta2_map.

204  { libmesh_assert(!calculations_started || calculate_d2xyz);
205  calculate_d2xyz = true; return d2xyzdzeta2_map; }
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:674
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculations_started
Definition: fe_map.h:877

◆ get_d2zetadxyz2()

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

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

Definition at line 324 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::d2zetadxyz2_map.

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

325  { libmesh_assert(!calculations_started || calculate_d2xyz);
326  calculate_d2xyz = true; return d2zetadxyz2_map; }
bool calculate_d2xyz
Definition: fe_map.h:892
std::vector< std::vector< Real > > d2zetadxyz2_map
Definition: fe_map.h:751
bool calculations_started
Definition: fe_map.h:877

◆ get_detadx()

const std::vector<Real>& libMesh::FEMap::get_detadx ( ) const
inlineinherited

◆ get_detady()

const std::vector<Real>& libMesh::FEMap::get_detady ( ) const
inlineinherited

◆ get_detadz()

const std::vector<Real>& libMesh::FEMap::get_detadz ( ) const
inlineinherited

◆ get_dphideta_map() [1/2]

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

Definition at line 352 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphideta_map.

353  { libmesh_assert(!calculations_started || calculate_dxyz);
354  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > dphideta_map
Definition: fe_map.h:767

◆ get_dphideta_map() [2/2]

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

Definition at line 457 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphideta_map.

458  { libmesh_assert(!calculations_started || calculate_dxyz);
459  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > dphideta_map
Definition: fe_map.h:767

◆ get_dphidxi_map() [1/2]

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

Definition at line 345 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphidxi_map.

346  { libmesh_assert(!calculations_started || calculate_dxyz);
347  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Definition: fe_map.h:762
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877

◆ get_dphidxi_map() [2/2]

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

Definition at line 450 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphidxi_map.

451  { libmesh_assert(!calculations_started || calculate_dxyz);
452  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Definition: fe_map.h:762
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877

◆ get_dphidzeta_map() [1/2]

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

Definition at line 359 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphidzeta_map.

360  { libmesh_assert(!calculations_started || calculate_dxyz);
361  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Definition: fe_map.h:772
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877

◆ get_dphidzeta_map() [2/2]

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

Definition at line 464 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dphidzeta_map.

465  { libmesh_assert(!calculations_started || calculate_dxyz);
466  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Definition: fe_map.h:772
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877

◆ get_dpsideta()

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

Definition at line 415 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dpsideta_map.

416  { libmesh_assert(!calculations_started || calculate_dxyz);
417  calculate_dxyz = true; return dpsideta_map; }
std::vector< std::vector< Real > > dpsideta_map
Definition: fe_map.h:823
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877

◆ get_dpsidxi()

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

Definition at line 408 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dpsidxi_map.

409  { libmesh_assert(!calculations_started || calculate_dxyz);
410  calculate_dxyz = true; return dpsidxi_map; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:817

◆ get_dxidx()

◆ get_dxidy()

const std::vector<Real>& libMesh::FEMap::get_dxidy ( ) const
inlineinherited

◆ get_dxidz()

const std::vector<Real>& libMesh::FEMap::get_dxidz ( ) const
inlineinherited

◆ get_dxyzdeta()

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

Definition at line 172 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dxyzdeta_map.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl().

173  { libmesh_assert(!calculations_started || calculate_dxyz);
174  calculate_dxyz = true; return dxyzdeta_map; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630

◆ get_dxyzdxi()

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

Definition at line 164 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dxyzdxi_map.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl().

165  { libmesh_assert(!calculations_started || calculate_dxyz);
166  calculate_dxyz = true; return dxyzdxi_map; }
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
bool calculations_started
Definition: fe_map.h:877

◆ get_dxyzdzeta()

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

Definition at line 180 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::dxyzdzeta_map.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl().

181  { libmesh_assert(!calculations_started || calculate_dxyz);
182  calculate_dxyz = true; return dxyzdzeta_map; }
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636
bool calculations_started
Definition: fe_map.h:877

◆ get_dzetadx()

const std::vector<Real>& libMesh::FEMap::get_dzetadx ( ) const
inlineinherited

◆ get_dzetady()

const std::vector<Real>& libMesh::FEMap::get_dzetady ( ) const
inlineinherited

◆ get_dzetadz()

const std::vector<Real>& libMesh::FEMap::get_dzetadz ( ) const
inlineinherited

◆ get_jacobian()

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

Definition at line 148 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::jac.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl().

149  { libmesh_assert(!calculations_started || calculate_dxyz);
150  calculate_dxyz = true; return jac; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< Real > jac
Definition: fe_map.h:866

◆ get_JxW() [1/2]

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

Definition at line 156 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::JxW.

157  { libmesh_assert(!calculations_started || calculate_dxyz);
158  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< Real > JxW
Definition: fe_map.h:871

◆ get_JxW() [2/2]

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

Definition at line 518 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::JxW.

519  { libmesh_assert(!calculations_started || calculate_dxyz);
520  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< Real > JxW
Definition: fe_map.h:871

◆ get_normals()

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

Definition at line 373 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::normals.

374  { libmesh_assert(!calculations_started || calculate_dxyz);
375  calculate_dxyz = true; return normals; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< Point > normals
Definition: fe_map.h:854

◆ get_phi_map() [1/2]

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

Definition at line 338 of file fe_map.h.

References libMesh::FEMap::calculate_xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::phi_map.

339  { libmesh_assert(!calculations_started || calculate_xyz);
340  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:757
bool calculations_started
Definition: fe_map.h:877
bool calculate_xyz
Definition: fe_map.h:882

◆ get_phi_map() [2/2]

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

Definition at line 443 of file fe_map.h.

References libMesh::FEMap::calculate_xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::phi_map.

444  { libmesh_assert(!calculations_started || calculate_xyz);
445  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:757
bool calculations_started
Definition: fe_map.h:877
bool calculate_xyz
Definition: fe_map.h:882

◆ get_psi() [1/2]

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

Definition at line 332 of file fe_map.h.

References libMesh::FEMap::psi_map.

333  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811

◆ get_psi() [2/2]

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

Definition at line 402 of file fe_map.h.

References libMesh::FEMap::psi_map.

403  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811

◆ get_tangents()

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

Definition at line 366 of file fe_map.h.

References libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::tangents.

367  { libmesh_assert(!calculations_started || calculate_dxyz);
368  calculate_dxyz = true; return tangents; }
bool calculate_dxyz
Definition: fe_map.h:887
bool calculations_started
Definition: fe_map.h:877
std::vector< std::vector< Point > > tangents
Definition: fe_map.h:849

◆ get_xyz()

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

Definition at line 141 of file fe_map.h.

References libMesh::FEMap::calculate_xyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::xyz.

142  { libmesh_assert(!calculations_started || calculate_xyz);
143  calculate_xyz = true; return xyz; }
bool calculations_started
Definition: fe_map.h:877
bool calculate_xyz
Definition: fe_map.h:882
std::vector< Point > xyz
Definition: fe_map.h:618

◆ init_edge_shape_functions()

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

Same as before, but for an edge. This is used for some projection operators.

Definition at line 514 of file fe_boundary.C.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculate_xyz, libMesh::FEMap::d2psidxi2_map, libMesh::Elem::default_order(), libMesh::FEMap::determine_calculations(), libMesh::FEMap::dpsidxi_map, libMesh::FE< Dim, T >::n_shape_functions(), libMesh::FEMap::psi_map, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().

516 {
517  // Start logging the shape function initialization
518  LOG_SCOPE("init_edge_shape_functions()", "FEMap");
519 
520  libmesh_assert(edge);
521 
522  // We're calculating now!
523  this->determine_calculations();
524 
525  // The element type and order to use in
526  // the map
527  const Order mapping_order (edge->default_order());
528  const ElemType mapping_elem_type (edge->type());
529 
530  // The number of quadrature points.
531  const unsigned int n_qp = cast_int<unsigned int>(qp.size());
532 
533  const unsigned int n_mapping_shape_functions =
534  FE<Dim,LAGRANGE>::n_shape_functions (mapping_elem_type,
535  mapping_order);
536 
537  // resize the vectors to hold current data
538  // Psi are the shape functions used for the FE mapping
539  if (calculate_xyz)
540  this->psi_map.resize (n_mapping_shape_functions);
541  if (calculate_dxyz)
542  this->dpsidxi_map.resize (n_mapping_shape_functions);
543  if (calculate_d2xyz)
544  this->d2psidxi2_map.resize (n_mapping_shape_functions);
545 
546  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
547  {
548  // Allocate space to store the values of the shape functions
549  // and their first and second derivatives at the quadrature points.
550  if (calculate_xyz)
551  this->psi_map[i].resize (n_qp);
552  if (calculate_dxyz)
553  this->dpsidxi_map[i].resize (n_qp);
554  if (calculate_d2xyz)
555  this->d2psidxi2_map[i].resize (n_qp);
556 
557  // Compute the value of shape function i, and its first and
558  // second derivatives at quadrature point p
559  // (Lagrange shape functions are used for the mapping)
560  for (unsigned int p=0; p<n_qp; p++)
561  {
562  if (calculate_xyz)
563  this->psi_map[i][p] = FE<1,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
564  if (calculate_dxyz)
565  this->dpsidxi_map[i][p] = FE<1,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
566  if (calculate_d2xyz)
567  this->d2psidxi2_map[i][p] = FE<1,LAGRANGE>::shape_second_deriv(mapping_elem_type, mapping_order, i, 0, qp[p]);
568  }
569  }
570 }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
bool calculate_dxyz
Definition: fe_map.h:887
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
virtual unsigned int n_shape_functions() const override
Definition: fe.C:50
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculate_xyz
Definition: fe_map.h:882
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:830
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:817
void determine_calculations()
Definition: fe_map.h:527
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)

◆ init_face_shape_functions()

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

Initializes the reference to physical element map for a side. This is used for boundary integration.

Definition at line 409 of file fe_boundary.C.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculate_xyz, libMesh::FEMap::d2psideta2_map, libMesh::FEMap::d2psidxi2_map, libMesh::FEMap::d2psidxideta_map, libMesh::FEMap::determine_calculations(), libMesh::FEMap::dpsideta_map, libMesh::FEMap::dpsidxi_map, libMesh::FE< Dim, T >::n_shape_functions(), libMesh::FEMap::psi_map, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), and side.

411 {
412  // Start logging the shape function initialization
413  LOG_SCOPE("init_face_shape_functions()", "FEMap");
414 
415  libmesh_assert(side);
416 
417  // We're calculating now!
418  this->determine_calculations();
419 
420  // The element type and order to use in
421  // the map
422  const Order mapping_order (side->default_order());
423  const ElemType mapping_elem_type (side->type());
424 
425  // The number of quadrature points.
426  const unsigned int n_qp = cast_int<unsigned int>(qp.size());
427 
428  const unsigned int n_mapping_shape_functions =
429  FE<Dim,LAGRANGE>::n_shape_functions (mapping_elem_type,
430  mapping_order);
431 
432  // resize the vectors to hold current data
433  // Psi are the shape functions used for the FE mapping
434  if (calculate_xyz)
435  this->psi_map.resize (n_mapping_shape_functions);
436 
437  if (Dim > 1)
438  {
439  if (calculate_dxyz)
440  this->dpsidxi_map.resize (n_mapping_shape_functions);
441  if (calculate_d2xyz)
442  this->d2psidxi2_map.resize (n_mapping_shape_functions);
443  }
444 
445  if (Dim == 3)
446  {
447  if (calculate_dxyz)
448  this->dpsideta_map.resize (n_mapping_shape_functions);
449  if (calculate_d2xyz)
450  {
451  this->d2psidxideta_map.resize (n_mapping_shape_functions);
452  this->d2psideta2_map.resize (n_mapping_shape_functions);
453  }
454  }
455 
456  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
457  {
458  // Allocate space to store the values of the shape functions
459  // and their first and second derivatives at the quadrature points.
460  if (calculate_xyz)
461  this->psi_map[i].resize (n_qp);
462  if (Dim > 1)
463  {
464  if (calculate_dxyz)
465  this->dpsidxi_map[i].resize (n_qp);
466  if (calculate_d2xyz)
467  this->d2psidxi2_map[i].resize (n_qp);
468  }
469  if (Dim == 3)
470  {
471  if (calculate_dxyz)
472  this->dpsideta_map[i].resize (n_qp);
473  if (calculate_d2xyz)
474  {
475  this->d2psidxideta_map[i].resize (n_qp);
476  this->d2psideta2_map[i].resize (n_qp);
477  }
478  }
479 
480  // Compute the value of shape function i, and its first and
481  // second derivatives at quadrature point p
482  // (Lagrange shape functions are used for the mapping)
483  for (unsigned int p=0; p<n_qp; p++)
484  {
485  if (calculate_xyz)
486  this->psi_map[i][p] = FE<Dim-1,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
487  if (Dim > 1)
488  {
489  if (calculate_dxyz)
490  this->dpsidxi_map[i][p] = FE<Dim-1,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
491  if (calculate_d2xyz)
492  this->d2psidxi2_map[i][p] = FE<Dim-1,LAGRANGE>::shape_second_deriv(mapping_elem_type, mapping_order, i, 0, qp[p]);
493  }
494  // libMesh::out << "this->d2psidxi2_map["<<i<<"][p]=" << d2psidxi2_map[i][p] << std::endl;
495 
496  // If we are in 3D, then our sides are 2D faces.
497  // For the second derivatives, we must also compute the cross
498  // derivative d^2() / dxi deta
499  if (Dim == 3)
500  {
501  if (calculate_dxyz)
502  this->dpsideta_map[i][p] = FE<Dim-1,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 1, qp[p]);
503  if (calculate_d2xyz)
504  {
505  this->d2psidxideta_map[i][p] = FE<Dim-1,LAGRANGE>::shape_second_deriv(mapping_elem_type, mapping_order, i, 1, qp[p]);
506  this->d2psideta2_map[i][p] = FE<Dim-1,LAGRANGE>::shape_second_deriv(mapping_elem_type, mapping_order, i, 2, qp[p]);
507  }
508  }
509  }
510  }
511 }
std::vector< std::vector< Real > > dpsideta_map
Definition: fe_map.h:823
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:811
std::vector< std::vector< Real > > d2psideta2_map
Definition: fe_map.h:844
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
bool calculate_dxyz
Definition: fe_map.h:887
unsigned short int side
Definition: xdr_io.C:50
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
std::vector< std::vector< Real > > d2psidxideta_map
Definition: fe_map.h:837
virtual unsigned int n_shape_functions() const override
Definition: fe.C:50
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculate_xyz
Definition: fe_map.h:882
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:830
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:817
void determine_calculations()
Definition: fe_map.h:527
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)

◆ init_reference_to_physical_map()

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

Definition at line 68 of file fe_map.C.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculate_xyz, libMesh::FEMap::d2phideta2_map, libMesh::FEMap::d2phidetadzeta_map, libMesh::FEMap::d2phidxi2_map, libMesh::FEMap::d2phidxideta_map, libMesh::FEMap::d2phidxidzeta_map, libMesh::FEMap::d2phidzeta2_map, libMesh::Elem::default_order(), libMesh::FEMap::determine_calculations(), libMesh::FEMap::dphideta_map, libMesh::FEMap::dphidxi_map, libMesh::FEMap::dphidzeta_map, libMesh::Elem::infinite(), libMesh::Elem::is_linear(), libMesh::FE< Dim, T >::n_shape_functions(), libMesh::FEMap::phi_map, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().

70 {
71  // Start logging the reference->physical map initialization
72  LOG_SCOPE("init_reference_to_physical_map()", "FEMap");
73 
74  // We're calculating now!
75  this->determine_calculations();
76 
77 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
78  if (elem->infinite())
79  {
80  //This mainly requires to change the FE<>-calls
81  // to FEInterface in this function.
82  libmesh_not_implemented();
83  }
84 #endif
85 
86  // The number of quadrature points.
87  const std::size_t n_qp = qp.size();
88 
89  // The element type and order to use in
90  // the map
91  const Order mapping_order (elem->default_order());
92  const ElemType mapping_elem_type (elem->type());
93 
94  // Number of shape functions used to construct the map
95  // (Lagrange shape functions are used for mapping)
96  const unsigned int n_mapping_shape_functions =
97  FE<Dim,LAGRANGE>::n_shape_functions (mapping_elem_type,
98  mapping_order);
99 
100  if (calculate_xyz)
101  this->phi_map.resize (n_mapping_shape_functions);
102  if (Dim > 0)
103  {
104  if (calculate_dxyz)
105  this->dphidxi_map.resize (n_mapping_shape_functions);
106 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
107  if (calculate_d2xyz)
108  this->d2phidxi2_map.resize (n_mapping_shape_functions);
109 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
110  }
111 
112  if (Dim > 1)
113  {
114  if (calculate_dxyz)
115  this->dphideta_map.resize (n_mapping_shape_functions);
116 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
117  if (calculate_d2xyz)
118  {
119  this->d2phidxideta_map.resize (n_mapping_shape_functions);
120  this->d2phideta2_map.resize (n_mapping_shape_functions);
121  }
122 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
123  }
124 
125  if (Dim > 2)
126  {
127  if (calculate_dxyz)
128  this->dphidzeta_map.resize (n_mapping_shape_functions);
129 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
130  if (calculate_d2xyz)
131  {
132  this->d2phidxidzeta_map.resize (n_mapping_shape_functions);
133  this->d2phidetadzeta_map.resize (n_mapping_shape_functions);
134  this->d2phidzeta2_map.resize (n_mapping_shape_functions);
135  }
136 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
137  }
138 
139 
140  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
141  {
142  if (calculate_xyz)
143  this->phi_map[i].resize (n_qp);
144  if (Dim > 0)
145  {
146  if (calculate_dxyz)
147  this->dphidxi_map[i].resize (n_qp);
148 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
149  if (calculate_d2xyz)
150  {
151  this->d2phidxi2_map[i].resize (n_qp);
152  if (Dim > 1)
153  {
154  this->d2phidxideta_map[i].resize (n_qp);
155  this->d2phideta2_map[i].resize (n_qp);
156  }
157  if (Dim > 2)
158  {
159  this->d2phidxidzeta_map[i].resize (n_qp);
160  this->d2phidetadzeta_map[i].resize (n_qp);
161  this->d2phidzeta2_map[i].resize (n_qp);
162  }
163  }
164 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
165 
166  if (Dim > 1 && calculate_dxyz)
167  this->dphideta_map[i].resize (n_qp);
168 
169  if (Dim > 2 && calculate_dxyz)
170  this->dphidzeta_map[i].resize (n_qp);
171  }
172  }
173 
174  // Optimize for the *linear* geometric elements case:
175  bool is_linear = elem->is_linear();
176 
177  switch (Dim)
178  {
179 
180  //------------------------------------------------------------
181  // 0D
182  case 0:
183  {
184  if (calculate_xyz)
185  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
186  for (std::size_t p=0; p<n_qp; p++)
187  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
188 
189  break;
190  }
191 
192  //------------------------------------------------------------
193  // 1D
194  case 1:
195  {
196  // Compute the value of the mapping shape function i at quadrature point p
197  // (Lagrange shape functions are used for mapping)
198  if (is_linear)
199  {
200  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
201  {
202  if (calculate_xyz)
203  this->phi_map[i][0] =
204  FE<Dim,LAGRANGE>::shape(mapping_elem_type,
205  mapping_order,
206  i,
207  qp[0]);
208 
209  if (calculate_dxyz)
210  this->dphidxi_map[i][0] =
211  FE<Dim,LAGRANGE>::shape_deriv(mapping_elem_type,
212  mapping_order,
213  i,
214  0,
215  qp[0]);
216 
217 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
218  if (calculate_d2xyz)
219  this->d2phidxi2_map[i][0] =
220  FE<Dim,LAGRANGE>::shape_second_deriv(mapping_elem_type,
221  mapping_order,
222  i,
223  0,
224  qp[0]);
225 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
226  for (std::size_t p=1; p<n_qp; p++)
227  {
228  if (calculate_xyz)
229  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
230  if (calculate_dxyz)
231  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
232 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
233  if (calculate_d2xyz)
234  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
235 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
236  }
237  }
238  }
239  else
240  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
241  for (std::size_t p=0; p<n_qp; p++)
242  {
243  if (calculate_xyz)
244  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
245  if (calculate_dxyz)
246  this->dphidxi_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
247 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
248  if (calculate_d2xyz)
249  this->d2phidxi2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
250 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
251  }
252 
253  break;
254  }
255  //------------------------------------------------------------
256  // 2D
257  case 2:
258  {
259  // Compute the value of the mapping shape function i at quadrature point p
260  // (Lagrange shape functions are used for mapping)
261  if (is_linear)
262  {
263  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
264  {
265  if (calculate_xyz)
266  this->phi_map[i][0] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[0]);
267  if (calculate_dxyz)
268  {
269  this->dphidxi_map[i][0] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[0]);
270  this->dphideta_map[i][0] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 1, qp[0]);
271  }
272 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
273  if (calculate_d2xyz)
274  {
275  this->d2phidxi2_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 0, qp[0]);
276  this->d2phidxideta_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 1, qp[0]);
277  this->d2phideta2_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 2, qp[0]);
278  }
279 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
280  for (std::size_t p=1; p<n_qp; p++)
281  {
282  if (calculate_xyz)
283  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
284  if (calculate_dxyz)
285  {
286  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
287  this->dphideta_map[i][p] = this->dphideta_map[i][0];
288  }
289 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
290  if (calculate_d2xyz)
291  {
292  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
293  this->d2phidxideta_map[i][p] = this->d2phidxideta_map[i][0];
294  this->d2phideta2_map[i][p] = this->d2phideta2_map[i][0];
295  }
296 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
297  }
298  }
299  }
300  else
301  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
302  for (std::size_t p=0; p<n_qp; p++)
303  {
304  if (calculate_xyz)
305  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
306  if (calculate_dxyz)
307  {
308  this->dphidxi_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
309  this->dphideta_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 1, qp[p]);
310  }
311 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
312  if (calculate_d2xyz)
313  {
314  this->d2phidxi2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
315  this->d2phidxideta_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 1, qp[p]);
316  this->d2phideta2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 2, qp[p]);
317  }
318 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
319  }
320 
321  break;
322  }
323 
324  //------------------------------------------------------------
325  // 3D
326  case 3:
327  {
328  // Compute the value of the mapping shape function i at quadrature point p
329  // (Lagrange shape functions are used for mapping)
330  if (is_linear)
331  {
332  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
333  {
334  if (calculate_xyz)
335  this->phi_map[i][0] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[0]);
336  if (calculate_dxyz)
337  {
338  this->dphidxi_map[i][0] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[0]);
339  this->dphideta_map[i][0] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 1, qp[0]);
340  this->dphidzeta_map[i][0] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 2, qp[0]);
341  }
342 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
343  if (calculate_d2xyz)
344  {
345  this->d2phidxi2_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 0, qp[0]);
346  this->d2phidxideta_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 1, qp[0]);
347  this->d2phideta2_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 2, qp[0]);
348  this->d2phidxidzeta_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 3, qp[0]);
349  this->d2phidetadzeta_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 4, qp[0]);
350  this->d2phidzeta2_map[i][0] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 5, qp[0]);
351  }
352 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
353  for (std::size_t p=1; p<n_qp; p++)
354  {
355  if (calculate_xyz)
356  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
357  if (calculate_dxyz)
358  {
359  this->dphidxi_map[i][p] = this->dphidxi_map[i][0];
360  this->dphideta_map[i][p] = this->dphideta_map[i][0];
361  this->dphidzeta_map[i][p] = this->dphidzeta_map[i][0];
362  }
363 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
364  if (calculate_d2xyz)
365  {
366  this->d2phidxi2_map[i][p] = this->d2phidxi2_map[i][0];
367  this->d2phidxideta_map[i][p] = this->d2phidxideta_map[i][0];
368  this->d2phideta2_map[i][p] = this->d2phideta2_map[i][0];
369  this->d2phidxidzeta_map[i][p] = this->d2phidxidzeta_map[i][0];
370  this->d2phidetadzeta_map[i][p] = this->d2phidetadzeta_map[i][0];
371  this->d2phidzeta2_map[i][p] = this->d2phidzeta2_map[i][0];
372  }
373 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
374  }
375  }
376  }
377  else
378  for (unsigned int i=0; i<n_mapping_shape_functions; i++)
379  for (std::size_t p=0; p<n_qp; p++)
380  {
381  if (calculate_xyz)
382  this->phi_map[i][p] = FE<Dim,LAGRANGE>::shape (mapping_elem_type, mapping_order, i, qp[p]);
383  if (calculate_dxyz)
384  {
385  this->dphidxi_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
386  this->dphideta_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 1, qp[p]);
387  this->dphidzeta_map[i][p] = FE<Dim,LAGRANGE>::shape_deriv (mapping_elem_type, mapping_order, i, 2, qp[p]);
388  }
389 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
390  if (calculate_d2xyz)
391  {
392  this->d2phidxi2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 0, qp[p]);
393  this->d2phidxideta_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 1, qp[p]);
394  this->d2phideta2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 2, qp[p]);
395  this->d2phidxidzeta_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 3, qp[p]);
396  this->d2phidetadzeta_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 4, qp[p]);
397  this->d2phidzeta2_map[i][p] = FE<Dim,LAGRANGE>::shape_second_deriv (mapping_elem_type, mapping_order, i, 5, qp[p]);
398  }
399 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
400  }
401 
402  break;
403  }
404 
405  default:
406  libmesh_error_msg("Invalid Dim = " << Dim);
407  }
408 }
std::vector< std::vector< Real > > dphidzeta_map
Definition: fe_map.h:772
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
std::vector< std::vector< Real > > dphidxi_map
Definition: fe_map.h:762
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< std::vector< Real > > d2phideta2_map
Definition: fe_map.h:794
std::vector< std::vector< Real > > d2phidxidzeta_map
Definition: fe_map.h:789
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:757
std::vector< std::vector< Real > > d2phidetadzeta_map
Definition: fe_map.h:799
virtual unsigned int n_shape_functions() const override
Definition: fe.C:50
bool calculate_d2xyz
Definition: fe_map.h:892
bool calculate_xyz
Definition: fe_map.h:882
std::vector< std::vector< Real > > d2phidxideta_map
Definition: fe_map.h:784
void determine_calculations()
Definition: fe_map.h:527
std::vector< std::vector< Real > > d2phidzeta2_map
Definition: fe_map.h:804
std::vector< std::vector< Real > > d2phidxi2_map
Definition: fe_map.h:779
std::vector< std::vector< Real > > dphideta_map
Definition: fe_map.h:767
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)

◆ print_JxW()

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

Prints the Jacobian times the weight for each quadrature point.

Definition at line 1438 of file fe_map.C.

References libMesh::index_range(), and libMesh::FEMap::JxW.

1439 {
1440  for (auto i : index_range(JxW))
1441  os << " [" << i << "]: " << JxW[i] << std::endl;
1442 }
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Definition: int_range.h:104
std::vector< Real > JxW
Definition: fe_map.h:871

◆ print_xyz()

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

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

Definition at line 1446 of file fe_map.C.

References libMesh::index_range(), and libMesh::FEMap::xyz.

1447 {
1448  for (auto i : index_range(xyz))
1449  os << " [" << i << "]: " << xyz[i];
1450 }
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Definition: int_range.h:104
std::vector< Point > xyz
Definition: fe_map.h:618

◆ resize_quadrature_map_vectors()

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

A utility function for use by compute_*_map

Definition at line 1151 of file fe_map.C.

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

Referenced by libMesh::FEMap::compute_affine_map(), libMesh::FEMap::compute_map(), and libMesh::FEMap::compute_null_map().

1152 {
1153  // We're calculating now!
1154  this->determine_calculations();
1155 
1156  // Resize the vectors to hold data at the quadrature points
1157  if (calculate_xyz)
1158  xyz.resize(n_qp);
1159  if (calculate_dxyz)
1160  {
1161  dxyzdxi_map.resize(n_qp);
1162  dxidx_map.resize(n_qp);
1163  dxidy_map.resize(n_qp); // 1D element may live in 2D ...
1164  dxidz_map.resize(n_qp); // ... or 3D
1165  }
1166 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1167  if (calculate_d2xyz)
1168  {
1169  d2xyzdxi2_map.resize(n_qp);
1170 
1171  // Inverse map second derivatives
1172  d2xidxyz2_map.resize(n_qp);
1173  for (auto i : index_range(d2xidxyz2_map))
1174  d2xidxyz2_map[i].assign(6, 0.);
1175  }
1176 #endif
1177  if (dim > 1)
1178  {
1179  if (calculate_dxyz)
1180  {
1181  dxyzdeta_map.resize(n_qp);
1182  detadx_map.resize(n_qp);
1183  detady_map.resize(n_qp);
1184  detadz_map.resize(n_qp);
1185  }
1186 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1187  if (calculate_d2xyz)
1188  {
1189  d2xyzdxideta_map.resize(n_qp);
1190  d2xyzdeta2_map.resize(n_qp);
1191 
1192  // Inverse map second derivatives
1193  d2etadxyz2_map.resize(n_qp);
1194  for (auto i : index_range(d2etadxyz2_map))
1195  d2etadxyz2_map[i].assign(6, 0.);
1196  }
1197 #endif
1198  if (dim > 2)
1199  {
1200  if (calculate_dxyz)
1201  {
1202  dxyzdzeta_map.resize (n_qp);
1203  dzetadx_map.resize (n_qp);
1204  dzetady_map.resize (n_qp);
1205  dzetadz_map.resize (n_qp);
1206  }
1207 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1208  if (calculate_d2xyz)
1209  {
1210  d2xyzdxidzeta_map.resize(n_qp);
1211  d2xyzdetadzeta_map.resize(n_qp);
1212  d2xyzdzeta2_map.resize(n_qp);
1213 
1214  // Inverse map second derivatives
1215  d2zetadxyz2_map.resize(n_qp);
1216  for (auto i : index_range(d2zetadxyz2_map))
1217  d2zetadxyz2_map[i].assign(6, 0.);
1218  }
1219 #endif
1220  }
1221  }
1222 
1223  if (calculate_dxyz)
1224  {
1225  jac.resize(n_qp);
1226  JxW.resize(n_qp);
1227  }
1228 }
std::vector< std::vector< Real > > d2etadxyz2_map
Definition: fe_map.h:745
bool calculate_dxyz
Definition: fe_map.h:887
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:674
std::vector< Real > dzetady_map
Definition: fe_map.h:726
std::vector< std::vector< Real > > d2xidxyz2_map
Definition: fe_map.h:739
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Definition: int_range.h:104
std::vector< Real > dxidz_map
Definition: fe_map.h:694
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:648
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:636
std::vector< Real > dzetadx_map
Definition: fe_map.h:720
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:624
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:654
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:642
std::vector< Real > dzetadz_map
Definition: fe_map.h:732
bool calculate_d2xyz
Definition: fe_map.h:892
std::vector< std::vector< Real > > d2zetadxyz2_map
Definition: fe_map.h:751
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:668
std::vector< Real > dxidx_map
Definition: fe_map.h:682
bool calculate_xyz
Definition: fe_map.h:882
std::vector< Real > dxidy_map
Definition: fe_map.h:688
std::vector< Real > JxW
Definition: fe_map.h:871
std::vector< Point > xyz
Definition: fe_map.h:618
std::vector< Real > detady_map
Definition: fe_map.h:707
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:630
void determine_calculations()
Definition: fe_map.h:527
std::vector< Real > jac
Definition: fe_map.h:866
std::vector< Real > detadz_map
Definition: fe_map.h:713
std::vector< Real > detadx_map
Definition: fe_map.h:701
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:662

Member Data Documentation

◆ calculate_d2xyz

◆ calculate_dxyz

◆ calculate_xyz

◆ calculations_started

bool libMesh::FEMap::calculations_started
mutableprotectedinherited

Have calculations with this object already been started? Then all get_* functions should already have been called.

Definition at line 877 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::determine_calculations(), libMesh::FEMap::get_curvatures(), libMesh::FEMap::get_d2etadxyz2(), libMesh::FEMap::get_d2phideta2_map(), libMesh::FEMap::get_d2phidetadzeta_map(), libMesh::FEMap::get_d2phidxi2_map(), libMesh::FEMap::get_d2phidxideta_map(), libMesh::FEMap::get_d2phidxidzeta_map(), libMesh::FEMap::get_d2phidzeta2_map(), libMesh::FEMap::get_d2psideta2(), libMesh::FEMap::get_d2psidxi2(), libMesh::FEMap::get_d2psidxideta(), libMesh::FEMap::get_d2xidxyz2(), libMesh::FEMap::get_d2xyzdeta2(), libMesh::FEMap::get_d2xyzdetadzeta(), libMesh::FEMap::get_d2xyzdxi2(), libMesh::FEMap::get_d2xyzdxideta(), libMesh::FEMap::get_d2xyzdxidzeta(), libMesh::FEMap::get_d2xyzdzeta2(), libMesh::FEMap::get_d2zetadxyz2(), libMesh::FEMap::get_detadx(), libMesh::FEMap::get_detady(), libMesh::FEMap::get_detadz(), libMesh::FEMap::get_dphideta_map(), libMesh::FEMap::get_dphidxi_map(), libMesh::FEMap::get_dphidzeta_map(), libMesh::FEMap::get_dpsideta(), libMesh::FEMap::get_dpsidxi(), libMesh::FEMap::get_dxidx(), libMesh::FEMap::get_dxidy(), libMesh::FEMap::get_dxidz(), libMesh::FEMap::get_dxyzdeta(), libMesh::FEMap::get_dxyzdxi(), libMesh::FEMap::get_dxyzdzeta(), libMesh::FEMap::get_dzetadx(), libMesh::FEMap::get_dzetady(), libMesh::FEMap::get_dzetadz(), libMesh::FEMap::get_jacobian(), libMesh::FEMap::get_JxW(), libMesh::FEMap::get_normals(), libMesh::FEMap::get_phi_map(), libMesh::FEMap::get_tangents(), and libMesh::FEMap::get_xyz().

◆ curvatures

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

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 861 of file fe_map.h.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::get_curvatures().

◆ d2etadxyz2_map

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

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 745 of file fe_map.h.

Referenced by libMesh::FEMap::compute_inverse_map_second_derivs(), libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2etadxyz2(), and libMesh::FEMap::resize_quadrature_map_vectors().

◆ d2phideta2_map

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

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

Definition at line 794 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phideta2_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2phidetadzeta_map

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

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

Definition at line 799 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phidetadzeta_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2phidxi2_map

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

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

Definition at line 779 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phidxi2_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2phidxideta_map

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

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

Definition at line 784 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phidxideta_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2phidxidzeta_map

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

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

Definition at line 789 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phidxidzeta_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2phidzeta2_map

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

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

Definition at line 804 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2phidzeta2_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ d2psideta2_map

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

Map for the second derivatives (in eta) of the side shape functions. Useful for computing the curvature at the quadrature points.

Definition at line 844 of file fe_map.h.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), libMesh::FEMap::get_d2psideta2(), and libMesh::FEMap::init_face_shape_functions().

◆ d2psidxi2_map

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

Map for the second derivatives (in xi) of the side shape functions. Useful for computing the curvature at the quadrature points.

Definition at line 830 of file fe_map.h.

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

◆ d2psidxideta_map

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

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 837 of file fe_map.h.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), libMesh::FEMap::get_d2psidxideta(), and libMesh::FEMap::init_face_shape_functions().

◆ d2xidxyz2_map

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

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 739 of file fe_map.h.

Referenced by libMesh::FEMap::compute_inverse_map_second_derivs(), libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2xidxyz2(), and libMesh::FEMap::resize_quadrature_map_vectors().

◆ d2xyzdeta2_map

◆ d2xyzdetadzeta_map

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

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 668 of file fe_map.h.

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

◆ d2xyzdxi2_map

◆ d2xyzdxideta_map

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

◆ d2xyzdxidzeta_map

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

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 662 of file fe_map.h.

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

◆ d2xyzdzeta2_map

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

◆ d2zetadxyz2_map

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

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 751 of file fe_map.h.

Referenced by libMesh::FEMap::compute_inverse_map_second_derivs(), libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_d2zetadxyz2(), and libMesh::FEMap::resize_quadrature_map_vectors().

◆ detadx_map

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

◆ detady_map

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

◆ detadz_map

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

◆ dphideta_map

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

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

Definition at line 767 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_dphideta_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ dphidxi_map

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

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

Definition at line 762 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_dphidxi_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ dphidzeta_map

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

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

Definition at line 772 of file fe_map.h.

Referenced by libMesh::FEMap::compute_single_point_map(), libMesh::FEMap::get_dphidzeta_map(), and libMesh::FEMap::init_reference_to_physical_map().

◆ dpsideta_map

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

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

Definition at line 823 of file fe_map.h.

Referenced by compute_face_map(), libMesh::FEMap::compute_face_map(), libMesh::FEMap::get_dpsideta(), and libMesh::FEMap::init_face_shape_functions().

◆ dpsidxi_map

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

◆ dxidx_map

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

◆ dxidy_map

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

◆ dxidz_map

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

◆ dxyzdeta_map

◆ dxyzdxi_map

◆ dxyzdzeta_map

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

◆ dzetadx_map

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

◆ dzetady_map

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

◆ dzetadz_map

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

◆ jac

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

◆ JxW

◆ normals

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

Normal vectors on boundary at quadrature points

Definition at line 854 of file fe_map.h.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::get_normals().

◆ phi_map

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

◆ psi_map

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

◆ tangents

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

Tangent vectors on boundary at quadrature points.

Definition at line 849 of file fe_map.h.

Referenced by libMesh::FEMap::compute_edge_map(), compute_face_map(), libMesh::FEMap::compute_face_map(), and libMesh::FEMap::get_tangents().

◆ xyz


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