1#ifndef RPC_EINSTEIN_CRYSTAL_PERTURBATION_H
2#define RPC_EINSTEIN_CRYSTAL_PERTURBATION_H
4#include "Perturbation.h"
7 template <
typename T>
class DArray;
13 template <
int D>
class RField;
23 using namespace Prdc::Cpu;
25 template <
int D>
class Simulator;
71 virtual double hamiltonian(
double unperturbedHamiltonian);
118 double ecHamiltonian_;
121 double unperturbedHamiltonian_;
124 double stateEcHamiltonian_;
127 double stateUnperturbedHamiltonian_;
130 std::string referenceFieldFileName_;
136 void computeWcReference();
140 #ifndef RPC_EINSTEIN_CRYSTAL_PERTURBATION_TPP
Field of real double precision values on an FFT mesh.
Perturbation for Einstein crystal thermodynamic integration method.
virtual void restoreState()
Restore any required internal state variables.
virtual void readParameters(std::istream &in)
Read parameters from archive.
virtual void saveState()
Save any required internal state variables.
EinsteinCrystalPerturbation(Simulator< D > &simulator)
Constructor.
virtual double df()
Compute and return derivative of free energy.
virtual void incrementDc(DArray< RField< D > > &dc)
Modify the generalized forces to include perturbation.
virtual void setup()
Complete any required initialization.
virtual double hamiltonian(double unperturbedHamiltonian)
Compute and return the perturbation to the Hamiltonian.
virtual ~EinsteinCrystalPerturbation()
Destructor.
Base class for additive perturbations of standard FTS Hamiltonian.
Simulator< D > const & simulator() const
Get parent Simulator<D> by const reference.
double lambda() const
Get the perturbation parameter.
double lambda_
Strength of the perturbation.
System< D > const & system() const
Get parent System<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.