OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Optimizer.h
Go to the documentation of this file.
1 #ifndef __OPTIMIZER_H__
2 #define __OPTIMIZER_H__
3 
4 #include <vector>
5 
6 #include "Util/Types.h"
7 #include "Pilot/Poller.h"
8 
14 class Optimizer : protected Poller {
15 
16 public:
17 
18  Optimizer(MPI_Comm comm) : Poller(comm) {}
19  virtual ~Optimizer() {}
20 
22  typedef std::vector< std::pair<double, double> > bounds_t;
23 
25  virtual void initialize() = 0;
26 
27 protected:
28 
29  // propagate poller hooks
30  virtual void setupPoll() = 0;
31  virtual void prePoll() = 0;
32  virtual void postPoll() = 0;
33  virtual void onStop() = 0;
34  virtual bool onMessage(MPI_Status status, size_t length) = 0;
35 
36 private:
37 
38 };
39 
40 #endif
virtual void prePoll()=0
executed before checking for new request
Optimizer(MPI_Comm comm)
Definition: Optimizer.h:18
virtual void onStop()=0
enable implementation to react to STOP tag
std::vector< std::pair< double, double > > bounds_t
type of bounds for design variables
Definition: Optimizer.h:22
virtual ~Optimizer()
Definition: Optimizer.h:19
An abstract class defining the interface for all optimizer components.
Definition: Optimizer.h:14
virtual bool onMessage(MPI_Status status, size_t length)=0
virtual void postPoll()=0
executed after handling (if any) new request
virtual void initialize()=0
entry point for optimizer
An interface implementing the basics of a poll loop, posting an MPI_Irecv and waiting for new request...
Definition: Poller.h:18
virtual void setupPoll()=0
executed before starting polling loop