21 boost::shared_ptr<HMHHencky> hencky_ptr)
26 "Can not get data from block");
29 MoFEMErrorCode
doWork(
int side, EntityType type,
30 EntitiesFieldData::EntData &data) {
34 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
40 b.bulkModulusK, b.shearModulusG);
71 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
72 boost::shared_ptr<PhysicalEquations> physics_ptr) {
74 data_ptr, boost::dynamic_pointer_cast<HMHHencky>(physics_ptr)));
80 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
81 const double alpha_u);
96 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
97 const double alpha_u) {
104 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
118 std::string row_field, std::string col_field,
119 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const double alpha) {
139 boost::shared_ptr<double> total_energy_ptr);
140 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
149 boost::shared_ptr<double> total_energy_ptr) {
155 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
156 boost::shared_ptr<MatrixDouble> strain_ptr,
157 boost::shared_ptr<MatrixDouble> stress_ptr,
158 boost::shared_ptr<HMHHencky> hencky_ptr);
159 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
162 boost::shared_ptr<DataAtIntegrationPts>
170 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
171 boost::shared_ptr<PhysicalEquations> physics_ptr) {
173 data_ptr, data_ptr->getLogStretchTensorAtPts(),
174 data_ptr->getApproxPAtPts(),
175 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
179 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
180 boost::shared_ptr<PhysicalEquations> physics_ptr) {
182 data_ptr, data_ptr->getVarLogStreachPts(), data_ptr->getVarPiolaPts(),
183 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
186 MoFEMErrorCode
getOptions(boost::shared_ptr<DataAtIntegrationPts> data_ptr) {
188 PetscOptionsBegin(PETSC_COMM_WORLD,
"hencky_",
"",
"none");
190 CHKERR PetscOptionsScalar(
"-young_modulus",
"Young modulus",
"",
E, &
E,
192 CHKERR PetscOptionsScalar(
"-poisson_ratio",
"poisson ratio",
"",
nu, &
nu,
198 <<
"Hencky: E = " <<
E <<
" nu = " <<
nu;
211 (boost::format(
"%s(.*)") %
"MAT_ELASTIC").str()
223 for (
auto m : meshset_vec_ptr) {
225 std::vector<double> block_data;
226 CHKERR m->getAttributes(block_data);
227 if (block_data.size() < 2) {
229 "Expected that block has atleast two attributes");
231 auto get_block_ents = [&]() {
251 MoFEMErrorCode
getMatDPtr(boost::shared_ptr<MatrixDouble> mat_D_ptr,
252 boost::shared_ptr<MatrixDouble> mat_axiator_D_ptr,
253 boost::shared_ptr<MatrixDouble> mat_deviator_D_ptr,
257 auto set_material_stiffness = [&]() {
263 auto t_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
264 &*(mat_D_ptr->data().begin()));
265 auto t_axiator_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
266 &*mat_axiator_D_ptr->data().begin());
267 auto t_deviator_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
268 &*mat_deviator_D_ptr->data().begin());
271 t_deviator_D(
i,
j,
k,
l) =
273 t_D(
i,
j,
k,
l) = t_axiator_D(
i,
j,
k,
l) + t_deviator_D(
i,
j,
k,
l);
280 set_material_stiffness();
289 auto set_material_compilance = [&]() {
298 auto t_inv_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
299 &*(mat_inv_D_ptr->data().begin()));
300 t_inv_D(
i,
j,
k,
l) =
306 set_material_compilance();
330 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const double alpha_u)
333 CHK_MOAB_THROW(PetscOptionsGetBool(PETSC_NULLPTR,
"",
"-poly_convex",
335 "get polyconvex option failed");
341 CHKERR integratePolyconvexHencky(data);
343 CHKERR integrateHencky(data);
355 int nb_integration_pts = data.
getN().size1();
356 auto v = getVolume();
357 auto t_w = getFTensor0IntegrationWeight();
358 auto t_approx_P_adjoint_log_du =
359 getFTensor1FromMat<size_symm>(dataAtPts->adjointPdUAtPts);
360 auto t_log_stretch_h1 =
361 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
363 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
365 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
371 auto get_ftensor2 = [](
auto &
v) {
373 &
v[0], &
v[1], &
v[2], &
v[3], &
v[4], &
v[5]);
376 int nb_base_functions = data.
getN().size2();
378 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
380 auto t_nf = get_ftensor2(nF);
384 t_D(
i,
j,
k,
l) * (t_log_stretch_h1(
k,
l) + alphaU * t_dot_log_u(
k,
l));
387 a * (t_approx_P_adjoint_log_du(L) - t_L(
i,
j, L) * t_T(
i,
j));
390 for (; bb != nb_dofs / 6; ++bb) {
391 t_nf(L) -= t_row_base_fun * t_residual(L);
395 for (; bb != nb_base_functions; ++bb)
399 ++t_approx_P_adjoint_log_du;
414 int nb_integration_pts = data.
getN().size1();
415 auto v = getVolume();
416 auto t_w = getFTensor0IntegrationWeight();
417 auto t_approx_P_adjoint_log_du =
418 getFTensor1FromMat<size_symm>(dataAtPts->adjointPdUAtPts);
419 auto t_log_stretch_h1 =
420 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
422 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
424 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
430 auto get_ftensor2 = [](
auto &
v) {
432 &
v[0], &
v[1], &
v[2], &
v[3], &
v[4], &
v[5]);
435 constexpr double nohat_k = 1. / 4;
436 constexpr double hat_k = 1. / 8;
437 double mu = dataAtPts->mu;
438 double lambda = dataAtPts->lambda;
440 constexpr double third = boost::math::constants::third<double>();
444 int nb_base_functions = data.
getN().size2();
446 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
448 auto t_nf = get_ftensor2(nF);
450 double log_det = t_log_stretch_h1(
i,
i);
451 double log_det2 = log_det * log_det;
454 double dev_norm2 = t_dev(
i,
j) * t_dev(
i,
j);
457 auto A = 2 *
mu * std::exp(nohat_k * dev_norm2);
458 auto B =
lambda * std::exp(hat_k * log_det2) * log_det;
461 A * (t_dev(
k,
l) * t_diff_deviator(
k,
l,
i,
j))
469 alphaU * t_D(
i,
j,
k,
l) * t_dot_log_u(
k,
l);
473 a * (t_approx_P_adjoint_log_du(L) - t_L(
i,
j, L) * t_T(
i,
j));
476 for (; bb != nb_dofs /
size_symm; ++bb) {
477 t_nf(L) -= t_row_base_fun * t_residual(L);
481 for (; bb != nb_base_functions; ++bb)
485 ++t_approx_P_adjoint_log_du;
493 std::string row_field, std::string col_field,
494 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const double alpha)
499 CHK_MOAB_THROW(PetscOptionsGetBool(PETSC_NULLPTR,
"",
"-poly_convex",
501 "get polyconvex option failed");
510 CHKERR integratePolyconvexHencky(row_data, col_data);
512 CHKERR integrateHencky(row_data, col_data);
527 int nb_integration_pts = row_data.
getN().size1();
528 int row_nb_dofs = row_data.
getIndices().size();
529 int col_nb_dofs = col_data.
getIndices().size();
531 auto get_ftensor2 = [](MatrixDouble &
m,
const int r,
const int c) {
535 &
m(r + 0,
c + 0), &
m(r + 0,
c + 1), &
m(r + 0,
c + 2), &
m(r + 0,
c + 3),
536 &
m(r + 0,
c + 4), &
m(r + 0,
c + 5),
538 &
m(r + 1,
c + 0), &
m(r + 1,
c + 1), &
m(r + 1,
c + 2), &
m(r + 1,
c + 3),
539 &
m(r + 1,
c + 4), &
m(r + 1,
c + 5),
541 &
m(r + 2,
c + 0), &
m(r + 2,
c + 1), &
m(r + 2,
c + 2), &
m(r + 2,
c + 3),
542 &
m(r + 2,
c + 4), &
m(r + 2,
c + 5),
544 &
m(r + 3,
c + 0), &
m(r + 3,
c + 1), &
m(r + 3,
c + 2), &
m(r + 3,
c + 3),
545 &
m(r + 3,
c + 4), &
m(r + 3,
c + 5),
547 &
m(r + 4,
c + 0), &
m(r + 4,
c + 1), &
m(r + 4,
c + 2), &
m(r + 4,
c + 3),
548 &
m(r + 4,
c + 4), &
m(r + 4,
c + 5),
550 &
m(r + 5,
c + 0), &
m(r + 5,
c + 1), &
m(r + 5,
c + 2), &
m(r + 5,
c + 3),
551 &
m(r + 5,
c + 4), &
m(r + 5,
c + 5)
562 auto v = getVolume();
563 auto t_w = getFTensor0IntegrationWeight();
565 auto t_approx_P_adjoint_dstretch =
566 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
567 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
568 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
570 int row_nb_base_functions = row_data.
getN().size2();
573 auto get_dP = [&]() {
575 auto ts_a = getTSa();
577 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
579 t_dP_tmp(L,
J) = -(1 + alphaU * ts_a) *
581 ((t_D(
i,
j,
m,
n) * t_diff(
m,
n,
k,
l)) * t_L(
k,
l,
J)));
585 auto t_approx_P_adjoint_dstretch =
586 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
587 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
588 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
589 auto &nbUniq = dataAtPts->nbUniq;
591 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
592 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
597 t_sym(
i,
j) = (t_approx_P_adjoint_dstretch(
i,
j) ||
598 t_approx_P_adjoint_dstretch(
j,
i));
603 t_dP(L,
J) = t_L(
i,
j, L) *
604 ((t_diff2_uP2(
i,
j,
k,
l) + t_diff2_uP2(
k,
l,
i,
j)) *
610 ++t_approx_P_adjoint_dstretch;
615 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
616 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
617 t_dP(L,
J) = t_dP_tmp(L,
J);
622 return getFTensor2FromMat<size_symm, size_symm>(dP);
625 auto t_dP = get_dP();
626 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
630 for (; rr != row_nb_dofs / 6; ++rr) {
632 auto t_m = get_ftensor2(K, 6 * rr, 0);
633 for (
int cc = 0; cc != col_nb_dofs / 6; ++cc) {
634 const double b =
a * t_row_base_fun * t_col_base_fun;
635 t_m(L,
J) -= b * t_dP(L,
J);
642 for (; rr != row_nb_base_functions; ++rr) {
661 int nb_integration_pts = row_data.
getN().size1();
662 int row_nb_dofs = row_data.
getIndices().size();
663 int col_nb_dofs = col_data.
getIndices().size();
665 auto get_ftensor2 = [](MatrixDouble &
m,
const int r,
const int c) {
669 &
m(r + 0,
c + 0), &
m(r + 0,
c + 1), &
m(r + 0,
c + 2), &
m(r + 0,
c + 3),
670 &
m(r + 0,
c + 4), &
m(r + 0,
c + 5),
672 &
m(r + 1,
c + 0), &
m(r + 1,
c + 1), &
m(r + 1,
c + 2), &
m(r + 1,
c + 3),
673 &
m(r + 1,
c + 4), &
m(r + 1,
c + 5),
675 &
m(r + 2,
c + 0), &
m(r + 2,
c + 1), &
m(r + 2,
c + 2), &
m(r + 2,
c + 3),
676 &
m(r + 2,
c + 4), &
m(r + 2,
c + 5),
678 &
m(r + 3,
c + 0), &
m(r + 3,
c + 1), &
m(r + 3,
c + 2), &
m(r + 3,
c + 3),
679 &
m(r + 3,
c + 4), &
m(r + 3,
c + 5),
681 &
m(r + 4,
c + 0), &
m(r + 4,
c + 1), &
m(r + 4,
c + 2), &
m(r + 4,
c + 3),
682 &
m(r + 4,
c + 4), &
m(r + 4,
c + 5),
684 &
m(r + 5,
c + 0), &
m(r + 5,
c + 1), &
m(r + 5,
c + 2), &
m(r + 5,
c + 3),
685 &
m(r + 5,
c + 4), &
m(r + 5,
c + 5)
696 auto v = getVolume();
697 auto t_w = getFTensor0IntegrationWeight();
699 int row_nb_base_functions = row_data.
getN().size2();
702 auto get_dP = [&]() {
704 auto ts_a = getTSa();
706 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
708 constexpr double nohat_k = 1. / 4;
709 constexpr double hat_k = 1. / 8;
710 double mu = dataAtPts->mu;
711 double lambda = dataAtPts->lambda;
713 constexpr double third = boost::math::constants::third<double>();
717 auto t_approx_P_adjoint_dstretch =
718 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
719 auto t_log_stretch_h1 =
720 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
721 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
722 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
723 auto &nbUniq = dataAtPts->nbUniq;
725 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
726 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
728 double log_det = t_log_stretch_h1(
i,
i);
729 double log_det2 = log_det * log_det;
732 double dev_norm2 = t_dev(
i,
j) * t_dev(
i,
j);
734 auto A = 2 *
mu * std::exp(nohat_k * dev_norm2);
735 auto B =
lambda * std::exp(hat_k * log_det2) * log_det;
739 (
A * 2 * nohat_k) * (t_dev(
k,
l) * t_diff_deviator(
k,
l,
i,
j));
740 t_B_diff(
i,
j) = (
B * 2 * hat_k) * log_det *
t_kd(
i,
j) +
744 t_A_diff(
i,
j) * (t_dev(
m,
n) * t_diff_deviator(
m,
n,
k,
l))
748 A * t_diff_deviator(
m,
n,
i,
j) * t_diff_deviator(
m,
n,
k,
l)
754 t_dP(L,
J) = -t_L(
i,
j, L) *
761 (alphaU * ts_a) * (t_D(
i,
j,
m,
n) * t_diff(
m,
n,
k,
l)
771 t_sym(
i,
j) = (t_approx_P_adjoint_dstretch(
i,
j) ||
772 t_approx_P_adjoint_dstretch(
j,
i));
777 t_dP(L,
J) += t_L(
i,
j, L) *
778 ((t_diff2_uP2(
i,
j,
k,
l) + t_diff2_uP2(
k,
l,
i,
j)) *
784 ++t_approx_P_adjoint_dstretch;
790 return getFTensor2FromMat<size_symm, size_symm>(dP);
793 auto t_dP = get_dP();
794 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
798 for (; rr != row_nb_dofs / 6; ++rr) {
800 auto t_m = get_ftensor2(K, 6 * rr, 0);
801 for (
int cc = 0; cc != col_nb_dofs / 6; ++cc) {
802 const double b =
a * t_row_base_fun * t_col_base_fun;
803 t_m(L,
J) -= b * t_dP(L,
J);
810 for (; rr != row_nb_base_functions; ++rr) {
821 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
822 boost::shared_ptr<double> total_energy_ptr)
824 totalEnergyPtr(total_energy_ptr) {
828 "dataAtPts is not allocated. Please set it before "
829 "using this operator.");
843 int nb_integration_pts = getGaussPts().size2();
845 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
848 auto &mat_d = dataAtPts->matD;
851 "wrong matD size, should be 6 by 6 but is %d by %d",
size_symm,
855 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(mat_d.data().data());
857 dataAtPts->energyAtPts.resize(nb_integration_pts,
false);
858 auto t_energy = getFTensor0FromVec(dataAtPts->energyAtPts);
860 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
862 t_energy = 0.5 * (t_log_u(
i,
j) * (t_D(
i,
j,
k,
l) * t_log_u(
k,
l)));
868 if (totalEnergyPtr) {
869 auto t_w = getFTensor0IntegrationWeight();
870 auto t_energy = getFTensor0FromVec(dataAtPts->energyAtPts);
871 double loc_energy = 0;
872 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
873 loc_energy += t_energy * t_w;
877 *totalEnergyPtr += getMeasure() * loc_energy;
884 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
885 boost::shared_ptr<MatrixDouble> strain_ptr,
886 boost::shared_ptr<MatrixDouble> stress_ptr,
887 boost::shared_ptr<HMHHencky> hencky_ptr)
889 strainPtr(strain_ptr), stressPtr(stress_ptr), henckyPtr(hencky_ptr) {}
903 auto nb_integration_pts = stressPtr->size2();
905 if (nb_integration_pts != getGaussPts().size2()) {
907 "inconsistent number of integration points");
913 for (
auto &b : henckyPtr->blockData) {
915 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
916 dataAtPts->mu = b.shearModulusG;
917 dataAtPts->lambda = b.bulkModulusK - 2 * b.shearModulusG / 3;
918 CHKERR henckyPtr->getMatDPtr(
919 dataAtPts->getMatDPtr(), dataAtPts->getMatAxiatorDPtr(),
920 dataAtPts->getMatDeviatorDPtr(), b.bulkModulusK, b.shearModulusG);
921 CHKERR henckyPtr->getInvMatDPtr(dataAtPts->getMatInvDPtr(),
922 b.bulkModulusK, b.shearModulusG);
927 const auto E = henckyPtr->E;
928 const auto nu = henckyPtr->nu;
936 CHKERR henckyPtr->getMatDPtr(
937 dataAtPts->getMatDPtr(), dataAtPts->getMatAxiatorDPtr(),
946 strainPtr->resize(
size_symm, nb_integration_pts,
false);
947 auto t_strain = getFTensor2SymmetricFromMat<3>(*strainPtr);
948 auto t_stress = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*stressPtr);
949 auto t_inv_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
950 &*dataAtPts->matInvD.data().begin());
952 auto t_D = getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(
953 &*dataAtPts->matD.data().begin());
956 const double lambda = dataAtPts->lambda;
957 const double mu = dataAtPts->mu;
962 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
963 t_strain(
i,
j) = t_inv_D(
i,
j,
k,
l) * t_stress(
k,
l);
967 t_stress_symm_debug(
i,
j) = (t_stress(
i,
j) || t_stress(
j,
i)) / 2;
969 t_stress_symm_debug_diff(
i,
j) =
970 t_D(
i,
j,
k,
l) * t_strain(
k,
l) - t_stress_symm_debug(
i,
j);
972 t_stress_symm_debug_diff(
i,
j) * t_stress_symm_debug_diff(
i,
j);
973 double nrm0 = t_stress_symm_debug(
i,
j) * t_stress_symm_debug(
i,
j) +
974 std::numeric_limits<double>::epsilon();
975 constexpr double eps = 1e-10;
976 if (std::fabs(std::sqrt(nrm / nrm0)) >
eps) {
978 <<
"Stress symmetry check failed: " << std::endl
979 << t_stress_symm_debug_diff << std::endl
982 "Norm is too big: " + std::to_string(nrm / nrm0));
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define FTENSOR_INDEX(DIM, I)
static PetscErrorCode ierr
Kronecker Delta class symmetric.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getDiffDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, C &&t_S, const int nb)
Get the Diff Diff Mat object.
auto diff_deviator(FTensor::Ddg< double, 3, 3 > &&t_diff_stress)
static constexpr auto size_symm
double young_modulus
Young modulus.
double poisson_ratio
Poisson ratio.
constexpr auto field_name
FTensor::Index< 'm', 3 > m
static enum StretchSelector stretchSelector
static enum RotSelector gradApproximator
static boost::function< double(const double)> f
static boost::function< double(const double)> dd_f
static boost::function< double(const double)> d_f
Calculate energy density for Hencky material model.
boost::shared_ptr< double > totalEnergyPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
OpCalculateEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
boost::shared_ptr< MatrixDouble > strainPtr
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
boost::shared_ptr< HMHHencky > henckyPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< MatrixDouble > stressPtr
OpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< HMHHencky > hencky_ptr)
MoFEMErrorCode evaluateRhs(EntData &data)
boost::shared_ptr< HMHHencky > henckyPtr
MoFEMErrorCode evaluateLhs(EntData &data)
OpHenckyJacobian(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< HMHHencky > hencky_ptr)
boost::shared_ptr< DataAtIntegrationPts > dataAtGaussPts
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
OpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
MoFEMErrorCode integrateHencky(EntData &row_data, EntData &col_data)
MoFEMErrorCode integratePolyconvexHencky(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
MoFEMErrorCode integratePolyconvexHencky(EntData &data)
OpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
MoFEMErrorCode integrateHencky(EntData &data)
MoFEMErrorCode integrate(EntData &data)
virtual VolUserDataOperator * returnOpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
MoFEMErrorCode extractBlockData(Sev sev)
Sev getOptionsSeverityLevels
std::vector< BlockData > blockData
MoFEMErrorCode extractBlockData(std::vector< const CubitMeshSets * > meshset_vec_ptr, Sev sev)
HMHHencky(MoFEM::Interface &m_field, const double E, const double nu)
virtual OpJacobian * returnOpJacobian(const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
VolUserDataOperator * returnOpCalculateEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
MoFEMErrorCode getMatDPtr(boost::shared_ptr< MatrixDouble > mat_D_ptr, boost::shared_ptr< MatrixDouble > mat_axiator_D_ptr, boost::shared_ptr< MatrixDouble > mat_deviator_D_ptr, double bulk_modulus_K, double shear_modulus_G)
MoFEMErrorCode getOptions(boost::shared_ptr< DataAtIntegrationPts > data_ptr)
VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
MoFEM::Interface & mField
MoFEMErrorCode recordTape(const int tag, DTensor2Ptr *t_h)
MoFEMErrorCode getInvMatDPtr(boost::shared_ptr< MatrixDouble > mat_inv_D_ptr, double bulk_modulus_K, double shear_modulus_G)
virtual moab::Interface & get_moab()=0
bool sYmm
If true assume that matrix is symmetric structure.
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.