1#ifndef RPG_EINSTEIN_CRYSTAL_PERTURBATION_H
2#define RPG_EINSTEIN_CRYSTAL_PERTURBATION_H
4#include "Perturbation.h"
5#include <prdc/cuda/RField.h>
6#include <util/containers/DArray.h>
13 using namespace Prdc::Cuda;
15 template <
int D>
class Simulator;
55 virtual double hamiltonian(
double unperturbedHamiltonian);
102 double ecHamiltonian_;
105 double unperturbedHamiltonian_;
108 double stateEcHamiltonian_;
111 double stateUnperturbedHamiltonian_;
117 std::string referenceFieldFileName_;
120 void computeWcReference();
124 #ifndef RPG_EINSTEIN_CRYSTAL_PERTURBATION_TPP
Field of real double precision values on an FFT mesh.
Perturbation for Einstein crystal thermodynamic integration method.
virtual double df()
Compute and return derivative of free energy.
EinsteinCrystalPerturbation(Simulator< D > &simulator)
Constructor.
virtual double hamiltonian(double unperturbedHamiltonian)
Compute and return the perturbation to the Hamiltonian.
virtual void setup()
Complete any required initialization.
virtual void incrementDc(DArray< RField< D > > &dc)
Modify the generalized forces to include perturbation.
virtual ~EinsteinCrystalPerturbation()
Destructor.
virtual void restoreState()
Restore any required internal state variables.
virtual void saveState()
Save any required internal state variables.
virtual void readParameters(std::istream &in)
Read parameters from archive.
Base class for additive perturbations of standard FTS Hamiltonian.
System< D > const & system() const
Get parent System<D> by const reference.
double lambda_
Strength of the perturbation.
double lambda() const
Get the perturbation parameter.
Simulator< D > const & simulator() const
Get parent Simulator<D> by const reference.
Field theoretic simulator (base class).
Dynamically allocatable contiguous array template.
DArrayParam< Type > & readOptionalDArray(std::istream &in, const char *label, DArray< Type > &array, int n)
Add and read an optional DArray < Type > parameter.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void setClassName(const char *className)
Set class name string.
PSCF package top-level namespace.
Utility classes for scientific computation.