PSCF v1.3
rpg/fts/compressor/Compressor.h
1#ifndef RPG_COMPRESSOR_H
2#define RPG_COMPRESSOR_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 <util/param/ParamComposite.h> // base class
12#include <util/global.h>
13
14namespace Pscf {
15namespace Rpg {
16
17 template <int D> class System;
18
19 using namespace Util;
20
26 template <int D>
28 {
29
30 public:
31
32 #if 0
36 Compressor();
37 #endif
38
45
50
56 virtual int compress() = 0;
57
61 int mdeCounter() const;
62
66 virtual void outputTimers(std::ostream& out) const = 0;
67
71 virtual void clearTimers() = 0;
72
73 protected:
74
78 System<D> const & system() const
79 { return *sysPtr_;}
80
85 { return *sysPtr_;}
86
91
92 private:
93
95 System<D>* sysPtr_;
96
97 };
98
99 #if 0
100 // Default constructor
101 template <int D>
103 : sysPtr_(&system)
104 { setClassName("Compressor"); }
105 #endif
106
107 // Constructor
108 template <int D>
110 : mdeCounter_(0),
111 sysPtr_(&system)
112 { setClassName("Compressor"); }
113
114 // Destructor
115 template <int D>
118
119 // Get number of times MDE has been solved.
120 template <int D>
121 inline int Compressor<D>::mdeCounter() const
122 { return mdeCounter_; }
123
124} // namespace Rpg
125} // namespace Pscf
126#endif
System< D > & system()
Return reference to parent system.
int mdeCounter_
Count how many times MDE has been solved.
Compressor(System< D > &system)
Constructor.
virtual int compress()=0
Iterate Langrange multiplier field.
System< D > const & system() const
Return const reference to parent system.
virtual void outputTimers(std::ostream &out) const =0
Log output timing results.
int mdeCounter() const
Get the number of times the MDE has been solved.
virtual void clearTimers()=0
Clear timers.
Main class, representing one complete system.
void setClassName(const char *className)
Set class name string.
ParamComposite()
Constructor.
File containing preprocessor macros for error handling.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1