SENSEI
A frame work for generic in situ analytics
Autocorrelation.h
1 #ifndef sensei_Autocorrelation_h
2 #define sensei_Autocorrelation_h
3 
4 #include "AnalysisAdaptor.h"
5 #include <mpi.h>
6 #include <string>
7 
8 namespace sensei
9 {
10 /// Performs a temporal autocorrelation on the simulation data
11 class SENSEI_EXPORT Autocorrelation : public AnalysisAdaptor
12 {
13 public:
14  /// Allocate a new Autocorrelation instance
15  static Autocorrelation* New();
16 
17  senseiTypeMacro(Autocorrelation, AnalysisAdaptor);
18 
19  /** Initialize the adaptor. This method must be called to initialize the
20  * adaptor with configuration parameters for the analysis to perform.
21  *
22  * @param window analysis window in timestep count.
23  * @param meshName of mesh containing the array to process
24  * @param association together with \c arrayname, identifies the array to
25  * compute autocorrelation for.
26  * @param arrayName together with \c association, identifies the array to
27  * compute autocorrelation for.
28  * @param kMax number of strongest autocorrelations to report
29  * @param numThreads number of threads in sdiy's thread pool
30  */
31  void Initialize(size_t window, const std::string &meshName,
32  int association, const std::string &arrayName, size_t kMax,
33  int numThreads = 1);
34 
35  /// Incrementally computes autocorrelation on the current simulation state
36  bool Execute(DataAdaptor* data, DataAdaptor**) override;
37 
38  /// Finishes the calculation and dumps the results
39  int Finalize() override;
40 
41 protected:
43  ~Autocorrelation();
44 
45  void PrintResults(size_t k_max);
46 private:
47  Autocorrelation(const Autocorrelation&); // not implemented.
48  void operator=(const Autocorrelation&);
49 
50  class AInternals;
51  AInternals* Internals;
52 };
53 
54 }
55 #endif
int Initialize(MPI_Comm comm, const std::string &fileName, InTransitDataAdaptor *&dataAdaptor)
Creates a sensei::ConfigurableAnalysis adaptor and sensei::InTransitDataAdaptor based on a SENSEI XML...
The base class for data consumers.
Definition: AnalysisAdaptor.h:24
Performs a temporal autocorrelation on the simulation data.
Definition: Autocorrelation.h:11
SENSEI.
Definition: ADIOS2AnalysisAdaptor.h:27
Base class that defines the interface for fetching data from a simulation.
Definition: DataAdaptor.h:25