QMCPACK
MultiQuinticSpline1D< T > Class Template Reference

multivalue implementation for OneDimQuintic Real valued only calling any eval method with r >= r_max will throw an exception More...

+ Collaboration diagram for MultiQuinticSpline1D< T >:

Public Types

using RealType = T
 
using GridType = OneDimGridBase< T >
 
using CoeffType = Matrix< T, OffloadPinnedAllocator< T > >
 
using OffloadArray2D = Array< T, 2, OffloadPinnedAllocator< T > >
 
using OffloadArray3D = Array< T, 3, OffloadPinnedAllocator< T > >
 
using OffloadArray4D = Array< T, 4, OffloadPinnedAllocator< T > >
 

Public Member Functions

 MultiQuinticSpline1D ()
 
 MultiQuinticSpline1D (const MultiQuinticSpline1D &in)=default
 
rmax () const
 
void evaluate (T r, T *restrict u) const
 
void batched_evaluate (const OffloadArray2D &r, OffloadArray3D &u, T Rmax) const
 evaluate MultiQuinticSpline1D for multiple electrons and multiple pbc images More...
 
void batched_evaluateVGL (const OffloadArray2D &r, OffloadArray4D &vgl, T Rmax) const
 evaluate value, first deriv, second deriv of MultiQuinticSpline1D for multiple electrons and multiple pbc images More...
 
void evaluate (T r, T *restrict u, T *restrict du, T *restrict d2u) const
 
void evaluate (T r, T *restrict u, T *restrict du, T *restrict d2u, T *restrict d3u) const
 compute upto 3rd derivatives More...
 
template<typename GT >
void initialize (GT &agrid, int norbs, int order=5)
 initialize grid and container More...
 
template<typename T1 >
void add_spline (int ispline, OneDimQuinticSpline< T1 > &in)
 
void finalize ()
 finalize the construction More...
 
int getNumSplines () const
 
void setNumSplines (int num_splines)
 

Private Attributes

size_t num_splines_
 number of splines More...
 
size_t spline_order
 order of spline More...
 
r_max
 maximum radius More...
 
LogGridLight< T > myGrid
 will be the real grid More...
 
const std::shared_ptr< CoeffTypecoeffs_ptr_
 coeffs[6*spline_points][num_splines+padding] More...
 
const std::shared_ptr< Vector< T, OffloadPinnedAllocator< T > > > first_deriv_ptr_
 
CoeffTypecoeffs_
 
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
 

Detailed Description

template<typename T>
class qmcplusplus::MultiQuinticSpline1D< T >

multivalue implementation for OneDimQuintic Real valued only calling any eval method with r >= r_max will throw an exception

Definition at line 97 of file MultiQuinticSpline1D.h.

Member Typedef Documentation

◆ CoeffType

Definition at line 102 of file MultiQuinticSpline1D.h.

◆ GridType

Definition at line 101 of file MultiQuinticSpline1D.h.

◆ OffloadArray2D

Definition at line 103 of file MultiQuinticSpline1D.h.

◆ OffloadArray3D

Definition at line 104 of file MultiQuinticSpline1D.h.

◆ OffloadArray4D

Definition at line 105 of file MultiQuinticSpline1D.h.

◆ RealType

using RealType = T

Definition at line 100 of file MultiQuinticSpline1D.h.

Constructor & Destructor Documentation

◆ MultiQuinticSpline1D() [1/2]

Definition at line 126 of file MultiQuinticSpline1D.h.

127  : coeffs_ptr_(std::make_shared<CoeffType>()),
128  first_deriv_ptr_(std::make_shared<Vector<T, OffloadPinnedAllocator<T>>>()),
131  {}
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
const std::shared_ptr< CoeffType > coeffs_ptr_
coeffs[6*spline_points][num_splines+padding]
const std::shared_ptr< Vector< T, OffloadPinnedAllocator< T > > > first_deriv_ptr_

◆ MultiQuinticSpline1D() [2/2]

MultiQuinticSpline1D ( const MultiQuinticSpline1D< T > &  in)
default

Member Function Documentation

◆ add_spline()

void add_spline ( int  ispline,
OneDimQuinticSpline< T1 > &  in 
)
inline

Definition at line 430 of file MultiQuinticSpline1D.h.

