11#include <pscf/solvers/BlockTmpl.h>
12#include "Propagator.h"
14#include <prdc/cuda/RField.h>
15#include <prdc/cuda/RFieldDft.h>
16#include <prdc/cuda/FFTBatched.h>
17#include <pscf/cuda/DeviceArray.h>
18#include <util/containers/FSArray.h>
20#include <prdc/cuda/resources.h>
24 template <
int D>
class Mesh;
29 template <
int D>
class FFT;
130 void allocate(
double ds,
bool useBatchedFFT =
true);
451 {
return *unitCellPtr_; }
455 {
return *waveListPtr_; }
461 void computeExpKsq();
480 {
return stress_[n]; }
498 #ifndef RPG_BLOCK_TPP
Propagator< D > & propagator(int directionId)
Propagator< D >::FieldT & cField()
Dynamic array on the GPU device with aligned data.
int id() const
Get the id of this block (unique within the polymer).
void setVertexIds(int vertexId0, int vertexId1)
Set indices of associated vertices.
const Pair< int > & vertexIds() const
Get the pair of associated vertex ids.
int nBead() const
Get the number of beads in this block, in the bead model.
virtual void setLength(double length)
Set the length of this block (only valid for thread model).
int monomerId() const
Get the monomer type id for this block.
int vertexId(int i) const
Get the id of one associated vertex.
void setMonomerId(int monomerId)
Set the monomer type id.
void setId(int id)
Set the id for this block.
double length() const
Get the length of this block, in the thread 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.
Fourier transform wrapper.
Fourier transform of a real field on an FFT mesh.
Field of real double precision values on an FFT mesh.
Class to calculate and store properties of wavevectors.
Batched Fourier transform wrapper for real data.
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 ds() const
Contour length step size.
void allocate(double ds, bool useBatchedFFT=true)
Allocate memory and set contour step size for thread model.
BlockTmpl< Propagator< D > > Base
Base class.
void stepHalfBondBead(RField< D > const &qin, RField< D > &qout)
Compute a half-bond operator for the bead model.
Mesh< D > const & mesh() const
Return associated spatial Mesh by const reference.
void stepBondBead(RField< D > const &qin, RField< D > &qout)
Compute a bond operator for the bead 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 associate(Mesh< D > const &mesh, FFT< D > const &fft, UnitCell< D > const &cell, WaveList< D > &wavelist)
Create permanent associations with related objects.
void computeStressBead(double prefactor)
Compute stress contribution for this block, using bead model.
FieldIo< D > FieldIoT
FieldIo type.
void setupSolver(RField< D > const &w)
Set solver for this block.
double stress(int n)
Get derivative of free energy w/ respect to a unit cell parameter.
void computeConcentrationBead(double prefactor)
Compute the concentration for this block, using the bead model.
double averageProduct(RField< D > const &q0, RField< D > const &q1)
Compute the spatial average of the product used to compute Q.
void computeConcentrationThread(double prefactor)
Compute unnormalized concentration for block by integration.
void stepFieldBead(RField< D > &q)
Apply the exponential field operator for the bead model.
void clearUnitCellData()
Clear all internal data that depends on lattice parameters.
Propagator< D > PropagatorT
Propagator type.
FFT< D > FFTT
Fast Fourier Transform (FFT) type.
FFT< D > const & fft() const
Return associated FFT<D> object by const reference.
void computeStressThread(double prefactor)
Compute stress contribution for this block, using thread model.
void stepBead(RField< D > const &qin, RField< D > &qout)
Compute one step of solution of MDE for the bead model.
double averageProductBead(RField< D > const &q0, RField< D > const &q1)
Compute the spatial average of the product used to compute Q.
void stepThread(RField< D > const &qin, RField< D > &qout)
Compute step of integration loop, from i to i+1.
File input/output operations and format conversions for fields.
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.