1#ifndef RPG_BINARY_STRUCTURE_FACTOR_GRID_H
2#define RPG_BINARY_STRUCTURE_FACTOR_GRID_H
13#include <prdc/cuda/RFieldDft.h>
14#include <prdc/cuda/RField.h>
15#include <pscf/math/IntVec.h>
16#include <util/accumulators/Average.h>
17#include <util/containers/DArray.h>
27 template <
int D>
class System;
185 int nSamplePerBlock_;
203 std::vector<double> qList_;
206 std::map<double, double> averageSMap_;
An IntVec<D, T> is a D-component vector of elements of integer type T.
Fourier transform of a real field on an FFT mesh.
Field of real double precision values on an FFT mesh.
const std::string & outputFileName() const
Return outputFileName string.
Analyzer()
Default constructor.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
int interval() const
Get interval value.
void readInterval(std::istream &in)
Read interval from file, with error checking.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
void setup()
Clear accumulators.
void sample(long iStep)
Add particles to BinaryStructureFactor accumulators.
void setClassName(const char *className)
Set class name string.
DArray< double > structureFactors_
Structure factor.
void averageStructureFactor()
Compute average S(k) over k of equal magnitude.
System< D > * systemPtr_
Pointer to the parent system.
const Average & accumulator(int i) const
Get Average accumulator for a specific value.
void computeStructureFactor()
Compute structure factor.
int nWave_
Number of wavevectors.
std::string filename_
Output filename.
void output()
Output results to predefined output file.
Simulator< D > & simulator()
Return reference to parent Simulator.
void readParameters(std::istream &in)
Read parameters from file.
System< D > & system()
Return reference to parent system.
~BinaryStructureFactorGrid()
Destructor.
Simulator< D > * simulatorPtr_
Pointer to parent Simulator.
BinaryStructureFactorGrid(Simulator< D > &simulator, System< D > &system)
Constructor.
std::ofstream outputFile_
Output file stream.
Field theoretic simulator (base class).
Main class, representing one complete system.
Calculates the average and variance of a sampled property.
Dynamically allocatable contiguous array template.
DArrayParam< Type > & readDArray(std::istream &in, const char *label, DArray< Type > &array, int n)
Add and read a required DArray < Type > parameter.
void setClassName(const char *className)
Set class name string.
virtual void save(Serializable::OArchive &ar)
Saves all parameters to an archive.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
virtual void loadParameters(Serializable::IArchive &ar)
Load state from archive, without adding Begin and End lines.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.