References qmcplusplus::Units::distance::A, B(), OneDimQuinticSpline< Td, Tg, CTd, CTg >::B, qmcplusplus::Units::charge::C, MultiQuinticSpline1D< T >::coeffs_, Matrix< T, Alloc >::cols(), OneDimQuinticSpline< Td, Tg, CTd, CTg >::D, Matrix< T, Alloc >::data(), OneDimQuinticSpline< Td, Tg, CTd, CTg >::E, OneDimQuinticSpline< Td, Tg, CTd, CTg >::F, OneDimQuinticSpline< Td, Tg, CTd, CTg >::first_deriv, MultiQuinticSpline1D< T >::first_deriv_, OneDimQuinticSpline< Td, Tg, CTd, CTg >::m_Y, OneDimQuinticSpline< Td, Tg, CTd, CTg >::m_Y2, and OneDimGridFunctor< Td, Tg, CTd, CTg >::size().

Referenced by CuspCorrectionAtomicBasis< T >::addSpline(), A2NTransformer< T, FnIn >::convert(), and qmcplusplus::TEST_CASE().

431  {
432  first_deriv_[ispline] = in.first_deriv;
433  //if(spline_order==QUINTIC)
434  {
435  const T1* restrict A = in.m_Y.data();
436  const T1* restrict B = in.B.data();
437  const T1* restrict C = in.m_Y2.data();
438  const T1* restrict D = in.D.data();
439  const T1* restrict E = in.E.data();
440  const T1* restrict F = in.F.data();
441  T* restrict out = coeffs_.data();
442  const size_t ncols = coeffs_.cols();
443  const size_t num_points = in.size();
444  for (size_t i = 0; i < num_points; ++i)
445  {
446  out[(i * 6 + 0) * ncols + ispline] = static_cast<T>(A[i]);
447  out[(i * 6 + 1) * ncols + ispline] = static_cast<T>(B[i]);
448  out[(i * 6 + 2) * ncols + ispline] = static_cast<T>(C[i]);
449  out[(i * 6 + 3) * ncols + ispline] = static_cast<T>(D[i]);
450  out[(i * 6 + 4) * ncols + ispline] = static_cast<T>(E[i]);
451  out[(i * 6 + 5) * ncols + ispline] = static_cast<T>(F[i]);
452  }
453  }
454  }
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
size_type cols() const
Definition: OhmmsMatrix.h:78
double B(double x, int k, int i, const std::vector< double > &t)

◆ batched_evaluate()

void batched_evaluate ( const OffloadArray2D r,
OffloadArray3D u,
Rmax 
) const
inline

evaluate MultiQuinticSpline1D for multiple electrons and multiple pbc images

Parameters
[in]relectron distances [Nelec, Npbc]
[out]uvalue of all splines at all electron distances [Nelec, Npbc, Nsplines]
Rmaxspline will evaluate to zero for any distance greater than or equal to Rmax

Definition at line 171 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, Matrix< T, Alloc >::cols(), Array< T, D, ALLOC >::data(), Matrix< T, Alloc >::data(), qmcplusplus::Units::charge::e, MultiQuinticSpline1D< T >::first_deriv_, LogGridLight< T >::getCL(), qmcplusplus::lower_bound(), MultiQuinticSpline1D< T >::myGrid, MultiQuinticSpline1D< T >::num_splines_, Array< T, D, ALLOC >::size(), and Matrix< T, Alloc >::size().

