v0.14.0
KelvinVoigtDamper.hpp
Go to the documentation of this file.
1 /** \file KelvinVoigtDamper.hpp
2  * \brief Implementation dashpot, i.e. damper
3  * \ingroup nonlinear_elastic_elem
4  *
5  */
6 
7 
8 
9 #ifndef __KELVIN_VOIGT_DAMPER_HPP__
10 #define __KELVIN_VOIGT_DAMPER_HPP__
11 
12 #ifndef WITH_ADOL_C
13 #error "MoFEM need to be compiled with ADOL-C"
14 #endif
15 
16 /** \brief Implementation of Kelvin Voigt Damper
17 \ingroup nonlinear_elastic_elem
18 
19 */
21 
23 
25 
26  /** \brief Dumper material parameters
27  \ingroup nonlinear_elastic_elem
28  */
31  double vBeta; ///< Poisson ration spring alpha
32  double gBeta; ///< Sheer modulus spring alpha
33  bool lInear;
34  BlockMaterialData() : vBeta(0), gBeta(1), lInear(false) {}
35  };
36 
37  std::map<int, BlockMaterialData> blockMaterialDataMap;
38 
39  /** \brief Constitutive model functions
40  \ingroup nonlinear_elastic_elem
41 
42  */
43  template <typename TYPE> struct ConstitutiveEquation {
44 
48 
51 
52  ConstitutiveEquation(BlockMaterialData &data, bool is_displacement = true)
53  : dAta(data), isDisplacement(is_displacement) {}
54  virtual ~ConstitutiveEquation() = default;
55 
56  MatrixBoundedArray<TYPE, 9> F; ///< Gradient of deformation
57  MatrixBoundedArray<TYPE, 9> FDot; ///< Rate of gradient of deformation
58  MatrixBoundedArray<TYPE, 9>
59  gradientUDot; ///< Rate of gradient of displacements
60  MatrixBoundedArray<TYPE, 9> engineringStrainDot;
61  MatrixBoundedArray<TYPE, 9>
62  dashpotCauchyStress; ///< Stress generated by spring beta
63  MatrixBoundedArray<TYPE, 9>
64  dashpotFirstPiolaKirchhoffStress; ///< Stress generated by spring beta
65  MatrixBoundedArray<TYPE, 9> invF; ///< Inverse of gradient of deformation
66 
68  TYPE J; ///< Jacobian of gradient of deformation
69 
70  /** \brief Calculate strain rate
71 
72  \f[
73  \dot{\varepsilon}_{ij} = \frac{1}{2}
74  \left(
75  \frac{\partial v_i}{\partial X_j}
76  +
77  \frac{\partial v_j}{\partial X_i}
78  \right)
79  \f]
80 
81  */
84  gradientUDot.resize(3, 3, false);
85  noalias(gradientUDot) = FDot;
86 
87  // for (int ii = 0; ii < 3; ii++)
88  // gradientUDot(ii, ii) -= 1;
89 
91  for (int ii = 0; ii < 3; ii++) {
93  }
94  engineringStrainDot.resize(3, 3, false);
95  noalias(engineringStrainDot) = gradientUDot + trans(gradientUDot);
96  engineringStrainDot *= 0.5;
98  }
99 
100  /** \brief Calculate Cauchy dashpot stress
101 
102  Calculate dashpot Cauchy stress. It has to be pull back to reference
103  configuration before use in total Lagrangian formulation.
104 
105  \f[
106  \sigma^\beta_{ij} = 2G^\beta\left[
107  \dot{\varepsilon}_{ij}
108  + \frac{v^\beta}{1-2v^\beta}\dot{\varepsilon}_{kk}\delta_{ij}
109  \right]
110  \f]
111 
112  */
115  dashpotCauchyStress.resize(3, 3, false);
116  double a = 2.0 * dAta.gBeta;
117  double b = a * (dAta.vBeta / (1.0 - 2.0 * dAta.vBeta));
119  for (int ii = 0; ii < 3; ii++) {
121  }
123  }
124 
125  /** \brief Calculate First Piola-Kirchhoff Stress Dashpot stress
126 
127  \f[
128  P^\beta_{ij} = J \sigma^\beta_{ik} F^{-1}_{jk}
129  \f]
130 
131  */
134  dashpotFirstPiolaKirchhoffStress.resize(3, 3, false);
135  if (dAta.lInear) {
137  } else {
138 
139  invF.resize(3, 3, false);
140 
141  auto t_dashpotFirstPiolaKirchhoffStress = getFTensor2FromArray3by3(
143  auto t_dashpotCauchyStress = getFTensor2FromArray3by3(
146  auto t_invF = getFTensor2FromArray3by3(invF, FTensor::Number<0>(), 0);
147  if (isDisplacement) {
148  t_F(0, 0) += 1;
149  t_F(1, 1) += 1;
150  t_F(2, 2) += 1;
151  }
152 
153  J = determinantTensor3by3(t_F);
154  CHKERR invertTensor3by3(t_F, J, t_invF);
155  t_dashpotFirstPiolaKirchhoffStress(i, j) =
156  J * (t_dashpotCauchyStress(i, k) * t_invF(j, k));
157  }
159  }
160  };
161 
162  typedef boost::ptr_map<int, KelvinVoigtDamper::ConstitutiveEquation<adouble>>
165 
166  /** \brief Common data for nonlinear_elastic_elem model
167  \ingroup nonlinear_elastic_elem
168  */
169  struct CommonData {
170 
174 
175  std::map<std::string, std::vector<VectorDouble>> dataAtGaussPts;
176  std::map<std::string, std::vector<MatrixDouble>> gradAtGaussPts;
177 
178  boost::shared_ptr<MatrixDouble> dataAtGaussTmpPtr;
179  boost::shared_ptr<MatrixDouble> gradDataAtGaussTmpPtr;
180 
181  std::vector<MatrixDouble> dashpotFirstPiolaKirchhoffStress;
182 
183  std::vector<double *> jacRowPtr;
184  std::vector<MatrixDouble> jacStress;
185 
186  bool recordOn;
187  bool skipThis;
188  std::map<int, int> nbActiveVariables, nbActiveResults;
189 
190  CommonData() : recordOn(true), skipThis(true) {
191  dataAtGaussTmpPtr = boost::make_shared<MatrixDouble>();
192  dataAtGaussTmpPtr->resize(3, 1);
193  gradDataAtGaussTmpPtr = boost::make_shared<MatrixDouble>();
194  gradDataAtGaussTmpPtr->resize(9, 1);
195  meshNodePositionName = "MESH_NODE_POSITIONS";
196  }
197  };
199 
200  /// \brief definition of volume element
202 
204  int addToRule; ///< Takes into account HO geometry
205 
206  DamperFE(MoFEM::Interface &m_field, CommonData &common_data)
208  commonData(common_data), addToRule(1) {}
209 
210  int getRule(int order) { return order + addToRule; }
211 
213 
216 
217  // if (ts_ctx == CTX_TSSETIFUNCTION) {
218 
219  // CHKERR mField.getInterface<VecManager>()->setOtherLocalGhostVector(
220  // problemPtr, commonData.spatialPositionName,
221  // commonData.spatialPositionNameDot, COL, ts_u_t, INSERT_VALUES,
222  // SCATTER_REVERSE);
223  // }
224 
226  }
227 
229 
231 
232  // CHKERR MoFEM::VolumeElementForcesAndSourcesCore::postProcess();
233 
234  // if (ts_ctx == CTX_TSSETIFUNCTION) {
235  // CHKERR VecAssemblyBegin(ts_F);
236  // CHKERR VecAssemblyEnd(ts_F);
237  // }
238  // if (ts_ctx == CTX_TSSETIJACOBIAN) {
239  // CHKERR MatAssemblyBegin(ts_B, MAT_FLUSH_ASSEMBLY);
240  // CHKERR MatAssemblyEnd(ts_B, MAT_FLUSH_ASSEMBLY);
241  // }
242 
244  }
245  };
246 
248 
250  : mField(m_field), feRhs(m_field, commonData),
251  feLhs(m_field, commonData) {}
252 
255 
257  bool calcVal;
258  bool calcGrad;
259  bool calcDot;
260  EntityType zeroAtType;
261 
262  OpGetDataAtGaussPts(const std::string field_name, CommonData &common_data,
263  bool calc_val, bool calc_grad, bool calc_dot = false,
264  EntityType zero_at_type = MBVERTEX)
265  : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
267  commonData(common_data), calcVal(calc_val), calcGrad(calc_grad),
268  calcDot(calc_dot), zeroAtType(zero_at_type) {}
269 
270  /** \brief Operator field value
271  *
272  */
273  MoFEMErrorCode doWork(int side, EntityType type,
276 
277  int nb_dofs = data.getFieldData().size();
278  if (nb_dofs == 0) {
280  }
281  int rank = data.getFieldDofs()[0]->getNbOfCoeffs();
282  int nb_gauss_pts = data.getN().size1();
283 
285  if (calcDot)
287  // Initialize
288  if (calcVal) {
289  commonData.dataAtGaussPts[field_name].resize(nb_gauss_pts);
290  for (int gg = 0; gg < nb_gauss_pts; gg++) {
291  commonData.dataAtGaussPts[field_name][gg].resize(rank, false);
292  commonData.dataAtGaussPts[field_name][gg].clear();
293  }
294  }
295  if (calcGrad) {
296  commonData.gradAtGaussPts[field_name].resize(nb_gauss_pts);
297  for (int gg = 0; gg < nb_gauss_pts; gg++) {
298  commonData.gradAtGaussPts[field_name][gg].resize(rank, 3, false);
299  commonData.gradAtGaussPts[field_name][gg].clear();
300  }
301  }
302 
303  // Zero values
304  // if (type == zeroAtType) {
305  // for (int gg = 0; gg < nb_gauss_pts; gg++) {
306  // if (calcVal) {
307  // commonData.dataAtGaussPts[rowFieldName][gg].clear();
308  // }
309  // if (calcGrad) {
310  // commonData.gradAtGaussPts[rowFieldName][gg].clear();
311  // }
312  // }
313  // }
314 
315  auto t_disp = getFTensor1FromMat<3>(*commonData.dataAtGaussTmpPtr);
316  auto t_diff_disp =
317  getFTensor2FromMat<3, 3>(*commonData.gradDataAtGaussTmpPtr);
318 
319  // Calculate values at integration points
320  for (int gg = 0; gg < nb_gauss_pts; gg++) {
321  for (int rr1 = 0; rr1 < rank; rr1++) {
322  if (calcVal) {
323  commonData.dataAtGaussPts[field_name][gg][rr1] = t_disp(rr1);
324  }
325  if (calcGrad) {
326  for (int rr2 = 0; rr2 < 3; rr2++) {
327  commonData.gradAtGaussPts[field_name][gg](rr1, rr2) =
328  t_diff_disp(rr1, rr2);
329  }
330  }
331  }
332  ++t_disp;
333  ++t_diff_disp;
334  }
335 
337  }
338  };
339 
340  struct OpJacobian
342 
343  std::vector<int> tagS;
346 
349  bool &recordOn;
350  std::map<int, int> &nbActiveVariables;
351  std::map<int, int> &nbActiveResults;
352 
353  OpJacobian(const std::string field_name, std::vector<int> tags,
355  CommonData &common_data, bool calculate_residual,
356  bool calculate_jacobian)
357  : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
359  tagS(tags), cE(ce), commonData(common_data),
360  calculateResidualBool(calculate_residual),
361  calculateJacobianBool(calculate_jacobian),
362  recordOn(common_data.recordOn),
364  nbActiveResults(common_data.nbActiveResults) {}
365 
368 
371 
372  if (tagS[DAMPERSTRESS] < 0) {
374  }
375 
376  cE.F.resize(3, 3, false);
377  cE.FDot.resize(3, 3, false);
378  MatrixDouble &F =
380  MatrixDouble &F_dot =
382  trace_on(tagS[DAMPERSTRESS]);
383  {
384  // Activate gradient of defamation
386  for (int dd1 = 0; dd1 < 3; dd1++) {
387  for (int dd2 = 0; dd2 < 3; dd2++) {
388  cE.F(dd1, dd2) <<= F(dd1, dd2);
390  }
391  }
392  for (int dd1 = 0; dd1 < 3; dd1++) {
393  for (int dd2 = 0; dd2 < 3; dd2++) {
394  cE.FDot(dd1, dd2) <<= F_dot(dd1, dd2);
396  }
397  }
398 
399  // Do calculations
403 
404  // Results
407  commonData.dashpotFirstPiolaKirchhoffStress[0].resize(3, 3, false);
408  for (int d1 = 0; d1 < 3; d1++) {
409  for (int d2 = 0; d2 < 3; d2++) {
413  }
414  }
415  }
416  trace_off();
418  }
419 
422 
423  int r;
424  // play recorder for values
425  r = ::function(tagS[te], nbActiveResults[tagS[te]],
426  nbActiveVariables[tagS[te]], &activeVariables[0], ptr);
427  if (r < 3) { // function is locally analytic
428  SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
429  "ADOL-C function evaluation with error r = %d", r);
430  }
431 
433  }
434 
437 
438  try {
439  int r;
440  r = jacobian(tagS[te], nbActiveResults[tagS[te]],
442  &(commonData.jacRowPtr[0]));
443  if (r < 3) {
444  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
445  "ADOL-C function evaluation with error");
446  }
447  } catch (const std::exception &ex) {
448  std::ostringstream ss;
449  ss << "throw in method: " << ex.what() << std::endl;
450  SETERRQ(PETSC_COMM_SELF, 1, ss.str().c_str());
451  }
453  }
454 
457 
458  if (tagS[DAMPERSTRESS] < 0) {
460  }
461 
463  for (int gg = 0; gg < nbGaussPts; gg++) {
464 
465  MatrixDouble &F =
467  MatrixDouble &F_dot =
469  int nb_active_variables = 0;
470 
471  // Activate gradient of defamation
472  for (int dd1 = 0; dd1 < 3; dd1++) {
473  for (int dd2 = 0; dd2 < 3; dd2++) {
474  activeVariables[nb_active_variables++] = F(dd1, dd2);
475  }
476  }
477  // Activate rate of gradient of defamation
478  for (int dd1 = 0; dd1 < 3; dd1++) {
479  for (int dd2 = 0; dd2 < 3; dd2++) {
480  activeVariables[nb_active_variables++] = F_dot(dd1, dd2);
481  }
482  }
483 
484  if (nb_active_variables != nbActiveVariables[tagS[DAMPERSTRESS]]) {
485  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
486  "Number of active variables does not much");
487  }
488 
489  if (calculateResidualBool) {
490  if (gg == 0) {
492  }
493  commonData.dashpotFirstPiolaKirchhoffStress[gg].resize(3, 3, false);
495  DAMPERSTRESS,
497  }
498 
499  if (calculateJacobianBool) {
500  if (gg == 0) {
503  }
506  false);
507  for (int dd = 0; dd < nbActiveResults[tagS[DAMPERSTRESS]]; dd++) {
509  }
511  }
512  }
513 
515  }
516 
517  MoFEMErrorCode doWork(int row_side, EntityType row_type,
518  EntitiesFieldData::EntData &row_data) {
520 
521  if (row_type != MBVERTEX)
523  nbGaussPts = row_data.getN().size1();
524 
525  commonData.skipThis = false;
526  if (cE.dAta.tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) ==
527  cE.dAta.tEts.end()) {
528  commonData.skipThis = true;
530  }
531 
532  if (recordOn) {
534  }
536 
538  }
539  };
540 
544  : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
546 
548  MoFEMErrorCode aSemble(int row_side, EntityType row_type,
549  EntitiesFieldData::EntData &row_data) {
551  int nb_dofs = row_data.getIndices().size();
552  int *indices_ptr = &row_data.getIndices()[0];
553  CHKERR VecSetValues(getFEMethod()->ts_F, nb_dofs, indices_ptr, &nF[0],
554  ADD_VALUES);
556  }
557  };
558 
559  /** \brief Assemble internal force vector
560  \ingroup nonlinear_elastic_elem
561 
562  */
563  struct OpRhsStress : public AssembleVector {
565  OpRhsStress(CommonData &common_data)
566  : AssembleVector(common_data.spatialPositionName),
567  commonData(common_data) {}
568  MoFEMErrorCode doWork(int row_side, EntityType row_type,
569  EntitiesFieldData::EntData &row_data) {
571 
572  if (commonData.skipThis) {
574  }
575 
576  int nb_dofs = row_data.getIndices().size();
577  if (!nb_dofs) {
579  }
580  nF.resize(nb_dofs, false);
581  nF.clear();
582  int nb_gauss_pts = row_data.getN().size1();
583  for (int gg = 0; gg != nb_gauss_pts; gg++) {
584  const MatrixAdaptor &diffN = row_data.getDiffN(gg, nb_dofs / 3);
585  const MatrixDouble &stress =
587  double val = getVolume() * getGaussPts()(3, gg);
588  for (int dd = 0; dd < nb_dofs / 3; dd++) {
589  for (int rr = 0; rr < 3; rr++) {
590  for (int nn = 0; nn < 3; nn++) {
591  nF[3 * dd + rr] += val * diffN(dd, nn) * stress(rr, nn);
592  }
593  }
594  }
595  }
596  CHKERR aSemble(row_side, row_type, row_data);
598  }
599  };
600 
603  AssembleMatrix(string row_name, string col_name)
604  : MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator(
605  row_name, col_name, UserDataOperator::OPROWCOL) {}
606 
608  MoFEMErrorCode aSemble(int row_side, int col_side, EntityType row_type,
609  EntityType col_type,
610  EntitiesFieldData::EntData &row_data,
611  EntitiesFieldData::EntData &col_data) {
613  int nb_row = row_data.getIndices().size();
614  int nb_col = col_data.getIndices().size();
615  int *row_indices_ptr = &row_data.getIndices()[0];
616  int *col_indices_ptr = &col_data.getIndices()[0];
617  CHKERR MatSetValues(getFEMethod()->ts_B, nb_row, row_indices_ptr, nb_col,
618  col_indices_ptr, &K(0, 0), ADD_VALUES);
619  if (sYmm) {
620  // Assemble of diagonal terms
621  if (row_side != col_side || row_type != col_type) {
622  transK.resize(nb_col, nb_row, false);
623  noalias(transK) = trans(K);
624  CHKERR MatSetValues(getFEMethod()->ts_B, nb_col, col_indices_ptr,
625  nb_row, row_indices_ptr, &transK(0, 0),
626  ADD_VALUES);
627  }
628  }
630  }
631  };
632 
633  /** \brief Assemble matrix
634  */
635  struct OpLhsdxdx : public AssembleMatrix {
637  OpLhsdxdx(CommonData &common_data)
638  : AssembleMatrix(common_data.spatialPositionName,
639  common_data.spatialPositionName),
640  commonData(common_data) {}
643  int gg) {
645  int nb_col = col_data.getIndices().size();
646  dStress_dx.resize(9, nb_col, false);
647  dStress_dx.clear();
648  const MatrixAdaptor diffN = col_data.getDiffN(gg, nb_col / 3);
649  MatrixDouble &jac_stress = commonData.jacStress[gg];
650  for (int dd = 0; dd < nb_col / 3; dd++) { // DoFs in column
651  for (int jj = 0; jj < 3; jj++) { // cont. DoFs in column
652  double a = diffN(dd, jj);
653  for (int rr = 0; rr < 3; rr++) { // Loop over dsigma_ii/dX_rr
654  for (int ii = 0; ii < 9;
655  ii++) { // ii represents components of stress tensor
656  dStress_dx(ii, 3 * dd + rr) += jac_stress(ii, 3 * rr + jj) * a;
657  }
658  }
659  }
660  }
662  }
663  MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
664  EntityType col_type,
665  EntitiesFieldData::EntData &row_data,
666  EntitiesFieldData::EntData &col_data) {
668 
669  if (commonData.skipThis) {
671  }
672 
673  int nb_row = row_data.getIndices().size();
674  int nb_col = col_data.getIndices().size();
675  if (nb_row == 0)
677  if (nb_col == 0)
679  K.resize(nb_row, nb_col, false);
680  K.clear();
681  int nb_gauss_pts = row_data.getN().size1();
682  for (int gg = 0; gg != nb_gauss_pts; gg++) {
683  CHKERR get_dStress_dx(col_data, gg);
684  double val = getVolume() * getGaussPts()(3, gg);
685  // std::cerr << dStress_dx << std::endl;
686  dStress_dx *= val;
687  const MatrixAdaptor &diffN = row_data.getDiffN(gg, nb_row / 3);
688  { // integrate element stiffness matrix
689  for (int dd1 = 0; dd1 < nb_row / 3; dd1++) {
690  for (int rr1 = 0; rr1 < 3; rr1++) {
691  for (int dd2 = 0; dd2 < nb_col / 3; dd2++) {
692  for (int rr2 = 0; rr2 < 3; rr2++) {
693  K(3 * dd1 + rr1, 3 * dd2 + rr2) +=
694  (diffN(dd1, 0) * dStress_dx(3 * rr1 + 0, 3 * dd2 + rr2) +
695  diffN(dd1, 1) * dStress_dx(3 * rr1 + 1, 3 * dd2 + rr2) +
696  diffN(dd1, 2) * dStress_dx(3 * rr1 + 2, 3 * dd2 + rr2));
697  }
698  }
699  }
700  }
701  }
702  }
703  // std::cerr << "G " << getNumeredEntFiniteElementPtr()->getRefEnt() <<
704  // std::endl << K << std::endl;
705  CHKERR aSemble(row_side, col_side, row_type, col_type, row_data,
706  col_data);
707 
709  }
710  };
711 
712  /** \brief Assemble matrix
713  */
714  struct OpLhsdxdot : public AssembleMatrix {
716  OpLhsdxdot(CommonData &common_data)
717  : AssembleMatrix(common_data.spatialPositionName,
718  common_data.spatialPositionName),
719  commonData(common_data) {}
722  int gg) {
724  int nb_col = col_data.getIndices().size();
725  dStress_dot.resize(9, nb_col, false);
726  dStress_dot.clear();
727  const MatrixAdaptor diffN = col_data.getDiffN(gg, nb_col / 3);
728  MatrixDouble &jac_stress = commonData.jacStress[gg];
729  for (int dd = 0; dd < nb_col / 3; dd++) { // DoFs in column
730  for (int jj = 0; jj < 3; jj++) { // cont. DoFs in column
731  double a = diffN(dd, jj);
732  for (int rr = 0; rr < 3; rr++) { // Loop over dsigma_ii/dX_rr
733  for (int ii = 0; ii < 9;
734  ii++) { // ii represents components of stress tensor
735  dStress_dot(ii, 3 * dd + rr) +=
736  jac_stress(ii, 9 + 3 * rr + jj) * a * getFEMethod()->ts_a;
737  }
738  }
739  }
740  }
742  }
743  MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
744  EntityType col_type,
745  EntitiesFieldData::EntData &row_data,
746  EntitiesFieldData::EntData &col_data) {
748 
749  if (commonData.skipThis) {
751  }
752 
753  int nb_row = row_data.getIndices().size();
754  int nb_col = col_data.getIndices().size();
755  if (nb_row == 0)
757  if (nb_col == 0)
759  K.resize(nb_row, nb_col, false);
760  K.clear();
761  int nb_gauss_pts = row_data.getN().size1();
762  for (int gg = 0; gg != nb_gauss_pts; gg++) {
763  CHKERR get_dStress_dot(col_data, gg);
764  double val = getVolume() * getGaussPts()(3, gg);
765  // std::cerr << dStress_dot << std::endl;
766  dStress_dot *= val;
767  const MatrixAdaptor &diffN = row_data.getDiffN(gg, nb_row / 3);
768  { // integrate element stiffness matrix
769  for (int dd1 = 0; dd1 < nb_row / 3; dd1++) {
770  for (int rr1 = 0; rr1 < 3; rr1++) {
771  for (int dd2 = 0; dd2 < nb_col / 3; dd2++) {
772  for (int rr2 = 0; rr2 < 3; rr2++) {
773  K(3 * dd1 + rr1, 3 * dd2 + rr2) +=
774  (diffN(dd1, 0) * dStress_dot(3 * rr1 + 0, 3 * dd2 + rr2) +
775  diffN(dd1, 1) * dStress_dot(3 * rr1 + 1, 3 * dd2 + rr2) +
776  diffN(dd1, 2) * dStress_dot(3 * rr1 + 2, 3 * dd2 + rr2));
777  }
778  }
779  }
780  }
781  }
782  }
783  // std::cerr << "G " << getNumeredEntFiniteElementPtr()->getRefEnt() <<
784  // std::endl << K << std::endl;
785  CHKERR aSemble(row_side, col_side, row_type, col_type, row_data,
786  col_data);
787 
789  }
790  };
791 
794 
796  if (it->getName().compare(0, 6, "DAMPER") == 0) {
797  std::vector<double> data;
798  CHKERR it->getAttributes(data);
799  if (data.size() < 2) {
800  SETERRQ(PETSC_COMM_SELF, 1, "Data inconsistency");
801  }
802  CHKERR mField.get_moab().get_entities_by_type(
803  it->meshset, MBTET, blockMaterialDataMap[it->getMeshsetId()].tEts,
804  true);
805  blockMaterialDataMap[it->getMeshsetId()].gBeta = data[0];
806  blockMaterialDataMap[it->getMeshsetId()].vBeta = data[1];
807  }
808  }
810  }
811 
812  MoFEMErrorCode setOperators(const int tag) {
814 
815  for (auto &&fe_ptr : {&feRhs, &feLhs}) {
816  // CHKERR addHOOpsVol(commonData.meshNodePositionName, *fe_ptr, true, false,
817  // false, false);
818  fe_ptr->getOpPtrVector().push_back(
822  fe_ptr->getOpPtrVector().push_back(new OpGetDataAtGaussPts(
823  commonData.spatialPositionName, commonData, false, true, false));
824  fe_ptr->getOpPtrVector().push_back(
825  new OpCalculateVectorFieldGradientDot<3, 3>(
828  fe_ptr->getOpPtrVector().push_back(new OpGetDataAtGaussPts(
829  commonData.spatialPositionName, commonData, false, true, true));
830  }
831 
832  // attach tags for each recorder
833  std::vector<int> tags;
834  tags.push_back(tag);
835 
836  ConstitutiveEquationMap::iterator mit = constitutiveEquationMap.begin();
837  for (; mit != constitutiveEquationMap.end(); mit++) {
839  constitutiveEquationMap.at(mit->first);
840  // Right hand side operators
841  feRhs.getOpPtrVector().push_back(new OpJacobian(
842  commonData.spatialPositionName, tags, ce, commonData, true, false));
843  feRhs.getOpPtrVector().push_back(new OpRhsStress(commonData));
844 
845  // Left hand side operators
846  feLhs.getOpPtrVector().push_back(new OpJacobian(
847  commonData.spatialPositionName, tags, ce, commonData, false, true));
848  feLhs.getOpPtrVector().push_back(new OpLhsdxdx(commonData));
849  feLhs.getOpPtrVector().push_back(new OpLhsdxdot(commonData));
850  }
851 
853  }
854 };
855 
856 #endif //__KELVIN_VOIGT_DAMPER_HPP__
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
KelvinVoigtDamper::ConstitutiveEquation::invF
MatrixBoundedArray< TYPE, 9 > invF
Inverse of gradient of deformation.
Definition: KelvinVoigtDamper.hpp:65
KelvinVoigtDamper::OpRhsStress::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: KelvinVoigtDamper.hpp:568
KelvinVoigtDamper::OpJacobian::activeVariables
VectorDouble activeVariables
Definition: KelvinVoigtDamper.hpp:367
KelvinVoigtDamper::OpJacobian::nbGaussPts
int nbGaussPts
Definition: KelvinVoigtDamper.hpp:366
KelvinVoigtDamper::mField
MoFEM::Interface & mField
Definition: KelvinVoigtDamper.hpp:24
MoFEM::VolumeElementForcesAndSourcesCore::VolumeElementForcesAndSourcesCore
VolumeElementForcesAndSourcesCore(Interface &m_field, const EntityType type=MBTET)
Definition: VolumeElementForcesAndSourcesCore.cpp:9
KelvinVoigtDamper::OpRhsStress
Assemble internal force vector.
Definition: KelvinVoigtDamper.hpp:563
KelvinVoigtDamper::OpLhsdxdx::get_dStress_dx
MoFEMErrorCode get_dStress_dx(EntitiesFieldData::EntData &col_data, int gg)
Definition: KelvinVoigtDamper.hpp:642
KelvinVoigtDamper::CommonData::spatialPositionNameDot
string spatialPositionNameDot
Definition: KelvinVoigtDamper.hpp:172
MoFEM::MatSetValues
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
Definition: EntitiesFieldData.hpp:1644
MoFEM::TSMethod::ts_a
PetscReal ts_a
shift for U_t (see PETSc Time Solver)
Definition: LoopMethods.hpp:160
KelvinVoigtDamper::BlockMaterialData::gBeta
double gBeta
Sheer modulus spring alpha.
Definition: KelvinVoigtDamper.hpp:32
KelvinVoigtDamper::DamperFE::DamperFE
DamperFE(MoFEM::Interface &m_field, CommonData &common_data)
Definition: KelvinVoigtDamper.hpp:206
KelvinVoigtDamper::AssembleVector::nF
VectorDouble nF
Definition: KelvinVoigtDamper.hpp:547
KelvinVoigtDamper::DamperFE::addToRule
int addToRule
Takes into account HO geometry.
Definition: KelvinVoigtDamper.hpp:204
KelvinVoigtDamper::AssembleVector
Definition: KelvinVoigtDamper.hpp:541
KelvinVoigtDamper::OpRhsStress::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:564
KelvinVoigtDamper::ConstitutiveEquation::F
MatrixBoundedArray< TYPE, 9 > F
Gradient of deformation.
Definition: KelvinVoigtDamper.hpp:56
KelvinVoigtDamper::OpLhsdxdot::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:715
KelvinVoigtDamper
Implementation of Kelvin Voigt Damper.
Definition: KelvinVoigtDamper.hpp:20
KelvinVoigtDamper::ConstitutiveEquation::traceEngineeringStrainDot
TYPE traceEngineeringStrainDot
Definition: KelvinVoigtDamper.hpp:67
KelvinVoigtDamper::DamperFE::postProcess
MoFEMErrorCode postProcess()
function is run at the end of loop
Definition: KelvinVoigtDamper.hpp:228
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
KelvinVoigtDamper::OpJacobian::calculateAtIntPtsDamperStress
MoFEMErrorCode calculateAtIntPtsDamperStress()
Definition: KelvinVoigtDamper.hpp:455
KelvinVoigtDamper::ConstitutiveEquation::calculateDashpotCauchyStress
virtual MoFEMErrorCode calculateDashpotCauchyStress()
Calculate Cauchy dashpot stress.
Definition: KelvinVoigtDamper.hpp:113
KelvinVoigtDamper::feLhs
DamperFE feLhs
Definition: KelvinVoigtDamper.hpp:247
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator::getVolume
double getVolume() const
element volume (linear geometry)
Definition: VolumeElementForcesAndSourcesCore.hpp:161
MoFEM::ForcesAndSourcesCore::preProcess
virtual MoFEMErrorCode preProcess()
function is run at the beginning of loop
Definition: ForcesAndSourcesCore.cpp:1993
KelvinVoigtDamper::ConstitutiveEquation
Constitutive model functions.
Definition: KelvinVoigtDamper.hpp:43
KelvinVoigtDamper::OpJacobian::calculateResidualBool
bool calculateResidualBool
Definition: KelvinVoigtDamper.hpp:347
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROWCOL
@ OPROWCOL
operator doWork is executed on FE rows &columns
Definition: ForcesAndSourcesCore.hpp:569
MOFEM_IMPOSSIBLE_CASE
@ MOFEM_IMPOSSIBLE_CASE
Definition: definitions.h:35
MoFEM::VecSetValues
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Definition: EntitiesFieldData.hpp:1589
sdf.r
int r
Definition: sdf.py:8
order
constexpr int order
Definition: dg_projection.cpp:18
KelvinVoigtDamper::CommonData::gradDataAtGaussTmpPtr
boost::shared_ptr< MatrixDouble > gradDataAtGaussTmpPtr
Definition: KelvinVoigtDamper.hpp:179
KelvinVoigtDamper::OpLhsdxdot::OpLhsdxdot
OpLhsdxdot(CommonData &common_data)
Definition: KelvinVoigtDamper.hpp:716
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
KelvinVoigtDamper::OpGetDataAtGaussPts::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:256
MoFEM::invertTensor3by3
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:1588
MoFEM::ForcesAndSourcesCore::UserDataOperator::getGaussPts
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
Definition: ForcesAndSourcesCore.hpp:1236
KelvinVoigtDamper::OpGetDataAtGaussPts::zeroAtType
EntityType zeroAtType
Definition: KelvinVoigtDamper.hpp:260
KelvinVoigtDamper::ConstitutiveEquation::J
TYPE J
Jacobian of gradient of deformation.
Definition: KelvinVoigtDamper.hpp:68
KelvinVoigtDamper::ConstitutiveEquation::isDisplacement
bool isDisplacement
Definition: KelvinVoigtDamper.hpp:50
KelvinVoigtDamper::CommonData::dashpotFirstPiolaKirchhoffStress
std::vector< MatrixDouble > dashpotFirstPiolaKirchhoffStress
Definition: KelvinVoigtDamper.hpp:181
KelvinVoigtDamper::OpJacobian::nbActiveResults
std::map< int, int > & nbActiveResults
Definition: KelvinVoigtDamper.hpp:351
FTensor::Number< 0 >
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
KelvinVoigtDamper::KelvinVoigtDamper
KelvinVoigtDamper(MoFEM::Interface &m_field)
Definition: KelvinVoigtDamper.hpp:249
KelvinVoigtDamper::AssembleMatrix
Definition: KelvinVoigtDamper.hpp:601
KelvinVoigtDamper::CommonData::meshNodePositionName
string meshNodePositionName
Definition: KelvinVoigtDamper.hpp:173
KelvinVoigtDamper::ConstitutiveEquationMap
boost::ptr_map< int, KelvinVoigtDamper::ConstitutiveEquation< adouble > > ConstitutiveEquationMap
Definition: KelvinVoigtDamper.hpp:163
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
KelvinVoigtDamper::AssembleMatrix::aSemble
MoFEMErrorCode aSemble(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Definition: KelvinVoigtDamper.hpp:608
KelvinVoigtDamper::setOperators
MoFEMErrorCode setOperators(const int tag)
Definition: KelvinVoigtDamper.hpp:812
KelvinVoigtDamper::AssembleMatrix::K
MatrixDouble K
Definition: KelvinVoigtDamper.hpp:607
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
KelvinVoigtDamper::DamperFE::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:203
KelvinVoigtDamper::TagEvaluate
TagEvaluate
Definition: KelvinVoigtDamper.hpp:22
a
constexpr double a
Definition: approx_sphere.cpp:30
MoFEM::ForcesAndSourcesCore::UserDataOperator
Definition: ForcesAndSourcesCore.hpp:549
KelvinVoigtDamper::CommonData::jacStress
std::vector< MatrixDouble > jacStress
Definition: KelvinVoigtDamper.hpp:184
KelvinVoigtDamper::OpLhsdxdx::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:636
KelvinVoigtDamper::blockMaterialDataMap
std::map< int, BlockMaterialData > blockMaterialDataMap
Definition: KelvinVoigtDamper.hpp:37
KelvinVoigtDamper::ConstitutiveEquation::k
FTensor::Index< 'k', 3 > k
Definition: KelvinVoigtDamper.hpp:47
KelvinVoigtDamper::ConstitutiveEquation::FDot
MatrixBoundedArray< TYPE, 9 > FDot
Rate of gradient of deformation.
Definition: KelvinVoigtDamper.hpp:57
convert.type
type
Definition: convert.py:64
KelvinVoigtDamper::AssembleVector::aSemble
MoFEMErrorCode aSemble(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: KelvinVoigtDamper.hpp:548
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
KelvinVoigtDamper::OpJacobian::calculateJacobian
MoFEMErrorCode calculateJacobian(TagEvaluate te)
Definition: KelvinVoigtDamper.hpp:435
KelvinVoigtDamper::ConstitutiveEquation::ConstitutiveEquation
ConstitutiveEquation(BlockMaterialData &data, bool is_displacement=true)
Definition: KelvinVoigtDamper.hpp:52
MoFEM::ForcesAndSourcesCore::UserDataOperator::getNumeredEntFiniteElementPtr
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr() const
Return raw pointer to NumeredEntFiniteElement.
Definition: ForcesAndSourcesCore.hpp:1000
KelvinVoigtDamper::ConstitutiveEquation::dashpotFirstPiolaKirchhoffStress
MatrixBoundedArray< TYPE, 9 > dashpotFirstPiolaKirchhoffStress
Stress generated by spring beta.
Definition: KelvinVoigtDamper.hpp:64
KelvinVoigtDamper::OpJacobian::OpJacobian
OpJacobian(const std::string field_name, std::vector< int > tags, KelvinVoigtDamper::ConstitutiveEquation< adouble > &ce, CommonData &common_data, bool calculate_residual, bool calculate_jacobian)
Definition: KelvinVoigtDamper.hpp:353
KelvinVoigtDamper::OpJacobian::nbActiveVariables
std::map< int, int > & nbActiveVariables
Definition: KelvinVoigtDamper.hpp:350
KelvinVoigtDamper::OpJacobian
Definition: KelvinVoigtDamper.hpp:340
KelvinVoigtDamper::DamperFE
definition of volume element
Definition: KelvinVoigtDamper.hpp:201
MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition: definitions.h:34
KelvinVoigtDamper::OpJacobian::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: KelvinVoigtDamper.hpp:517
KelvinVoigtDamper::CommonData::dataAtGaussPts
std::map< std::string, std::vector< VectorDouble > > dataAtGaussPts
Definition: KelvinVoigtDamper.hpp:175
KelvinVoigtDamper::OpLhsdxdx::OpLhsdxdx
OpLhsdxdx(CommonData &common_data)
Definition: KelvinVoigtDamper.hpp:637
KelvinVoigtDamper::DamperFE::getRule
int getRule(int order)
Definition: KelvinVoigtDamper.hpp:210
MoFEM::VolumeElementForcesAndSourcesCore
Volume finite element base.
Definition: VolumeElementForcesAndSourcesCore.hpp:26
KelvinVoigtDamper::OpLhsdxdx::doWork
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Definition: KelvinVoigtDamper.hpp:663
KelvinVoigtDamper::CommonData::jacRowPtr
std::vector< double * > jacRowPtr
Definition: KelvinVoigtDamper.hpp:183
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
Definition: VolumeElementForcesAndSourcesCore.hpp:108
KelvinVoigtDamper::BlockMaterialData::vBeta
double vBeta
Poisson ration spring alpha.
Definition: KelvinVoigtDamper.hpp:31
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
KelvinVoigtDamper::DAMPERSTRESS
@ DAMPERSTRESS
Definition: KelvinVoigtDamper.hpp:22
FTensor::Index< 'i', 3 >
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFEMethod
const FEMethod * getFEMethod() const
Return raw pointer to Finite Element Method object.
Definition: ForcesAndSourcesCore.hpp:1042
KelvinVoigtDamper::setBlockDataMap
MoFEMErrorCode setBlockDataMap()
Definition: KelvinVoigtDamper.hpp:792
KelvinVoigtDamper::CommonData::recordOn
bool recordOn
Definition: KelvinVoigtDamper.hpp:186
KelvinVoigtDamper::CommonData::dataAtGaussTmpPtr
boost::shared_ptr< MatrixDouble > dataAtGaussTmpPtr
Definition: KelvinVoigtDamper.hpp:178
KelvinVoigtDamper::OpJacobian::recordDamperStress
MoFEMErrorCode recordDamperStress()
Definition: KelvinVoigtDamper.hpp:369
MoFEM::getFTensor2FromArray3by3
auto getFTensor2FromArray3by3(ublas::matrix< T, L, A > &data, const FTensor::Number< S > &, const size_t rr, const size_t cc=0)
Definition: Templates.hpp:1342
KelvinVoigtDamper::ConstitutiveEquation::dAta
BlockMaterialData & dAta
Definition: KelvinVoigtDamper.hpp:49
KelvinVoigtDamper::BlockMaterialData::BlockMaterialData
BlockMaterialData()
Definition: KelvinVoigtDamper.hpp:34
MoFEM::determinantTensor3by3
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1540
KelvinVoigtDamper::AssembleMatrix::transK
MatrixDouble transK
Definition: KelvinVoigtDamper.hpp:607
KelvinVoigtDamper::OpGetDataAtGaussPts::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator field value.
Definition: KelvinVoigtDamper.hpp:273
Range
KelvinVoigtDamper::OpGetDataAtGaussPts::calcVal
bool calcVal
Definition: KelvinVoigtDamper.hpp:257
FTensor::dd
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
KelvinVoigtDamper::BlockMaterialData::lInear
bool lInear
Definition: KelvinVoigtDamper.hpp:33
KelvinVoigtDamper::ConstitutiveEquation::dashpotCauchyStress
MatrixBoundedArray< TYPE, 9 > dashpotCauchyStress
Stress generated by spring beta.
Definition: KelvinVoigtDamper.hpp:62
KelvinVoigtDamper::ConstitutiveEquation::~ConstitutiveEquation
virtual ~ConstitutiveEquation()=default
_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
Definition: MeshsetsManager.hpp:71
KelvinVoigtDamper::feRhs
DamperFE feRhs
Definition: KelvinVoigtDamper.hpp:247
KelvinVoigtDamper::AssembleVector::AssembleVector
AssembleVector(string field_name)
Definition: KelvinVoigtDamper.hpp:543
KelvinVoigtDamper::BlockMaterialData::tEts
Range tEts
Definition: KelvinVoigtDamper.hpp:30
KelvinVoigtDamper::ConstitutiveEquation::gradientUDot
MatrixBoundedArray< TYPE, 9 > gradientUDot
Rate of gradient of displacements.
Definition: KelvinVoigtDamper.hpp:59
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
KelvinVoigtDamper::OpGetDataAtGaussPts::calcDot
bool calcDot
Definition: KelvinVoigtDamper.hpp:259
KelvinVoigtDamper::CommonData
Common data for nonlinear_elastic_elem model.
Definition: KelvinVoigtDamper.hpp:169
MoFEM::ForcesAndSourcesCore::getOpPtrVector
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Definition: ForcesAndSourcesCore.hpp:83
KelvinVoigtDamper::DamperFE::preProcess
MoFEMErrorCode preProcess()
function is run at the beginning of loop
Definition: KelvinVoigtDamper.hpp:212
KelvinVoigtDamper::AssembleMatrix::AssembleMatrix
AssembleMatrix(string row_name, string col_name)
Definition: KelvinVoigtDamper.hpp:603
KelvinVoigtDamper::OpLhsdxdx::dStress_dx
MatrixDouble dStress_dx
Definition: KelvinVoigtDamper.hpp:641
KelvinVoigtDamper::OpGetDataAtGaussPts::OpGetDataAtGaussPts
OpGetDataAtGaussPts(const std::string field_name, CommonData &common_data, bool calc_val, bool calc_grad, bool calc_dot=false, EntityType zero_at_type=MBVERTEX)
Definition: KelvinVoigtDamper.hpp:262
KelvinVoigtDamper::OpLhsdxdot::get_dStress_dot
MoFEMErrorCode get_dStress_dot(EntitiesFieldData::EntData &col_data, int gg)
Definition: KelvinVoigtDamper.hpp:721
KelvinVoigtDamper::OpJacobian::recordOn
bool & recordOn
Definition: KelvinVoigtDamper.hpp:349
KelvinVoigtDamper::OpJacobian::tagS
std::vector< int > tagS
Definition: KelvinVoigtDamper.hpp:343
KelvinVoigtDamper::CommonData::skipThis
bool skipThis
Definition: KelvinVoigtDamper.hpp:187
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
KelvinVoigtDamper::CommonData::CommonData
CommonData()
Definition: KelvinVoigtDamper.hpp:190
KelvinVoigtDamper::OpJacobian::cE
KelvinVoigtDamper::ConstitutiveEquation< adouble > & cE
Definition: KelvinVoigtDamper.hpp:344
KelvinVoigtDamper::OpJacobian::calculateFunction
MoFEMErrorCode calculateFunction(TagEvaluate te, double *ptr)
Definition: KelvinVoigtDamper.hpp:420
KelvinVoigtDamper::ConstitutiveEquation::engineringStrainDot
MatrixBoundedArray< TYPE, 9 > engineringStrainDot
Definition: KelvinVoigtDamper.hpp:60
MoFEM::Types::MatrixAdaptor
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
Definition: Types.hpp:132
KelvinVoigtDamper::CommonData::gradAtGaussPts
std::map< std::string, std::vector< MatrixDouble > > gradAtGaussPts
Definition: KelvinVoigtDamper.hpp:176
KelvinVoigtDamper::OpRhsStress::OpRhsStress
OpRhsStress(CommonData &common_data)
Definition: KelvinVoigtDamper.hpp:565
KelvinVoigtDamper::CommonData::spatialPositionName
string spatialPositionName
Definition: KelvinVoigtDamper.hpp:171
KelvinVoigtDamper::ConstitutiveEquation::calculateFirstPiolaKirchhoffStress
virtual MoFEMErrorCode calculateFirstPiolaKirchhoffStress()
Calculate First Piola-Kirchhoff Stress Dashpot stress.
Definition: KelvinVoigtDamper.hpp:132
KelvinVoigtDamper::CommonData::nbActiveResults
std::map< int, int > nbActiveResults
Definition: KelvinVoigtDamper.hpp:188
KelvinVoigtDamper::constitutiveEquationMap
ConstitutiveEquationMap constitutiveEquationMap
Definition: KelvinVoigtDamper.hpp:164
KelvinVoigtDamper::OpLhsdxdot::doWork
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Definition: KelvinVoigtDamper.hpp:743
KelvinVoigtDamper::CommonData::nbActiveVariables
std::map< int, int > nbActiveVariables
Definition: KelvinVoigtDamper.hpp:188
KelvinVoigtDamper::OpLhsdxdot
Assemble matrix.
Definition: KelvinVoigtDamper.hpp:714
MoFEM::DataOperator::sYmm
bool sYmm
If true assume that matrix is symmetric structure.
Definition: DataOperators.hpp:82
KelvinVoigtDamper::OpGetDataAtGaussPts::calcGrad
bool calcGrad
Definition: KelvinVoigtDamper.hpp:258
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
KelvinVoigtDamper::OpJacobian::calculateJacobianBool
bool calculateJacobianBool
Definition: KelvinVoigtDamper.hpp:348
KelvinVoigtDamper::ConstitutiveEquation::calculateEngineeringStrainDot
virtual MoFEMErrorCode calculateEngineeringStrainDot()
Calculate strain rate.
Definition: KelvinVoigtDamper.hpp:82
KelvinVoigtDamper::OpLhsdxdot::dStress_dot
MatrixDouble dStress_dot
Definition: KelvinVoigtDamper.hpp:720
OpCalculateVectorFieldGradient
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
KelvinVoigtDamper::ConstitutiveEquation::i
FTensor::Index< 'i', 3 > i
Definition: KelvinVoigtDamper.hpp:45
KelvinVoigtDamper::OpJacobian::commonData
CommonData & commonData
Definition: KelvinVoigtDamper.hpp:345
F
@ F
Definition: free_surface.cpp:394
KelvinVoigtDamper::commonData
CommonData commonData
Definition: KelvinVoigtDamper.hpp:198
KelvinVoigtDamper::ConstitutiveEquation::j
FTensor::Index< 'j', 3 > j
Definition: KelvinVoigtDamper.hpp:46
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567
KelvinVoigtDamper::OpLhsdxdx
Assemble matrix.
Definition: KelvinVoigtDamper.hpp:635
KelvinVoigtDamper::OpGetDataAtGaussPts
Definition: KelvinVoigtDamper.hpp:253
KelvinVoigtDamper::BlockMaterialData
Dumper material parameters.
Definition: KelvinVoigtDamper.hpp:29