v0.14.0
ConvectiveMassElement.hpp
Go to the documentation of this file.
1 /** \file ConvectiveMassElement.hpp
2  * \brief Operators and data structures for mass and convective mass element
3  * \ingroup convective_mass_elem
4  *
5  */
6 
7 
8 
9 #ifndef __CONVECTIVE_MASS_ELEMENT_HPP
10 #define __CONVECTIVE_MASS_ELEMENT_HPP
11 
12 #ifndef WITH_ADOL_C
13 #error "MoFEM need to be compiled with ADOL-C"
14 #endif
15 
16 /** \brief structure grouping operators and data used for calculation of mass
17  * (convective) element \ingroup convective_mass_elem \ingroup
18  * nonlinear_elastic_elem
19  *
20  * In order to assemble matrices and right hand vectors, the loops over
21  * elements, entities over that elements and finally loop over integration
22  * points are executed.
23  *
24  * Following implementation separate those three celeries of loops and to each
25  * loop attach operator.
26  *
27  */
29 
30  /// \brief definition of volume element
31  struct MyVolumeFE : public VolumeElementForcesAndSourcesCore {
32 
33  Mat A;
34  Vec F;
35 
36  MyVolumeFE(MoFEM::Interface &m_field);
37 
38  /** \brief it is used to calculate nb. of Gauss integration points
39  *
40  * for more details pleas look
41  * Reference:
42  *
43  * Albert Nijenhuis, Herbert Wilf,
44  * Combinatorial Algorithms for Computers and Calculators,
45  * Second Edition,
46  * Academic Press, 1978,
47  * ISBN: 0-12-519260-6,
48  * LC: QA164.N54.
49  *
50  * More details about algorithm
51  * http://people.sc.fsu.edu/~jburkardt/cpp_src/gm_rule/gm_rule.html
52  **/
53  int getRule(int order);
54 
55  SmartPetscObj<Vec> V;
56  double eNergy;
57 
60  };
61 
62  MyVolumeFE feMassRhs; ///< calculate right hand side for tetrahedral elements
63  MyVolumeFE &getLoopFeMassRhs() {
64  return feMassRhs;
65  } ///< get rhs volume element
66  MyVolumeFE feMassLhs; ///< calculate left hand side for tetrahedral
67  ///< elements,i.e. mass element
68  MyVolumeFE &getLoopFeMassLhs() {
69  return feMassLhs;
70  } ///< get lhs volume element
71  MyVolumeFE feMassAuxLhs; ///< calculate left hand side for tetrahedral
72  ///< elements for Kuu shell matrix
73  MyVolumeFE &getLoopFeMassAuxLhs() {
74  return feMassAuxLhs;
75  } ///< get lhs volume element for Kuu shell matrix
76 
77  MyVolumeFE feVelRhs; ///< calculate right hand side for tetrahedral elements
78  MyVolumeFE &getLoopFeVelRhs() { return feVelRhs; } ///< get rhs volume element
79  MyVolumeFE feVelLhs; ///< calculate left hand side for tetrahedral elements
80  MyVolumeFE &getLoopFeVelLhs() { return feVelLhs; } ///< get lhs volume element
81 
82  MyVolumeFE feTRhs; ///< calculate right hand side for tetrahedral elements
83  MyVolumeFE &getLoopFeTRhs() { return feTRhs; } ///< get rhs volume element
84  MyVolumeFE feTLhs; ///< calculate left hand side for tetrahedral elements
85  MyVolumeFE &getLoopFeTLhs() { return feTLhs; } ///< get lhs volume element
86 
87  MyVolumeFE feEnergy; ///< calculate kinetic energy
88  MyVolumeFE &getLoopFeEnergy() {
89  return feEnergy;
90  } ///< get kinetic energy element
91 
94  auto add_ops = [&](auto &fe) {
95  return MoFEM::addHOOpsVol("MESH_NODE_POSITIONS", fe, true, false, false,
96  false);
97  };
98  CHKERR add_ops(feMassRhs);
99  CHKERR add_ops(feMassLhs);
100  CHKERR add_ops(feMassAuxLhs);
101  CHKERR add_ops(feVelRhs);
102  CHKERR add_ops(feTRhs);
103  CHKERR add_ops(feTLhs);
104  CHKERR add_ops(feEnergy);
106  }
107 
109  short int tAg;
110 
111  ConvectiveMassElement(MoFEM::Interface &m_field, short int tag);
112 
113  /** \brief data for calculation inertia forces
114  * \ingroup user_modules
115  */
116  struct BlockData {
117  double rho0; ///< reference density
118  VectorDouble a0; ///< constant acceleration
119  Range tEts; ///< elements in block set
120  };
121  std::map<int, BlockData>
122  setOfBlocks; ///< maps block set id with appropriate BlockData
123 
124  /** \brief common data used by volume elements
125  * \ingroup user_modules
126  */
127  struct CommonData {
128 
129  bool lInear;
131  CommonData() : lInear(false), staticOnly(false) {}
132 
133  std::map<std::string, std::vector<VectorDouble>> dataAtGaussPts;
134  std::map<std::string, std::vector<MatrixDouble>> gradAtGaussPts;
138  std::vector<VectorDouble> valVel;
139  std::vector<std::vector<double *>> jacVelRowPtr;
140  std::vector<MatrixDouble> jacVel;
141  std::vector<VectorDouble> valMass;
142  std::vector<std::vector<double *>> jacMassRowPtr;
143  std::vector<MatrixDouble> jacMass;
144  std::vector<VectorDouble> valT;
145  std::vector<std::vector<double *>> jacTRowPtr;
146  std::vector<MatrixDouble> jacT;
147  };
149 
150  boost::ptr_vector<MethodForForceScaling> methodsOp;
151 
154 
155  std::vector<VectorDouble> &valuesAtGaussPts;
156  std::vector<MatrixDouble> &gradientAtGaussPts;
157  const EntityType zeroAtType;
158 
159  OpGetDataAtGaussPts(const std::string field_name,
160  std::vector<VectorDouble> &values_at_gauss_pts,
161  std::vector<MatrixDouble> &gardient_at_gauss_pts);
162 
163  /** \brief operator calculating deformation gradient
164  *
165  */
166  MoFEMErrorCode doWork(int side, EntityType type,
168  };
169 
171  OpGetCommonDataAtGaussPts(const std::string field_name,
172  CommonData &common_data);
173  };
174 
175  struct CommonFunctions {};
176 
180 
183  int tAg;
184  bool jAcobian;
185  bool &lInear;
186  bool fieldDisp;
187 
188  boost::ptr_vector<MethodForForceScaling> &methodsOp;
189 
190  OpMassJacobian(const std::string field_name, BlockData &data,
191  CommonData &common_data,
192  boost::ptr_vector<MethodForForceScaling> &methods_op,
193  int tag, bool linear = false);
194 
198 
199  VectorBoundedArray<adouble, 3> a, dot_W, dp_dt, a_res;
201  std::vector<double> active;
202 
203  MoFEMErrorCode doWork(int row_side, EntityType row_type,
204  EntitiesFieldData::EntData &row_data);
205  };
206 
209 
212 
213  OpMassRhs(const std::string field_name, BlockData &data,
214  CommonData &common_data);
215 
217 
218  MoFEMErrorCode doWork(int row_side, EntityType row_type,
219  EntitiesFieldData::EntData &row_data);
220  };
221 
225 
229 
230  OpMassLhs_dM_dv(const std::string vel_field, const std::string field_name,
231  BlockData &data, CommonData &common_data,
232  Range *forcesonlyonentities_ptr = NULL);
233 
235 
237  int gg);
238 
239  MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
240  EntityType col_type,
241  EntitiesFieldData::EntData &row_data,
242  EntitiesFieldData::EntData &col_data);
243  };
244 
246 
247  OpMassLhs_dM_dx(const std::string field_name, const std::string col_field,
248  BlockData &data, CommonData &common_data);
249 
251  };
252 
254 
255  OpMassLhs_dM_dX(const std::string field_name, const std::string col_field,
256  BlockData &data, CommonData &common_data);
257 
259  };
260 
263 
266  SmartPetscObj<Vec> V;
267  bool &lInear;
268 
269  OpEnergy(const std::string field_name, BlockData &data,
270  CommonData &common_data, SmartPetscObj<Vec> v);
271 
274 
275  MoFEMErrorCode doWork(int row_side, EntityType row_type,
276  EntitiesFieldData::EntData &row_data);
277  };
278 
282 
285  int tAg;
287 
288  OpVelocityJacobian(const std::string field_name, BlockData &data,
289  CommonData &common_data, int tag, bool jacobian = true);
290 
291  VectorBoundedArray<adouble, 3> a_res, v, dot_w, dot_W, dot_u;
294 
295  std::vector<double> active;
296 
297  MoFEMErrorCode doWork(int row_side, EntityType row_type,
298  EntitiesFieldData::EntData &row_data);
299  };
300 
304 
307 
308  OpVelocityRhs(const std::string field_name, BlockData &data,
309  CommonData &common_data);
310 
312 
313  MoFEMErrorCode doWork(int row_side, EntityType row_type,
314  EntitiesFieldData::EntData &row_data);
315  };
316 
318 
319  OpVelocityLhs_dV_dv(const std::string vel_field,
320  const std::string field_name, BlockData &data,
321  CommonData &common_data);
322 
324  int gg);
325  };
326 
328 
329  OpVelocityLhs_dV_dx(const std::string vel_field,
330  const std::string field_name, BlockData &data,
331  CommonData &common_data);
332 
334  int gg);
335  };
336 
338 
339  OpVelocityLhs_dV_dX(const std::string vel_field,
340  const std::string field_name, BlockData &data,
341  CommonData &common_data);
342 
344  int gg);
345  };
346 
350 
353  int tAg;
354  bool jAcobian;
355  bool fieldDisp;
356 
358  BlockData &data,
359  CommonData &common_data, int tag,
360  bool jacobian = true);
361 
362  VectorBoundedArray<adouble, 3> a, v, a_T;
365 
366  MoFEMErrorCode doWork(int row_side, EntityType row_type,
367  EntitiesFieldData::EntData &row_data);
368  };
369 
373 
377 
379  BlockData &data,
380  CommonData &common_data,
381  Range *forcesonlyonentities_ptr);
382 
384 
385  MoFEMErrorCode doWork(int row_side, EntityType row_type,
386  EntitiesFieldData::EntData &row_data);
387  };
388 
390 
391  OpEshelbyDynamicMaterialMomentumLhs_dv(const std::string vel_field,
392  const std::string field_name,
393  BlockData &data,
394  CommonData &common_data,
395  Range *forcesonlyonentities_ptr);
396 
398  int gg);
399  };
400 
403 
404  OpEshelbyDynamicMaterialMomentumLhs_dx(const std::string vel_field,
405  const std::string field_name,
406  BlockData &data,
407  CommonData &common_data,
408  Range *forcesonlyonentities_ptr);
409 
411  int gg);
412  };
413 
416 
417  OpEshelbyDynamicMaterialMomentumLhs_dX(const std::string vel_field,
418  const std::string field_name,
419  BlockData &data,
420  CommonData &common_data,
421  Range *forcesonlyonentities_ptr);
422 
424  int gg);
425  };
426 
427  /**
428  * @brief Set fields DOT_
429  *
430  * \note This is old solution, to keep rates calculate by TS as a fields. This
431  * is not memory efficient solution.
432  *
433  */
434  struct UpdateAndControl : public FEMethod {
435 
437  TS tS;
438  const std::string velocityField;
439  const std::string spatialPositionField;
440 
442  UpdateAndControl(MoFEM::Interface &m_field, TS _ts,
443  const std::string velocity_field,
444  const std::string spatial_position_field);
445 
446  /**
447  * @brief Scatter values from t_u_dt on the fields
448  *
449  * @return MoFEMErrorCode
450  */
452 
453  // This is empty fun cions does nothing
455  };
456 
458 
459  static MoFEMErrorCode
460  setBlocks(MoFEM::Interface &m_field,
461  boost::shared_ptr<map<int, BlockData>> &block_sets_ptr);
462 
464  string element_name, string velocity_field_name,
465  string spatial_position_field_name,
466  string material_position_field_name = "MESH_NODE_POSITIONS",
467  bool ale = false, BitRefLevel bit = BitRefLevel());
468 
470  string element_name, string velocity_field_name,
471  string spatial_position_field_name,
472  string material_position_field_name = "MESH_NODE_POSITIONS",
473  bool ale = false, BitRefLevel bit = BitRefLevel());
474 
476  string element_name, string velocity_field_name,
477  string spatial_position_field_name,
478  string material_position_field_name = "MESH_NODE_POSITIONS",
479  bool ale = false, BitRefLevel bit = BitRefLevel(),
480  Range *intersected = NULL);
481 
483  string velocity_field_name, string spatial_position_field_name,
484  string material_position_field_name = "MESH_NODE_POSITIONS",
485  bool ale = false, bool linear = false);
486 
488  string velocity_field_name, string spatial_position_field_name,
489  string material_position_field_name = "MESH_NODE_POSITIONS",
490  bool ale = false);
491 
493  string velocity_field_name, string spatial_position_field_name,
494  string material_position_field_name = "MESH_NODE_POSITIONS",
495  Range *forces_on_entities_ptr = NULL);
496 
498  string velocity_field_name, string spatial_position_field_name,
499  string material_position_field_name = "MESH_NODE_POSITIONS",
500  bool linear = false);
501 
502  struct MatShellCtx {
503 
504  Mat K, M;
505  VecScatter scatterU, scatterV;
506  double ts_a; //,scale;
507 
509  MatShellCtx();
510  virtual ~MatShellCtx();
511 
512  Mat barK;
513  Vec u, v, Ku, Mv;
515 
517 
518  friend MoFEMErrorCode MultOpA(Mat A, Vec x, Vec f);
519  friend MoFEMErrorCode ZeroEntriesOp(Mat A);
520  };
521 
522  /** \brief Mult operator for shell matrix
523  *
524  * \f[
525  \left[
526  \begin{array}{cc}
527  \mathbf{M} & \mathbf{K} \\
528  \mathbf{I} & -\mathbf{I}a
529  \end{array}
530  \right]
531  \left[
532  \begin{array}{c}
533  \mathbf{v} \\
534  \mathbf{u}
535  \end{array}
536  \right] =
537  \left[
538  \begin{array}{c}
539  \mathbf{r}_u \\
540  \mathbf{r}_v
541  \end{array}
542  \right]
543  * \f]
544  *
545  */
546  static MoFEMErrorCode MultOpA(Mat A, Vec x, Vec f) {
548 
549  void *void_ctx;
550  CHKERR MatShellGetContext(A, &void_ctx);
551  MatShellCtx *ctx = (MatShellCtx *)void_ctx;
552  if (!ctx->iNitialized) {
553  CHKERR ctx->iNit();
554  }
555  CHKERR VecZeroEntries(f);
556  // Mult Ku
557  CHKERR VecScatterBegin(ctx->scatterU, x, ctx->u, INSERT_VALUES,
558  SCATTER_FORWARD);
559  CHKERR VecScatterEnd(ctx->scatterU, x, ctx->u, INSERT_VALUES,
560  SCATTER_FORWARD);
561  CHKERR MatMult(ctx->K, ctx->u, ctx->Ku);
562  CHKERR VecScatterBegin(ctx->scatterU, ctx->Ku, f, INSERT_VALUES,
563  SCATTER_REVERSE);
564  CHKERR VecScatterEnd(ctx->scatterU, ctx->Ku, f, INSERT_VALUES,
565  SCATTER_REVERSE);
566  // Mult Mv
567  CHKERR VecScatterBegin(ctx->scatterV, x, ctx->v, INSERT_VALUES,
568  SCATTER_FORWARD);
569  CHKERR VecScatterEnd(ctx->scatterV, x, ctx->v, INSERT_VALUES,
570  SCATTER_FORWARD);
571  CHKERR MatMult(ctx->M, ctx->v, ctx->Mv);
572  CHKERR VecScatterBegin(ctx->scatterU, ctx->Mv, f, ADD_VALUES,
573  SCATTER_REVERSE);
574  CHKERR VecScatterEnd(ctx->scatterU, ctx->Mv, f, ADD_VALUES,
575  SCATTER_REVERSE);
576  // Velocities
577  CHKERR VecAXPY(ctx->v, -ctx->ts_a, ctx->u);
578  // CHKERR VecScale(ctx->v,ctx->scale);
579  CHKERR VecScatterBegin(ctx->scatterV, ctx->v, f, INSERT_VALUES,
580  SCATTER_REVERSE);
581  CHKERR VecScatterEnd(ctx->scatterV, ctx->v, f, INSERT_VALUES,
582  SCATTER_REVERSE);
583  // Assemble
584  CHKERR VecAssemblyBegin(f);
585  CHKERR VecAssemblyEnd(f);
587  }
588 
591 
592  void *void_ctx;
593  CHKERR MatShellGetContext(A, &void_ctx);
594  MatShellCtx *ctx = (MatShellCtx *)void_ctx;
595  CHKERR MatZeroEntries(ctx->K);
596  CHKERR MatZeroEntries(ctx->M);
598  }
599 
600  struct PCShellCtx {
601 
602  Mat shellMat;
603  bool initPC; ///< check if PC is initialized
604 
605  PCShellCtx(Mat shell_mat) : shellMat(shell_mat), initPC(false) {}
606 
607  PC pC;
608 
610 
612 
613  friend MoFEMErrorCode PCShellSetUpOp(PC pc);
614  friend MoFEMErrorCode PCShellDestroy(PC pc);
615  friend MoFEMErrorCode PCShellApplyOp(PC pc, Vec f, Vec x);
616  };
617 
620 
621  void *void_ctx;
622  CHKERR PCShellGetContext(pc, &void_ctx);
623  PCShellCtx *ctx = (PCShellCtx *)void_ctx;
624  CHKERR ctx->iNit();
625  MatShellCtx *shell_mat_ctx;
626  CHKERR MatShellGetContext(ctx->shellMat, &shell_mat_ctx);
627  CHKERR PCSetFromOptions(ctx->pC);
628  CHKERR PCSetOperators(ctx->pC, shell_mat_ctx->barK, shell_mat_ctx->barK);
629  CHKERR PCSetUp(ctx->pC);
631  }
632 
635 
636  void *void_ctx;
637  CHKERR PCShellGetContext(pc, &void_ctx);
638  PCShellCtx *ctx = (PCShellCtx *)void_ctx;
639  CHKERR ctx->dEstroy();
641  }
642 
643  /** \brief apply pre-conditioner for shell matrix
644  *
645  * \f[
646  \left[
647  \begin{array}{cc}
648  \mathbf{M} & \mathbf{K} \\
649  \mathbf{I} & -\mathbf{I}a
650  \end{array}
651  \right]
652  \left[
653  \begin{array}{c}
654  \mathbf{v} \\
655  \mathbf{u}
656  \end{array}
657  \right] =
658  \left[
659  \begin{array}{c}
660  \mathbf{r}_u \\
661  \mathbf{r}_v
662  \end{array}
663  \right]
664  * \f]
665  *
666  * where \f$\mathbf{v} = \mathbf{r}_v + a\mathbf{u}\f$ and
667  \f$\mathbf{u}=(a\mathbf{M}+\mathbf{K})^{-1}(\mathbf{r}_u -
668  \mathbf{M}\mathbf{r}_v\f$.
669  *
670  */
671  static MoFEMErrorCode PCShellApplyOp(PC pc, Vec f, Vec x) {
673 
674  void *void_ctx;
675  CHKERR PCShellGetContext(pc, &void_ctx);
676  PCShellCtx *ctx = (PCShellCtx *)void_ctx;
677  MatShellCtx *shell_mat_ctx;
678  CHKERR MatShellGetContext(ctx->shellMat, &shell_mat_ctx);
679  // forward
680  CHKERR VecScatterBegin(shell_mat_ctx->scatterU, f, shell_mat_ctx->Ku,
681  INSERT_VALUES, SCATTER_FORWARD);
682  CHKERR VecScatterEnd(shell_mat_ctx->scatterU, f, shell_mat_ctx->Ku,
683  INSERT_VALUES, SCATTER_FORWARD);
684  CHKERR VecScatterBegin(shell_mat_ctx->scatterV, f, shell_mat_ctx->v,
685  INSERT_VALUES, SCATTER_FORWARD);
686  CHKERR VecScatterEnd(shell_mat_ctx->scatterV, f, shell_mat_ctx->v,
687  INSERT_VALUES, SCATTER_FORWARD);
688  // CHKERR VecScale(shell_mat_ctx->v,1/shell_mat_ctx->scale);
689  // apply pre-conditioner and calculate u
690  CHKERR MatMult(shell_mat_ctx->M, shell_mat_ctx->v,
691  shell_mat_ctx->Mv); // Mrv
692  CHKERR VecAXPY(shell_mat_ctx->Ku, -1, shell_mat_ctx->Mv); // f-Mrv
693  CHKERR PCApply(ctx->pC, shell_mat_ctx->Ku,
694  shell_mat_ctx->u); // u = (aM+K)^(-1)(ru-Mrv)
695  // VecView(shell_mat_ctx->u,PETSC_VIEWER_STDOUT_WORLD);
696  // calculate velocities
697  CHKERR VecAXPY(shell_mat_ctx->v, shell_mat_ctx->ts_a,
698  shell_mat_ctx->u); // v = v + a*u
699  // VecView(shell_mat_ctx->v,PETSC_VIEWER_STDOUT_WORLD);
700  // reverse
701  CHKERR VecZeroEntries(x);
702  CHKERR VecScatterBegin(shell_mat_ctx->scatterU, shell_mat_ctx->u, x,
703  INSERT_VALUES, SCATTER_REVERSE);
704  CHKERR VecScatterEnd(shell_mat_ctx->scatterU, shell_mat_ctx->u, x,
705  INSERT_VALUES, SCATTER_REVERSE);
706  CHKERR VecScatterBegin(shell_mat_ctx->scatterV, shell_mat_ctx->v, x,
707  INSERT_VALUES, SCATTER_REVERSE);
708  CHKERR VecScatterEnd(shell_mat_ctx->scatterV, shell_mat_ctx->v, x,
709  INSERT_VALUES, SCATTER_REVERSE);
710  CHKERR VecAssemblyBegin(x);
711  CHKERR VecAssemblyEnd(x);
713  }
714 
715  struct ShellResidualElement : public FEMethod {
718 
719  // variables bellow need to be set by user
720  MatShellCtx *shellMatCtx; ///< pointer to shell matrix
721 
722  /**
723  * @brief Calculate inconsistency between approximation of velocities and
724  * velocities calculated from displacements
725  *
726  * @return MoFEMErrorCode
727  */
729 
730  };
731 
732 #ifdef __DIRICHLET_HPP__
733 
734  /** \brief blocked element/problem
735  *
736  * Blocked element run loops for different problem than TS problem. It is
737  * used to calculate matrices of shell matrix.
738  *
739  */
740  struct ShellMatrixElement : public FEMethod {
741 
743  ShellMatrixElement(MoFEM::Interface &m_field);
744 
745  typedef std::pair<std::string, FEMethod *> PairNameFEMethodPtr;
746  typedef std::vector<PairNameFEMethodPtr> LoopsToDoType;
747  LoopsToDoType loopK; ///< methods to calculate K shell matrix
748  LoopsToDoType loopM; ///< methods to calculate M shell matrix
749  LoopsToDoType loopAuxM; ///< methods to calculate derivatives of inertia
750  ///< forces over displacements shell matrix
751 
752  // variables bellow need to be set by user
753  string problemName; ///< name of shell problem
754  MatShellCtx *shellMatCtx; ///< pointer to shell matrix
755  DirichletDisplacementBc *DirichletBcPtr; ///< boundary conditions
756 
757  MoFEMErrorCode preProcess();
758  };
759 
760 #endif //__DIRICHLET_HPP__
761 };
762 
763 #endif //__CONVECTIVE_MASS_ELEMENT_HPP
764 
765 /**
766 * \defgroup convective_mass_elem Mass Element
767 * \ingroup user_modules
768 **/
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
ConvectiveMassElement::addEshelbyDynamicMaterialMomentum
MoFEMErrorCode addEshelbyDynamicMaterialMomentum(string element_name, string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool ale=false, BitRefLevel bit=BitRefLevel(), Range *intersected=NULL)
Definition: ConvectiveMassElement.cpp:1945
ConvectiveMassElement::OpEnergy::F
MatrixDouble3by3 F
Definition: ConvectiveMassElement.hpp:272
ConvectiveMassElement::OpEnergy::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:264
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dv
Definition: ConvectiveMassElement.hpp:389
ConvectiveMassElement::OpMassRhs::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:391
ConvectiveMassElement::UpdateAndControl::tS
TS tS
Definition: ConvectiveMassElement.hpp:437
ConvectiveMassElement::OpEnergy::lInear
bool & lInear
Definition: ConvectiveMassElement.hpp:267
ConvectiveMassElement::OpMassRhs
Definition: ConvectiveMassElement.hpp:207
ConvectiveMassElement::OpVelocityLhs_dV_dv
Definition: ConvectiveMassElement.hpp:317
ConvectiveMassElement::OpVelocityJacobian::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:796
ConvectiveMassElement::UpdateAndControl::jacobianLag
int jacobianLag
Definition: ConvectiveMassElement.hpp:441
MoFEM::Types::VectorDouble3
VectorBoundedArray< double, 3 > VectorDouble3
Definition: Types.hpp:92
ConvectiveMassElement::PCShellCtx::PCShellCtx
PCShellCtx(Mat shell_mat)
Definition: ConvectiveMassElement.hpp:605
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::v
VectorBoundedArray< adouble, 3 > v
Definition: ConvectiveMassElement.hpp:362
ConvectiveMassElement::CommonFunctions
Definition: ConvectiveMassElement.hpp:175
ConvectiveMassElement::MatShellCtx::iNit
MoFEMErrorCode iNit()
Definition: ConvectiveMassElement.cpp:2352
ConvectiveMassElement::setShellMatrixMassOperators
MoFEMErrorCode setShellMatrixMassOperators(string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool linear=false)
Definition: ConvectiveMassElement.cpp:2243
ConvectiveMassElement::OpMassRhs::OpMassRhs
OpMassRhs(const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:383
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::forcesOnlyOnEntities
Range forcesOnlyOnEntities
Definition: ConvectiveMassElement.hpp:376
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:352
ConvectiveMassElement::OpMassLhs_dM_dv
Definition: ConvectiveMassElement.hpp:222
MoFEM::addHOOpsVol
MoFEMErrorCode addHOOpsVol(const std::string field, E &e, bool h1, bool hcurl, bool hdiv, bool l2)
Definition: HODataOperators.hpp:764
ConvectiveMassElement::OpMassJacobian::fieldDisp
bool fieldDisp
Definition: ConvectiveMassElement.hpp:186
ConvectiveMassElement::feVelLhs
MyVolumeFE feVelLhs
calculate left hand side for tetrahedral elements
Definition: ConvectiveMassElement.hpp:79
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:351
ConvectiveMassElement::setVelocityOperators
MoFEMErrorCode setVelocityOperators(string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool ale=false)
Definition: ConvectiveMassElement.cpp:2103
ConvectiveMassElement::OpVelocityJacobian::dot_W
VectorBoundedArray< adouble, 3 > dot_W
Definition: ConvectiveMassElement.hpp:291
ConvectiveMassElement::MatShellCtx::MultOpA
friend MoFEMErrorCode MultOpA(Mat A, Vec x, Vec f)
ConvectiveMassElement::OpMassLhs_dM_dx::OpMassLhs_dM_dx
OpMassLhs_dM_dx(const std::string field_name, const std::string col_field, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:612
MatrixBoundedArray< adouble, 9 >
ConvectiveMassElement::OpEnergy
Definition: ConvectiveMassElement.hpp:261
ConvectiveMassElement::OpMassJacobian::active
std::vector< double > active
Definition: ConvectiveMassElement.hpp:201
ConvectiveMassElement::OpEnergy::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:265
ConvectiveMassElement::OpMassLhs_dM_dv::jac
MatrixDouble jac
Definition: ConvectiveMassElement.hpp:234
ConvectiveMassElement::MatShellCtx::ZeroEntriesOp
friend MoFEMErrorCode ZeroEntriesOp(Mat A)
ConvectiveMassElement::OpVelocityRhs
Definition: ConvectiveMassElement.hpp:301
ConvectiveMassElement::MyVolumeFE::eNergy
double eNergy
Definition: ConvectiveMassElement.hpp:56
ConvectiveMassElement::OpVelocityJacobian::a_res
VectorBoundedArray< adouble, 3 > a_res
Definition: ConvectiveMassElement.hpp:291
ConvectiveMassElement::OpVelocityRhs::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:306
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
ConvectiveMassElement::CommonData::jacVelRowPtr
std::vector< std::vector< double * > > jacVelRowPtr
Definition: ConvectiveMassElement.hpp:139
ConvectiveMassElement::CommonData::jacT
std::vector< MatrixDouble > jacT
Definition: ConvectiveMassElement.hpp:146
ConvectiveMassElement::PCShellCtx::shellMat
Mat shellMat
Definition: ConvectiveMassElement.hpp:602
ConvectiveMassElement::OpVelocityLhs_dV_dx::OpVelocityLhs_dV_dx
OpVelocityLhs_dV_dx(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:1093
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::nf
VectorDouble nf
Definition: ConvectiveMassElement.hpp:383
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::active
VectorDouble active
Definition: ConvectiveMassElement.hpp:364
ConvectiveMassElement::OpMassJacobian::j
FTensor::Index< 'j', 3 > j
Definition: ConvectiveMassElement.hpp:196
ConvectiveMassElement::OpVelocityJacobian::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:284
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
ConvectiveMassElement::MatShellCtx::scatterU
VecScatter scatterU
Definition: ConvectiveMassElement.hpp:505
ConvectiveMassElement::BlockData::tEts
Range tEts
elements in block set
Definition: ConvectiveMassElement.hpp:119
ConvectiveMassElement::feEnergy
MyVolumeFE feEnergy
calculate kinetic energy
Definition: ConvectiveMassElement.hpp:87
ConvectiveMassElement::OpMassLhs_dM_dv::k
MatrixDouble k
Definition: ConvectiveMassElement.hpp:234
ConvectiveMassElement::OpMassJacobian::dot_W
VectorBoundedArray< adouble, 3 > dot_W
Definition: ConvectiveMassElement.hpp:199
ConvectiveMassElement::CommonData::spatialVelocities
string spatialVelocities
Definition: ConvectiveMassElement.hpp:137
ConvectiveMassElement::setConvectiveMassOperators
MoFEMErrorCode setConvectiveMassOperators(string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool ale=false, bool linear=false)
Definition: ConvectiveMassElement.cpp:2005
ConvectiveMassElement::PCShellCtx::PCShellApplyOp
friend MoFEMErrorCode PCShellApplyOp(PC pc, Vec f, Vec x)
ConvectiveMassElement::CommonData::dataAtGaussPts
std::map< std::string, std::vector< VectorDouble > > dataAtGaussPts
Definition: ConvectiveMassElement.hpp:133
ConvectiveMassElement::OpMassRhs::nf
VectorDouble nf
Definition: ConvectiveMassElement.hpp:216
ConvectiveMassElement::ShellResidualElement::mField
MoFEM::Interface & mField
Definition: ConvectiveMassElement.hpp:716
ConvectiveMassElement::OpMassJacobian::dp_dt
VectorBoundedArray< adouble, 3 > dp_dt
Definition: ConvectiveMassElement.hpp:199
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:375
ConvectiveMassElement::CommonData::jacTRowPtr
std::vector< std::vector< double * > > jacTRowPtr
Definition: ConvectiveMassElement.hpp:145
DirichletDisplacementBc
Set Dirichlet boundary conditions on displacements.
Definition: DirichletBC.hpp:57
ConvectiveMassElement::UpdateAndControl::velocityField
const std::string velocityField
Definition: ConvectiveMassElement.hpp:438
ConvectiveMassElement::MatShellCtx::Mv
Vec Mv
Definition: ConvectiveMassElement.hpp:513
ConvectiveMassElement::OpVelocityJacobian::H
MatrixBoundedArray< adouble, 9 > H
Definition: ConvectiveMassElement.hpp:292
order
constexpr int order
Definition: dg_projection.cpp:18
ConvectiveMassElement::OpEnergy::v
VectorDouble3 v
Definition: ConvectiveMassElement.hpp:273
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
ConvectiveMassElement::OpMassLhs_dM_dX
Definition: ConvectiveMassElement.hpp:253
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dX::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1669
ConvectiveMassElement::addVelocityElement
MoFEMErrorCode addVelocityElement(string element_name, string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool ale=false, BitRefLevel bit=BitRefLevel())
Definition: ConvectiveMassElement.cpp:1892
ConvectiveMassElement::OpVelocityJacobian::fieldDisp
bool fieldDisp
Definition: ConvectiveMassElement.hpp:286
ConvectiveMassElement
structure grouping operators and data used for calculation of mass (convective) element
Definition: ConvectiveMassElement.hpp:28
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::jAcobian
bool jAcobian
Definition: ConvectiveMassElement.hpp:354
ConvectiveMassElement::OpVelocityLhs_dV_dx::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1098
ConvectiveMassElement::MatShellCtx::MatShellCtx
MatShellCtx()
Definition: ConvectiveMassElement.cpp:2343
ConvectiveMassElement::CommonData::jacMassRowPtr
std::vector< std::vector< double * > > jacMassRowPtr
Definition: ConvectiveMassElement.hpp:142
ConvectiveMassElement::PCShellCtx::iNit
MoFEMErrorCode iNit()
Definition: ConvectiveMassElement.cpp:2383
ConvectiveMassElement::OpVelocityJacobian::v
VectorBoundedArray< adouble, 3 > v
Definition: ConvectiveMassElement.hpp:291
ConvectiveMassElement::CommonData::gradAtGaussPts
std::map< std::string, std::vector< MatrixDouble > > gradAtGaussPts
Definition: ConvectiveMassElement.hpp:134
ConvectiveMassElement::OpVelocityJacobian::jAcobian
bool jAcobian
Definition: ConvectiveMassElement.hpp:286
ConvectiveMassElement::MatShellCtx::u
Vec u
Definition: ConvectiveMassElement.hpp:513
ConvectiveMassElement::OpGetDataAtGaussPts::OpGetDataAtGaussPts
OpGetDataAtGaussPts(const std::string field_name, std::vector< VectorDouble > &values_at_gauss_pts, std::vector< MatrixDouble > &gardient_at_gauss_pts)
Definition: ConvectiveMassElement.cpp:81
ConvectiveMassElement::MatShellCtx::~MatShellCtx
virtual ~MatShellCtx()
Definition: ConvectiveMassElement.cpp:2344
FEMethod
ConvectiveMassElement::MyVolumeFE
definition of volume element
Definition: ConvectiveMassElement.hpp:31
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
ConvectiveMassElement::addConvectiveMassElement
MoFEMErrorCode addConvectiveMassElement(string element_name, string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", bool ale=false, BitRefLevel bit=BitRefLevel())
Definition: ConvectiveMassElement.cpp:1835
ConvectiveMassElement::PCShellSetUpOp
static MoFEMErrorCode PCShellSetUpOp(PC pc)
Definition: ConvectiveMassElement.hpp:618
ConvectiveMassElement::OpVelocityRhs::OpVelocityRhs
OpVelocityRhs(const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:1007
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::H
MatrixBoundedArray< adouble, 9 > H
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::OpMassJacobian::G
MatrixBoundedArray< adouble, 9 > G
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::OpVelocityLhs_dV_dX
Definition: ConvectiveMassElement.hpp:337
ConvectiveMassElement::OpMassLhs_dM_dx
Definition: ConvectiveMassElement.hpp:245
ConvectiveMassElement::UpdateAndControl::spatialPositionField
const std::string spatialPositionField
Definition: ConvectiveMassElement.hpp:439
ConvectiveMassElement::OpVelocityJacobian::active
std::vector< double > active
Definition: ConvectiveMassElement.hpp:295
ConvectiveMassElement::OpMassJacobian::a
VectorBoundedArray< adouble, 3 > a
Definition: ConvectiveMassElement.hpp:199
ConvectiveMassElement::setOfBlocks
std::map< int, BlockData > setOfBlocks
maps block set id with appropriate BlockData
Definition: ConvectiveMassElement.hpp:122
ConvectiveMassElement::OpEnergy::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:737
ConvectiveMassElement::OpMassJacobian::i
FTensor::Index< 'i', 3 > i
Definition: ConvectiveMassElement.hpp:195
ConvectiveMassElement::setKinematicEshelbyOperators
MoFEMErrorCode setKinematicEshelbyOperators(string velocity_field_name, string spatial_position_field_name, string material_position_field_name="MESH_NODE_POSITIONS", Range *forces_on_entities_ptr=NULL)
Definition: ConvectiveMassElement.cpp:2181
ConvectiveMassElement::feVelRhs
MyVolumeFE feVelRhs
calculate right hand side for tetrahedral elements
Definition: ConvectiveMassElement.hpp:77
ConvectiveMassElement::OpGetCommonDataAtGaussPts
Definition: ConvectiveMassElement.hpp:170
ConvectiveMassElement::UpdateAndControl::preProcess
MoFEMErrorCode preProcess()
Scatter values from t_u_dt on the fields.
Definition: ConvectiveMassElement.cpp:1722
ConvectiveMassElement::PCShellDestroy
static MoFEMErrorCode PCShellDestroy(PC pc)
Definition: ConvectiveMassElement.hpp:633
ConvectiveMassElement::OpVelocityLhs_dV_dv::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1064
ConvectiveMassElement::ShellResidualElement::preProcess
MoFEMErrorCode preProcess()
Calculate inconsistency between approximation of velocities and velocities calculated from displaceme...
Definition: ConvectiveMassElement.cpp:2409
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
convert.type
type
Definition: convert.py:64
ConvectiveMassElement::OpMassLhs_dM_dX::getJac
MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:669
ConvectiveMassElement::OpGetDataAtGaussPts::zeroAtType
const EntityType zeroAtType
Definition: ConvectiveMassElement.hpp:157
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:1466
ConvectiveMassElement::OpEnergy::OpEnergy
OpEnergy(const std::string field_name, BlockData &data, CommonData &common_data, SmartPetscObj< Vec > v)
Definition: ConvectiveMassElement.cpp:727
ConvectiveMassElement::OpEnergy::V
SmartPetscObj< Vec > V
Definition: ConvectiveMassElement.hpp:266
ConvectiveMassElement::MyVolumeFE::F
Vec F
Definition: ConvectiveMassElement.hpp:34
ConvectiveMassElement::OpEnergy::H
MatrixDouble3by3 H
Definition: ConvectiveMassElement.hpp:272
ConvectiveMassElement::OpGetDataAtGaussPts::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
operator calculating deformation gradient
Definition: ConvectiveMassElement.cpp:90
ConvectiveMassElement::MatShellCtx::Ku
Vec Ku
Definition: ConvectiveMassElement.hpp:513
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::invH
MatrixBoundedArray< adouble, 9 > invH
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::OpVelocityLhs_dV_dx
Definition: ConvectiveMassElement.hpp:327
ConvectiveMassElement::OpVelocityJacobian::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:283
ConvectiveMassElement::OpMassRhs::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:210
ConvectiveMassElement::ShellResidualElement::shellMatCtx
MatShellCtx * shellMatCtx
pointer to shell matrix
Definition: ConvectiveMassElement.hpp:720
ConvectiveMassElement::PCShellCtx::PCShellDestroy
friend MoFEMErrorCode PCShellDestroy(PC pc)
ConvectiveMassElement::OpMassJacobian::H
MatrixBoundedArray< adouble, 9 > H
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::OpMassLhs_dM_dv::forcesOnlyOnEntities
Range forcesOnlyOnEntities
Definition: ConvectiveMassElement.hpp:228
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::g
MatrixBoundedArray< adouble, 9 > g
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::feMassAuxLhs
MyVolumeFE feMassAuxLhs
Definition: ConvectiveMassElement.hpp:71
ConvectiveMassElement::OpMassJacobian::k
FTensor::Index< 'k', 3 > k
Definition: ConvectiveMassElement.hpp:197
ConvectiveMassElement::PCShellCtx
Definition: ConvectiveMassElement.hpp:600
ConvectiveMassElement::MatShellCtx::M
Mat M
Definition: ConvectiveMassElement.hpp:504
ConvectiveMassElement::OpVelocityJacobian::dot_u
VectorBoundedArray< adouble, 3 > dot_u
Definition: ConvectiveMassElement.hpp:291
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dv::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1544
ConvectiveMassElement::OpMassLhs_dM_dv::doWork
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Definition: ConvectiveMassElement.cpp:521
ConvectiveMassElement::OpVelocityJacobian::OpVelocityJacobian
OpVelocityJacobian(const std::string field_name, BlockData &data, CommonData &common_data, int tag, bool jacobian=true)
Definition: ConvectiveMassElement.cpp:788
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:374
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::a
VectorBoundedArray< adouble, 3 > a
Definition: ConvectiveMassElement.hpp:362
ConvectiveMassElement::OpMassJacobian::jAcobian
bool jAcobian
Definition: ConvectiveMassElement.hpp:184
ConvectiveMassElement::OpMassLhs_dM_dX::OpMassLhs_dM_dX
OpMassLhs_dM_dX(const std::string field_name, const std::string col_field, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:664
ConvectiveMassElement::OpVelocityJacobian
Definition: ConvectiveMassElement.hpp:279
ConvectiveMassElement::MatShellCtx::v
Vec v
Definition: ConvectiveMassElement.hpp:513
ConvectiveMassElement::CommonData::jacMass
std::vector< MatrixDouble > jacMass
Definition: ConvectiveMassElement.hpp:143
ConvectiveMassElement::BlockData
data for calculation inertia forces
Definition: ConvectiveMassElement.hpp:116
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::F
MatrixBoundedArray< adouble, 9 > F
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::OpMassRhs::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:211
ConvectiveMassElement::PCShellCtx::pC
PC pC
Definition: ConvectiveMassElement.hpp:607
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::OpEshelbyDynamicMaterialMomentumJacobian
OpEshelbyDynamicMaterialMomentumJacobian(const std::string field_name, BlockData &data, CommonData &common_data, int tag, bool jacobian=true)
Definition: ConvectiveMassElement.cpp:1234
ConvectiveMassElement::OpVelocityRhs::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:305
ConvectiveMassElement::OpVelocityLhs_dV_dX::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1173
ConvectiveMassElement::OpMassJacobian::h
MatrixBoundedArray< adouble, 9 > h
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::ZeroEntriesOp
static MoFEMErrorCode ZeroEntriesOp(Mat A)
Definition: ConvectiveMassElement.hpp:589
ConvectiveMassElement::MatShellCtx::K
Mat K
Definition: ConvectiveMassElement.hpp:504
ConvectiveMassElement::OpMassJacobian::methodsOp
boost::ptr_vector< MethodForForceScaling > & methodsOp
Definition: ConvectiveMassElement.hpp:188
ConvectiveMassElement::PCShellApplyOp
static MoFEMErrorCode PCShellApplyOp(PC pc, Vec f, Vec x)
apply pre-conditioner for shell matrix
Definition: ConvectiveMassElement.hpp:671
ConvectiveMassElement::CommonData::jacVel
std::vector< MatrixDouble > jacVel
Definition: ConvectiveMassElement.hpp:140
ConvectiveMassElement::CommonData::spatialPositions
string spatialPositions
Definition: ConvectiveMassElement.hpp:135
ConvectiveMassElement::OpMassLhs_dM_dv::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:452
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs::OpEshelbyDynamicMaterialMomentumRhs
OpEshelbyDynamicMaterialMomentumRhs(const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr)
Definition: ConvectiveMassElement.cpp:1453
ConvectiveMassElement::OpMassLhs_dM_dx::getJac
MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:617
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dx::OpEshelbyDynamicMaterialMomentumLhs_dx
OpEshelbyDynamicMaterialMomentumLhs_dx(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr)
Definition: ConvectiveMassElement.cpp:1603
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dX::OpEshelbyDynamicMaterialMomentumLhs_dX
OpEshelbyDynamicMaterialMomentumLhs_dX(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr)
Definition: ConvectiveMassElement.cpp:1660
ConvectiveMassElement::OpVelocityJacobian::dot_w
VectorBoundedArray< adouble, 3 > dot_w
Definition: ConvectiveMassElement.hpp:291
ConvectiveMassElement::OpMassJacobian::OpMassJacobian
OpMassJacobian(const std::string field_name, BlockData &data, CommonData &common_data, boost::ptr_vector< MethodForForceScaling > &methods_op, int tag, bool linear=false)
Definition: ConvectiveMassElement.cpp:154
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dX
Definition: ConvectiveMassElement.hpp:414
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumRhs
Definition: ConvectiveMassElement.hpp:370
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
ConvectiveMassElement::CommonData::lInear
bool lInear
Definition: ConvectiveMassElement.hpp:129
FTensor::Index< 'i', 3 >
ConvectiveMassElement::CommonData::valT
std::vector< VectorDouble > valT
Definition: ConvectiveMassElement.hpp:144
ConvectiveMassElement::OpMassLhs_dM_dv::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:226
ConvectiveMassElement::OpMassJacobian::g
MatrixBoundedArray< adouble, 9 > g
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::BlockData::rho0
double rho0
reference density
Definition: ConvectiveMassElement.hpp:117
ConvectiveMassElement::methodsOp
boost::ptr_vector< MethodForForceScaling > methodsOp
Definition: ConvectiveMassElement.hpp:150
ConvectiveMassElement::OpVelocityJacobian::h
MatrixBoundedArray< adouble, 9 > h
Definition: ConvectiveMassElement.hpp:292
ConvectiveMassElement::OpMassJacobian::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:182
ConvectiveMassElement::OpMassJacobian::invH
MatrixBoundedArray< adouble, 9 > invH
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::OpMassJacobian::a_res
VectorBoundedArray< adouble, 3 > a_res
Definition: ConvectiveMassElement.hpp:199
ConvectiveMassElement::OpGetDataAtGaussPts::gradientAtGaussPts
std::vector< MatrixDouble > & gradientAtGaussPts
Definition: ConvectiveMassElement.hpp:156
ConvectiveMassElement::OpGetDataAtGaussPts::valuesAtGaussPts
std::vector< VectorDouble > & valuesAtGaussPts
Definition: ConvectiveMassElement.hpp:155
ConvectiveMassElement::MyVolumeFE::getRule
int getRule(int order)
it is used to calculate nb. of Gauss integration points
Definition: ConvectiveMassElement.cpp:38
ConvectiveMassElement::UpdateAndControl::postProcess
MoFEMErrorCode postProcess()
Definition: ConvectiveMassElement.cpp:1752
ConvectiveMassElement::OpMassLhs_dM_dv::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:227
ConvectiveMassElement::MatShellCtx
Definition: ConvectiveMassElement.hpp:502
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::h
MatrixBoundedArray< adouble, 9 > h
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::PCShellCtx::PCShellSetUpOp
friend MoFEMErrorCode PCShellSetUpOp(PC pc)
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:1244
ConvectiveMassElement::MyVolumeFE::V
SmartPetscObj< Vec > V
Definition: ConvectiveMassElement.hpp:55
Range
ConvectiveMassElement::setBlocks
MoFEMErrorCode setBlocks()
Definition: ConvectiveMassElement.cpp:1761
ConvectiveMassElement::commonData
CommonData commonData
Definition: ConvectiveMassElement.hpp:148
adouble
ConvectiveMassElement::OpVelocityLhs_dV_dX::OpVelocityLhs_dV_dX
OpVelocityLhs_dV_dX(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:1168
ConvectiveMassElement::feMassLhs
MyVolumeFE feMassLhs
Definition: ConvectiveMassElement.hpp:66
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dx
Definition: ConvectiveMassElement.hpp:401
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::a_T
VectorBoundedArray< adouble, 3 > a_T
Definition: ConvectiveMassElement.hpp:362
ConvectiveMassElement::ShellResidualElement::ShellResidualElement
ShellResidualElement(MoFEM::Interface &m_field)
Definition: ConvectiveMassElement.cpp:2405
ConvectiveMassElement::UpdateAndControl
Set fields DOT_.
Definition: ConvectiveMassElement.hpp:434
ConvectiveMassElement::CommonData
common data used by volume elements
Definition: ConvectiveMassElement.hpp:127
ConvectiveMassElement::addHOOpsVol
MoFEMErrorCode addHOOpsVol()
Definition: ConvectiveMassElement.hpp:92
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
ConvectiveMassElement::OpMassJacobian::F
MatrixBoundedArray< adouble, 9 > F
Definition: ConvectiveMassElement.hpp:200
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dv::OpEshelbyDynamicMaterialMomentumLhs_dv
OpEshelbyDynamicMaterialMomentumLhs_dv(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr)
Definition: ConvectiveMassElement.cpp:1535
ConvectiveMassElement::OpMassJacobian::lInear
bool & lInear
Definition: ConvectiveMassElement.hpp:185
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumLhs_dx::getJac
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
Definition: ConvectiveMassElement.cpp:1612
ConvectiveMassElement::MultOpA
static MoFEMErrorCode MultOpA(Mat A, Vec x, Vec f)
Mult operator for shell matrix.
Definition: ConvectiveMassElement.hpp:546
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::fieldDisp
bool fieldDisp
Definition: ConvectiveMassElement.hpp:355
ConvectiveMassElement::OpMassLhs_dM_dv::OpMassLhs_dM_dv
OpMassLhs_dM_dv(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr=NULL)
Definition: ConvectiveMassElement.cpp:439
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::G
MatrixBoundedArray< adouble, 9 > G
Definition: ConvectiveMassElement.hpp:363
ConvectiveMassElement::OpMassJacobian::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:163
ConvectiveMassElement::OpVelocityJacobian::tAg
int tAg
Definition: ConvectiveMassElement.hpp:285
ConvectiveMassElement::OpGetCommonDataAtGaussPts::OpGetCommonDataAtGaussPts
OpGetCommonDataAtGaussPts(const std::string field_name, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:149
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:66
ConvectiveMassElement::ShellResidualElement
Definition: ConvectiveMassElement.hpp:715
ConvectiveMassElement::OpVelocityJacobian::F
MatrixBoundedArray< adouble, 9 > F
Definition: ConvectiveMassElement.hpp:292
ConvectiveMassElement::OpVelocityJacobian::detH
adouble detH
Definition: ConvectiveMassElement.hpp:293
ConvectiveMassElement::CommonData::valMass
std::vector< VectorDouble > valMass
Definition: ConvectiveMassElement.hpp:141
ConvectiveMassElement::OpMassJacobian::dAta
BlockData & dAta
Definition: ConvectiveMassElement.hpp:181
ConvectiveMassElement::OpVelocityRhs::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
Definition: ConvectiveMassElement.cpp:1013
ConvectiveMassElement::OpVelocityRhs::nf
VectorDouble nf
Definition: ConvectiveMassElement.hpp:311
ConvectiveMassElement::MatShellCtx::barK
Mat barK
Definition: ConvectiveMassElement.hpp:512
MoFEM::Types::MatrixDouble3by3
MatrixBoundedArray< double, 9 > MatrixDouble3by3
Definition: Types.hpp:105
ConvectiveMassElement::OpEnergy::h
MatrixDouble3by3 h
Definition: ConvectiveMassElement.hpp:272
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
ConvectiveMassElement::PCShellCtx::initPC
bool initPC
check if PC is initialized
Definition: ConvectiveMassElement.hpp:603
ConvectiveMassElement::feTLhs
MyVolumeFE feTLhs
calculate left hand side for tetrahedral elements
Definition: ConvectiveMassElement.hpp:84
ConvectiveMassElement::OpMassJacobian
Definition: ConvectiveMassElement.hpp:177
ConvectiveMassElement::CommonData::meshPositions
string meshPositions
Definition: ConvectiveMassElement.hpp:136
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian::tAg
int tAg
Definition: ConvectiveMassElement.hpp:353
ConvectiveMassElement::MatShellCtx::scatterV
VecScatter scatterV
Definition: ConvectiveMassElement.hpp:505
ConvectiveMassElement::MyVolumeFE::postProcess
MoFEMErrorCode postProcess()
Definition: ConvectiveMassElement.cpp:56
ConvectiveMassElement::OpVelocityJacobian::invH
MatrixBoundedArray< adouble, 9 > invH
Definition: ConvectiveMassElement.hpp:292
ConvectiveMassElement::CommonData::CommonData
CommonData()
Definition: ConvectiveMassElement.hpp:131
ConvectiveMassElement::OpVelocityLhs_dV_dv::OpVelocityLhs_dV_dv
OpVelocityLhs_dV_dv(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:1059
ConvectiveMassElement::feMassRhs
MyVolumeFE feMassRhs
calculate right hand side for tetrahedral elements
Definition: ConvectiveMassElement.hpp:62
ConvectiveMassElement::ConvectiveMassElement
ConvectiveMassElement(MoFEM::Interface &m_field, short int tag)
Definition: ConvectiveMassElement.cpp:75
ConvectiveMassElement::MyVolumeFE::preProcess
MoFEMErrorCode preProcess()
Definition: ConvectiveMassElement.cpp:40
ConvectiveMassElement::OpMassJacobian::tAg
int tAg
Definition: ConvectiveMassElement.hpp:183
ConvectiveMassElement::MyVolumeFE::MyVolumeFE
MyVolumeFE(MoFEM::Interface &m_field)
Definition: ConvectiveMassElement.cpp:22
ConvectiveMassElement::mField
MoFEM::Interface & mField
Definition: ConvectiveMassElement.hpp:108
ConvectiveMassElement::feTRhs
MyVolumeFE feTRhs
calculate right hand side for tetrahedral elements
Definition: ConvectiveMassElement.hpp:82
ConvectiveMassElement::OpEnergy::invH
MatrixDouble3by3 invH
Definition: ConvectiveMassElement.hpp:272
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
ConvectiveMassElement::MatShellCtx::ts_a
double ts_a
Definition: ConvectiveMassElement.hpp:506
ConvectiveMassElement::MatShellCtx::dEstroy
MoFEMErrorCode dEstroy()
Definition: ConvectiveMassElement.cpp:2369
ConvectiveMassElement::MyVolumeFE::A
Mat A
Definition: ConvectiveMassElement.hpp:33
ConvectiveMassElement::CommonData::staticOnly
bool staticOnly
Definition: ConvectiveMassElement.hpp:130
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
ConvectiveMassElement::PCShellCtx::dEstroy
MoFEMErrorCode dEstroy()
Definition: ConvectiveMassElement.cpp:2395
ConvectiveMassElement::UpdateAndControl::mField
MoFEM::Interface & mField
Definition: ConvectiveMassElement.hpp:436
ConvectiveMassElement::OpEshelbyDynamicMaterialMomentumJacobian
Definition: ConvectiveMassElement.hpp:347
ConvectiveMassElement::BlockData::a0
VectorDouble a0
constant acceleration
Definition: ConvectiveMassElement.hpp:118
ConvectiveMassElement::tAg
short int tAg
Definition: ConvectiveMassElement.hpp:109
ConvectiveMassElement::CommonData::valVel
std::vector< VectorDouble > valVel
Definition: ConvectiveMassElement.hpp:138
ConvectiveMassElement::OpGetDataAtGaussPts
Definition: ConvectiveMassElement.hpp:152
ConvectiveMassElement::MatShellCtx::iNitialized
bool iNitialized
Definition: ConvectiveMassElement.hpp:508
ConvectiveMassElement::UpdateAndControl::UpdateAndControl
UpdateAndControl(MoFEM::Interface &m_field, TS _ts, const std::string velocity_field, const std::string spatial_position_field)
Definition: ConvectiveMassElement.cpp:1716