PSCF v1.1
pspg/solvers/Solvent.h
1#ifndef PSPG_SOLVENT_H
2#define PSPG_SOLVENT_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2022, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/chem/SolventDescriptor.h> // base class
12#include <pspg/solvers/Propagator.h> // typedefs
13#include <pspg/field/RDField.h>
14
15namespace Pscf {
16 template <int D> class Mesh;
17}
18
19namespace Pscf {
20namespace Pspg {
21
22 using namespace Util;
23
29 template <int D>
31 {
32 public:
33
37 Solvent();
38
42 ~Solvent();
43
49 void setDiscretization(Mesh<D> const & mesh);
50
58 void compute(RDField<D> const & wField );
59
63 RDField<D> const & concField() const;
64
65 // Inherited public accessor functions
68 using Pscf::Species::q;
72
73 protected:
74
75 // Inherited protected data members
82
83 private:
84
86 RDField<D> concField_;
87
89 Mesh<D> const * meshPtr_;
90
91 };
92
93 /*
94 * Get monomer concentration field for this solvent.
95 */
96 template <int D>
97 inline RDField<D> const & Solvent<D>::concField() const
98 { return concField_; }
99
100}
101}
102#endif
Description of a regular grid of points in a periodic domain.
Definition: Mesh.h:61
Field of real single precision values on an FFT mesh on a device.
Definition: RDField.h:34
Solver and descriptor for a solvent species.
void compute(RDField< D > const &wField)
Compute monomer concentration field and phi and/or mu.
RDField< D > const & concField() const
Get the monomer concentration field for this solvent.
void setDiscretization(Mesh< D > const &mesh)
Set association with Mesh, allocate memory.
Descriptor for a solvent species.
double size_
Size of this block = volume / monomer reference volume.
double size() const
Get the size (number of monomers) in this solvent.
int monomerId() const
Get the monomer type id.
int monomerId_
Identifier for the associated monomer type.
double phi() const
Get the overall volume fraction for this species.
Definition: Species.h:90
Ensemble ensemble_
Statistical ensemble for this species (open or closed).
Definition: Species.h:83
Ensemble ensemble()
Get the statistical ensemble for this species (open or closed).
Definition: Species.h:102
double phi_
Volume fraction, set by either setPhi or compute function.
Definition: Species.h:68
double mu_
Chemical potential, set by either setPhi or compute function.
Definition: Species.h:73
double q_
Partition function, set by compute function.
Definition: Species.h:78
double mu() const
Get the chemical potential for this species (units kT=1).
Definition: Species.h:96
double q() const
Get the molecular partition function for this species.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1