v0.14.0
Loading...
Searching...
No Matches
SurfacePressure.hpp
Go to the documentation of this file.
1/* \file SurfacePressure.hpp
2 \brief Implementation of pressure and forces on triangles surface
3
4*/
5
6
7
8#ifndef __SURFACE_PERSSURE_HPP__
9#define __SURFACE_PERSSURE_HPP__
10
11/** \brief Finite element and operators to apply force/pressures applied to
12 * surfaces \ingroup mofem_static_boundary_conditions
13 */
15
17
18 /**
19 * \brief Analytical force method
20 */
22
23 virtual ~MethodForAnalyticalForce() = default;
24
25 /**
26 * User implemented analytical force
27 * @param coords coordinates of integration point
28 * @param normal normal at integration point
29 * @param force returned force
30 * @return error code
31 */
32 virtual MoFEMErrorCode getForce(const EntityHandle ent,
33 const VectorDouble3 &coords,
34 const VectorDouble3 &normal,
35 VectorDouble3 &force) {
37 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
38 "You need to implement this");
40 }
41 };
42
44
45 LinearVaringPresssure(const VectorDouble3 &p, const double c)
47
48 MoFEMErrorCode getForce(const EntityHandle ent, const VectorDouble3 &coords,
49 const VectorDouble3 &normal, VectorDouble3 &force);
50
51 private:
52 const VectorDouble3 linearConstants;
53 const double pressureShift;
54 };
55
56 /**
57 * Definition of face element used for integration
58 */
62 int getRule(int order) { return 2 * order + addToRule; };
63 };
64
65 // FE for the right-hand side (spatial configuration)
67 MyTriangleFE &getLoopFe() { return fe; }
68
69 // FE for the left-hand side (spatial configuration, ALE)
72
73 // FE for the right-hand side (material configuration, ALE)
76
77 // FE for the left-hand side (material configuration, ALE)
80
82 : mField(m_field), fe(m_field), feLhs(m_field), feMatRhs(m_field),
83 feMatLhs(m_field) {}
84
85 struct bCForce {
86 ForceCubitBcData data;
88 };
89 std::map<int, bCForce> mapForce;
90
91 struct bCPressure {
92 PressureCubitBcData data;
94 };
95 std::map<int, bCPressure> mapPressure;
96
97 boost::ptr_vector<MethodForForceScaling> methodsOp;
98 boost::ptr_vector<MethodForAnalyticalForce> analyticalForceOp;
99
104 using EntData = EntitiesFieldData::EntData;
105
106 /// Operator for force element
108
109 Vec F;
111 boost::ptr_vector<MethodForForceScaling> &methodsOp;
112
114
115 OpNeumannForce(const std::string field_name, Vec _F, bCForce &data,
116 boost::ptr_vector<MethodForForceScaling> &methods_op,
117 bool ho_geometry = false);
118
119 VectorDouble Nf; //< Local force vector
120 /**
121 * @brief Integrate surface force (traction)
122 *
123 * \f[
124 * \mathbf{f}^i = \int_\mathcal{T} {\pmb\phi}^i \mathbf{t}
125 * \textrm{d}\mathcal{T}
126 * \f]
127 * where \f$\mathbf{t}\f$ is traction, and
128 * \f$\mathbf{f}^i\f$ is local vector of external forces for ith base
129 * function \f${\pmb\phi}^i\f$.
130 *
131 *
132 * @param side
133 * @param type
134 * @param data
135 * @return MoFEMErrorCode
136 */
137 MoFEMErrorCode doWork(int side, EntityType type,
138 EntitiesFieldData::EntData &data);
139 };
140
141 /// Operator for force element
143
145 const std::string field_name, Vec f, const Range tris,
146 boost::ptr_vector<MethodForForceScaling> &methods_op,
147 boost::shared_ptr<MethodForAnalyticalForce> &analytical_force_op,
148 const bool ho_geometry = false);
149
150 VectorDouble nF; //< Local force vector
151
152 MoFEMErrorCode doWork(int side, EntityType type,
153 EntitiesFieldData::EntData &data);
154
155 Vec F;
156
157 private:
158 const Range tRis;
159 boost::ptr_vector<MethodForForceScaling> &methodsOp;
160 boost::shared_ptr<MethodForAnalyticalForce> analyticalForceOp;
161 const bool hoGeometry;
162 };
163
164 /**
165 * @brief RHS-operator for pressure element (spatial configuration)
166 *
167 */
169
170 Vec F;
172 boost::ptr_vector<MethodForForceScaling> &methodsOp;
174
175 OpNeumannPressure(const std::string field_name, Vec _F, bCPressure &data,
176 boost::ptr_vector<MethodForForceScaling> &methods_op,
177 bool ho_geometry = false);
178
179 VectorDouble Nf;
180
181 /**
182 * @brief Integrate pressure
183 *
184 * \f[
185 * \begin{split}
186 * \mathbf{t} &= p \mathbf{n} \\
187 * \mathbf{f}^i &= \int_\mathcal{T} {\pmb\phi}^i \mathbf{t}
188 * \textrm{d}\mathcal{T} \end{split}
189 * \f]
190 * where \f$p\f$ is pressure, \f$\mathbf{n}\f$ is normal,
191 * \f$\mathbf{t}\f$ is traction, and
192 * \f$\mathbf{f}^i\f$ is local vector of external forces for ith base
193 * function \f${\pmb\phi}^i\f$.
194 *
195 *
196 * @param side
197 * @param type
198 * @param data
199 * @return MoFEMErrorCode
200 */
201 MoFEMErrorCode doWork(int side, EntityType type,
202 EntitiesFieldData::EntData &data);
203 };
204
206 : public boost::enable_shared_from_this<DataAtIntegrationPts> {
207
208 MatrixDouble tangent1;
209 MatrixDouble tangent2;
210
211 MatrixDouble hMat;
212 MatrixDouble FMat;
213 MatrixDouble HMat;
214 VectorDouble detHVec;
215 MatrixDouble invHMat;
216
217 inline boost::shared_ptr<MatrixDouble> getSmallhMatPtr() {
218 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &hMat);
219 }
220
221 inline boost::shared_ptr<MatrixDouble> getHMatPtr() {
222 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &HMat);
223 }
224
226
227 // Pointer to arc length method DOF, used to scale pressure in LHS
228 boost::weak_ptr<DofEntity> arcLengthDof;
229
231
233 };
234
235 /**
236 * @brief Operator for computing tangent vectors
237 *
238 */
240
241 boost::shared_ptr<DataAtIntegrationPts> dataAtIntegrationPts;
243 boost::shared_ptr<DataAtIntegrationPts> dataAtIntegrationPts)
246
247 int ngp;
248 MoFEMErrorCode doWork(int side, EntityType type,
249 EntitiesFieldData::EntData &data);
250 };
251
252 /**
253 * @brief LHS-operator for pressure element (spatial configuration)
254 *
255 * Computes linearisation of the spatial component with respect to
256 * material coordinates.
257 *
258 */
260
261 boost::shared_ptr<DataAtIntegrationPts> dataAtIntegrationPts;
262 Mat Aij;
265
266 MatrixDouble NN;
267
268 /**
269 * @brief Compute left-hand side
270 *
271 * Computes linearisation of the spatial component with respect to
272 * material coordinates.
273 *
274 * Virtual work of the surface pressure corresponding to a test function
275 * of the spatial configuration \f$(\delta\mathbf{x})\f$:
276 * \f[
277 * \delta W^\text{spatial}_p(\mathbf{X}, \delta\mathbf{x}) =
278 * \int\limits_\mathcal{T} p\,\mathbf{N}(\mathbf{X}) \cdot
279 * \delta\mathbf{x}\, \textrm{d}\mathcal{T} =
280 * \int\limits_{\mathcal{T}_{\xi}}
281 * p\left(\frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
282 * \mathbf{X}} {\partial\eta}\right) \cdot \delta\mathbf{x}\,
283 * \textrm{d}\xi\textrm{d}\eta, \f] where \f$p\f$ is pressure,
284 * \f$\mathbf{N}\f$ is a normal to the face in the material configuration
285 * and \f$\xi, \eta\f$ are coordinates in the parent space
286 * \f$(\mathcal{T}_\xi)\f$.
287 *
288 * Linearisation with respect to a variation of material coordinates
289 * \f$(\Delta\mathbf{X})\f$:
290 *
291 * \f[
292 * \textrm{D} \delta W^\text{spatial}_p(\mathbf{X}, \delta\mathbf{x})
293 * [\Delta\mathbf{X}] = \int\limits_{\mathcal{T}_{\xi}} p\left[
294 * \frac{\partial\mathbf{X}}{\partial\xi} \cdot \left(\frac{\partial
295 * \Delta \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
296 * -\frac{\partial\mathbf{X}}
297 * {\partial\eta} \cdot \left(\frac{\partial\Delta
298 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right]
299 * \textrm{d}\xi\textrm{d}\eta \f]
300 *
301 */
302 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
303 EntityType col_type,
304 EntitiesFieldData::EntData &row_data,
305 EntitiesFieldData::EntData &col_data);
306
308 const string field_name_1, const string field_name_2,
309 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
310 bCPressure &data, bool ho_geometry = false)
311 : UserDataOperator(field_name_1, field_name_2,
313 dataAtIntegrationPts(data_at_pts), Aij(aij), dAta(data),
314 hoGeometry(ho_geometry) {
315 sYmm = false; // This will make sure to loop over all entities
316 };
317 };
318
319 /**
320 * @brief LHS-operator for surface force element (spatial configuration)
321 *
322 * Computes linearisation of the spatial component with respect to
323 * material coordinates.
324 *
325 */
327
328 boost::shared_ptr<DataAtIntegrationPts> dataAtIntegrationPts;
329 Mat Aij;
332
333 MatrixDouble NN;
334
335 /**
336 * @brief Compute left-hand side
337 *
338 * Computes linearisation of the spatial component with respect to
339 * material coordinates.
340 *
341 * Virtual work of the surface force corresponding to a test function
342 * of the spatial configuration \f$(\delta\mathbf{x})\f$:
343 * \f[
344 * \delta W^\text{spatial}_{\mathbf t}(\mathbf{X}, \delta\mathbf{x}) =
345 * \int\limits_\mathcal{T} \mathbf{t}(\mathbf{X}) \cdot
346 * \delta\mathbf{x}\, \textrm{d}\mathcal{T} =
347 * \int\limits_{\mathcal{T}_{\xi}}
348 * \mathbf{t} \cdot \delta\mathbf{x} \left\|
349 * \frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
350 * \mathbf{X}} {\partial\eta} \right\| \,
351 * \textrm{d}\xi\textrm{d}\eta, \f] where \f$\mathbf{t}\f$ is the force
352 * vector, \f$ \left\|
353 * \frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
354 * \mathbf{X}} {\partial\eta} \right\|\f$ is the length of the normal to the
355 * face in the material configuration, i.e. \f$\|\mathbf{N}\|\f$ since
356 * \f$\mathbf{N} =
357 * \frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial \mathbf{X}}
358 * {\partial\eta}\f$ and \f$\xi, \eta\f$ are coordinates in the parent space
359 * \f$(\mathcal{T}_\xi)\f$.
360 *
361 * Linearisation with respect to a variation of material coordinates
362 * \f$(\Delta\mathbf{X})\f$:
363 *
364 * \f[
365 * \textrm{D} \delta W^\text{spatial}_{\mathbf t}(\mathbf{X},
366 * \delta\mathbf{x})
367 * [\Delta\mathbf{X}] = \int\limits_{\mathcal{T}_{\xi}}
368 * \dfrac{\mathbf{t}\cdot \delta \mathbf{x}}{\left\|
369 * \left(\frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
370 * \mathbf{X}}
371 * {\partial\eta}\right) \right\|}\left[
372 * \frac{\partial\mathbf{X}}{\partial\xi} \cdot \left(\frac{\partial \Delta
373 * \mathbf{X}}{\partial\eta}\times\mathbf{N}\right)
374 * -\frac{\partial\mathbf{X}}
375 * {\partial\eta} \cdot \left(\frac{\partial\Delta
376 * \mathbf{X}}{\partial\xi}\times\mathbf{N}\right)\right]
377 * \textrm{d}\xi\textrm{d}\eta\f]
378 *
379 */
380 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
381 EntityType col_type,
382 EntitiesFieldData::EntData &row_data,
383 EntitiesFieldData::EntData &col_data);
384
386 const string field_name_1, const string field_name_2,
387 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
388 bCForce &data, bool ho_geometry = false)
389 : UserDataOperator(field_name_1, field_name_2,
391 dataAtIntegrationPts(data_at_pts), Aij(aij), dAta(data),
392 hoGeometry(ho_geometry) {
393 sYmm = false; // This will make sure to loop over all entities
394 };
395 };
396
397 /**
398 * @brief Operator for computing deformation gradients in side volumes
399 *
400 */
402
403 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
405
406 MoFEMErrorCode doWork(int side, EntityType type,
407 EntitiesFieldData::EntData &data);
408
410 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
411 bool ho_geometry = false)
413 dataAtPts(data_at_pts), hoGeometry(ho_geometry) {
414 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
415 sYmm = false;
416 };
417 };
418
419 /**
420 * @brief RHS-operator for the pressure element (material configuration)
421 *
422 * Integrates pressure in the material configuration.
423 *
424 */
426
427 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
428 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
429 std::string sideFeName;
430 Vec F;
433
434 VectorDouble nF;
435
436 VectorInt rowIndices;
437
438 int nbRows; ///< number of dofs on rows
439 int nbIntegrationPts; ///< number of integration points
440
441 /**
442 * @brief Integrate pressure in the material configuration.
443 *
444 * Virtual work of the surface pressure corresponding to a test function
445 * of the material configuration \f$(\delta\mathbf{X})\f$:
446 *
447 * \f[
448 * \delta W^\text{material}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{X}) =
449 * -\int\limits_\mathcal{T} p\left\{\mathbf{F}^{\intercal}\cdot
450 * \mathbf{N}(\mathbf{X}) \right\} \cdot \delta\mathbf{X}\,
451 * \textrm{d}\mathcal{T} =
452 * -\int\limits_{\mathcal{T}_{\xi}} p\left\{\mathbf{F}^{\intercal}\cdot
453 * \left(\frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
454 * \mathbf{X}} {\partial\eta}\right) \right\} \cdot \delta\mathbf{X}\,
455 * \textrm{d}\xi\textrm{d}\eta
456 * \f]
457 *
458 * where \f$p\f$ is pressure, \f$\mathbf{N}\f$ is a normal to the face
459 * in the material configuration, \f$\xi, \eta\f$ are coordinates in the
460 * parent space
461 * \f$(\mathcal{T}_\xi)\f$ and \f$\mathbf{F}\f$ is the deformation gradient:
462 *
463 * \f[
464 * \mathbf{F} = \mathbf{h}(\mathbf{x})\,\mathbf{H}(\mathbf{X})^{-1} =
465 * \frac{\partial\mathbf{x}}{\partial\boldsymbol{\chi}}
466 * \frac{\partial\boldsymbol{\chi}}{\partial\mathbf{X}}
467 * \f]
468 *
469 * where \f$\mathbf{h}\f$ and \f$\mathbf{H}\f$ are the gradients of the
470 * spatial and material maps, respectively, and \f$\boldsymbol{\chi}\f$ are
471 * the reference coordinates.
472 *
473 */
474 MoFEMErrorCode doWork(int side, EntityType type,
475 EntitiesFieldData::EntData &row_data);
476 MoFEMErrorCode iNtegrate(EntData &row_data);
477 MoFEMErrorCode aSsemble(EntData &row_data);
478
480 const string material_field,
481 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
482 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
483 std::string &side_fe_name, Vec f, bCPressure &data,
484 bool ho_geometry = false)
485 : UserDataOperator(material_field, UserDataOperator::OPROW),
486 dataAtPts(data_at_pts), sideFe(side_fe), sideFeName(side_fe_name),
487 F(f), dAta(data), hoGeometry(ho_geometry){};
488 };
489
490 /**
491 * @brief RHS-operator for the surface force element (material configuration)
492 *
493 * Integrates surface force in the material configuration.
494 *
495 */
497
498 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
499 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
500 std::string sideFeName;
501 Vec F;
504
505 VectorDouble nF;
506
507 VectorInt rowIndices;
508
509 int nbRows; ///< number of dofs on rows
510 int nbIntegrationPts; ///< number of integration points
511
512 /**
513 * @brief Integrate surface force in the material configuration.
514 *
515 * Virtual work of the surface force corresponding to a test function
516 * of the material configuration \f$(\delta\mathbf{X})\f$:
517 *
518 * \f[
519 * \delta W^\text{material}_{\mathbf{t}}(\mathbf{x}, \mathbf{X},
520 * \delta\mathbf{X}) =
521 * -\int\limits_\mathcal{T} \left\{\mathbf{F}^{\intercal}\cdot
522 * \mathbf{t} \right\} \cdot \delta\mathbf{X}\,
523 * \textrm{d}\mathcal{T} =
524 * -\int\limits_{\mathcal{T}_{\xi}}
525 * \left\{\mathbf{F}^{\intercal}\cdot \mathbf{t} \right\} \cdot
526 * \delta\mathbf{X}\,
527 * \left\|\frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
528 * \mathbf{X}} {\partial\eta}\right\| \textrm{d}\xi\textrm{d}\eta
529 * = -\int\limits_{\mathcal{T}_{\xi}}
530 * \left\{\mathbf{F}^{\intercal}\cdot \mathbf{t} \right\} \cdot
531 * \delta\mathbf{X}\, \left\|\mathbf{N}\right\| \textrm{d}\xi\textrm{d}\eta
532 * \f]
533 *
534 * where \f$\mathbf t\f$ is surface force, \f$\mathbf{N}\f$ is a normal to
535 * the face in the material configuration, \f$\xi, \eta\f$ are coordinates
536 * in the parent space \f$(\mathcal{T}_\xi)\f$ and \f$\mathbf{F}\f$ is the
537 * deformation gradient:
538 *
539 * \f[
540 * \mathbf{F} = \mathbf{h}(\mathbf{x})\,\mathbf{H}(\mathbf{X})^{-1} =
541 * \frac{\partial\mathbf{x}}{\partial\boldsymbol{\chi}}
542 * \frac{\partial\boldsymbol{\chi}}{\partial\mathbf{X}}
543 * \f]
544 *
545 * where \f$\mathbf{h}\f$ and \f$\mathbf{H}\f$ are the gradients of the
546 * spatial and material maps, respectively, and \f$\boldsymbol{\chi}\f$ are
547 * the reference coordinates.
548 *
549 */
550 MoFEMErrorCode doWork(int side, EntityType type,
551 EntitiesFieldData::EntData &row_data);
552 MoFEMErrorCode iNtegrate(EntData &row_data);
553 MoFEMErrorCode aSsemble(EntData &row_data);
554
556 const string material_field,
557 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
558 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
559 std::string &side_fe_name, Vec f, bCForce &data,
560 bool ho_geometry = false)
561 : UserDataOperator(material_field, UserDataOperator::OPROW),
562 dataAtPts(data_at_pts), sideFe(side_fe), sideFeName(side_fe_name),
563 F(f), dAta(data), hoGeometry(ho_geometry){};
564 };
565
566 /**
567 * @brief Base class for LHS-operators for pressure element (material
568 * configuration)
569 *
570 * Linearisation of the material component with respect to
571 * spatial and material coordinates consists of three parts, computed
572 * by operators working on the face and on the side volume:
573 *
574 * \f[
575 * \textrm{D} \delta W^\text{material}_p(\mathbf{x}, \mathbf{X},
576 * \delta\mathbf{x})
577 * [\Delta\mathbf{x}, \Delta\mathbf{X}] = \textrm{D} \delta
578 * W^\text{(face)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
579 * [\Delta\mathbf{X}] + \textrm{D} \delta
580 * W^\text{(side volume)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
581 * [\Delta\mathbf{x}] + \textrm{D} \delta W^\text{(side volume)}_p
582 * (\mathbf{x}, \mathbf{X}, \delta\mathbf{x}) [\Delta\mathbf{X}]
583 * \f]
584 *
585 */
587
588 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
589 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
590 std::string sideFeName;
591 Mat Aij;
594
595 MatrixDouble NN;
596 VectorInt rowIndices;
597 VectorInt colIndices;
598
602
605
607
608 virtual MoFEMErrorCode doWork(int row_side, int col_side,
609 EntityType row_type, EntityType col_type,
610 EntitiesFieldData::EntData &row_data,
611 EntitiesFieldData::EntData &col_data) {
614 }
615
616 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
619 }
620
621 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
622
624 const string field_name_1, const string field_name_2,
625 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
626 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
627 std::string &side_fe_name, Mat aij, bCPressure &data,
628 bool ho_geometry = false)
629 : UserDataOperator(field_name_1, field_name_2,
631 dataAtPts(data_at_pts), sideFe(side_fe), sideFeName(side_fe_name),
632 Aij(aij), dAta(data), hoGeometry(ho_geometry) {
633 sYmm = false; // This will make sure to loop over all entities
634 }
635 };
636
637 /**
638 * @brief Base class for LHS-operators for pressure element (material
639 * configuration)
640 *
641 * Linearisation of the material component with respect to
642 * spatial and material coordinates consists of three parts, computed
643 * by operators working on the face and on the side volume:
644 *
645 * \f[
646 * \textrm{D} \delta W^\text{material}_p(\mathbf{x}, \mathbf{X},
647 * \delta\mathbf{x})
648 * [\Delta\mathbf{x}, \Delta\mathbf{X}] = \textrm{D} \delta
649 * W^\text{(face)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
650 * [\Delta\mathbf{X}] + \textrm{D} \delta
651 * W^\text{(side volume)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
652 * [\Delta\mathbf{x}] + \textrm{D} \delta W^\text{(side volume)}_p
653 * (\mathbf{x}, \mathbf{X}, \delta\mathbf{x}) [\Delta\mathbf{X}]
654 * \f]
655 *
656 */
658
659 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
660 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
661 std::string sideFeName;
662 Mat Aij;
665
666 MatrixDouble NN;
667 VectorInt rowIndices;
668 VectorInt colIndices;
669
673
676
678
679 virtual MoFEMErrorCode doWork(int row_side, int col_side,
680 EntityType row_type, EntityType col_type,
681 EntitiesFieldData::EntData &row_data,
682 EntitiesFieldData::EntData &col_data) {
685 }
686
687 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
690 }
691
692 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
693
695 const string field_name_1, const string field_name_2,
696 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
697 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
698 std::string &side_fe_name, Mat aij, bCForce &data,
699 bool ho_geometry = false)
700 : UserDataOperator(field_name_1, field_name_2,
702 dataAtPts(data_at_pts), sideFe(side_fe), sideFeName(side_fe_name),
703 Aij(aij), dAta(data), hoGeometry(ho_geometry) {
704 sYmm = false; // This will make sure to loop over all entities
705 }
706 };
707
708 /**
709 * @brief LHS-operator for the pressure element (material configuration)
710 *
711 * Computes linearisation of the material component with respect to
712 * material coordinates (also triggers a loop over operators
713 * from the side volume).
714 *
715 */
718
719 /**
720 * Integrates a contribution to the left-hand side and triggers a loop
721 * over side volume operators.
722 *
723 */
724 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
725 EntityType col_type,
726 EntitiesFieldData::EntData &row_data,
727 EntitiesFieldData::EntData &col_data);
728
729 /**
730 * @brief Compute part of the left-hand side
731 *
732 * Computes the linearisation of the material component
733 * with respect to a variation of material coordinates
734 * \f$(\Delta\mathbf{X})\f$:
735 *
736 * \f[
737 * \textrm{D} \delta W^\text{(face)}_p(\mathbf{x}, \mathbf{X},
738 * \delta\mathbf{x})
739 * [\Delta\mathbf{X}] = -\int\limits_{\mathcal{T}_{\xi}} p \,
740 * \mathbf{F}^{\intercal}\cdot \left[ \frac{\partial\mathbf{X}}
741 * {\partial\xi} \cdot \left(\frac{\partial\Delta
742 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
743 * -\frac{\partial\mathbf{X}}
744 * {\partial\eta} \cdot \left(\frac{\partial\Delta
745 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right]
746 * \textrm{d}\xi\textrm{d}\eta
747 * \f]
748 *
749 */
750 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
751
753 const string field_name_1, const string field_name_2,
754 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
755 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
756 std::string &side_fe_name, Mat aij, bCPressure &data,
757 bool ho_geometry = false)
758 : OpNeumannPressureMaterialLhs(field_name_1, field_name_2, data_at_pts,
759 side_fe, side_fe_name, aij, data,
760 ho_geometry) {
761 sYmm = false; // This will make sure to loop over all entities
762 };
763 };
764
765 /**
766 * @brief LHS-operator for the surface force element (material configuration)
767 *
768 * Computes linearisation of the material component with respect to
769 * material coordinates (also triggers a loop over operators
770 * from the side volume).
771 *
772 */
775
776 /**
777 * Integrates a contribution to the left-hand side and triggers a loop
778 * over side volume operators.
779 *
780 */
781 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
782 EntityType col_type,
783 EntitiesFieldData::EntData &row_data,
784 EntitiesFieldData::EntData &col_data);
785
786 /**
787 * @brief Compute part of the left-hand side
788 *
789 * Computes the linearisation of the material component
790 * with respect to a variation of material coordinates
791 * \f$(\Delta\mathbf{X})\f$:
792 *
793 * \f[
794 * \textrm{D} \delta W^\text{(face)}_{\mathbf{t}}(\mathbf{x}, \mathbf{X},
795 * \delta\mathbf{x})
796 * [\Delta\mathbf{X}] = -\int\limits_{\mathcal{T}_{\xi}} \,
797 * \dfrac{\left\{\mathbf{F}^{\intercal}\cdot \mathbf{t} \right\} \cdot
798 * \delta\mathbf{x}}{\left\|\frac{\partial\mathbf{X}}{\partial\xi}\times\frac{\partial
799 * \mathbf{X}} {\partial\eta} \right\|} \left[ \frac{\partial\mathbf{X}}
800 * {\partial\xi} \cdot \left(\frac{\partial\Delta
801 * \mathbf{X}}{\partial\eta}\times\mathbf{N}\right)
802 * -\frac{\partial\mathbf{X}}
803 * {\partial\eta} \cdot \left(\frac{\partial\Delta
804 * \mathbf{X}}{\partial\xi}\times \mathbf{N}\right)\right]
805 * \textrm{d}\xi\textrm{d}\eta
806 * \f]
807 *
808 */
809 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
810
812 const string field_name_1, const string field_name_2,
813 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
814 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
815 std::string &side_fe_name, Mat aij, bCForce &data,
816 bool ho_geometry = false)
817 : OpNeumannSurfaceForceMaterialLhs(field_name_1, field_name_2,
818 data_at_pts, side_fe, side_fe_name,
819 aij, data, ho_geometry) {
820 sYmm = false; // This will make sure to loop over all entities
821 };
822 };
823
824 /**
825 * @brief LHS-operator for the pressure element (material configuration)
826 *
827 * Triggers loop over operators from the side volume
828 *
829 */
832
833 /*
834 * Triggers loop over operators from the side volume
835 *
836 */
837 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
838 EntityType col_type,
839 EntitiesFieldData::EntData &row_data,
840 EntitiesFieldData::EntData &col_data);
841
843 const string field_name_1, const string field_name_2,
844 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
845 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
846 std::string &side_fe_name, Mat aij, bCPressure &data,
847 bool ho_geometry = false)
848 : OpNeumannPressureMaterialLhs(field_name_1, field_name_2, data_at_pts,
849 side_fe, side_fe_name, aij, data,
850 ho_geometry) {
851 sYmm = false; // This will make sure to loop over all entities
852 };
853 };
854
855 /**
856 * @brief LHS-operator for the surface force element (material configuration)
857 *
858 * Triggers loop over operators from the side volume
859 *
860 */
863
864 /*
865 * Triggers loop over operators from the side volume
866 *
867 */
868 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
869 EntityType col_type,
870 EntitiesFieldData::EntData &row_data,
871 EntitiesFieldData::EntData &col_data);
872
874 const string field_name_1, const string field_name_2,
875 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
876 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
877 std::string &side_fe_name, Mat aij, bCForce &data,
878 bool ho_geometry = false)
879 : OpNeumannSurfaceForceMaterialLhs(field_name_1, field_name_2,
880 data_at_pts, side_fe, side_fe_name,
881 aij, data, ho_geometry) {
882 sYmm = false; // This will make sure to loop over all entities
883 };
884 };
885
886 /**
887 * @brief Base class for LHS-operators (material) on side volumes
888 *
889 */
892
893 MatrixDouble NN;
894
895 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
896 Mat Aij;
899
900 VectorInt rowIndices;
901 VectorInt colIndices;
902
906
909
911
912 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
913 EntityType col_type,
914 EntitiesFieldData::EntData &row_data,
915 EntitiesFieldData::EntData &col_data);
916 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
919 }
920 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
921
923 const string field_name_1, const string field_name_2,
924 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
925 bCPressure &data, bool ho_geometry = false)
926 : VolOnSideUserDataOperator(field_name_1, field_name_2,
928 dataAtPts(data_at_pts), Aij(aij), dAta(data),
929 hoGeometry(ho_geometry) {
930 sYmm = false; // This will make sure to loop over all entities
931 }
932 };
933
934 /**
935 * @brief Base class for LHS-operators (material) on side volumes
936 *
937 */
940
941 MatrixDouble NN;
942
943 boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
944 Mat Aij;
947
948 VectorInt rowIndices;
949 VectorInt colIndices;
950
954
957
959
960 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
961 EntityType col_type,
962 EntitiesFieldData::EntData &row_data,
963 EntitiesFieldData::EntData &col_data);
964 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
967 }
968 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
969
971 const string field_name_1, const string field_name_2,
972 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
973 bCForce &data, bool ho_geometry = false)
974 : VolOnSideUserDataOperator(field_name_1, field_name_2,
976 dataAtPts(data_at_pts), Aij(aij), dAta(data),
977 hoGeometry(ho_geometry) {
978 sYmm = false; // This will make sure to loop over all entities
979 }
980 };
981
982 /**
983 * @brief LHS-operator (material configuration) on the side volume
984 *
985 * Computes the linearisation of the material component
986 * with respect to a variation of spatial coordinates on the side volume.
987 */
990
991 /**
992 * @brief Integrates over a face contribution from a side volume
993 *
994 * Computes linearisation of the material component
995 * with respect to a variation of spatial coordinates:
996 *
997 * \f[
998 * \textrm{D} \delta W^\text{(side volume)}_p(\mathbf{x}, \mathbf{X},
999 * \delta\mathbf{x})
1000 * [\Delta\mathbf{x}] = -\int\limits_{\mathcal{T}_{\xi}} p
1001 * \left\{\left[
1002 * \frac{\partial\Delta\mathbf{x}}{\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
1003 * \right]^{\intercal}\cdot\left(\frac{\partial\mathbf{X}}{\partial\xi}
1004 * \times\frac{\partial\mathbf{X}}{\partial\eta}\right)\right\}
1005 * \cdot \delta\mathbf{X}\, \textrm{d}\xi\textrm{d}\eta
1006 * \f]
1007 *
1008 */
1009 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
1010
1012 const string field_name_1, const string field_name_2,
1013 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
1014 bCPressure &data, bool ho_geometry = false)
1016 field_name_1, field_name_2, data_at_pts, aij, data, ho_geometry) {
1017 sYmm = false; // This will make sure to loop over all entities
1018 };
1019 };
1020
1021 /**
1022 * @brief LHS-operator (material configuration) on the side volume
1023 *
1024 * Computes the linearisation of the material component
1025 * with respect to a variation of spatial coordinates on the side volume.
1026 */
1029
1030 /**
1031 * @brief Integrates over a face contribution from a side volume
1032 *
1033 * Computes linearisation of the material component
1034 * with respect to a variation of spatial coordinates:
1035 *
1036 * \f[
1037 * \textrm{D} \delta W^\text{(side volume)}_{\mathbf{t}}(\mathbf{x},
1038 * \mathbf{X}, \delta\mathbf{x})
1039 * [\Delta\mathbf{x}] = -\int\limits_{\mathcal{T}_{\xi}}
1040 * \left\{\left[
1041 * \frac{\partial\Delta\mathbf{x}}{\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
1042 * \right]^{\intercal}\cdot \mathbf{t}\right\}
1043 * \cdot \delta\mathbf{X} \left\|\frac{\partial\mathbf{X}}{\partial\xi}
1044 * \times\frac{\partial\mathbf{X}}{\partial\eta}\right\| \,
1045 * \textrm{d}\xi\textrm{d}\eta \f]
1046 *
1047 */
1048 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
1049
1051 const string field_name_1, const string field_name_2,
1052 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
1053 bCForce &data, bool ho_geometry = false)
1055 field_name_1, field_name_2, data_at_pts, aij, data, ho_geometry) {
1056 sYmm = false; // This will make sure to loop over all entities
1057 };
1058 };
1059
1060 /**
1061 * @brief LHS-operator (material configuration) on the side volume
1062 *
1063 * Computes the linearisation of the material component
1064 * with respect to a variation of material coordinates on the side volume.
1065 *
1066 */
1069
1070 /**
1071 * @brief Integrates over a face contribution from a side volume
1072 *
1073 * Computes linearisation of the material component
1074 * with respect to a variation of material coordinates:
1075 *
1076 * \f[
1077 * \textrm{D} \delta W^\text{(side volume)}_p(\mathbf{x}, \mathbf{X},
1078 * \delta\mathbf{x})
1079 * [\Delta\mathbf{X}] = \int\limits_{\mathcal{T}_{\xi}} p
1080 * \left\{\left[
1081 * \mathbf{h}\,\mathbf{H}^{-1}\,\frac{\partial\Delta\mathbf{X}}
1082 * {\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
1083 * \right]^{\intercal}\cdot\left(\frac{\partial\mathbf{X}}{\partial\xi}
1084 * \times\frac{\partial\mathbf{X}}{\partial\eta}\right)\right\}
1085 * \cdot \delta\mathbf{X}\, \textrm{d}\xi\textrm{d}\eta
1086 * \f]
1087 */
1088 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
1089
1091 const string field_name_1, const string field_name_2,
1092 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
1093 bCPressure &data, bool ho_geometry = false)
1095 field_name_1, field_name_2, data_at_pts, aij, data, ho_geometry) {
1096 sYmm = false; // This will make sure to loop over all entities
1097 };
1098 };
1099
1100 /**
1101 * @brief LHS-operator (material configuration) on the side volume
1102 *
1103 * Computes the linearisation of the material component
1104 * with respect to a variation of material coordinates on the side volume.
1105 *
1106 */
1109
1110 /**
1111 * @brief Integrates over a face contribution from a side volume
1112 *
1113 * Computes linearisation of the material component
1114 * with respect to a variation of material coordinates:
1115 *
1116 * \f[
1117 * \textrm{D} \delta W^\text{(side volume)}_{\mathbf t}(\mathbf{x},
1118 * \mathbf{X}, \delta\mathbf{x})
1119 * [\Delta\mathbf{X}] = \int\limits_{\mathcal{T}_{\xi}}
1120 * \left\{\left[
1121 * \mathbf{h}\,\mathbf{H}^{-1}\,\frac{\partial\Delta\mathbf{X}}
1122 * {\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
1123 * \right]^{\intercal}\cdot \mathbf{t}\right\}
1124 * \cdot \delta\mathbf{X}\left\|\frac{\partial\mathbf{X}}{\partial\xi}
1125 * \times\frac{\partial\mathbf{X}}{\partial\eta}\right\| \,
1126 * \textrm{d}\xi\textrm{d}\eta \f]
1127 */
1128 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
1129
1131 const string field_name_1, const string field_name_2,
1132 boost::shared_ptr<DataAtIntegrationPts> data_at_pts, Mat aij,
1133 bCForce &data, bool ho_geometry = false)
1135 field_name_1, field_name_2, data_at_pts, aij, data, ho_geometry) {
1136 sYmm = false; // This will make sure to loop over all entities
1137 };
1138 };
1139
1140 /// Operator for flux element
1142
1143 Vec F;
1145 boost::ptr_vector<MethodForForceScaling> &methodsOp;
1147
1148 OpNeumannFlux(const std::string field_name, Vec _F, bCPressure &data,
1149 boost::ptr_vector<MethodForForceScaling> &methods_op,
1150 bool ho_geometry);
1151
1152 VectorDouble Nf;
1153
1154 MoFEMErrorCode doWork(int side, EntityType type,
1155 EntitiesFieldData::EntData &data);
1156 };
1157
1158 /**
1159 * \brief Add operator to calculate forces on element
1160 * @param field_name Field name (f.e. TEMPERATURE)
1161 * @param F Right hand side vector
1162 * @param ms_id Set id (SideSet or BlockSet if block_set = true)
1163 * @param ho_geometry Use higher order shape functions to define curved
1164 * geometry
1165 * @param block_set If tru get data from block set
1166 * @return ErrorCode
1167 */
1168 MoFEMErrorCode addForce(const std::string field_name, Vec F, int ms_id,
1169 bool ho_geometry = false, bool block_set = false);
1170
1171 /**
1172 * \brief Add operator to calculate forces on element (in ALE)
1173 * @param field_name_1 Field name for spatial positions
1174 * @param field_name_2 Field name for material positions
1175 * @param data_at_pts Common data at integration points
1176 * @param side_fe_name Name of the element in the side volume
1177 * @param F Right hand side vector
1178 * @param aij Tangent matrix
1179 * @param ms_id Set id (SideSet or BlockSet if block_set = true)
1180 * @param ho_geometry Use higher order shape functions to define curved
1181 * geometry
1182 * @param block_set If true get data from block set
1183 * @param ignore_material_force If true then material force is not added
1184 * @return ErrorCode
1185 */
1186 MoFEMErrorCode
1187 addForceAle(const std::string field_name_1, const std::string field_name_2,
1188 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
1189 std::string side_fe_name, Vec F, Mat aij, int ms_id,
1190 bool ho_geometry = false, bool block_set = false,
1191 bool ignore_material_force = false);
1192
1193 /**
1194 * \brief Add operator to calculate pressure on element
1195 * @param field_name Field name (f.e. TEMPERATURE)
1196 * @param F Right hand side vector
1197 * @param ms_id Set id (SideSet or BlockSet if block_set = true)
1198 * @param ho_geometry Use higher order shape functions to define curved
1199 * geometry
1200 * @param block_set If true get data from block set
1201 * @return ErrorCode
1202 */
1203 MoFEMErrorCode addPressure(const std::string field_name, Vec F, int ms_id,
1204 bool ho_geometry = false, bool block_set = false);
1205
1206 /**
1207 * \brief Add operator to calculate pressure on element (in ALE)
1208 * @param field_name_1 Field name for spatial positions
1209 * @param field_name_2 Field name for material positions
1210 * @param data_at_pts Common data at integration points
1211 * @param side_fe_name Name of the element in the side volume
1212 * @param F Right hand side vector
1213 * @param aij Tangent matrix
1214 * @param ms_id Set id (SideSet or BlockSet if block_set = true)
1215 * @param ho_geometry Use higher order shape functions to define curved
1216 * geometry
1217 * @param block_set If true get data from block set
1218 * @return ErrorCode
1219 */
1220 MoFEMErrorCode
1221 addPressureAle(const std::string field_name_1, const std::string field_name_2,
1222 boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
1223 std::string side_fe_name, Vec F, Mat aij, int ms_id,
1224 bool ho_geometry = false, bool block_set = false);
1225
1226 /**
1227 * \brief Add operator to calculate pressure on element
1228 * @param field_name Field name (f.e. TEMPERATURE)
1229 * @param F Right hand side vector
1230 * @param ms_id Set id (SideSet or BlockSet if block_set = true)
1231 * @param ho_geometry Use higher order shape functions to define curved
1232 * geometry
1233 * @param block_set If tru get data from block set
1234 * @return ErrorCode
1235 */
1236 MoFEMErrorCode addLinearPressure(const std::string field_name, Vec F,
1237 int ms_id, bool ho_geometry = false);
1238
1239 /// Add flux element operator (integration on face)
1240 MoFEMErrorCode addFlux(const std::string field_name, Vec F, int ms_id,
1241 bool ho_geometry = false);
1242
1243 /// \deprecated fixed spelling mistake
1245
1247
1248 DEPRECATED typedef bCPressure
1249 bCPreassure; ///< \deprecated Do not use spelling mistake
1250
1251 /// \deprecated function is deprecated because spelling mistake, use
1252 /// addPressure instead
1253 DEPRECATED MoFEMErrorCode addPreassure(const std::string field_name, Vec F,
1254 int ms_id, bool ho_geometry = false,
1255 bool block_set = false);
1256};
1257
1258/** \brief Set of high-level function declaring elements and setting operators
1259 * to apply forces/fluxes \ingroup mofem_static_boundary_conditions
1260 */
1262
1263 /**
1264 * \brief Declare finite element
1265 *
1266 * Search cubit sidesets and blocksets with pressure bc and declare surface
1267 elemen
1268
1269 * Block set has to have name “PRESSURE”. Can have name “PRESSURE_01” or any
1270 * other name with prefix. The first attribute of block set is pressure
1271 * value.
1272
1273 *
1274 * @param m_field Interface insurance
1275 * @param field_name Field name (f.e. DISPLACEMENT)
1276 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
1277 * @param intersect_ptr Pointer to range to interect meshset entities
1278 * @return Error code
1279 */
1280 static MoFEMErrorCode addNeumannBCElements(
1281 MoFEM::Interface &m_field, const std::string field_name,
1282 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS",
1283 Range *intersect_ptr = NULL);
1284
1285 /**
1286 * \brief Set operators to finite elements calculating right hand side vector
1287
1288 * @param m_field Interface
1289 * @param neumann_forces Map of pointers to force/pressure elements
1290 * @param F Right hand side vector
1291 * @param field_name Field name (f.e. DISPLACEMENT)
1292 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
1293 * @return Error code
1294 *
1295 */
1296 static MoFEMErrorCode setMomentumFluxOperators(
1297 MoFEM::Interface &m_field,
1298 boost::ptr_map<std::string, NeumannForcesSurface> &neumann_forces, Vec F,
1299 const std::string field_name,
1300 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
1301
1302 static MoFEMErrorCode addNeumannFluxBCElements(
1303 MoFEM::Interface &m_field, const std::string field_name,
1304 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
1305
1306 static MoFEMErrorCode setMassFluxOperators(
1307 MoFEM::Interface &m_field,
1308 boost::ptr_map<std::string, NeumannForcesSurface> &neumann_forces, Vec F,
1309 const std::string field_name,
1310 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
1311};
1312
1313/**
1314 * @deprecated Do not use that name it has spelling mistake
1315 */
1317
1318/**
1319 * @deprecated Do not use that name it has spelling mistake
1320 */
1322
1323#endif //__SURFACE_PERSSURE_HPP__
1324
1325/**
1326 * \defgroup mofem_static_boundary_conditions Pressure and force boundary
1327 * conditions
1328 *
1329 * \ingroup user_modules
1330 **/
static Index< 'p', 3 > p
DEPRECATED typedef MetaNeumannForces MetaNeummanForces
DEPRECATED typedef NeumannForcesSurface NeummanForcesSurface
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
#define DEPRECATED
Definition: definitions.h:17
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
constexpr int order
@ F
const double c
speed of light (cm/ns)
constexpr auto field_name
#define _F(n)
Definition: quad.c:25
Set of high-level function declaring elements and setting operators to apply forces/fluxes.
static MoFEMErrorCode setMassFluxOperators(MoFEM::Interface &m_field, boost::ptr_map< std::string, NeumannForcesSurface > &neumann_forces, Vec F, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
static MoFEMErrorCode addNeumannFluxBCElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
static MoFEMErrorCode addNeumannBCElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS", Range *intersect_ptr=NULL)
Declare finite element.
static MoFEMErrorCode setMomentumFluxOperators(MoFEM::Interface &m_field, boost::ptr_map< std::string, NeumannForcesSurface > &neumann_forces, Vec F, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Set operators to finite elements calculating right hand side vector.
std::array< bool, MBMAXTYPE > doEntities
If true operator is executed for entity.
bool sYmm
If true assume that matrix is symmetric structure.
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
@ OPCOL
operator doWork function is executed on FE columns
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
boost::shared_ptr< MatrixDouble > getHMatPtr()
boost::shared_ptr< MatrixDouble > getSmallhMatPtr()
boost::weak_ptr< DofEntity > arcLengthDof
MoFEMErrorCode getForce(const EntityHandle ent, const VectorDouble3 &coords, const VectorDouble3 &normal, VectorDouble3 &force)
LinearVaringPresssure(const VectorDouble3 &p, const double c)
virtual MoFEMErrorCode getForce(const EntityHandle ent, const VectorDouble3 &coords, const VectorDouble3 &normal, VectorDouble3 &force)
Operator for computing deformation gradients in side volumes.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
OpCalculateDeformation(const string field_name, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, bool ho_geometry=false)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for computing tangent vectors.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
boost::shared_ptr< DataAtIntegrationPts > dataAtIntegrationPts
OpGetTangent(const string field_name, boost::shared_ptr< DataAtIntegrationPts > dataAtIntegrationPts)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
boost::ptr_vector< MethodForForceScaling > & methodsOp
boost::ptr_vector< MethodForForceScaling > & methodsOp
boost::shared_ptr< MethodForAnalyticalForce > analyticalForceOp
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Integrate surface force (traction)
boost::ptr_vector< MethodForForceScaling > & methodsOp
RHS-operator for pressure element (spatial configuration)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Integrate pressure.
boost::ptr_vector< MethodForForceScaling > & methodsOp
LHS-operator for pressure element (spatial configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Compute left-hand side.
boost::shared_ptr< DataAtIntegrationPts > dataAtIntegrationPts
OpNeumannPressureLhs_dx_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCPressure &data, bool ho_geometry=false)
LHS-operator for the pressure element (material configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannPressureMaterialLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCPressure &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Compute part of the left-hand side.
LHS-operator for the pressure element (material configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannPressureMaterialLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCPressure &data, bool ho_geometry=false)
Base class for LHS-operators for pressure element (material configuration)
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
OpNeumannPressureMaterialLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCPressure &data, bool ho_geometry=false)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
RHS-operator for the pressure element (material configuration)
OpNeumannPressureMaterialRhs_dX(const string material_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Vec f, bCPressure &data, bool ho_geometry=false)
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &row_data)
Integrate pressure in the material configuration.
LHS-operator (material configuration) on the side volume.
OpNeumannPressureMaterialVolOnSideLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCPressure &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrates over a face contribution from a side volume.
LHS-operator (material configuration) on the side volume.
OpNeumannPressureMaterialVolOnSideLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCPressure &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrates over a face contribution from a side volume.
Base class for LHS-operators (material) on side volumes.
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannPressureMaterialVolOnSideLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCPressure &data, bool ho_geometry=false)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
LHS-operator for surface force element (spatial configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Compute left-hand side.
OpNeumannSurfaceForceLhs_dx_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCForce &data, bool ho_geometry=false)
boost::shared_ptr< DataAtIntegrationPts > dataAtIntegrationPts
LHS-operator for the surface force element (material configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannSurfaceForceMaterialLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCForce &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Compute part of the left-hand side.
LHS-operator for the surface force element (material configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannSurfaceForceMaterialLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCForce &data, bool ho_geometry=false)
Base class for LHS-operators for pressure element (material configuration)
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannSurfaceForceMaterialLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Mat aij, bCForce &data, bool ho_geometry=false)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
RHS-operator for the surface force element (material configuration)
OpNeumannSurfaceForceMaterialRhs_dX(const string material_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, Vec f, bCForce &data, bool ho_geometry=false)
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &row_data)
Integrate surface force in the material configuration.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
LHS-operator (material configuration) on the side volume.
OpNeumannSurfaceForceMaterialVolOnSideLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCForce &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrates over a face contribution from a side volume.
LHS-operator (material configuration) on the side volume.
OpNeumannSurfaceForceMaterialVolOnSideLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCForce &data, bool ho_geometry=false)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrates over a face contribution from a side volume.
Base class for LHS-operators (material) on side volumes.
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpNeumannSurfaceForceMaterialVolOnSideLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, Mat aij, bCForce &data, bool ho_geometry=false)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Finite element and operators to apply force/pressures applied to surfaces.
DEPRECATED typedef bCPressure bCPreassure
MyTriangleFE & getLoopFe()
std::map< int, bCPressure > mapPressure
MoFEMErrorCode addPressureAle(const std::string field_name_1, const std::string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, std::string side_fe_name, Vec F, Mat aij, int ms_id, bool ho_geometry=false, bool block_set=false)
Add operator to calculate pressure on element (in ALE)
MoFEMErrorCode addForceAle(const std::string field_name_1, const std::string field_name_2, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, std::string side_fe_name, Vec F, Mat aij, int ms_id, bool ho_geometry=false, bool block_set=false, bool ignore_material_force=false)
Add operator to calculate forces on element (in ALE)
std::map< int, bCForce > mapForce
MyTriangleFE & getLoopFeMatRhs()
MyTriangleFE & getLoopFeMatLhs()
DEPRECATED typedef MethodForAnalyticalForce MethodForAnaliticalForce
DEPRECATED typedef OpNeumannPressure OpNeumannPreassure
MoFEMErrorCode addFlux(const std::string field_name, Vec F, int ms_id, bool ho_geometry=false)
Add flux element operator (integration on face)
MyTriangleFE & getLoopFeLhs()
boost::ptr_vector< MethodForForceScaling > methodsOp
DEPRECATED MoFEMErrorCode addPreassure(const std::string field_name, Vec F, int ms_id, bool ho_geometry=false, bool block_set=false)
MoFEMErrorCode addForce(const std::string field_name, Vec F, int ms_id, bool ho_geometry=false, bool block_set=false)
Add operator to calculate forces on element.
NeumannForcesSurface(MoFEM::Interface &m_field)
MoFEMErrorCode addLinearPressure(const std::string field_name, Vec F, int ms_id, bool ho_geometry=false)
Add operator to calculate pressure on element.
MoFEMErrorCode addPressure(const std::string field_name, Vec F, int ms_id, bool ho_geometry=false, bool block_set=false)
Add operator to calculate pressure on element.
boost::ptr_vector< MethodForAnalyticalForce > analyticalForceOp
MoFEM::Interface & mField