PSCF v1.4.0
Pscf::Rp::MaxOrderParameter< D, T > Class Template Reference

Evaluate max of square magnitude of Fourier modes for exchange field. More...

#include <MaxOrderParameter.h>

Inheritance diagram for Pscf::Rp::MaxOrderParameter< D, T >:

Public Member Functions

void setup () override
 Setup before simulation loop.

Protected Member Functions

 MaxOrderParameter (typename T::Simulator &simulator, typename T::System &system)
 Constructor.
 ~MaxOrderParameter ()=default
 Destructor.
void outputValue (int step, double value) override
 Output a sampled or block average value.
void computePsi ()
 Compute the psi_ array of squared Fourier coefficients.
void findMaximum (Array< typename T::Real > const &psi)
 Find the wavevector of maximum Fourier magnitude.

Protected Attributes

T::RField psi_
 Square magnitude |W_|^2 in Fourier space.
double maxPsi_
 Maximum square magnitude (value of maximum element of psi_).
IntVec< D > Gmax_
 Indices of wavevector with maximum magnitude.
int kSize_
 Number of wavevectors in Fourier space (k-grid) mesh.

Detailed Description

template<int D, class T>
class Pscf::Rp::MaxOrderParameter< D, T >

Evaluate max of square magnitude of Fourier modes for exchange field.

This class evaluates an average for the maximum of the squared Fourier mode amplitude for the fluctuating exchange field W_{-}(r) for an AB system (nMonomer == 2).

The quantity of interest is defined as

\[ \Psi = \max [ |W_{-}({\bf k})|^{2} ] \]

where \( W_{-}({\bf k})\) is fluctuating field component with wavevector \( {\bf k} \).

Specializations of this class template are used as base classes for two closely analogous class templates, also named MaxOrderParameter, that are defined in Rpc and Rpg namespaces for use in the pscf_rpc and pscf_rpg programs, respectively.

Template parameters:

See also
Manual Page

Definition at line 49 of file fts/analyzer/MaxOrderParameter.h.

Constructor & Destructor Documentation

◆ MaxOrderParameter()

template<int D, class T>
Pscf::Rp::MaxOrderParameter< D, T >::MaxOrderParameter ( typename T::Simulator & simulator,
typename T::System & system )
protected

Constructor.

Parameters
simulatorparent Simulator object
systemparent System object

Definition at line 29 of file MaxOrderParameter.tpp.

References kSize_, and Util::ParamComposite::setClassName().

◆ ~MaxOrderParameter()

template<int D, class T>
Pscf::Rp::MaxOrderParameter< D, T >::~MaxOrderParameter ( )
protecteddefault

Destructor.

Member Function Documentation

◆ setup()

template<int D, class T>
void Pscf::Rp::MaxOrderParameter< D, T >::setup ( )
override

Setup before simulation loop.

Definition at line 40 of file MaxOrderParameter.tpp.

References kSize_, psi_, and UTIL_CHECK.

◆ outputValue()

template<int D, class T>
void Pscf::Rp::MaxOrderParameter< D, T >::outputValue ( int step,
double value )
overrideprotected

Output a sampled or block average value.

Parameters
stepvalue for step counter
valuevalue of physical observable

Definition at line 104 of file MaxOrderParameter.tpp.

References Gmax_, and UTIL_CHECK.

◆ computePsi()

template<int D, class T>
void Pscf::Rp::MaxOrderParameter< D, T >::computePsi ( )
protected

Compute the psi_ array of squared Fourier coefficients.

Definition at line 66 of file MaxOrderParameter.tpp.

References psi_, Pscf::VecOp::sqAbsV(), and UTIL_CHECK.

◆ findMaximum()

template<int D, class T>
void Pscf::Rp::MaxOrderParameter< D, T >::findMaximum ( Array< typename T::Real > const & psi)
protected

Find the wavevector of maximum Fourier magnitude.

Results for the maximum square magnitude and the indices of the wavevector for which this occured are stored in maxPsi_ and Gmax_, respectively.

Parameters
psiarray of squared Fourier coefficients

Definition at line 81 of file MaxOrderParameter.tpp.

References Gmax_, kSize_, maxPsi_, and Pscf::Mesh< D >::position().

Member Data Documentation

◆ psi_

template<int D, class T>
T::RField Pscf::Rp::MaxOrderParameter< D, T >::psi_
protected

Square magnitude |W_|^2 in Fourier space.

Definition at line 64 of file fts/analyzer/MaxOrderParameter.h.

Referenced by computePsi(), and setup().

◆ maxPsi_

template<int D, class T>
double Pscf::Rp::MaxOrderParameter< D, T >::maxPsi_
protected

Maximum square magnitude (value of maximum element of psi_).

Definition at line 67 of file fts/analyzer/MaxOrderParameter.h.

Referenced by findMaximum().

◆ Gmax_

template<int D, class T>
IntVec<D> Pscf::Rp::MaxOrderParameter< D, T >::Gmax_
protected

Indices of wavevector with maximum magnitude.

Definition at line 70 of file fts/analyzer/MaxOrderParameter.h.

Referenced by findMaximum(), and outputValue().

◆ kSize_

template<int D, class T>
int Pscf::Rp::MaxOrderParameter< D, T >::kSize_
protected

Number of wavevectors in Fourier space (k-grid) mesh.

Definition at line 73 of file fts/analyzer/MaxOrderParameter.h.

Referenced by findMaximum(), MaxOrderParameter(), and setup().


The documentation for this class was generated from the following files: