|
| v0.14.0
|
|
| OpSpatialPhysical_du_du (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha) |
|
MoFEMErrorCode | integrate (EntData &row_data, EntData &col_data) |
|
MoFEMErrorCode | integrateHencky (EntData &row_data, EntData &col_data) |
|
MoFEMErrorCode | integratePolyconvexHencky (EntData &row_data, EntData &col_data) |
|
| OpAssembleVolume (const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type) |
|
| OpAssembleVolume (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry) |
|
| OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type) |
|
| OpAssembleBasic (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;}) |
|
virtual MoFEMErrorCode | integrate (EntData &data) |
|
virtual MoFEMErrorCode | integrate (int row_side, EntityType row_type, EntData &data) |
|
virtual MoFEMErrorCode | assemble (EntData &data) |
|
virtual MoFEMErrorCode | assemble (int row_side, EntityType row_type, EntData &data) |
|
virtual MoFEMErrorCode | assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data) |
|
MoFEMErrorCode | doWork (int side, EntityType type, EntData &data) |
|
MoFEMErrorCode | doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data) |
|
Definition at line 103 of file Hencky.cpp.
◆ OpSpatialPhysical_du_du()
EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::OpSpatialPhysical_du_du |
( |
std::string |
row_field, |
|
|
std::string |
col_field, |
|
|
boost::shared_ptr< DataAtIntegrationPts > |
data_ptr, |
|
|
const double |
alpha |
|
) |
| |
Definition at line 451 of file Hencky.cpp.
460 "get polyconvex option failed");
◆ integrate()
MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integrate |
( |
EntData & |
row_data, |
|
|
EntData & |
col_data |
|
) |
| |
|
virtual |
◆ integrateHencky()
MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integrateHencky |
( |
EntData & |
row_data, |
|
|
EntData & |
col_data |
|
) |
| |
Definition at line 477 of file Hencky.cpp.
486 int nb_integration_pts = row_data.
getN().size1();
487 int row_nb_dofs = row_data.
getIndices().size();
488 int col_nb_dofs = col_data.
getIndices().size();
494 &
m(
r + 0,
c + 0), &
m(
r + 0,
c + 1), &
m(
r + 0,
c + 2), &
m(
r + 0,
c + 3),
495 &
m(
r + 0,
c + 4), &
m(
r + 0,
c + 5),
497 &
m(
r + 1,
c + 0), &
m(
r + 1,
c + 1), &
m(
r + 1,
c + 2), &
m(
r + 1,
c + 3),
498 &
m(
r + 1,
c + 4), &
m(
r + 1,
c + 5),
500 &
m(
r + 2,
c + 0), &
m(
r + 2,
c + 1), &
m(
r + 2,
c + 2), &
m(
r + 2,
c + 3),
501 &
m(
r + 2,
c + 4), &
m(
r + 2,
c + 5),
503 &
m(
r + 3,
c + 0), &
m(
r + 3,
c + 1), &
m(
r + 3,
c + 2), &
m(
r + 3,
c + 3),
504 &
m(
r + 3,
c + 4), &
m(
r + 3,
c + 5),
506 &
m(
r + 4,
c + 0), &
m(
r + 4,
c + 1), &
m(
r + 4,
c + 2), &
m(
r + 4,
c + 3),
507 &
m(
r + 4,
c + 4), &
m(
r + 4,
c + 5),
509 &
m(
r + 5,
c + 0), &
m(
r + 5,
c + 1), &
m(
r + 5,
c + 2), &
m(
r + 5,
c + 3),
510 &
m(
r + 5,
c + 4), &
m(
r + 5,
c + 5)
521 auto v = getVolume();
522 auto t_w = getFTensor0IntegrationWeight();
524 auto t_approx_P_adjont_dstretch =
525 getFTensor2FromMat<3, 3>(
dataAtPts->adjointPdstretchAtPts);
526 auto t_eigen_vals = getFTensor1FromMat<3>(
dataAtPts->eigenVals);
527 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(
dataAtPts->eigenVecs);
530 int row_nb_base_functions = row_data.
getN().size2();
533 auto get_dP = [&]() {
535 auto ts_a = getTSa();
537 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*
dataAtPts->matD.data().begin());
539 t_dP_tmp(
L,
J) = -(1 +
alphaU * ts_a) *
541 ((t_D(
i,
j,
m,
n) * t_diff(
m,
n,
k,
l)) * t_L(
k,
l,
J)));
544 auto t_approx_P_adjont_dstretch =
545 getFTensor2FromMat<3, 3>(
dataAtPts->adjointPdstretchAtPts);
546 auto t_eigen_vals = getFTensor1FromMat<3>(
dataAtPts->eigenVals);
547 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(
dataAtPts->eigenVecs);
550 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(
dP);
551 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
556 t_sym(
i,
j) = (t_approx_P_adjont_dstretch(
i,
j) ||
557 t_approx_P_adjont_dstretch(
j,
i));
562 t_dP(
L,
J) = t_L(
i,
j,
L) *
563 ((t_diff2_uP2(
i,
j,
k,
l) + t_diff2_uP2(
k,
l,
i,
j)) *
569 ++t_approx_P_adjont_dstretch;
574 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(
dP);
575 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
576 t_dP(
L,
J) = t_dP_tmp(
L,
J);
581 return getFTensor2FromMat<size_symm, size_symm>(
dP);
584 auto t_dP = get_dP();
585 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
589 for (; rr != row_nb_dofs / 6; ++rr) {
591 auto t_m = get_ftensor2(
K, 6 * rr, 0);
592 for (
int cc = 0; cc != col_nb_dofs / 6; ++cc) {
593 const double b =
a * t_row_base_fun * t_col_base_fun;
594 t_m(
L,
J) += b * t_dP(
L,
J);
601 for (; rr != row_nb_base_functions; ++rr) {
◆ integratePolyconvexHencky()
MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integratePolyconvexHencky |
( |
EntData & |
row_data, |
|
|
EntData & |
col_data |
|
) |
| |
Definition at line 611 of file Hencky.cpp.
620 int nb_integration_pts = row_data.
getN().size1();
621 int row_nb_dofs = row_data.
getIndices().size();
622 int col_nb_dofs = col_data.
getIndices().size();
628 &
m(
r + 0,
c + 0), &
m(
r + 0,
c + 1), &
m(
r + 0,
c + 2), &
m(
r + 0,
c + 3),
629 &
m(
r + 0,
c + 4), &
m(
r + 0,
c + 5),
631 &
m(
r + 1,
c + 0), &
m(
r + 1,
c + 1), &
m(
r + 1,
c + 2), &
m(
r + 1,
c + 3),
632 &
m(
r + 1,
c + 4), &
m(
r + 1,
c + 5),
634 &
m(
r + 2,
c + 0), &
m(
r + 2,
c + 1), &
m(
r + 2,
c + 2), &
m(
r + 2,
c + 3),
635 &
m(
r + 2,
c + 4), &
m(
r + 2,
c + 5),
637 &
m(
r + 3,
c + 0), &
m(
r + 3,
c + 1), &
m(
r + 3,
c + 2), &
m(
r + 3,
c + 3),
638 &
m(
r + 3,
c + 4), &
m(
r + 3,
c + 5),
640 &
m(
r + 4,
c + 0), &
m(
r + 4,
c + 1), &
m(
r + 4,
c + 2), &
m(
r + 4,
c + 3),
641 &
m(
r + 4,
c + 4), &
m(
r + 4,
c + 5),
643 &
m(
r + 5,
c + 0), &
m(
r + 5,
c + 1), &
m(
r + 5,
c + 2), &
m(
r + 5,
c + 3),
644 &
m(
r + 5,
c + 4), &
m(
r + 5,
c + 5)
655 auto v = getVolume();
656 auto t_w = getFTensor0IntegrationWeight();
658 int row_nb_base_functions = row_data.
getN().size2();
661 auto get_dP = [&]() {
663 auto ts_a = getTSa();
665 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*
dataAtPts->matD.data().begin());
667 constexpr
double nohat_k = 1. / 4;
668 constexpr
double hat_k = 1. / 8;
672 constexpr
double third = boost::math::constants::third<double>();
676 auto t_approx_P_adjont_dstretch =
677 getFTensor2FromMat<3, 3>(
dataAtPts->adjointPdstretchAtPts);
678 auto t_log_stretch_h1 =
679 getFTensor2SymmetricFromMat<3>(
dataAtPts->logStretchTotalTensorAtPts);
680 auto t_eigen_vals = getFTensor1FromMat<3>(
dataAtPts->eigenVals);
681 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(
dataAtPts->eigenVecs);
684 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(
dP);
685 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
687 double log_det = t_log_stretch_h1(
i,
i);
688 double log_det2 = log_det * log_det;
691 double dev_norm2 = t_dev(
i,
j) * t_dev(
i,
j);
693 auto A = 2 *
mu * std::exp(nohat_k * dev_norm2);
694 auto B =
lambda * std::exp(hat_k * log_det2) * log_det;
698 (
A * 2 * nohat_k) * (t_dev(
k,
l) * t_diff_deviator(
k,
l,
i,
j));
699 t_B_diff(
i,
j) = (B * 2 * hat_k) * log_det *
t_kd(
i,
j) +
703 t_A_diff(
i,
j) * (t_dev(
m,
n) * t_diff_deviator(
m,
n,
k,
l))
707 A * t_diff_deviator(
m,
n,
i,
j) * t_diff_deviator(
m,
n,
k,
l)
713 t_dP(
L,
J) = -t_L(
i,
j,
L) *
729 t_sym(
i,
j) = (t_approx_P_adjont_dstretch(
i,
j) ||
730 t_approx_P_adjont_dstretch(
j,
i));
735 t_dP(
L,
J) += t_L(
i,
j,
L) *
736 ((t_diff2_uP2(
i,
j,
k,
l) + t_diff2_uP2(
k,
l,
i,
j)) *
742 ++t_approx_P_adjont_dstretch;
748 return getFTensor2FromMat<size_symm, size_symm>(
dP);
751 auto t_dP = get_dP();
752 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
756 for (; rr != row_nb_dofs / 6; ++rr) {
758 auto t_m = get_ftensor2(
K, 6 * rr, 0);
759 for (
int cc = 0; cc != col_nb_dofs / 6; ++cc) {
760 const double b =
a * t_row_base_fun * t_col_base_fun;
761 t_m(
L,
J) += b * t_dP(
L,
J);
768 for (; rr != row_nb_base_functions; ++rr) {
◆ alphaU
const double EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::alphaU |
◆ dP
MatrixDouble EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::dP |
|
private |
◆ polyConvex
PetscBool EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::polyConvex = PETSC_FALSE |
|
private |
The documentation for this struct was generated from the following file:
- users_modules/eshelbian_plasticit/src/impl/Hencky.cpp
MoFEMErrorCode integratePolyconvexHencky(EntData &row_data, EntData &col_data)
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
constexpr static auto size_symm
static boost::function< double(const double)> dd_f
UBlasMatrix< double > MatrixDouble
FTensor::Index< 'J', DIM1 > J
static boost::function< double(const double)> d_f
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
const double c
speed of light (cm/ns)
MoFEMErrorCode integrateHencky(EntData &row_data, EntData &col_data)
#define CHKERR
Inline error check.
static enum StretchSelector stretchSelector
static boost::function< double(const double)> f
const VectorInt & getIndices() const
Get global indices of dofs on entity.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
auto diff_deviator(FTensor::Ddg< double, 3, 3 > &&t_diff_stress)
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Index< 'j', 3 > j
FTensor::Ddg< double, 3, 3 > getDiffDiffMat(Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2< double, 3, 3 > &t_S, const int nb)
FTensor::Index< 'm', 3 > m
Kronecker Delta class symmetric.
OpAssembleVolume(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
FTensor::Index< 'k', 3 > k
MatrixDouble K
local tangent matrix
#define MoFEMFunctionReturn(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 ...
FTensor::Index< 'l', 3 > l
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)