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) libmesh_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

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:883
virtual libMesh::FEXYZMap::~FEXYZMap ( )
inlinevirtual

Definition at line 50 of file fe_xyz_map.h.

References compute_face_map(), and side.

50 {}

Member Function Documentation

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

Definition at line 51 of file fe_map.C.

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

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

52 {
53  switch( fe_type.family )
54  {
55  case XYZ:
56  return libmesh_make_unique<FEXYZMap>();
57 
58  default:
59  return libmesh_make_unique<FEMap>();
60  }
61 }
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 1221 of file fe_map.C.

References 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::FEMap::elem_nodes, 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(), and libMesh::FEMap::~FEMap().

1224 {
1225  // Start logging the map computation.
1226  LOG_SCOPE("compute_affine_map()", "FEMap");
1227 
1228  libmesh_assert(elem);
1229 
1230  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1231 
1232  // Resize the vectors to hold data at the quadrature points
1233  this->resize_quadrature_map_vectors(dim, n_qp);
1234 
1235  // Determine the nodes contributing to element elem
1236  unsigned int n_nodes = elem->n_nodes();
1237  elem_nodes.resize(elem->n_nodes());
1238  for (unsigned int i=0; i<n_nodes; i++)
1239  elem_nodes[i] = elem->node_ptr(i);
1240 
1241  // Compute map at quadrature point 0
1242  this->compute_single_point_map(dim, qw, elem, 0, elem_nodes, /*compute_second_derivatives=*/false);
1243 
1244  // Compute xyz at all other quadrature points
1245  if (calculate_xyz)
1246  for (unsigned int p=1; p<n_qp; p++)
1247  {
1248  xyz[p].zero();
1249  for (std::size_t i=0; i<phi_map.size(); i++) // sum over the nodes
1250  xyz[p].add_scaled (*elem_nodes[i], phi_map[i][p] );
1251  }
1252 
1253  // Copy other map data from quadrature point 0
1254  if (calculate_dxyz)
1255  for (unsigned int p=1; p<n_qp; p++) // for each extra quadrature point
1256  {
1257  dxyzdxi_map[p] = dxyzdxi_map[0];
1258  dxidx_map[p] = dxidx_map[0];
1259  dxidy_map[p] = dxidy_map[0];
1260  dxidz_map[p] = dxidz_map[0];
1261 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1262  // The map should be affine, so second derivatives are zero
1263  if (calculate_d2xyz)
1264  d2xyzdxi2_map[p] = 0.;
1265 #endif
1266  if (dim > 1)
1267  {
1268  dxyzdeta_map[p] = dxyzdeta_map[0];
1269  detadx_map[p] = detadx_map[0];
1270  detady_map[p] = detady_map[0];
1271  detadz_map[p] = detadz_map[0];
1272 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1273  if (calculate_d2xyz)
1274  {
1275  d2xyzdxideta_map[p] = 0.;
1276  d2xyzdeta2_map[p] = 0.;
1277  }
1278 #endif
1279  if (dim > 2)
1280  {
1281  dxyzdzeta_map[p] = dxyzdzeta_map[0];
1282  dzetadx_map[p] = dzetadx_map[0];
1283  dzetady_map[p] = dzetady_map[0];
1284  dzetadz_map[p] = dzetadz_map[0];
1285 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1286  if (calculate_d2xyz)
1287  {
1288  d2xyzdxidzeta_map[p] = 0.;
1289  d2xyzdetadzeta_map[p] = 0.;
1290  d2xyzdzeta2_map[p] = 0.;
1291  }
1292 #endif
1293  }
1294  }
1295  jac[p] = jac[0];
1296  JxW[p] = JxW[0] / qw[0] * qw[p];
1297  }
1298 }
bool calculate_dxyz
Definition: fe_map.h:888
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:675
std::vector< Real > dzetady_map
Definition: fe_map.h:727
std::vector< Real > dxidz_map
Definition: fe_map.h:695
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:758
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:649
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
std::vector< Real > dzetadx_map
Definition: fe_map.h:721
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
const dof_id_type n_nodes
Definition: tecplot_io.C:67
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:655
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:643
std::vector< Real > dzetadz_map
Definition: fe_map.h:733
bool calculate_d2xyz
Definition: fe_map.h:893
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:669
std::vector< Real > dxidx_map
Definition: fe_map.h:683
bool calculate_xyz
Definition: fe_map.h:883
std::vector< Real > dxidy_map
Definition: fe_map.h:689
std::vector< Real > JxW
Definition: fe_map.h:872
std::vector< Point > xyz
Definition: fe_map.h:619
std::vector< const Node * > elem_nodes
Definition: fe_map.h:912
std::vector< Real > detady_map
Definition: fe_map.h:708
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1140
std::vector< Real > jac
Definition: fe_map.h:867
std::vector< Real > detadz_map
Definition: fe_map.h:714
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:401
std::vector< Real > detadx_map
Definition: fe_map.h:702
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:663
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 921 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::FE< Dim, T >::edge_reinit(), libMesh::FEMap::init_edge_shape_functions(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::JxW, libMesh::FEMap::normals, libMesh::Elem::point(), libMesh::FEMap::psi_map, libMesh::Real, libMesh::FE< Dim, T >::reinit(), libMesh::FE< Dim, T >::side_map(), libMesh::FEMap::tangents, and libMesh::FEMap::xyz.

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

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

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::Elem::point(), libMesh::FEMap::psi_map, libMesh::Real, libMesh::FEMap::tangents, libMesh::TypeVector< T >::unit(), and libMesh::FEMap::xyz.

Referenced by ~FEXYZMap().

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 (std::size_t i=0; i<this->psi_map.size(); i++) // sum over the nodes
62  {
63  const Point & side_point = side->point(i);
64 
65  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
66  {
67  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
68  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
69  this->d2xyzdxi2_map[p].add_scaled(side_point, this->d2psidxi2_map[i][p]);
70  }
71  }
72 
73  // Compute the tangent & normal at the quadrature point
74  for (unsigned int p=0; p<n_qp; p++)
75  {
76  const Point n(this->dxyzdxi_map[p](1), -this->dxyzdxi_map[p](0), 0.);
77 
78  this->normals[p] = n.unit();
79  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
80 #if LIBMESH_DIM == 3 // Only good in 3D space
81  this->tangents[p][1] = this->dxyzdxi_map[p].cross(n).unit();
82 #endif
83  // The curvature is computed via the familiar Frenet formula:
84  // curvature = [d^2(x) / d (xi)^2] dot [normal]
85  // For a reference, see:
86  // F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill, p. 310
87  //
88  // Note: The sign convention here is different from the
89  // 3D case. Concave-upward curves (smiles) have a positive
90  // curvature. Concave-downward curves (frowns) have a
91  // negative curvature. Be sure to take that into account!
92  const Real numerator = this->d2xyzdxi2_map[p] * this->normals[p];
93  const Real denominator = this->dxyzdxi_map[p].norm_sq();
94  libmesh_assert_not_equal_to (denominator, 0);
95  this->curvatures[p] = numerator / denominator;
96  }
97 
98  // compute the jacobian at the quadrature points
99  for (unsigned int p=0; p<n_qp; p++)
100  {
101  const Real the_jac = std::sqrt(this->dxdxi_map(p)*this->dxdxi_map(p) +
102  this->dydxi_map(p)*this->dydxi_map(p));
103 
104  libmesh_assert_greater (the_jac, 0.);
105 
106  this->JxW[p] = the_jac*qw[p];
107  }
108 
109  break;
110  }
111 
112  case 3:
113  {
114  // Resize the vectors to hold data at the quadrature points
115  {
116  this->xyz.resize(n_qp);
117  this->dxyzdxi_map.resize(n_qp);
118  this->dxyzdeta_map.resize(n_qp);
119  this->d2xyzdxi2_map.resize(n_qp);
120  this->d2xyzdxideta_map.resize(n_qp);
121  this->d2xyzdeta2_map.resize(n_qp);
122  this->tangents.resize(n_qp);
123  this->normals.resize(n_qp);
124  this->curvatures.resize(n_qp);
125 
126  this->JxW.resize(n_qp);
127  }
128 
129  // Clear the entities that will be summed
130  for (unsigned int p=0; p<n_qp; p++)
131  {
132  this->tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
133  this->xyz[p].zero();
134  this->dxyzdxi_map[p].zero();
135  this->dxyzdeta_map[p].zero();
136  this->d2xyzdxi2_map[p].zero();
137  this->d2xyzdxideta_map[p].zero();
138  this->d2xyzdeta2_map[p].zero();
139  }
140 
141  // compute x, dxdxi at the quadrature points
142  for (std::size_t i=0; i<this->psi_map.size(); i++) // sum over the nodes
143  {
144  const Point & side_point = side->point(i);
145 
146  for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
147  {
148  this->xyz[p].add_scaled (side_point, this->psi_map[i][p]);
149  this->dxyzdxi_map[p].add_scaled (side_point, this->dpsidxi_map[i][p]);
150  this->dxyzdeta_map[p].add_scaled (side_point, this->dpsideta_map[i][p]);
151  this->d2xyzdxi2_map[p].add_scaled (side_point, this->d2psidxi2_map[i][p]);
152  this->d2xyzdxideta_map[p].add_scaled(side_point, this->d2psidxideta_map[i][p]);
153  this->d2xyzdeta2_map[p].add_scaled (side_point, this->d2psideta2_map[i][p]);
154  }
155  }
156 
157  // Compute the tangents, normal, and curvature at the quadrature point
158  for (unsigned int p=0; p<n_qp; p++)
159  {
160  const Point n = this->dxyzdxi_map[p].cross(this->dxyzdeta_map[p]);
161  this->normals[p] = n.unit();
162  this->tangents[p][0] = this->dxyzdxi_map[p].unit();
163  this->tangents[p][1] = n.cross(this->dxyzdxi_map[p]).unit();
164 
165  // Compute curvature using the typical nomenclature
166  // of the first and second fundamental forms.
167  // For reference, see:
168  // 1) http://mathworld.wolfram.com/MeanCurvature.html
169  // (note -- they are using inward normal)
170  // 2) F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill
171  const Real L = -this->d2xyzdxi2_map[p] * this->normals[p];
172  const Real M = -this->d2xyzdxideta_map[p] * this->normals[p];
173  const Real N = -this->d2xyzdeta2_map[p] * this->normals[p];
174  const Real E = this->dxyzdxi_map[p].norm_sq();
175  const Real F = this->dxyzdxi_map[p] * this->dxyzdeta_map[p];
176  const Real G = this->dxyzdeta_map[p].norm_sq();
177 
178  const Real numerator = E*N -2.*F*M + G*L;
179  const Real denominator = E*G - F*F;
180  libmesh_assert_not_equal_to (denominator, 0.);
181  this->curvatures[p] = 0.5*numerator/denominator;
182  }
183 
184  // compute the jacobian at the quadrature points, see
185  // http://sp81.msi.umn.edu:999/fluent/fidap/help/theory/thtoc.htm
186  for (unsigned int p=0; p<n_qp; p++)
187  {
188  const Real g11 = (this->dxdxi_map(p)*this->dxdxi_map(p) +
189  this->dydxi_map(p)*this->dydxi_map(p) +
190  this->dzdxi_map(p)*this->dzdxi_map(p));
191 
192  const Real g12 = (this->dxdxi_map(p)*this->dxdeta_map(p) +
193  this->dydxi_map(p)*this->dydeta_map(p) +
194  this->dzdxi_map(p)*this->dzdeta_map(p));
195 
196  const Real g21 = g12;
197 
198  const Real g22 = (this->dxdeta_map(p)*this->dxdeta_map(p) +
199  this->dydeta_map(p)*this->dydeta_map(p) +
200  this->dzdeta_map(p)*this->dzdeta_map(p));
201 
202 
203  const Real the_jac = std::sqrt(g11*g22 - g12*g21);
204 
205  libmesh_assert_greater (the_jac, 0.);
206 
207  this->JxW[p] = the_jac*qw[p];
208  }
209 
210  break;
211  }
212  default:
213  libmesh_error_msg("Invalid dim = " << dim);
214 
215  } // switch(dim)
216 }
std::vector< std::vector< Real > > dpsideta_map
Definition: fe_map.h:824
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:812
std::vector< std::vector< Real > > d2psideta2_map
Definition: fe_map.h:845
Real dxdxi_map(const unsigned int p) const
Definition: fe_map.h:550
unsigned short int side
Definition: xdr_io.C:49
Real dydxi_map(const unsigned int p) const
Definition: fe_map.h:558
std::vector< std::vector< Real > > d2psidxideta_map
Definition: fe_map.h:838
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:649
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:655
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:643
Real dzdxi_map(const unsigned int p) const
Definition: fe_map.h:566
Real dxdeta_map(const unsigned int p) const
Definition: fe_map.h:574
Real dydeta_map(const unsigned int p) const
Definition: fe_map.h:582
std::vector< Real > curvatures
Definition: fe_map.h:862
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:831
std::vector< Real > JxW
Definition: fe_map.h:872
std::vector< Point > normals
Definition: fe_map.h:855
std::vector< Point > xyz
Definition: fe_map.h:619
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:818
std::vector< std::vector< Point > > tangents
Definition: fe_map.h:850
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
Real dzdeta_map(const unsigned int p) const
Definition: fe_map.h:590
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 1377 of file fe_map.C.

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

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

