10#include <prdc/cuda/RField.h>
11#include <pscf/cuda/VecOp.h>
12#include <pscf/cuda/Reduce.h>
13#include <pscf/mesh/Mesh.h>
15#include <rp/solvers/Propagator.tpp>
57 const int meshSize =
mesh.size();
61 qFieldsAll_.allocate(
ns * meshSize);
65 for (
int i = 0; i <
ns; ++i) {
66 qFields_[i].associate(qFieldsAll_, i*meshSize, meshDimensions);
84 qFieldsAll_.deallocate();
88 const int meshSize =
mesh.size();
92 qFieldsAll_.allocate(
ns * meshSize);
96 for (
int i = 0; i <
ns; ++i) {
97 qFields_[i].associate(qFieldsAll_, i*meshSize, meshDimensions);
123 void Propagator<D>::dissociateQFields()
125 if (qFields_.isAllocated()) {
126 int ns = qFields_.capacity();
127 for (
int i = 0; i < ns; ++i) {
128 if (qFields_[i].isAssociated()) {
129 qFields_[i].dissociate();
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 setIsSolved(bool isSolved)
Set the isSolved flag to true or false.
MDE solver for one direction of one block.
Mesh< D > const & mesh() const
virtual void reallocate(int ns)
virtual void allocate(int ns, const Mesh< D > &mesh)
MDE solver for one direction of one block.
void reallocate(int ns) override
Reallocate memory used by this propagator.
DArray< typename Types< D >::RField > qFields_
Array of propagator slices at different contour variable values.
Rp::Propagator< D, Types< D > > RpPropagatorT
Direct base class.
void allocate(int ns, const Mesh< D > &mesh) override
Allocate memory used by this propagator.
bool isAllocated_
Is this propagator allocated?
Class templates for real-valued periodic fields.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.