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
61struct TopologicalData;
64struct EshelbianCore;
65
66struct AnalyticalExprPython;
67
69 : public boost::enable_shared_from_this<MatOpsDataAtIntegrationPts> {
70
73 matOpsData->insertCommonData("approxPAtPts");
74 matOpsData->insertCommonData("approxP0AtPts");
75 matOpsData->insertCommonData("divPAtPts");
76 matOpsData->insertCommonData("wL2AtPts");
77 matOpsData->insertCommonData("wL2DotAtPts");
78 matOpsData->insertCommonData("wL2DotDotAtPts");
79 matOpsData->insertCommonData("logStretchTensorAtPts");
80 matOpsData->insertCommonData("logStretchTensor0AtPts");
81 matOpsData->insertCommonData("logStretchDotTensorAtPts");
82 matOpsData->insertCommonData("gradLogStretchDotTensorAtPts");
83 matOpsData->insertCommonData("rotAxisAtPts");
84 matOpsData->insertCommonData("rotAxis0AtPts");
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> auxiliaryMaterialData;
116
117 MatrixDouble tractionAtPts;
118
119 MatrixDouble wH1AtPts;
120 MatrixDouble XH1AtPts;
121 MatrixDouble contactL2AtPts;
122 MatrixDouble logStretch2H1AtPts;
124
125 MatrixDouble hdOmegaAtPts;
126 MatrixDouble hdLogStretchAtPts;
127 MatrixDouble leviKirchhoffAtPts;
132 MatrixDouble rotMatAtPts;
133 VectorDouble energyAtPts; //< this is density of energy at integration points
134
135 MatrixDouble varRotAxis;
136 MatrixDouble varGradRotAxis;
137 MatrixDouble varLogStreach;
138 MatrixDouble varPiola;
139 MatrixDouble varDivPiola;
140 MatrixDouble varWL2;
141 MatrixDouble varHybridDispAtPts;
142
143 VectorInt nbUniq;
144 MatrixDouble eigenValsC;
145 MatrixDouble eigenVecsC;
146 VectorInt nbUniqC;
147
148 MatrixDouble matD;
149 MatrixDouble matAxiatorD;
150 MatrixDouble matDeviatorD;
151 MatrixDouble matInvD;
152
154
155 MatrixDouble hybridDispAtPts;
159
160 MatrixDouble gradientAtPts;
161
162 VectorDouble muAtPts;
163 VectorDouble lambdaAtPts;
164 VectorDouble youngModulusAtPts;
165 double piolaScale = 1.;
166
167 static constexpr int SizeSymm = (SPACE_DIM * (SPACE_DIM + 1)) / 2;
168
169 template <class Tensor>
170 static inline auto getFTensor(MatrixDouble &m, const int nb_gauss_pts) {
171 return MatrixSizeHelper<Tensor, DL>::get(m, nb_gauss_pts)();
172 }
173
174 template <class Tensor>
175 static inline auto getFTensor(MatrixPtr m, const int nb_gauss_pts) {
176 return getFTensor<Tensor>(*m, nb_gauss_pts);
177 }
178
179 inline auto getFTensorApproxP(const int nb_gauss_pts) {
180 return getFTensor<
181 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
182 matOpsData->getCommonDataPtr("approxPAtPts"), nb_gauss_pts);
183 }
184
185 inline auto getFTensorApproxP0(const int nb_gauss_pts) {
186 return getFTensor<
187 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
188 matOpsData->getCommonDataPtr("approxP0AtPts"), nb_gauss_pts);
189 }
190
191 inline auto getFTensorDivP(const int nb_gauss_pts) {
192 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
193 matOpsData->getCommonDataPtr("divPAtPts"), nb_gauss_pts);
194 }
195
196 inline auto getFTensorSmallWL2(const int nb_gauss_pts) {
197 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
198 matOpsData->getCommonDataPtr("wL2AtPts"), nb_gauss_pts);
199 }
200
201 inline auto getFTensorSmallWL2Dot(const int nb_gauss_pts) {
202 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
203 matOpsData->getCommonDataPtr("wL2DotAtPts"), nb_gauss_pts);
204 }
205
206 inline auto getFTensorSmallWL2DotDot(const int nb_gauss_pts) {
207 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
208 matOpsData->getCommonDataPtr("wL2DotDotAtPts"), nb_gauss_pts);
209 }
210
211 inline auto getFTensorLogStretch(const int nb_gauss_pts) {
212 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
213 matOpsData->getCommonDataPtr("logStretchTensorAtPts"),
214 nb_gauss_pts);
215 }
216
217 inline auto getFTensorLogStretch0(const int nb_gauss_pts) {
218 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
219 matOpsData->getCommonDataPtr("logStretchTensor0AtPts"),
220 nb_gauss_pts);
221 }
222
223 inline auto getFTensorLogStretchDot(const int nb_gauss_pts) {
224 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
225 matOpsData->getCommonDataPtr("logStretchDotTensorAtPts"),
226 nb_gauss_pts);
227 }
228
229 inline auto getFTensorGradLogStretchDot(const int nb_gauss_pts) {
230 return getFTensor<GetFTensor2FromMatType<SizeSymm, SPACE_DIM, -1, DL>>(
231 matOpsData->getCommonDataPtr("gradLogStretchDotTensorAtPts"),
232 nb_gauss_pts);
233 }
234
235 inline auto getFTensorRotAxis(const int nb_gauss_pts) {
236 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
237 matOpsData->getCommonDataPtr("rotAxisAtPts"), nb_gauss_pts);
238 }
239
240 inline auto getFTensorRotAxis0(const int nb_gauss_pts) {
241 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
242 matOpsData->getCommonDataPtr("rotAxis0AtPts"), nb_gauss_pts);
243 }
244
245 inline auto getFTensorRotAxisGrad(const int nb_gauss_pts) {
246 return getFTensor<
247 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
248 matOpsData->getCommonDataPtr("rotAxisGradAtPts"), nb_gauss_pts);
249 }
250
251 inline auto getFTensorRotAxisDot(const int nb_gauss_pts) {
252 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
253 matOpsData->getCommonDataPtr("rotAxisDotAtPts"), nb_gauss_pts);
254 }
255
256 inline auto getFTensorRotAxisGradDot(const int nb_gauss_pts) {
257 return getFTensor<
258 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
259 matOpsData->getCommonDataPtr("rotAxisGradDotAtPts"), nb_gauss_pts);
260 }
261
262 inline auto getFTensorStretchH1(const int nb_gauss_pts) {
263 return getFTensor<
264 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
265 matOpsData->getCommonDataPtr("stretchH1AtPts"), nb_gauss_pts);
266 }
267
268 inline auto getFTensorSmallWGradH1(const int nb_gauss_pts) {
269 return getFTensor<
270 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
271 matOpsData->getCommonDataPtr("wGradH1AtPts"), nb_gauss_pts);
272 }
273
274 inline auto getFTensorStretch(const int nb_gauss_pts) {
275 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
276 matOpsData->getCommonDataPtr("stretchTensorAtPts"), nb_gauss_pts);
277 }
278
279 inline auto getFTensorDiffStretchH1(const int nb_gauss_pts) {
280 return getFTensor<GetFTensor4FromMatType<
282 matOpsData->getCommonDataPtr("diffStretchH1AtPts"), nb_gauss_pts);
283 }
284
285 inline auto getFTensorDiffStretch(const int nb_gauss_pts) {
286 return getFTensor<
287 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
288 matOpsData->getCommonDataPtr("diffStretchTensorAtPts"),
289 nb_gauss_pts);
290 }
291
292 inline auto getFTensorSmallH(const int nb_gauss_pts) {
293 return getFTensor<
294 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
295 matOpsData->getCommonDataPtr("hAtPts"), nb_gauss_pts);
296 }
297
298 inline auto getFTensorPlasticH(const int nb_gauss_pts) {
299 return getFTensor<
300 GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
301 matOpsData->getCommonDataPtr("plasticH"), nb_gauss_pts);
302 }
303
304 inline auto getFTensorPlasticF(const int nb_gauss_pts) {
305 return getFTensor<
306 GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
307 matOpsData->getCommonDataPtr("plasticF"), nb_gauss_pts);
308 }
309
310 inline auto getFTensorInvPlasticF(const int nb_gauss_pts) {
311 return getFTensor<
312 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
313 matOpsData->getCommonDataPtr("invPlasticF"), nb_gauss_pts);
314 }
315
316 inline auto getFTensorAdjointPdstretch(const int nb_gauss_pts) {
317 return getFTensor<
318 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
319 matOpsData->getCommonDataPtr("adjointPdstretchAtPts"),
320 nb_gauss_pts);
321 }
322
323 inline auto getFTensorAdjointPdU(const int nb_gauss_pts) {
324 return getFTensor<GetFTensor1FromMatType<SizeSymm, -1, DL>>(
325 matOpsData->getCommonDataPtr("adjointPdUAtPts"), nb_gauss_pts);
326 }
327
328 inline auto getFTensorAdjointPdUdOmega(const int nb_gauss_pts) {
329 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SizeSymm, -1, DL>>(
330 matOpsData->getCommonDataPtr("adjointPdUdOmegaAtPts"),
331 nb_gauss_pts);
332 }
333
334 inline auto getFTensorAdjointPdUdP(const int nb_gauss_pts) {
335 return getFTensor<
336 GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SizeSymm, -1, DL>>(
337 matOpsData->getCommonDataPtr("adjointPdUdPAtPts"), nb_gauss_pts);
338 }
339
340 inline auto getFTensorEigenVals(const int nb_gauss_pts) {
341 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
342 matOpsData->getCommonDataPtr("eigenVals"), nb_gauss_pts);
343 }
344
345 inline auto getFTensorEigenVecs(const int nb_gauss_pts) {
346 return getFTensor<
347 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
348 matOpsData->getCommonDataPtr("eigenVecs"), nb_gauss_pts);
349 }
350
352 return matOpsData->getCommonDataPtr("approxPAtPts");
353 }
354
356 return matOpsData->getCommonDataPtr("approxP0AtPts");
357 }
358
359 inline MatrixPtr getPAtPts() { return matOpsData->getCommonDataPtr("PAtPts"); }
360
362 return matOpsData->getCommonDataPtr("diffStretchH1AtPts");
363 }
364
366 return matOpsData->getCommonDataPtr("stretchH1AtPts");
367 }
368
370 return matOpsData->getCommonDataPtr("adjointPdstretchAtPts");
371 }
372
374 return matOpsData->getCommonDataPtr("adjointPdUAtPts");
375 }
376
378 return matOpsData->getCommonDataPtr("adjointPdUdOmegaAtPts");
379 }
380
382 return matOpsData->getCommonDataPtr("adjointPdUdPAtPts");
383 }
384
386 return matOpsData->getCommonDataPtr("eigenVals");
387 }
388
390 return matOpsData->getCommonDataPtr("eigenVecs");
391 }
392
394 return matOpsData->getCommonDataPtr("divPAtPts");
395 }
396
398 return matOpsData->getCommonDataPtr("wL2AtPts");
399 }
400
402 return matOpsData->getCommonDataPtr("wL2DotAtPts");
403 }
404
406 return matOpsData->getCommonDataPtr("wL2DotDotAtPts");
407 }
408
410 return matOpsData->getCommonDataPtr("logStretchTensorAtPts");
411 }
412
414 return boost::shared_ptr<MatrixDouble>(
415 shared_from_this(), &logStretchTotalTensorAtPts);
416 }
417
419 return matOpsData->getCommonDataPtr("logStretchTensor0AtPts");
420 }
421
423 return matOpsData->getCommonDataPtr("stretchTensorAtPts");
424 }
425
427 return matOpsData->getCommonDataPtr("diffStretchTensorAtPts");
428 }
429
431 return matOpsData->getCommonDataPtr("hAtPts");
432 }
433
435 return matOpsData->getCommonDataPtr("plasticH");
436 }
437
439 return matOpsData->getCommonDataPtr("plasticFlow");
440 }
441
443 return matOpsData->getCommonDataPtr("plasticF");
444 }
445
447 return matOpsData->getCommonDataPtr("invPlasticF");
448 }
449
451 return matOpsData->getCommonDataPtr("logStretchDotTensorAtPts");
452 }
453
455 return matOpsData->getCommonDataPtr("gradLogStretchDotTensorAtPts");
456 }
457
459 return matOpsData->getCommonDataPtr("rotAxisAtPts");
460 }
461
463 return matOpsData->getCommonDataPtr("rotAxis0AtPts");
464 }
465
467 return matOpsData->getCommonDataPtr("rotAxisGradAtPts");
468 }
469
471 return matOpsData->getCommonDataPtr("rotAxisDotAtPts");
472 }
473
475 return matOpsData->getCommonDataPtr("rotAxisGradDotAtPts");
476 }
477
479 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matD);
480 }
481
483 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &matInvD);
484 }
485
487 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &wH1AtPts);
488 }
489
491 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &XH1AtPts);
492 }
493
495 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &contactL2AtPts);
496 }
497
499 return matOpsData->getCommonDataPtr("wGradH1AtPts");
500 }
501
503 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
505 };
506
508 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varRotAxis);
509 }
510
512 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varGradRotAxis);
513 }
514
516 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varLogStreach);
517 }
518
520 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varPiola);
521 }
522
524 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varDivPiola);
525 }
526
528 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &varWL2);
529 }
530
532 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
534 }
535
537 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
539 }
540
542 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
544 }
545
547 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
549 }
550
552 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &gradientAtPts);
553 }
554
556 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &rotMatAtPts);
557 }
558
559 inline auto getFTensorEigenValsC(const int nb_gauss_pts) {
560 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
561 eigenValsC, nb_gauss_pts);
562 }
563
564 inline auto getFTensorEigenVecsC(const int nb_gauss_pts) {
565 return getFTensor<
566 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(eigenVecsC,
567 nb_gauss_pts);
568 }
569
570 inline auto getFTensorTraction(const int nb_gauss_pts) {
571 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
572 tractionAtPts, nb_gauss_pts);
573 }
574
575 inline auto getFTensorLogStretch2H1(const int nb_gauss_pts) {
576 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
577 logStretch2H1AtPts, nb_gauss_pts);
578 }
579
580 inline auto getFTensorLogStretchTotal(const int nb_gauss_pts) {
581 return getFTensor<GetFTensor2SymmetricFromMatType<SPACE_DIM, -1, DL>>(
582 logStretchTotalTensorAtPts, nb_gauss_pts);
583 }
584
585 inline auto getFTensorSmallHdOmega(const int nb_gauss_pts) {
586 return getFTensor<GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SPACE_DIM,
587 -1, DL>>(hdOmegaAtPts,
588 nb_gauss_pts);
589 }
590
591 inline auto getFTensorSmallHdLogStretch(const int nb_gauss_pts) {
592 return getFTensor<
593 GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SizeSymm, -1, DL>>(
594 hdLogStretchAtPts, nb_gauss_pts);
595 }
596
597 inline auto getFTensorLeviKirchhoff(const int nb_gauss_pts) {
598 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
599 leviKirchhoffAtPts, nb_gauss_pts);
600 }
601
602 inline auto getFTensorLeviKirchhoff0(const int nb_gauss_pts) {
603 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
604 leviKirchhoff0AtPts, nb_gauss_pts);
605 }
606
607 inline auto getFTensorLeviKirchhoffdOmega(const int nb_gauss_pts) {
608 return getFTensor<
609 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
610 leviKirchhoffdOmegaAtPts, nb_gauss_pts);
611 }
612
613 inline auto getFTensorLeviKirchhoffdLogStretch(const int nb_gauss_pts) {
614 return getFTensor<GetFTensor2FromMatType<SPACE_DIM, SizeSymm, -1, DL>>(
615 leviKirchhoffdLogStreatchAtPts, nb_gauss_pts);
616 }
617
618 inline auto getFTensorLeviKirchhoffP(const int nb_gauss_pts) {
619 return getFTensor<GetFTensor3FromMatType<SPACE_DIM, SPACE_DIM, SPACE_DIM,
621 nb_gauss_pts);
622 }
623
624 inline auto getFTensorRotMat(const int nb_gauss_pts) {
625 return getFTensor<
626 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(rotMatAtPts,
627 nb_gauss_pts);
628 }
629
630 inline auto getFTensorVarRotAxis(const int nb_gauss_pts) {
631 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
632 varRotAxis, nb_gauss_pts);
633 }
634
635 inline auto getFTensorVarGradRotAxis(const int nb_gauss_pts) {
636 return getFTensor<
637 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
638 varGradRotAxis, nb_gauss_pts);
639 }
640
641 inline auto getFTensorVarLogStreach(const int nb_gauss_pts) {
642 return getFTensor<GetFTensor1FromMatType<SizeSymm, -1, DL>>(
643 varLogStreach, nb_gauss_pts);
644 }
645
646 inline auto getFTensorVarPiola(const int nb_gauss_pts) {
647 return getFTensor<
648 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(varPiola,
649 nb_gauss_pts);
650 }
651
652 inline auto getFTensorDivVarPiola(const int nb_gauss_pts) {
653 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
654 varDivPiola, nb_gauss_pts);
655 }
656
657 inline auto getFTensorVarWL2(const int nb_gauss_pts) {
658 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
659 varWL2, nb_gauss_pts);
660 }
661
662 inline auto getFTensorInternalStress(const int nb_gauss_pts) {
663 return getFTensor<
664 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
665 internalStressAtPts, nb_gauss_pts);
666 }
667
668 inline auto getFTensorInternalStressVec(const int nb_gauss_pts) {
669 return getFTensor<GetFTensor1FromMatType<SPACE_DIM * SPACE_DIM, -1, DL>>(
670 internalStressAtPts, nb_gauss_pts);
671 }
672
673 inline auto getFTensorSmallWH1(const int nb_gauss_pts) {
674 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(wH1AtPts,
675 nb_gauss_pts);
676 }
677
678 inline auto getFTensorSmallHybridDisp(const int nb_gauss_pts) {
679 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
680 hybridDispAtPts, nb_gauss_pts);
681 }
682
683 inline auto getFTensorGradHybridDisp(const int nb_gauss_pts) {
684 return getFTensor<
685 GetFTensor2FromMatType<SPACE_DIM, SPACE_DIM, -1, DL>>(
686 gradHybridDispAtPts, nb_gauss_pts);
687 }
688
689 inline auto getFTensorFaceMaterialForce(const int nb_gauss_pts) {
690 return getFTensor<GetFTensor1FromMatType<SPACE_DIM, -1, DL>>(
691 faceMaterialForceAtPts, nb_gauss_pts);
692 }
693
694 boost::shared_ptr<PhysicalEquations> physicsPtr;
695};
696
697struct OpJacobian;
698
699// Forward declarations
700struct ExternalStrain;
701using ExternalStrainVec = std::vector<ExternalStrain>;
702
704 using Map = OpPostProcMapInMoab<SPACE_DIM, SPACE_DIM>;
705 Map::DataMapVec scalarFields;
706 Map::DataMapMat vectorFields;
707 Map::DataMapMat symmetricFields;
708};
709
711
717 Meta, //< Metamaterial model, that is using off the shelf MatOps
718 // functionality
720 };
721
722 enum Feature {
723 DIRECT_STRETCH = 0, ///< Direct stretch formulation
724 NO_STRETCH_LINEAR, ///< No-stretch linear formulation
725 NO_STRETCH_NONLINEAR, ///< No-stretch nonlinear formulation
726 AUXILIARY_LOGARITHMIC_STRESS, ///< Auxiliary logarithmic stress formulation
729 };
730
731 using Features = std::bitset<LAST_FEATURE>;
734
736 CURRENT, ///< Current state of the field
737 PREVIOUS ///< Previous state of the field
738 };
739
742 virtual ~PhysicalEquations() = default;
743
744 /// Select and configure the material before registering fields and DMs.
745 static MoFEMErrorCode create(EshelbianCore &ep);
746
747 /// Check material capabilities after geometry and boundary setup.
748 MoFEMErrorCode checkSetup(const EshelbianCore &ep) const;
749
751 /// Test individual bits or compare (getFeatures() & mask) with a feature
752 /// mask.
753 const Features &getFeatures() const { return materialFeatures; }
754
756 std::string name;
757 int order;
759 };
760
761 /// USER_BASE L2 fields; negative order retains an inactive field
762 /// registration.
763 std::vector<FieldDefinition>
765
766 /// Active material unknowns used by the element, DMs and field split.
767 std::vector<std::string> getMaterialFields(const EshelbianCore &ep) const;
768
769 /// Material-dependent blocks; each pair also represents its transpose.
770 std::vector<std::pair<std::string, std::string>>
771 getMaterialCouplings(const EshelbianCore &ep) const;
772 std::vector<std::pair<std::string, std::string>>
773 getMaterialEmptyBlocks(const EshelbianCore &ep) const;
774
775 /// Evaluate the selected fields, or recover stretch from the matching stress.
776 MoFEMErrorCode
778 boost::ptr_deque<UserDataOperator> &pipeline,
779 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
781
782 MoFEMErrorCode
784 boost::ptr_deque<UserDataOperator> &pipeline,
785 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
786
787 /// Evaluate constitutive data after kinematics and before material assembly.
788 MoFEMErrorCode pushMaterialEvaluation(
789 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
790 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool rhs, bool lhs);
791
792 /// Assemble the physical Helmholtz state derivative at equilibrium.
793 virtual MoFEMErrorCode
795 boost::ptr_deque<UserDataOperator> &pipeline,
796 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
797
798 MoFEMErrorCode
800 boost::ptr_deque<UserDataOperator> &pipeline,
801 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
802 boost::shared_ptr<MatrixDouble> strain_ptr = nullptr,
803 boost::shared_ptr<MatrixDouble> stress_ptr = nullptr);
804
805 MoFEMErrorCode
807 boost::ptr_deque<UserDataOperator> &pipeline,
808 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
809
810 MoFEMErrorCode
812 boost::ptr_deque<UserDataOperator> &pipeline,
813 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
814
815 MoFEMErrorCode
817 boost::ptr_deque<UserDataOperator> &pipeline,
818 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
819 boost::shared_ptr<double> total_energy_ptr);
820
821 MoFEMErrorCode
823 boost::ptr_deque<UserDataOperator> &pipeline,
824 boost::shared_ptr<DataAtIntegrationPts> data_ptr);
825
826 MoFEMErrorCode pushPostProc(const EshelbianCore &ep,
827 boost::ptr_deque<UserDataOperator> &pipeline,
828 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
829 MaterialPostProcData &output);
830
831 MoFEMErrorCode pushMaterialVariation(
832 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
833 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
834 SmartPetscObj<Vec> variation, MaterialPostProcData *output = nullptr);
835
836 MoFEMErrorCode pushPostProcResidual(
837 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
838 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
839 SmartPetscObj<Vec> residual, MaterialPostProcData &output);
840
841 MoFEMErrorCode pushSkeletonEvaluation(
842 const EshelbianCore &ep, VolumeElementForcesAndSourcesCoreOnSide &fe,
843 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
844 SmartPetscObj<Vec> residual, MaterialPostProcData &output);
845
846 /// Assemble the selected material field group after kinematic reconstruction.
847 virtual MoFEMErrorCode pushAuxiliaryLogarithmicStressOps(
848 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
849 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool lhs);
850
851 /// Evaluate the auxiliary material copy and energies without assembly.
852 virtual MoFEMErrorCode pushAuxiliaryLogarithmicMaterialEvaluation(
853 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
854 boost::shared_ptr<DataAtIntegrationPts> data_ptr, bool lhs = false);
855
856 virtual UserDataOperator *
857 returnOpJacobian(const bool eval_rhs, const bool eval_lhs,
858 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
859 boost::shared_ptr<PhysicalEquations> physics_ptr);
860
861 virtual VolUserDataOperator *
862 returnOpSpatialPhysical(const std::string &field_name,
863 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
864 const double alpha_u);
865
867 const std::string &field_name,
868 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
869 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
870 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
871
873 std::string row_field, std::string col_field,
874 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha);
875
877 const std::string &field_name,
878 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
879 SmartPetscObj<Vec> assemble_vec,
880 boost::shared_ptr<TopologicalData> topo_ptr, const double alpha_u,
881 boost::shared_ptr<double> J_ptr);
882
883 virtual VolUserDataOperator *
885 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
886 boost::shared_ptr<double> total_helmholtz_free_energy_ptr);
887
888 /** True when the material supplies its Helmholtz free energy. */
889 virtual bool providesHelmholtzFreeEnergy() const;
890
892 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
893 boost::shared_ptr<PhysicalEquations> physics_ptr,
894 boost::shared_ptr<MatrixDouble> strain_ptr = nullptr);
895
897 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
898 boost::shared_ptr<PhysicalEquations> physics_ptr,
899 boost::shared_ptr<MatrixDouble> strain_ptr,
900 VectorPtr external_pressure_ptr);
901
903 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
904 boost::shared_ptr<PhysicalEquations> physics_ptr,
905 boost::shared_ptr<MatrixDouble> strain_ptr,
906 boost::shared_ptr<MatrixDouble> stress_ptr,
907 VectorPtr external_pressure_ptr);
908
910 VectorPtr external_pressure_ptr,
911 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
912 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv);
913
915 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
916 boost::shared_ptr<PhysicalEquations> physics_ptr);
917
918private:
920 return (materialFeatures & noStretchMask).any() || materialModel == Hencky;
921 }
922
923 static MoFEMErrorCode checkOptions(const EshelbianCore &ep,
924 MaterialModel material_model,
927
928protected:
930};
931
932struct BcDisp {
933 BcDisp(std::string name, std::vector<double> attr, Range faces,
934 std::string load_history_file = "");
935 std::string blockName;
936 std::string loadHistoryFile;
938 VectorDouble3 vals;
939 VectorInt3 flags;
940};
941using BcDispVec = std::vector<BcDisp>;
942
943struct BcRot {
944 BcRot(std::string name, std::vector<double> attr, Range faces,
945 std::string load_history_file = "");
946 std::string blockName;
947 std::string loadHistoryFile;
949 VectorDouble vals;
950 double theta;
951};
952using BcRotVec = std::vector<BcRot>;
953
954typedef std::vector<Range> TractionFreeBc;
955
957 TractionBc(std::string name, std::vector<double> attr, Range faces,
958 std::string load_history_file = "");
959 std::string blockName;
960 std::string loadHistoryFile;
962 VectorDouble3 vals;
963 VectorInt3 flags;
964};
965using TractionBcVec = std::vector<TractionBc>;
966
968 NormalDisplacementBc(std::string name, std::vector<double> attr, Range faces,
969 std::string load_history_file = "");
970 std::string blockName;
971 std::string loadHistoryFile;
973 double val;
974};
975using NormalDisplacementBcVec = std::vector<NormalDisplacementBc>;
976
977struct SpringBc {
978 SpringBc(std::string name, std::vector<double> attr, Range faces);
979 std::string blockName;
983};
984using SpringBcVec = std::vector<SpringBc>;
985
987 AnalyticalDisplacementBc(std::string name, std::vector<double> attr,
988 Range faces, std::string load_history_file = "");
989 std::string blockName;
991 VectorInt3 flags;
992};
993using AnalyticalDisplacementBcVec = std::vector<AnalyticalDisplacementBc>;
994
996 AnalyticalTractionBc(std::string name, std::vector<double> attr, Range faces,
997 std::string load_history_file = "");
998 std::string blockName;
1000 VectorInt3 flags;
1001};
1002using AnalyticalTractionBcVec = std::vector<AnalyticalTractionBc>;
1003
1005 PressureBc(std::string name, std::vector<double> attr, Range faces,
1006 std::string load_history_file = "");
1007 std::string blockName;
1008 std::string loadHistoryFile;
1010 double val;
1011};
1012using PressureBcVec = std::vector<PressureBc>;
1013
1015 ExternalStrain(std::string name, std::vector<double> attr, Range ents,
1016 std::string load_history_file = "");
1017 std::string blockName;
1018 std::string loadHistoryFile;
1020 double val;
1022};
1023
1024template <typename OP_PTR>
1025std::tuple<std::string, MatrixDouble>
1026getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr,
1027 const std::string block_name);
1028
1029template <typename OP_PTR>
1030std::tuple<std::string, VectorDouble>
1031getAnalyticalExternalStrain(OP_PTR op_ptr, VectorDouble &analytical_expr,
1032 const std::string block_name);
1033
1034template <typename OP_PTR>
1035VectorDouble getAnalyticalElastic(OP_PTR op_ptr, const std::string block_name);
1036
1037MatrixDouble analytical_expr_function(double delta_t, double t,
1038 int nb_gauss_pts,
1039 MatrixDouble &m_ref_coords,
1040 MatrixDouble &m_ref_normals,
1041 const std::string block_name);
1042
1043VectorDouble analytical_externalstrain_function(double delta_t, double t,
1044 int nb_gauss_pts,
1045 MatrixDouble &m_ref_coords,
1046 const std::string block_name);
1047
1048VectorDouble analytical_elastic_function(double delta_t, double t,
1049 int nb_gauss_pts,
1050 MatrixDouble &m_ref_coords,
1051 const std::string block_name);
1052
1053 #include "CGGUserPolynomialBase.hpp"
1054 #include "EshelbianCore.hpp"
1055 #include "EshelbianOperators.hpp"
1056
1057} // namespace EshelbianPlasticity
1058
1059#endif //__ESHELBIAN_PLASTICITY_HPP__
Analytical expression Python bridge.
constexpr int SPACE_DIM
constexpr auto A
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 getFTensorLogStretchDot(const int nb_gauss_pts)
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 getFTensorLeviKirchhoffP(const int nb_gauss_pts)
auto getFTensorLeviKirchhoff(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 getFTensorAdjointPdUdOmega(const int nb_gauss_pts)
auto getFTensorInternalStressVec(const int nb_gauss_pts)
auto getFTensorLeviKirchhoffdOmega(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 getFTensorLogStretchTotal(const int nb_gauss_pts)
static auto getFTensor(MatrixDouble &m, const int nb_gauss_pts)
auto getFTensorLeviKirchhoffdLogStretch(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 getFTensorLeviKirchhoff0(const int nb_gauss_pts)
auto getFTensorSmallWGradH1(const int nb_gauss_pts)
auto getFTensorLogStretch0(const int nb_gauss_pts)
auto getFTensorSmallHdOmega(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)
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
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 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)