1995                                 {
 1996 
 1998 
 2000 
 2004 
 2008 
 2010 
 2011    for (int gg = 0; gg != nb_integration_pts; ++gg) {
 2012 
 2013      const int shift_n = (DIM + 1) * gg;
 2014      const double n0 = 
n[shift_n + n0_idx];
 
 2015      const double n1 = 
n[shift_n + n1_idx];
 
 2016 
 2017      tPhi0(
i) = n0 * t_grad_n1(
i) - n1 * t_grad_n0(
i);
 
 2019 
 2020      ++t_phi;
 2021 
 2022      if (CALCULATE_DIRVATIVES) {
 2023 
 2025            t_grad_n0(
j) * t_grad_n1(
i) - t_grad_n1(
j) * t_grad_n0(
i);
 
 2026        (*t_diff_phi_ptr)(
i, 
j) = t_diff_phi0(
i, 
j);
 
 2027        ++(*t_diff_phi_ptr);
 2028      }
 2029 
 2030      if (p > 1) {
 2031 
 2032        if (CALCULATE_DIRVATIVES)
 2035                                    &*
diffFi.data().begin(), DIM);
 
 2036        else
 2038                                    &*
fI.data().begin(), 
nullptr, DIM);
 
 2039 
 2042 
 2043        for (int oo = 1; oo <= p - 1; ++oo) {
 2044 
 2045          const double b = pow(n0 + n1, oo);
 2047 
 2048          if (CALCULATE_DIRVATIVES) {
 2049 
 2051                oo * pow(n0 + n1, oo - 1) * (t_grad_n0(
i) + t_grad_n1(
i));
 
 2052            (*t_diff_phi_ptr)(
i, 
j) = (b * 
fI[oo]) * t_diff_phi0(
i, 
j) +
 
 2053                                      (b * t_diff_fi(
j)) * 
tPhi0(
i) +
 
 2055            ++t_diff_fi;
 2056            ++(*t_diff_phi_ptr);
 2057          }
 2058 
 2059          ++t_phi;
 2060        }
 2061      }
 2062    }
 2063 
 2065  }
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.
const double n
refractive index of diffusive medium
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