12#include <pscf/mesh/Mesh.h>
13#include <pscf/cpu/complex.h>
48 cField_.allocate(meshPtr_->dimensions());
57 int nx = meshPtr_->size();
66 for (
int i = 0; i < nx; ++i) {
75 for (
int i = 0; i < nx; ++i) {
87 std::complex<double> Qstd;
92 fftw_complex prefactor;
96 for (
int i = 0; i < nx; ++i) {
97 mulEq(cField_[i], prefactor);
void associate(Mesh< D > const &mesh)
Create an association with the mesh.
void compute(CField< D > const &wField)
Compute monomer concentration field, q and phi and/or mu.
void allocate()
Allocate memory for concentrationf field.
double size() const
Get the size (number of monomers) in this solvent.
Description of a regular grid of points in a periodic domain.
Field of complex double precision values on an FFT mesh.
Base class for a molecular species (polymer or solvent).
void setQ(std::complex< double > q)
std::complex< double > phi() const
int capacity() const
Return allocated size.
void setClassName(const char *className)
Set class name string.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
void mulEq(fftw_complex &a, fftw_complex const &b)
In-place multiplication of two complex number, a *= b.
void addEq(fftw_complex &a, fftw_complex const &b)
In-place addition of fftw_complex numbers, a += b.
void div(fftw_complex &z, fftw_complex const &a, fftw_complex const &b)
Division of fftw_complex numbers, z = a / b .
void assignExp(fftw_complex &z, fftw_complex const &a)
Exponentation of a ffts_complex variable, z = exp(a).
void assign(fftw_complex &z, double const &a, double const &b)
Create an fftw_complex from real and imaginary parts, z = a + ib.
void mul(fftw_complex &z, fftw_complex const &a, fftw_complex const &b)
Multiplication of fftw_complex numbers, z = a * b.
void divEq(fftw_complex &a, fftw_complex const &b)
In-place division of fftw_complex numbers, a /= b.
Complex periodic fields, CL-FTS (CPU).
PSCF package top-level namespace.