398 {
408
409 const int number_of_active_variables =
physicsPtr->activeVariables.size();
410 const int number_of_dependent_variables =
412 std::vector<double *> jac_ptr(number_of_dependent_variables);
413 for (
unsigned int n = 0;
n != number_of_dependent_variables; ++
n) {
416 ->dependentVariablesPiolaDirevatives[
n *
417 number_of_active_variables]);
418 }
419
420 const auto nb_integration_pts = getGaussPts().size2();
421
422 auto create_data_mat = [nb_integration_pts](
auto &
m) {
423 m.resize(9, nb_integration_pts,
false);
424 };
425
426 dataAtPts->P_du.resize(81, nb_integration_pts,
false);
427
431
435
437
438 for (unsigned int gg = 0; gg != nb_integration_pts; ++gg) {
439
441
446 break;
451 break;
454 break;
455 };
456
457
458 int r = ::jacobian(
tAg, number_of_dependent_variables,
459 number_of_active_variables,
460 &
physicsPtr->activeVariables[0], &jac_ptr[0]);
461 if (r < 0) {
463 "ADOL-C function evaluation with error");
464 }
465
470
476 (t_P_dh_tmp(
i,
j, o, p) * t_h1_du(o, p,
m,
n)) * t_h1_du(
i,
j,
k,
l);
477 } break;
482 (t_P_dh_tmp(
i,
j, o, p) * t_h1_du(o, p,
m,
n)) * t_h1_du(
i,
j,
k,
l);
483 } break;
486 r_P_du(
i,
j,
m,
n) = t_P_dh_tmp(
i,
j,
m,
n);
487 break;
488 };
489
490 ++iu;
491 ++t_grad_h1;
492 ++r_P_du;
493 }
495}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
static auto getFTensor2SymmetricFromMat(ublas::matrix< T, L, A > &data)
Get symmetric tensor rank 2 (matrix) form data matrix.
static FTensor::Tensor4< FTensor::PackPtr< T *, 1 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2, Tensor_Dim3 > getFTensor4FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 4 (non symmetric) form data matrix.
FTensor::Index< 'm', 3 > m
static enum RotSelector gradApproximator
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts