v0.13.2
Loading...
Searching...
No Matches
SpringElement.hpp
Go to the documentation of this file.
1/** \file SpringElements.hpp
2 \brief Header file for spring element implementation
3*/
4
5
6
7#ifndef __SPRINGELEMENT_HPP__
8#define __SPRINGELEMENT_HPP__
9
12using EntData = EntitiesFieldData::EntData;
15/** \brief Set of functions declaring elements and setting operators
16 * to apply spring boundary condition
17 */
18
21 int iD;
22
25
27
30 };
31
33 : public boost::enable_shared_from_this<DataAtIntegrationPtsSprings> {
34
35 boost::shared_ptr<MatrixDouble> gradDispPtr =
36 boost::make_shared<MatrixDouble>();
37 boost::shared_ptr<MatrixDouble> xAtPts = boost::make_shared<MatrixDouble>();
38 boost::shared_ptr<MatrixDouble> xInitAtPts =
39 boost::make_shared<MatrixDouble>();
40
41 boost::shared_ptr<MatrixDouble> hMat = boost::make_shared<MatrixDouble>();
42 boost::shared_ptr<MatrixDouble> FMat = boost::make_shared<MatrixDouble>();
43 boost::shared_ptr<MatrixDouble> HMat = boost::make_shared<MatrixDouble>();
44 boost::shared_ptr<MatrixDouble> invHMat =
45 boost::make_shared<MatrixDouble>();
46 boost::shared_ptr<VectorDouble> detHVec =
47 boost::make_shared<VectorDouble>();
48
49 MatrixDouble tangent1;
50 MatrixDouble tangent2;
51 MatrixDouble normalVector;
52
56
58
59 EntitiesFieldData::EntData *faceRowData;
60
61 std::map<int, BlockOptionDataSprings> mapSpring;
62 // ~DataAtIntegrationPtsSprings() {}
63 DataAtIntegrationPtsSprings(MoFEM::Interface &m_field, double scale_stiffness = 1.)
64 : mField(m_field), faceRowData(nullptr), scaleStiffness(scale_stiffness) {
65
66 ierr = setBlocks();
67 CHKERRABORT(PETSC_COMM_WORLD, ierr);
68 }
69
70 MoFEMErrorCode getParameters() {
71 MoFEMFunctionBegin; // They will be overwritten by BlockData
72 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "Problem", "none");
73
74 ierr = PetscOptionsEnd();
75 CHKERRQ(ierr);
77 }
78
79 MoFEMErrorCode getBlockData(BlockOptionDataSprings &data) {
81
84
86 }
87
88 MoFEMErrorCode setBlocks() {
90
92 if (bit->getName().compare(0, 9, "SPRING_BC") == 0) {
93
94 const int id = bit->getMeshsetId();
95 mapSpring[id].tRis.clear();
96 CHKERR mField.get_moab().get_entities_by_dimension(
97 bit->getMeshset(), 2, mapSpring[id].tRis, true);
98
99 std::vector<double> attributes;
100 bit->getAttributes(attributes);
101 if (attributes.size() < 2) {
102 SETERRQ1(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
103 "Springs should have 2 attributes but there is %d",
104 attributes.size());
105 }
106 mapSpring[id].iD = id;
107 mapSpring[id].springStiffnessNormal = attributes[0];
108 mapSpring[id].springStiffnessTangent = attributes[1];
109
110 // Print spring blocks after being read
111 MOFEM_LOG_C("WORLD", Sev::verbose, "\nSpring block %d\n", id);
112 MOFEM_LOG_C("WORLD", Sev::verbose, "\tNormal stiffness %3.4g\n",
113 attributes[0]);
114 MOFEM_LOG_C("WORLD", Sev::verbose, "\tTangent stiffness %3.4g\n",
115 attributes[1]);
116 }
117 }
118
120 }
121
122 private:
124 };
125
126 /**
127 * @brief RHS-operator for the spring boundary condition element
128 *
129 * Integrates virtual
130 * work of springs on displacement or spatial positions and assembles
131 * components to RHS global vector.
132 *
133 */
135
136 // vector used to store force vector for each degree of freedom
137 VectorDouble nF;
138
139 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> commonDataPtr;
142
143 /** * @brief Integrates and assembles to global RHS vector virtual work of
144 * springs
145 *
146 * Computes virtual work of springs on spatial positions or displacements
147 * for configurational changes:
148 *
149 * \f[
150 * f_s({\mathbf x}, {\mathbf X},
151 * \delta \mathbf{x}) = \int\limits_{\partial \Omega }^{} {{\delta
152 * \mathbf{x}^T} \cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes {\mathbf
153 * N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes {\mathbf
154 * N} \right) \right] \left( {\mathbf x} - {\mathbf X} \right) \partial
155 * \Omega }
156 * \f]
157 *
158 * where \f$ \delta \mathbf{x} \f$ is either virtual displacement or
159 * variation of spatial positions, \f$ k_{\rm n} \f$ is the stiffness of
160 * the springs normal to the surface, \f$ k_{\rm t} \f$ is the stiffness of
161 * the springs tangential to the surface, \f$ {\mathbf N} \f$ is the normal
162 * to the surface vector based on material positions, \f$
163 * {\mathbf x} \f$ is the vector of spatial positions or displacements of
164 * the surface with springs and \f$ {\mathbf X} \f$ is the vector of
165 * material positions that is zero when displacements are considered
166 *
167 */
168
169 MoFEMErrorCode doWork(int side, EntityType type, EntData &data);
170
171 /**
172 *
173 * @param common_data_ptr Pointer to the common data for
174 * spring element
175 * @param data Variable containing data for normal and
176 * tangential stiffnesses of springs attached to the current element
177 * @param field_name String of field name for
178 * spatial positions or displacements for rows
179 */
180 OpSpringFs(boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
181 &common_data_ptr,
183 const std::string field_name)
185 field_name.c_str(), OPROW),
186 commonDataPtr(common_data_ptr), dAta(data) {
187 if (field_name.compare(0, 16, "SPATIAL_POSITION") != 0)
188 is_spatial_position = false;
189 }
190 };
191
192 /**
193 * @brief LHS-operator for the springs element
194 *
195 * Integrates Springs virtual work on spatial positions or displacements
196 * \f$ f_s \f$ derivative with respect to spatial postions or displacements
197 * on surface with springs side and assembles components of the LHS vector.
198 *
199 */
201
202 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> commonDataPtr;
204
205 MatrixDouble locKs;
206 MatrixDouble transLocKs;
207
208 /** * @brief Integrates and assembles to global RHS vector virtual work of
209 * springs
210 *
211 * Computes virtual work of springs on spatial positions or displacements
212 * for configurational changes:
213 *
214 * \f[
215 * \textrm{D} f_s({\mathbf x}, {\mathbf X},
216 * \delta \mathbf{x})[\Delta \mathbf x] = \int\limits_{\partial \Omega }^{}
217 * {{\delta \mathbf{x}^T} \cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes
218 * {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes
219 * {\mathbf N} \right) \right] \Delta {\mathbf x} \partial \Omega } \f]
220 *
221 * where \f$ \delta \mathbf{x} \f$ is either virtual displacement or the
222 * variation of spatial positions, \f$ k_{\rm n} \f$ is the stiffness of the
223 * springs normal to the surface, \f$ k_{\rm t} \f$ is the stiffness of the
224 * springs tangential to the surface, \f$ {\mathbf N} \f$ is the normal to
225 * the surface vector based on material positions, \f$
226 * {\mathbf x} \f$ is the vector of spatial positions or displacements of
227 * the surface with springs and \f$ {\mathbf X} \f$ is the vector of
228 * material positions that is zero when displacements are considered
229 *
230 */
231 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
232 EntityType col_type, EntData &row_data,
233 EntData &col_data);
234 /**
235 *
236 * @param common_data_ptr Pointer to the common data for
237 * spring element
238 * @param data Variable containing data for normal and
239 * tangential stiffnesses of springs attached to the current element
240 * @param field_name String of field name for
241 * spatial positions or displacements for rows
242 */
243 OpSpringKs(boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
244 &common_data_ptr,
246 const std::string field_name)
248 field_name.c_str(), field_name.c_str(), OPROWCOL),
249 commonDataPtr(common_data_ptr), dAta(data) {
250 // sYmm = false;
251 }
252 };
253
256
257 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> commonDataPtr;
259
260 MatrixDouble locKs;
261 MatrixDouble transLocKs;
262 /**
263 * @brief Compute part of the left-hand side
264 *
265 * Computes the linearisation of the material component
266 * with respect to a variation of material coordinates
267 * \f$(\Delta\mathbf{X})\f$:
268 *
269 * \f[
270 * \textrm{D} f^{\textrm{(face)}}_s(\mathbf{x}, \mathbf{X},
271 * \delta\mathbf{x})
272 * [\Delta\mathbf{X}] = -\int\limits_{\mathcal{T}_{\xi}} \,
273 * 0.5 (k_{\rm n} - k_{\rm s}) \cdot \left\{ \left[
274 * \frac{\partial\mathbf{X}}
275 * {\partial\xi} \cdot \left(\frac{\partial\Delta
276 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
277 * -\frac{\partial\mathbf{X}}
278 * {\partial\eta} \cdot \left(\frac{\partial\Delta
279 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right] \otimes
280 * \dfrac{\mathbf{N}}{\|\mathbf{N}\|} + \dfrac{\mathbf{N}}{\|\mathbf{N}\|}
281 * \otimes \left[ \frac{\partial\mathbf{X}}
282 * {\partial\xi} \cdot \left(\frac{\partial\Delta
283 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
284 * -\frac{\partial\mathbf{X}}
285 * {\partial\eta} \cdot \left(\frac{\partial\Delta
286 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right]
287 * - \dfrac{\mathbf{N} \otimes \mathbf{N}}{{\| \mathbf{N} \|}^3} \left[
288 * \frac{\partial\mathbf{X}}
289 * {\partial\xi} \cdot \left(\frac{\partial\Delta
290 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
291 * -\frac{\partial\mathbf{X}}
292 * {\partial\eta} \cdot \left(\frac{\partial\Delta
293 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right] \mathbf{N}
294 * \right \}
295 * \textrm{d}\xi\textrm{d}\eta
296 * \\
297 * +\int\limits_{\mathcal{T}_{\xi}}
298 * 0.5 k_{\rm s} \left[
299 * \frac{\partial\mathbf{X}}
300 * {\partial\xi} \cdot \left(\frac{\partial\Delta
301 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{x}\right)
302 * -\frac{\partial\mathbf{X}}
303 * {\partial\eta} \cdot \left(\frac{\partial\Delta
304 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{x}\right)\right]
305 * {\mathbf N}^{\intercal} \cdot {\mathbf I} ( {\mathbf x} - {\mathbf X} )
306 * \textrm{d}\xi\textrm{d}\eta
307 * -\int\limits_{\mathcal{T}_{\xi}}
308 * {{\delta
309 * \mathbf{x}^T} \cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes {\mathbf
310 * N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes {\mathbf
311 * N} \right) \right] \Delta {\mathbf X} }
312 * \textrm{d}\xi\textrm{d}\eta
313 *
314 * \f]
315 *
316 */
317 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
318 EntityType col_type, EntData &row_data,
319 EntData &col_data);
320 OpSpringKs_dX(boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
321 &common_data_ptr,
323 const std::string field_name_1,
324 const std::string field_name_2)
326 field_name_1.c_str(), field_name_2.c_str(), OPROWCOL),
327 commonDataPtr(common_data_ptr), dAta(data) {
328 sYmm = false;
329 }
330 };
331
332 /**
333 * @brief Base class for LHS-operators (material) on side volumes
334 *
335 */
337
338 MatrixDouble NN;
339
340 boost::shared_ptr<DataAtIntegrationPtsSprings> dataAtSpringPts;
341
342 VectorInt rowIndices;
343 VectorInt colIndices;
344
348
351
353
354 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
355 EntityType col_type, EntData &row_data,
356 EntData &col_data);
357 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
360 }
361 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
362
363 /**
364 * @param field_name_1 String of material positions field name
365 * @param field_name_2 String of either master or material
366 * positions field name, depending of the implementation of the child class
367 * @param data_at_spring_pts Pointer to the common data for
368 * spring element
369 *
370 */
372 const string field_name_1, const string field_name_2,
373 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
374 : VolOnSideUserDataOperator(field_name_1, field_name_2,
376 dataAtSpringPts(data_at_spring_pts) {
377 sYmm = false; // This will make sure to loop over all entities
378 }
379 };
380
381 /**
382 * @brief LHS-operator (material configuration) on the side volume for spring
383 * element
384 *
385 * Computes the linearisation of the material component
386 * with respect to a variation of spatial coordinates on the side volume.
387 */
390
391 /**
392 * @brief Integrates over a face contribution from a side volume
393 *
394 * Computes linearisation of the material component
395 * with respect to a variation of spatial coordinates:
396 *
397 * \f[
398 * \textrm{D} f_s(\mathbf{x}, \mathbf{X}, \delta\mathbf{X})
399 * [\Delta\mathbf{x}] = \int\limits_{\partial \Omega }^{}
400 * \mathbf{F}^{\intercal}\cdot \left( -{{\delta \mathbf{x}^T} \cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes
401 * {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes
402 * {\mathbf N} \right) \right]\right ) \Delta {\mathbf x} \partial \Omega }
403 * -\int\limits_{\mathcal{T}_{\xi}}
404 * \left\{\left[
405 * \frac{\partial\Delta\mathbf{x}}{\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
406 * \right]^{\intercal}\cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes
407 * {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes
408 * {\mathbf N} \right) \right] \left( {\mathbf x} - {\mathbf X}
409 * \right)\right\} \cdot \delta\mathbf{X}\, \textrm{d}\xi\textrm{d}\eta \f]
410 *
411 *
412 * where \f$ \delta \mathbf{X} \f$ is variation of
413 * material positions, \f$ k_{\rm n} \f$ is the stiffness of the springs
414 * normal to the surface, \f$ k_{\rm t} \f$ is the stiffness of the springs
415 * tangential to the surface, \f$ {\mathbf N} \f$ is the normal to the
416 * surface vector based on material positions, \f$ {\mathbf x} \f$ is the
417 * vector of spatial positions or displacements of the surface with springs,
418 * \f$ {\mathbf X} \f$ is the vector of material positions,
419 * \f$\boldsymbol{\chi}\f$ are reference coordinated,
420 * \f$\mathbf{H}\f$ is the gradient of the material map.
421 *
422 *
423 */
424 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
425
427 const string field_name_1, const string field_name_2,
428 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
429 : SpringALEMaterialVolOnSideLhs(field_name_1, field_name_2,
430 data_at_spring_pts) {
431 sYmm = false; // This will make sure to loop over all entities
432 };
433 };
434
435 /**
436 * @brief Base class for LHS-operators for pressure element (material
437 * configuration)
438 *
439 * Linearisation of the material component with respect to
440 * spatial and material coordinates consists of three parts, computed
441 * by operators working on the face and on the side volume:
442 *
443 * \f[
444 * \textrm{D} \delta W^\text{material}_p(\mathbf{x}, \mathbf{X},
445 * \delta\mathbf{x})
446 * [\Delta\mathbf{x}, \Delta\mathbf{X}] = \textrm{D} \delta
447 * W^\text{(face)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
448 * [\Delta\mathbf{X}] + \textrm{D} \delta
449 * W^\text{(side volume)}_p(\mathbf{x}, \mathbf{X}, \delta\mathbf{x})
450 * [\Delta\mathbf{x}] + \textrm{D} \delta W^\text{(side volume)}_p
451 * (\mathbf{x}, \mathbf{X}, \delta\mathbf{x}) [\Delta\mathbf{X}]
452 * \f]
453 *
454 */
455
456 /**
457 * @brief LHS-operator (material configuration) on for spring element on faces
458 *
459 * This is base struct for integrating and assembling
460 * derivatives of virtual work of springs on material positions contributing
461 * to configurational changes
462 */
464
465 boost::shared_ptr<DataAtIntegrationPtsSprings> dataAtSpringPts;
466 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
467 std::string sideFeName;
468
469 MatrixDouble NN;
470 VectorInt rowIndices;
471 VectorInt colIndices;
472
476
479
481
482 virtual MoFEMErrorCode doWork(int row_side, int col_side,
483 EntityType row_type, EntityType col_type,
484 EntData &row_data, EntData &col_data) {
487 }
488
489 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
492 }
493
494 MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data);
495
497 const string field_name_1, const string field_name_2,
498 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts,
499 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
500 std::string &side_fe_name)
501 : FaceDataOperator(field_name_1, field_name_2,
503 dataAtSpringPts(data_at_spring_pts), sideFe(side_fe),
504 sideFeName(side_fe_name) {
505 sYmm = false; // This will make sure to loop over all entities
506 }
507 };
508
509 /**
510 * @brief LHS-operator for the pressure element (material configuration)
511 *
512 * Triggers loop over operators from the side volume
513 *
514 */
516
517 /*
518 * Triggers loop over operators from the side volume
519 *
520 */
521 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
522 EntityType col_type, EntData &row_data,
523 EntData &col_data);
524
526 const string field_name_1, const string field_name_2,
527 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_pts,
528 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
529 std::string &side_fe_name)
530 : OpSpringALEMaterialLhs(field_name_1, field_name_2, data_at_pts,
531 side_fe, side_fe_name) {
532 sYmm = false; // This will make sure to loop over all entities
533 };
534 };
535
536 /**
537 * @brief LHS-operator for the pressure element (material configuration)
538 *
539 * Computes linearisation of the material component with respect to
540 * material coordinates (also triggers a loop over operators
541 * from the side volume).
542 *
543 */
545
546 /**
547 * Integrates a contribution to the left-hand side and triggers a loop
548 * over side volume operators.
549 *
550 */
551 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
552 EntityType col_type, EntData &row_data,
553 EntData &col_data);
554
555 /**
556 * @brief Compute part of the left-hand side
557 *
558 * Computes the linearisation of the material component
559 * with respect to a variation of material coordinates
560 * \f$(\Delta\mathbf{X})\f$:
561 *
562 * \f[
563 * \textrm{D} f^{\textrm{(face)}}_s(\mathbf{x}, \mathbf{X},
564 * \delta\mathbf{X})
565 * [\Delta\mathbf{X}] = -\int\limits_{\mathcal{T}_{\xi}} \,
566 * 0.5 (k_{\rm n} - k_{\rm s}) \mathbf{F}^{\intercal}\cdot \left\{ \left[
567 * \frac{\partial\mathbf{X}}
568 * {\partial\xi} \cdot \left(\frac{\partial\Delta
569 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{X}\right)
570 * -\frac{\partial\mathbf{X}}
571 * {\partial\eta} \cdot \left(\frac{\partial\Delta
572 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{X}\right)\right] \otimes
573 * \dfrac{\mathbf{N}}{\|\mathbf{N}\|} + \dfrac{\mathbf{N}}{\|\mathbf{N}\|}
574 * \otimes \left[ \frac{\partial\mathbf{X}}
575 * {\partial\xi} \cdot \left(\frac{\partial\Delta
576 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{X}\right)
577 * -\frac{\partial\mathbf{X}}
578 * {\partial\eta} \cdot \left(\frac{\partial\Delta
579 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{X}\right)\right]
580 * - \dfrac{\mathbf{N} \otimes \mathbf{N}}{{\| \mathbf{N} \|}^3} \left[
581 * \frac{\partial\mathbf{X}}
582 * {\partial\xi} \cdot \left(\frac{\partial\Delta
583 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{X}\right)
584 * -\frac{\partial\mathbf{X}}
585 * {\partial\eta} \cdot \left(\frac{\partial\Delta
586 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{X}\right)\right] \mathbf{N}
587 * \right \}
588 * \textrm{d}\xi\textrm{d}\eta
589 * \\
590 * +\int\limits_{\mathcal{T}_{\xi}}
591 * 0.5 k_{\rm s} {\mathbf{F}^{\intercal}} \left[
592 * \frac{\partial\mathbf{X}}
593 * {\partial\xi} \cdot \left(\frac{\partial\Delta
594 * \mathbf{X}}{\partial\eta}\times\delta\mathbf{X}\right)
595 * -\frac{\partial\mathbf{X}}
596 * {\partial\eta} \cdot \left(\frac{\partial\Delta
597 * \mathbf{X}}{\partial\xi}\times \delta\mathbf{X}\right)\right]
598 * {\mathbf N}^{\intercal} \cdot {\mathbf I} ( {\mathbf x} - {\mathbf X} )
599 * \textrm{d}\xi\textrm{d}\eta
600 * -\int\limits_{\mathcal{T}_{\xi}}
601 * {{\delta
602 * \mathbf{X}^T} \cdot {\mathbf{F}^{\intercal}} \left[ k_{\rm n} \left(
603 * {\mathbf N} \otimes {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} -
604 * {\mathbf N} \otimes {\mathbf N} \right) \right] \Delta {\mathbf X} }
605 * \textrm{d}\xi\textrm{d}\eta
606 *
607 * \f]
608 *
609 */
610 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
611
613 const string field_name_1, const string field_name_2,
614 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts,
615 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
616 std::string &side_fe_name)
617 : OpSpringALEMaterialLhs(field_name_1, field_name_2, data_at_spring_pts,
618 side_fe, side_fe_name) {
619 sYmm = false; // This will make sure to loop over all entities
620 };
621 };
622
623 /**
624 * @brief LHS-operator (material configuration) on the side volume
625 *
626 * Computes the linearisation of the material component
627 * with respect to a variation of material coordinates on the side volume.
628 *
629 */
632
633 /**
634 * @brief Integrates over a face contribution from a side volume
635 *
636 * Computes linearisation of the material component
637 * with respect to a variation of material coordinates:
638 *
639 * \f[
640 * \textrm{D} f^\text{(side volume)}_s(\mathbf{x}, \mathbf{X},
641 * \delta\mathbf{X})
642 * [\Delta\mathbf{X}] = \int\limits_{\mathcal{T}_{\xi}}
643 * \left\{\left[
644 * \mathbf{h}\,\mathbf{H}^{-1}\,\frac{\partial\Delta\mathbf{X}}
645 * {\partial\boldsymbol{\chi}}\,\mathbf{H}^{-1}
646 * \right]^{\intercal}\cdot \left[ k_{\rm n} \left( {\mathbf N} \otimes
647 * {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} - {\mathbf N} \otimes
648 * {\mathbf N} \right) \right] \left( {\mathbf x} - {\mathbf X} \right)
649 * \right\} \cdot \delta\mathbf{X}\, \textrm{d}\xi\textrm{d}\eta \f]
650 *
651 * where \f$ \delta \mathbf{X} \f$ is variation of
652 * material position, \f$ k_{\rm n} \f$ is the stiffness of the springs
653 * normal to the surface, \f$ k_{\rm t} \f$ is the stiffness of the springs
654 * tangential to the surface, \f$ {\mathbf N} \f$ is the normal to the
655 * surface vector based on material positions, \f$ {\mathbf x} \f$ is the
656 * vector of spatial positions or displacements of the surface with springs,
657 * \f$ {\mathbf X} \f$ is the vector of material positions,
658 * \f$\mathbf{h}\f$ and \f$\mathbf{H}\f$ are the gradients of the
659 * spatial and material maps, respectively, and \f$\boldsymbol{\chi}\f$ are
660 * the reference coordinates.
661 *
662 *
663 */
664 MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data);
665
667 const string field_name_1, const string field_name_2,
668 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
669 : SpringALEMaterialVolOnSideLhs(field_name_1, field_name_2,
670 data_at_spring_pts) {
671 sYmm = false; // This will make sure to loop over all entities
672 };
673 };
674
675 /**
676 * @brief Operator for computing deformation gradients in side volumes
677 *
678 */
680 : public VolumeElementForcesAndSourcesCoreOnContactPrismSide::
682
683 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> commonDataPtr;
684
686
687 MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data);
688
690 const string field_name,
691 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
692 common_data_ptr,
693 bool ho_geometry = false)
694 : VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator(
696 commonDataPtr(common_data_ptr), hoGeometry(ho_geometry) {
697 doEdges = false;
698 doQuads = false;
699 doTris = false;
700 doTets = false;
701 doPrisms = false;
702 sYmm = false;
703 };
704 };
705
706 /**
707 * @brief RHS-operator for the spring boundary condition element for ALE
708 * formulation
709 *
710 * Integrates virtual
711 * work of springs on material positions involved in configurational changes
712 * and assembles components to RHS global vector.
713 *
714 */
717
718 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> dataAtPts;
719 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideFe;
720 std::string sideFeName;
721 Vec F;
724
725 VectorDouble nF;
726
727 VectorInt rowIndices;
728
729 int nbRows; ///< number of dofs on rows
730 int nbIntegrationPts; ///< number of integration points
731
732 MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data);
733
734 /**
735 * @brief Integrates and assembles to global RHS vector virtual work of
736 * springs on material positions for configurational changes for ALE
737 * formulation
738 *
739 * Computes virtual work of springs on material positions for
740 * configurational changes:
741 *
742 * \f[
743 * f_s ({\mathbf x}, {\mathbf X},
744 * \delta \mathbf{X}) = -\int\limits_{\partial \Omega }^{} {{\delta
745 * \mathbf{X}^T} \cdot {\mathbf{F}^{\intercal}} \left[ k_{\rm n} \left(
746 * {\mathbf N} \otimes {\mathbf N} \right) + k_{\rm t} \left( {\mathbf I} -
747 * {\mathbf N} \otimes {\mathbf N} \right) \right] \left( {\mathbf x} -
748 * {\mathbf X} \right) \partial \Omega } \f]
749 *
750 * where \f$ \delta \mathbf{X} \f$ is
751 * material position variation, \f$ k_{\rm n} \f$ is the stiffness of the
752 * springs normal to the surface, \f$ k_{\rm t} \f$ is the stiffness of the
753 * springs tangential to the surface, \f$ {\mathbf N} \f$ is the normal to
754 * the surface vector based on material positions, \f$ {\mathbf x} \f$ is
755 * the vector of spatial positions or displacements of the surface with
756 * springs, \f$ {\mathbf X} \f$ is the vector of material positions and
757 * finally \f$\mathbf{F}\f$ is the deformation gradient
758 *
759 *
760 * \f[
761 * \mathbf{F} = \mathbf{h}(\mathbf{x})\,\mathbf{H}(\mathbf{X})^{-1} =
762 * \frac{\partial\mathbf{x}}{\partial\boldsymbol{\chi}}
763 * \frac{\partial\boldsymbol{\chi}}{\partial\mathbf{X}}
764 * \f]
765 *
766 * where \f$\mathbf{h}\f$ and \f$\mathbf{H}\f$ are the gradients of the
767 * spatial and material maps, respectively, and \f$\boldsymbol{\chi}\f$ are
768 * the reference coordinates.
769 *
770 */
771 MoFEMErrorCode iNtegrate(EntData &row_data);
772 MoFEMErrorCode aSsemble(EntData &row_data);
773
774 /**
775 *
776 * @param material_field String of field name for
777 * material positions for rows
778 * @param data_at_pts Pointer to the common data for
779 * spring element
780 * @param side_fe Pointer to the volume finite elements
781 * adjacent to the spring face element
782 * @param side_fe_name String of 3D element adjacent to
783 * the present springs elements
784 * @param data Variable containing data for normal and
785 * tangential stiffnesses of springs attached to the current element
786 *
787 */
789 const string material_field,
790 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
791 data_at_pts,
792 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
793 std::string &side_fe_name, MetaSpringBC::BlockOptionDataSprings &data)
794 : UserDataOperator(material_field, UserDataOperator::OPROW),
795 dataAtPts(data_at_pts), sideFe(side_fe), sideFeName(side_fe_name),
796 dAta(data){};
797 };
798
799 /// \brief Computes, for material configuration, tangent vectors to face that
800 /// lie on a surface with springs
803
804 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
806 int ngp;
807 /**
808 *
809 * @param field_name String of field name for
810 * material positions for rows
811 * @param data_at_integration_pts Pointer to the common data for
812 * spring element
813 *
814 */
816 const string field_name,
817 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
821
822 /**
823 * @brief Evaluates the two tangent vector to the triangle on surface with
824 * springs based on material base coordinates
825 *
826 * Computes the two tangent vectors,\f$ {\mathbf T}^{(1)} \f$ and \f$
827 * {\mathbf T}^{(2)}\f$, based on material base coordinates based on mesh
828 * (moab vertices) coordinates:
829 *
830 * \f[
831 * {\mathbf T}^{(1)}({\mathbf X}(\xi, \eta)) =
832 * \frac{\partial\mathbf{X}(\xi,
833 * \eta)}{\partial\xi} \;\;\;\; {\mathbf T}^{(2)}({\mathbf X}(\xi, \eta)) =
834 * \frac{\partial \mathbf{X}(\xi, \eta)}
835 * {\partial\eta}
836 * \f]
837 *
838 * where \f${\mathbf X}(\xi, \eta)\f$ is the vector of material
839 * coordinates at the gauss point of surface with springs having parent
840 * coordinates \f$\xi\f$ and \f$\eta\f$ evaluated according to
841 *
842 * \f[
843 * {\mathbf X}(\xi, \eta) =
844 * \sum\limits^{3}_{i = 1}
845 * N_i(\xi, \eta){\overline{\mathbf X}}_i
846 * \f]
847 *
848 * where \f$ N_i \f$ is the shape function corresponding to the \f$
849 * i-{\rm{th}}\f$ degree of freedom in the material configuration
850 * \f${\overline{\mathbf X}}_i\f$ corresponding to the 3 nodes of the
851 * triangular face.
852 *
853 */
854
855 MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data);
856 };
857
858 /// \brief Computes, for material configuration, normal to face that lies
859 /// on a surface with springs
862
863 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
865 int ngp;
866
867 /**
868 *
869 * @param field_name String of field name for
870 * material positions for rows
871 * @param data_at_integration_pts Pointer to the common data for
872 * spring element
873 *
874 */
876 const string field_name,
877 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
878 data_at_integration_pts)
880 dataAtIntegrationPts(data_at_integration_pts) {}
881
882 /**
883 * @brief Evaluates normal vector to the triangle on surface with springs
884 * based on material base coordinates
885 *
886 * Computes normal vector based on material base coordinates based on mesh
887 * (moab vertices) coordinates:
888 *
889 * \f[
890 * {\mathbf N}({\mathbf X}(\xi, \eta)) =
891 * \frac{\partial\mathbf{X}(\xi,
892 * \eta)}{\partial\xi}\times\frac{\partial \mathbf{X}(\xi, \eta)}
893 * {\partial\eta}
894 * \f]
895 *
896 * where \f${\mathbf X}(\xi, \eta)\f$ is the vector of material
897 * coordinates at the gauss point of surface with springs having parent
898 * coordinates \f$\xi\f$ and \f$\eta\f$ evaluated according to
899 *
900 * \f[
901 * {\mathbf X}(\xi, \eta) =
902 * \sum\limits^{3}_{i = 1}
903 * N_i(\xi, \eta){\overline{\mathbf X}}_i
904 * \f]
905 *
906 * where \f$ N_i \f$ is the shape function corresponding to the \f$
907 * i-{\rm{th}}\f$ degree of freedom in the material configuration
908 * \f${\overline{\mathbf X}}_i\f$ corresponding to the 3 nodes of the
909 * triangular face.
910 *
911 */
912
913 MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data);
914 };
915
916 /**
917 * \brief Declare spring element
918 *
919 * Search cubit sidesets and blocksets with spring bc and declare surface
920 * element
921
922 * Blockset has to have name “SPRING_BC”. The first two attributes of the
923 * blockset are spring stiffness value.
924
925 *
926 * @param m_field Interface instance
927 * @param field_name Field name (e.g. SPATIAL_POSITION)
928 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
929 * @return Error code
930 */
931 static MoFEMErrorCode addSpringElements(
932 MoFEM::Interface &m_field, const std::string field_name,
933 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
934
935 /**
936 * \brief Declare spring element in ALE
937 *
938 * Search cubit sidesets and blocksets with spring bc and declare surface
939 * element
940
941 * Blockset has to have name “SPRING_BC”. The first two attributes of the
942 * blockset are spring stiffness value.
943
944 *
945 * @param m_field Interface instance
946 * @param field_name Field name (e.g. SPATIAL_POSITION)
947 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
948 * @return Error code
949 */
950 static MoFEMErrorCode
951 addSpringElementsALE(MoFEM::Interface &m_field, const std::string field_name,
952 const std::string mesh_nodals_positions,
953 Range &spring_triangles);
954
955 /**
956 * \brief Implementation of spring element. Set operators to calculate LHS and
957 * RHS
958 *
959 * @param m_field Interface instance
960 * @param fe_spring_lhs_ptr Pointer to the FE instance for LHS
961 * @param fe_spring_rhs_ptr Pointer to the FE instance for RHS
962 * @param field_name Field name (e.g. SPATIAL_POSITION)
963 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
964 * @return Error code
965 */
966 static MoFEMErrorCode setSpringOperators(
967 MoFEM::Interface &m_field,
968 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr,
969 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_rhs_ptr,
970 const std::string field_name,
971 const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS",
972 double stiffness_scale = 1.);
973
974 /**
975 * \brief Implementation of spring element. Set operators to calculate LHS and
976 * RHS
977 *
978 * @param m_field Interface instance
979 * @param fe_spring_lhs_ptr Pointer to the FE instance for LHS
980 * @param fe_spring_rhs_ptr Pointer to the FE instance for RHS
981 * @param field_name Field name (e.g. SPATIAL_POSITION)
982 * @param mesh_nodals_positions Name of field on which ho-geometry is defined
983 * @return Error code
984 */
985 static MoFEMErrorCode setSpringOperatorsMaterial(
986 MoFEM::Interface &m_field,
987 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr_dx,
988 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr_dX,
989 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_rhs_ptr,
990 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_integration_pts,
991 const std::string field_name, const std::string mesh_nodals_positions,
992 std::string side_fe_name);
993};
994
995#endif //__SPRINGELEMENT_HPP__
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
static PetscErrorCode ierr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ BLOCKSET
Definition: definitions.h:148
@ MOFEM_ATOM_TEST_INVALID
Definition: definitions.h:40
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
auto bit
set bit
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
constexpr auto field_name
boost::shared_ptr< MatrixDouble > xInitAtPts
boost::shared_ptr< MatrixDouble > gradDispPtr
std::map< int, BlockOptionDataSprings > mapSpring
boost::shared_ptr< MatrixDouble > xAtPts
boost::shared_ptr< MatrixDouble > invHMat
MoFEMErrorCode getBlockData(BlockOptionDataSprings &data)
boost::shared_ptr< MatrixDouble > hMat
boost::shared_ptr< MatrixDouble > FMat
DataAtIntegrationPtsSprings(MoFEM::Interface &m_field, double scale_stiffness=1.)
boost::shared_ptr< MatrixDouble > HMat
boost::shared_ptr< VectorDouble > detHVec
EntitiesFieldData::EntData * faceRowData
Operator for computing deformation gradients in side volumes.
MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data)
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataPtr
OpCalculateDeformation(const string field_name, boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > common_data_ptr, bool ho_geometry=false)
Computes, for material configuration, normal to face that lies on a surface with springs.
OpGetNormalSpEle(const string field_name, boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > data_at_integration_pts)
MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data)
Evaluates normal vector to the triangle on surface with springs based on material base coordinates.
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > dataAtIntegrationPts
Computes, for material configuration, tangent vectors to face that lie on a surface with springs.
OpGetTangentSpEle(const string field_name, boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > dataAtIntegrationPts)
MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data)
Evaluates the two tangent vector to the triangle on surface with springs based on material base coord...
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > dataAtIntegrationPts
LHS-operator for the pressure element (material configuration)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
OpSpringALEMaterialLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_spring_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name)
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, EntData &row_data, EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
OpSpringALEMaterialLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name)
Base class for LHS-operators for pressure element (material configuration)
boost::shared_ptr< DataAtIntegrationPtsSprings > dataAtSpringPts
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
OpSpringALEMaterialLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_spring_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name)
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
RHS-operator for the spring boundary condition element.
MetaSpringBC::BlockOptionDataSprings & dAta
OpSpringFs(boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > &common_data_ptr, MetaSpringBC::BlockOptionDataSprings &data, const std::string field_name)
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Integrates and assembles to global RHS vector virtual work of springs.
RHS-operator for the spring boundary condition element for ALE formulation.
int nbIntegrationPts
number of integration points
MoFEMErrorCode aSsemble(EntData &row_data)
MoFEMErrorCode doWork(int side, EntityType type, EntData &row_data)
Operator for linear form, usually to calculate values on right hand side.
MetaSpringBC::BlockOptionDataSprings & dAta
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideFe
int nbRows
number of dofs on rows
MoFEMErrorCode iNtegrate(EntData &row_data)
Integrates and assembles to global RHS vector virtual work of springs on material positions for confi...
OpSpringFsMaterial(const string material_field, boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > data_at_pts, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, std::string &side_fe_name, MetaSpringBC::BlockOptionDataSprings &data)
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > dataAtPts
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Compute part of the left-hand side.
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataPtr
MetaSpringBC::BlockOptionDataSprings & dAta
OpSpringKs_dX(boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > &common_data_ptr, MetaSpringBC::BlockOptionDataSprings &data, const std::string field_name_1, const std::string field_name_2)
LHS-operator for the springs element.
MetaSpringBC::BlockOptionDataSprings & dAta
OpSpringKs(boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > &common_data_ptr, MetaSpringBC::BlockOptionDataSprings &data, const std::string field_name)
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataPtr
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Integrates and assembles to global RHS vector virtual work of springs.
LHS-operator (material configuration) on the side volume.
SpringALEMaterialVolOnSideLhs_dX_dX(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_spring_pts)
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 for spring element.
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrates over a face contribution from a side volume.
SpringALEMaterialVolOnSideLhs_dX_dx(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_spring_pts)
Base class for LHS-operators (material) on side volumes.
SpringALEMaterialVolOnSideLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_spring_pts)
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
boost::shared_ptr< DataAtIntegrationPtsSprings > dataAtSpringPts
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
Set of functions declaring elements and setting operators to apply spring boundary condition.
static MoFEMErrorCode setSpringOperators(MoFEM::Interface &m_field, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_lhs_ptr, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_rhs_ptr, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS", double stiffness_scale=1.)
Implementation of spring element. Set operators to calculate LHS and RHS.
static MoFEMErrorCode addSpringElementsALE(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions, Range &spring_triangles)
Declare spring element in ALE.
static MoFEMErrorCode addSpringElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Declare spring element.
static MoFEMErrorCode setSpringOperatorsMaterial(MoFEM::Interface &m_field, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_lhs_ptr_dx, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_lhs_ptr_dX, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_rhs_ptr, boost::shared_ptr< DataAtIntegrationPtsSprings > data_at_integration_pts, const std::string field_name, const std::string mesh_nodals_positions, std::string side_fe_name)
Implementation of spring element. Set operators to calculate LHS and RHS.
virtual moab::Interface & get_moab()=0
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