PSCF v1.3
rpg/solvers/Mixture.h
1#ifndef RPG_MIXTURE_H
2#define RPG_MIXTURE_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 <prdc/solvers/MixtureReal.h> // base class template
12#include "Polymer.h" // base class parameter
13#include "Solvent.h" // base class parameter
14
15namespace Pscf {
16namespace Rpg {
17
28 template <int D>
29 class Mixture : public MixtureReal<D, Polymer<D>, Solvent<D> >
30 {
31
32 public:
33
37
38 // Inherited public type name aliases
39 using typename MixtureRealT::MixtureTmplT;
40 using typename MixtureRealT::PolymerT;
41 using typename MixtureRealT::SolventT;
42 using typename MixtureRealT::BlockT;
43 using typename MixtureRealT::PropagatorT;
44 using typename MixtureRealT::FieldT;
45 using typename MixtureRealT::FFTT;
46 using typename MixtureRealT::WaveListT;
47
48 // Public member functions
49
53 Mixture();
54
60 void readParameters(std::istream& in) override;
61
62 // Inherited public member functions
63
64 using MixtureRealT::readParameters;
65 using MixtureRealT::associate;
66 using MixtureRealT::allocate;
67 using MixtureRealT::clearUnitCellData;
68 using MixtureRealT::setKuhn;
69 using MixtureRealT::compute;
70 using MixtureRealT::computeStress;
71 using MixtureRealT::hasStress;
72 using MixtureRealT::createBlockCRGrid;
73
78
86
87 protected:
88
89 using MixtureRealT::mesh;
90 using MixtureRealT::ds;
91
92 private:
93
94 // Private member data
95
97 bool useBatchedFFT_;
98
99 // Private member functions
100
107 virtual void eqS(FieldT& A, double s) const override;
108
115 virtual void addEqV(FieldT& A, FieldT const & B) const override;
116
120 virtual void allocateBlocks() override;
121
122 };
123
124 // Suppress implicit instantiation
125 extern template class Mixture<1>;
126 extern template class Mixture<2>;
127 extern template class Mixture<3>;
128
129} // namespace Rpg
130namespace Prdc {
131 // Suppress implicit instantiation of base class
132 extern template class MixtureReal<1, Rpg::Polymer<1>, Rpg::Solvent<1> >;
133 extern template class MixtureReal<2, Rpg::Polymer<2>, Rpg::Solvent<2> >;
134 extern template class MixtureReal<3, Rpg::Polymer<3>, Rpg::Solvent<3> >;
135} // namespace Prdc
136} // namespace Pscf
137#endif
int nPolymer() const
Get number of polymer species.
Monomer const & monomer(int id) const
Get a Monomer type descriptor by const reference.
int nMonomer() const
Get number of monomer types.
int nBlock() const
Get total number blocks among all polymer species.
int nSolvent() const
Get number of solvent (point particle) species.
double vMonomer() const
Get monomer reference volume (set to 1.0 by default).
bool isCanonical() const
Is this mixture being treated in canonical ensemble?
PolymerSpecies const & polymerSpecies(int id) const final
SolventSpecies const & solventSpecies(int id) const final
Solver and descriptor for a mixture of polymers and solvents.
Definition MixtureReal.h:51
Solver and descriptor for a mixture of polymers and solvents.
void readParameters(std::istream &in) override
Read all parameters and initialize.
typename Prdc::MixtureReal< D, Polymer< D >, Solvent< D > > MixtureRealT
Direct (parent) base class.
Solver and descriptor for a solvent species.
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