PSCF v1.2
r1d/solvers/Mixture.h
1#ifndef R1D_MIXTURE_H
2#define R1D_MIXTURE_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 "Polymer.h"
12#include "Solvent.h"
13#include <pscf/solvers/MixtureTmpl.h>
14#include <pscf/inter/Interaction.h>
15#include <util/containers/DArray.h>
16
17namespace Pscf {
18namespace R1d
19{
20
21 class Domain;
22
42 class Mixture : public MixtureTmpl<Polymer, Solvent>
43 {
44
45 public:
46
47 // Public typedefs
48
53
58
59 // Public member functions
60
64 Mixture();
65
69 ~Mixture();
70
80 void readParameters(std::istream& in);
81
91 void setDomain(Domain const & domain);
92
103 void setKuhn(int monomerId, double kuhn);
104
124 void
125 compute(DArray<WField> const & wFields, DArray<CField>& cFields);
126
127
128 // Inherited public member functions with non-dependent names
137
138 protected:
139
140 // Inherited protected member functions with non-dependent names
144
145 private:
146
148 double ds_;
149
151 Domain const * domainPtr_;
152
154 Domain const & domain() const;
155
156 };
157
158 // Inline member function
159
160 /*
161 * Get Domain by constant reference (private).
162 */
163 inline Domain const & Mixture::domain() const
164 {
165 UTIL_ASSERT(domainPtr_);
166 return *domainPtr_;
167 }
168
169} // namespace R1d
170} // namespace Pscf
171#endif
A mixture of polymer and solvent species.
Definition MixtureTmpl.h:27
Monomer const & monomer(int id) const
One-dimensional spatial domain and discretization grid.
Mixture of polymers and solvents.
void setKuhn(int monomerId, double kuhn)
Reset statistical segment length for one monomer type.
Propagator::WField WField
Monomer chemical potential field type.
void readParameters(std::istream &in)
Read all parameters and initialize.
void compute(DArray< WField > const &wFields, DArray< CField > &cFields)
Compute concentrations.
Propagator::CField CField
Monomer concentration or volume fraction field type.
void setDomain(Domain const &domain)
Create an association with the domain and allocate memory.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void setClassName(const char *className)
Set class name string.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Definition global.h:75
PSCF package top-level namespace.
Definition param_pc.dox:1