1381 {
1382  if (!elem)
1383  {
1384  compute_null_map(dim, qw);
1385  return;
1386  }
1387 
1388  if (elem->has_affine_map())
1389  {
1390  compute_affine_map(dim, qw, elem);
1391  return;
1392  }
1393 
1394  // Start logging the map computation.
1395  LOG_SCOPE("compute_map()", "FEMap");
1396 
1397  libmesh_assert(elem);
1398 
1399  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1400 
1401  // Resize the vectors to hold data at the quadrature points
1402  this->resize_quadrature_map_vectors(dim, n_qp);
1403 
1404  // Determine the nodes contributing to element elem
1405  std::vector<const Node *> elem_nodes;
1406  if (elem->type() == TRI3SUBDIVISION)
1407  {
1408  // Subdivision surface FE require the 1-ring around elem
1409  libmesh_assert_equal_to (dim, 2);
1410  const Tri3Subdivision * sd_elem = static_cast<const Tri3Subdivision *>(elem);
1411  MeshTools::Subdivision::find_one_ring(sd_elem, elem_nodes);
1412  }
1413  else
1414  {
1415  // All other FE use only the nodes of elem itself
1416  elem_nodes.resize(elem->n_nodes(), libmesh_nullptr);
1417  for (unsigned int i=0; i<elem->n_nodes(); i++)
1418  elem_nodes[i] = elem->node_ptr(i);
1419  }
1420 
1421  // Compute map at all quadrature points
1422  for (unsigned int p=0; p!=n_qp; p++)
1423  this->compute_single_point_map(dim, qw, elem, p, elem_nodes, calculate_d2phi);
1424 }
virtual void compute_affine_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem)
Definition: fe_map.C:1221
const class libmesh_nullptr_t libmesh_nullptr
void find_one_ring(const Tri3Subdivision *elem, std::vector< const Node * > &nodes)
std::vector< const Node * > elem_nodes
Definition: fe_map.h:912
virtual void compute_null_map(const unsigned int dim, const std::vector< Real > &qw)
Definition: fe_map.C:1302
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1140
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:401
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 1302 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(), and libMesh::FEMap::~FEMap().

