PSCF v1.3.1
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/MixturePrdc.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 MixturePrdc<D, Polymer<D>, Solvent<D> >
30 {
31
32 public:
33
37
38 // Inherited public type name aliases
39 using typename MixturePrdcT::MixtureTmplT;
40 using typename MixturePrdcT::PolymerT;
41 using typename MixturePrdcT::SolventT;
42 using typename MixturePrdcT::BlockT;
43 using typename MixturePrdcT::PropagatorT;
44 using typename MixturePrdcT::FieldT;
45 using typename MixturePrdcT::FFTT;
46 using typename MixturePrdcT::WaveListT;
47
48 // Inherited public member functions
49
50 using MixturePrdcT::readParameters;
51 using MixturePrdcT::associate;
52 using MixturePrdcT::allocate;
53 using MixturePrdcT::clearUnitCellData;
54 using MixturePrdcT::setKuhn;
55 using MixturePrdcT::compute;
56 using MixturePrdcT::computeStress;
57 using MixturePrdcT::hasStress;
58 using MixturePrdcT::createBlockCRGrid;
59
64
72
73 protected:
74
75 using MixturePrdcT::mesh;
76 using MixturePrdcT::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 // Explicit instantiation declarations for derived class
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 // Explicit instantiation declarations for base class
111 extern template class MixturePrdc<1, Rpc::Polymer<1>, Rpc::Solvent<1> >;
112 extern template class MixturePrdc<2, Rpc::Polymer<2>, Rpc::Solvent<2> >;
113 extern template class MixturePrdc<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 MixturePrdc.h:59
Solver and descriptor for a mixture of polymers and solvents.
typename Prdc::MixturePrdc< D, Polymer< D >, Solvent< D > > MixturePrdcT
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