48 #ifdef __NONLINEAR_ELASTIC_HPP
50 const std::map<int, NonlinearElasticElement::BlockData>
51 *setOfBlocksMaterialDataPtr;
52 #endif //__NONLINEAR_ELASTIC_HPP
60 std::vector<EntityHandle> &map_gauss_pts,
63 #ifdef __NONLINEAR_ELASTIC_HPP
64 const std::map<int, NonlinearElasticElement::BlockData>
65 *set_of_block_data_ptr = NULL,
67 const bool is_field_disp =
true)
72 #ifdef __NONLINEAR_ELASTIC_HPP
73 setOfBlocksMaterialDataPtr(set_of_block_data_ptr),
102 CHKERR it->getAttributeDataStructure(mydata);
107 meshsets.insert(it->meshset);
108 for (Range::iterator mit = meshsets.begin(); mit != meshsets.end();
111 *_lambda =
LAMBDA(mydata.data.Young, mydata.data.Poisson);
112 *_mu =
MU(mydata.data.Young, mydata.data.Poisson);
113 *_block_id = it->getMeshsetId();
114 #ifdef __NONLINEAR_ELASTIC_HPP
115 if (setOfBlocksMaterialDataPtr) {
117 LAMBDA(setOfBlocksMaterialDataPtr->at(*_block_id).E,
118 setOfBlocksMaterialDataPtr->at(*_block_id).PoissonRatio);
119 *_mu =
MU(setOfBlocksMaterialDataPtr->at(*_block_id).E,
120 setOfBlocksMaterialDataPtr->at(*_block_id).PoissonRatio);
122 #endif //__NONLINEAR_ELASTIC_HPP
129 "Element is not in elastic block, however you run linear elastic "
130 "analysis with that element\n"
131 "top tip: check if you update block sets after mesh refinements or "
132 "interface insertion");
144 if (
type != MBVERTEX)
146 if (data.getFieldData().size() == 0)
154 D_lambda.resize(6, 6);
156 for (
int rr = 0; rr < 3; rr++) {
157 for (
int cc = 0; cc < 3; cc++) {
158 D_lambda(rr, cc) = 1;
163 for (
int rr = 0; rr < 6; rr++) {
164 D_mu(rr, rr) = rr < 3 ? 2 : 1;
169 double def_VAL[tag_length];
170 bzero(def_VAL, tag_length *
sizeof(
double));
173 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
176 int def_block_id = -1;
178 MB_TAG_CREAT | MB_TAG_SPARSE,
188 int nb_gauss_pts = data.getN().size1();
189 if (
mapGaussPts.size() != (
unsigned int)nb_gauss_pts)
192 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
212 noalias(stress) = prod(
D, strain);
215 Stress(0, 0) = stress[0];
216 Stress(1, 1) = stress[1];
217 Stress(2, 2) = stress[2];
218 Stress(0, 1) = Stress(1, 0) = stress[3];
219 Stress(1, 2) = Stress(2, 1) = stress[4];
220 Stress(2, 0) = Stress(0, 2) = stress[5];