95 {
105
106 const int number_of_active_variables =
physicsPtr->activeVariables.size();
107 const int number_of_dependent_variables =
109 std::vector<double *> jac_ptr(number_of_dependent_variables);
110 for (
unsigned int n = 0;
n != number_of_dependent_variables; ++
n) {
113 ->dependentVariablesPiolaDirevatives[
n *
114 number_of_active_variables]);
115 }
116
117 const auto nb_integration_pts = getGaussPts().size2();
118
119 auto create_data_mat = [nb_integration_pts](
auto &
m) {
120 m.resize(9, nb_integration_pts,
false);
121 };
122
123 dataAtPts->P_du.resize(81, nb_integration_pts,
false);
124
125 auto iu = getFTensor2SymmetricFromMat<3>(
dataAtPts->stretchTensorAtPts);
126 auto t_grad_h1 = getFTensor2FromMat<3, 3>(
dataAtPts->wGradH1AtPts);
127 auto r_P_du = getFTensor4FromMat<3, 3, 3, 3>(
dataAtPts->P_du);
128
132
134
135 for (unsigned int gg = 0; gg != nb_integration_pts; ++gg) {
136
138
144 break;
147 break;
148 };
149
150
151 int r = ::jacobian(
tAg, number_of_dependent_variables,
152 number_of_active_variables,
153 &
physicsPtr->activeVariables[0], &jac_ptr[0]);
154 if (r < 0) {
156 "ADOL-C function evaluation with error");
157 }
158
163
170 (t_P_dh_tmp(
i,
j,
o,
p) * t_h1_du(
o,
p,
m,
n)) * t_h1_du(
i,
j,
k,
l);
171 } break;
173 r_P_du(
i,
j,
m,
n) = t_P_dh_tmp(
i,
j,
m,
n);
174 break;
175 };
176
177 ++iu;
178 ++t_grad_h1;
179 ++r_P_du;
180 }
182}
#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< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static enum RotSelector gradApperoximator
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts