32 unsigned M, vLen,
k = 0;
33 for (
unsigned L = 1;
L <=
N; ++
L) {
42 Bphi_vec.reserve(vLen);
45 Br_vec.push_back(Pt_vec[0].GetDiff(0));
46 Bz_vec.push_back(Pt_vec[0].GetDiff(1));
48 Bphi_vec[0].CheatL(
L);
54 for (M = 1; M <=
L; ++M) {
55 Pt_vec.push_back(Pt_vec[M - 1].LadderUp());
56 Br_vec.push_back(Pt_vec[M].GetDiff(0));
57 Bz_vec.push_back(Pt_vec[M].GetDiff(1));
58 Bphi_vec.push_back(Pt_vec[M].GetDecPow(0));
67 PtB.push_back(Pt_vec);
68 BrB.push_back(Br_vec);
69 BzB.push_back(Bz_vec);
70 BphiB.push_back(Bphi_vec);
92 for (
unsigned L = 1,
k = 0;
L <=
Dim; ++
L, ++
k) {
93 (*val) =
B[
k][0].Eval();
95 for (M = 1; M <=
L; ++M) {
98 (*val) =
V *
P->GetCos();
100 (*val) =
V *
P->GetSin();
114 for (
unsigned L = 1,
k = 0;
L <=
Dim; ++
L, ++
k) {
117 for (M = 1; M <=
L; ++M) {
120 (*val) = -
V *
P->GetSin();
122 (*val) =
V *
P->GetCos();
134 for (
unsigned k = 0;
k <
Len; ++
k)
135 S += coeff[
k] * basis[
k];
141 unsigned jL, jM, wdt = 60;
142 char fc1 =
'-', fc0 =
out.fill(fc1);
143 for (jL = 0; jL <
B.size(); ++jL) {
144 out << std::setw(wdt) << fc1 << std::endl;
145 out <<
"Basis subset " << jL + 1 << std::endl;
146 out << std::setw(wdt) << fc1 << std::endl;
147 for (jM = 0; jM <
B[jL].size(); ++jM) {
148 B[jL][jM].Print(
out);
156 out <<
"BASIS POLYNOMIALS FOR THE POTENTIAL:\n" << std::endl;
158 out <<
"\nBASIS POLYNOMIALS FOR R-COMPONENT OF THE FIELD:\n" << std::endl;
160 out <<
"\nBASIS POLYNOMIALS FOR Z-COMPONENT OF THE FIELD:\n" << std::endl;
162 out <<
"\nBASIS POLYNOMIALS FOR PHI-COMPONENT OF THE FIELD:\n" << std::endl;
virtual ~HarmBasis3DCyl()
void PrintBrB(std::ostream &out=std::cout)
void PrintBphiB(std::ostream &out=std::cout)
HarmBasis3DCyl(const unsigned N=18)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
static void IncNPwr(const unsigned N)
std::vector< harm_poly_vec > harm_poly_arr
std::vector< rz_harm_poly > harm_poly_vec
void Print(harm_poly_arr &B, std::ostream &out=std::cout)
void EvalRZ(harm_poly_arr &B, double *val)
std::pair< OmniClusterRef, TrackingParticleRef > P
void PrintBzB(std::ostream &out=std::cout)
void PrintPtB(std::ostream &out=std::cout)
double GetVal(double *coeff, double *basis)