S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Go to the documentation of this file.
41 void GeneratePmlTable(
const int bw,
const int m,
double* pml_table,
double* workspace) {
44 double* prevprev = workspace;
45 double* prev = prevprev + size;
46 double* temp1 = prev + size;
47 double* temp2 = temp1 + size;
48 double* temp3 = temp2 + size;
49 double* temp4 = temp3 + size;
50 double* x_i = temp4 + size;
51 double* eval_args = x_i + size;
58 memset(prevprev, 0,
sizeof(
double) * size);
61 for (
int i = 0; i < size; ++i)
64 Pmm_L2(m, eval_args, size, prev);
66 memcpy(pml_table, prev,
sizeof(
double) * size);
68 for (
int i = 0; i < bw - m - 1; ++i) {
70 vec_dot(prev, x_i, temp2, size);
72 vec_add(temp3, temp1, temp4, size);
75 memcpy(pml_table, temp4,
sizeof(
double) * size);
76 memcpy(prevprev, prev,
sizeof(
double) * size);
77 memcpy(prev, temp4,
sizeof(
double) * size);
void Pmm_L2(const int, double *, const int, double *)
Generates L2-normed Pmm.
double L2_cn(const int m, const int l)
double L2_an(const int m, const int l)
void vec_dot(double *v1, double *v2, double *result, const int len)
Performs dot product of v1 and v2.
void vec_mul(const double scalar, double *v, double *result, const int len)
Multiplies the vector v by scalar.
void AcosOfChebyshevNodes(const int, double *)
Generates an array of the angular arguments of n Chebyshev nodes.
void GeneratePmlTable(const int bw, const int m, double *pml_table, double *workspace)
Generates all of the Pmls for a specified value of m.
void ChebyshevNodes(const int, double *)
Generates an array of n Chebyshev nodes.
void vec_add(double *v1, double *v2, double *result, const int len)
Adds two vectors into a third one.