Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
gmx::CorrelationBlockData Class Reference

#include <gromacs/applied_forces/awh/correlationtensor.h>

Description

Correlation block averaging weight-only data.

Classes

struct  CoordData
 Correlation block averaging data. More...
 

Public Member Functions

 CorrelationBlockData (int numDim, double blockLengthInit)
 Constructor. More...
 
void restoreFromHistory (const CorrelationBlockDataHistory &blockHistory, const std::vector< CoordData > &coordData, const std::vector< double > &correlationIntegral)
 Restore the state from history. More...
 
void addData (double weight, gmx::ArrayRef< const double > data)
 Adds a weighted data vector to one point in the correlation grid. More...
 
void addBlockToCorrelationIntegral ()
 Adds a filled data block to correlation time integral.
 
double blockSumWeight () const
 Returns the sum weights for current block.
 
double blockSumSquareWeight () const
 Returns the sum weights^2 for current block.
 
double sumOverBlocksSquareBlockWeight () const
 Returns the sum over blocks of block weight^2.
 
double sumOverBlocksBlockSquareWeight () const
 Returns the sum over blocks of weight^2.
 
double blockLength () const
 Returns the length of each block used for block averaging.
 
void doubleBlockLength ()
 Double the length of each block used for block averaging.
 
int previousBlockIndex () const
 Return the last block index data was added to (needed only for block length in terms of time).
 
void setPreviousBlockIndex (int blockIndex)
 Set the last block index data was added to. More...
 
const std::vector< CoordData > & coordData () const
 Return sums for each coordinate dimension.
 
const std::vector< double > & correlationIntegral () const
 Return the correlation integral tensor.
 

Constructor & Destructor Documentation

gmx::CorrelationBlockData::CorrelationBlockData ( int  numDim,
double  blockLengthInit 
)
inline

Constructor.

Parameters
[in]numDimThe dimensionality.
[in]blockLengthInitThe initial block length.

Member Function Documentation

void gmx::CorrelationBlockData::addData ( double  weight,
gmx::ArrayRef< const double >  data 
)
inline

Adds a weighted data vector to one point in the correlation grid.

Parameters
[in]weightThe weight of the data.
[in]dataOne data point for each grid dimension.
void gmx::CorrelationBlockData::restoreFromHistory ( const CorrelationBlockDataHistory &  blockHistory,
const std::vector< CoordData > &  coordData,
const std::vector< double > &  correlationIntegral 
)

Restore the state from history.

Parameters
[in]blockHistoryThe block data history containing the weight sums.
[in]coordDataThe coordinate data.
[in]correlationIntegralThe correlation integral for all tensor elements.
void gmx::CorrelationBlockData::setPreviousBlockIndex ( int  blockIndex)
inline

Set the last block index data was added to.

Parameters
[in]blockIndexThe block index.

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