21 #include "libmesh/fe.h" 22 #include "libmesh/elem.h" 23 #include "libmesh/libmesh_logging.h" 24 #include "libmesh/fe_interface.h" 25 #include "libmesh/fe_macro.h" 26 #include "libmesh/fe_map.h" 27 #include "libmesh/fe_xyz_map.h" 28 #include "libmesh/inf_fe_map.h" 29 #include "libmesh/mesh_subdivision_support.h" 30 #include "libmesh/dense_matrix.h" 31 #include "libmesh/dense_vector.h" 32 #include "libmesh/tensor_value.h" 33 #include "libmesh/enum_elem_type.h" 34 #include "libmesh/int_range.h" 55 libmesh_error_msg(
"Unknown mapping type " << elem.
mapping_type());
64 calculations_started(false),
66 calculate_dxyz(false),
67 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
68 calculate_d2xyz(false),
70 jacobian_tolerance(jtol)
80 return std::make_unique<FEXYZMap>();
83 return std::make_unique<FEMap>();
96 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 103 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 108 template<
unsigned int Dim>
113 LOG_SCOPE(
"init_reference_to_physical_map()",
"FEMap");
119 const std::size_t n_qp = qp.size();
130 const unsigned int n_mapping_shape_functions =
136 unsigned int old_n_qp = 0;
142 if (this->
phi_map.size() == n_mapping_shape_functions)
144 old_n_qp = n_mapping_shape_functions ? this->
phi_map[0].size() : 0;
147 this->
phi_map.resize (n_mapping_shape_functions);
153 if (this->
dphidxi_map.size() == n_mapping_shape_functions)
155 old_n_qp = n_mapping_shape_functions ? this->
dphidxi_map[0].size() : 0;
158 this->
dphidxi_map.resize (n_mapping_shape_functions);
160 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 166 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 173 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 179 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 186 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 193 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 198 if (old_n_qp != n_qp)
199 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
202 this->
phi_map[i].resize (n_qp);
207 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 223 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 239 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 242 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 266 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
271 shape_deriv_ptr(
map_fe_type, elem, i, 0, qp[0],
false);
272 for (std::size_t p=1; p<n_qp; p++)
276 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 280 shape_second_deriv_ptr(
map_fe_type, elem, i, 0, qp[0],
false);
281 for (std::size_t p=1; p<n_qp; p++)
284 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 291 std::vector<std::vector<Real>> * comps[3]
296 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 298 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
299 for (std::size_t p=0; p<n_qp; p++)
301 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 315 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
321 for (std::size_t p=1; p<n_qp; p++)
327 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 333 for (std::size_t p=1; p<n_qp; p++)
340 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 347 std::vector<std::vector<Real>> * comps[3]
352 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 354 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
355 for (std::size_t p=0; p<n_qp; p++)
361 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 376 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
384 for (std::size_t p=1; p<n_qp; p++)
391 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 401 for (std::size_t p=1; p<n_qp; p++)
411 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 418 std::vector<std::vector<Real>> * comps[3]
423 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 425 for (
unsigned int i=0; i<n_mapping_shape_functions; i++)
426 for (std::size_t p=0; p<n_qp; p++)
435 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 442 libmesh_error_msg(
"Invalid Dim = " << Dim);
449 const std::vector<Real> & qw,
452 const std::vector<const Node *> & elem_nodes,
453 bool compute_second_derivatives)
457 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES 465 libmesh_assert_equal_to(
phi_map.size(), elem_nodes.size());
467 auto check_for_degenerate_map =
475 static bool failing =
false;
479 std::string elem_info = elem->
get_info();
483 libmesh_degenerate_mapping_msg
484 (
"Jacobian " << det_J <<
" at or under tolerance " <<
486 " in element:\n" << elem_info);
492 libmesh_degenerate_mapping_msg
493 (
"Jacobian " << det_J <<
" at or under tolerance " <<
495 " in element:\n" << elem_info);
516 xyz[p] = *elem_nodes[0];
534 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 549 const Point & elem_point = *elem_nodes[i];
552 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
555 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 583 check_for_degenerate_map(
jac[p]);
600 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 607 #elif LIBMESH_DIM == 2 626 static bool failing =
false;
632 libmesh_error_msg(
"Encountered invalid 1D element!");
652 #elif LIBMESH_DIM == 3 673 static bool failing =
false;
679 libmesh_error_msg(
"Encountered invalid 1D element!");
707 #endif //LIBMESH_DIM == 3 710 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 733 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 752 const Point & elem_point = *elem_nodes[i];
755 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
762 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 790 jac[p] = (dx_dxi*dy_deta - dx_deta*dy_dxi);
792 check_for_degenerate_map(
jac[p]);
798 const Real inv_jac = 1./
jac[p];
807 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 808 if (compute_second_derivatives)
811 #else // LIBMESH_DIM == 3 838 const Real g11 = (dx_dxi*dx_dxi +
842 const Real g12 = (dx_dxi*dx_deta +
846 const Real g21 = g12;
848 const Real g22 = (dx_deta*dx_deta +
852 const Real det = (g11*g22 - g12*g21);
854 check_for_degenerate_map(det);
856 const Real inv_det = 1./det;
857 jac[p] = std::sqrt(det);
861 const Real g11inv = g22*inv_det;
862 const Real g12inv = -g12*inv_det;
863 const Real g21inv = -g21*inv_det;
864 const Real g22inv = g11*inv_det;
866 dxidx_map[p] = g11inv*dx_dxi + g12inv*dx_deta;
867 dxidy_map[p] = g11inv*dy_dxi + g12inv*dy_deta;
868 dxidz_map[p] = g11inv*dz_dxi + g12inv*dz_deta;
870 detadx_map[p] = g21inv*dx_dxi + g22inv*dx_deta;
871 detady_map[p] = g21inv*dy_dxi + g22inv*dy_deta;
872 detadz_map[p] = g21inv*dz_dxi + g22inv*dz_deta;
874 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 893 JT(0,0) = dx_dxi; JT(0,1) = dy_dxi; JT(0,2) = dz_dxi;
894 JT(1,0) = dx_deta; JT(1,1) = dy_deta; JT(1,2) = dz_deta;
898 JTJinv(0,0) = g11inv; JTJinv(0,1) = g12inv;
899 JTJinv(1,0) = g21inv; JTJinv(1,1) = g22inv;
914 for (
unsigned s=0; s<3; ++s)
915 for (
unsigned t=s; t<3; ++t)
918 tmp1(0) = dxi(s)*dxi(t);
919 tmp1(1) = deta(s)*deta(t);
925 Real alpha = dxi(s)*deta(t) + deta(s)*dxi(t);
928 for (
unsigned i=0; i<3; ++i)
932 JT.vector_mult(tmp3, tmp2);
946 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 948 #endif // LIBMESH_DIM == 3 973 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 999 const Point & elem_point = *elem_nodes[i];
1002 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
1009 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1046 jac[p] = (dx_dxi*(dy_deta*dz_dzeta - dz_deta*dy_dzeta) +
1047 dy_dxi*(dz_deta*dx_dzeta - dx_deta*dz_dzeta) +
1048 dz_dxi*(dx_deta*dy_dzeta - dy_deta*dx_dzeta));
1050 check_for_degenerate_map(
jac[p]);
1056 const Real inv_jac = 1./
jac[p];
1058 dxidx_map[p] = (dy_deta*dz_dzeta - dz_deta*dy_dzeta)*inv_jac;
1059 dxidy_map[p] = (dz_deta*dx_dzeta - dx_deta*dz_dzeta)*inv_jac;
1060 dxidz_map[p] = (dx_deta*dy_dzeta - dy_deta*dx_dzeta)*inv_jac;
1062 detadx_map[p] = (dz_dxi*dy_dzeta - dy_dxi*dz_dzeta )*inv_jac;
1063 detady_map[p] = (dx_dxi*dz_dzeta - dz_dxi*dx_dzeta )*inv_jac;
1064 detadz_map[p] = (dy_dxi*dx_dzeta - dx_dxi*dy_dzeta )*inv_jac;
1066 dzetadx_map[p] = (dy_dxi*dz_deta - dz_dxi*dy_deta )*inv_jac;
1067 dzetady_map[p] = (dz_dxi*dx_deta - dx_dxi*dz_deta )*inv_jac;
1068 dzetadz_map[p] = (dx_dxi*dy_deta - dy_dxi*dx_deta )*inv_jac;
1071 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1072 if (compute_second_derivatives)
1080 libmesh_error_msg(
"Invalid dim = " <<
dim);
1101 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1121 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1142 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1168 const std::vector<Real> & qw,
1172 LOG_SCOPE(
"compute_affine_map()",
"FEMap");
1176 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1184 for (
unsigned int i=0; i<
n_nodes; i++)
1192 for (
unsigned int p=1; p<n_qp; p++)
1201 for (
unsigned int p=1; p<n_qp; p++)
1207 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1218 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1231 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1242 JxW[p] =
JxW[0] / qw[0] * qw[p];
1249 const std::vector<Real> & qw)
1252 LOG_SCOPE(
"compute_null_map()",
"FEMap");
1254 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1260 for (
unsigned int p=1; p<n_qp; p++)
1272 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1287 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1303 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1324 const std::vector<Real> & qw,
1326 bool calculate_d2phi)
1339 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES 1344 LOG_SCOPE(
"compute_map()",
"FEMap");
1348 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1357 libmesh_assert_equal_to (
dim, 2);
1370 for (
unsigned int p=0; p!=n_qp; p++)
1379 os <<
" [" << i <<
"]: " <<
JxW[i] << std::endl;
1387 os <<
" [" << i <<
"]: " <<
xyz[i];
1394 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1397 std::set<unsigned> valid_indices;
1421 valid_indices.insert(0);
1423 #elif LIBMESH_DIM==2 1443 const unsigned tmp[3] = {0,1,3};
1444 valid_indices.insert(tmp, tmp+3);
1446 #elif LIBMESH_DIM==3 1466 const unsigned tmp[6] = {0,1,2,3,4,5};
1467 valid_indices.insert(tmp, tmp+6);
1474 for (
unsigned s=0; s<3; ++s)
1475 for (
unsigned t=s; t<3; ++t)
1477 if (valid_indices.count(ctr))
1484 v2(dxi(s)*deta(t) + deta(s)*dxi(t),
1485 dxi(s)*dzeta(t) + dzeta(s)*dxi(t),
1486 deta(s)*dzeta(t) + dzeta(s)*deta(t));
1494 if (LIBMESH_DIM > 1)
1497 if (LIBMESH_DIM > 2)
1507 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 1514 const Point & physical_point,
1515 const Real tolerance,
1522 libmesh_assert_greater_equal (tolerance, 0.);
1526 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 1536 LOG_SCOPE(
"inverse_map()",
"FEMap");
1540 Real inverse_map_error = 0.;
1553 unsigned int cnt = 0;
1557 const unsigned int max_cnt = 10;
1572 const Point delta = physical_point - physical_guess;
1615 const Real G = dxi*dxi;
1617 if (secure && G <= 0)
1618 libmesh_degenerate_mapping_msg
1619 (
"inverse_map found a singular Jacobian " <<
1620 " at master point " << p <<
" in element " <<
1623 const Real Ginv = 1./G;
1625 const Real dxidelta = dxi*delta;
1627 dp(0) = Ginv*dxidelta;
1667 G11 = dxi*dxi, G12 = dxi*deta,
1668 G21 = dxi*deta, G22 = deta*deta;
1671 const Real det = (G11*G22 - G12*G21);
1673 if (secure && det == 0)
1674 libmesh_degenerate_mapping_msg
1675 (
"inverse_map found a singular Jacobian " <<
1676 " at master point " << p <<
" in element " <<
1679 const Real inv_det = 1./det;
1682 Ginv11 = G22*inv_det,
1683 Ginv12 = -G12*inv_det,
1685 Ginv21 = -G21*inv_det,
1686 Ginv22 = G11*inv_det;
1689 const Real dxidelta = dxi*delta;
1690 const Real detadelta = deta*delta;
1692 dp(0) = (Ginv11*dxidelta + Ginv12*detadelta);
1693 dp(1) = (Ginv21*dxidelta + Ginv22*detadelta);
1734 dxi(1), deta(1), dzeta(1),
1735 dxi(2), deta(2), dzeta(2)).solve(delta, dp);
1741 const unsigned int local_singular_node =
1745 libmesh_assert_less(local_singular_node, elem->
n_nodes());
1760 libmesh_degenerate_mapping_msg(
1761 "inverse_map found a singular Jacobian" <<
1762 " at master point " << p <<
" in element " <<
1767 for (
unsigned int i=0; i !=
dim; ++i)
1784 libmesh_error_msg(
"Invalid dim = " <<
dim);
1790 inverse_map_error = dp.
norm();
1819 libMesh::err <<
"WARNING: Newton scheme has not converged in " 1820 << cnt <<
" iterations:" << std::endl
1821 <<
" physical_point=" 1823 <<
" physical_guess=" 1829 <<
" error=" << inverse_map_error
1830 <<
" in element " << elem->
id()
1837 libmesh_do_once(
libMesh::err <<
"WARNING: At least one element took more than " 1839 <<
" iterations to converge in inverse_map()...\n" 1840 <<
"Rerun in devel/dbg mode for more details." 1845 if (cnt > 2*max_cnt)
1851 libmesh_degenerate_mapping_msg(
1852 "inverse_map Newton FAILED to converge in " <<
1853 cnt <<
" iterations in element " << elem->
id() <<
1854 " for physical point = " << physical_point <<
1863 for (
unsigned int i=0; i !=
dim; ++i)
1870 while (inverse_map_error > tolerance);
1883 const Point diff = physical_point - check;
1885 if (diff.
norm() > tolerance)
1905 libMesh::err <<
"WARNING: inverse_map of physical point " 1907 <<
" is not on element." <<
'\n';
1921 const std::vector<Point> & physical_points,
1922 std::vector<Point> & reference_points,
1923 const Real tolerance,
1925 const bool extra_checks)
1927 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 1939 const std::size_t n_points = physical_points.size();
1943 reference_points.resize(n_points);
1947 for (std::size_t p=0; p<n_points; p++)
1948 reference_points[p] =
1949 inverse_map (
dim, elem, physical_points[p], tolerance, secure, extra_checks);
1956 const Point & reference_point)
1961 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 1979 for (
unsigned int i=0; i<n_sf; i++)
1981 shape_ptr(fe_type, elem, i, reference_point,
false));
1990 const unsigned int j,
1991 const Point & reference_point)
1997 libmesh_not_implemented();
2006 const unsigned int n_sf =
2013 for (
unsigned int i=0; i<n_sf; i++)
2015 shape_deriv_ptr(fe_type, elem, i, j, reference_point,
2024 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<0>(
const std::vector<Point> &,
const Elem *);
2025 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<1>(
const std::vector<Point> &,
const Elem *);
2026 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<2>(
const std::vector<Point> &,
const Elem *);
2027 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<3>(
const std::vector<Point> &,
const Elem *);
Real(* shape_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function derivative values.
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
virtual void compute_affine_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem)
Compute the jacobian and some other additional data fields.
FEFamily family
The type of finite element.
Real dzdeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
void add_scaled(const TypeVector< T2 > &, const T &)
Add a scaled value to this vector without creating a temporary.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the element.
static shape_ptr shape_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< std::vector< Real > > dphidzeta_map
Map for the derivative, d(phi)/d(zeta).
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
void compute_inverse_map_second_derivs(unsigned p)
A helper function used by FEMap::compute_single_point_map() to compute second derivatives of the inve...
virtual void compute_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem, bool calculate_d2phi)
Compute the jacobian and some other additional data fields.
std::string get_info() const
Prints relevant information about the element to a string.
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
std::vector< std::vector< Real > > dphidxi_map
Map for the derivative, d(phi)/d(xi).
std::vector< std::vector< Real > > d2etadxyz2_map
Second derivatives of "eta" reference coordinate wrt physical coordinates.
bool calculate_dxyz
Should we calculate mapping gradients?
static std::unique_ptr< FEMap > build(FEType fe_type)
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
std::vector< RealGradient > d2xyzdzeta2_map
Vector of second partial derivatives in zeta: d^2(x)/d(zeta)^2.
std::vector< Real > dzetady_map
Map for partial derivatives: d(zeta)/d(y).
std::vector< std::vector< Real > > d2xidxyz2_map
Second derivatives of "xi" reference coordinate wrt physical coordinates.
virtual bool has_affine_map() const
Real dxdeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Real dzdxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
This is the base class from which all geometric element types are derived.
std::vector< std::vector< Real > > d2phideta2_map
Map for the second derivative, d^2(phi)/d(eta)^2.
virtual bool on_reference_element(const Point &p, const Real eps=TOLERANCE) const =0
std::vector< std::vector< Real > > d2phidxidzeta_map
Map for the second derivative, d^2(phi)/d(xi)d(zeta).
std::vector< Real > dxidz_map
Map for partial derivatives: d(xi)/d(z).
std::vector< std::vector< Real > > phi_map
Map for the shape function phi.
The libMesh namespace provides an interface to certain functionality in the library.
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
virtual bool is_linear() const
std::vector< std::vector< Real > > d2phidetadzeta_map
Map for the second derivative, d^2(phi)/d(eta)d(zeta).
static Threads::spin_mutex _point_inv_err_mutex
A mutex for locking the error stream for failed point inversions.
void add(const TypeVector< T2 > &)
Add to this vector without creating a temporary.
std::vector< RealGradient > d2xyzdxideta_map
Vector of mixed second partial derivatives in xi-eta: d^2(x)/d(xi)d(eta) d^2(y)/d(xi)d(eta) d^2(z)/d(...
std::vector< RealGradient > dxyzdzeta_map
Vector of partial derivatives: d(x)/d(zeta), d(y)/d(zeta), d(z)/d(zeta)
std::vector< Real > dzetadx_map
Map for partial derivatives: d(zeta)/d(x).
std::vector< RealGradient > dxyzdxi_map
Vector of partial derivatives: d(x)/d(xi), d(y)/d(xi), d(z)/d(xi)
TensorValue< Real > RealTensorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
void libmesh_ignore(const Args &...)
const dof_id_type n_nodes
std::vector< RealGradient > d2xyzdeta2_map
Vector of second partial derivatives in eta: d^2(x)/d(eta)^2.
ElemMappingType mapping_type() const
virtual unsigned int n_nodes() const =0
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< RealGradient > d2xyzdxi2_map
Vector of second partial derivatives in xi: d^2(x)/d(xi)^2, d^2(y)/d(xi)^2, d^2(z)/d(xi)^2.
std::vector< Real > dzetadz_map
Map for partial derivatives: d(zeta)/d(z).
Real dzdzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
bool calculate_d2xyz
Should we calculate mapping hessians?
std::vector< std::vector< Real > > d2zetadxyz2_map
Second derivatives of "zeta" reference coordinate wrt physical coordinates.
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
std::vector< RealGradient > d2xyzdetadzeta_map
Vector of mixed second partial derivatives in eta-zeta: d^2(x)/d(eta)d(zeta) d^2(y)/d(eta)d(zeta) d^2...
std::vector< Real > dxidx_map
Map for partial derivatives: d(xi)/d(x).
The Tri3Subdivision element is a three-noded subdivision surface shell element used in mechanics calc...
bool calculate_xyz
Should we calculate physical point locations?
Real dxdzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
std::vector< Real > dxidy_map
Map for partial derivatives: d(xi)/d(y).
INSTANTIATE_SUBDIVISION_MAPS
Real dydzeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
static shape_deriv_ptr shape_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
std::vector< const Node * > _elem_nodes
Work vector for compute_affine_map()
void init_reference_to_physical_map(const std::vector< Point > &qp, const Elem *elem)
std::vector< Real > JxW
Jacobian*Weight values at quadrature points.
std::vector< std::vector< Real > > d2phidxideta_map
Map for the second derivative, d^2(phi)/d(xi)d(eta).
tbb::spin_mutex spin_mutex
Spin mutex.
std::vector< Point > xyz
The spatial locations of the quadrature points.
Real(* shape_ptr)(const FEType fe_t, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function values.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real dydeta_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
static shape_second_deriv_ptr shape_second_deriv_function(const unsigned int dim, const FEType &fe_t, const ElemType t)
virtual unsigned int local_singular_node(const Point &, const Real=TOLERANCE *TOLERANCE) const
const Node * node_ptr(const unsigned int i) const
virtual void compute_null_map(const unsigned int dim, const std::vector< Real > &qw)
Assign a fake jacobian and some other additional data fields.
A class representing a solver's failure to converge, to be thrown by "libmesh_convergence_failure();"...
static Point map(const unsigned int dim, const Elem *elem, const Point &reference_point)
std::vector< Real > detady_map
Map for partial derivatives: d(eta)/d(y).
virtual Point master_point(const unsigned int i) const =0
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).
std::vector< RealGradient > dxyzdeta_map
Vector of partial derivatives: d(x)/d(eta), d(y)/d(eta), d(z)/d(eta)
void resize_quadrature_map_vectors(const unsigned int dim, unsigned int n_qp)
A utility function for use by compute_*_map.
static Point map_deriv(const unsigned int dim, const Elem *elem, const unsigned int j, const Point &reference_point)
IntRange< unsigned short > node_index_range() const
Real(* shape_second_deriv_ptr)(const FEType fet, const Elem *elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
Typedef for pointer to a function that returns FE shape function second derivative values...
Real dxdxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
void determine_calculations()
Determine which values are to be calculated.
Real dydxi_map(const unsigned int p) const
Used in FEMap::compute_map(), which should be be usable in derived classes, and therefore protected...
Defines a dense vector for use in Finite Element-type computations.
virtual bool infinite() const =0
std::vector< Real > jac
Jacobian values at quadrature points.
FEFamily
defines an enum for finite element families.
std::vector< Real > detadz_map
Map for partial derivatives: d(eta)/d(z).
std::vector< std::vector< Real > > d2phidzeta2_map
Map for the second derivative, d^2(phi)/d(zeta)^2.
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
static void all_shape_derivs(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType >> *comps[3], const bool add_p_level=true)
virtual Order default_order() const =0
std::vector< std::vector< Real > > d2phidxi2_map
Map for the second derivative, d^2(phi)/d(xi)^2.
virtual ElemType type() const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.
std::vector< Real > detadx_map
Map for partial derivatives: d(eta)/d(x).
const Point & point(const unsigned int i) const
void compute_single_point_map(const unsigned int dim, const std::vector< Real > &qw, const Elem *elem, unsigned int p, const std::vector< const Node *> &elem_nodes, bool compute_second_derivatives)
Compute the jacobian and some other additional data fields at the single point with index p...
std::vector< std::vector< Real > > dphideta_map
Map for the derivative, d(phi)/d(eta).
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
void add_calculations()
Allows the user to prerequest additional calculations in between two calls to reinit();.
static void all_shapes(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &p, std::vector< std::vector< OutputType >> &phi, const bool add_p_level=true)
void vector_mult(DenseVector< T > &dest, const DenseVector< T > &arg) const
Performs the matrix-vector multiplication, dest := (*this) * arg.
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space.
static FEFamily map_fe_type(const Elem &elem)
std::vector< RealGradient > d2xyzdxidzeta_map
Vector of second partial derivatives in xi-zeta: d^2(x)/d(xi)d(zeta), d^2(y)/d(xi)d(zeta), d^2(z)/d(xi)d(zeta)
Real jacobian_tolerance
The Jacobian tolerance used for determining when the mapping fails.