PSCF v1.3.1
rpg/fts/analyzer/PerturbationDerivative.h
1#ifndef RPG_PERTURBATION_DERIVATIVE_H
2#define RPG_PERTURBATION_DERIVATIVE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "AverageAnalyzer.h"
12
13namespace Pscf {
14namespace Rpg {
15
16 template <int D> class System;
17 template <int D> class Simulator;
18
19 using namespace Util;
20
26 template <int D>
28 {
29
30 public:
31
36
41
45 virtual double compute();
46
53 virtual void outputValue(int step, double value);
54
60
61 protected:
62
65 using AverageAnalyzer<D>::outputFile_;
67
68 };
69
70 // Explicit instantiation declarations
71 extern template class PerturbationDerivative<1>;
72 extern template class PerturbationDerivative<2>;
73 extern template class PerturbationDerivative<3>;
74
75}
76}
77#endif
virtual void readParameters(std::istream &in)
Read interval, outputFileName and (optionally) nSamplePerOutput.
virtual void sample(long iStep)
Compute a sampled value and update the accumulator.
AverageAnalyzer(Simulator< D > &simulator, System< D > &system)
Constructor.
virtual void setup()
Setup before loop.
int nSamplePerOutput() const
Get value of nSamplePerOutput.
Simulator< D > & simulator()
Return reference to parent simulator.
System< D > & system()
Return reference to parent system.
virtual void output()
Write final results to file after a simulation.
Evaluate the derivative of H w/ respect to perturbation parameter lambda.
virtual double compute()
Compute and return the derivative of H w/ respect to lambda.
PerturbationDerivative(Simulator< D > &simulator, System< D > &system)
Constructor.
virtual void outputValue(int step, double value)
Output a sampled or block average value.
Field theoretic simulator (base class).
Main class, representing a complete physical system.
void setClassName(const char *className)
Set class name string.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1