PSCF v1.5.0
IntraCorrelation.h
1#ifndef RP_INTRACORRELATION_H
2#define RP_INTRACORRELATION_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 <pscf/math/IntVec.h> // member
12#include <util/containers/DArray.h> // member
13#include <pscf/backend/HostSendArray.h> // member
14#include <pscf/backend/TmplDeclare.h> // declaration macros
15
16// Forward declarations
17namespace Pscf {
18 template <int D, class T> class FFT;
19 template <int D, class T> class RField;
20 namespace Correlation {
21 template <typename WT> class Mixture;
22 }
23 namespace Rp {
24 template <int D, class T> class System;
25 template <int D, class T> class Simulator;
26 }
27}
28
29namespace Pscf {
30namespace Rp {
31
32 using namespace Util;
33
39 template <int D, class T>
41 {
42
43 public:
44
50 IntraCorrelation(System<D,T> const & system);
51
56
62 virtual
63 void computeOmegaTotal(RField<D,T>& correlations);
64
65 private:
66
67 // Private type aliases
68 using RealT = typename T::Real;
69
70 // Private member variables
71
73 System<D,T> const * systemPtr_;
74
76 Correlation::Mixture<RealT>* correlationMixturePtr_;
77
79 DArray<RealT> Gsq_;
80
82 HostSendArray<RealT, T> correlations_h_;
83
85 IntVec<D> meshDimensions_;
86
88 IntVec<D> kMeshDimensions_;
89
91 int kSize_;
92
93 // Private member functions
94
100 void computeOmegaTotalArray(Array<RealT>& correlations);
101
107 void getMeshDimensions();
108
114 void computeGsq();
115
116 /*
117 * Get the size of the k-space mesh.
118 */
119 int kSize() const;
120
124 System<D,T> const & system() const;
125
126 };
127
128 // Get the number of wavevectors in the k-space mesh.
129 template <int D, class T> inline
130 int IntraCorrelation<D,T>::kSize() const
131 { return kSize_; }
132
133 // Get the parent system by const reference.
134 template <int D, class T> inline
135 System<D,T> const & IntraCorrelation<D,T>::system() const
136 { return *systemPtr_; }
137
138 // Explicit instantiation declarations
139 PSCF_TMPL_DECLARE(IntraCorrelation);
140
141} // namespace Rp
142} // namespace Pscf
143#endif
Correlations in a homogeneous ideal gas mixture.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
virtual void computeOmegaTotal(RField< D, T > &correlations)
Compute total intramolecular correlation function (all blocks).
IntraCorrelation(System< D, T > const &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
Dynamically allocatable contiguous array template.
Definition DArray.h:32
Intramolecular correlations in homogeneous systems.
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.