8#ifndef __HENCKY_OPS_HPP__
9#define __HENCKY_OPS_HPP__
14static const double eps = std::sqrt(std::numeric_limits<double>::epsilon());
16auto f = [](
double v) {
return 0.5 * std::log(
v); };
17auto d_f = [](
double v) {
return 0.5 /
v; };
18auto dd_f = [](
double v) {
return -0.5 / (
v *
v); };
21struct CommonData :
public boost::enable_shared_from_this<CommonData> {
36 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
41 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
46 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &
matLogC);
50 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &
matTangent);
55template <
int DIM, IntegrationType I,
typename DomainEleOp>
58template <
int DIM, IntegrationType I,
typename DomainEleOp>
61template <
int DIM, IntegrationType I,
typename DomainEleOp>
64template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
67template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
70template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
73template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
76template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
79template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
82template <
int DIM, IntegrationType I,
typename DomainEleOp,
int S>
85template <
int DIM,
typename DomainEleOp>
89 boost::shared_ptr<CommonData> common_data)
91 commonDataPtr(common_data) {
92 std::fill(&DomainEleOp::doEntities[MBEDGE],
93 &DomainEleOp::doEntities[MBMAXTYPE],
false);
105 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
107 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
109 commonDataPtr->matEigVal.resize(nb_gauss_pts, DIM,
false);
110 commonDataPtr->matEigVec.resize(nb_gauss_pts, DIM * DIM,
false);
111 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
112 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
114 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
124 for (
int ii = 0; ii != DIM; ii++)
125 for (
int jj = 0; jj != DIM; jj++)
126 eigen_vec(ii, jj) =
C(ii, jj);
128 CHKERR computeEigenValuesSymmetric(eigen_vec, eig);
129 for (
auto ii = 0; ii != DIM; ++ii)
130 eig(ii) = std::max(
eps, eig(ii));
135 if constexpr (DIM == 3) {
137 CHKERR sortEigenVals<DIM>(
138 getVectorAdaptor(&eig(0), DIM),
139 getMatrixAdaptor(&eigen_vec(0, 0), DIM, DIM),
144 t_eig_val(
i) = eig(
i);
145 t_eig_vec(
i,
j) = eigen_vec(
i,
j);
148 auto nb_uniq_test = getUniqNb<DIM>(getVectorAdaptor(&t_eig_val(0), DIM),
150 if (nb_uniq_test != nb_uniq) {
152 "Inconsistent number of unique eigen values %ld != %ld",
153 nb_uniq, nb_uniq_test);
169template <
int DIM,
typename DomainEleOp>
173 boost::shared_ptr<CommonData> common_data)
175 commonDataPtr(common_data) {
176 std::fill(&DomainEleOp::doEntities[MBEDGE],
177 &DomainEleOp::doEntities[MBMAXTYPE],
false);
187 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
188 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
189 commonDataPtr->matLogC.resize(nb_gauss_pts,
size_symm,
false);
191 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
192 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
194 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
196 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
210template <
int DIM,
typename DomainEleOp>
214 boost::shared_ptr<CommonData> common_data)
216 commonDataPtr(common_data) {
217 std::fill(&DomainEleOp::doEntities[MBEDGE],
218 &DomainEleOp::doEntities[MBMAXTYPE],
false);
229 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
230 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
232 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
233 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
234 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
236 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
238 auto nb_uniq = getUniqNb<DIM>(getVectorAdaptor(&t_eig_val(0), DIM),
240 t_logC_dC(
i,
j,
k,
l) =
242 nb_uniq)(
i,
j,
k,
l);
257template <
int DIM,
typename DomainEleOp,
int S>
262 boost::shared_ptr<CommonData> common_data)
264 commonDataPtr(common_data) {
265 std::fill(&DomainEleOp::doEntities[MBEDGE],
266 &DomainEleOp::doEntities[MBMAXTYPE],
false);
278 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
279 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*commonDataPtr->matDPtr);
280 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
281 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
282 commonDataPtr->matHenckyStress.resize(nb_gauss_pts,
size_symm,
false);
283 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
285 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
286 t_T(
i,
j) = t_D(
i,
j,
k,
l) * t_logC(
k,
l);
300template <
int DIM,
typename DomainEleOp,
int S>
305 const std::string
field_name, boost::shared_ptr<VectorDouble> temperature,
306 boost::shared_ptr<CommonData> common_data,
307 boost::shared_ptr<VectorDouble> coeff_expansion_ptr,
308 boost::shared_ptr<double> ref_temp_ptr)
310 commonDataPtr(common_data), coeffExpansionPtr(coeff_expansion_ptr),
311 refTempPtr(ref_temp_ptr) {
312 std::fill(&DomainEleOp::doEntities[MBEDGE],
313 &DomainEleOp::doEntities[MBMAXTYPE],
false);
327 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
328 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*commonDataPtr->matDPtr);
329 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
330 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
331 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
332 commonDataPtr->matHenckyStress.resize(nb_gauss_pts,
size_symm,
false);
333 commonDataPtr->matFirstPiolaStress.resize(nb_gauss_pts, DIM * DIM,
false);
334 commonDataPtr->matSecondPiolaStress.resize(nb_gauss_pts,
size_symm,
false);
335 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
336 auto t_P = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matFirstPiolaStress);
338 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matSecondPiolaStress);
339 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
340 auto t_temp = getFTensor0FromVec(*tempPtr);
343 t_coeff_exp(
i,
j) = 0;
345 t_coeff_exp(d, d) = (*coeffExpansionPtr)[d];
348 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
349#ifdef HENCKY_SMALL_STRAIN
350 t_P(
i,
j) = t_D(
i,
j,
k,
l) *
351 (t_grad(
k,
l) - t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
353 t_T(
i,
j) = t_D(
i,
j,
k,
l) *
354 (t_logC(
k,
l) - t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
357 t_S(
k,
l) = t_T(
i,
j) * t_logC_dC(
i,
j,
k,
l);
358 t_P(
i,
l) = t_F(
i,
k) * t_S(
k,
l);
380template <
int DIM,
typename DomainEleOp,
int S>
385 boost::shared_ptr<CommonData> common_data,
386 boost::shared_ptr<MatrixDouble> mat_D_ptr,
387 const double scale = 1)
389 scaleStress(
scale), matDPtr(mat_D_ptr) {
390 std::fill(&DomainEleOp::doEntities[MBEDGE],
391 &DomainEleOp::doEntities[MBMAXTYPE],
false);
393 matLogCPlastic = commonDataPtr->matLogCPlastic;
405 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
406 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*matDPtr);
407 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
408 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*matLogCPlastic);
409 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
410 commonDataPtr->matHenckyStress.resize(nb_gauss_pts,
size_symm,
false);
411 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
413 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
414 t_T(
i,
j) = t_D(
i,
j,
k,
l) * (t_logC(
k,
l) - t_logCPlastic(
k,
l));
415 t_T(
i,
j) /= scaleStress;
433template <
int DIM,
typename DomainEleOp,
int S>
438 boost::shared_ptr<CommonData> common_data)
440 commonDataPtr(common_data) {
441 std::fill(&DomainEleOp::doEntities[MBEDGE],
442 &DomainEleOp::doEntities[MBMAXTYPE],
false);
456 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
457#ifdef HENCKY_SMALL_STRAIN
458 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*commonDataPtr->matDPtr);
460 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
461 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
462 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
463 commonDataPtr->matFirstPiolaStress.resize(nb_gauss_pts, DIM * DIM,
false);
464 commonDataPtr->matSecondPiolaStress.resize(nb_gauss_pts,
size_symm,
false);
465 auto t_P = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matFirstPiolaStress);
466 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
468 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matSecondPiolaStress);
469 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
471 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
473#ifdef HENCKY_SMALL_STRAIN
474 t_P(
i,
j) = t_D(
i,
j,
k,
l) * t_grad(
k,
l);
478 t_S(
k,
l) = t_T(
i,
j) * t_logC_dC(
i,
j,
k,
l);
479 t_P(
i,
l) = t_F(
i,
k) * t_S(
k,
l);
488#ifdef HENCKY_SMALL_STRAIN
502template <
int DIM,
typename DomainEleOp,
int S>
505 boost::shared_ptr<CommonData> common_data,
506 boost::shared_ptr<MatrixDouble> mat_D_ptr =
nullptr)
508 commonDataPtr(common_data) {
509 std::fill(&DomainEleOp::doEntities[MBEDGE],
510 &DomainEleOp::doEntities[MBMAXTYPE],
false);
514 matDPtr = commonDataPtr->matDPtr;
531 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
532 commonDataPtr->matTangent.resize(nb_gauss_pts, DIM * DIM * DIM * DIM);
534 getFTensor4FromMat<DIM, DIM, DIM, DIM>(commonDataPtr->matTangent);
536 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*matDPtr);
537 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
538 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
539 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
541 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matSecondPiolaStress);
542 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
543 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
545 for (
size_t gg = 0; gg != nb_gauss_pts; ++gg) {
547#ifdef HENCKY_SMALL_STRAIN
548 dP_dF(
i,
j,
k,
l) = t_D(
i,
j,
k,
l);
555 auto nb_uniq = getUniqNb<DIM>(getVectorAdaptor(&t_eig_val(0), DIM),
564 P_D_P_plus_TL(
i,
j,
k,
l) =
566 (t_logC_dC(
i,
j, o, p) * t_D(o, p,
m,
n)) * t_logC_dC(
m,
n,
k,
l);
567 P_D_P_plus_TL(
i,
j,
k,
l) *= 0.5;
570 t_F(
i,
k) * (P_D_P_plus_TL(
k,
j, o, p) * dC_dF(o, p,
m,
n));
594template <
int DIM,
typename AssemblyDomainEleOp,
int S>
598 const std::string row_field_name,
const std::string col_field_name,
599 boost::shared_ptr<CommonData> elastic_common_data_ptr,
600 boost::shared_ptr<VectorDouble> coeff_expansion_ptr);
602 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data,
603 EntitiesFieldData::EntData &col_data);
610template <
int DIM,
typename AssemblyDomainEleOp,
int S>
613 const std::string row_field_name,
const std::string col_field_name,
614 boost::shared_ptr<CommonData> elastic_common_data_ptr,
615 boost::shared_ptr<VectorDouble> coeff_expansion_ptr)
618 elasticCommonDataPtr(elastic_common_data_ptr),
619 coeffExpansionPtr(coeff_expansion_ptr) {
623template <
int DIM,
typename AssemblyDomainEleOp,
int S>
626 iNtegrate(EntitiesFieldData::EntData &row_data,
627 EntitiesFieldData::EntData &col_data) {
632 const auto nb_integration_pts = row_data.getN().size1();
633 const auto nb_row_base_functions = row_data.getN().size2();
634 auto t_w = this->getFTensor0IntegrationWeight();
637 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
638 auto t_D = getFTensor4DdgFromMat<DIM, DIM, 0>(*elasticCommonDataPtr->matDPtr);
640 getFTensor2FromMat<DIM, DIM>(*(elasticCommonDataPtr->matGradPtr));
642 getFTensor4DdgFromMat<DIM, DIM>(elasticCommonDataPtr->matLogCdC);
655 t_coeff_exp(
i,
j) = 0;
657 t_coeff_exp(d, d) = (*coeffExpansionPtr)[d];
660 t_eigen_strain(
i,
j) = (t_D(
i,
j,
k,
l) * t_coeff_exp(
k,
l));
662 for (
auto gg = 0; gg != nb_integration_pts; ++gg) {
666 double alpha = this->getMeasure() * t_w;
670 getFTensor1FromMat<DIM, 1,
671 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
673 auto t_col_base = col_data.getFTensor0N(gg, 0);
675#ifdef HENCKY_SMALL_STRAIN
677 (t_row_diff_base(
j) * t_eigen_strain(
i,
j)) * (t_col_base * alpha);
679 t_mat(
i) -= (t_row_diff_base(
j) *
680 (t_F(
i, o) * ((t_D(
m,
n,
k,
l) * t_coeff_exp(
k,
l)) *
681 t_logC_dC(
m,
n, o,
j)))) *
682 (t_col_base * alpha);
691 for (; rr != nb_row_base_functions; ++rr)
705 template <
int DIM, IntegrationType I>
708 template <
int DIM, IntegrationType I>
711 template <
int DIM, IntegrationType I>
714 template <
int DIM, IntegrationType I,
int S>
718 template <
int DIM, IntegrationType I,
int S>
722 template <
int DIM, IntegrationType I,
int S>
726 template <
int DIM, IntegrationType I,
int S>
730 template <
int DIM, IntegrationType I,
int S>
733 template <
int DIM, IntegrationType I,
typename AssemblyDomainEleOp,
int S>
743 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
744 std::string block_name,
745 boost::shared_ptr<MatrixDouble> mat_D_Ptr, Sev sev,
749 PetscBool plane_strain_flag = PETSC_FALSE;
750 CHKERR PetscOptionsGetBool(PETSC_NULLPTR,
"",
"-plane_strain",
751 &plane_strain_flag, PETSC_NULLPTR);
756 std::vector<const CubitMeshSets *> meshset_vec_ptr,
757 double scale, PetscBool plane_strain_flag)
761 planeStrainFlag(plane_strain_flag) {
763 "Can not get data from block");
766 MoFEMErrorCode doWork(
int side, EntityType
type,
767 EntitiesFieldData::EntData &data) {
770 for (
auto &b : blockData) {
772 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
773 CHKERR getMatDPtr(matDPtr, b.bulkModulusK * scaleYoungModulus,
774 b.shearModulusG * scaleYoungModulus,
780 CHKERR getMatDPtr(matDPtr, bulkModulusKDefault * scaleYoungModulus,
781 shearModulusGDefault * scaleYoungModulus,
787 boost::shared_ptr<MatrixDouble> matDPtr;
788 const double scaleYoungModulus;
789 const PetscBool planeStrainFlag;
793 double shearModulusG;
797 double bulkModulusKDefault;
798 double shearModulusGDefault;
799 std::vector<BlockData> blockData;
803 std::vector<const CubitMeshSets *> meshset_vec_ptr,
807 for (
auto m : meshset_vec_ptr) {
809 std::vector<double> block_data;
810 CHKERR m->getAttributes(block_data);
811 if (block_data.size() != 2) {
813 "Expected that block has two attribute");
815 auto get_block_ents = [&]() {
818 m_field.
get_moab().get_entities_by_handle(
m->meshset, ents,
true);
838 MoFEMErrorCode getMatDPtr(boost::shared_ptr<MatrixDouble> mat_D_ptr,
843 auto set_material_stiffness = [&]() {
853 auto t_D = getFTensor4DdgFromMat<DIM, DIM, 0>(*mat_D_ptr);
860 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
862 set_material_stiffness();
870 PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"",
"none");
871 CHKERR PetscOptionsScalar(
"-young_modulus",
"Young modulus",
"",
E, &
E,
873 CHKERR PetscOptionsScalar(
"-poisson_ratio",
"poisson ratio",
"", nu, &nu,
879 pip.push_back(
new OpMatBlocks(
883 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
885 (boost::format(
"%s(.*)") % block_name).str()
888 scale, plane_strain_flag
897template <
int DIM, IntegrationType I,
typename DomainEleOp>
900 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
901 std::string
field_name, std::string block_name, Sev sev,
double scale = 1) {
903 auto common_ptr = boost::make_shared<HenckyOps::CommonData>();
904 common_ptr->matDPtr = boost::make_shared<MatrixDouble>();
905 common_ptr->matGradPtr = boost::make_shared<MatrixDouble>();
908 common_ptr->matDPtr, sev,
scale),
913 pip.push_back(
new OpCalculateVectorFieldGradient<DIM, DIM>(
915 pip.push_back(
new typename H::template OpCalculateEigenVals<DIM, I>(
918 new typename H::template OpCalculateLogC<DIM, I>(
field_name, common_ptr));
919 pip.push_back(
new typename H::template OpCalculateLogC_dC<DIM, I>(
922 pip.push_back(
new typename H::template OpCalculateHenckyStress<DIM, I, 0>(
924 pip.push_back(
new typename H::template OpCalculatePiolaStress<DIM, I, 0>(
932template <
int DIM, AssemblyType A, IntegrationType I,
typename DomainEleOp>
935 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
936 std::string
field_name, boost::shared_ptr<HenckyOps::CommonData> common_ptr,
940 using B =
typename FormsIntegrators<DomainEleOp>::template Assembly<
950template <
int DIM, AssemblyType A, IntegrationType I,
typename DomainEleOp>
953 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
954 std::string
field_name, std::string block_name, Sev sev,
double scale = 1) {
957 auto common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
967template <
int DIM, AssemblyType A, IntegrationType I,
typename DomainEleOp>
970 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
971 std::string
field_name, boost::shared_ptr<HenckyOps::CommonData> common_ptr,
975 using B =
typename FormsIntegrators<DomainEleOp>::template Assembly<
977 using OpKPiola =
typename B::template OpGradTensorGrad<1, DIM, DIM, -1>;
981 pip.push_back(
new typename H::template OpHenckyTangent<DIM, I, 0>(
989template <
int DIM, AssemblyType A, IntegrationType I,
typename DomainEleOp>
992 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
993 std::string
field_name, std::string block_name, Sev sev,
double scale = 1) {
996 auto common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
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 ...
@ 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(channel)
Set and reset channel.
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getMat(A &&t_val, B &&t_vec, Fun< double > f)
Get the Mat object.
auto getDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, const int nb)
Get the Diff Mat object.
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.
MoFEMErrorCode opFactoryDomainLhs(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, boost::shared_ptr< HenckyOps::CommonData > common_ptr, Sev sev)
[opFactoryDomainRhs]
MoFEMErrorCode opFactoryDomainRhs(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, boost::shared_ptr< HenckyOps::CommonData > common_ptr, Sev sev)
[commonDataFactory]
MoFEMErrorCode addMatBlockOps(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string block_name, boost::shared_ptr< MatrixDouble > mat_D_Ptr, Sev sev, double scale=1)
[Hencky integrators]
auto commonDataFactory(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string block_name, Sev sev, double scale=1)
[Add material block operations]
FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpGradTimesTensor< 1, FIELD_DIM, SPACE_DIM > OpGradTimesTensor
double young_modulus
Young modulus.
double poisson_ratio
Poisson ratio.
constexpr auto field_name
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM > OpInternalForcePiola
PetscBool is_plane_strain
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradTensorGrad< 1, SPACE_DIM, SPACE_DIM, -1 > OpKPiola
[Only used for dynamics]
FTensor::Index< 'm', 3 > m
auto getMatHenckyStress()
auto getMatFirstPiolaStress()
boost::shared_ptr< MatrixDouble > matLogCPlastic
MatrixDouble matFirstPiolaStress
boost::shared_ptr< MatrixDouble > matDPtr
MatrixDouble matSecondPiolaStress
MatrixDouble matHenckyStress
boost::shared_ptr< MatrixDouble > matGradPtr
OpCalculateEigenValsImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > matDPtr
boost::shared_ptr< MatrixDouble > matLogCPlastic
boost::shared_ptr< CommonData > commonDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
OpCalculateHenckyPlasticStressImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< MatrixDouble > mat_D_ptr, const double scale=1)
boost::shared_ptr< CommonData > commonDataPtr
OpCalculateHenckyStressImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< VectorDouble > coeffExpansionPtr
OpCalculateHenckyThermalStressImpl(const std::string field_name, boost::shared_ptr< VectorDouble > temperature, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< VectorDouble > coeff_expansion_ptr, boost::shared_ptr< double > ref_temp_ptr)
boost::shared_ptr< double > refTempPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< VectorDouble > tempPtr
boost::shared_ptr< CommonData > elasticCommonDataPtr
boost::shared_ptr< VectorDouble > coeffExpansionPtr
boost::shared_ptr< CommonData > commonDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
OpCalculateLogCImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
OpCalculateLogC_dCImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
OpCalculatePiolaStressImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
OpHenckyTangentImpl(const std::string field_name, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< MatrixDouble > mat_D_ptr=nullptr)
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > matDPtr
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
int nbRows
number of dofs on rows
MatrixDouble locMat
local entity block matrix
int nbCols
number if dof on column
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.