PSCF v1.4.0
SolventSpecies.tpp
1/*
2* PSCF - Polymer Self-Consistent Field
3*
4* Copyright 2015 - 2025, The Regents of the University of Minnesota
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include "SolventSpecies.h"
9
10namespace Pscf {
11
12 /*
13 * Constructor
14 */
15 template <typename WT>
17 : Species<WT>(),
18 monomerId_(-1),
19 size_(0.0)
20 { ParamComposite::setClassName("SolventSpecies"); }
21
22 /*
23 * Read contents of parameter file block
24 */
25 template <typename WT>
27 {
28 ParamComposite::read<int>(in, "monomerId", monomerId_);
29 ParamComposite::read<double>(in, "size", size_);
30
31 // Read phi or mu (but not both) and set ensemble accordingly
33 }
34
35 /*
36 * Set the monomer type id for this solvent species.
37 */
38 template <typename WT>
41
42 /*
43 * Set the size parameter for this solvent.
44 */
45 template <typename WT>
47 { size_ = size; }
48
49}
SolventSpecies()
Constructor.
double size() const
Get the size (number of monomers) in this solvent.
int monomerId() const
Get the monomer type id.
void setMonomerId(int monomerId)
Set the monomer id for this solvent.
virtual void readParameters(std::istream &in)
Read parameters and initialize.
void setSize(double size)
Set the molecular volume of this solvent species.
virtual void readParameters(std::istream &in)
Read phi or mu (but not both) and set ensemble accordingly.
Definition Species.tpp:34
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.
PSCF package top-level namespace.