10 #ifndef __POSTPROCSTRESSES_HPP__
11 #define __POSTPROCSTRESSES_HPP__
14 #error "MoFEM need to be compiled with ADOL-C"
31 std::vector<EntityHandle> &map_gauss_pts,
35 const bool field_disp =
false,
36 const bool replace_nonanumber_by_max_value =
false,
37 const double max_val = 1e16,
38 const bool print_cauchy_stress =
false)
54 if (data.getIndices().size() == 0)
61 const auto &dof_ptr = data.getFieldDofs()[0];
66 int def_block_id = -1;
68 MB_TAG_CREAT | MB_TAG_SPARSE,
75 string tag_name_piola1 = dof_ptr->getName() +
"_PIOLA1_STRESS";
76 string tag_name_energy = dof_ptr->getName() +
"_ENERGY_DENSITY";
79 double def_VAL[tag_length];
80 bzero(def_VAL, tag_length *
sizeof(
double));
81 Tag th_piola1, th_energy, th_cauchy;
83 MB_TYPE_DOUBLE, th_piola1,
84 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
86 MB_TYPE_DOUBLE, th_energy,
87 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
90 string tag_name_cauchy =
"MED_" + dof_ptr->getName() +
"_CAUCHY_STRESS";
92 MB_TYPE_DOUBLE, th_cauchy,
93 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
96 int nb_gauss_pts = data.getN().size1();
97 if (
mapGaussPts.size() != (
unsigned int)nb_gauss_pts) {
99 "Nb. of integration points is not equal to number points on "
100 "post-processing mesh");
104 "Gradient of field not found, filed <%s> not found",
122 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
129 for (
int dd = 0;
dd != 3;
dd++) {
134 (
unsigned int)nb_gauss_pts) {
144 int nb_active_variables = 9;
146 nb_active_variables);
167 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
171 if (!std::isnormal(val_energy)) {
176 for (
unsigned int r = 0;
r !=
P.size1(); ++
r) {
177 for (
unsigned int c = 0;
c !=
P.size2(); ++
c) {
178 if (!std::isnormal(
P(
r,
c)))
195 #endif //__POSTPROCSTRESSES_HPP__