v0.16.3
Loading...
Searching...
No Matches
CohesiveInterfaceElement.hpp
Go to the documentation of this file.
1/** \file CohesiveInterfaceElement.hpp
2 \brief Implementation of linear interface element
3
4*/
5
6namespace CohesiveElement {
7
8/** \brief Cohesive element implementation
9
10 \bug Interface element not working with HO geometry.
11*/
13
14 struct CommonData {
15 MatrixDouble gapGlob;
16 MatrixDouble gapLoc;
17 ublas::vector<MatrixDouble> R;
18 };
20
26 int getRule(int order) { return 2 * order; };
27 };
31
33 : feRhs(m_field), feLhs(m_field), feHistory(m_field){};
34
36
37 MyPrism &getFeRhs() { return feRhs; }
38 MyPrism &getFeLhs() { return feLhs; }
40
41 /** \brief Constitutive (physical) equation for interface
42
43 This is linear degradation model. Material parameters are: strength
44 \f$f_t\f$, interface fracture energy \f$G_f\f$, elastic material stiffness
45 \f$E\f$. Parameter \f$\beta\f$ controls how interface opening is calculated.
46
47 Model parameter is interface penalty thickness \f$h\f$.
48
49 */
51
55 : mField(m_field), isInitialised(false){};
56
57 virtual ~PhysicalEquation() {}
58
59 double h, youngModulus, beta, ft, Gf;
62
63 double E0, g0, kappa1;
64
65 /** \brief Initialize history variable data
66
67 Create tag on the prism/interface to store damage history variable
68
69 */
70 MoFEMErrorCode iNitailise(const FEMethod *fe_method) {
72
73 double def_damaged = 0;
74 CHKERR mField.get_moab().tag_get_handle(
75 "DAMAGED_PRISM", 1, MB_TYPE_INTEGER, thDamagedPrism,
76 MB_TAG_CREAT | MB_TAG_SPARSE, &def_damaged);
77 const int def_len = 0;
78 CHKERR mField.get_moab().tag_get_handle(
79 "_KAPPA", def_len, MB_TYPE_DOUBLE, thKappa,
80 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN, nullptr);
81 E0 = youngModulus / h;
82 g0 = ft / E0;
83 kappa1 = 2 * Gf / ft;
85 }
86
87 /** \brief Calculate gap opening
88
89 \f[
90 g = \sqrt{ g_n^2 + \beta(g_{s1}^2 + g_{s2}^2)}
91 \f]
92
93 */
94 double calcG(int gg, MatrixDouble gap_loc) {
95 return sqrt(pow(gap_loc(gg, 0), 2) +
96 beta * (pow(gap_loc(gg, 1), 2) + pow(gap_loc(gg, 2), 2)));
97 }
98
99 double *kappaPtr;
101
102 /** \brief Get pointer from the mesh to histoy variables \f$\kappa\f$
103 */
104 MoFEMErrorCode getKappa(int nb_gauss_pts, const FEMethod *fe_method) {
106 EntityHandle ent = fe_method->numeredEntFiniteElementPtr->getEnt();
107
108 rval = mField.get_moab().tag_get_by_ptr(
109 thKappa, &ent, 1, (const void **)&kappaPtr, &kappaSize);
110 if (rval != MB_SUCCESS || kappaSize != nb_gauss_pts) {
111 VectorDouble kappa;
112 kappa.resize(nb_gauss_pts);
113 kappa.clear();
114 int tag_size[1];
115 tag_size[0] = nb_gauss_pts;
116 void const *tag_data[] = {&kappa[0]};
117 CHKERR mField.get_moab().tag_set_by_ptr(thKappa, &ent, 1, tag_data,
118 tag_size);
119 CHKERR mField.get_moab().tag_get_by_ptr(
120 thKappa, &ent, 1, (const void **)&kappaPtr, &kappaSize);
121 }
123 }
124
125 MatrixDouble Dglob, Dloc;
126
127 /** \brief Calculate stiffness material matrix
128
129 \f[
130 \mathbf{D}_\textrm{loc} = (1-\Omega) \mathbf{I} E_0
131 \f]
132 where \f$E_0\f$ is initial interface penalty stiffness
133
134 \f[
135 \mathbf{D}_\textrm{glob} = \mathbf{R}^\textrm{T} \mathbf{D}_\textrm{loc}\mathbf{R}
136 \f]
137
138 */
139 MoFEMErrorCode calcDglob(const double omega, MatrixDouble &R) {
141 Dglob.resize(3, 3);
142 Dloc.resize(3, 3);
143 Dloc.clear();
144 double E = (1 - omega) * E0;
145 Dloc(0, 0) = E;
146 Dloc(1, 1) = E;
147 Dloc(2, 2) = E;
148 Dglob = prod(Dloc, R);
149 Dglob = prod(trans(R), Dglob);
151 }
152
153 /** \brief Calculate damage
154
155 \f[
156 \Omega = \frac{1}{2} \frac{(2 G_f E_0+f_t^2)\kappa}{(ft+E_0 \kappa)G_f}
157 \f]
158
159 */
160 MoFEMErrorCode calcOmega(const double kappa, double &omega) {
162 omega = 0;
163 if (kappa >= kappa1) {
164 omega = 1;
166 } else if (kappa > 0) {
167 double a = (2.0 * Gf * E0 + ft * ft) * kappa;
168 double b = (ft + E0 * kappa) * Gf;
169 omega = 0.5 * a / b;
170 }
172 }
173
174 /** \brief Calculate tangent material stiffness
175 */
176 MoFEMErrorCode calcTangetDglob(const double omega, double g,
177 const VectorDouble &gap_loc,
178 MatrixDouble &R) {
180 Dglob.resize(3, 3);
181 Dloc.resize(3, 3);
182 double domega =
183 0.5 * (2 * Gf * E0 + ft * ft) / ((ft + (g - ft / E0) * E0) * Gf) -
184 0.5 * ((g - ft / E0) * (2 * Gf * E0 + ft * ft) * E0) /
185 (pow(ft + (g - ft / E0) * E0, 2) * Gf);
186 Dloc.resize(3, 3);
187 //r0
188 Dloc(0, 0) = (1 - omega) * E0 - domega * E0 * gap_loc[0] * gap_loc[0] / g;
189 Dloc(0, 1) = -domega * E0 * gap_loc[0] * beta * gap_loc[1] / g;
190 Dloc(0, 2) = -domega * E0 * gap_loc[0] * beta * gap_loc[2] / g;
191 //r1
192 Dloc(1, 0) = -domega * E0 * gap_loc[1] * gap_loc[0] / g;
193 Dloc(1, 1) =
194 (1 - omega) * E0 - domega * E0 * gap_loc[1] * beta * gap_loc[1] / g;
195 Dloc(1, 2) = -domega * E0 * gap_loc[1] * beta * gap_loc[2] / g;
196 //r2
197 Dloc(2, 0) = -domega * E0 * gap_loc[2] * gap_loc[0] / g;
198 Dloc(2, 1) = -domega * E0 * gap_loc[2] * beta * gap_loc[1] / g;
199 Dloc(2, 2) =
200 (1 - omega) * E0 - domega * E0 * gap_loc[2] * beta * gap_loc[2] / g;
201 Dglob = prod(Dloc, R);
202 Dglob = prod(trans(R), Dglob);
204 }
205
206 /** \brief Calculate tractions
207
208 \f[
209 \mathbf{t} = \mathbf{D}_\textrm{glob}\mathbf{g}
210 \f]
211
212 */
213 virtual MoFEMErrorCode calculateTraction(VectorDouble &traction, int gg,
214 CommonData &common_data,
215 const FEMethod *fe_method) {
217
218 if (!isInitialised) {
219 CHKERR iNitailise(fe_method);
220 isInitialised = true;
221 }
222 if (gg == 0) {
223 CHKERR getKappa(common_data.gapGlob.size1(), fe_method);
224 }
225 double g = calcG(gg, common_data.gapLoc);
226 double kappa = fmax(g - g0, kappaPtr[gg]);
227 double omega = 0;
229 CHKERR calcDglob(omega, common_data.R[gg]);
230 traction.resize(3);
231 ublas::matrix_row<MatrixDouble> gap_glob(common_data.gapGlob, gg);
232 noalias(traction) = prod(Dglob, gap_glob);
234 }
235
236 /** \brief Calculate tangent stiffness
237 */
238 virtual MoFEMErrorCode
239 calculateTangentStiffeness(MatrixDouble &tangent_matrix, int gg,
240 CommonData &common_data,
241 const FEMethod *fe_method) {
243
244 try {
245 if (!isInitialised) {
246 CHKERR iNitailise(fe_method);
247 isInitialised = true;
248 }
249 if (gg == 0) {
250 CHKERR getKappa(common_data.gapGlob.size1(), fe_method);
251 }
252 double g = calcG(gg, common_data.gapLoc);
253 double kappa = fmax(g - g0, kappaPtr[gg]);
254 double omega = 0;
256 int iter;
257 CHKERR SNESGetIterationNumber(fe_method->snes, &iter);
258 if ((kappa <= kappaPtr[gg]) || (kappa >= kappa1) || (iter <= 1)) {
259 CHKERR calcDglob(omega, common_data.R[gg]);
260 } else {
261 ublas::matrix_row<MatrixDouble> g_loc(common_data.gapLoc, gg);
262 CHKERR calcTangetDglob(omega, g, g_loc, common_data.R[gg]);
263 }
264 tangent_matrix.resize(3, 3);
265 noalias(tangent_matrix) = Dglob;
266 } catch (const std::exception &ex) {
267 std::ostringstream ss;
268 ss << "throw in method: " << ex.what() << std::endl;
269 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
270 ss.str().c_str());
271 }
273 }
274
275 /** \brief Update history variables when converged
276 */
277 virtual MoFEMErrorCode updateHistory(CommonData &common_data,
278 const FEMethod *fe_method) {
280
281 if (!isInitialised) {
282 CHKERR iNitailise(fe_method);
283 isInitialised = true;
284 }
285 CHKERR getKappa(common_data.gapGlob.size1(), fe_method);
286 bool all_gauss_pts_damaged = true;
287 for (unsigned int gg = 0; gg < common_data.gapGlob.size1(); gg++) {
288 double omega = 0;
289 double g = calcG(gg, common_data.gapLoc);
290 double kappa = fmax(g - g0, kappaPtr[gg]);
291 kappaPtr[gg] = kappa;
293 //if(omega < 1.) {
294 all_gauss_pts_damaged = false;
295 //}
296 }
297 if (all_gauss_pts_damaged) {
298 EntityHandle ent = fe_method->numeredEntFiniteElementPtr->getEnt();
299 int set_prism_as_demaged = 1;
300 CHKERR mField.get_moab().tag_set_data(thDamagedPrism, &ent, 1,
301 &set_prism_as_demaged);
302 }
304 }
305 };
306
307 /** \brief Set negative sign to shape functions on face 4
308 */
310 : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
311
313 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
314 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW) {}
315
316 MoFEMErrorCode doWork(int side, EntityType type,
317 EntitiesFieldData::EntData &data) {
319 if (data.getN().size1() == 0)
321 if (data.getN().size2() == 0)
323 switch (type) {
324 case MBVERTEX:
325 for (unsigned int gg = 0; gg < data.getN().size1(); gg++) {
326 for (int nn = 3; nn < 6; nn++) {
327 data.getN()(gg, nn) *= -1;
328 }
329 }
330 break;
331 case MBEDGE:
332 if (side < 3)
334 data.getN() *= -1;
335 break;
336 case MBTRI:
337 if (side == 3)
339 data.getN() *= -1;
340 break;
341 default:
342 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
343 "Unexpected entity type when setting interface shape-function signs");
344 }
346 }
347 };
348
349 /** \brief Operator calculate gap, normal vector and rotation matrix
350 */
352 : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
353
355 OpCalculateGapGlobal(const std::string field_name, CommonData &common_data)
356 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
357 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
358 commonData(common_data) {}
359
360 MoFEMErrorCode doWork(int side, EntityType type,
361 EntitiesFieldData::EntData &data) {
363 try {
364 int nb_dofs = data.getIndices().size();
365 if (nb_dofs == 0)
367 int nb_gauss_pts = data.getN().size1();
368 if (type == MBVERTEX) {
369 commonData.R.resize(nb_gauss_pts);
370 for (int gg = 0; gg < nb_gauss_pts; gg++) {
371 commonData.R[gg].resize(3, 3);
372 double nrm2_normal = 0;
373 double nrm2_tangent1 = 0;
374 double nrm2_tangent2 = 0;
375 for (int dd = 0; dd < 3; dd++) {
376 nrm2_normal += pow(getNormalsAtGaussPtsF3()(gg, dd), 2);
377 nrm2_tangent1 += pow(getTangent1AtGaussPtF3()(gg, dd), 2);
378 nrm2_tangent2 += pow(getTangent2AtGaussPtF3()(gg, dd), 2);
379 }
380 nrm2_normal = sqrt(nrm2_normal);
381 nrm2_tangent1 = sqrt(nrm2_tangent1);
382 nrm2_tangent2 = sqrt(nrm2_tangent2);
383 for (int dd = 0; dd < 3; dd++) {
384 commonData.R[gg](0, dd) =
385 getNormalsAtGaussPtsF3()(gg, dd) / nrm2_normal;
386 commonData.R[gg](1, dd) =
387 getTangent1AtGaussPtF3()(gg, dd) / nrm2_tangent1;
388 commonData.R[gg](2, dd) =
389 getTangent2AtGaussPtF3()(gg, dd) / nrm2_tangent2;
390 }
391 }
392 }
393 if (type == MBVERTEX) {
394 commonData.gapGlob.resize(nb_gauss_pts, 3);
395 commonData.gapGlob.clear();
396 }
397 for (int gg = 0; gg < nb_gauss_pts; gg++) {
398 for (int dd = 0; dd < 3; dd++) {
399 commonData.gapGlob(gg, dd) += cblas_ddot(
400 nb_dofs / 3, &data.getN(gg)[0], 1, &data.getFieldData()[dd], 3);
401 }
402 }
403 } catch (const std::exception &ex) {
404 std::ostringstream ss;
405 ss << "throw in method: " << ex.what() << std::endl;
406 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
407 ss.str().c_str());
408 }
410 }
411 };
412
413 /** \brief Operator calculate gap in local coordinate system
414 */
416 : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
417
419 OpCalculateGapLocal(const std::string field_name, CommonData &common_data)
420 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
421 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
422 commonData(common_data) {}
423
424 MoFEMErrorCode doWork(int side, EntityType type,
425 EntitiesFieldData::EntData &data) {
427 try {
428 if (type == MBVERTEX) {
429 int nb_gauss_pts = data.getN().size1();
430 commonData.gapLoc.resize(nb_gauss_pts, 3);
431 for (int gg = 0; gg < nb_gauss_pts; gg++) {
432 ublas::matrix_row<MatrixDouble> gap_glob(commonData.gapGlob, gg);
433 ublas::matrix_row<MatrixDouble> gap_loc(commonData.gapLoc, gg);
434 gap_loc = prod(commonData.R[gg], gap_glob);
435 }
436 }
437 } catch (const std::exception &ex) {
438 std::ostringstream ss;
439 ss << "throw in method: " << ex.what() << std::endl;
440 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
441 ss.str().c_str());
442 }
444 }
445 };
446
447 /** \brief Operator calculate right hand side vector
448 */
449 struct OpRhs : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
450
453 OpRhs(const std::string field_name, CommonData &common_data,
454 PhysicalEquation &physical_eqations)
455 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
456 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
457 commonData(common_data), physicalEqations(physical_eqations) {}
458
459 VectorDouble traction, Nf;
460 MoFEMErrorCode doWork(int side, EntityType type,
461 EntitiesFieldData::EntData &data) {
463
464 try {
465 int nb_dofs = data.getIndices().size();
466 if (nb_dofs == 0)
468 if (physicalEqations.pRisms.find(
469 getNumeredEntFiniteElementPtr()->getEnt()) ==
470 physicalEqations.pRisms.end()) {
472 }
473 Nf.resize(nb_dofs);
474 Nf.clear();
475 int nb_gauss_pts = data.getN().size1();
476 for (int gg = 0; gg < nb_gauss_pts; gg++) {
478 getFEMethod());
479 double w = getGaussPts()(2, gg) *
480 cblas_dnrm2(3, &getNormalsAtGaussPtsF3()(gg, 0), 1) * 0.5;
481 for (int nn = 0; nn < nb_dofs / 3; nn++) {
482 for (int dd = 0; dd < 3; dd++) {
483 Nf[3 * nn + dd] += w * data.getN(gg)[nn] * traction[dd];
484 }
485 }
486 }
487 CHKERR VecSetValues(getFEMethod()->snes_f, data.getIndices().size(),
488 &data.getIndices()[0], &Nf[0], ADD_VALUES);
489 } catch (const std::exception &ex) {
490 std::ostringstream ss;
491 ss << "throw in method: " << ex.what() << std::endl;
492 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
493 ss.str().c_str());
494 }
496 }
497 };
498
499 /** \brief Operator calculate element stiffens matrix
500 */
501 struct OpLhs : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
502
505 OpLhs(const std::string field_name, CommonData &common_data,
506 PhysicalEquation &physical_eqations)
507 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
508 field_name, ForcesAndSourcesCore::UserDataOperator::OPROWCOL),
509 commonData(common_data), physicalEqations(physical_eqations) {
510 sYmm = false;
511 }
512
513 MatrixDouble K, D, ND;
514 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
515 EntityType col_type,
516 EntitiesFieldData::EntData &row_data,
517 EntitiesFieldData::EntData &col_data) {
519
520 try {
521 int nb_row = row_data.getIndices().size();
522 if (nb_row == 0)
524 int nb_col = col_data.getIndices().size();
525 if (nb_col == 0)
527 if (physicalEqations.pRisms.find(
528 getNumeredEntFiniteElementPtr()->getEnt()) ==
529 physicalEqations.pRisms.end()) {
531 }
532 ND.resize(nb_row, 3);
533 K.resize(nb_row, nb_col);
534 K.clear();
535 int nb_gauss_pts = row_data.getN().size1();
536 for (int gg = 0; gg < nb_gauss_pts; gg++) {
538 getFEMethod());
539 double w = getGaussPts()(2, gg) *
540 cblas_dnrm2(3, &getNormalsAtGaussPtsF3()(gg, 0), 1) * 0.5;
541 ND.clear();
542 for (int nn = 0; nn < nb_row / 3; nn++) {
543 for (int dd = 0; dd < 3; dd++) {
544 for (int DD = 0; DD < 3; DD++) {
545 ND(3 * nn + dd, DD) += row_data.getN(gg)[nn] * D(dd, DD);
546 }
547 }
548 }
549 for (int nn = 0; nn < nb_row / 3; nn++) {
550 for (int dd = 0; dd < 3; dd++) {
551 for (int NN = 0; NN < nb_col / 3; NN++) {
552 for (int DD = 0; DD < 3; DD++) {
553 K(3 * nn + dd, 3 * NN + DD) +=
554 w * ND(3 * nn + dd, DD) * col_data.getN(gg)[NN];
555 }
556 }
557 }
558 }
559 }
560 CHKERR MatSetValues(getFEMethod()->snes_B, nb_row,
561 &row_data.getIndices()[0], nb_col,
562 &col_data.getIndices()[0], &K(0, 0), ADD_VALUES);
563 } catch (const std::exception &ex) {
564 std::ostringstream ss;
565 ss << "throw in method: " << ex.what() << std::endl;
566 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
567 ss.str().c_str());
568 }
570 }
571 };
572
573 /** \brief Operator update history variables
574 */
576 : public FlatPrismElementForcesAndSourcesCore::UserDataOperator {
577
580 OpHistory(const std::string field_name, CommonData &common_data,
581 PhysicalEquation &physical_eqations)
582 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
583 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
584 commonData(common_data), physicalEqations(physical_eqations) {}
585
586 MoFEMErrorCode doWork(int side, EntityType type,
587 EntitiesFieldData::EntData &data) {
589
590 if (type != MBVERTEX)
592 if (physicalEqations.pRisms.find(
593 getNumeredEntFiniteElementPtr()->getEnt()) ==
594 physicalEqations.pRisms.end()) {
596 }
599 }
600 };
601
602 /** \brief Driver function settting all operators needed for interface element
603 */
604 MoFEMErrorCode
605 addOps(const std::string field_name,
606 boost::ptr_vector<CohesiveInterfaceElement::PhysicalEquation>
607 &interfaces) {
609
610 //Rhs
612 feRhs.getOpPtrVector().push_back(
614 feRhs.getOpPtrVector().push_back(
616 //Lhs
618 feLhs.getOpPtrVector().push_back(
620 feLhs.getOpPtrVector().push_back(
622 //History
623 feHistory.getOpPtrVector().push_back(
625 feHistory.getOpPtrVector().push_back(
627 feHistory.getOpPtrVector().push_back(
629
630 //add equations/data for physical interfaces
631 boost::ptr_vector<CohesiveInterfaceElement::PhysicalEquation>::iterator pit;
632 for (pit = interfaces.begin(); pit != interfaces.end(); pit++) {
633 feRhs.getOpPtrVector().push_back(new OpRhs(field_name, commonData, *pit));
634 feLhs.getOpPtrVector().push_back(new OpLhs(field_name, commonData, *pit));
635 feHistory.getOpPtrVector().push_back(
636 new OpHistory(field_name, commonData, *pit));
637 }
638
640 }
641};
642
643} // namespace CohesiveElement
ForcesAndSourcesCore::UserDataOperator UserDataOperator
std::string type
constexpr double a
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_STD_EXCEPTION_THROW
Definition definitions.h:39
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
constexpr int order
constexpr double omega
Save field DOFS on vertices/tags.
double kappa
@ R
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
constexpr auto field_name
constexpr double g
Operator calculate gap, normal vector and rotation matrix.
OpCalculateGapGlobal(const std::string field_name, CommonData &common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
OpCalculateGapLocal(const std::string field_name, CommonData &common_data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
OpHistory(const std::string field_name, CommonData &common_data, PhysicalEquation &physical_eqations)
Operator calculate element stiffens matrix.
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpLhs(const std::string field_name, CommonData &common_data, PhysicalEquation &physical_eqations)
OpRhs(const std::string field_name, CommonData &common_data, PhysicalEquation &physical_eqations)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
double calcG(int gg, MatrixDouble gap_loc)
Calculate gap opening.
virtual MoFEMErrorCode calculateTangentStiffeness(MatrixDouble &tangent_matrix, int gg, CommonData &common_data, const FEMethod *fe_method)
Calculate tangent stiffness.
MoFEMErrorCode iNitailise(const FEMethod *fe_method)
Initialize history variable data.
MoFEMErrorCode calcOmega(const double kappa, double &omega)
Calculate damage.
MoFEMErrorCode calcTangetDglob(const double omega, double g, const VectorDouble &gap_loc, MatrixDouble &R)
Calculate tangent material stiffness.
MoFEMErrorCode calcDglob(const double omega, MatrixDouble &R)
Calculate stiffness material matrix.
virtual MoFEMErrorCode updateHistory(CommonData &common_data, const FEMethod *fe_method)
Update history variables when converged.
MoFEMErrorCode getKappa(int nb_gauss_pts, const FEMethod *fe_method)
Get pointer from the mesh to histoy variables .
virtual MoFEMErrorCode calculateTraction(VectorDouble &traction, int gg, CommonData &common_data, const FEMethod *fe_method)
Calculate tractions.
MoFEMErrorCode addOps(const std::string field_name, boost::ptr_vector< CohesiveInterfaceElement::PhysicalEquation > &interfaces)
Driver function settting all operators needed for interface element.
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.