PSCF v1.3
rpc/solvers/Mixture.h
1#ifndef RPC_MIXTURE_H
2#define RPC_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 Rpc {
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 // Inherited public member functions
49
50 using MixtureRealT::readParameters;
51 using MixtureRealT::associate;
52 using MixtureRealT::allocate;
53 using MixtureRealT::clearUnitCellData;
54 using MixtureRealT::setKuhn;
55 using MixtureRealT::compute;
56 using MixtureRealT::computeStress;
57 using MixtureRealT::hasStress;
58 using MixtureRealT::createBlockCRGrid;
59
64
72
73 protected:
74
75 using MixtureRealT::mesh;
76 using MixtureRealT::ds;
77
78 private:
79
86 void eqS(FieldT& A, double s) const override;
87
94 void addEqV(FieldT& A, FieldT const & B) const override;
95
99 void allocateBlocks() override;
100
101 };
102
103 // Suppress implicit instantiation
104 extern template class Mixture<1>;
105 extern template class Mixture<2>;
106 extern template class Mixture<3>;
107
108} // namespace Rpc
109namespace Prdc {
110 // Suppress implicit instantiation of base class
111 extern template class MixtureReal<1, Rpc::Polymer<1>, Rpc::Solvent<1> >;
112 extern template class MixtureReal<2, Rpc::Polymer<2>, Rpc::Solvent<2> >;
113 extern template class MixtureReal<3, Rpc::Polymer<3>, Rpc::Solvent<3> >;
114} // namespace Prdc
115} // namespace Pscf
116#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.
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
Real periodic fields, SCFT and PS-FTS (CPU).
Definition param_pc.dox:2
PSCF package top-level namespace.
Definition param_pc.dox:1