223 {
225
226#ifndef NDEBUG
229 "DataAtIntegrationPts pointer is null");
232 "Topological data pointer is null");
235 "ObjectiveFunctionData pointer is null");
236#endif
237
239 const int nb_gauss_pts = getGaussPts().size2();
240 if (!nb_gauss_pts)
242
243 auto stress_full_ptr = boost::make_shared<MatrixDouble>();
244 stress_full_ptr->resize(size_full, nb_gauss_pts, false);
245 stress_full_ptr->clear();
246 auto strain_full_ptr = boost::make_shared<MatrixDouble>();
247 strain_full_ptr->resize(size_full, nb_gauss_pts, false);
248 strain_full_ptr->clear();
249
250 auto t_stress = getFTensor2FromMat<3, 3>(*stress_full_ptr);
251 auto t_strain = getFTensor2FromMat<3, 3>(*strain_full_ptr);
252
253 auto t_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->approxPAtPts);
254 auto t_log_u =
255 getFTensor2SymmetricFromMat<3>(
dataAtPts->logStretchTensorAtPts);
256
257 auto next = [&]() {
258 ++t_stress;
259 ++t_strain;
260 ++t_P;
261 ++t_log_u;
262 };
263
266
267 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
268
269
270 t_stress(
i,
j) = t_P(
i,
j);
271 t_strain(
i,
j) = t_log_u(
i,
j);
272 next();
273 }
274
275 auto &coords = OP::getCoordsAtGaussPts();
277 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
279
281 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
282 topoData->getObjDStrainAtPts(),
false);
283
285 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
286 topoData->getObjDDisplacementAtPts(),
false);
287
289 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
290 topoData->getObjDStressAtPts(),
false);
291
293}
#define FTENSOR_INDEX(DIM, I)
#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.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j