429 {
430 LOG_UNIT_TEST;
431
432#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
433
434 if (family == SZABAB)
435 return;
436
437 auto f = [this]() {
438 Parameters dummy;
439
440 auto d2phidx2 = this->
_fe_side->get_d2phidx2();
441 CPPUNIT_ASSERT(d2phidx2.size() > 0);
442 CPPUNIT_ASSERT_EQUAL(d2phidx2.size(), this->_dof_indices.size());
443#if LIBMESH_DIM > 1
444 auto d2phidxdy = this->
_fe_side->get_d2phidxdy();
445 CPPUNIT_ASSERT_EQUAL(d2phidxdy.size(), this->_dof_indices.size());
446 auto d2phidy2 = this->
_fe_side->get_d2phidy2();
447 CPPUNIT_ASSERT_EQUAL(d2phidy2.size(), this->_dof_indices.size());
448#endif
449#if LIBMESH_DIM > 2
450 auto d2phidxdz = this->
_fe_side->get_d2phidxdz();
451 CPPUNIT_ASSERT_EQUAL(d2phidxdz.size(), this->_dof_indices.size());
452 auto d2phidydz = this->
_fe_side->get_d2phidydz();
453 CPPUNIT_ASSERT_EQUAL(d2phidydz.size(), this->_dof_indices.size());
454 auto d2phidz2 = this->
_fe_side->get_d2phidz2();
455 CPPUNIT_ASSERT_EQUAL(d2phidz2.size(), this->_dof_indices.size());
456#endif
457
458 std::size_t n_qp = d2phidx2[0].size();
459 CPPUNIT_ASSERT(n_qp > 0);
460
461 auto xyz = this->
_fe_side->get_xyz();
462 CPPUNIT_ASSERT_EQUAL(n_qp, xyz.size());
463
464 auto normals = this->
_fe_side->get_normals();
465 CPPUNIT_ASSERT_EQUAL(n_qp, normals.size());
466
468 {
471 {
472 hess_u(0,0) += d2phidx2[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
473#if LIBMESH_DIM > 1
474 hess_u(0,1) += d2phidxdy[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
475 hess_u(1,1) += d2phidy2[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
476#endif
477#if LIBMESH_DIM > 2
478 hess_u(0,2) += d2phidxdz[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
479 hess_u(1,2) += d2phidydz[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
480 hess_u(2,2) += d2phidz2[d][qp] * (*this->
_sys->current_local_solution)(this->
_dof_indices[d]);
481#endif
482 }
483
484#if LIBMESH_DIM > 1
485 hess_u(1,0) = hess_u(0,1);
486#endif
487#if LIBMESH_DIM > 2
488 hess_u(2,0) = hess_u(0,2);
489 hess_u(2,1) = hess_u(1,2);
490#endif
491
492
493
494
495
496
497
498
499 Point n = normals[qp];
500 hess_u = tangential_hessian(hess_u, n);
501
502 if (family == RATIONAL_BERNSTEIN && order > 1)
503 return;
504
505 const Point p = xyz[qp];
507
508
509 RealTensor tangential_hess = tangential_hessian(true_hess, n);
510
511 LIBMESH_ASSERT_NUMBERS_EQUAL
512 (tangential_hess(0,0), hess_u(0,0), this->
_hess_tol);
514 {
515 LIBMESH_ASSERT_NUMBERS_EQUAL
516 (tangential_hess(0,1), hess_u(0,1), this->
_hess_tol);
517 LIBMESH_ASSERT_NUMBERS_EQUAL
518 (tangential_hess(1,1), hess_u(1,1), this->
_hess_tol);
519 }
521 {
522 LIBMESH_ASSERT_NUMBERS_EQUAL
523 (tangential_hess(0,2), hess_u(0,2), this->
_hess_tol);
524 LIBMESH_ASSERT_NUMBERS_EQUAL
525 (tangential_hess(1,2), hess_u(1,2), this->
_hess_tol);
526 LIBMESH_ASSERT_NUMBERS_EQUAL
527 (tangential_hess(2,2), hess_u(2,2), this->
_hess_tol);
528 }
529 }
530 };
531
533#endif
534 }