![]() |
QMCPACK
|
Classes | |
struct | IRPair |
Public Types | |
enum | ReferenceEnergy { vacuum, neutral, noref } |
using | Real = REAL |
using | Point = typename NEReferencePoints::Point |
using | Points = typename NEReferencePoints::Points |
using | BufferType = PooledData< Real > |
using | POLT = PtclOnLatticeTraits |
using | ParticlePos = POLT::ParticlePos |
using | AxTensor = Tensor< Real, OHMMS_DIM > |
Public Member Functions | |
NESpaceGrid (SpaceGridInput &sgi, const Points &points, const int nvalues, const bool is_periodic) | |
This constructor is used for electron only grids. More... | |
NESpaceGrid (SpaceGridInput &sgi, const Points &points, const int ndp, const int nvalues, const bool is_periodic) | |
This is the general constructor. More... | |
NESpaceGrid (SpaceGridInput &sgi, const Points &points, ParticlePos &static_particle_positions, std::vector< Real > &static_particle_charges, const int ndp, const int nvalues, const bool is_periodic) | |
This is the constructor for when PStatic is used. More... | |
NESpaceGrid (const NESpaceGrid &sg)=default | |
NESpaceGrid & | operator= (const NESpaceGrid &sg)=default |
void | write_description (std::ostream &os, const std::string &indent) |
void | registerGrid (hdf_archive &file, int grid_index) |
set up Observable helper(s) for this grid almost unchanged from legacy More... | |
void | write (hdf_archive &file) const |
void | accumulate (const ParticlePos &R, const Matrix< Real > &values, std::vector< bool > &particles_outside) |
void | accumulate (const ParticlePos &R, const Matrix< Real > &values, std::vector< bool > &particles_outside, const DistanceTableAB &dtab) |
SpaceGridAccumulate not type erased and with its own particular interface. More... | |
bool | check_grid (void) |
int | nDomains (void) const |
void | sum (const BufferType &buf, Real *vals) |
auto & | getDataVector () |
Static Public Member Functions | |
static void | collect (NESpaceGrid &reduction_grid, RefVector< NESpaceGrid > grid_for_each_crowd) |
Private Member Functions | |
void | copyToSoA () |
copy AxisGrid data to SoA layout for evaluation More... | |
void | zero () |
bool | initializeCoordSystem () |
dispatch to correct initialize for coord type More... | |
bool | initializeRectilinear (const SpaceGridInput &input, const Points &points) |
Initialize NESpaceGrid for rectilinear grid. More... | |
bool | initializeCylindrical (const SpaceGridInput &input, const Points &points) |
Initialize NESpaceGrid for cylindrical grid. More... | |
bool | initializeSpherical (const SpaceGridInput &input, const Points &points) |
Initialize NESpaceGrid for cylindrical grid. More... | |
void | someMoreAxisGridStuff () |
Initialize NESpaceGrid for voronoi grid. More... | |
Static Private Member Functions | |
static Point | deriveOrigin (const SpaceGridInput &input, const Points &points) |
return actual origin point based on input More... | |
static void | processAxis (const SpaceGridInput &input, const Points &points, AxTensor &axes, AxTensor &axinv) |
create axes and axinv tensors More... | |
Private Attributes | |
SpaceGridInput & | input_ |
refrence points for the space grid this reference it to the EstimatorManagers EDE's spacegrid_inputs_ More... | |
int | ndparticles_ |
bool | is_periodic_ |
const Points & | points_ |
refrence points for the space grid this reference is to the EstimatorManagers EDE's reference points More... | |
int | buffer_start_ |
int | buffer_end_ |
const int | buffer_offset_ {0} |
in legacy used to be the starting index into the collectibles buffer. More... | |
int | ndomains_ {1} |
int | nvalues_per_domain_ |
Real | volume_ |
Matrix< Real > | domain_uwidths_ |
std::string | axlabel_ [OHMMS_DIM] |
std::array< std::vector< int >, 3 > | gmap_ |
Real | odu_ [OHMMS_DIM] |
Real | umin_ [OHMMS_DIM] |
Real | umax_ [OHMMS_DIM] |
int | dm_ [OHMMS_DIM] |
ReferenceEnergy | reference_energy_ |
std::vector< Real > | data_ |
std::shared_ptr< ObservableHelper > | observable_helper_ |
std::vector< IRPair > | nearcell_ |
Matrix< Real > | domain_volumes_ |
These are calculated by NESpaceGrid before accumulation and possibly belong in SpaceGridInput as derived inputs. More... | |
Matrix< Real > | domain_centers_ |
Point | origin_ |
AxTensor | axes_ |
AxTensor | axinv_ |
Friends | |
template<typename T > | |
class | testing::NESpaceGridTests |
Definition at line 52 of file NESpaceGrid.h.
struct qmcplusplus::NESpaceGrid::IRPair |
Definition at line 259 of file NESpaceGrid.h.
Class Members | ||
---|---|---|
int | i | |
Real | r |
using BufferType = PooledData<Real> |
Definition at line 58 of file NESpaceGrid.h.
using ParticlePos = POLT::ParticlePos |
Definition at line 60 of file NESpaceGrid.h.
using Point = typename NEReferencePoints::Point |
Definition at line 56 of file NESpaceGrid.h.
using Points = typename NEReferencePoints::Points |
Definition at line 57 of file NESpaceGrid.h.
using POLT = PtclOnLatticeTraits |
Definition at line 59 of file NESpaceGrid.h.
using Real = REAL |
Definition at line 55 of file NESpaceGrid.h.
|
strong |
Enumerator | |
---|---|
vacuum | |
neutral | |
noref |
Definition at line 62 of file NESpaceGrid.h.
NESpaceGrid | ( | SpaceGridInput & | sgi, |
const Points & | points, | ||
const int | nvalues, | ||
const bool | is_periodic | ||
) |
This constructor is used for electron only grids.
[in] | sgi | input object for space grid. |
[in] | reference | reference points from which origin and on other reference points referenced in input object are to be found |
[in] | nvalues | number of fields the owning class wants for each grid point. |
[in] | is_periodic | properly names is what is says |
NESpaceGrid | ( | SpaceGridInput & | sgi, |
const Points & | points, | ||
const int | ndp, | ||
const int | nvalues, | ||
const bool | is_periodic | ||
) |
This is the general constructor.
[in] | sgi | input object for space grid. |
[in] | reference | reference points from which origin and on other reference points referenced in input object are to be found |
[in] | ndp | number of particles that can move |
[in] | nvalues | number of fields the owning class wants for each grid point. |
[in] | is_periodic | properly names is what is says |
NESpaceGrid | ( | SpaceGridInput & | sgi, |
const Points & | points, | ||
ParticlePos & | static_particle_positions, | ||
std::vector< Real > & | static_particle_charges, | ||
const int | ndp, | ||
const int | nvalues, | ||
const bool | is_periodic | ||
) |
This is the constructor for when PStatic is used.
|
default |
void accumulate | ( | const ParticlePos & | R, |
const Matrix< Real > & | values, | ||
std::vector< bool > & | particles_outside | ||
) |
Definition at line 583 of file NESpaceGrid.cpp.
References qmcplusplus::acos(), qmcplusplus::app_log(), qmcplusplus::atan2(), qmcplusplus::dot(), error(), qmcplusplus::floor(), OHMMS_DIM, Matrix< T, Alloc >::size1(), Matrix< T, Alloc >::size2(), and qmcplusplus::sqrt().
void accumulate | ( | const ParticlePos & | R, |
const Matrix< Real > & | values, | ||
std::vector< bool > & | particles_outside, | ||
const DistanceTableAB & | dtab | ||
) |
SpaceGridAccumulate not type erased and with its own particular interface.
the composing class needs to provide the following to spave grid.
[in] | R | particle positions |
[in] | values | matrix indexed particle, value |
[in/out] | buf buffer to accumulating grid to | |
[out] | particles_outside | mask vector of particles falling outside the grid box |
[in] | dtab | particle A to Particle B distance table |
right now cartesian grids are all accumulated as if they were "periodic" which honestly does not seem to be well defined with repsect to these grids. But for the particle cell itself it doesn't make sense that it be periodic unless it is exactly comenserate with the particle cell (at least IMHO)
Definition at line 543 of file NESpaceGrid.cpp.
bool check_grid | ( | void | ) |
Definition at line 723 of file NESpaceGrid.cpp.
References qmcplusplus::acos(), qmcplusplus::app_log(), qmcplusplus::atan2(), qmcplusplus::dot(), qmcplusplus::floor(), OHMMS_DIM, and qmcplusplus::sqrt().
|
static |
Definition at line 706 of file NESpaceGrid.cpp.
References NESpaceGrid< REAL >::data_.
|
private |
copy AxisGrid data to SoA layout for evaluation
Definition at line 529 of file NESpaceGrid.cpp.
References qmcplusplus::floor(), and OHMMS_DIM.
|
staticprivate |
return actual origin point based on input
Definition at line 110 of file NESpaceGrid.cpp.
|
inline |
|
private |
dispatch to correct initialize for coord type
Definition at line 71 of file NESpaceGrid.cpp.
|
private |
Initialize NESpaceGrid for cylindrical grid.
[in] | input | SpaceGridInput object |
[in] | points | ReferencePoints object for grid Causes side effects updating origin_ fixed up origin for grid axes_ axes with scaling applied to it. axinv_ the inverse of the axes with scaling applied |
Definition at line 145 of file NESpaceGrid.cpp.
|
private |
Initialize NESpaceGrid for rectilinear grid.
[in] | input | SpaceGridInput object |
[in] | points | ReferencePoints object for grid Causes side effects updating origin_ fixed up origin for grid axes_ axes with scaling applied to it. axinv_ the inverse of the axes with scaling applied |
Definition at line 126 of file NESpaceGrid.cpp.
|
private |
Initialize NESpaceGrid for cylindrical grid.
[in] | input | SpaceGridInput object |
[in] | points | ReferencePoints object for grid Causes side effects updating origin_ fixed up origin for grid axes_ axes with scaling applied to it. axinv_ the inverse of the axes with scaling applied |
Definition at line 162 of file NESpaceGrid.cpp.
|
inline |
|
default |
|
staticprivate |
create axes and axinv tensors
[in] | input | space grid input |
[out] | axes | |
[out] | axinv |
Definition at line 91 of file NESpaceGrid.cpp.
References qmcplusplus::inverse(), and OHMMS_DIM.
void registerGrid | ( | hdf_archive & | file, |
int | grid_index | ||
) |
set up Observable helper(s) for this grid almost unchanged from legacy
Definition at line 396 of file NESpaceGrid.cpp.
References ObservableHelper::addProperty(), qmcplusplus::hdf::coord, qmcplusplus::int2string(), qmcplusplus::n, qmcplusplus::oh, OHMMS_DIM, Matrix< T, Alloc >::resize(), and ObservableHelper::set_dimensions().
|
private |
Initialize NESpaceGrid for voronoi grid.
[in] | input | SpaceGridInput object |
[in] | points | ReferencePoints object for grid |
[in] | rs_static | Initial static particle positions Causes side effects updating origin_ fixed up origin for grid axes_ axes with scaling applied to it. axinv_ the inverse of the axes with scaling applied Another function to cut scopes to sort of manageable size. does nothing but create many side effects |
Definition at line 179 of file NESpaceGrid.cpp.
References qmcplusplus::abs(), qmcplusplus::app_log(), qmcplusplus::cos(), qmcplusplus::det(), qmcplusplus::dot(), OHMMS_DIM, and qmcplusplus::sin().
void sum | ( | const BufferType & | buf, |
Real * | vals | ||
) |
Definition at line 690 of file NESpaceGrid.cpp.
References qmcplusplus::n.
void write | ( | hdf_archive & | file | ) | const |
Definition at line 504 of file NESpaceGrid.cpp.
References qmcplusplus::syclBLAS::copy_n(), and hdf_archive::pop().
void write_description | ( | std::ostream & | os, |
const std::string & | indent | ||
) |
Definition at line 353 of file NESpaceGrid.cpp.
References OHMMS_DIM, and qmcplusplus::Units::time::s.
|
private |
Definition at line 717 of file NESpaceGrid.cpp.
|
friend |
Definition at line 268 of file NESpaceGrid.h.
|
private |
Definition at line 242 of file NESpaceGrid.h.
|
private |
Definition at line 243 of file NESpaceGrid.h.
|
private |
Definition at line 249 of file NESpaceGrid.h.
|
private |
Definition at line 224 of file NESpaceGrid.h.
Referenced by NESpaceGridTests< REAL >::getBufferEnd().
|
private |
in legacy used to be the starting index into the collectibles buffer.
Maintained to use more legacy code without modificaiton in the short term. In the long term its possible the entire way the grid data is structured in memory should be redesigned.
Definition at line 230 of file NESpaceGrid.h.
|
private |
Definition at line 223 of file NESpaceGrid.h.
Referenced by NESpaceGridTests< REAL >::getBufferStart().
|
private |
Definition at line 256 of file NESpaceGrid.h.
Referenced by NESpaceGrid< REAL >::collect(), NESpaceGridTests< REAL >::getData(), and NESpaceGrid< REAL >::getDataVector().
|
private |
Definition at line 254 of file NESpaceGrid.h.
Definition at line 239 of file NESpaceGrid.h.
Definition at line 248 of file NESpaceGrid.h.
These are calculated by NESpaceGrid before accumulation and possibly belong in SpaceGridInput as derived inputs.
i.e. they are immutable and only based on the input. Alternately they would be appropriate to calculate at construction time.
Definition at line 238 of file NESpaceGrid.h.
|
private |
Definition at line 250 of file NESpaceGrid.h.
|
private |
refrence points for the space grid this reference it to the EstimatorManagers EDE's spacegrid_inputs_
Definition at line 214 of file NESpaceGrid.h.
|
private |
Definition at line 216 of file NESpaceGrid.h.
|
private |
Definition at line 231 of file NESpaceGrid.h.
Referenced by NESpaceGrid< REAL >::nDomains().
|
private |
Definition at line 215 of file NESpaceGrid.h.
|
private |
Definition at line 264 of file NESpaceGrid.h.
|
private |
Definition at line 232 of file NESpaceGrid.h.
|
private |
Definition at line 257 of file NESpaceGrid.h.
Definition at line 251 of file NESpaceGrid.h.
Referenced by NESpaceGridTests< REAL >::getOdu().
|
private |
Definition at line 241 of file NESpaceGrid.h.
|
private |
refrence points for the space grid this reference is to the EstimatorManagers EDE's reference points
Definition at line 220 of file NESpaceGrid.h.
|
private |
Definition at line 255 of file NESpaceGrid.h.
Definition at line 253 of file NESpaceGrid.h.
Definition at line 252 of file NESpaceGrid.h.
|
private |
Definition at line 247 of file NESpaceGrid.h.