PSCF v1.3
SolventSpecies.cpp
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 */
16 : Species(),
17 monomerId_(-1),
18 size_(0.0)
19 { setClassName("SolventSpecies"); }
20
21 /*
22 * Destructor
23 */
26
27 /*
28 * Read contents of parameter file block
29 */
30 void SolventSpecies::readParameters(std::istream& in)
31 {
32 read<int>(in, "monomerId", monomerId_);
33 read<double>(in, "size", size_);
34
35 // Read phi or mu (but not both) and set ensemble accordingly
37 }
38
39 /*
40 * Set the monomer type id for this solvent species.
41 */
43 { monomerId_ = monomerId; }
44
45 /*
46 * Set the size parameter for this solvent.
47 */
49 { size_ = size; }
50
51}
SolventSpecies()
Constructor.
void setMonomerId(int monomerId)
Set the monomer id for this solvent.
void setSize(double size)
Set the molecular volume of this solvent species.
~SolventSpecies()
Constructor.
virtual void readParameters(std::istream &in)
Read parameters and initialize.
int monomerId() const
Get the monomer type id.
double size() const
Get the size (number of monomers) in this solvent.
virtual void readParameters(std::istream &in)
Read phi or mu (but not both) and set ensemble accordingly.
Definition Species.cpp:28
Species()
Default constructor.
Definition Species.cpp:18
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.
Definition param_pc.dox:1