1#ifndef PSPC_SOLVENT_TPP
2#define PSPC_SOLVENT_TPP
12#include <pscf/mesh/Mesh.h>
19 { setClassName(
"Solvent"); }
41 int nx = meshPtr_->size();
44 int nBlocks, nThreads;
48 assignUniformReal<<<nBlocks, nThreads>>>(concField_.cDField(), 0, nx);
53 assignExp<<<nBlocks, nThreads>>>(concField_.cDField(), wField.
cDField(), s, nx);
54 q_ = (double)gpuSum(concField_.cDField(),nx);
59 if (ensemble_ == Species::Closed) {
68 scaleReal<<<nBlocks, nThreads>>>(concField_.cDField(), prefactor, nx);
Description of a regular grid of points in a periodic domain.
IntVec< D > dimensions() const
Get an IntVec<D> of the grid dimensions.
Data * cDField()
Return pointer to underlying C array.
Field of real single precision values on an FFT mesh on a device.
void compute(RDField< D > const &wField)
Compute monomer concentration field and phi and/or mu.
void setDiscretization(Mesh< D > const &mesh)
Set association with Mesh, allocate memory.
void setThreadsLogical(int nThreadsLogical)
Set the total number of threads required for execution.
C++ namespace for polymer self-consistent field theory (PSCF).