PSCF v1.3
r1d/solvers/Solvent.h
1#ifndef R1D_SOLVENT_H
2#define R1D_SOLVENT_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/chem/SolventSpecies.h> // base class
12#include <r1d/solvers/Propagator.h> // typedefs
13
14namespace Pscf {
15namespace R1d {
16
17 class Domain;
18 using namespace Util;
19
26 class Solvent : public SolventSpecies
27 {
28
29 public:
30
31 // Public typename alias
32
36 using FieldT = typename Propagator::FieldT;
37
38 // Public member functions
39
43 Solvent();
44
48 ~Solvent();
49
55 void setDiscretization(Domain const & domain);
56
64 void compute(FieldT const & wField );
65
68
72 Domain const & domain() const;
73
77 const FieldT& cField() const;
78
80
81 private:
82
83 // Concentration field for this solvent
84 FieldT cField_;
85
86 // Pointer to associated domain
87 Domain const * domainPtr_;
88
89 };
90
91 // Inline member functions
92
94 inline const typename Solvent::FieldT& Solvent::cField() const
95 { return cField_; }
96
98 inline Domain const & Solvent::domain() const
99 {
100 UTIL_ASSERT(domainPtr_);
101 return *domainPtr_;
102 }
103
104}
105}
106#endif
One-dimensional spatial domain and discretization grid.
DArray< double > FieldT
Generic field (function of position).
void setDiscretization(Domain const &domain)
Set association with Domain and allocate concentration field array.
typename Propagator::FieldT FieldT
Field type.
void compute(FieldT const &wField)
Compute monomer concentration field, q and phi and/or mu.
Domain const & domain() const
Return associated domain by reference.
const FieldT & cField() const
Get monomer concentration field for this solvent.
SolventSpecies()
Constructor.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Definition global.h:75
SCFT with real 1D fields.
PSCF package top-level namespace.
Definition param_pc.dox:1