1304 {
1305  // Start logging the map computation.
1306  LOG_SCOPE("compute_null_map()", "FEMap");
1307 
1308  const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1309 
1310  // Resize the vectors to hold data at the quadrature points
1311  this->resize_quadrature_map_vectors(dim, n_qp);
1312 
1313  // Compute "fake" xyz
1314  for (unsigned int p=1; p<n_qp; p++)
1315  {
1316  if (calculate_xyz)
1317  xyz[p].zero();
1318 
1319  if (calculate_dxyz)
1320  {
1321  dxyzdxi_map[p] = 0;
1322  dxidx_map[p] = 0;
1323  dxidy_map[p] = 0;
1324  dxidz_map[p] = 0;
1325  }
1326 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1327  if (calculate_d2xyz)
1328  {
1329  d2xyzdxi2_map[p] = 0;
1330  }
1331 #endif
1332  if (dim > 1)
1333  {
1334  if (calculate_dxyz)
1335  {
1336  dxyzdeta_map[p] = 0;
1337  detadx_map[p] = 0;
1338  detady_map[p] = 0;
1339  detadz_map[p] = 0;
1340  }
1341 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1342  if (calculate_d2xyz)
1343  {
1344  d2xyzdxideta_map[p] = 0.;
1345  d2xyzdeta2_map[p] = 0.;
1346  }
1347 #endif
1348  if (dim > 2)
1349  {
1350  if (calculate_dxyz)
1351  {
1352  dxyzdzeta_map[p] = 0;
1353  dzetadx_map[p] = 0;
1354  dzetady_map[p] = 0;
1355  dzetadz_map[p] = 0;
1356  }
1357 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1358  if (calculate_d2xyz)
1359  {
1360  d2xyzdxidzeta_map[p] = 0;
1361  d2xyzdetadzeta_map[p] = 0;
1362  d2xyzdzeta2_map[p] = 0;
1363  }
1364 #endif
1365  }
1366  }
1367  if (calculate_dxyz)
1368  {
1369  jac[p] = 1;
1370  JxW[p] = qw[p];
1371  }
1372  }
1373 }
bool calculate_dxyz
Definition: fe_map.h:888
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:675
std::vector< Real > dzetady_map
Definition: fe_map.h:727
std::vector< Real > dxidz_map
Definition: fe_map.h:695
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:649
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
std::vector< Real > dzetadx_map
Definition: fe_map.h:721
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:655
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:643
std::vector< Real > dzetadz_map
Definition: fe_map.h:733
bool calculate_d2xyz
Definition: fe_map.h:893
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:669
std::vector< Real > dxidx_map
Definition: fe_map.h:683
bool calculate_xyz
Definition: fe_map.h:883
std::vector< Real > dxidy_map
Definition: fe_map.h:689
std::vector< Real > JxW
Definition: fe_map.h:872
std::vector< Point > xyz
Definition: fe_map.h:619
std::vector< Real > detady_map
Definition: fe_map.h:708
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
Definition: fe_map.C:1140
std::vector< Real > jac
Definition: fe_map.h:867
std::vector< Real > detadz_map
Definition: fe_map.h:714
std::vector< Real > detadx_map
Definition: fe_map.h:702
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:663
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 401 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::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(), libMesh::FEMap::compute_map(), and libMesh::FEMap::~FEMap().

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

