v0.13.1
Static Public Member Functions | List of all members
ApproxFunctionsImpl< 2 > Struct Reference

Static Public Member Functions

static double fUn (const double x, const double y, double z)
 
static FTensor::Tensor1< double, 2 > diffFun (const double x, const double y, double z)
 

Detailed Description

Definition at line 52 of file scalar_check_approximation.cpp.

Member Function Documentation

◆ diffFun()

static FTensor::Tensor1< double, 2 > ApproxFunctionsImpl< 2 >::diffFun ( const double  x,
const double  y,
double  z 
)
static

Definition at line 65 of file scalar_check_approximation.cpp.

66 {
68 for (int o = 1; o <= approx_order; ++o) {
69 for (int i = 0; i <= o; ++i) {
70 int j = o - i;
71 if (j >= 0) {
72 r(0) += i > 0 ? i * pow(x, i - 1) * pow(y, j) : 0;
73 r(1) += j > 0 ? j * pow(x, i) * pow(y, j - 1) : 0;
74 }
75 }
76 }
77 return r;
78 }
static Index< 'o', 3 > o
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
const double r
rate factor
static int approx_order

◆ fUn()

static double ApproxFunctionsImpl< 2 >::fUn ( const double  x,
const double  y,
double  z 
)
static

Definition at line 53 of file scalar_check_approximation.cpp.

53 {
54 double r = 1;
55 for (int o = 1; o <= approx_order; ++o) {
56 for (int i = 0; i <= o; ++i) {
57 int j = o - i;
58 if (j >= 0)
59 r += pow(x, i) * pow(y, j);
60 }
61 }
62 return r;
63 }

The documentation for this struct was generated from the following file: