11#include <pscf/solvers/BlockTmpl.h>
12#include <pscf/backend/cpp/CPT.h>
14#include <pscf/field/cpp/RField.h>
15#include <pscf/field/cpp/RFieldDft.h>
16#include <pscf/math/IntVec.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;
47 :
public BlockTmpl< Rp::Propagator<D,CPT>, RField<D,CPT> >
124 void allocate(
double ds,
bool useBatchedFFT =
false);
328 double stress(
int n)
const;
446 void computeExpKsq();
465 {
return stress_[n]; }
479 inline FFT<D,CPT> const & Block<D,CPT>::fft()
const
487 UnitCell<D>
const & Block<D,CPT>::unitCell()
const
490 return *unitCellPtr_;
498 return *waveListPtr_;
Class template for a block solver in a block copolymer.
Rp::Propagator< D, CPT > PropagatorT
RField< D, CPT > const & cField() const
Rp::Propagator< D, CPT > & propagator(int directionId)
Backend identifier class for the C++ serial CPU backend.
int nBead() const
Get the number of beads in this block, in the bead model.
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.
BlockTmpl< Rp::Propagator< D, CPT >, RField< D, CPT > > BlockTmplT
Direct (parent) base class.
double ds() const
Get contour length step size.
void allocate(double ds, bool useBatchedFFT=false)
Allocate memory and set contour step size.
int ns() const
Get the number of contour grid points, including end points.
void stepBondBead(RField< D, CPT > const &qin, RField< D, CPT > &qout) const
Apply a bond operator for the bead model.
double stress(int n) const
Get derivative of free energy w/ respect to a unit cell parameter.
void computeStressBead(double prefactor)
Compute stress contribution for this block, using bead model.
void computeConcentrationBead(double prefactor)
Compute the concentration for this block, using the bead model.
void setNBead(int nBead)
Set or reset the number of beads (only used in bead model).
void computeStressThread(double prefactor)
Compute stress contribution for this block, using thread model.
void clearUnitCellData()
Clear all internal data that depends on the unit cell parameters.
void stepBead(RField< D, CPT > const &qin, RField< D, CPT > &qout) const
Compute one step of solution of MDE for the bead model.
void stepThread(RField< D, CPT > const &qin, RField< D, CPT > &qout) const
Compute one step of solution of MDE for the thread model.
void setLength(double newLength)
Set or reset block length (only used in thread model).
void associate(Mesh< D > const &mesh, FFT< D, CPT > const &fft, UnitCell< D > const &cell, WaveList< D, CPT > &waveList)
Create permanent associations with related objects.
void setupSolver(RField< D, CPT > const &w)
Set up the MDE solver for this block.
void stepHalfBondBead(RField< D, CPT > const &qin, RField< D, CPT > &qout) const
Apply a half-bond operator for the bead model.
void computeConcentrationThread(double prefactor)
Compute the concentration for this block, for the thread model.
void stepFieldBead(RField< D, CPT > &q) const
Apply the exponential field operator for the bead model.
void setKuhn(double kuhn)
Set or reset monomer statistical segment length.
Base template for UnitCell<D> classes, D=1, 2 or 3.
A fixed capacity (static) contiguous array with a variable logical size.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.
Utility classes for scientific computation.