2752 {
2754
2756
2758 int nb_integration_pts = getGaussPts().size2();
2759 int nb_base_functions = data.
getN().size2();
2760
2761 double time = getFEMethod()->ts_t;
2764 }
2765
2766#ifndef NDEBUG
2767 if (this->locF.size() != nb_dofs)
2769 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
2770#endif
2771
2772 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
2774
2775 auto val = bc.val;
2777 auto t_w = getFTensor0IntegrationWeight();
2778 auto t_coords = getFTensor1CoordsAtGaussPts();
2779 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
2780 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
2781
2783
2785
2786 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2787
2793
2797
2798 t_normal(
i) = (FTensor::levi_civita<double>(
i,
j,
k) * t_tangent1(
j)) *
2800 } else {
2801 t_normal(
i) = (FTensor::levi_civita<double>(
i,
j,
k) *
2802 (t_tangent1(
j) + t_grad_gamma_u(
j, N0))) *
2803 (t_tangent2(
k) + t_grad_gamma_u(
k, N1));
2804 }
2805 auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
2807 t_val(
i) = (time_scale * t_w * tau *
scale * val) * t_normal(
i);
2808
2809 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
2810 int rr = 0;
2811 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
2812 t_f(
i) += t_row_base * t_val(
i);
2813 ++t_row_base;
2814 ++t_f;
2815 }
2816
2817 for (; rr != nb_base_functions; ++rr)
2818 ++t_row_base;
2819 ++t_w;
2820 ++t_coords;
2821 ++t_tangent1;
2822 ++t_tangent2;
2823 ++t_grad_gamma_u;
2824 }
2825 this->locF /= 2.;
2826
2828 };
2829
2830
2831 EntityHandle fe_ent = getFEEntityHandle();
2832 for (
auto &bc : *(
bcData)) {
2833 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2834
2835 double time_scale = 1;
2838 }
2839
2841 if (nb_dofs) {
2843 bc, [](double, double, double) { return 1; }, time_scale);
2844 }
2845 }
2846 }
2848}
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
auto getFTensor2FromMat(M &data)
Get tensor rank 2 (matrix) form data matrix.
static enum StretchSelector stretchSelector
static enum RotSelector gradApproximator
static PetscBool physicalTimeFlg
static double currentPhysicalTime
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
Get DOF values on entity.