Determine which values are to be calculated

Definition at line 528 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculate_dxyz, libMesh::FEMap::calculations_started, and libMesh::FEMap::resize_quadrature_map_vectors().

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().

528  {
529  calculations_started = true;
530 
531 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
532  // Second derivative calculations currently have first derivative
533  // calculations as a prerequisite
534  if (calculate_d2xyz)
535  calculate_dxyz = true;
536 #endif
537  }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
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 574 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().

574 { return dxyzdeta_map[p](0); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
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 550 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().

550 { return dxyzdxi_map[p](0); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
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 598 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

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

598 { return dxyzdzeta_map[p](0); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
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 582 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().

582 { return dxyzdeta_map[p](1); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
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 558 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().

558 { return dxyzdxi_map[p](1); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
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 606 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

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

606 { return dxyzdzeta_map[p](1); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
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 590 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().

590 { return dxyzdeta_map[p](2); }
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
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 566 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().

566 { return dxyzdxi_map[p](2); }
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
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 614 of file fe_map.h.

References libMesh::FEMap::dxyzdzeta_map.

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

614 { return dxyzdzeta_map[p](2); }
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
const std::vector<Real>& libMesh::FEMap::get_curvatures ( ) const
inlineinherited
Returns
The curvatures for use in face integration.

Definition at line 381 of file fe_map.h.

References libMesh::FEMap::calculate_d2xyz, libMesh::FEMap::calculations_started, libMesh::FEMap::curvatures, libMesh::FEMap::print_JxW(), and libMesh::FEMap::print_xyz().

382  { libmesh_assert(!calculations_started || calculate_d2xyz);
383  calculate_d2xyz = true; return curvatures;}
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< Real > curvatures
Definition: fe_map.h:862
const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2etadxyz2 ( ) const
inlineinherited

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

Definition at line 318 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().

319  { libmesh_assert(!calculations_started || calculate_d2xyz);
320  calculate_d2xyz = true; return d2etadxyz2_map; }
std::vector< std::vector< Real > > d2etadxyz2_map
Definition: fe_map.h:746
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phideta2_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 494 of file fe_map.h.

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

495  { libmesh_assert(!calculations_started || calculate_d2xyz);
496  calculate_d2xyz = true; return d2phideta2_map; }
std::vector< std::vector< Real > > d2phideta2_map
Definition: fe_map.h:795
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidetadzeta_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 501 of file fe_map.h.

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

502  { libmesh_assert(!calculations_started || calculate_d2xyz);
503  calculate_d2xyz = true; return d2phidetadzeta_map; }
std::vector< std::vector< Real > > d2phidetadzeta_map
Definition: fe_map.h:800
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxi2_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 473 of file fe_map.h.

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

474  { libmesh_assert(!calculations_started || calculate_d2xyz);
475  calculate_d2xyz = true; return d2phidxi2_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > d2phidxi2_map
Definition: fe_map.h:780
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxideta_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 480 of file fe_map.h.

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

481  { libmesh_assert(!calculations_started || calculate_d2xyz);
482  calculate_d2xyz = true; return d2phidxideta_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > d2phidxideta_map
Definition: fe_map.h:785
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidxidzeta_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 487 of file fe_map.h.

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

488  { libmesh_assert(!calculations_started || calculate_d2xyz);
489  calculate_d2xyz = true; return d2phidxidzeta_map; }
std::vector< std::vector< Real > > d2phidxidzeta_map
Definition: fe_map.h:790
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_d2phidzeta2_map ( )
inlineinherited
Returns
The reference to physical map 2nd derivative

Definition at line 508 of file fe_map.h.

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

509  { libmesh_assert(!calculations_started || calculate_d2xyz);
510  calculate_d2xyz = true; return d2phidzeta2_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > d2phidzeta2_map
Definition: fe_map.h:805
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 437 of file fe_map.h.

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

438  { libmesh_assert(!calculations_started || calculate_d2xyz);
439  calculate_d2xyz = true; return d2psideta2_map; }
std::vector< std::vector< Real > > d2psideta2_map
Definition: fe_map.h:845
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
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 423 of file fe_map.h.

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

424  { libmesh_assert(!calculations_started || calculate_d2xyz);
425  calculate_d2xyz = true; return d2psidxi2_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > d2psidxi2_map
Definition: fe_map.h:831
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 430 of file fe_map.h.

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

431  { libmesh_assert(!calculations_started || calculate_d2xyz);
432  calculate_d2xyz = true; return d2psidxideta_map; }
std::vector< std::vector< Real > > d2psidxideta_map
Definition: fe_map.h:838
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2xidxyz2 ( ) const
inlineinherited

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

Definition at line 311 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().

312  { libmesh_assert(!calculations_started || calculate_d2xyz);
313  calculate_d2xyz = true; return d2xidxyz2_map; }
std::vector< std::vector< Real > > d2xidxyz2_map
Definition: fe_map.h:740
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdeta2 ( ) const
inlineinherited
Returns
The second partial derivatives in eta.

Definition at line 195 of file fe_map.h.

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

196  { libmesh_assert(!calculations_started || calculate_d2xyz);
197  calculate_d2xyz = true; return d2xyzdeta2_map; }
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:655
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdetadzeta ( ) const
inlineinherited
Returns
The second partial derivatives in eta-zeta.

Definition at line 229 of file fe_map.h.

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

230  { libmesh_assert(!calculations_started || calculate_d2xyz);
231  calculate_d2xyz = true; return d2xyzdetadzeta_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:669
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxi2 ( ) const
inlineinherited
Returns
The second partial derivatives in xi.

Definition at line 188 of file fe_map.h.

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

189  { libmesh_assert(!calculations_started || calculate_d2xyz);
190  calculate_d2xyz = true; return d2xyzdxi2_map; }
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:643
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxideta ( ) const
inlineinherited
Returns
The second partial derivatives in xi-eta.

Definition at line 213 of file fe_map.h.

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

214  { libmesh_assert(!calculations_started || calculate_d2xyz);
215  calculate_d2xyz = true; return d2xyzdxideta_map; }
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:649
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdxidzeta ( ) const
inlineinherited
Returns
The second partial derivatives in xi-zeta.

Definition at line 222 of file fe_map.h.

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

223  { libmesh_assert(!calculations_started || calculate_d2xyz);
224  calculate_d2xyz = true; return d2xyzdxidzeta_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:663
const std::vector<RealGradient>& libMesh::FEMap::get_d2xyzdzeta2 ( ) const
inlineinherited
Returns
The second partial derivatives in zeta.

Definition at line 204 of file fe_map.h.

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

205  { libmesh_assert(!calculations_started || calculate_d2xyz);
206  calculate_d2xyz = true; return d2xyzdzeta2_map; }
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:675
bool calculate_d2xyz
Definition: fe_map.h:893
bool calculations_started
Definition: fe_map.h:878
const std::vector<std::vector<Real> >& libMesh::FEMap::get_d2zetadxyz2 ( ) const
inlineinherited

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

Definition at line 325 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().

326  { libmesh_assert(!calculations_started || calculate_d2xyz);
327  calculate_d2xyz = true; return d2zetadxyz2_map; }
bool calculate_d2xyz
Definition: fe_map.h:893
std::vector< std::vector< Real > > d2zetadxyz2_map
Definition: fe_map.h:752
bool calculations_started
Definition: fe_map.h:878
const std::vector<Real>& libMesh::FEMap::get_detadx ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_detady ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_detadz ( ) const
inlineinherited
const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphideta_map ( ) const
inlineinherited
Returns
The reference to physical map derivative

Definition at line 353 of file fe_map.h.

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

354  { libmesh_assert(!calculations_started || calculate_dxyz);
355  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > dphideta_map
Definition: fe_map.h:768
std::vector<std::vector<Real> >& libMesh::FEMap::get_dphideta_map ( )
inlineinherited
Returns
The reference to physical map derivative

Definition at line 458 of file fe_map.h.

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

459  { libmesh_assert(!calculations_started || calculate_dxyz);
460  calculate_dxyz = true; return dphideta_map; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > dphideta_map
Definition: fe_map.h:768
const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidxi_map ( ) const
inlineinherited
Returns
The reference to physical map derivative

Definition at line 346 of file fe_map.h.

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

347  { libmesh_assert(!calculations_started || calculate_dxyz);
348  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Definition: fe_map.h:763
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidxi_map ( )
inlineinherited
Returns
The reference to physical map derivative

Definition at line 451 of file fe_map.h.

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

452  { libmesh_assert(!calculations_started || calculate_dxyz);
453  calculate_dxyz = true; return dphidxi_map; }
std::vector< std::vector< Real > > dphidxi_map
Definition: fe_map.h:763
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
const std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidzeta_map ( ) const
inlineinherited
Returns
The reference to physical map derivative

Definition at line 360 of file fe_map.h.

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

361  { libmesh_assert(!calculations_started || calculate_dxyz);
362  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Definition: fe_map.h:773
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_dphidzeta_map ( )
inlineinherited
Returns
The reference to physical map derivative

Definition at line 465 of file fe_map.h.

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

466  { libmesh_assert(!calculations_started || calculate_dxyz);
467  calculate_dxyz = true; return dphidzeta_map; }
std::vector< std::vector< Real > > dphidzeta_map
Definition: fe_map.h:773
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsideta ( )
inlineinherited
Returns
The reference to physical map derivative for the side/edge

Definition at line 416 of file fe_map.h.

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

417  { libmesh_assert(!calculations_started || calculate_dxyz);
418  calculate_dxyz = true; return dpsideta_map; }
std::vector< std::vector< Real > > dpsideta_map
Definition: fe_map.h:824
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector<std::vector<Real> >& libMesh::FEMap::get_dpsidxi ( )
inlineinherited
Returns
The reference to physical map derivative for the side/edge

Definition at line 409 of file fe_map.h.

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

410  { libmesh_assert(!calculations_started || calculate_dxyz);
411  calculate_dxyz = true; return dpsidxi_map; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Real > > dpsidxi_map
Definition: fe_map.h:818
const std::vector<Real>& libMesh::FEMap::get_dxidy ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_dxidz ( ) const
inlineinherited
const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdeta ( ) const
inlineinherited
Returns
The element tangents in eta-direction at the quadrature points.

Definition at line 173 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().

174  { libmesh_assert(!calculations_started || calculate_dxyz);
175  calculate_dxyz = true; return dxyzdeta_map; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdxi ( ) const
inlineinherited
Returns
The element tangents in xi-direction at the quadrature points.

Definition at line 165 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().

166  { libmesh_assert(!calculations_started || calculate_dxyz);
167  calculate_dxyz = true; return dxyzdxi_map; }
bool calculate_dxyz
Definition: fe_map.h:888
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
bool calculations_started
Definition: fe_map.h:878
const std::vector<RealGradient>& libMesh::FEMap::get_dxyzdzeta ( ) const
inlineinherited
Returns
The element tangents in zeta-direction at the quadrature points.

Definition at line 181 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().

182  { libmesh_assert(!calculations_started || calculate_dxyz);
183  calculate_dxyz = true; return dxyzdzeta_map; }
bool calculate_dxyz
Definition: fe_map.h:888
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
bool calculations_started
Definition: fe_map.h:878
const std::vector<Real>& libMesh::FEMap::get_dzetadx ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_dzetady ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_dzetadz ( ) const
inlineinherited
const std::vector<Real>& libMesh::FEMap::get_jacobian ( ) const
inlineinherited
Returns
The element Jacobian for each quadrature point.

Definition at line 149 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().

150  { libmesh_assert(!calculations_started || calculate_dxyz);
151  calculate_dxyz = true; return jac; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< Real > jac
Definition: fe_map.h:867
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 157 of file fe_map.h.

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

158  { libmesh_assert(!calculations_started || calculate_dxyz);
159  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< Real > JxW
Definition: fe_map.h:872
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 519 of file fe_map.h.

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

520  { libmesh_assert(!calculations_started || calculate_dxyz);
521  calculate_dxyz = true; return JxW; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< Real > JxW
Definition: fe_map.h:872
const std::vector<Point>& libMesh::FEMap::get_normals ( ) const
inlineinherited
Returns
The outward pointing normal vectors for face integration.

Definition at line 374 of file fe_map.h.

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

375  { libmesh_assert(!calculations_started || calculate_dxyz);
376  calculate_dxyz = true; return normals; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< Point > normals
Definition: fe_map.h:855
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 339 of file fe_map.h.

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

340  { libmesh_assert(!calculations_started || calculate_xyz);
341  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:758
bool calculations_started
Definition: fe_map.h:878
bool calculate_xyz
Definition: fe_map.h:883
std::vector<std::vector<Real> >& libMesh::FEMap::get_phi_map ( )
inlineinherited
Returns
The reference to physical map for the element

Definition at line 444 of file fe_map.h.

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

445  { libmesh_assert(!calculations_started || calculate_xyz);
446  calculate_xyz = true; return phi_map; }
std::vector< std::vector< Real > > phi_map
Definition: fe_map.h:758
bool calculations_started
Definition: fe_map.h:878
bool calculate_xyz
Definition: fe_map.h:883
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 333 of file fe_map.h.

References libMesh::FEMap::psi_map.

334  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:812
std::vector<std::vector<Real> >& libMesh::FEMap::get_psi ( )
inlineinherited
Returns
The reference to physical map for the side/edge

Definition at line 403 of file fe_map.h.

References libMesh::FEMap::psi_map.

404  { return psi_map; }
std::vector< std::vector< Real > > psi_map
Definition: fe_map.h:812
const std::vector<std::vector<Point> >& libMesh::FEMap::get_tangents ( ) const
inlineinherited
Returns
The tangent vectors for face integration.

Definition at line 367 of file fe_map.h.

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

368  { libmesh_assert(!calculations_started || calculate_dxyz);
369  calculate_dxyz = true; return tangents; }
bool calculate_dxyz
Definition: fe_map.h:888
bool calculations_started
Definition: fe_map.h:878
std::vector< std::vector< Point > > tangents
Definition: fe_map.h:850
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 142 of file fe_map.h.

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

143  { libmesh_assert(!calculations_started || calculate_xyz);
144  calculate_xyz = true; return xyz; }
bool calculations_started
Definition: fe_map.h:878
bool calculate_xyz
Definition: fe_map.h:883
std::vector< Point > xyz
Definition: fe_map.h:619
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 513 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().

Referenced by libMesh::FEMap::compute_edge_map(), and libMesh::FEMap::~FEMap().

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

Referenced by libMesh::FEMap::compute_edge_map(), and libMesh::FEMap::~FEMap().

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

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

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

Prints the Jacobian times the weight for each quadrature point.

Definition at line 1428 of file fe_map.C.

References libMesh::FEMap::JxW.

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

1429 {
1430  for (std::size_t i=0; i<JxW.size(); ++i)
1431  os << " [" << i << "]: " << JxW[i] << std::endl;
1432 }
std::vector< Real > JxW
Definition: fe_map.h:872
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 1436 of file fe_map.C.

References libMesh::FEMap::xyz.

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

1437 {
1438  for (std::size_t i=0; i<xyz.size(); ++i)
1439  os << " [" << i << "]: " << xyz[i];
1440 }
std::vector< Point > xyz
Definition: fe_map.h:619
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 1140 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::FEMap::jac, libMesh::FEMap::JxW, and libMesh::FEMap::xyz.

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

1141 {
1142  // We're calculating now!
1143  this->determine_calculations();
1144 
1145  // Resize the vectors to hold data at the quadrature points
1146  if (calculate_xyz)
1147  xyz.resize(n_qp);
1148  if (calculate_dxyz)
1149  {
1150  dxyzdxi_map.resize(n_qp);
1151  dxidx_map.resize(n_qp);
1152  dxidy_map.resize(n_qp); // 1D element may live in 2D ...
1153  dxidz_map.resize(n_qp); // ... or 3D
1154  }
1155 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1156  if (calculate_d2xyz)
1157  {
1158  d2xyzdxi2_map.resize(n_qp);
1159 
1160  // Inverse map second derivatives
1161  d2xidxyz2_map.resize(n_qp);
1162  for (std::size_t i=0; i<d2xidxyz2_map.size(); ++i)
1163  d2xidxyz2_map[i].assign(6, 0.);
1164  }
1165 #endif
1166  if (dim > 1)
1167  {
1168  if (calculate_dxyz)
1169  {
1170  dxyzdeta_map.resize(n_qp);
1171  detadx_map.resize(n_qp);
1172  detady_map.resize(n_qp);
1173  detadz_map.resize(n_qp);
1174  }
1175 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1176  if (calculate_d2xyz)
1177  {
1178  d2xyzdxideta_map.resize(n_qp);
1179  d2xyzdeta2_map.resize(n_qp);
1180 
1181  // Inverse map second derivatives
1182  d2etadxyz2_map.resize(n_qp);
1183  for (std::size_t i=0; i<d2etadxyz2_map.size(); ++i)
1184  d2etadxyz2_map[i].assign(6, 0.);
1185  }
1186 #endif
1187  if (dim > 2)
1188  {
1189  if (calculate_dxyz)
1190  {
1191  dxyzdzeta_map.resize (n_qp);
1192  dzetadx_map.resize (n_qp);
1193  dzetady_map.resize (n_qp);
1194  dzetadz_map.resize (n_qp);
1195  }
1196 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
1197  if (calculate_d2xyz)
1198  {
1199  d2xyzdxidzeta_map.resize(n_qp);
1200  d2xyzdetadzeta_map.resize(n_qp);
1201  d2xyzdzeta2_map.resize(n_qp);
1202 
1203  // Inverse map second derivatives
1204  d2zetadxyz2_map.resize(n_qp);
1205  for (std::size_t i=0; i<d2zetadxyz2_map.size(); ++i)
1206  d2zetadxyz2_map[i].assign(6, 0.);
1207  }
1208 #endif
1209  }
1210  }
1211 
1212  if (calculate_dxyz)
1213  {
1214  jac.resize(n_qp);
1215  JxW.resize(n_qp);
1216  }
1217 }
std::vector< std::vector< Real > > d2etadxyz2_map
Definition: fe_map.h:746
bool calculate_dxyz
Definition: fe_map.h:888
std::vector< RealGradient > d2xyzdzeta2_map
Definition: fe_map.h:675
std::vector< Real > dzetady_map
Definition: fe_map.h:727
std::vector< std::vector< Real > > d2xidxyz2_map
Definition: fe_map.h:740
std::vector< Real > dxidz_map
Definition: fe_map.h:695
std::vector< RealGradient > d2xyzdxideta_map
Definition: fe_map.h:649
std::vector< RealGradient > dxyzdzeta_map
Definition: fe_map.h:637
std::vector< Real > dzetadx_map
Definition: fe_map.h:721
std::vector< RealGradient > dxyzdxi_map
Definition: fe_map.h:625
std::vector< RealGradient > d2xyzdeta2_map
Definition: fe_map.h:655
std::vector< RealGradient > d2xyzdxi2_map
Definition: fe_map.h:643
std::vector< Real > dzetadz_map
Definition: fe_map.h:733
bool calculate_d2xyz
Definition: fe_map.h:893
std::vector< std::vector< Real > > d2zetadxyz2_map
Definition: fe_map.h:752
std::vector< RealGradient > d2xyzdetadzeta_map
Definition: fe_map.h:669
std::vector< Real > dxidx_map
Definition: fe_map.h:683
bool calculate_xyz
Definition: fe_map.h:883
std::vector< Real > dxidy_map
Definition: fe_map.h:689
std::vector< Real > JxW
Definition: fe_map.h:872
std::vector< Point > xyz
Definition: fe_map.h:619
std::vector< Real > detady_map
Definition: fe_map.h:708
std::vector< RealGradient > dxyzdeta_map
Definition: fe_map.h:631
void determine_calculations()
Definition: fe_map.h:528
std::vector< Real > jac
Definition: fe_map.h:867
std::vector< Real > detadz_map
Definition: fe_map.h:714
std::vector< Real > detadx_map
Definition: fe_map.h:702
std::vector< RealGradient > d2xyzdxidzeta_map
Definition: fe_map.h:663

Member Data Documentation

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 878 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().

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 862 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().

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 746 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().

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

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

Definition at line 795 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().

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 800 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().

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

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

Definition at line 780 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().

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 785 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().

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 790 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().

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

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

Definition at line 805 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().

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 845 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().

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 831 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().

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 838 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().

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 740 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().

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 669 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().

std::vector<RealGradient> libMesh::FEMap::d2xyzdxideta_map
protectedinherited
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 663 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().

std::vector<RealGradient> libMesh::FEMap::d2xyzdzeta2_map
protectedinherited
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 752 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().

std::vector<Real> libMesh::FEMap::detadx_map
protectedinherited
std::vector<Real> libMesh::FEMap::detady_map
protectedinherited
std::vector<Real> libMesh::FEMap::detadz_map
protectedinherited
std::vector<std::vector<Real> > libMesh::FEMap::dphideta_map
protectedinherited

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

Definition at line 768 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().

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

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

Definition at line 763 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().

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

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

Definition at line 773 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().

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 824 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().

std::vector<std::vector<Real> > libMesh::FEMap::dpsidxi_map
protectedinherited
std::vector<Real> libMesh::FEMap::dxidx_map
protectedinherited
std::vector<Real> libMesh::FEMap::dxidy_map
protectedinherited
std::vector<Real> libMesh::FEMap::dxidz_map
protectedinherited
std::vector<RealGradient> libMesh::FEMap::dxyzdzeta_map
protectedinherited
std::vector<Real> libMesh::FEMap::dzetadx_map
protectedinherited
std::vector<Real> libMesh::FEMap::dzetady_map
protectedinherited
std::vector<Real> libMesh::FEMap::dzetadz_map
protectedinherited
std::vector<Real> libMesh::FEMap::jac
protectedinherited
std::vector<Point> libMesh::FEMap::normals
protectedinherited

Normal vectors on boundary at quadrature points

Definition at line 855 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().

std::vector<std::vector<Real> > libMesh::FEMap::phi_map
protectedinherited
std::vector<std::vector<Real> > libMesh::FEMap::psi_map
protectedinherited
std::vector<std::vector<Point> > libMesh::FEMap::tangents
protectedinherited

Tangent vectors on boundary at quadrature points.

Definition at line 850 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().


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