11#include <pscf/solvers/BlockTmpl.h>
13#include <prdc/cuda/RField.h>
14#include <prdc/cuda/RFieldDft.h>
15#include <prdc/cuda/FFTBatched.h>
16#include <pscf/cuda/DeviceArray.h>
17#include <util/containers/FSArray.h>
19#include <prdc/cuda/resources.h>
23 template <
int D>
class Mesh;
28 template <
int D>
class FFT;
135 void allocate(
double ds,
bool useBatchedFFT =
true);
308 double stress(
int n)
const;
435 FFT<D> const & fft()
const;
444 void computeExpKsq();
463 {
return stress_[n]; }
467 inline Mesh<D> const & Block<D>::mesh()
const
475 inline FFT<D> const & Block<D>::fft()
const
484 {
return *unitCellPtr_; }
489 {
return *waveListPtr_; }
Class template for a block solver in a block copolymer.
Propagator< D > PropagatorT
Propagator< D > & propagator(int directionId)
Dynamic array on the GPU device with aligned data.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Description of a regular grid of points in a periodic domain.
Batched Fourier transform wrapper for real data.
Fourier transform wrapper for real or complex data.
Discrete Fourier Transform (DFT) of a real field, allocated on a GPU.
Field of real values on a regular mesh, allocated on a GPU device.
Class to compute and store properties associated with wavevectors.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Block within a branched polymer.
void setLength(double newLength)
Set or reset block length (only used in thread model).
double stress(int n) const
Get derivative of free energy w/ respect to a unit cell parameter.
BlockTmpl< Propagator< D >, RField< D > > BlockTmplT
Direct (parent) base class.
double ds() const
Contour length step size.
void allocate(double ds, bool useBatchedFFT=true)
Allocate memory and set contour step size for thread model.
void setKuhn(double kuhn)
Set or reset monomer statistical segment length.
int ns() const
Number of contour length steps.
WaveList< D > WaveListT
Wavelist type.
void stepBondBead(RField< D > const &qin, RField< D > &qout) const
Compute a bond operator for the bead model.
void computeStressBead(double prefactor)
Compute stress contribution for this block, using bead model.
void stepFieldBead(RField< D > &q) const
Apply the exponential field operator for the bead model.
void stepThread(RField< D > const &qin, RField< D > &qout) const
Compute step of integration loop, from i to i+1.
void setupSolver(RField< D > const &w)
Set solver for this block.
void associate(Mesh< D > const &mesh, FFT< D > const &fft, UnitCell< D > const &cell, WaveList< D > &waveList)
Create permanent associations with related objects.
void computeConcentrationBead(double prefactor)
Compute the concentration for this block, using the bead model.
void computeConcentrationThread(double prefactor)
Compute unnormalized concentration for block by integration.
void clearUnitCellData()
Clear all internal data that depends on lattice parameters.
FFT< D > FFTT
Fast Fourier Transform (FFT) type.
void stepHalfBondBead(RField< D > const &qin, RField< D > &qout) const
Compute a half-bond operator for the bead model.
void computeStressThread(double prefactor)
Compute stress contribution for this block, using thread model.
void stepBead(RField< D > const &qin, RField< D > &qout) const
Compute one step of solution of MDE for the bead model.
MDE solver for one direction of one block.
A fixed capacity (static) contiguous array with a variable logical size.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA).
Periodic fields and crystallography.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.