PSCF v1.3
rpg/field/Mask.h
1#ifndef RPG_MASK_H
2#define RPG_MASK_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "FieldIo.h" // parent class template parameter
12#include <prdc/cuda/RField.h> // parent class template parameter
13#include <prdc/field/MaskReal.h> // parent class
14
15namespace Pscf {
16namespace Rpg {
17
18 using namespace Util;
19
30 template <int D>
31 class Mask
32 : public Prdc::MaskReal< D, Prdc::Cuda::RField<D>, FieldIo<D> >
33 {
34
35 public:
36
39
40 // Inherited public member functions
41 using Base::setFieldIo;
44 using Base::setBasis;
45 using Base::setRGrid;
46 using Base::readBasis;
47 using Base::readRGrid;
48 using Base::writeBasis;
49 using Base::writeRGrid;
50 using Base::basis;
51 using Base::rgrid;
52 using Base::phiTot;
55 using Base::hasData;
57
58 protected:
59
61 using Base::meshSize;
62 using Base::nBasis;
63 using Base::fieldIo;
64
68 double rGridAverage() const override;
69
70 };
71
72 #ifndef RPG_MASK_TPP
73 extern template class Mask<1>;
74 extern template class Mask<2>;
75 extern template class Mask<3>;
76 #endif
77
78} // namespace Rpg
79
80#ifndef RPG_MASK_TPP
81namespace Prdc {
82 extern template class MaskReal< 1, Cuda::RField<1>, Rpg::FieldIo<1> >;
83 extern template class MaskReal< 2, Cuda::RField<2>, Rpg::FieldIo<2> >;
84 extern template class MaskReal< 3, Cuda::RField<3>, Rpg::FieldIo<3> >;
85}
86#endif
87
88} // namespace Pscf
89#endif
Container for a field to which the total density is constrained.
Definition MaskReal.h:84
void setRGrid(Prdc::Cuda::RField< D > const &field, bool isSymmetric=false)
void readRGrid(std::istream &in, bool isSymmetric=false)
File input/output operations and format conversions for fields.
A field to which the total monomer concentration is constrained.
Prdc::MaskReal< D, Prdc::Cuda::RField< D >, FieldIo< D > > Base
Base class typedef.
double rGridAverage() const override
Calculate the average value of the rgrid_ member.
Periodic fields and crystallography.
Definition CField.cpp:11
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1