QMCPACK
PAOps< T, 3, T1 > Struct Template Reference

specialization for three-dimension More...

+ Collaboration diagram for PAOps< T, 3, T1 >:

Public Types

using real_type = T
 
using complex_type = std::complex< T >
 
using rpos_type = TinyVector< T, 3 >
 
using ipos_type = TinyVector< T1, 3 >
 
using cpos_type = TinyVector< std::complex< T1 >, 3 >
 

Static Public Member Functions

static void scale (T a, const ParticleAttrib< cpos_type > &pa, ParticleAttrib< rpos_type > &pb)
 
static void scale (T a, const ParticleAttrib< ipos_type > &pa, ParticleAttrib< rpos_type > &pb)
 
static void axpy (T a, const ParticleAttrib< cpos_type > &pa, ParticleAttrib< rpos_type > &pb)
 
static void axpy (T a, const ParticleAttrib< ipos_type > &pa, ParticleAttrib< rpos_type > &pb)
 
static void axpy (T a, const ParticleAttrib< cpos_type > &pa, const ParticleAttrib< ipos_type > &pb, ParticleAttrib< rpos_type > &py)
 
static void axpy (T a, const ParticleAttrib< ipos_type > &pa, const ParticleAttrib< ipos_type > &pb, ParticleAttrib< rpos_type > &py)
 
static void copy (const ParticleAttrib< ipos_type > &px, ParticleAttrib< rpos_type > &py)
 
static void copy (const ParticleAttrib< cpos_type > &px, ParticleAttrib< rpos_type > &py)
 

Detailed Description

template<class T, class T1>
struct qmcplusplus::PAOps< T, 3, T1 >

specialization for three-dimension

Definition at line 228 of file ParticleAttribOps.h.

Member Typedef Documentation

◆ complex_type

using complex_type = std::complex<T>

Definition at line 231 of file ParticleAttribOps.h.

◆ cpos_type

using cpos_type = TinyVector<std::complex<T1>, 3>

Definition at line 234 of file ParticleAttribOps.h.

◆ ipos_type

using ipos_type = TinyVector<T1, 3>

Definition at line 233 of file ParticleAttribOps.h.

◆ real_type

using real_type = T

Definition at line 230 of file ParticleAttribOps.h.

◆ rpos_type

using rpos_type = TinyVector<T, 3>

Definition at line 232 of file ParticleAttribOps.h.

Member Function Documentation

◆ axpy() [1/4]

static void axpy ( a,
const ParticleAttrib< cpos_type > &  pa,
ParticleAttrib< rpos_type > &  pb 
)
inlinestatic

Definition at line 248 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

249  {
250  for (int i = 0; i < pa.size(); ++i)
251  {
252  pb[i][0] += a * pa[i][0].real();
253  pb[i][1] += a * pa[i][1].real();
254  pb[i][2] += a * pa[i][2].real();
255  }
256  }

◆ axpy() [2/4]

static void axpy ( a,
const ParticleAttrib< ipos_type > &  pa,
ParticleAttrib< rpos_type > &  pb 
)
inlinestatic

Definition at line 258 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

259  {
260  for (int i = 0; i < pa.size(); ++i)
261  {
262  pb[i][0] += a * pa[i][0];
263  pb[i][1] += a * pa[i][1];
264  pb[i][2] += a * pa[i][2];
265  }
266  }

◆ axpy() [3/4]

static void axpy ( a,
const ParticleAttrib< cpos_type > &  pa,
const ParticleAttrib< ipos_type > &  pb,
ParticleAttrib< rpos_type > &  py 
)
inlinestatic

Definition at line 268 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

272  {
273  for (int i = 0; i < pa.size(); ++i)
274  {
275  py[i][0] = a * pa[i][0].real() + pb[i][0];
276  py[i][1] = a * pa[i][1].real() + pb[i][1];
277  py[i][2] = a * pa[i][2].real() + pb[i][2];
278  }
279  }

◆ axpy() [4/4]

static void axpy ( a,
const ParticleAttrib< ipos_type > &  pa,
const ParticleAttrib< ipos_type > &  pb,
ParticleAttrib< rpos_type > &  py 
)
inlinestatic

Definition at line 281 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

285  {
286  for (int i = 0; i < pa.size(); ++i)
287  {
288  py[i][0] = a * pa[i][0] + pb[i][0];
289  py[i][1] = a * pa[i][1] + pb[i][1];
290  py[i][2] = a * pa[i][2] + pb[i][2];
291  }
292  }

◆ copy() [1/2]

static void copy ( const ParticleAttrib< ipos_type > &  px,
ParticleAttrib< rpos_type > &  py 
)
inlinestatic

Definition at line 294 of file ParticleAttribOps.h.

294 { py = px; }

◆ copy() [2/2]

static void copy ( const ParticleAttrib< cpos_type > &  px,
ParticleAttrib< rpos_type > &  py 
)
inlinestatic

Definition at line 296 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

297  {
298  for (int i = 0; i < px.size(); ++i)
299  {
300  py[i][0] = px[i][0].real();
301  py[i][1] = px[i][1].real();
302  py[i][2] = px[i][2].real();
303  }
304  }

◆ scale() [1/2]

static void scale ( a,
const ParticleAttrib< cpos_type > &  pa,
ParticleAttrib< rpos_type > &  pb 
)
inlinestatic

Definition at line 236 of file ParticleAttribOps.h.

References Vector< T, Alloc >::size().

237  {
238  for (int i = 0; i < pa.size(); i++)
239  {
240  pb[i][0] = a * pa[i][0].real();
241  pb[i][1] = a * pa[i][1].real();
242  pb[i][2] = a * pa[i][2].real();
243  }
244  }

◆ scale() [2/2]

static void scale ( a,
const ParticleAttrib< ipos_type > &  pa,
ParticleAttrib< rpos_type > &  pb 
)
inlinestatic

Definition at line 246 of file ParticleAttribOps.h.

246 { pb = a * pa; }

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