PSCF v1.3.2
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
36
43
48
54 virtual int compress() = 0;
55
59 int mdeCounter() const;
60
64 virtual void outputTimers(std::ostream& out) const = 0;
65
69 virtual void clearTimers() = 0;
70
71 protected:
72
77
81 System<D> const & system() const
82 { return *sysPtr_;}
83
88 { return *sysPtr_;}
89
90 private:
91
93 System<D>* sysPtr_;
94
95 };
96
97 #if 0
98 // Default constructor
99 template <int D>
101 : sysPtr_(&system)
102 { setClassName("Compressor"); }
103 #endif
104
105 // Constructor
106 template <int D>
108 : mdeCounter_(0),
109 sysPtr_(&system)
110 { setClassName("Compressor"); }
111
112 // Destructor
113 template <int D>
116
117 // Get number of times MDE has been solved.
118 template <int D>
119 inline int Compressor<D>::mdeCounter() const
120 { return mdeCounter_; }
121
122} // namespace Rpg
123} // namespace Pscf
124#endif
System< D > & system()
Return reference to parent system.
int mdeCounter_
Count how many times MDE has been solved.
Compressor()
Default 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 a complete physical 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.