1994 {
1995
1997
1999
2003
2007
2009
2010 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2011
2012 const int shift_n = (DIM + 1) * gg;
2013 const double n0 =
n[shift_n + n0_idx];
2014 const double n1 =
n[shift_n + n1_idx];
2015
2016 tPhi0(
i) = n0 * t_grad_n1(
i) - n1 * t_grad_n0(
i);
2018
2019 ++t_phi;
2020
2021 if constexpr (CALCULATE_DIRVATIVES) {
2022
2024 t_grad_n0(
j) * t_grad_n1(
i) - t_grad_n1(
j) * t_grad_n0(
i);
2025 (*t_diff_phi_ptr)(
i,
j) = t_diff_phi0(
i,
j);
2026 ++(*t_diff_phi_ptr);
2027 }
2028
2029 if (p > 1) {
2030
2031 if constexpr (CALCULATE_DIRVATIVES)
2034 &*
diffFi.data().begin(), DIM);
2035 else
2037 &*
fI.data().begin(),
nullptr, DIM);
2038
2041
2042 for (int oo = 1; oo <= p - 1; ++oo) {
2043
2044 const double b = pow(n0 + n1, oo);
2046
2047 if constexpr (CALCULATE_DIRVATIVES) {
2048
2050 oo * pow(n0 + n1, oo - 1) * (t_grad_n0(
i) + t_grad_n1(
i));
2051 (*t_diff_phi_ptr)(
i,
j) = (b *
fI[oo]) * t_diff_phi0(
i,
j) +
2052 (b * t_diff_fi(
j)) *
tPhi0(
i) +
2054 ++t_diff_fi;
2055 ++(*t_diff_phi_ptr);
2056 }
2057
2058 ++t_phi;
2059 }
2060 }
2061 }
2062
2064 }
PetscErrorCode Jacobi_polynomials(int p, double alpha, double x, double t, double *diff_x, double *diff_t, double *L, double *diffL, const int dim)
Calculate Jacobi approximation basis.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'j', 3 > j
FTensor::Tensor1< double, 3 > tDiffb
FTensor::Index< 'i', 3 > i
FTensor::Tensor1< double, 3 > tGradN0pN1
FTensor::Tensor1< double, 3 > tPhi0