1#ifndef RPC_HAMILTONIAN_ANALYZER_TPP
2#define RPC_HAMILTONIAN_ANALYZER_TPP
11#include "HamiltonianAnalyzer.h"
13#include <rpc/System.h>
14#include <rpc/fts/simulator/Simulator.h>
29 simulatorPtr_(&simulator),
30 systemPtr_(&(simulator.system())),
31 hasAnalyzeChi_(false),
50 setName(idealId_,
"ideal");
51 setName(fieldId_,
"field");
52 setName(totalId_,
"total");
62 if (!system().hasCFields()) {
65 if (!simulator().hasWc()){
66 simulator().computeWc();
71 if (!simulator().hasWc()){
73 simulator().analyzeChi();
74 hasAnalyzeChi_ =
true;
77 simulator().computeWc();
81 if (!simulator().hasHamiltonian()) {
82 simulator().computeHamiltonian();
85 double ideal = simulator().idealHamiltonian();
86 setValue(idealId_, ideal);
88 double field = simulator().fieldHamiltonian();
89 setValue(fieldId_, field);
91 double total = simulator().hamiltonian();
92 setValue(totalId_, total);
Analyze averages and block averages of several real variables.
void initializeAccumulators(int nValue)
Instantiate Average accumulators and set nSamplePerOutput set nValue.
virtual void readParameters(std::istream &in)
Read interval, outputFileName and (optionally) nSamplePerOutput.
void setClassName(const char *className)
Set class name string.
void compute()
Compute and store values of Hamiltonian components.
virtual void readParameters(std::istream &in)
Read interval and output file name.
HamiltonianAnalyzer(Simulator< D > &simulator, System< D > &system)
Constructor.
Field theoretic simulator (base class).
Main class for SCFT or PS-FTS simulation of one system.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.