11#include <pscf/solvers/BlockTmpl.h>
12#include <pscf/backend/cuda/CUT.h>
13#include <pscf/field/cuda/RField.h>
14#include <pscf/field/cuda/RFieldDft.h>
15#include <pscf/field/cuda/FFTBatched.h>
16#include <pscf/backend/cuda/BackendArray.h>
17#include <util/containers/FSArray.h>
21 template <
int D>
class Mesh;
23 template <
int D,
class T>
class WaveList;
24 template <
int D,
class T>
class FFT;
27 template <
int D,
class T>
class Block;
46 :
public BlockTmpl< Rp::Propagator<D,CUT>, RField<D,CUT> >
125 void allocate(
double ds,
bool useBatchedFFT =
true);
308 double stress(
int n)
const;
445 void computeExpKsq();
452 template <
int D>
inline
457 template <
int D>
inline
462 template <
int D>
inline
464 {
return stress_[n]; }
467 template <
int D>
inline
475 template <
int D>
inline
483 template <
int D>
inline
484 UnitCell<D>
const & Block<D,CUT>::unitCell()
const
485 {
return *unitCellPtr_; }
488 template <
int D>
inline
490 {
return *waveListPtr_; }
Class template for a block solver in a block copolymer.
Rp::Propagator< D, CUT > PropagatorT
RField< D, CUT > const & cField() const
Rp::Propagator< D, CUT > & propagator(int directionId)
Backend identifier class for the GPU-enabled CUDA backend.
int nBead() const
Get the number of beads in this block, in the bead model.
Batched Fourier transform wrapper for real 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.
void setNBead(int nBead)
Set or reset the number of beads (only used in bead model).
void stepBondBead(RField< D, CUT > const &qin, RField< D, CUT > &qout) const
Compute a bond operator for the bead model.
int ns() const
Number of contour length steps.
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.
double stress(int n) const
Get derivative of free energy w/ respect to a unit cell parameter.
void associate(Mesh< D > const &mesh, FFT< D, CUT > const &fft, UnitCell< D > const &cell, WaveList< D, CUT > &waveList)
Create permanent associations with related objects.
void setKuhn(double kuhn)
Set or reset monomer statistical segment length.
WaveList< D, CUT > WaveListT
Wavelist type.
void stepBead(RField< D, CUT > const &qin, RField< D, CUT > &qout) const
Compute one step of solution of MDE for the bead model.
void stepThread(RField< D, CUT > const &qin, RField< D, CUT > &qout) const
Compute step of integration loop, from i to i+1.
void computeStressThread(double prefactor)
Compute stress contribution for this block, using thread model.
void setLength(double newLength)
Set or reset block length (only used in thread model).
double ds() const
Contour length step size.
void computeStressBead(double prefactor)
Compute stress contribution for this block, using bead model.
BlockTmpl< Rp::Propagator< D, CUT >, RField< D, CUT > > BlockTmplT
Direct (parent) base class.
void clearUnitCellData()
Clear all internal data that depends on lattice parameters.
void allocate(double ds, bool useBatchedFFT=true)
Allocate memory and set contour step size for thread model.
FFT< D, CUT > FFTT
Fast Fourier Transform (FFT) type.
void setupSolver(RField< D, CUT > const &w)
Set solver for this block.
void stepFieldBead(RField< D, CUT > &q) const
Apply the exponential field operator for the bead model.
void stepHalfBondBead(RField< D, CUT > const &qin, RField< D, CUT > &qout) const
Compute a half-bond operator for the bead model.
Base template for UnitCell<D> classes, D=1, 2 or 3.
A fixed capacity (static) contiguous array with a variable logical size.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.