PSCF v1.5.0
MaxOrderParameter.h
1#ifndef RP_MAX_ORDER_PARAMETER_H
2#define RP_MAX_ORDER_PARAMETER_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "AverageAnalyzer.h" // base class template
12#include <pscf/field/RField.h> // member
13#include <pscf/field/RFieldDft.h> // member
14#include <pscf/backend/HostRecvArray.h> // member
15#include <pscf/math/IntVec.h> // member
16
17#include <pscf/backend/TmplDeclare.h>
18#include <iostream>
19
20// Forward declaration
21namespace Pscf {
22 template <int D, class T> class FFT;
23}
24
25namespace Pscf {
26namespace Rp {
27
28 using namespace Util;
29
52 template <int D, class T>
54 {
55
56 public:
57
66
70 ~MaxOrderParameter() = default;
71
75 void setup() override;
76
77 protected:
78
82 double compute() override;
83
90 void outputValue(int step, double value) override;
91
92 // Inherited protected member variables (selected).
94 using AverageAnalyzer<D,T>::system;
95
96 private:
97
100
102 RField<D,T> psi_;
103
106
108 double maxPsi_;
109
111 IntVec<D> Gmax_;
112
114 IntVec<D> meshDimensions_;
115
117 IntVec<D> kMeshDimensions_;
118
120 int kSize_;
121
122 };
123
124 // Explicit instantiation declarations
125 PSCF_TMPL_DECLARE(MaxOrderParameter)
126
127}
128}
129#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
Simulator< D, T > & simulator()
Get the parent Simulator by reference.
Definition Analyzer.h:233
System< D, T > & system()
Get the parent System by reference.
Definition Analyzer.h:243
AverageAnalyzer(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
Evaluate max of square magnitude of Fourier modes for exchange field.
double compute() override
Compute and return the max order parameter.
MaxOrderParameter(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
void outputValue(int step, double value) override
Output a sampled or block average value.
void setup() override
Setup before simulation loop.
~MaxOrderParameter()=default
Destructor.
Base class for field theoretic PS-FTS simulator.
Definition Simulator.h:93
Base class template for classes that represent a complete system.
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.