v0.16.0
Loading...
Searching...
No Matches
LinearFormsIntegratorsImpl.hpp
Go to the documentation of this file.
1/** \file LinearFormsIntegratorsImpl.hpp
2 * \brief Linear forms integrators (implementation)
3 * \ingroup mofem_form
4
5*/
6
7#ifndef __LINEAR_FORMS_INTEGRATORS_IMPL_HPP__
8#define __LINEAR_FORMS_INTEGRATORS_IMPL_HPP__
9
10namespace MoFEM {
11
13 template <typename OpBase> struct S { S() = delete; };
15};
16
18 template <typename OpBase> struct S { S() = delete; };
20};
21
22template <int BASE_DIM, int FIELD_DIM, IntegrationType I, typename OpBase>
24
25/**
26 * @brief Integrate source
27 *
28 * @tparam OpBase
29 */
30template <typename OpBase>
32 : public OpBase {
33
34 /**
35 * @brief Construct a new Op Source Impl object
36 *
37 * @param field_name
38 * @param source_fun
39 * @param ents_ptr
40 */
41 OpSourceImpl(const std::string field_name, ScalarFun source_fun,
42 boost::shared_ptr<Range> ents_ptr = nullptr)
43 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
44 sourceFun(source_fun) {}
45
46 /**
47 * @brief Construct a new Op Source Impl object
48 *
49 * @param field_name
50 * @param time_fun
51 * @param source_fun
52 * @param ents_ptr
53 */
54 OpSourceImpl(const std::string field_name, TimeFun time_fun,
55 ScalarFun source_fun,
56 boost::shared_ptr<Range> ents_ptr = nullptr)
57 : OpBase(field_name, field_name, OpBase::OPROW, time_fun, ents_ptr),
58 sourceFun(source_fun) {}
59
60protected:
63};
64
65template <int FIELD_DIM, typename OpBase>
67 SourceFunctionSpecialization::S<OpBase>> : public OpBase {
68
69 /**
70 * @brief Construct a new Op Source Impl object
71 *
72 * @param field_name
73 * @param time_fun
74 * @param source_fun
75 * @param ents_ptr
76 */
77 OpSourceImpl(const std::string field_name, TimeFun time_fun,
78 VectorFun<FIELD_DIM> source_fun,
79 boost::shared_ptr<Range> ents_ptr = nullptr)
80 : OpBase(field_name, field_name, OpBase::OPROW, time_fun, ents_ptr),
81 sourceFun(source_fun) {}
82
83 /**
84 * @brief Construct a new Op Source Impl object
85 *
86 * @param field_name
87 * @param source_fun
88 * @param ents_ptr
89 */
90 OpSourceImpl(const std::string field_name, VectorFun<FIELD_DIM> source_fun,
91 boost::shared_ptr<Range> ents_ptr = nullptr)
92 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
93 sourceFun(source_fun) {}
94
95protected:
98};
99
100template <int FIELD_DIM, typename OpBase>
102 SourceFunctionSpecialization::S<OpBase>> : public OpBase {
103
104 OpSourceImpl(const std::string field_name, TimeFun time_fun,
105 VectorFun<FIELD_DIM> source_fun,
106 boost::shared_ptr<Range> ents_ptr = nullptr)
107 : OpBase(field_name, field_name, OpBase::OPROW, time_fun, ents_ptr),
108 sourceFun(source_fun) {}
109
110 OpSourceImpl(const std::string field_name, VectorFun<FIELD_DIM> source_fun,
111 boost::shared_ptr<Range> ents_ptr = nullptr)
112 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
113 sourceFun(source_fun) {}
114
115protected:
118};
119
120template <int BASE_DIM, int S, IntegrationType I, typename OpBase>
122
123template <int S, typename OpBase>
124struct OpBaseTimesScalarImpl<1, S, GAUSS, OpBase> : public OpBase {
125
127 const std::string field_name, boost::shared_ptr<VectorDouble> vec,
128 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
129 boost::shared_ptr<Range> ents_ptr = nullptr)
130 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr), sourceVec(vec),
131 betaCoeff(beta_coeff) {}
132
133protected:
135 boost::shared_ptr<VectorDouble> sourceVec;
137};
138
139template <int BASE_DIM, int FIELD_DIM, int S, IntegrationType I,
140 typename OpBase>
142
143template <int FIELD_DIM, int S, typename OpBase>
145
147 const std::string field_name, boost::shared_ptr<MatrixDouble> vec,
148 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
149 boost::shared_ptr<Range> ents_ptr = nullptr)
150 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr), sourceVec(vec),
151 betaCoeff(beta_coeff) {}
152
153protected:
154 using OpBase::OpBase;
155
157 boost::shared_ptr<MatrixDouble> sourceVec;
164};
165
166template <int FIELD_DIM, int S, typename OpBase>
168
170 const std::string field_name, boost::shared_ptr<MatrixDouble> vec,
171 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
172 boost::shared_ptr<Range> ents_ptr = nullptr)
173 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr), sourceVec(vec),
174 betaCoeff(beta_coeff) {}
175
176protected:
178 boost::shared_ptr<MatrixDouble> sourceVec;
181};
182
183template <int BASE_DIM, int FIELD_DIM, int SPACE_DIM, int S, IntegrationType I,
184 typename OpBase>
186
187template <int SPACE_DIM, int S, typename OpBase>
189 : public OpBase {
190
191 FTensor::Index<'i', SPACE_DIM> i; ///< summit Index
192
194 const std::string field_name, boost::shared_ptr<MatrixDouble> mat_vals,
195 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
196 boost::shared_ptr<Range> ents_ptr = nullptr)
197 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
198 matVals(mat_vals), betaCoeff(beta_coeff) {}
199
200protected:
201 boost::shared_ptr<MatrixDouble> matVals;
204};
205
206template <int SPACE_DIM, int S, typename OpBase>
208 : public OpBase {
209
210 FTensor::Index<'i', SPACE_DIM> i; ///< summit Index
211 FTensor::Index<'j', SPACE_DIM> j; ///< summit Index
212
214 const std::string field_name, boost::shared_ptr<MatrixDouble> mat_vals,
215 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
216 boost::shared_ptr<Range> ents_ptr = nullptr)
217 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
218 matVals(mat_vals), betaCoeff(beta_coeff) {}
219
220protected:
221 boost::shared_ptr<MatrixDouble> matVals;
224};
225
226template <int BASE_DIM, int FIELD_DIM, int SPACE_DIM, int S, IntegrationType I,
227 typename OpBase>
229
230template <int SPACE_DIM, int S, typename OpBase>
232 : public OpBase {
233
235 const std::string field_name, boost::shared_ptr<MatrixDouble> mat_vals,
236 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; })
237 : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals),
238 betaCoeff(beta_coeff) {}
239
240protected:
241 boost::shared_ptr<MatrixDouble> matVals;
246};
247
248template <int BASE_DIM, int FIELD_DIM, int SPACE_DIM, IntegrationType I,
249 typename OpBase, CoordinateTypes CoordSys>
251
252template <int FIELD_DIM, int SPACE_DIM, typename OpBase,
253 CoordinateTypes CoordSys>
255 : public OpBase {
257 const std::string field_name, boost::shared_ptr<MatrixDouble> mat_vals,
258 ScalarFun beta = [](double, double, double) { return 1; },
259 boost::shared_ptr<Range> ents_ptr = nullptr)
260 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
261 matVals(mat_vals), betaConst(beta) {}
262
263protected:
265 boost::shared_ptr<MatrixDouble> matVals;
269};
270
271template <int SPACE_DIM, typename OpBase, CoordinateTypes CoordSys>
272struct OpMixDivTimesUImpl<3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys>
273 : public OpBase {
275 const std::string field_name, boost::shared_ptr<VectorDouble> vec_vals,
276 ScalarFun beta = [](double, double, double) constexpr { return 1; },
277 boost::shared_ptr<Range> ents_ptr = nullptr)
278 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
279 vecVals(vec_vals), betaConst(beta) {}
280
281protected:
283 boost::shared_ptr<VectorDouble> vecVals;
286};
287
288template <int FIELD_DIM, typename OpBase, CoordinateTypes CoordSys>
290 : public OpBase {
291
293 const std::string field_name, boost::shared_ptr<VectorDouble> vec,
294 ScalarFun beta = [](double, double, double) constexpr { return 1; },
295 boost::shared_ptr<Range> ents_ptr = nullptr)
296 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr), sourceVec(vec),
297 betaCoeff(beta) {}
298
299protected:
301 boost::shared_ptr<VectorDouble> sourceVec;
303};
304
305/**
306 * @brief Vector field time divergence of tensor
307 *
308 * \f[
309 * (v_i,\lambda_{ij,j})_\Omega
310 * \f]
311 *
312 * @tparam SPACE_DIM
313 * @tparam I
314 * @tparam OpBase
315 */
316template <int SPACE_DIM, IntegrationType I, typename OpBase>
318
319template <int SPACE_DIM, typename OpBase>
322 boost::shared_ptr<MatrixDouble> mat_vals)
323 : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals) {}
324
326 boost::shared_ptr<MatrixDouble> mat_vals,
327 ScalarFun beta_fun)
328 : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals),
329 betaCoeff(beta_fun) {}
330
331protected:
332 boost::shared_ptr<MatrixDouble> matVals;
333 ScalarFun betaCoeff = [](double, double, double) constexpr { return 1; };
334
337};
338
339/**
340 * @brief Tensor field time gradient of vector field
341 *
342 * \f[
343 * (u_i,\lambda_{ij,j})_\Omega
344 * \f]
345 *
346 * @tparam SPACE_DIM
347 * @tparam I
348 * @tparam OpBase
349 */
350template <int SPACE_DIM, IntegrationType I, typename OpBase>
352
353template <int SPACE_DIM, typename OpBase>
356 boost::shared_ptr<MatrixDouble> mat_vals)
357 : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals) {}
358
360 boost::shared_ptr<MatrixDouble> mat_vals,
361 ScalarFun beta_fun)
362 : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals),
363 betaCoeff(beta_fun) {}
364
365protected:
366 boost::shared_ptr<MatrixDouble> matVals;
367 ScalarFun betaCoeff = [](double, double, double) constexpr { return 1; };
368
372};
373
374/**
375 * @brief Multiply vector times normal on the face times scalar function
376 *
377 * This operator typically will be used to evaluate natural boundary conditions
378 * for mixed formulation.
379 *
380 * @tparam BASE_DIM
381 * @tparam SPACE_DIM
382 * @tparam OpBase
383 */
384template <int SPACE_DIM, IntegrationType I, typename OpBase>
386
387/**
388 * @brief This is specialisation for sources on boundary which depends on normal
389 *
390 * @tparam BASE_DIM
391 * @tparam OpBase
392 */
393template <int FIELD_DIM, IntegrationType I, typename OpBase>
396 : public OpNormalMixVecTimesScalarImpl<FIELD_DIM, I, OpBase> {
398 OpBase>::OpNormalMixVecTimesScalarImpl;
399};
400
401template <typename OpBase>
404 const std::string field_name,
405 ScalarFun source_fun = [](double, double, double) constexpr { return 1; },
406 boost::shared_ptr<Range> ents_ptr = nullptr)
407 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
408 sourceFun(source_fun) {}
409
410protected:
414};
415
416template <typename OpBase>
419 const std::string field_name,
420 ScalarFun source_fun = [](double, double, double) constexpr { return 1; },
421 boost::shared_ptr<Range> ents_ptr = nullptr)
422 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
423 sourceFun(source_fun) {}
424
425protected:
429};
430
431/**
432 * @brief Multiply vector times normal on the face times vector field
433 *
434 * This operator typically will be used to evaluate natural boundary conditions
435 * for mixed formulation.
436 *
437 * @tparam BASE_DIM
438 * @tparam SPACE_DIM
439 * @tparam OpBase
440 */
441template <int SPACE_DIM, IntegrationType I, typename OpBase>
443
444template <int SPACE_DIM, typename OpBase>
446 : public OpBase {
448 const std::string field_name, boost::shared_ptr<MatrixDouble> u_ptr,
449 ScalarFun beta_coeff = [](double, double, double) constexpr { return 1; },
450 boost::shared_ptr<Range> ents_ptr = nullptr)
451 : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr), uPtr(u_ptr),
452 betaCoeff(beta_coeff) {}
453
454protected:
455 boost::shared_ptr<MatrixDouble> uPtr;
458};
459
460template <int BASE_DIM, int FIELD_DIM, int SPACE_DIM, IntegrationType I,
461 typename OpBase>
463
464template <int SPACE_DIM, typename OpBase>
467 const std::string field_name, boost::shared_ptr<MatrixDouble> u_ptr,
468 boost::shared_ptr<MatrixDouble> y_grad_ptr,
469 ConstantFun source_fun = []() constexpr { return 1; })
470 : OpBase(field_name, field_name, OpBase::OPROW), uPtr(u_ptr),
471 yGradPtr(y_grad_ptr), alphaConstant(source_fun) {}
472
473protected:
474 boost::shared_ptr<MatrixDouble> uPtr;
475 boost::shared_ptr<MatrixDouble> yGradPtr;
478};
479
480template <int FIELD_DIM, int SPACE_DIM, typename OpBase>
482 : public OpBase {
484 const std::string field_name, boost::shared_ptr<MatrixDouble> u_ptr,
485 boost::shared_ptr<MatrixDouble> y_grad_ptr,
486 ConstantFun source_fun = []() constexpr { return 1; })
487 : OpBase(field_name, field_name, OpBase::OPROW), uPtr(u_ptr),
488 yGradPtr(y_grad_ptr), alphaConstant(source_fun) {}
489
490protected:
491 boost::shared_ptr<MatrixDouble> uPtr;
492 boost::shared_ptr<MatrixDouble> yGradPtr;
495};
496
497template <typename OpBase>
500 EntitiesFieldData::EntData &row_data) {
502
503 // get element volume
504 const double vol = OpBase::getMeasure();
505 // get integration weights
506 auto t_w = OpBase::getFTensor0IntegrationWeight();
507 // get base function gradient on rows
508 auto t_row_base = row_data.getFTensor0N();
509 // get coordinate at integration points
510 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
511 // loop over integration points
512 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
513 // take into account Jacobian
514 const double alpha =
515 t_w * vol * sourceFun(t_coords(0), t_coords(1), t_coords(2));
516 // loop over rows base functions
517 int rr = 0;
518 for (; rr != OpBase::nbRows; ++rr) {
519 OpBase::locF[rr] += alpha * t_row_base;
520 ++t_row_base;
521 }
522 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
523 ++t_row_base;
524 ++t_coords;
525 ++t_w; // move to another integration weight
526 }
528}
529
530template <int FIELD_DIM, typename OpBase>
533 iNtegrate(EntitiesFieldData::EntData &row_data) {
536
537 // get element volume
538 const double vol = OpBase::getMeasure();
539 // get integration weights
540 auto t_w = OpBase::getFTensor0IntegrationWeight();
541 // get base function gradient on rows
542 auto t_row_base = row_data.getFTensor0N();
543 // get coordinate at integration points
544 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
545 // loop over integration points
546 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
547 // source file
548 auto t_source = sourceFun(t_coords(0), t_coords(1), t_coords(2));
549 // take into account Jacobian
550 const double alpha = t_w * vol;
551 // loop over rows base functions
552 auto t_nf = getFTensor1FromArray<FIELD_DIM, FIELD_DIM>(OpBase::locF);
553 int rr = 0;
554 for (; rr != OpBase::nbRows / FIELD_DIM; ++rr) {
555 t_nf(i) += alpha * t_row_base * t_source(i);
556 ++t_row_base;
557 ++t_nf;
558 }
559 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
560 ++t_row_base;
561 ++t_coords;
562 ++t_w; // move to another integration weight
563 }
565}
566
567template <int FIELD_DIM, typename OpBase>
570 iNtegrate(EntitiesFieldData::EntData &row_data) {
573
574 const size_t nb_base_functions = row_data.getN().size2() / 3;
575 // get element volume
576 const double vol = OpBase::getMeasure();
577 // get integration weights
578 auto t_w = OpBase::getFTensor0IntegrationWeight();
579 // get base function gradient on rows
580 auto t_row_base = row_data.getFTensor1N<3>();
581 // get coordinate at integration points
582 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
583 // loop over integration points
584 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
585 // source file
586 auto t_source = sourceFun(t_coords(0), t_coords(1), t_coords(2));
587 // take into account Jacobian
588 const double alpha = t_w * vol;
589 // loop over rows base functions
590 int rr = 0;
591 for (; rr != OpBase::nbRows; ++rr) {
592 OpBase::locF[rr] += alpha * t_row_base(i) * t_source(i);
593 ++t_row_base;
594 }
595 for (; rr < nb_base_functions; ++rr)
596 ++t_row_base;
597 ++t_coords;
598 ++t_w; // move to another integration weight
599 }
601}
602
603template <int S, typename OpBase>
605 EntitiesFieldData::EntData &row_data) {
607
608 // get element volume
609 const double vol = OpBase::getMeasure();
610 // get integration weights
611 auto t_w = OpBase::getFTensor0IntegrationWeight();
612 // get base function gradient on rows
613 auto t_row_base = row_data.getFTensor0N();
614 // get vector values
615 auto t_vec = getFTensor0FromVec<S>(*sourceVec);
616
617#ifndef NDEBUG
618 if (sourceVec->size() != OpBase::nbIntegrationPts) {
619 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
620 "Wrong number of integration points %d != %ld",
621 OpBase::nbIntegrationPts, sourceVec->size());
622 }
623#endif
624
625 // get coords
626 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
627 // loop over integration points
628 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
629 // take into account Jacobian
630 const double alpha =
631 t_w * vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
632 // loop over rows base functions
633 int rr = 0;
634 for (; rr != OpBase::nbRows; ++rr) {
635 OpBase::locF[rr] += alpha * t_row_base * t_vec;
636 ++t_row_base;
637 }
638 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
639 ++t_row_base;
640 ++t_w; // move to another integration weight
641 ++t_vec;
642 ++t_coords;
643 }
645}
646
647template <int FIELD_DIM, int S, typename OpBase>
649 EntitiesFieldData::EntData &row_data) {
651
653 auto get_vec_at_pts =
655 *sourceVec, OpBase::nbIntegrationPts);
656
657 // get element volume
658 const double vol = OpBase::getMeasure();
659 // get integration weights
660 auto t_w = OpBase::getFTensor0IntegrationWeight();
661 // get base function gradient on rows
662 auto t_row_base = row_data.getFTensor0N();
663 // get coords
664 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
665 // get vector values
666 auto t_vec_at_pts = get_vec_at_pts();
667 // loop over integration points
668 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
669 // take into account Jacobian
670 const double beta = betaCoeff(t_coords(0), t_coords(1), t_coords(2));
671 const double alpha = t_w * vol * beta;
672 // get loc vector tensor
673 auto t_nf = OpBase::template getNf<FIELD_DIM>();
674 // loop over rows base functions
675 int rr = 0;
676 for (; rr != OpBase::nbRows / FIELD_DIM; ++rr) {
677 t_nf(i) += alpha * t_row_base * t_vec_at_pts(i);
678 ++t_row_base;
679 ++t_nf;
680 }
681 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
682 ++t_row_base;
683 ++t_w; // move to another integration weight
684 ++t_vec_at_pts;
685 ++t_coords;
686 }
688}
689
690template <int FIELD_DIM, int S, typename OpBase>
692 EntitiesFieldData::EntData &row_data) {
694
696 auto get_vec_at_pts =
698 *sourceVec, OpBase::nbIntegrationPts);
699
700 const size_t nb_base_functions = row_data.getN().size2() / 3;
701 // get element volume
702 const double vol = OpBase::getMeasure();
703 // get integration weights
704 auto t_w = OpBase::getFTensor0IntegrationWeight();
705 // get base function gradient on rows
706 auto t_row_base = row_data.getFTensor1N<3>();
707 // get coords
708 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
709 // get vector values
710 auto t_vec_at_pts = get_vec_at_pts();
711 // loop over integration points
712 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
713 // take into account Jacobian
714 const double alpha =
715 t_w * vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
716 // loop over rows base functions
717 int rr = 0;
718 for (; rr != OpBase::nbRows; ++rr) {
719 OpBase::locF[rr] += alpha * t_row_base(i) * t_vec_at_pts(i);
720 ++t_row_base;
721 }
722 for (; rr < nb_base_functions; ++rr)
723 ++t_row_base;
724 ++t_w; // move to another integration weight
725 ++t_vec_at_pts;
726 ++t_coords;
727 }
729}
730
731template <int SPACE_DIM, int S, typename OpBase>
734 EntitiesFieldData::EntData &row_data) {
736
738 auto get_val_grad_at_pts =
740 *matVals, OpBase::nbIntegrationPts);
741
742 // get element volume
743 const double vol = OpBase::getMeasure();
744 // get integration weights
745 auto t_w = OpBase::getFTensor0IntegrationWeight();
746 // get base function gradient on rows
747 auto t_row_grad = row_data.getFTensor1DiffN<SPACE_DIM>();
748 // get field gradient values
749 auto t_val_grad_at_pts = get_val_grad_at_pts();
750 // get coordinate at integration points
751 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
752 // loop over integration points
753 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
754 const double beta = vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
755 // take into account Jacobian
756 const double alpha = t_w * beta;
757 // loop over rows base functions
758 int rr = 0;
759 for (; rr != OpBase::nbRows; rr++) {
760 // calculate element of local matrix
761 OpBase::locF[rr] += alpha * (t_row_grad(i) * t_val_grad_at_pts(i));
762 ++t_row_grad; // move to another element of gradient of base
763 // function on row
764 }
765 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
766 ++t_row_grad;
767
768 ++t_coords;
769 ++t_val_grad_at_pts;
770 ++t_w; // move to another integration weight
771 }
773}
774
775template <int SPACE_DIM, int S, typename OpBase>
778 EntitiesFieldData::EntData &row_data) {
780
782 auto get_val_grad_at_pts =
785 DL>::get(*matVals, OpBase::nbIntegrationPts);
786
787 // get element volume
788 const double vol = OpBase::getMeasure();
789 // get integration weights
790 auto t_w = OpBase::getFTensor0IntegrationWeight();
791 // get base function gradient on rows
792 auto t_row_grad = row_data.getFTensor1DiffN<SPACE_DIM>();
793 // get field gradient values
794 auto t_val_grad_at_pts = get_val_grad_at_pts();
795 // get coordinate at integration points
796 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
797 // loop over integration points
798 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
799 // take into account Jacobian
800 const double alpha =
801 t_w * vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
802 // get rhs vector
803 auto t_nf = OpBase::template getNf<SPACE_DIM>();
804 // loop over rows base functions
805 int rr = 0;
806 for (; rr != OpBase::nbRows / SPACE_DIM; rr++) {
807 // calculate element of local matrix
808 t_nf(i) += alpha * (t_row_grad(j) * t_val_grad_at_pts(i, j));
809 ++t_row_grad; // move to another element of gradient of base
810 // function on row
811 ++t_nf;
812 }
813 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
814 ++t_row_grad;
815
816 ++t_coords;
817 ++t_val_grad_at_pts;
818 ++t_w; // move to another integration weight
819 }
821}
822
823template <int SPACE_DIM, int S, typename OpBase>
826 EntitiesFieldData::EntData &row_data) {
828 // get element volume
829 const double vol = OpBase::getMeasure();
830 // get coords
831 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
832 // get integration weights
833 auto t_w = OpBase::getFTensor0IntegrationWeight();
834 // get base function gradient on rows
835 auto t_row_grad = row_data.getFTensor1DiffN<SPACE_DIM>();
836 // get field gradient values
838 auto get_val_mat_at_pts =
840 DL>::get(*matVals, OpBase::nbIntegrationPts);
841 auto t_val_mat_at_pts = get_val_mat_at_pts();
842 // loop over integration points
843 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
844 // take into account Jacobian
845 const double alpha =
846 t_w * vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
847 // get rhs vector
848 auto t_nf = OpBase::template getNf<SPACE_DIM>();
849 // loop over rows base functions
850 int rr = 0;
851 for (; rr != OpBase::nbRows / SPACE_DIM; rr++) {
852 // calculate element of local matrix
853 t_nf(j) += alpha * (t_row_grad(i) * t_val_mat_at_pts(i, j));
854 ++t_row_grad; // move to another element of gradient of base
855 // function on row
856 ++t_nf;
857 }
858 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
859 ++t_row_grad;
860 ++t_val_mat_at_pts;
861 ++t_coords;
862 ++t_w; // move to another integration weight
863 }
865}
866
867template <int FIELD_DIM, int SPACE_DIM, typename OpBase,
868 CoordinateTypes CoordSys>
871 EntitiesFieldData::EntData &row_data) {
873
875 auto get_u_at_pts =
877 *matVals, OpBase::nbIntegrationPts);
878
879 const size_t nb_base_functions = row_data.getN().size2() / 3;
880 auto t_w = this->getFTensor0IntegrationWeight();
881 // get coordinate at integration points
882 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
883 auto t_diff_base = row_data.getFTensor2DiffN<3, SPACE_DIM>();
884 auto t_base = row_data.getFTensor1N<3>();
885 auto t_u_at_pts = get_u_at_pts();
886
887 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
888
889 const double alpha = this->getMeasure() * t_w *
890 betaConst(t_coords(0), t_coords(1), t_coords(2));
891 auto t_nf = OpBase::template getNf<FIELD_DIM>();
892
893 size_t bb = 0;
894 for (; bb != this->nbRows / FIELD_DIM; ++bb) {
895 const double t_div_base = t_diff_base(j, j);
896 t_nf(i) += alpha * t_div_base * t_u_at_pts(i);
897 if constexpr (CoordSys == CYLINDRICAL) {
898 t_nf(i) += t_base(0) * (alpha / t_coords(0)) * t_u_at_pts(i);
899 }
900 ++t_nf;
901 ++t_diff_base;
902 ++t_base;
903 }
904 for (; bb < nb_base_functions; ++bb) {
905 ++t_diff_base;
906 ++t_base;
907 }
908
909 ++t_u_at_pts;
910 ++t_w;
911 ++t_coords;
912 }
913
915}
916
917template <int SPACE_DIM, typename OpBase, CoordinateTypes CoordSys>
920 EntitiesFieldData::EntData &row_data) {
922
923 const size_t nb_base_functions = row_data.getN().size2() / 3;
924 auto t_w = this->getFTensor0IntegrationWeight();
925 // get coordinate at integration points
926 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
927 auto t_diff_base = row_data.getFTensor2DiffN<3, SPACE_DIM>();
928 auto t_u = getFTensor0FromVec(*(vecVals));
929
930 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
931
932 const double alpha = this->getMeasure() * t_w *
933 betaConst(t_coords(0), t_coords(1), t_coords(2));
934 ;
935
936 size_t bb = 0;
937 for (; bb != this->nbRows; ++bb) {
938 const double t_div_base = t_diff_base(j, j);
939 OpBase::locF[bb] += alpha * t_div_base * t_u;
940 ++t_diff_base;
941 }
942 for (; bb < nb_base_functions; ++bb)
943 ++t_diff_base;
944
945 ++t_u;
946 ++t_w;
947 ++t_coords;
948 }
949
951}
952
953/**
954 * @brief div U times vector
955 *
956 * \f[
957 * \delta u_j = \phi^m\delta\overline{u}^m_j\\
958 * \delta u_{j,i} = \phi^m_{,i}\delta\overline{u}^m_j\\
959 * \textrm{tr}[\delta u_{j,i}] = \delta u_{j,i}\delta_{ji}\\
960 * (\textrm{tr}[\delta u_{j,i}], v) =\\
961 * (\delta u_{j,i} \delta_{ij}, v) =\\
962 * (\delta u_{j,i}, \delta_{ij} v) =\\
963 * (\phi^m_{,i}\delta\overline{u}^m_j, \delta_{ij} v) \\
964 * f_i^m=(\phi^m_{,i}, v)
965 * \f]
966 *
967 * @tparam FIELD_DIM
968 * @tparam SPACE_DIM
969 * @tparam OpBase
970 * @param row_data
971 * @return MoFEMErrorCode
972 */
973template <int FIELD_DIM, typename OpBase, CoordinateTypes CoordSys>
976 EntitiesFieldData::EntData &row_data) {
979
980 // get element volume
981 const double vol = OpBase::getMeasure();
982 // get integration weights
983 auto t_w = OpBase::getFTensor0IntegrationWeight();
984 // get coordinate at integration points
985 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
986 // get base function gradient on rows
987 auto t_row_grad = row_data.getFTensor1DiffN<FIELD_DIM>();
988 // get vector values
989 auto t_vec = getFTensor0FromVec(*sourceVec);
990 // loop over integration points
991 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
992 // take into account Jacobian
993 const double alpha =
994 t_w * vol * betaCoeff(t_coords(0), t_coords(1), t_coords(2));
995 auto t_nf = getFTensor1FromArray<FIELD_DIM, FIELD_DIM>(OpBase::locF);
996 // loop over rows base functions
997 int rr = 0;
998 for (; rr != OpBase::nbRows / FIELD_DIM; ++rr) {
999 t_nf(i) += alpha * t_row_grad(i) * t_vec;
1000 ++t_row_grad;
1001 ++t_nf;
1002 }
1003 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
1004 ++t_row_grad;
1005 ++t_w; // move to another integration weight
1006 ++t_vec;
1007 ++t_coords;
1008 }
1010}
1011
1012template <int SPACE_DIM, typename OpBase>
1014 EntitiesFieldData::EntData &row_data) {
1016
1018 auto get_grad_at_pts =
1021 DL>::get(*matVals, OpBase::nbIntegrationPts);
1022
1023 const size_t nb_base_functions = row_data.getN().size2() / 3;
1024 auto t_w = this->getFTensor0IntegrationWeight();
1025 auto t_coords = this->getFTensor1CoordsAtGaussPts();
1026 auto t_base = row_data.getFTensor1N<3>();
1027 auto t_grad_at_pts = get_grad_at_pts();
1028
1029 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
1030
1031 const double alpha = this->getMeasure() * t_w;
1032 auto t_nf = OpBase::template getNf<SPACE_DIM>();
1033
1034 size_t bb = 0;
1035 for (; bb != this->nbRows / SPACE_DIM; ++bb) {
1036 t_nf(i) += alpha * betaCoeff(t_coords(0), t_coords(1), t_coords(2)) *
1037 t_base(j) * t_grad_at_pts(i, j);
1038 ++t_nf;
1039 ++t_base;
1040 }
1041 for (; bb < nb_base_functions; ++bb)
1042 ++t_base;
1043
1044 ++t_grad_at_pts;
1045 ++t_coords;
1046 ++t_w;
1047 }
1048
1050}
1051
1052template <int SPACE_DIM, typename OpBase>
1054 EntitiesFieldData::EntData &row_data) {
1056
1058 auto get_div_at_pts =
1060 *matVals, OpBase::nbIntegrationPts);
1061
1062 const size_t nb_base_functions = row_data.getN().size2();
1063 auto t_w = this->getFTensor0IntegrationWeight();
1064 auto t_coords = this->getFTensor1CoordsAtGaussPts();
1065 auto t_base = row_data.getFTensor0N();
1066 auto t_div_at_pts = get_div_at_pts();
1067
1068 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
1069 const double alpha = this->getMeasure() * t_w;
1070 auto t_nf = OpBase::template getNf<SPACE_DIM>();
1071
1072 size_t bb = 0;
1073 for (; bb != this->nbRows / SPACE_DIM; ++bb) {
1074 t_nf(i) += alpha * t_base *
1075 betaCoeff(t_coords(0), t_coords(1), t_coords(2)) *
1076 t_div_at_pts(i);
1077 ++t_nf;
1078 ++t_base;
1079 }
1080 for (; bb < nb_base_functions; ++bb)
1081 ++t_base;
1082
1083 ++t_coords;
1084 ++t_div_at_pts;
1085 ++t_w;
1086 }
1087
1089}
1090
1091template <typename OpBase>
1093 EntitiesFieldData::EntData &row_data) {
1095
1096 const size_t nb_base_functions = row_data.getN().size2() / 3;
1097 // get element volume
1098 // get integration weights
1099 auto t_w = OpBase::getFTensor0IntegrationWeight();
1100 // get base function gradient on rows
1101 auto t_row_base = row_data.getFTensor1N<3>();
1102 // get coordinate at integration points
1103 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
1104 // get normal
1105 auto t_normal = OpBase::getFTensor1NormalsAtGaussPts();
1106 double a = 1;
1107 if (this->getNumeredEntFiniteElementPtr()->getEntType() == MBTRI)
1108 a *= 2;
1109 // loop over integration points
1110 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
1111 // take into account Jacobian
1112 const double alpha =
1113 t_w * sourceFun(t_coords(0), t_coords(1), t_coords(2)) / a;
1114 // loop over rows base functions
1115 int rr = 0;
1116 for (; rr != OpBase::nbRows; ++rr) {
1117 OpBase::locF[rr] += alpha * t_row_base(i) * t_normal(i);
1118 ++t_row_base;
1119 }
1120 for (; rr < nb_base_functions; ++rr)
1121 ++t_row_base;
1122 ++t_coords;
1123 ++t_w; // move to another integration weight
1124 ++t_normal;
1125 }
1127}
1128
1129template <typename OpBase>
1131 EntitiesFieldData::EntData &row_data) {
1133
1134 const size_t nb_base_functions = row_data.getN().size2() / 3;
1135 FTensor::Tensor1<double, 3> t_z{0., 0., 1.};
1136 // get element volume
1137 // get integration weights
1138 auto t_w = OpBase::getFTensor0IntegrationWeight();
1139 // get base function gradient on rows
1140 auto t_row_base = row_data.getFTensor1N<3>();
1141 // get coordinate at integration points
1142 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
1143 // get normal
1144 auto t_tangent = OpBase::getFTensor1TangentAtGaussPts();
1145 // loop over integration points
1146 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
1147 // take into account Jacobian
1148 const double alpha = t_w * sourceFun(t_coords(0), t_coords(1), t_coords(2));
1150 FTensor::Index<'j', 3> j;
1151 FTensor::Index<'k', 3> k;
1152 t_normal(i) = FTensor::levi_civita(i, j, k) * t_tangent(j) * t_z(k);
1153 int rr = 0;
1154 for (; rr != OpBase::nbRows; ++rr) {
1155 OpBase::locF[rr] += alpha * t_row_base(i) * t_normal(i);
1156 ++t_row_base;
1157 }
1158 for (; rr < nb_base_functions; ++rr)
1159 ++t_row_base;
1160 ++t_coords;
1161 ++t_tangent;
1162 ++t_w; // move to another integration weight
1163 }
1165}
1166
1167template <int SPACE_DIM, typename OpBase>
1170 EntitiesFieldData::EntData &row_data) {
1172 FTensor::Index<'i', 3> i;
1174
1176 auto get_u_at_pts =
1179
1180 const size_t nb_base_functions = row_data.getN().size2() / 3;
1181 // get element volume
1182 // get integration weights
1183 auto t_w = OpBase::getFTensor0IntegrationWeight();
1184 // get base function gradient on rows
1185 auto t_row_base = row_data.getFTensor1N<3>();
1186 // get coordinate at integration points
1187 auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
1188 // get normal
1189 auto t_normal = OpBase::getFTensor1NormalsAtGaussPts();
1190 // get field
1191 auto t_u_at_pts = get_u_at_pts();
1192 // loop over integration points
1193 auto a = OpBase::getMeasure();
1194 for (int gg = 0; gg != OpBase::nbIntegrationPts; gg++) {
1195 // take into account Jacobian
1196 auto l2 = std::sqrt(t_normal(i) * t_normal(i));
1197 const double alpha =
1198 t_w * betaCoeff(t_coords(0), t_coords(1), t_coords(2)) * (a / l2);
1199 // get rhs vector
1200 auto t_nf = OpBase::template getNf<SPACE_DIM>();
1201 // loop over rows base functions
1202 int rr = 0;
1203 for (; rr != OpBase::nbRows / SPACE_DIM; ++rr) {
1204 t_nf(J) += alpha * (t_row_base(i) * t_normal(i)) * t_u_at_pts(J);
1205 ++t_row_base;
1206 ++t_nf;
1207 }
1208 for (; rr < nb_base_functions; ++rr)
1209 ++t_row_base;
1210 ++t_coords;
1211 ++t_w; // move to another integration weight
1212 ++t_normal;
1213 ++t_u_at_pts;
1214 }
1216}
1217
1218template <int SPACE_DIM, typename OpBase>
1221 EntitiesFieldData::EntData &row_data) {
1223
1225 auto get_u_at_pts =
1228 auto get_grad_y_at_pts =
1230 *yGradPtr, OpBase::nbIntegrationPts);
1231
1232 auto t_w = this->getFTensor0IntegrationWeight();
1233 auto t_base = row_data.getFTensor0N();
1234
1235 auto t_u_at_pts = get_u_at_pts();
1236 auto t_grad_y_at_pts = get_grad_y_at_pts();
1237
1239 const double alpha_constant = alphaConstant();
1240 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
1241
1242 // get element volume
1243 const double vol = OpBase::getMeasure();
1244 const double c =
1245 (t_grad_y_at_pts(i) * t_u_at_pts(i)) * (t_w * vol * alpha_constant);
1246
1247 // get element volume
1248 int rr = 0;
1249 for (; rr != OpBase::nbRows; ++rr) {
1250 OpBase::locF[rr] += c * t_base;
1251 ++t_base;
1252 }
1253 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
1254 ++t_base;
1255
1256 ++t_w; // move to another integration weight
1257 ++t_u_at_pts;
1258 ++t_grad_y_at_pts;
1259 }
1260
1262}
1263
1264template <int FIELD_DIM, int SPACE_DIM, typename OpBase>
1267 EntitiesFieldData::EntData &row_data) {
1269
1271 auto get_u_at_pts =
1274 auto get_grad_y_at_pts =
1277 DL>::get(*yGradPtr, OpBase::nbIntegrationPts);
1278
1279 auto t_w = this->getFTensor0IntegrationWeight();
1280 auto t_base = row_data.getFTensor0N();
1281
1282 auto t_u_at_pts = get_u_at_pts();
1283 auto t_grad_y_at_pts = get_grad_y_at_pts();
1284
1287 const double alpha_constant = alphaConstant();
1288 for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
1289
1290 // get element volume
1291 const double vol = OpBase::getMeasure();
1292
1294 t_c(J) =
1295 (t_grad_y_at_pts(J, i) * t_u_at_pts(i)) * (t_w * vol * alpha_constant);
1296
1297 auto t_nf = getFTensor1FromArray<FIELD_DIM, FIELD_DIM>(OpBase::locF);
1298 int rr = 0;
1299 for (; rr != OpBase::nbRows / FIELD_DIM; ++rr) {
1300 t_nf(J) += t_base * t_c(J);
1301 ++t_base;
1302 ++t_nf;
1303 }
1304 for (; rr < OpBase::nbRowBaseFunctions; ++rr)
1305 ++t_base;
1306 ++t_w; // move to another integration weight
1307
1308 ++t_u_at_pts;
1309 ++t_grad_y_at_pts;
1310 }
1311
1313}
1314
1315} // namespace MoFEM
1316
1317#endif // __LINEAR_FORMS_INTEGRATORS_HPP__
constexpr double a
constexpr int SPACE_DIM
constexpr int FIELD_DIM
#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
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
CoordinateTypes
Coodinate system.
@ CYLINDRICAL
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr int BASE_DIM
IntegrationType
Form integrator integration types.
boost::function< double(const double, const double, const double)> ScalarFun
Scalar function type.
boost::function< FTensor::Tensor1< double, DIM >(const double, const double, const double)> VectorFun
Vector function type.
@ GAUSS
Gaussian quadrature integration.
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
boost::function< double(double)> TimeFun
Lambda function used to scale with time.
boost::function< double()> ConstantFun
Constant function type.
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
static auto getFTensor0FromVec(V &data)
Get tensor rank 0 (scalar) form data vector.
decltype(GetFTensor2FromMatImpl< Tensor_Dim0, Tensor_Dim1, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor2FromMatType
constexpr IntegrationType I
constexpr auto field_name
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Definition radiation.cpp:29
Data on single entity (This is passed as argument to DataOperator::doWork)
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN(FieldApproximationBase base)
Get derivatives of base functions for Hdiv space.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
auto getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
auto getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows
int nbIntegrationPts
number of integration points
int nbRowBaseFunctions
number or row base functions
OpBaseTimesScalarImpl(const std::string field_name, boost::shared_ptr< VectorDouble > vec, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpBaseTimesVectorImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > vec, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Integrate grad-grad operator.
OpBaseTimesVectorImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > vec, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpConvectiveTermRhsImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > y_grad_ptr, ConstantFun source_fun=[]() constexpr { return 1;})
OpConvectiveTermRhsImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > y_grad_ptr, ConstantFun source_fun=[]() constexpr { return 1;})
OpGradTimesSymTensorImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;})
OpGradTimesTensorImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpGradTimesTensorImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpMixDivTimesUImpl(const std::string field_name, boost::shared_ptr< VectorDouble > vec, ScalarFun beta=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpMixDivTimesUImpl(const std::string field_name, boost::shared_ptr< VectorDouble > vec_vals, ScalarFun beta=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpMixDivTimesUImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta=[](double, double, double) { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpMixTensorTimesGradUImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals)
OpMixTensorTimesGradUImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_fun)
Tensor field time gradient of vector field.
OpMixVecTimesDivLambdaImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_fun)
OpMixVecTimesDivLambdaImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals)
Vector field time divergence of tensor.
OpNormalMixVecTimesScalarImpl(const std::string field_name, ScalarFun source_fun=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
OpNormalMixVecTimesScalarImpl(const std::string field_name, ScalarFun source_fun=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
Multiply vector times normal on the face times scalar function.
OpNormalMixVecTimesVectorFieldImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > u_ptr, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
Multiply vector times normal on the face times vector field.
OpSourceImpl(const std::string field_name, ScalarFun source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)
Construct a new Op Source Impl object.
OpSourceImpl(const std::string field_name, TimeFun time_fun, ScalarFun source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)
Construct a new Op Source Impl object.
OpSourceImpl(const std::string field_name, VectorFun< FIELD_DIM > source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)
Construct a new Op Source Impl object.
OpSourceImpl(const std::string field_name, TimeFun time_fun, VectorFun< FIELD_DIM > source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)
Construct a new Op Source Impl object.
OpSourceImpl(const std::string field_name, TimeFun time_fun, VectorFun< FIELD_DIM > source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)
OpSourceImpl(const std::string field_name, VectorFun< FIELD_DIM > source_fun, boost::shared_ptr< Range > ents_ptr=nullptr)