PSCF v1.5.0
FourthOrderParameter.h
1#ifndef RP_FOURTH_ORDER_PARAMETER_H
2#define RP_FOURTH_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 <rp/fts/analyzer/AverageAnalyzer.h> // base class template
12#include <pscf/field/RField.h> // member
13#include <pscf/field/RFieldDft.h> // member
14#include <pscf/math/IntVec.h> // member
15
16#include <pscf/backend/TmplDeclare.h>
17
18// Forward declarations
19namespace Util {
20 template <typename T> class Array;
21}
22namespace Pscf {
23 template <int D, class T> class FFT;
24}
25
26namespace Pscf {
27namespace Rp {
28
29 using namespace Util;
30
53 template <int D, class T>
55 {
56
57 public:
58
67
72
76 void setup() override;
77
78 protected:
79
83 double compute() override;
84
85 // Inherited protected member functions (selected).
87 using AverageAnalyzer<D,T>::system;
88
89 private:
90
93
95 RField<D,T> psi_;
96
98 RField<D,T> prefactor_;
99
101 IntVec<D> kMeshDimensions_;
102
104 int kSize_;
105
107 bool isInitialized_;
108
116 void computePrefactor();
117
118 };
119
120 // Explicit instantiation declarations
121 PSCF_TMPL_DECLARE(FourthOrderParameter)
122
123}
124}
125#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.
FourthOrderParameter is used to detect an order-disorder transition.
double compute() override
Compute and return the order parameter.
void setup() override
Setup before the main loop.
~FourthOrderParameter()=default
Destructor.
FourthOrderParameter(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
Base class for field theoretic PS-FTS simulator.
Definition Simulator.h:93
Base class template for classes that represent a complete system.
Array container class template.
Definition Array.h:41
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.
Utility classes for scientific computation.