QMCPACK
FSUtilities.h
Go to the documentation of this file.
1 #ifndef FS_UTILITIES_H
2 #define FS_UTILITIES_H
3 
4 #include <vector>
5 #include "Configuration.h"
6 
7 namespace qmcplusplus
8 {
12 
13 void get_gridinfo_from_posgrid(const std::vector<PosType>& posgridlist, //list of grid points
14  const IndexType& axis, //the axis to get grid info. 0=x, 1=y,etc
15  RealType& lx, //the lower bound of grid (aka "left").
16  RealType& rx, //the upper bound (aka "right")
17  RealType& dx, // the grid spacing
18  IndexType& Nx); // the number of grid points
19 
20 /** Simpleaverage and error estimate
21  *
22  * input array of values to be averaged. returns avg and err.
23  * Can pass a start index to average from "start" to the end of the array
24  */
25 void getStats(const std::vector<RealType>& vals, RealType& avg, RealType& err, int start = 0);
26 
27 /** estimate equilibration of block data
28  *
29  * Assumes vals is an array to be averaged. This will estimate which, if any, of the
30  * data should be thrown out as equilibration data.
31  * Returns the index of the array to start averaging from.
32  * frac is the fraction of the data to average initially to help determine the equilibration
33  */
34 int estimateEquilibration(const std::vector<RealType>& vals, RealType frac = 0.75);
35 
36 } // namespace qmcplusplus
37 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
QMCTraits::IndexType IndexType
Definition: FSUtilities.h:11
QMCTraits::PosType PosType
QTBase::PosType PosType
Definition: Configuration.h:61
OHMMS_INDEXTYPE IndexType
define other types
Definition: Configuration.h:65
QMCTraits::RealType RealType
void getStats(const std::vector< RealType > &vals, RealType &avg, RealType &err, int start)
Simpleaverage and error estimate.
Definition: FSUtilities.cpp:31
int estimateEquilibration(const std::vector< RealType > &vals, RealType frac)
estimate equilibration of block data
Definition: FSUtilities.cpp:50
void get_gridinfo_from_posgrid(const std::vector< PosType > &posgridlist, const IndexType &axis, RealType &lx, RealType &rx, RealType &dx, IndexType &Nx)
Definition: FSUtilities.cpp:6