183 {
185
189
196
201 ->resize(1, DIM * DIM, false);
202
203 auto t_F = getFTensor2FromPtr<DIM, DIM>(
205 auto t_P = getFTensor2FromPtr<DIM, DIM>(
208
210
215
217
220
223
225 auto p_c10 = mkparam(this->
C10);
226 auto p_K = mkparam(this->
K);
227
228 ta_F(
i,
J) <<= t_F(
i,
J);
229
232 }
233
235 I1 = ta_F(
i,
I) * ta_F(
i,
I);
236 if constexpr (DIM == 2) {
237
238 I1 += 1.;
239 }
241
242
243
244
245
246
247
248
249
250
251 const auto jacobian_to_minus_two_thirds = pow(det_aF, -2. / 3.);
252 ta_P(
i,
I) = 2. * p_c10 * jacobian_to_minus_two_thirds *
253 (ta_F(
i,
I) - (I1 / 3.) * ta_invF(
I,
i)) +
254 p_K * det_aF * (det_aF - 1.) * ta_invF(
I,
i);
255
256 ta_energy = p_c10 * (jacobian_to_minus_two_thirds * I1 - 3.) +
257 0.5 * p_K * (det_aF - 1.) * (det_aF - 1.);
258
259 ta_P(
i,
I) >>= t_P(
i,
I);
260 ta_energy >>= (*energy_ptr)(0, 0);
261
262 trace_off();
263
265 }
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#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', DIM1 > J
FTensor::Index< 'j', 3 > j
UBlasMatrix< double > MatrixDouble
static MoFEMErrorCode invertTensor(FTensor::Tensor2< T1, DIM, DIM > &t, T2 &det, FTensor::Tensor2< T3, DIM, DIM > &inv_t)
static auto determinantTensor(FTensor::Tensor2< T, DIM, DIM > &t)
Calculate the determinant of a tensor of rank DIM.
constexpr IntegrationType I
static bool useDeformationGradient
Otherwise the displacement gradient is supplied and I is added.
boost::shared_ptr< MatOpsData > matOpsDataPtr