1#ifndef RPG_HAMILTONIAN_ANALYZER_TPP
2#define RPG_HAMILTONIAN_ANALYZER_TPP
11#include "HamiltonianAnalyzer.h"
12#include <rpg/System.h>
13#include <rpg/fts/simulator/Simulator.h>
26 simulatorPtr_(&simulator),
27 systemPtr_(&(simulator.system())),
28 hasAnalyzeChi_(false),
47 setName(idealId_,
"ideal");
48 setName(fieldId_,
"field");
49 setName(totalId_,
"total");
59 if (!system().hasCFields()) {
62 if (!simulator().hasWc()){
63 simulator().computeWc();
67 if (!simulator().hasWc()){
69 simulator().analyzeChi();
70 hasAnalyzeChi_ =
true;
73 simulator().computeWc();
77 if (!simulator().hasHamiltonian()) {
78 simulator().computeHamiltonian();
81 double ideal = simulator().idealHamiltonian();
82 setValue(idealId_, ideal);
84 double field = simulator().fieldHamiltonian();
85 setValue(fieldId_, field);
87 double total = simulator().hamiltonian();
88 setValue(totalId_, total);
Analyze averages and block averages of several real variables.
virtual void readParameters(std::istream &in)
Read interval, outputFileName and (optionally) nSamplePerOutput.
void initializeAccumulators(int nValue)
Instantiate Average accumulators and set nSamplePerOutput set nValue.
void compute()
Compute and store values of Hamiltonian components.
void setClassName(const char *className)
Set class name string.
HamiltonianAnalyzer(Simulator< D > &simulator, System< D > &system)
Constructor.
virtual void readParameters(std::istream &in)
Read interval and output file name.
Field theoretic simulator (base class).
Main class for calculations that represent 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.