1#ifndef RPC_PERTURBATION_H
2#define RPC_PERTURBATION_H
4#include <util/param/ParamComposite.h>
7 template <
typename T>
class DArray;
13 template <
int D>
class RField;
23 using namespace Prdc::Cpu;
25 template <
int D>
class System;
26 template <
int D>
class Simulator;
79 virtual double hamiltonian(
double unperturbedHamiltonian);
121 System<D>
const &
system()
const;
172 assert(simulatorPtr_);
173 return *simulatorPtr_;
180 assert(simulatorPtr_);
181 return *simulatorPtr_;
200 #ifndef RPC_PERTURBATION_TPP
Base class for additive perturbations of standard FTS Hamiltonian.
Perturbation(Simulator< D > &simulator)
Constructor.
Simulator< D > const & simulator() const
Get parent Simulator<D> by const reference.
virtual void setup()
Complete any required initialization.
void setLambda(double lambda)
Set the perturbation parameter value.
virtual void saveState()
Save any required internal state variables.
virtual double hamiltonian(double unperturbedHamiltonian)
Compute and return the perturbation to the Hamiltonian.
virtual void restoreState()
Restore any required internal state variables.
virtual ~Perturbation()
Destructor.
double lambda() const
Get the perturbation parameter.
double lambda_
Strength of the perturbation.
virtual double df()
Compute and return derivative of H w/ respect to parameter lambda.
virtual void incrementDc(DArray< RField< D > > &dc)
Modify the generalized forces to include perturbation.
virtual void readParameters(std::istream &in)
Read parameters from archive.
System< D > const & system() const
Get parent System<D> by const reference.
Field theoretic simulator (base class).
Main class for SCFT or PS-FTS simulation of 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.