COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_atmos.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2019 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 // Distributed under GNU - LGPL
7 //
8 // COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
9 // General Public License as published by the Free Software Foundation, either version 3 of the License,
10 // or any later version.
11 //
12 // COMPASS: End-to-end AO simulation tool using GPU acceleration
13 // The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.
14 //
15 // The final product includes a software package for simulating all the critical subcomponents of AO,
16 // particularly in the context of the ELT and a real-time core based on several control approaches,
17 // with performances consistent with its integration into an instrument. Taking advantage of the specific
18 // hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to
19 // conduct large simulation campaigns called to the ELT.
20 //
21 // The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components
22 // of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and
23 // various systems configurations such as multi-conjugate AO.
24 //
25 // COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
26 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 // See the GNU Lesser General Public License for more details.
28 //
29 // You should have received a copy of the GNU Lesser General Public License along with COMPASS.
30 // If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
31 // -----------------------------------------------------------------------------
32 
41 
42 #ifndef _SUTRA_ATMOS_H_
43 #define _SUTRA_ATMOS_H_
44 
45 #include <sutra_tscreen.h>
46 
47 using std::pair;
48 using std::vector;
49 
50 class SutraAtmos {
51  public:
52  int nscreens;
53  vector<SutraTurbuScreen *> d_screens;
54  float r0;
56 
57  public:
58  SutraAtmos(CarmaContext *context, int nscreens, float global_r0, float *r0,
59  long *size, long *size2, float *altitude, float *windspeed,
60  float *winddir, float *deltax, float *deltay, int device);
62 
63  int init_screen(int idx, float *h_A, float *h_B, unsigned int *h_istencilx,
64  unsigned int *h_istencily, int seed);
65 
66  int add_screen(float altitude, long size, long stencilSize, float amplitude,
67  float windspeed, float winddir, float deltax, float deltay,
68  int device);
69  int del_screen(const int idx);
70  int refresh_screen(int idx);
71 
72  int move_atmos();
73  int set_r0(float r0);
74  int set_seed(int idx, float seed);
75 };
76 
77 #endif // _SUTRA_ATMOS_H_
SutraAtmos::add_screen
int add_screen(float altitude, long size, long stencilSize, float amplitude, float windspeed, float winddir, float deltax, float deltay, int device)
SutraAtmos::d_screens
vector< SutraTurbuScreen * > d_screens
Definition: sutra_atmos.h:53
SutraAtmos::r0
float r0
Definition: sutra_atmos.h:54
SutraAtmos::SutraAtmos
SutraAtmos(CarmaContext *context, int nscreens, float global_r0, float *r0, long *size, long *size2, float *altitude, float *windspeed, float *winddir, float *deltax, float *deltay, int device)
SutraAtmos::del_screen
int del_screen(const int idx)
SutraAtmos::set_r0
int set_r0(float r0)
SutraAtmos::init_screen
int init_screen(int idx, float *h_A, float *h_B, unsigned int *h_istencilx, unsigned int *h_istencily, int seed)
SutraAtmos
this class provides the atmos features to COMPASS
Definition: sutra_atmos.h:50
sutra_tscreen.h
SutraAtmos::move_atmos
int move_atmos()
SutraAtmos::nscreens
int nscreens
Definition: sutra_atmos.h:52
SutraAtmos::~SutraAtmos
~SutraAtmos()
CarmaContext
this class provides the context in which CarmaObj are created
Definition: carma_context.h:104
SutraAtmos::current_context
CarmaContext * current_context
Definition: sutra_atmos.h:55
SutraAtmos::refresh_screen
int refresh_screen(int idx)
SutraAtmos::set_seed
int set_seed(int idx, float seed)