forked from rikigigi/analisi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcorrelatorespaziale.h
57 lines (48 loc) · 1.73 KB
/
correlatorespaziale.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
*
* (c) Riccardo Bertossa, 2019
*
* Use at your own risk.
*
* If you modified the code, I could be happy if you contribute on github!
*
**/
#ifndef CORRELATORESPAZIALE_H
#define CORRELATORESPAZIALE_H
#include "calcolamultithread.h"
#include "operazionisulista.h"
#include <vector>
class Traiettoria;
class CorrelatoreSpaziale : public CalcolaMultiThread<CorrelatoreSpaziale>, public OperazioniSuLista<CorrelatoreSpaziale,double>
{
public:
CorrelatoreSpaziale(Traiettoria *t,
std::vector< std::array<double,3> > k,
double sigma2,
unsigned int nthreads=0,
unsigned int skip=1,
bool debug=false
);
unsigned int numeroTimestepsOltreFineBlocco(unsigned int n_b) {return 1;}
void reset(const unsigned int numeroTimestepsPerBlocco);
void calc_single_th(const unsigned int &start, const unsigned int &stop, const unsigned int &primo, const unsigned int & ith) noexcept;
void s_fac_k(const double k[3], const unsigned int i_t,double * out ) const;
int get_sfac_size()const {return size_sfac;}
void print(std::ostream & out);
using CalcolaMultiThread::operator=;
~CorrelatoreSpaziale();
std::vector<ssize_t> get_shape() const;
std::vector<ssize_t> get_stride() const;
void join_data(){}
private:
using OperazioniSuLista<CorrelatoreSpaziale,double>::lista;
using OperazioniSuLista<CorrelatoreSpaziale,double>::lunghezza_lista;
Traiettoria *t;
double * sfac;
std::vector< std::array<double,3> > klist;
double sigma2;
unsigned int size_sfac,size_k;
unsigned int nk,tipi_atomi,ntimesteps;
bool debug;
};
#endif // CORRELATORESPAZIALE_H