v0.16.3
Loading...
Searching...
No Matches
EshelbianPlasticity.hpp
Go to the documentation of this file.
1/**
2 * \file EshelbianPlasticity.hpp
3 * \brief Eshelbian plasticity interface
4 *
5 * \brief Problem implementation for mix element for large-strain elasticity
6 *
7 * For reference on mixed formulation see: \cite gopalakrishnan2012second and
8 * \cite cockburn2010new
9 *
10 * \todo Implementation of plasticity
11 */
12
13// DO NOT DELETE MIGHT BE USEFULL
14// #include <boost/multiprecision/mpfr.hpp>
15// using mpfr50 = boost::multiprecision::number<
16// boost::multiprecision::mpfr_float_backend<50>>;
17
18// inline mpfr50 exp_hi(const mpfr50 x) { return boost::multiprecision::exp(x);
19// } inline mpfr50 log_hi(const mpfr50 x) { return
20// boost::multiprecision::log(x); }
21
22constexpr int SPACE_DIM = 3;
23// constexpr auto A = AssemblyType::BLOCK_SCHUR;
24constexpr auto A = AssemblyType::BLOCK_MAT;
25
26#include "MatOps.hpp"
27
28#ifndef __ESHELBIAN_PLASTICITY_HPP__
29#define __ESHELBIAN_PLASTICITY_HPP__
30
32#include <bitset>
33
34namespace EshelbianPlasticity {
35
36using DL = DataLayoutTraits<DataLayout::GaussByCoeffs>;
37
38struct ContactTree;
39
44 LOG /*linear extension*/,
45 LOG_QUADRATIC /*quadratic extension*/,
47};
49
50using MatrixPtr = boost::shared_ptr<MatrixDouble>;
51using VectorPtr = boost::shared_ptr<VectorDouble>;
52
53using EntData = EntitiesFieldData::EntData;
54using UserDataOperator = ForcesAndSourcesCore::UserDataOperator;
55using VolUserDataOperator = VolumeElementForcesAndSourcesCore::UserDataOperator;
56using FaceUserDataOperator = FaceElementForcesAndSourcesCore::UserDataOperator;
57using EleOnSide = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::FaceSideEle;
58using SideEleOp = EleOnSide::UserDataOperator;
59
62struct TopologicalData;
65struct EshelbianCore;
66
67struct AnalyticalExprPython;
68
70 : public boost::enable_shared_from_this<MatOpsDataAtIntegrationPts> {
71
74 matOpsData->insertCommonData("approxPAtPts");
75 matOpsData->insertCommonData("approxP0AtPts");
76 matOpsData->insertCommonData("divPAtPts");
77 matOpsData->insertCommonData("wL2AtPts");
78 matOpsData->insertCommonData("wL2DotAtPts");
79 matOpsData->insertCommonData("wL2DotDotAtPts");
80 matOpsData->insertCommonData("logStretchTensorAtPts");
81 matOpsData->insertCommonData("logStretchTensor0AtPts");
82 matOpsData->insertCommonData("logStretchDotTensorAtPts");
83 matOpsData->insertCommonData("gradLogStretchDotTensorAtPts");
84 matOpsData->insertCommonData("rotAxisAtPts");
85 matOpsData->insertCommonData("rotAxisGradAtPts");
86 matOpsData->insertCommonData("rotAxisDotAtPts");
87 matOpsData->insertCommonData("rotAxisGradDotAtPts");
88 matOpsData->insertCommonData("stretchH1AtPts");
89 matOpsData->insertCommonData("wGradH1AtPts");
90 matOpsData->insertCommonData("stretchTensorAtPts");
91 matOpsData->insertCommonData("diffStretchH1AtPts");
92 matOpsData->insertCommonData("diffStretchTensorAtPts");
93 matOpsData->insertCommonData("hAtPts");
94 matOpsData->insertCommonData("adjointPdstretchAtPts");
95 matOpsData->insertCommonData("adjointPdUAtPts");
96 matOpsData->insertCommonData("adjointPdUdOmegaAtPts");
97 matOpsData->insertCommonData("adjointPdUdPAtPts");
98 matOpsData->insertCommonData("eigenVals");
99 matOpsData->insertCommonData("eigenVecs");
100 matOpsData->insertCommonData("PAtPts");
101 matOpsData->insertCommonData("PAtPts_du");
102 matOpsData->insertCommonData("plasticH");
103 matOpsData->insertCommonData("plasticFlow");
104 matOpsData->insertCommonData("plasticF");
105 matOpsData->insertCommonData("invPlasticF");
106 }
107
108 boost::shared_ptr<MatOps::MatOpsData> matOpsData;
109};
110
112
113 boost::shared_ptr<AuxiliaryLogarithmicStressData> auxiliaryData;
114 boost::shared_ptr<AuxiliaryLogarithmicStressData> auxiliaryData0;
115 boost::shared_ptr<AuxiliaryLogarithmicStressMaterialData>
117
118 MatrixDouble tractionAtPts;
119
120 MatrixDouble wH1AtPts;
121 MatrixDouble XH1AtPts;
122 MatrixDouble contactL2AtPts;
123 MatrixDouble logStretch2H1AtPts;
125
126 // Constant-mode and higher-mode covectors share the existing vector DOFs.
133 MatrixPtr constantRotation = boost::make_shared<MatrixDouble>();
134 MatrixPtr higherRotation = boost::make_shared<MatrixDouble>();
135 MatrixPtr previousConstantRotation = boost::make_shared<MatrixDouble>();
136 MatrixPtr previousHigherRotation = boost::make_shared<MatrixDouble>();
137
138 MatrixDouble hdOmegaAtPts;
139 MatrixDouble hdLogStretchAtPts;
140 MatrixDouble leviKirchhoffAtPts;
145 MatrixDouble rotMatAtPts;
146 VectorDouble energyAtPts; //< this is density of energy at integration points
147
148 MatrixPtr varConstantRotation = boost::make_shared<MatrixDouble>();
149 MatrixPtr varHigherRotation = boost::make_shared<MatrixDouble>();
150 MatrixDouble varRotAxis;
151 MatrixDouble varGradRotAxis;
152 MatrixDouble varLogStreach;
153 MatrixDouble varPiola;
154 MatrixDouble varDivPiola;
155 MatrixDouble varWL2;
156 MatrixDouble varHybridDispAtPts;
157
158 VectorInt nbUniq;
159 MatrixDouble eigenValsC;
160 MatrixDouble eigenVecsC;
161 VectorInt nbUniqC;
162
163 MatrixDouble matD;
164 MatrixDouble matAxiatorD;
165 MatrixDouble matDeviatorD;
166 MatrixDouble matInvD;
167
169
170 MatrixDouble hybridDispAtPts;
174
175 MatrixDouble gradientAtPts;
176
177 VectorDouble muAtPts;
178 VectorDouble lambdaAtPts;
179 VectorDouble youngModulusAtPts;
180 double piolaScale = 1.;
181
182 static constexpr int SizeSymm = (SPACE_DIM * (SPACE_DIM + 1)) / 2;
183
184 template <class Tensor>
185 static inline auto getFTensor(MatrixDouble &m, const int nb_gauss_pts) {
186 return MatrixSizeHelper<Tensor, DL>::get(m, nb_gauss_pts)();
187 }
188
189 template <class Tensor>
190 static inline auto getFTensor(MatrixPtr m, const int nb_gauss_pts) {
191 return getFTensor<Tensor>(*m, nb_gauss_pts);
192 }
193
194 inline auto getFTensorApproxP(const int nb_gauss_pts) {
195 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
196 matOpsData->getCommonDataPtr("approxPAtPts"), nb_gauss_pts);
197 }
198
199 inline auto getFTensorApproxP0(const int nb_gauss_pts) {
200 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
201 matOpsData->getCommonDataPtr("approxP0AtPts"), nb_gauss_pts);
202 }
203
204 inline auto getFTensorDivP(const int nb_gauss_pts) {
205 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
206 matOpsData->getCommonDataPtr("divPAtPts"), nb_gauss_pts);
207 }
208
209 inline auto getFTensorSmallWL2(const int nb_gauss_pts) {
210 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
211 matOpsData->getCommonDataPtr("wL2AtPts"), nb_gauss_pts);
212 }
213
214 inline auto getFTensorSmallWL2Dot(const int nb_gauss_pts) {
215 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
216 matOpsData->getCommonDataPtr("wL2DotAtPts"), nb_gauss_pts);
217 }
218
219 inline auto getFTensorSmallWL2DotDot(const int nb_gauss_pts) {
220 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
221 matOpsData->getCommonDataPtr("wL2DotDotAtPts"), nb_gauss_pts);
222 }
223
224 inline auto getFTensorLogStretch(const int nb_gauss_pts) {
225 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
226 matOpsData->getCommonDataPtr("logStretchTensorAtPts"), nb_gauss_pts);
227 }
228
229 inline auto getFTensorLogStretch0(const int nb_gauss_pts) {
230 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
231 matOpsData->getCommonDataPtr("logStretchTensor0AtPts"), nb_gauss_pts);
232 }
233
234 inline auto getFTensorLogStretchDot(const int nb_gauss_pts) {
235 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
236 matOpsData->getCommonDataPtr("logStretchDotTensorAtPts"), nb_gauss_pts);
237 }
238
239 inline auto getFTensorGradLogStretchDot(const int nb_gauss_pts) {
240 return getFTensor<GetFTensor2FromMatType<SizeSymm, SPACE_DIM, -1, DL>>(
241 matOpsData->getCommonDataPtr("gradLogStretchDotTensorAtPts"),
242 nb_gauss_pts);
243 }
244
245 inline auto getFTensorRotAxis(const int nb_gauss_pts) {
246 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
247 matOpsData->getCommonDataPtr("rotAxisAtPts"), nb_gauss_pts);
248 }
249
250 inline auto getFTensorRotAxisGrad(const int nb_gauss_pts) {
251 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
252 matOpsData->getCommonDataPtr("rotAxisGradAtPts"), nb_gauss_pts);
253 }
254
255 inline auto getFTensorRotAxisDot(const int nb_gauss_pts) {
256 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
257 matOpsData->getCommonDataPtr("rotAxisDotAtPts"), nb_gauss_pts);
258 }
259
260 inline auto getFTensorRotAxisGradDot(const int nb_gauss_pts) {
261 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
262 matOpsData->getCommonDataPtr("rotAxisGradDotAtPts"), nb_gauss_pts);
263 }
264
265 inline auto getFTensorStretchH1(const int nb_gauss_pts) {
266 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
267 matOpsData->getCommonDataPtr("stretchH1AtPts"), nb_gauss_pts);
268 }
269
270 inline auto getFTensorSmallWGradH1(const int nb_gauss_pts) {
271 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
272 matOpsData->getCommonDataPtr("wGradH1AtPts"), nb_gauss_pts);
273 }
274
275 inline auto getFTensorStretch(const int nb_gauss_pts) {
276 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
277 matOpsData->getCommonDataPtr("stretchTensorAtPts"), nb_gauss_pts);
278 }
279
280 inline auto getFTensorDiffStretchH1(const int nb_gauss_pts) {
281 return getFTensor<GetFTensor4FromMatType<SPACE_DIM, SPACE_DIM, SPACE_DIM,
282 SPACE_DIM, -1, DL>>(
283 matOpsData->getCommonDataPtr("diffStretchH1AtPts"), nb_gauss_pts);
284 }
285
286 inline auto getFTensorDiffStretch(const int nb_gauss_pts) {
287 return getFTensor<GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
288 matOpsData->getCommonDataPtr("diffStretchTensorAtPts"), nb_gauss_pts);
289 }
290
291 inline auto getFTensorSmallH(const int nb_gauss_pts) {
292 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
293 matOpsData->getCommonDataPtr("hAtPts"), nb_gauss_pts);
294 }
295
296 inline auto getFTensorPlasticH(const int nb_gauss_pts) {
297 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
298 matOpsData->getCommonDataPtr("plasticH"), nb_gauss_pts);
299 }
300
301 inline auto getFTensorPlasticF(const int nb_gauss_pts) {
302 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
303 matOpsData->getCommonDataPtr("plasticF"), nb_gauss_pts);
304 }
305
306 inline auto getFTensorInvPlasticF(const int nb_gauss_pts) {
307 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
308 matOpsData->getCommonDataPtr("invPlasticF"), nb_gauss_pts);
309 }
310
311 inline auto getFTensorAdjointPdstretch(const int nb_gauss_pts) {
312 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
313 matOpsData->getCommonDataPtr("adjointPdstretchAtPts"), nb_gauss_pts);
314 }
315
316 inline auto getFTensorAdjointPdU(const int nb_gauss_pts) {
317 return getFTensor<GetFTensor1FromMatType<SizeSymm, -1, DL>>(
318 matOpsData->getCommonDataPtr("adjointPdUAtPts"), nb_gauss_pts);
319 }
320
321 inline auto getFTensorAdjointPdUdOmega(const int nb_gauss_pts,
322 const int mode = 1,
323 const int point = 0) {
324 return GetFTensor2FromMatImpl<3, SizeSymm, -1, DL, MatrixDouble>::get(
327 point, 0);
328 }
329
330 inline auto getFTensorAdjointPdUdP(const int nb_gauss_pts) {
331 return getFTensor<
332 GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SizeSymm, -1, DL>>(
333 matOpsData->getCommonDataPtr("adjointPdUdPAtPts"), nb_gauss_pts);
334 }
335
336 inline auto getFTensorEigenVals(const int nb_gauss_pts) {
337 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
338 matOpsData->getCommonDataPtr("eigenVals"), nb_gauss_pts);
339 }
340
341 inline auto getFTensorEigenVecs(const int nb_gauss_pts) {
342 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
343 matOpsData->getCommonDataPtr("eigenVecs"), nb_gauss_pts);
344 }
345
347 return matOpsData->getCommonDataPtr("approxPAtPts");
348 }
349
351 return matOpsData->getCommonDataPtr("approxP0AtPts");
352 }
353
355 return matOpsData->getCommonDataPtr("PAtPts");
356 }
357
359 return matOpsData->getCommonDataPtr("diffStretchH1AtPts");
360 }
361
363 return matOpsData->getCommonDataPtr("stretchH1AtPts");
364 }
365
367 return matOpsData->getCommonDataPtr("adjointPdstretchAtPts");
368 }
369
371 return matOpsData->getCommonDataPtr("adjointPdUAtPts");
372 }
373
375 return matOpsData->getCommonDataPtr("adjointPdUdOmegaAtPts");
376 }
377
379 return matOpsData->getCommonDataPtr("adjointPdUdPAtPts");
380 }
381
383 return matOpsData->getCommonDataPtr("eigenVals");
384 }
385
387 return matOpsData->getCommonDataPtr("eigenVecs");
388 }
389
391 return matOpsData->getCommonDataPtr("divPAtPts");
392 }
393
395 return matOpsData->getCommonDataPtr("wL2AtPts");
396 }
397
399 return matOpsData->getCommonDataPtr("wL2DotAtPts");
400 }
401
403 return matOpsData->getCommonDataPtr("wL2DotDotAtPts");
404 }
405
407 return matOpsData->getCommonDataPtr("logStretchTensorAtPts");
408 }
409
411 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
413 }
414
416 return matOpsData->getCommonDataPtr("logStretchTensor0AtPts");
417 }
418
420 return matOpsData->getCommonDataPtr("stretchTensorAtPts");
421 }
422
424 return matOpsData->getCommonDataPtr("diffStretchTensorAtPts");
425 }
426
428 return matOpsData->getCommonDataPtr("hAtPts");
429 }
430
432 return matOpsData->getCommonDataPtr("plasticH");
433 }
434
436 return matOpsData->getCommonDataPtr("plasticFlow");
437 }
438
440 return matOpsData->getCommonDataPtr("plasticF");
441 }
442
444 return matOpsData->getCommonDataPtr("invPlasticF");
445 }
446
448 return matOpsData->getCommonDataPtr("logStretchDotTensorAtPts");
449 }
450
452 return matOpsData->getCommonDataPtr("gradLogStretchDotTensorAtPts");
453 }
454
456 return matOpsData->getCommonDataPtr("rotAxisAtPts");
457 }
458
460 return matOpsData->getCommonDataPtr("rotAxisGradAtPts");
461 }
462
464 return matOpsData->getCommonDataPtr("rotAxisDotAtPts");
465 }
466
468 return matOpsData->getCommonDataPtr("rotAxisGradDotAtPts");
469 }
470
472 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matD);
473 }
474
476 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matInvD);
477 }
478
480 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wH1AtPts);
481 }
482
484 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &XH1AtPts);
485 }
486
488 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &contactL2AtPts);
489 }
490
492 return matOpsData->getCommonDataPtr("wGradH1AtPts");
493 }
494
496 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
498 };
499
501 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varRotAxis);
502 }
503
505 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varGradRotAxis);
506 }
507
509 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varLogStreach);
510 }
511
513 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varPiola);
514 }
515
517 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varDivPiola);
518 }
519
521 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varWL2);
522 }
523
525 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
527 }
528
530 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
532 }
533
535 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
537 }
538
540 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
542 }
543
545 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &gradientAtPts);
546 }
547
549 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotMatAtPts);
550 }
551
552 inline auto getFTensorEigenValsC(const int nb_gauss_pts) {
553 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(eigenValsC,
554 nb_gauss_pts);
555 }
556
557 inline auto getFTensorEigenVecsC(const int nb_gauss_pts) {
558 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
559 eigenVecsC, nb_gauss_pts);
560 }
561
562 inline auto getFTensorTraction(const int nb_gauss_pts) {
563 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(tractionAtPts,
564 nb_gauss_pts);
565 }
566
567 inline auto getFTensorLogStretch2H1(const int nb_gauss_pts) {
568 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
569 logStretch2H1AtPts, nb_gauss_pts);
570 }
571
572 inline auto getFTensorLogStretchTotal(const int nb_gauss_pts) {
573 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
574 logStretchTotalTensorAtPts, nb_gauss_pts);
575 }
576
577 inline auto getFTensorSmallHdOmega(const int nb_gauss_pts, const int mode = 1,
578 const int point = 0) {
579 return GetFTensor3FromMatImpl<3, 3, 3, -1, DL, MatrixDouble>::get(
580 mode ? hdOmegaAtPts : constantRotationLinearization.h, point, 0);
581 }
582
583 inline auto getFTensorSmallHdLogStretch(const int nb_gauss_pts) {
584 return getFTensor<
585 GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SizeSymm, -1, DL>>(
586 hdLogStretchAtPts, nb_gauss_pts);
587 }
588
589 inline auto getFTensorLeviKirchhoff(const int nb_gauss_pts,
590 const int mode = 1, const int point = 0) {
591 return GetFTensor1FromMatImpl<3, -1, DL, MatrixDouble>::get(
593 0);
594 }
595
596 inline auto getFTensorLeviKirchhoff0(const int nb_gauss_pts,
597 const int mode = 1,
598 const int point = 0) {
599 return GetFTensor1FromMatImpl<3, -1, DL, MatrixDouble>::get(
601 point, 0);
602 }
603
604 inline auto getFTensorLeviKirchhoffdOmega(const int nb_gauss_pts,
605 const int row_mode = 1,
606 const int col_mode = 1,
607 const int point = 0) {
608 auto &matrix = row_mode ? (col_mode ? leviKirchhoffdOmegaAtPts
610 : (col_mode ? constantHigherRotationSecond
612 return GetFTensor2FromMatImpl<3, 3, -1, DL, MatrixDouble>::get(matrix,
613 point, 0);
614 }
615
616 inline auto getFTensorLeviKirchhoffdLogStretch(const int nb_gauss_pts,
617 const int mode = 1,
618 const int point = 0) {
619 return GetFTensor2FromMatImpl<3, SizeSymm, -1, DL, MatrixDouble>::get(
622 point, 0);
623 }
624
625 inline auto getFTensorLeviKirchhoffP(const int nb_gauss_pts,
626 const int mode = 1,
627 const int point = 0) {
628 return GetFTensor3FromMatImpl<3, 3, 3, -1, DL, MatrixDouble>::get(
630 0);
631 }
632
633 inline auto getFTensorRotMat(const int nb_gauss_pts) {
634 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
635 rotMatAtPts, nb_gauss_pts);
636 }
637
638 inline auto getFTensorVarRotAxis(const int nb_gauss_pts) {
639 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(varRotAxis,
640 nb_gauss_pts);
641 }
642
643 inline auto getFTensorVarGradRotAxis(const int nb_gauss_pts) {
644 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
645 varGradRotAxis, nb_gauss_pts);
646 }
647
648 inline auto getFTensorVarLogStreach(const int nb_gauss_pts) {
649 return getFTensor<GetFTensor1FromMatType<SizeSymm, -1, DL>>(varLogStreach,
650 nb_gauss_pts);
651 }
652
653 inline auto getFTensorVarPiola(const int nb_gauss_pts) {
654 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
655 varPiola, nb_gauss_pts);
656 }
657
658 inline auto getFTensorDivVarPiola(const int nb_gauss_pts) {
659 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(varDivPiola,
660 nb_gauss_pts);
661 }
662
663 inline auto getFTensorVarWL2(const int nb_gauss_pts) {
664 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(varWL2,
665 nb_gauss_pts);
666 }
667
668 inline auto getFTensorInternalStress(const int nb_gauss_pts) {
669 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
670 internalStressAtPts, nb_gauss_pts);
671 }
672
673 inline auto getFTensorInternalStressVec(const int nb_gauss_pts) {
674 return getFTensor<GetFTensor1FromMatType<SPACE_DIM * SPACE_DIM, -1, DL>>(
675 internalStressAtPts, nb_gauss_pts);
676 }
677
678 inline auto getFTensorSmallWH1(const int nb_gauss_pts) {
679 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(wH1AtPts,
680 nb_gauss_pts);
681 }
682
683 inline auto getFTensorSmallHybridDisp(const int nb_gauss_pts) {
684 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
685 hybridDispAtPts, nb_gauss_pts);
686 }
687
688 inline auto getFTensorGradHybridDisp(const int nb_gauss_pts) {
689 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
690 gradHybridDispAtPts, nb_gauss_pts);
691 }
692
693 inline auto getFTensorFaceMaterialForce(const int nb_gauss_pts) {
694 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
695 faceMaterialForceAtPts, nb_gauss_pts);
696 }
697
698 boost::shared_ptr<PhysicalEquations> physicsPtr;
699};
700
701struct OpJacobian;
702
703// Forward declarations
704struct ExternalStrain;
705using ExternalStrainVec = std::vector<ExternalStrain>;
706
708 using Map = OpPostProcMapInMoab<SPACE_DIM, SPACE_DIM>;
709 Map::DataMapVec scalarFields;
710 Map::DataMapMat vectorFields;
711 Map::DataMapMat symmetricFields;
712};
713
715
721 Meta, //< Metamaterial model, that is using off the shelf MatOps
722 // functionality
724 };
725
726 enum Feature {
727 DIRECT_STRETCH = 0, ///< Direct stretch formulation
728 NO_STRETCH_LINEAR, ///< No-stretch linear formulation
729 NO_STRETCH_NONLINEAR, ///< No-stretch nonlinear formulation
730 AUXILIARY_LOGARITHMIC_STRESS, ///< Auxiliary logarithmic stress formulation
733 };
734
735 using Features = std::bitset<LAST_FEATURE>;
738
740 CURRENT, ///< Current state of the field
741 PREVIOUS ///< Previous state of the field
742 };
743
746 virtual ~PhysicalEquations() = default;
747
748 /// Select and configure the material before registering fields and DMs.
749 static MoFEMErrorCode create(EshelbianCore &ep);
750
751 /// Check material capabilities after geometry and boundary setup.
752 MoFEMErrorCode checkSetup(const EshelbianCore &ep) const;
753
755 /// Test individual bits or compare (getFeatures() & mask) with a feature
756 /// mask.
757 const Features &getFeatures() const { return materialFeatures; }
758
760 std::string name;
761 int order;
763 };
764
765 /// USER_BASE L2 fields; negative order retains an inactive field
766 /// registration.
767 std::vector<FieldDefinition>
769
770 /// Active material unknowns used by the element, DMs and field split.
771 std::vector<std::string> getMaterialFields(const EshelbianCore &ep) const;
772
773 /// Material-dependent blocks; each pair also represents its transpose.
774 std::vector<std::pair<std::string, std::string>>
775 getMaterialCouplings(const EshelbianCore &ep) const;
776 std::vector<std::pair<std::string, std::string>>
777 getMaterialEmptyBlocks(const EshelbianCore &ep) const;
778
779 /// Evaluate the selected fields, or recover stretch from the matching stress.
780 MoFEMErrorCode
782 boost::ptr_deque<UserDataOperator> &pipeline,
783 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
785
786 MoFEMErrorCode
788 boost::ptr_deque<UserDataOperator> &pipeline,
789 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
790
791 /// Evaluate constitutive data after kinematics and before material assembly.
792 MoFEMErrorCode pushMaterialEvaluation(
793 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
794 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool rhs, bool lhs);
795
796 /// Contract material curvature for the incremental material-energy adjoint.
797 virtual bool providesHelmholtzCurvature() const { return false; }
798
799 virtual MoFEMErrorCode
800 evaluateHelmholtzCurvature(EntityHandle entity, int gauss_point,
803
804 /// Pure material Hessian in five orthonormal deviatoric log-strain
805 /// coordinates. Evaluated at the current elastic base, without any adjoint
806 /// contraction.
807 virtual MoFEMErrorCode evaluateElasticLogarithmicMaterialHessian(
808 EntityHandle entity, int gauss_point, DataAtIntegrationPts &data,
809 const FTensor::Tensor2_symmetric<double, 3> &elastic_log_stretch,
811
812 /// Assemble the physical Helmholtz state derivative at equilibrium.
813 virtual MoFEMErrorCode
815 boost::ptr_deque<UserDataOperator> &pipeline,
816 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
817
818 MoFEMErrorCode
820 boost::ptr_deque<UserDataOperator> &pipeline,
821 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
822 boost::shared_ptr<MatrixDouble> strain_ptr = nullptr,
823 boost::shared_ptr<MatrixDouble> stress_ptr = nullptr);
824
825 MoFEMErrorCode
827 boost::ptr_deque<UserDataOperator> &pipeline,
828 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
829
830 MoFEMErrorCode
832 boost::ptr_deque<UserDataOperator> &pipeline,
833 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
834
835 MoFEMErrorCode
837 boost::ptr_deque<UserDataOperator> &pipeline,
838 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
839 boost::shared_ptr<double> total_energy_ptr);
840
841 MoFEMErrorCode
843 boost::ptr_deque<UserDataOperator> &pipeline,
844 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
845
846 MoFEMErrorCode pushPostProc(const EshelbianCore &ep,
847 boost::ptr_deque<UserDataOperator> &pipeline,
848 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
849 MaterialPostProcData &output);
850
851 MoFEMErrorCode pushMaterialVariation(
852 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
853 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
854 SmartPetscObj<Vec> variation, MaterialPostProcData *output = nullptr);
855
856 MoFEMErrorCode pushPostProcResidual(
857 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
858 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
859 SmartPetscObj<Vec> residual, MaterialPostProcData &output);
860
861 MoFEMErrorCode pushSkeletonEvaluation(
862 const EshelbianCore &ep, VolumeElementForcesAndSourcesCoreOnSide &fe,
863 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
864 SmartPetscObj<Vec> residual, MaterialPostProcData &output);
865
866 /// Assemble the selected material field group after kinematic reconstruction.
867 virtual MoFEMErrorCode pushAuxiliaryLogarithmicStressOps(
868 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
869 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool lhs);
870
871 /// Evaluate the auxiliary material copy and energies without assembly.
872 virtual MoFEMErrorCode pushAuxiliaryLogarithmicMaterialEvaluation(
873 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
874 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool lhs = false);
875
876 virtual UserDataOperator *
877 returnOpJacobian(const bool eval_rhs, const bool eval_lhs,
878 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
879 boost::shared_ptr<PhysicalEquations> physics_ptr);
880
881 virtual VolUserDataOperator *
882 returnOpSpatialPhysical(const std::string &field_name,
883 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
884 const double alpha_u);
885
887 const std::string &field_name,
888 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
889 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
890 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
891
893 std::string row_field, std::string col_field,
894 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha);
895
896 virtual VolUserDataOperator *
897 returnOpTopoSpatialPhysical(const std::string &field_name,
898 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
899 SmartPetscObj<Vec> assemble_vec,
900 boost::shared_ptr<TopologicalData> topo_ptr,
901 const double alpha_u,
902 boost::shared_ptr<double> J_ptr);
903
905 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
906 boost::shared_ptr<double> total_helmholtz_free_energy_ptr);
907
908 /** True when the material supplies its Helmholtz free energy. */
909 virtual bool providesHelmholtzFreeEnergy() const;
910
912 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
913 boost::shared_ptr<PhysicalEquations> physics_ptr,
914 boost::shared_ptr<MatrixDouble> strain_ptr = nullptr);
915
917 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
918 boost::shared_ptr<PhysicalEquations> physics_ptr,
919 boost::shared_ptr<MatrixDouble> strain_ptr,
920 VectorPtr external_pressure_ptr);
921
923 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
924 boost::shared_ptr<PhysicalEquations> physics_ptr,
925 boost::shared_ptr<MatrixDouble> strain_ptr,
926 boost::shared_ptr<MatrixDouble> stress_ptr,
927 VectorPtr external_pressure_ptr);
928
930 VectorPtr external_pressure_ptr,
931 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
932 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
933
935 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
936 boost::shared_ptr<PhysicalEquations> physics_ptr);
937
938private:
940 return (materialFeatures & noStretchMask).any() || materialModel == Hencky;
941 }
942
943 static MoFEMErrorCode checkOptions(const EshelbianCore &ep,
944 MaterialModel material_model,
947
948protected:
950};
951
952struct BcDisp {
953 BcDisp(std::string name, std::vector<double> attr, Range faces,
954 std::string load_history_file = "");
955 std::string blockName;
956 std::string loadHistoryFile;
958 VectorDouble3 vals;
959 VectorInt3 flags;
960};
961using BcDispVec = std::vector<BcDisp>;
962
963struct BcRot {
964 BcRot(std::string name, std::vector<double> attr, Range faces,
965 std::string load_history_file = "");
966 std::string blockName;
967 std::string loadHistoryFile;
969 VectorDouble vals;
970 double theta;
971};
972using BcRotVec = std::vector<BcRot>;
973
974typedef std::vector<Range> TractionFreeBc;
975
977 TractionBc(std::string name, std::vector<double> attr, Range faces,
978 std::string load_history_file = "");
979 std::string blockName;
980 std::string loadHistoryFile;
982 VectorDouble3 vals;
983 VectorInt3 flags;
984};
985using TractionBcVec = std::vector<TractionBc>;
986
988 NormalDisplacementBc(std::string name, std::vector<double> attr, Range faces,
989 std::string load_history_file = "");
990 std::string blockName;
991 std::string loadHistoryFile;
993 double val;
994};
995using NormalDisplacementBcVec = std::vector<NormalDisplacementBc>;
996
997struct SpringBc {
998 SpringBc(std::string name, std::vector<double> attr, Range faces);
999 std::string blockName;
1003};
1004using SpringBcVec = std::vector<SpringBc>;
1005
1007 AnalyticalDisplacementBc(std::string name, std::vector<double> attr,
1008 Range faces, std::string load_history_file = "");
1009 std::string blockName;
1011 VectorInt3 flags;
1012};
1013using AnalyticalDisplacementBcVec = std::vector<AnalyticalDisplacementBc>;
1014
1016 AnalyticalTractionBc(std::string name, std::vector<double> attr, Range faces,
1017 std::string load_history_file = "");
1018 std::string blockName;
1020 VectorInt3 flags;
1021};
1022using AnalyticalTractionBcVec = std::vector<AnalyticalTractionBc>;
1023
1025 PressureBc(std::string name, std::vector<double> attr, Range faces,
1026 std::string load_history_file = "");
1027 std::string blockName;
1028 std::string loadHistoryFile;
1030 double val;
1031};
1032using PressureBcVec = std::vector<PressureBc>;
1033
1035 ExternalStrain(std::string name, std::vector<double> attr, Range ents,
1036 std::string load_history_file = "");
1037 std::string blockName;
1038 std::string loadHistoryFile;
1040 double val;
1042};
1043
1044template <typename OP_PTR>
1045std::tuple<std::string, MatrixDouble>
1046getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr,
1047 const std::string block_name);
1048
1049template <typename OP_PTR>
1050std::tuple<std::string, VectorDouble>
1051getAnalyticalExternalStrain(OP_PTR op_ptr, VectorDouble &analytical_expr,
1052 const std::string block_name);
1053
1054template <typename OP_PTR>
1055VectorDouble getAnalyticalElastic(OP_PTR op_ptr, const std::string block_name);
1056
1057MatrixDouble analytical_expr_function(double delta_t, double t,
1058 int nb_gauss_pts,
1059 MatrixDouble &m_ref_coords,
1060 MatrixDouble &m_ref_normals,
1061 const std::string block_name);
1062
1063VectorDouble analytical_externalstrain_function(double delta_t, double t,
1064 int nb_gauss_pts,
1065 MatrixDouble &m_ref_coords,
1066 const std::string block_name);
1067
1068VectorDouble analytical_elastic_function(double delta_t, double t,
1069 int nb_gauss_pts,
1070 MatrixDouble &m_ref_coords,
1071 const std::string block_name);
1072
1074#include "EshelbianCore.hpp"
1075#include "EshelbianOperators.hpp"
1076
1077} // namespace EshelbianPlasticity
1078
1079#endif //__ESHELBIAN_PLASTICITY_HPP__
Analytical expression Python bridge.
constexpr int SPACE_DIM
constexpr auto A
boost::shared_ptr< DataAtIntegrationPts > data
SmartPetscObj< Vec > residual
std::string name
constexpr int SPACE_DIM
const char features[]
VectorDouble analytical_externalstrain_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_ref_coords, const std::string block_name)
boost::shared_ptr< MatrixDouble > MatrixPtr
std::vector< AnalyticalTractionBc > AnalyticalTractionBcVec
std::vector< TractionBc > TractionBcVec
std::tuple< std::string, VectorDouble > getAnalyticalExternalStrain(OP_PTR op_ptr, VectorDouble &analytical_expr, const std::string block_name)
std::vector< AnalyticalDisplacementBc > AnalyticalDisplacementBcVec
std::vector< PressureBc > PressureBcVec
std::vector< SpringBc > SpringBcVec
std::tuple< std::string, MatrixDouble > getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr, const std::string block_name)
VectorDouble analytical_elastic_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_ref_coords, const std::string block_name)
std::vector< Range > TractionFreeBc
std::vector< ExternalStrain > ExternalStrainVec
VectorDouble getAnalyticalElastic(OP_PTR op_ptr, const std::string block_name)
std::vector< BcRot > BcRotVec
std::vector< NormalDisplacementBc > NormalDisplacementBcVec
FaceElementForcesAndSourcesCore::UserDataOperator FaceUserDataOperator
PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::FaceSideEle EleOnSide
MatrixDouble analytical_expr_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_ref_coords, MatrixDouble &m_ref_normals, const std::string block_name)
std::vector< BcDisp > BcDispVec
boost::shared_ptr< VectorDouble > VectorPtr
boost::shared_ptr< MatOpsData > createMatOpsDataPtr()
Definition MatOps.cpp:709
constexpr double t
plate stiffness
Definition plate.cpp:58
constexpr auto field_name
FTensor::Index< 'm', 3 > m
auto getFTensorLeviKirchhoff(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorAdjointPdUdOmega(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorLogStretchDot(const int nb_gauss_pts)
auto getFTensorLeviKirchhoffP(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorLeviKirchhoffdLogStretch(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorVarGradRotAxis(const int nb_gauss_pts)
auto getFTensorEigenVecsC(const int nb_gauss_pts)
auto getFTensorSmallWL2Dot(const int nb_gauss_pts)
auto getFTensorRotAxisGrad(const int nb_gauss_pts)
auto getFTensorSmallHdLogStretch(const int nb_gauss_pts)
auto getFTensorAdjointPdstretch(const int nb_gauss_pts)
auto getFTensorSmallHybridDisp(const int nb_gauss_pts)
auto getFTensorVarRotAxis(const int nb_gauss_pts)
auto getFTensorGradHybridDisp(const int nb_gauss_pts)
auto getFTensorVarLogStreach(const int nb_gauss_pts)
auto getFTensorRotAxisDot(const int nb_gauss_pts)
auto getFTensorSmallHdOmega(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorLeviKirchhoff0(const int nb_gauss_pts, const int mode=1, const int point=0)
auto getFTensorInternalStressVec(const int nb_gauss_pts)
auto getFTensorInternalStress(const int nb_gauss_pts)
auto getFTensorSmallWL2DotDot(const int nb_gauss_pts)
auto getFTensorEigenValsC(const int nb_gauss_pts)
auto getFTensorLeviKirchhoffdOmega(const int nb_gauss_pts, const int row_mode=1, const int col_mode=1, const int point=0)
auto getFTensorLogStretchTotal(const int nb_gauss_pts)
static auto getFTensor(MatrixDouble &m, const int nb_gauss_pts)
auto getFTensorDiffStretchH1(const int nb_gauss_pts)
auto getFTensorFaceMaterialForce(const int nb_gauss_pts)
auto getFTensorLogStretch2H1(const int nb_gauss_pts)
auto getFTensorSmallWGradH1(const int nb_gauss_pts)
auto getFTensorLogStretch0(const int nb_gauss_pts)
auto getFTensorInvPlasticF(const int nb_gauss_pts)
auto getFTensorDivVarPiola(const int nb_gauss_pts)
auto getFTensorAdjointPdU(const int nb_gauss_pts)
boost::shared_ptr< AuxiliaryLogarithmicStressData > auxiliaryData0
auto getFTensorRotAxisGradDot(const int nb_gauss_pts)
auto getFTensorLogStretch(const int nb_gauss_pts)
auto getFTensorGradLogStretchDot(const int nb_gauss_pts)
boost::shared_ptr< AuxiliaryLogarithmicStressData > auxiliaryData
boost::shared_ptr< PhysicalEquations > physicsPtr
auto getFTensorAdjointPdUdP(const int nb_gauss_pts)
static auto getFTensor(MatrixPtr m, const int nb_gauss_pts)
auto getFTensorDiffStretch(const int nb_gauss_pts)
boost::shared_ptr< AuxiliaryLogarithmicStressMaterialData > auxiliaryMaterialData
boost::shared_ptr< MatOps::MatOpsData > matOpsData
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > Map
MoFEMErrorCode pushMaterialRates(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
virtual MoFEMErrorCode pushHelmholtzStateGradient(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
Assemble the physical Helmholtz state derivative at equilibrium.
MoFEMErrorCode pushMaterialFields(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, FieldState state=CURRENT)
Evaluate the selected fields, or recover stretch from the matching stress.
std::vector< FieldDefinition > getMaterialFieldDefinitions(const EshelbianCore &ep) const
virtual VolUserDataOperator * returnOpCalculateExternalPressure(VectorPtr external_pressure_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
std::vector< std::pair< std::string, std::string > > getMaterialEmptyBlocks(const EshelbianCore &ep) const
MoFEMErrorCode pushPostProcResidual(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > residual, MaterialPostProcData &output)
virtual VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
MoFEMErrorCode pushEnergyEvaluation(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
MoFEMErrorCode checkSetup(const EshelbianCore &ep) const
Check material capabilities after geometry and boundary setup.
MoFEMErrorCode pushMaterialEvaluation(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, bool rhs, bool lhs)
Evaluate constitutive data after kinematics and before material assembly.
MoFEMErrorCode pushMaterialResidual(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
virtual UserDataOperator * returnOpJacobian(const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
virtual VolUserDataOperator * returnOpSpatialPhysicalExternalStrain(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpCalculateHelmholtzFreeEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_helmholtz_free_energy_ptr)
static MoFEMErrorCode create(EshelbianCore &ep)
Select and configure the material before registering fields and DMs.
virtual MoFEMErrorCode pushAuxiliaryLogarithmicStressOps(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, bool lhs)
Assemble the selected material field group after kinematic reconstruction.
MoFEMErrorCode pushMaterialTangent(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
virtual MoFEMErrorCode evaluateElasticLogarithmicMaterialHessian(EntityHandle entity, int gauss_point, DataAtIntegrationPts &data, const FTensor::Tensor2_symmetric< double, 3 > &elastic_log_stretch, FTensor::Tensor2< double, 5, 5 > &hessian)
MoFEMErrorCode pushSkeletonEvaluation(const EshelbianCore &ep, VolumeElementForcesAndSourcesCoreOnSide &fe, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > residual, MaterialPostProcData &output)
MoFEMErrorCode pushMaterialForceFields(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
std::vector< std::string > getMaterialFields(const EshelbianCore &ep) const
Active material unknowns used by the element, DMs and field split.
virtual bool providesHelmholtzFreeEnergy() const
virtual bool providesHelmholtzCurvature() const
Contract material curvature for the incremental material-energy adjoint.
PhysicalEquations(MaterialModel model, Features features)
virtual VolUserDataOperator * returnOpTopoSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > assemble_vec, boost::shared_ptr< TopologicalData > topo_ptr, const double alpha_u, boost::shared_ptr< double > J_ptr)
@ NO_STRETCH_LINEAR
No-stretch linear formulation.
@ DIRECT_STRETCH
Direct stretch formulation.
@ AUXILIARY_LOGARITHMIC_STRESS
Auxiliary logarithmic stress formulation.
@ NO_STRETCH_NONLINEAR
No-stretch nonlinear formulation.
virtual MoFEMErrorCode pushAuxiliaryLogarithmicMaterialEvaluation(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, bool lhs=false)
Evaluate the auxiliary material copy and energies without assembly.
virtual MoFEMErrorCode evaluateHelmholtzCurvature(EntityHandle entity, int gauss_point, DataAtIntegrationPts &data, LogarithmicMaterialCurvature &curvature)
virtual VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr, boost::shared_ptr< MatrixDouble > strain_ptr=nullptr)
static MoFEMErrorCode checkOptions(const EshelbianCore &ep, MaterialModel material_model, Features features)
std::vector< std::pair< std::string, std::string > > getMaterialCouplings(const EshelbianCore &ep) const
Material-dependent blocks; each pair also represents its transpose.
virtual VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
MoFEMErrorCode pushStretchFromStress(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< MatrixDouble > strain_ptr=nullptr, boost::shared_ptr< MatrixDouble > stress_ptr=nullptr)
MoFEMErrorCode pushPostProc(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, MaterialPostProcData &output)
MoFEMErrorCode pushMaterialVariation(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > variation, MaterialPostProcData *output=nullptr)
Data on single entity (This is passed as argument to DataOperator::doWork)