172  {
173  const size_t nElec = r.size(0);
174  const size_t Nxyz = r.size(1); // number of PBC images
175  assert(nElec == u.size(0));
176  assert(Nxyz == u.size(1));
177  const size_t nRnl = u.size(2); // number of splines
178  const size_t nR = nElec * Nxyz; // total number of positions to evaluate
179 
180  double one_over_log_delta = myGrid.OneOverLogDelta;
181  T lower_bound = myGrid.lower_bound;
182  T log_delta = myGrid.LogDelta;
183 
184  auto* r_ptr = r.data();
185  auto* u_ptr = u.data();
186 
187  auto* coeff_ptr = coeffs_.data();
188  auto* first_deriv_ptr = first_deriv_.data();
189  const size_t nCols = coeffs_.cols();
190  const size_t coefsize = coeffs_.size();
191  const int nsplines = num_splines_;
192 
193  PRAGMA_OFFLOAD("omp target teams distribute parallel for \
194  map(to:coeff_ptr[:coefsize], first_deriv_ptr[:nsplines]) \
195  map(to:r_ptr[:nR], u_ptr[:nRnl*nR])")
196  for (int ir = 0; ir < nR; ir++)
197  {
198  if (r_ptr[ir] >= Rmax)
199  {
200  for (int i = 0; i < nsplines; ++i)
201  u_ptr[ir * nRnl + i] = 0.0;
202  }
203  else if (r_ptr[ir] < lower_bound)
204  {
205  const T dr = r_ptr[ir] - lower_bound;
206  for (int i = 0; i < nsplines; ++i)
207  u_ptr[ir * nRnl + i] = coeff_ptr[i] + first_deriv_ptr[i] * dr;
208  }
209  else
210  {
211  int loc;
212  const auto cL = LogGridLight<T>::getCL(r_ptr[ir], loc, one_over_log_delta, lower_bound, log_delta);
213  const size_t offset = loc * 6;
214  const T* restrict a = coeff_ptr + nCols * (offset + 0);
215  const T* restrict b = coeff_ptr + nCols * (offset + 1);
216  const T* restrict c = coeff_ptr + nCols * (offset + 2);
217  const T* restrict d = coeff_ptr + nCols * (offset + 3);
218  const T* restrict e = coeff_ptr + nCols * (offset + 4);
219  const T* restrict f = coeff_ptr + nCols * (offset + 5);
220  for (int i = 0; i < nsplines; ++i)
221  u_ptr[ir * nRnl + i] = a[i] + cL * (b[i] + cL * (c[i] + cL * (d[i] + cL * (e[i] + cL * f[i]))));
222  }
223  }
224  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
TinyVector< T, 3 > lower_bound(const TinyVector< T, 3 > &a, const TinyVector< T, 3 > &b)
helper function to determine the lower bound of a domain (need to move up)
size_type cols() const
Definition: OhmmsMatrix.h:78
for(int i=0;i< size_test;++i) CHECK(Approx(gauss_random_vals[offset_for_rs+i])
size_type size() const
Definition: OhmmsMatrix.h:76
static T getCL(T r, int &loc, double one_over_log_delta, T lower_bound, double log_delta)

◆ batched_evaluateVGL()

void batched_evaluateVGL ( const OffloadArray2D r,
OffloadArray4D vgl,
Rmax 
) const
inline

evaluate value, first deriv, second deriv of MultiQuinticSpline1D for multiple electrons and multiple pbc images

r is assumed to be up-to-date on the device when entering this function, and vgl will be up to date on the device when exiting this function

Parameters
[in]relectron distances [Nelec, Npbc]
[out]vglval/d1/d2 of all splines at all electron distances [3(val,d1,d2), Nelec, Npbc, Nsplines]
Rmaxspline and derivatives will evaluate to zero for any distance greater than or equal to Rmax

Definition at line 236 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, Matrix< T, Alloc >::cols(), Array< T, D, ALLOC >::data(), Matrix< T, Alloc >::data(), Array< T, D, ALLOC >::data_at(), qmcplusplus::Units::charge::e, MultiQuinticSpline1D< T >::first_deriv_, LogGridLight< T >::getCL(), qmcplusplus::lower_bound(), MultiQuinticSpline1D< T >::myGrid, MultiQuinticSpline1D< T >::num_splines_, Array< T, D, ALLOC >::size(), and Matrix< T, Alloc >::size().

237  {
238  const size_t nElec = r.size(0);
239  const size_t Nxyz = r.size(1); // number of PBC images
240  assert(3 == vgl.size(0));
241  assert(nElec == vgl.size(1));
242  assert(Nxyz == vgl.size(2));
243  const size_t nRnl = vgl.size(3); // number of splines
244  const size_t nR = nElec * Nxyz; // total number of positions to evaluate
245 
246  double one_over_log_delta = myGrid.OneOverLogDelta;
247  T lower_bound = myGrid.lower_bound;
248  T dlog_ratio = myGrid.LogDelta;
249 
250  auto* r_ptr = r.data();
251  auto* u_ptr = vgl.data_at(0, 0, 0, 0);
252  auto* du_ptr = vgl.data_at(1, 0, 0, 0);
253  auto* d2u_ptr = vgl.data_at(2, 0, 0, 0);
254 
255  auto* coeff_ptr = coeffs_.data();
256  auto* first_deriv_ptr = first_deriv_.data();
257  const size_t nCols = coeffs_.cols();
258  const size_t coefsize = coeffs_.size();
259  const auto nsplines = num_splines_;
260 
261  constexpr T ctwo(2);
262  constexpr T cthree(3);
263  constexpr T cfour(4);
264  constexpr T cfive(5);
265  constexpr T csix(6);
266  constexpr T c12(12);
267  constexpr T c20(20);
268 
269  PRAGMA_OFFLOAD("omp target teams distribute parallel for \
270  map(to: first_deriv_ptr[:nsplines], coeff_ptr[:coefsize]) \
271  map(to: r_ptr[:nR], u_ptr[:nRnl*nR], du_ptr[:nRnl*nR], d2u_ptr[:nRnl*nR])")
272  for (size_t ir = 0; ir < nR; ir++)
273  {
274  if (r_ptr[ir] >= Rmax)
275  {
276  for (size_t i = 0; i < nsplines; ++i)
277  {
278  u_ptr[ir * nRnl + i] = 0.0;
279  du_ptr[ir * nRnl + i] = 0.0;
280  d2u_ptr[ir * nRnl + i] = 0.0;
281  }
282  }
283  else if (r_ptr[ir] < lower_bound)
284  {
285  const T dr = r_ptr[ir] - lower_bound;
286  const T* restrict a = coeff_ptr;
287  // const T* restrict a = coeffs_[0];
288  for (size_t i = 0; i < nsplines; ++i)
289  {
290  u_ptr[ir * nRnl + i] = a[i] + first_deriv_ptr[i] * dr;
291  du_ptr[ir * nRnl + i] = first_deriv_ptr[i];
292  d2u_ptr[ir * nRnl + i] = 0.0;
293  }
294  }
295  else
296  {
297  int loc;
298  const auto cL = LogGridLight<T>::getCL(r_ptr[ir], loc, one_over_log_delta, lower_bound, dlog_ratio);
299  // const auto cL = myGrid.getCLForQuintic(r_list[ir], loc);
300  const size_t offset = loc * 6;
301  const T* restrict a = coeff_ptr + nCols * (offset + 0);
302  const T* restrict b = coeff_ptr + nCols * (offset + 1);
303  const T* restrict c = coeff_ptr + nCols * (offset + 2);
304  const T* restrict d = coeff_ptr + nCols * (offset + 3);
305  const T* restrict e = coeff_ptr + nCols * (offset + 4);
306  const T* restrict f = coeff_ptr + nCols * (offset + 5);
307  for (size_t i = 0; i < nsplines; ++i)
308  {
309  u_ptr[ir * nRnl + i] = a[i] + cL * (b[i] + cL * (c[i] + cL * (d[i] + cL * (e[i] + cL * f[i]))));
310  du_ptr[ir * nRnl + i] =
311  b[i] + cL * (ctwo * c[i] + cL * (cthree * d[i] + cL * (cfour * e[i] + cL * f[i] * cfive)));
312  d2u_ptr[ir * nRnl + i] = ctwo * c[i] + cL * (csix * d[i] + cL * (c12 * e[i] + cL * f[i] * c20));
313  }
314  }
315  }
316  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
TinyVector< T, 3 > lower_bound(const TinyVector< T, 3 > &a, const TinyVector< T, 3 > &b)
helper function to determine the lower bound of a domain (need to move up)
size_type cols() const
Definition: OhmmsMatrix.h:78
for(int i=0;i< size_test;++i) CHECK(Approx(gauss_random_vals[offset_for_rs+i])
size_type size() const
Definition: OhmmsMatrix.h:76
static T getCL(T r, int &loc, double one_over_log_delta, T lower_bound, double log_delta)

◆ evaluate() [1/3]

void evaluate ( r,
T *restrict  u 
) const
inline

Definition at line 137 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, qmcplusplus::Units::charge::e, MultiQuinticSpline1D< T >::first_deriv_, MultiQuinticSpline1D< T >::myGrid, and MultiQuinticSpline1D< T >::num_splines_.

Referenced by CuspCorrectionAtomicBasis< T >::evaluate(), CuspCorrectionAtomicBasis< T >::evaluate_vgl(), and qmcplusplus::TEST_CASE().

138  {
139  if (r < myGrid.lower_bound)
140  {
141  const T dr = r - myGrid.lower_bound;
142  const T* restrict a = coeffs_[0];
143  for (size_t i = 0; i < num_splines_; ++i)
144  u[i] = a[i] + first_deriv_[i] * dr;
145  }
146  else
147  {
148  int loc;
149  const auto cL = myGrid.getCLForQuintic(r, loc);
150  const size_t offset = loc * 6;
151  //coeffs is an OhmmsMatrix and [] is a row access operator
152  //returning a pointer to 'row' which is normal type pointer []
153  const T* restrict a = coeffs_[offset + 0];
154  const T* restrict b = coeffs_[offset + 1];
155  const T* restrict c = coeffs_[offset + 2];
156  const T* restrict d = coeffs_[offset + 3];
157  const T* restrict e = coeffs_[offset + 4];
158  const T* restrict f = coeffs_[offset + 5];
159  for (size_t i = 0; i < num_splines_; ++i)
160  u[i] = a[i] + cL * (b[i] + cL * (c[i] + cL * (d[i] + cL * (e[i] + cL * f[i]))));
161  }
162  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_

◆ evaluate() [2/3]

void evaluate ( r,
T *restrict  u,
T *restrict  du,
T *restrict  d2u 
) const
inline

Definition at line 317 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, qmcplusplus::Units::charge::e, MultiQuinticSpline1D< T >::first_deriv_, MultiQuinticSpline1D< T >::myGrid, and MultiQuinticSpline1D< T >::num_splines_.

318  {
319  if (r < myGrid.lower_bound)
320  {
321  const T dr = r - myGrid.lower_bound;
322  const T* restrict a = coeffs_[0];
323  for (size_t i = 0; i < num_splines_; ++i)
324  {
325  u[i] = a[i] + first_deriv_[i] * dr;
326  du[i] = first_deriv_[i];
327  d2u[i] = 0.0;
328  }
329  }
330  else
331  {
332  int loc;
333  const auto cL = myGrid.getCLForQuintic(r, loc);
334  const size_t offset = loc * 6;
335 
336  constexpr T ctwo(2);
337  constexpr T cthree(3);
338  constexpr T cfour(4);
339  constexpr T cfive(5);
340  constexpr T csix(6);
341  constexpr T c12(12);
342  constexpr T c20(20);
343 
344  const T* restrict a = coeffs_[offset + 0];
345  const T* restrict b = coeffs_[offset + 1];
346  const T* restrict c = coeffs_[offset + 2];
347  const T* restrict d = coeffs_[offset + 3];
348  const T* restrict e = coeffs_[offset + 4];
349  const T* restrict f = coeffs_[offset + 5];
350 
351  for (size_t i = 0; i < num_splines_; ++i)
352  {
353  u[i] = a[i] + cL * (b[i] + cL * (c[i] + cL * (d[i] + cL * (e[i] + cL * f[i]))));
354  du[i] = b[i] + cL * (ctwo * c[i] + cL * (cthree * d[i] + cL * (cfour * e[i] + cL * f[i] * cfive)));
355  d2u[i] = ctwo * c[i] + cL * (csix * d[i] + cL * (c12 * e[i] + cL * f[i] * c20));
356  }
357  }
358  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_

◆ evaluate() [3/3]

void evaluate ( r,
T *restrict  u,
T *restrict  du,
T *restrict  d2u,
T *restrict  d3u 
) const
inline

compute upto 3rd derivatives

Definition at line 361 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, qmcplusplus::Units::charge::e, MultiQuinticSpline1D< T >::first_deriv_, MultiQuinticSpline1D< T >::myGrid, and MultiQuinticSpline1D< T >::num_splines_.

362  {
363  if (r < myGrid.lower_bound)
364  {
365  const T dr = r - myGrid.lower_bound;
366  const T* restrict a = coeffs_[0];
367  for (size_t i = 0; i < num_splines_; ++i)
368  {
369  u[i] = a[i] + first_deriv_[i] * dr;
370  du[i] = first_deriv_[i];
371  d2u[i] = 0.0;
372  d3u[i] = 0.0;
373  }
374  }
375  else
376  {
377  int loc;
378  const auto cL = myGrid.getCLForQuintic(r, loc);
379  const size_t offset = loc * 6;
380 
381  constexpr T ctwo(2);
382  constexpr T cthree(3);
383  constexpr T cfour(4);
384  constexpr T cfive(5);
385  constexpr T csix(6);
386  constexpr T c12(12);
387  constexpr T c20(20);
388  constexpr T c24(24);
389  constexpr T c60(60);
390 
391  const T* restrict a = coeffs_[offset + 0];
392  const T* restrict b = coeffs_[offset + 1];
393  const T* restrict c = coeffs_[offset + 2];
394  const T* restrict d = coeffs_[offset + 3];
395  const T* restrict e = coeffs_[offset + 4];
396  const T* restrict f = coeffs_[offset + 5];
397 
398  for (size_t i = 0; i < num_splines_; ++i)
399  {
400  u[i] = a[i] + cL * (b[i] + cL * (c[i] + cL * (d[i] + cL * (e[i] + cL * f[i]))));
401  du[i] = b[i] + cL * (ctwo * c[i] + cL * (cthree * d[i] + cL * (cfour * e[i] + cL * f[i] * cfive)));
402  d2u[i] = ctwo * c[i] + cL * (csix * d[i] + cL * (c12 * e[i] + cL * f[i] * c20));
403  d3u[i] = csix * d[i] + cL * (c24 * e[i] + cL * f[i] * c60);
404  }
405  }
406  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_

◆ finalize()

void finalize ( )
inline

finalize the construction

Definition at line 457 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, MultiQuinticSpline1D< T >::first_deriv_, and Matrix< T, Alloc >::updateTo().

458  {
459  first_deriv_.updateTo();
460  coeffs_.updateTo();
461  }
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
void updateTo(size_type size=0, std::ptrdiff_t offset=0)
Definition: OhmmsMatrix.h:371

◆ getNumSplines()

◆ initialize()

void initialize ( GT &  agrid,
int  norbs,
int  order = 5 
)
inline

initialize grid and container

Parameters
riminimum grid point
rfmaximum grid point
nptsnumber of grid points
nnumber of splines
oreder5=quintic and 3=cubic

Definition at line 416 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::coeffs_, MultiQuinticSpline1D< T >::first_deriv_, MultiQuinticSpline1D< T >::myGrid, MultiQuinticSpline1D< T >::num_splines_, MultiQuinticSpline1D< T >::r_max, Matrix< T, Alloc >::resize(), Matrix< T, Alloc >::size(), and MultiQuinticSpline1D< T >::spline_order.

Referenced by CuspCorrectionAtomicBasis< T >::initializeRadialSet(), and qmcplusplus::TEST_CASE().

417  {
418  myGrid.set(agrid.rmin(), agrid.rmax(), agrid.size());
419  r_max = myGrid.upper_bound;
420  if (coeffs_.size())
421  throw std::runtime_error("MultiQuinticSpline1D::initialize cannot reinitialize coeffs.");
422 
423  spline_order = order;
424  num_splines_ = norbs;
425  coeffs_.resize((order + 1) * agrid.size(), getAlignedSize<T>(norbs));
426  first_deriv_.resize(num_splines_);
427  }
size_t num_splines_
number of splines
LogGridLight< T > myGrid
will be the real grid
Vector< T, OffloadPinnedAllocator< T > > & first_deriv_
void resize(size_type n, size_type m)
Resize the container.
Definition: OhmmsMatrix.h:99
size_type size() const
Definition: OhmmsMatrix.h:76

◆ rmax()

T rmax ( ) const
inline

Definition at line 135 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::myGrid.

135 { return myGrid.upper_bound; }
LogGridLight< T > myGrid
will be the real grid

◆ setNumSplines()

void setNumSplines ( int  num_splines)
inline

Definition at line 464 of file MultiQuinticSpline1D.h.

References MultiQuinticSpline1D< T >::num_splines_.

464 { num_splines_ = num_splines; }
size_t num_splines_
number of splines

Member Data Documentation

◆ coeffs_

◆ coeffs_ptr_

const std::shared_ptr<CoeffType> coeffs_ptr_
private

coeffs[6*spline_points][num_splines+padding]

Definition at line 119 of file MultiQuinticSpline1D.h.

◆ first_deriv_

◆ first_deriv_ptr_

const std::shared_ptr<Vector<T, OffloadPinnedAllocator<T> > > first_deriv_ptr_
private

Definition at line 120 of file MultiQuinticSpline1D.h.

◆ myGrid

◆ num_splines_

◆ r_max

T r_max
private

maximum radius

Definition at line 113 of file MultiQuinticSpline1D.h.

Referenced by MultiQuinticSpline1D< T >::initialize().

◆ spline_order

size_t spline_order
private

order of spline

Definition at line 111 of file MultiQuinticSpline1D.h.

Referenced by MultiQuinticSpline1D< T >::initialize().


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