93 {
98 const int number_of_active_variables =
physicsPtr->activeVariables.size();
99 const int number_of_dependent_variables =
101 std::vector<double *> jac_ptr(number_of_dependent_variables);
102 for (
unsigned int n = 0;
n != number_of_dependent_variables; ++
n) {
105 ->dependentVariablesDirevatives[
n * number_of_active_variables]);
106 }
107
108 const auto nb_integration_pts = ent_data.getN().size1();
109
110 auto create_data_mat = [nb_integration_pts](
auto &
m) {
111 m.resize(9, nb_integration_pts,
false);
112 };
113
114 auto create_data_ten = [nb_integration_pts](
auto &
m) {
115 m.resize(27, nb_integration_pts,
false);
116 };
117
138
139 auto iu = getFTensor2SymmetricFromMat<3>(
dataAtPts->streachTensorAtPts);
140 auto iG = getFTensor2FromMat<3, 3>(
dataAtPts->GAtPts);
141
154 auto r_phi_dh = getFTensor2FromMat<3, 3>(
dataAtPts->phi_dh);
155 auto r_phi_dH = getFTensor2FromMat<3, 3>(
dataAtPts->phi_dH);
162
163 for (unsigned int gg = 0; gg != nb_integration_pts; ++gg) {
164
166 for(auto ii : {0, 1, 2})
167 for(auto jj : {0, 1, 2})
168 t_h(ii, jj) = iu(ii, jj);
169
171 for (int ii = 0; ii != 3; ++ii)
173
174
175
176 int r = ::jacobian(
tAg, number_of_dependent_variables,
177 number_of_active_variables,
178 &
physicsPtr->activeVariables[0], &jac_ptr[0]);
179 if (r < 0) {
181 "ADOL-C function evaluation with error");
182 }
183
204
205 ++iu;
206 ++iG;
207 ++r_P_dh0;
208 ++r_P_dh1;
209 ++r_P_dh2;
210 ++r_P_dH0;
211 ++r_P_dH1;
212 ++r_P_dH2;
213 ++r_Sigma_dh0;
214 ++r_Sigma_dh1;
215 ++r_Sigma_dh2;
216 ++r_Sigma_dH0;
217 ++r_Sigma_dH1;
218 ++r_Sigma_dH2;
219 ++r_phi_dh;
220 ++r_phi_dH;
221 ++r_Flow_dh0;
222 ++r_Flow_dh1;
223 ++r_Flow_dh2;
224 ++r_Flow_dH0;
225 ++r_Flow_dH1;
226 ++r_Flow_dH2;
227 }
229}
#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< 'j', 3 > j
FTensor::Index< 'k', 3 > k
FTensor::Tensor3< FTensor::PackPtr< double *, 1 >, 3, 3, 3 > getFTensor3FromMat(MatrixDouble &m)
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts