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());
475 xyz[p] = *elem_nodes[0];
493 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 508 const Point & elem_point = *elem_nodes[i];
511 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
514 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 547 static bool failing =
false;
555 libmesh_error_msg(
"ERROR: negative Jacobian " \
566 libmesh_error_msg(
"ERROR: negative Jacobian " \
568 <<
" at point index " \
598 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 605 #elif LIBMESH_DIM == 2 624 static bool failing =
false;
630 libmesh_error_msg(
"Encountered invalid 1D element!");
650 #elif LIBMESH_DIM == 3 671 static bool failing =
false;
677 libmesh_error_msg(
"Encountered invalid 1D element!");
705 #endif //LIBMESH_DIM == 3 708 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 731 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 750 const Point & elem_point = *elem_nodes[i];
753 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
760 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 788 jac[p] = (dx_dxi*dy_deta - dx_deta*dy_dxi);
795 static bool failing =
false;
803 libmesh_error_msg(
"ERROR: negative Jacobian " \
814 libmesh_error_msg(
"ERROR: negative Jacobian " \
816 <<
" at point index " \
835 const Real inv_jac = 1./
jac[p];
844 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 845 if (compute_second_derivatives)
848 #else // LIBMESH_DIM == 3 875 const Real g11 = (dx_dxi*dx_dxi +
879 const Real g12 = (dx_dxi*dx_deta +
883 const Real g21 = g12;
885 const Real g22 = (dx_deta*dx_deta +
889 const Real det = (g11*g22 - g12*g21);
896 thread_local
bool failing =
false;
905 libmesh_error_msg(
"ERROR: negative Jacobian " \
916 libmesh_error_msg(
"ERROR: negative Jacobian " \
918 <<
" at point index " \
933 const Real inv_det = 1./det;
934 jac[p] = std::sqrt(det);
938 const Real g11inv = g22*inv_det;
939 const Real g12inv = -g12*inv_det;
940 const Real g21inv = -g21*inv_det;
941 const Real g22inv = g11*inv_det;
943 dxidx_map[p] = g11inv*dx_dxi + g12inv*dx_deta;
944 dxidy_map[p] = g11inv*dy_dxi + g12inv*dy_deta;
945 dxidz_map[p] = g11inv*dz_dxi + g12inv*dz_deta;
947 detadx_map[p] = g21inv*dx_dxi + g22inv*dx_deta;
948 detady_map[p] = g21inv*dy_dxi + g22inv*dy_deta;
949 detadz_map[p] = g21inv*dz_dxi + g22inv*dz_deta;
951 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 970 JT(0,0) = dx_dxi; JT(0,1) = dy_dxi; JT(0,2) = dz_dxi;
971 JT(1,0) = dx_deta; JT(1,1) = dy_deta; JT(1,2) = dz_deta;
975 JTJinv(0,0) = g11inv; JTJinv(0,1) = g12inv;
976 JTJinv(1,0) = g21inv; JTJinv(1,1) = g22inv;
991 for (
unsigned s=0; s<3; ++s)
992 for (
unsigned t=s; t<3; ++t)
995 tmp1(0) = dxi(s)*dxi(t);
996 tmp1(1) = deta(s)*deta(t);
1002 Real alpha = dxi(s)*deta(t) + deta(s)*dxi(t);
1005 for (
unsigned i=0; i<3; ++i)
1009 JT.vector_mult(tmp3, tmp2);
1023 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 1025 #endif // LIBMESH_DIM == 3 1050 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1076 const Point & elem_point = *elem_nodes[i];
1079 xyz[p].add_scaled (elem_point,
phi_map[i][p] );
1086 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1123 jac[p] = (dx_dxi*(dy_deta*dz_dzeta - dz_deta*dy_dzeta) +
1124 dy_dxi*(dz_deta*dx_dzeta - dx_deta*dz_dzeta) +
1125 dz_dxi*(dx_deta*dy_dzeta - dy_deta*dx_dzeta));
1132 static bool failing =
false;
1140 libmesh_error_msg(
"ERROR: negative Jacobian " \
1151 libmesh_error_msg(
"ERROR: negative Jacobian " \
1153 <<
" at point index " \
1172 const Real inv_jac = 1./
jac[p];
1174 dxidx_map[p] = (dy_deta*dz_dzeta - dz_deta*dy_dzeta)*inv_jac;
1175 dxidy_map[p] = (dz_deta*dx_dzeta - dx_deta*dz_dzeta)*inv_jac;
1176 dxidz_map[p] = (dx_deta*dy_dzeta - dy_deta*dx_dzeta)*inv_jac;
1178 detadx_map[p] = (dz_dxi*dy_dzeta - dy_dxi*dz_dzeta )*inv_jac;
1179 detady_map[p] = (dx_dxi*dz_dzeta - dz_dxi*dx_dzeta )*inv_jac;
1180 detadz_map[p] = (dy_dxi*dx_dzeta - dx_dxi*dy_dzeta )*inv_jac;
1182 dzetadx_map[p] = (dy_dxi*dz_deta - dz_dxi*dy_deta )*inv_jac;
1183 dzetady_map[p] = (dz_dxi*dx_deta - dx_dxi*dz_deta )*inv_jac;
1184 dzetadz_map[p] = (dx_dxi*dy_deta - dy_dxi*dx_deta )*inv_jac;
1187 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1188 if (compute_second_derivatives)
1196 libmesh_error_msg(
"Invalid dim = " <<
dim);
1217 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1237 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1258 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1284 const std::vector<Real> & qw,
1288 LOG_SCOPE(
"compute_affine_map()",
"FEMap");
1292 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1300 for (
unsigned int i=0; i<
n_nodes; i++)
1308 for (
unsigned int p=1; p<n_qp; p++)
1317 for (
unsigned int p=1; p<n_qp; p++)
1323 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1334 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1347 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1358 JxW[p] =
JxW[0] / qw[0] * qw[p];
1365 const std::vector<Real> & qw)
1368 LOG_SCOPE(
"compute_null_map()",
"FEMap");
1370 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1376 for (
unsigned int p=1; p<n_qp; p++)
1388 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1403 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1419 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1440 const std::vector<Real> & qw,
1442 bool calculate_d2phi)
1455 #ifndef LIBMESH_ENABLE_SECOND_DERIVATIVES 1460 LOG_SCOPE(
"compute_map()",
"FEMap");
1464 const unsigned int n_qp = cast_int<unsigned int>(qw.size());
1473 libmesh_assert_equal_to (
dim, 2);
1486 for (
unsigned int p=0; p!=n_qp; p++)
1495 os <<
" [" << i <<
"]: " <<
JxW[i] << std::endl;
1503 os <<
" [" << i <<
"]: " <<
xyz[i];
1510 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1513 std::set<unsigned> valid_indices;
1537 valid_indices.insert(0);
1539 #elif LIBMESH_DIM==2 1559 const unsigned tmp[3] = {0,1,3};
1560 valid_indices.insert(tmp, tmp+3);
1562 #elif LIBMESH_DIM==3 1582 const unsigned tmp[6] = {0,1,2,3,4,5};
1583 valid_indices.insert(tmp, tmp+6);
1590 for (
unsigned s=0; s<3; ++s)
1591 for (
unsigned t=s; t<3; ++t)
1593 if (valid_indices.count(ctr))
1600 v2(dxi(s)*deta(t) + deta(s)*dxi(t),
1601 dxi(s)*dzeta(t) + dzeta(s)*dxi(t),
1602 deta(s)*dzeta(t) + dzeta(s)*deta(t));
1610 if (LIBMESH_DIM > 1)
1613 if (LIBMESH_DIM > 2)
1623 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 1630 const Point & physical_point,
1631 const Real tolerance,
1638 libmesh_assert_greater_equal (tolerance, 0.);
1642 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 1652 LOG_SCOPE(
"inverse_map()",
"FEMap");
1656 Real inverse_map_error = 0.;
1669 unsigned int cnt = 0;
1673 const unsigned int max_cnt = 10;
1688 const Point delta = physical_point - physical_guess;
1731 const Real G = dxi*dxi;
1734 libmesh_assert_greater (G, 0.);
1736 const Real Ginv = 1./G;
1738 const Real dxidelta = dxi*delta;
1740 dp(0) = Ginv*dxidelta;
1780 G11 = dxi*dxi, G12 = dxi*deta,
1781 G21 = dxi*deta, G22 = deta*deta;
1784 const Real det = (G11*G22 - G12*G21);
1787 libmesh_assert_not_equal_to (det, 0.);
1789 const Real inv_det = 1./det;
1792 Ginv11 = G22*inv_det,
1793 Ginv12 = -G12*inv_det,
1795 Ginv21 = -G21*inv_det,
1796 Ginv22 = G11*inv_det;
1799 const Real dxidelta = dxi*delta;
1800 const Real detadelta = deta*delta;
1802 dp(0) = (Ginv11*dxidelta + Ginv12*detadelta);
1803 dp(1) = (Ginv21*dxidelta + Ginv22*detadelta);
1844 dxi(1), deta(1), dzeta(1),
1845 dxi(2), deta(2), dzeta(2)).solve(delta, dp);
1851 const unsigned int local_singular_node =
1855 libmesh_assert_less(local_singular_node, elem->
n_nodes());
1870 libMesh::err <<
"ERROR: Newton scheme encountered a singular Jacobian in element: " 1876 libmesh_error_msg(
"Exiting...");
1880 for (
unsigned int i=0; i !=
dim; ++i)
1897 libmesh_error_msg(
"Invalid dim = " <<
dim);
1903 inverse_map_error = dp.
norm();
1932 libMesh::err <<
"WARNING: Newton scheme has not converged in " 1933 << cnt <<
" iterations:" << std::endl
1934 <<
" physical_point=" 1936 <<
" physical_guess=" 1942 <<
" error=" << inverse_map_error
1943 <<
" in element " << elem->
id()
1950 libmesh_do_once(
libMesh::err <<
"WARNING: At least one element took more than " 1952 <<
" iterations to converge in inverse_map()...\n" 1953 <<
"Rerun in devel/dbg mode for more details." 1958 if (cnt > 2*max_cnt)
1960 libMesh::err <<
"ERROR: Newton scheme FAILED to converge in " 1962 <<
" iterations in element " 1964 <<
" for physical point = " 1970 libmesh_error_msg(
"Exiting...");
1978 for (
unsigned int i=0; i !=
dim; ++i)
1985 while (inverse_map_error > tolerance);
1998 const Point diff = physical_point - check;
2000 if (diff.
norm() > tolerance)
2020 libMesh::err <<
"WARNING: inverse_map of physical point " 2022 <<
" is not on element." <<
'\n';
2036 const std::vector<Point> & physical_points,
2037 std::vector<Point> & reference_points,
2038 const Real tolerance,
2040 const bool extra_checks)
2042 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 2054 const std::size_t n_points = physical_points.size();
2058 reference_points.resize(n_points);
2062 for (std::size_t p=0; p<n_points; p++)
2063 reference_points[p] =
2064 inverse_map (
dim, elem, physical_points[p], tolerance, secure, extra_checks);
2071 const Point & reference_point)
2076 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 2094 for (
unsigned int i=0; i<n_sf; i++)
2096 shape_ptr(fe_type, elem, i, reference_point,
false));
2105 const unsigned int j,
2106 const Point & reference_point)
2112 libmesh_not_implemented();
2121 const unsigned int n_sf =
2128 for (
unsigned int i=0; i<n_sf; i++)
2130 shape_deriv_ptr(fe_type, elem, i, j, reference_point,
2139 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<0>(
const std::vector<Point> &,
const Elem *);
2140 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<1>(
const std::vector<Point> &,
const Elem *);
2141 template LIBMESH_EXPORT
void FEMap::init_reference_to_physical_map<2>(
const std::vector<Point> &,
const Elem *);
2142 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.
auto norm() const -> decltype(std::norm(T()))
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.
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.