v0.14.0
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 32 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 
)
inlinestatic

Definition at line 45 of file scalar_check_approximation.cpp.

46  {
48  for (int o = 1; o <= approx_order; ++o) {
49  for (int i = 0; i <= o; ++i) {
50  int j = o - i;
51  if (j >= 0) {
52  r(0) += i > 0 ? i * pow(x, i - 1) * pow(y, j) : 0;
53  r(1) += j > 0 ? j * pow(x, i) * pow(y, j - 1) : 0;
54  }
55  }
56  }
57  return r;
58  }

◆ fUn()

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

Definition at line 33 of file scalar_check_approximation.cpp.

33  {
34  double r = 1;
35  for (int o = 1; o <= approx_order; ++o) {
36  for (int i = 0; i <= o; ++i) {
37  int j = o - i;
38  if (j >= 0)
39  r += pow(x, i) * pow(y, j);
40  }
41  }
42  return r;
43  }

The documentation for this struct was generated from the following file:
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
sdf.r
int r
Definition: sdf.py:8
approx_order
static int approx_order
Definition: scalar_check_approximation.cpp:15
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19