PSCF v1.5.0
rp/solvers/Solvent.h
1#ifndef RP_SOLVENT_H
2#define RP_SOLVENT_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/chem/SolventSpecies.h> // base class
12#include <pscf/field/RField.h> // member
13#include <pscf/backend/TmplDeclare.h> // template declaration macros
14
15// Forward declaration
16namespace Pscf {
17 template <int D> class Mesh;
18}
19
20namespace Pscf {
21namespace Rp {
22
35 template <int D, class T>
36 class Solvent : public SolventSpecies<double>
37 {
38
39 public:
40
41 // Public member functions
42
46 Solvent();
47
51 ~Solvent();
52
60 void associate(Mesh<D> const & mesh);
61
69 void allocate();
70
92 void compute(RField<D,T> const & wField, double phiTot = 1.0);
93
100 RField<D,T> const & cField() const;
101
102 private:
103
105 RField<D,T> cField_;
106
108 Mesh<D> const * meshPtr_;
109
111 using SolventSpeciesT = SolventSpecies<double>;
112
114 using SpeciesT = Species<double>;
115
116 };
117
118 /*
119 * Get monomer concentration field for this solvent.
120 */
121 template <int D, class T> inline
123 { return cField_; }
124
125 // Explicit instantiation declarations
126 PSCF_TMPL_DECLARE(Solvent)
127
128}
129}
130#endif
Description of a regular grid of points in a periodic domain.
Definition Mesh.h:61
Solver and descriptor for a solvent species.
RField< D, T > const & cField() const
Get the monomer concentration field for this solvent.
Solvent()
Constructor.
Definition Solvent.tpp:24
void compute(RField< D, T > const &wField, double phiTot=1.0)
Compute concentration field, q, and phi or mu.
Definition Solvent.tpp:60
void associate(Mesh< D > const &mesh)
Create an association with a Mesh.
Definition Solvent.tpp:39
void allocate()
Allocate memory for a concentration field.
Definition Solvent.tpp:50
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.