v0.15.0
Loading...
Searching...
No Matches
EdgeFlippingOps.hpp
Go to the documentation of this file.
1
2
3/** \file EdgeFlippingOps.hpp
4 * \example EdgeFlippingOps.hpp
5 */
6
7namespace EdgeFlippingOps {
8
9template <int DIM, IntegrationType I, typename AssemblyDomainEleOp>
11template <int DIM, IntegrationType I>
14
15/**
16 * @brief Filter for scalar fields
17 *
18 */
19template <AssemblyType A, IntegrationType I>
21
23 const std::string field_name, boost::shared_ptr<VectorDouble> old_sol_ptr,
24 boost::shared_ptr<VectorDouble> dot_new_sol_ptr,
25 boost::shared_ptr<VectorDouble> new_sol_ptr,
26 boost::shared_ptr<MatrixDouble> grad_new_sol_ptr,
27 ScalarFun scalar_function = [](double, double,
28 double) constexpr { return 1; })
30 oldSolPtr(old_sol_ptr), dotNewSolPtr(dot_new_sol_ptr),
31 newSolPtr(new_sol_ptr), gradNewSolPtr(grad_new_sol_ptr),
32 scalarFunction(scalar_function) {}
33
34 MoFEMErrorCode doWork(EntitiesFieldData::EntData &data) {
36
37 const double vol = getMeasure();
38 auto t_w = getFTensor0IntegrationWeight();
39 auto t_coords = getFTensor1CoordsAtGaussPts();
40 auto t_base = data.getFTensor0N();
41 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
42
43#ifndef NDEBUG
44 if (data.getDiffN().size1() != data.getN().size1())
45 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
46 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
47 MOFEM_LOG("SELF", Sev::error)
48 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
49 MOFEM_LOG("SELF", Sev::error) << data.getN();
50 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
51 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
52 }
53#endif
54
55 auto t_old_sol = getFTensor0FromVec(*oldSolPtr);
56 auto t_new_sol = getFTensor0FromVec(*newSolPtr);
57
58 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
59
60 const double alpha =
61 t_w * scalarFunction(t_coords(0), t_coords(1), t_coords(2));
62
63 int bb = 0;
64 for (; bb != nbRows; ++bb) {
65 t_old_sol += alpha * t_old_sol;
66
67 if (t_w > 0.0)
68 continue;
69 if (t_w > 0.0 && t_old_sol < fabs(1e-12))
70 continue;
71 if (t_w < fabs(1e-12))
72 continue;
73 ++t_base;
74 ++t_diff_base;
75 }
76
77 for (; bb < nbRowBaseFunctions; ++bb) {
78 ++t_base;
79 ++t_diff_base;
80 }
81
82 ++t_old_sol;
83 ++t_new_sol;
84
85 ++t_coords;
86 ++t_w;
87 }
88
90 }
91
92private:
93 ScalarFun scalarFunction;
94 boost::shared_ptr<VectorDouble> dotNewSolPtr;
95 boost::shared_ptr<VectorDouble> newSolPtr;
96 boost::shared_ptr<MatrixDouble> gradNewSolPtr;
97 boost::shared_ptr<VectorDouble> oldSolPtr;
98};
99
100/**
101 * @brief Rhs for mapping scalar fields with least squares
102 *
103 */
104template <AssemblyType A, IntegrationType I, int DIM>
106
108 const std::string field_name, boost::shared_ptr<VectorDouble> old_sol_ptr,
109 boost::shared_ptr<VectorDouble> dot_new_sol_ptr,
110 boost::shared_ptr<VectorDouble> new_sol_ptr,
111 boost::shared_ptr<MatrixDouble> grad_new_sol_ptr,
112 MoFEM::Interface &m_field,
113 ScalarFun scalar_function = [](double, double,
114 double) constexpr { return 1; })
116 oldSolPtr(old_sol_ptr), dotNewSolPtr(dot_new_sol_ptr),
117 newSolPtr(new_sol_ptr), gradNewSolPtr(grad_new_sol_ptr),
118 mField(m_field), scalarFunction(scalar_function) {}
119
120 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data) {
122
123 const double vol = getMeasure();
124 auto t_w = getFTensor0IntegrationWeight();
125 auto t_coords = getFTensor1CoordsAtGaussPts();
126 auto t_base = data.getFTensor0N();
127 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
128
129#ifndef NDEBUG
130 if (data.getDiffN().size1() != data.getN().size1())
131 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
132 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
133 MOFEM_LOG("SELF", Sev::error)
134 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
135 MOFEM_LOG("SELF", Sev::error) << data.getN();
136 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
137 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
138 }
139#endif
140
141 auto t_old_sol = getFTensor0FromVec(*oldSolPtr);
142 auto t_new_sol = getFTensor0FromVec(*newSolPtr);
143
144 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
145
146 const double alpha =
147 t_w * vol * scalarFunction(t_coords(0), t_coords(1), t_coords(2));
148
149 int bb = 0;
150 for (; bb != nbRows; ++bb) {
151 locF[bb] += (t_base * alpha) * (t_old_sol);
152 ++t_base;
153 ++t_diff_base;
154 }
155
156 for (; bb < nbRowBaseFunctions; ++bb) {
157 ++t_base;
158 ++t_diff_base;
159 }
160
161 ++t_old_sol;
162 ++t_new_sol;
163
164 ++t_coords;
165 ++t_w;
166 }
167
169 }
170
171private:
172 ScalarFun scalarFunction;
173 boost::shared_ptr<VectorDouble> dotNewSolPtr;
174 boost::shared_ptr<VectorDouble> newSolPtr;
175 boost::shared_ptr<MatrixDouble> gradNewSolPtr;
176 boost::shared_ptr<VectorDouble> oldSolPtr;
178};
179
180/**
181 * @brief Rhs for mapping vector fields with a scalar basis with least squares
182 *
183 */
184template <AssemblyType A, IntegrationType I, int DIM>
186
188 const std::string field_name, boost::shared_ptr<MatrixDouble> old_sol_ptr,
189 boost::shared_ptr<MatrixDouble> dot_new_sol_ptr,
190 boost::shared_ptr<MatrixDouble> new_sol_ptr,
191 boost::shared_ptr<MatrixDouble> grad_new_sol_ptr,
192 MoFEM::Interface &m_field,
193 ScalarFun scalar_function = [](double, double,
194 double) constexpr { return 1; })
196 oldSolPtr(old_sol_ptr), dotNewSolPtr(dot_new_sol_ptr),
197 newSolPtr(new_sol_ptr), gradNewSolPtr(grad_new_sol_ptr),
198 mField(m_field), scalarFunction(scalar_function) {}
199
200 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data) {
202
203 FTENSOR_INDEX(DIM, i);
204
205 const double vol = getMeasure();
206 auto t_w = getFTensor0IntegrationWeight();
207 auto t_coords = getFTensor1CoordsAtGaussPts();
208 auto t_base = data.getFTensor0N();
209 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
210
211#ifndef NDEBUG
212 if (data.getDiffN().size1() != data.getN().size1())
213 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
214 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
215 MOFEM_LOG("SELF", Sev::error)
216 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
217 MOFEM_LOG("SELF", Sev::error) << data.getN();
218 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
219 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
220 }
221#endif
222
223 auto t_old_sol = getFTensor1FromMat<SPACE_DIM>(*oldSolPtr);
224 auto t_new_sol = getFTensor1FromMat<SPACE_DIM>(*newSolPtr);
225
226 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
227
228 const double alpha =
229 t_w * vol * scalarFunction(t_coords(0), t_coords(1), t_coords(2));
230
231 auto t_nf = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(locF);
232
233 int bb = 0;
234 for (; bb != nbRows / SPACE_DIM; ++bb) {
235 t_nf(i) += (t_base * alpha) * (t_old_sol(i));
236 ++t_base;
237 ++t_diff_base;
238 ++t_nf;
239 }
240
241 for (; bb < nbRowBaseFunctions; ++bb) {
242 ++t_base;
243 ++t_diff_base;
244 }
245
246 ++t_old_sol;
247 ++t_new_sol;
248
249 ++t_coords;
250 ++t_w;
251 }
252
254 }
255
256private:
257 ScalarFun scalarFunction;
258 boost::shared_ptr<MatrixDouble> dotNewSolPtr;
259 boost::shared_ptr<MatrixDouble> newSolPtr;
260 boost::shared_ptr<MatrixDouble> gradNewSolPtr;
261 boost::shared_ptr<MatrixDouble> oldSolPtr;
263};
264
265/**
266 * @brief Rhs for mapping symmetric tensor fields with least squares
267 *
268 */
269template <AssemblyType A, IntegrationType I, int DIM>
271
273 const std::string field_name, boost::shared_ptr<MatrixDouble> old_sol_ptr,
274 boost::shared_ptr<MatrixDouble> dot_new_sol_ptr,
275 boost::shared_ptr<MatrixDouble> new_sol_ptr,
276 boost::shared_ptr<MatrixDouble> grad_new_sol_ptr,
277 MoFEM::Interface &m_field,
278 ScalarFun scalar_function = [](double, double,
279 double) constexpr { return 1; })
281 oldSolPtr(old_sol_ptr), dotNewSolPtr(dot_new_sol_ptr),
282 newSolPtr(new_sol_ptr), gradNewSolPtr(grad_new_sol_ptr),
283 mField(m_field), scalarFunction(scalar_function) {}
284
285 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data) {
287
288 FTENSOR_INDEX(DIM, i);
289 FTENSOR_INDEX(DIM, j);
290 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
292
293 const double vol = getMeasure();
294 auto t_w = getFTensor0IntegrationWeight();
295 auto t_coords = getFTensor1CoordsAtGaussPts();
296 auto t_base = data.getFTensor0N();
297 auto t_diff_base = data.getFTensor1DiffN<DIM>();
298
299#ifndef NDEBUG
300 if (data.getDiffN().size1() != data.getN().size1())
301 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
302 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
303 MOFEM_LOG("SELF", Sev::error)
304 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
305 MOFEM_LOG("SELF", Sev::error) << data.getN();
306 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
307 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
308 }
309#endif
310
312 auto &nf = AssemblyDomainEleOp::locF;
313
314 auto t_old_sol = getFTensor2SymmetricFromMat<DIM>(*oldSolPtr);
315 auto t_new_sol = getFTensor2SymmetricFromMat<DIM>(*newSolPtr);
316
317 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
318
319 const double alpha =
320 t_w * vol * scalarFunction(t_coords(0), t_coords(1), t_coords(2));
321
323 t_old_sol_L(L) = alpha * t_old_sol(i, j) * t_L(i, j, L);
324
325 auto t_nf = getFTensor1FromArray<size_symm, size_symm>(nf);
326 int bb = 0;
327 for (; bb != AssemblyDomainEleOp::nbRows / size_symm; ++bb) {
328 t_nf(L) += t_base * (t_old_sol_L(L));
329 ++t_base;
330 ++t_diff_base;
331 ++t_nf;
332 }
333
334 for (; bb < nbRowBaseFunctions; ++bb) {
335 ++t_base;
336 ++t_diff_base;
337 }
338
339 ++t_old_sol;
340 ++t_new_sol;
341
342 ++t_coords;
343 ++t_w;
344 }
345
347 }
348
349private:
350 ScalarFun scalarFunction;
351 boost::shared_ptr<MatrixDouble> dotNewSolPtr;
352 boost::shared_ptr<MatrixDouble> newSolPtr;
353 boost::shared_ptr<MatrixDouble> gradNewSolPtr;
354 boost::shared_ptr<MatrixDouble> oldSolPtr;
356};
357
358template <int DIM, typename AssemblyDomainEleOp>
360 : public AssemblyDomainEleOp {
361 OpLhsSymTensorLeastSquaresProjImpl(const std::string row_field_name,
362 const std::string col_field_name);
363 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data,
364 EntitiesFieldData::EntData &col_data);
365
366private:
367};
368
369template <int DIM, typename AssemblyDomainEleOp>
371 OpLhsSymTensorLeastSquaresProjImpl(const std::string row_field_name,
372 const std::string col_field_name)
373 : AssemblyDomainEleOp(row_field_name, col_field_name,
374 AssemblyDomainEleOp::OPROWCOL) {
375 AssemblyDomainEleOp::sYmm = false;
376}
377
378template <int DIM, typename AssemblyDomainEleOp>
379MoFEMErrorCode
381 EntitiesFieldData::EntData &row_data,
382 EntitiesFieldData::EntData &col_data) {
384
385 FTENSOR_INDEX(DIM, i);
386 FTENSOR_INDEX(DIM, j);
387 FTENSOR_INDEX(DIM, k);
388 FTENSOR_INDEX(DIM, l);
389 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
392
393 auto &locMat = AssemblyDomainEleOp::locMat;
394
395 const auto nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
396 const auto nb_row_base_functions = row_data.getN().size2();
397
399
400 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
401 auto t_row_base = row_data.getFTensor0N();
402 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
403 double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
404 ++t_w;
405
407 t_res_mat(O, L) = alpha * (t_L(i, j, O) * t_L(i, j, L));
408
409 size_t rr = 0;
410 for (; rr != AssemblyDomainEleOp::nbRows / size_symm; ++rr) {
412 rr, locMat, FTensor::Number<SPACE_DIM>());
413 auto t_col_base = col_data.getFTensor0N(gg, 0);
414 for (size_t cc = 0; cc != AssemblyDomainEleOp::nbCols / size_symm; ++cc) {
415 t_mat(O, L) += ((t_row_base * t_col_base) * t_res_mat(O, L));
416 ++t_mat;
417 ++t_col_base;
418 }
419
420 ++t_row_base;
421 }
422
423 for (; rr < nb_row_base_functions; ++rr)
424 ++t_row_base;
425 }
426
428}
429
430/**
431 * @brief Rhs for mapping vector fields with an Hdiv basis with least squares
432 *
433 */
434template <AssemblyType A, IntegrationType I, int DIM>
436
438 const std::string field_name, boost::shared_ptr<MatrixDouble> old_sol_ptr,
439 boost::shared_ptr<MatrixDouble> dot_new_sol_ptr,
440 boost::shared_ptr<MatrixDouble> new_sol_ptr,
441 boost::shared_ptr<MatrixDouble> grad_new_sol_ptr,
442 ScalarFun resistance_function, MoFEM::Interface &m_field,
443 ScalarFun scalar_function = [](double, double,
444 double) constexpr { return 1; })
446 oldSolPtr(old_sol_ptr), dotNewSolPtr(dot_new_sol_ptr),
447 newSolPtr(new_sol_ptr), gradNewSolPtr(grad_new_sol_ptr),
448 resistanceFunction(resistance_function), mField(m_field),
449 scalarFunction(scalar_function) {}
450
451 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data) {
453
454 FTENSOR_INDEX(DIM, i);
455
456 const double vol = getMeasure();
457 auto t_w = getFTensor0IntegrationWeight();
458 auto t_coords = getFTensor1CoordsAtGaussPts();
459 auto t_base = data.getFTensor1N<3>();
460 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
461
462#ifndef NDEBUG
463 if (data.getDiffN().size1() != data.getN().size1())
464 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
465 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
466 MOFEM_LOG("SELF", Sev::error)
467 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
468 MOFEM_LOG("SELF", Sev::error) << data.getN();
469 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
470 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
471 }
472#endif
473
474 auto t_old_sol = getFTensor1FromMat<SPACE_DIM>(*oldSolPtr);
475 auto t_new_sol = getFTensor1FromMat<SPACE_DIM>(*newSolPtr);
476
477 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
478
479 const double alpha =
480 t_w * vol * scalarFunction(t_coords(0), t_coords(1), t_coords(2));
481
482 int bb = 0;
483 for (; bb != nbRows; ++bb) {
484 locF[bb] += (t_base(i) * alpha) *
485 resistanceFunction(t_coords(0), t_coords(1), t_coords(2)) *
486 (t_old_sol(i));
487 ++t_base;
488 ++t_diff_base;
489 }
490
491 for (; bb < nbRowBaseFunctions; ++bb) {
492 ++t_base;
493 ++t_diff_base;
494 }
495
496 ++t_old_sol;
497 ++t_new_sol;
498
499 ++t_coords;
500 ++t_w;
501 }
502
504 }
505
506private:
507 ScalarFun scalarFunction;
508 boost::shared_ptr<MatrixDouble> dotNewSolPtr;
509 boost::shared_ptr<MatrixDouble> newSolPtr;
510 boost::shared_ptr<MatrixDouble> gradNewSolPtr;
511 boost::shared_ptr<MatrixDouble> oldSolPtr;
514};
515
516/**
517 * @brief Rhs for testing EP mapping with initial conditions
518 *
519 */
520template <AssemblyType A, IntegrationType I, int DIM>
522
523 OpRhsSetInitEP(const std::string field_name,
524 boost::shared_ptr<MatrixDouble> dot_EP_ptr,
525 boost::shared_ptr<MatrixDouble> EP_ptr,
526 boost::shared_ptr<MatrixDouble> grad_EP_ptr,
527 boost::shared_ptr<double> initial_EP_ptr,
528 boost::shared_ptr<double> peak_EP_ptr)
530 dotEPPtr(dot_EP_ptr), EPPtr(EP_ptr), gradEPPtr(grad_EP_ptr),
531 initialEPPtr(initial_EP_ptr), peakEPPtr(peak_EP_ptr) {}
532
533 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data) {
535
536 FTENSOR_INDEX(DIM, i);
537 FTENSOR_INDEX(DIM, j);
538 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
540
541 const double vol = getMeasure();
542 auto t_w = getFTensor0IntegrationWeight();
543 auto t_coords = getFTensor1CoordsAtGaussPts();
544 auto t_base = data.getFTensor0N();
545 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
546
547#ifndef NDEBUG
548 if (data.getDiffN().size1() != data.getN().size1())
549 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
550 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
551 MOFEM_LOG("SELF", Sev::error)
552 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
553 MOFEM_LOG("SELF", Sev::error) << data.getN();
554 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
555 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
556 }
557#endif
558
559 auto t_EP = getFTensor2SymmetricFromMat<SPACE_DIM>(*EPPtr);
560 // auto t_grad_temp = getFTensor1FromMat<SPACE_DIM>(*gradTPtr);
561
562 const double alpha = t_w * vol;
563
565
567 auto &nf = AssemblyDomainEleOp::locF;
568
569 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
570
571 t_set_EP(0, 0) = init_T(*initialEPPtr, *peakEPPtr, t_coords(0),
572 t_coords(1), t_coords(2));
573 t_set_EP(1, 1) = t_set_EP(0, 0) - 0.01;
574 t_set_EP(0, 1) = t_set_EP(0, 0) - 0.02;
575
576 // if (DIM == 3) {
577 // t_set_EP(2, 2) = t_set_EP(0, 0) - 3.0;
578 // t_set_EP(0, 2) = t_set_EP(0, 0) - 4.0;
579 // t_set_EP(1, 2) = t_set_EP(0, 0) - 5.0;
580 // }
581
582 const double alpha = t_w * vol;
583
585 t_set_EP_L(L) = alpha * t_set_EP(i, j) * t_L(i, j, L);
586
587 auto t_nf = getFTensor1FromArray<size_symm, size_symm>(nf);
588 int bb = 0;
589 for (; bb != AssemblyDomainEleOp::nbRows / size_symm; ++bb) {
590 t_nf(L) -= t_base * (t_set_EP_L(L));
591 ++t_base;
592 ++t_diff_base;
593 ++t_nf;
594 }
595
596 for (; bb < nbRowBaseFunctions; ++bb) {
597 ++t_base;
598 ++t_diff_base;
599 }
600
601 ++t_EP;
602 // ++t_grad_g;
603
604 ++t_coords;
605 ++t_w;
606 }
607
609 }
610
611private:
612 boost::shared_ptr<MatrixDouble> dotEPPtr;
613 boost::shared_ptr<MatrixDouble> EPPtr;
614 boost::shared_ptr<MatrixDouble> gradEPPtr;
615 boost::shared_ptr<MatrixDouble> gradQPtr;
616 boost::shared_ptr<double> initialEPPtr;
617 boost::shared_ptr<double> peakEPPtr;
618};
619
620} // namespace EdgeFlippingOps
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto get_mat_tensor_sym_dtensor_sym(size_t rr, MatrixDouble &mat, FTensor::Number< 2 >)
auto symm_L_tensor(FTensor::Number< DIM >)
constexpr auto field_name
Rhs for mapping vector fields with a scalar basis with least squares.
boost::shared_ptr< MatrixDouble > gradNewSolPtr
boost::shared_ptr< MatrixDouble > oldSolPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
OpRhsH1VectorLeastSquaresProj(const std::string field_name, boost::shared_ptr< MatrixDouble > old_sol_ptr, boost::shared_ptr< MatrixDouble > dot_new_sol_ptr, boost::shared_ptr< MatrixDouble > new_sol_ptr, boost::shared_ptr< MatrixDouble > grad_new_sol_ptr, MoFEM::Interface &m_field, ScalarFun scalar_function=[](double, double, double) constexpr { return 1;})
boost::shared_ptr< MatrixDouble > newSolPtr
boost::shared_ptr< MatrixDouble > dotNewSolPtr
Rhs for mapping vector fields with an Hdiv basis with least squares.
OpRhsHdivLeastSquaresProj(const std::string field_name, boost::shared_ptr< MatrixDouble > old_sol_ptr, boost::shared_ptr< MatrixDouble > dot_new_sol_ptr, boost::shared_ptr< MatrixDouble > new_sol_ptr, boost::shared_ptr< MatrixDouble > grad_new_sol_ptr, ScalarFun resistance_function, MoFEM::Interface &m_field, ScalarFun scalar_function=[](double, double, double) constexpr { return 1;})
boost::shared_ptr< MatrixDouble > dotNewSolPtr
boost::shared_ptr< MatrixDouble > newSolPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< MatrixDouble > gradNewSolPtr
boost::shared_ptr< MatrixDouble > oldSolPtr
Rhs for mapping scalar fields with least squares.
boost::shared_ptr< MatrixDouble > gradNewSolPtr
boost::shared_ptr< VectorDouble > newSolPtr
boost::shared_ptr< VectorDouble > oldSolPtr
boost::shared_ptr< VectorDouble > dotNewSolPtr
OpRhsScalarLeastSquaresProj(const std::string field_name, boost::shared_ptr< VectorDouble > old_sol_ptr, boost::shared_ptr< VectorDouble > dot_new_sol_ptr, boost::shared_ptr< VectorDouble > new_sol_ptr, boost::shared_ptr< MatrixDouble > grad_new_sol_ptr, MoFEM::Interface &m_field, ScalarFun scalar_function=[](double, double, double) constexpr { return 1;})
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
Rhs for testing EP mapping with initial conditions.
boost::shared_ptr< double > peakEPPtr
boost::shared_ptr< double > initialEPPtr
boost::shared_ptr< MatrixDouble > EPPtr
boost::shared_ptr< MatrixDouble > gradEPPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< MatrixDouble > gradQPtr
boost::shared_ptr< MatrixDouble > dotEPPtr
OpRhsSetInitEP(const std::string field_name, boost::shared_ptr< MatrixDouble > dot_EP_ptr, boost::shared_ptr< MatrixDouble > EP_ptr, boost::shared_ptr< MatrixDouble > grad_EP_ptr, boost::shared_ptr< double > initial_EP_ptr, boost::shared_ptr< double > peak_EP_ptr)
Rhs for mapping symmetric tensor fields with least squares.
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< MatrixDouble > oldSolPtr
boost::shared_ptr< MatrixDouble > newSolPtr
boost::shared_ptr< MatrixDouble > gradNewSolPtr
boost::shared_ptr< MatrixDouble > dotNewSolPtr
OpRhsSymTensorLeastSquaresProj(const std::string field_name, boost::shared_ptr< MatrixDouble > old_sol_ptr, boost::shared_ptr< MatrixDouble > dot_new_sol_ptr, boost::shared_ptr< MatrixDouble > new_sol_ptr, boost::shared_ptr< MatrixDouble > grad_new_sol_ptr, MoFEM::Interface &m_field, ScalarFun scalar_function=[](double, double, double) constexpr { return 1;})
boost::shared_ptr< VectorDouble > dotNewSolPtr
MoFEMErrorCode doWork(EntitiesFieldData::EntData &data)
filterScalarSolution(const std::string field_name, boost::shared_ptr< VectorDouble > old_sol_ptr, boost::shared_ptr< VectorDouble > dot_new_sol_ptr, boost::shared_ptr< VectorDouble > new_sol_ptr, boost::shared_ptr< MatrixDouble > grad_new_sol_ptr, ScalarFun scalar_function=[](double, double, double) constexpr { return 1;})
boost::shared_ptr< VectorDouble > newSolPtr
boost::shared_ptr< MatrixDouble > gradNewSolPtr
boost::shared_ptr< VectorDouble > oldSolPtr
Deprecated interface functions.
auto init_T
Initialisation function for temperature field.
constexpr auto size_symm
Definition plastic.cpp:42