PSCF v1.3.1
rpg/fts/analyzer/HamiltonianAnalyzer.h
1#ifndef RPG_HAMILTONIAN_ANALYZER_H
2#define RPG_HAMILTONIAN_ANALYZER_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 "AverageListAnalyzer.h" // base class template
12
13namespace Pscf {
14namespace Rpg {
15
16 template <int D> class System;
17 template <int D> class Simulator;
18
19 using namespace Util;
20
31 template <int D>
33 {
34
35 public:
36
41
46 {}
47
53 virtual void readParameters(std::istream& in);
54
55 #if 0
61 virtual void loadParameters(Serializable::IArchive& ar);
62
68 virtual void save(Serializable::OArchive& ar);
69 #endif
70
75
80
84
85 protected:
86
90 void compute();
91
96
101
102 private:
104 bool hasAnalyzeChi_;
105
107 int idealId_;
108
110 int fieldId_;
111
113 int totalId_;
114
115 };
116
117 // Get the parent system.
118 template <int D>
121
122 //Get parent Simulator object.
123 template <int D>
126
127 #ifndef RPG_HAMILTONIAN_ANALYZER_TPP
128 // Explicit instantiation declarations
129 extern template class HamiltonianAnalyzer<1>;
130 extern template class HamiltonianAnalyzer<2>;
131 extern template class HamiltonianAnalyzer<3>;
132 #endif
133
134}
135}
136#endif
AverageListAnalyzer(System< D > &system)
Constructor.
void setName(int i, std::string name)
Set name of variable.
void setValue(int i, double value)
Set current value, used by compute function.
Compute averages and output block averages of Hamiltonian components.
Simulator< D > & simulator()
Return reference to parent Simulator.
void compute()
Compute and store values of Hamiltonian components.
Simulator< D > * simulatorPtr_
Pointer to parent Simulator.
HamiltonianAnalyzer(Simulator< D > &simulator, System< D > &system)
Constructor.
virtual void readParameters(std::istream &in)
Read interval and output file name.
System< D > & system()
Return reference to parent system.
System< D > * systemPtr_
Pointer to the parent system.
Field theoretic simulator (base class).
Main class, representing a complete physical system.
void setClassName(const char *className)
Set class name string.
virtual void save(Serializable::OArchive &ar)
Saves all parameters to an archive.
virtual void loadParameters(Serializable::IArchive &ar)
Load state from archive, without adding Begin and End lines.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1