578 {
580
581
582 const size_t nb_gauss_pts = getGaussPts().size2();
583 std::array<double, 9> def;
584 std::fill(def.begin(), def.end(), 0);
585
586 auto get_tag = [&](const std::string name, size_t size) {
589 MB_TAG_CREAT | MB_TAG_SPARSE,
590 def.data());
592 };
593
595
597 mat.clear();
598 for (
size_t r = 0;
r != 3; ++
r)
599 for (
size_t c = 0;
c != 3; ++
c)
601 return mat;
602 };
604 mat.clear();
605 for (
size_t r = 0;
r != 3; ++
r)
607 return mat;
608 };
610 mat.clear();
612 return mat;
613 };
614
617 &*mat.data().begin());
618 };
619
620 auto th_rot_vel = get_tag("ROT_VELOCITY", 3);
621 auto th_tau_jump = get_tag("TAU_JUMP", 1);
622 auto th_plastic_jump = get_tag("PLASTIC_STRAIN_JUMP", 9);
623 auto t_coords = getFTensor1CoordsAtGaussPts();
624 auto t_ep_jump =
625 getFTensor2SymmetricFromMat<3>(*(
commonDataPtr->plasticStrainJumpPtr));
627
628 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
629
631 velocity(
i) = (*cache).Omega(
i,
j) * t_coords(
j);
632
633 CHKERR set_tag(th_tau_jump, gg, set_scalar(t_tau_jump));
634 CHKERR set_tag(th_plastic_jump, gg, set_matrix_3d(t_ep_jump));
635 CHKERR set_tag(th_rot_vel, gg, set_vector(velocity));
636 ++t_coords;
637 ++t_ep_jump;
638 ++t_tau_jump;
639 }
640
642}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
MatrixBoundedArray< double, 9 > MatrixDouble3by3
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
const double r
rate factor
constexpr double t
plate stiffness