1#ifndef RPG_PERTURBATION_H
2#define RPG_PERTURBATION_H
4#include <util/param/ParamComposite.h>
7 template <
typename T>
class DArray;
24 using namespace Prdc::Cuda;
26 template <
int D>
class System;
27 template <
int D>
class Simulator;
78 virtual double hamiltonian(
double unperturbedHamiltonian);
120 System<D>
const &
system()
const;
171 assert(simulatorPtr_);
172 return *simulatorPtr_;
179 assert(simulatorPtr_);
180 return *simulatorPtr_;
199 #ifndef RPG_PERTURBATION_TPP
Field of real double precision values on an FFT mesh.
Base class for additive perturbations of standard FTS Hamiltonian.
virtual void incrementDc(DArray< RField< D > > &dc)
Modify the generalized forces to include perturbation.
void setLambda(double lambda)
Set the perturbation parameter value.
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.
virtual double df()
Compute and return derivative of H w/ respect to parameter lambda.
Simulator< D > const & simulator() const
Get parent Simulator<D> by const reference.
virtual ~Perturbation()
Destructor.
virtual void saveState()
Save any required internal state variables.
virtual void readParameters(std::istream &in)
Read parameters from archive.
virtual double hamiltonian(double unperturbedHamiltonian)
Compute and return the perturbation to the Hamiltonian.
Perturbation(Simulator< D > &simulator)
Constructor.
virtual void setup()
Complete any required initialization.
virtual void restoreState()
Restore any required internal state variables.
Field theoretic simulator (base class).
Main class for calculations that represent one system.
Dynamically allocatable contiguous array template.
An object that can read multiple parameters from file.
PSCF package top-level namespace.
Utility classes for scientific computation.