PSCF v1.3
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"
12#include <rpg/system/System.h>
13
14namespace Util{
15 class Average;
16}
17
18namespace Pscf {
19namespace Rpg {
20
21 template <int D> class System;
22 template <int D> class Simulator;
23
24 using namespace Util;
25
36 template <int D>
38 {
39
40 public:
41
46
51 {}
52
58 virtual void readParameters(std::istream& in);
59
60 #if 0
66 virtual void loadParameters(Serializable::IArchive& ar);
67
73 virtual void save(Serializable::OArchive& ar);
74 #endif
75
80
85
89
90 protected:
91
95 void compute();
96
100 System<D>& system();
101
106
107 private:
109 bool hasAnalyzeChi_;
110
112 int idealId_;
113
115 int fieldId_;
116
118 int totalId_;
119
120 };
121
122 // Get the parent system.
123 template <int D>
126
127 //Get parent Simulator object.
128 template <int D>
131
132 #ifndef RPG_HAMILTONIAN_ANALYZER_TPP
133 // Suppress implicit instantiation
134 extern template class HamiltonianAnalyzer<1>;
135 extern template class HamiltonianAnalyzer<2>;
136 extern template class HamiltonianAnalyzer<3>;
137 #endif
138
139}
140}
141#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 one complete system.
Calculates the average and variance of a sampled property.
Definition Average.h:44
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
Utility classes for scientific computation.