COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_controller_geo.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_CONTROLLER_GEO_H_
43 #define SUTRA_CONTROLLER_GEO_H_
44 
45 #include <sutra_controller.h>
46 
47 template <typename Tcomp, typename Tout>
48 class sutra_controller_geo : public SutraController<Tcomp, Tout> {
49  public:
50  long Nphi;
51  int Ntt;
52 
65  // CarmaObj<T> *d_Btt;
66  // CarmaObj<T> *d_cenbuff; // centroids circular buffer
67 
68  public:
70  float delay, SutraDms *dms, int *idx_dms, int ndm,
71  int *idx_centro, int ncentro, bool wfs_direction);
74 
75  string get_type();
76 
77  cusparseHandle_t cusparse_handle() {
78  return this->current_context->get_cusparse_handle();
79  }
80  int load_Btt(Tcomp *Btt_pzt, Tcomp *Btt_TT);
81  int load_mgain(Tcomp *mgain);
82  int comp_dphi(SutraSource *target, bool wfs_direction);
83  int comp_com();
84  int init_proj(SutraDms *dms, int *indx_dm, Tcomp *unitpervolt,
85  int *indx_pup);
86  int init_proj_sparse(SutraDms *dms, int *indx_dm, Tcomp *unitpervolt,
87  int *indx_pup, int *indx_mpup, bool roket);
88 };
89 
90 #endif /* SUTRA_CONTROLLER_GEO_H_ */
sutra_controller.h
sutra_controller_geo::sutra_controller_geo
sutra_controller_geo(const sutra_controller_geo &controller)
SutraController::delay
Tcomp delay
Definition: sutra_controller.h:79
sutra_controller_geo::d_geocovTT
CarmaObj< Tcomp > * d_geocovTT
Definition: sutra_controller_geo.h:64
SutraDms
Definition: sutra_dm.h:164
sutra_controller_geo::cusparse_handle
cusparseHandle_t cusparse_handle()
Definition: sutra_controller_geo.h:77
sutra_controller_geo::init_proj_sparse
int init_proj_sparse(SutraDms *dms, int *indx_dm, Tcomp *unitpervolt, int *indx_pup, int *indx_mpup, bool roket)
sutra_controller_geo::d_gain
CarmaObj< Tcomp > * d_gain
Definition: sutra_controller_geo.h:53
sutra_controller_geo::d_phi
CarmaObj< double > * d_phi
Definition: sutra_controller_geo.h:55
sutra_controller_geo::comp_com
int comp_com()
!!! YOU MUST set d_centroids before calling it!!!!
CarmaContext::get_cusparse_handle
cusparseHandle_t get_cusparse_handle()
Definition: carma_context.h:169
sutra_controller_geo::Nphi
long Nphi
Definition: sutra_controller_geo.h:50
sutra_controller_geo::d_phif
CarmaObj< Tcomp > * d_phif
Definition: sutra_controller_geo.h:56
sutra_controller_geo::d_IFsparse
CarmaSparseObj< double > * d_IFsparse
Definition: sutra_controller_geo.h:59
sutra_controller_geo::d_TT
CarmaObj< Tcomp > * d_TT
Definition: sutra_controller_geo.h:63
sutra_controller_geo::get_type
string get_type()
sutra_controller_geo::~sutra_controller_geo
~sutra_controller_geo()
CarmaObj< Tcomp >
CarmaContext
this class provides the context in which CarmaObj are created
Definition: carma_context.h:104
CarmaSparseObj< double >
sutra_controller_geo::d_indx_pup
CarmaObj< int > * d_indx_pup
Definition: sutra_controller_geo.h:57
sutra_controller_geo::d_indx_mpup
CarmaObj< int > * d_indx_mpup
Definition: sutra_controller_geo.h:58
sutra_controller_geo::Ntt
int Ntt
Definition: sutra_controller_geo.h:51
sutra_controller_geo::comp_dphi
int comp_dphi(SutraSource *target, bool wfs_direction)
sutra_controller_geo::d_geocov
CarmaObj< Tcomp > * d_geocov
Definition: sutra_controller_geo.h:60
sutra_controller_geo::d_compfloat
CarmaObj< float > * d_compfloat
Definition: sutra_controller_geo.h:62
sutra_controller_geo::load_mgain
int load_mgain(Tcomp *mgain)
SutraController::nactu
int nactu()
Definition: sutra_controller.h:123
sutra_controller_geo::d_compdouble
CarmaObj< double > * d_compdouble
Definition: sutra_controller_geo.h:61
sutra_controller_geo::d_proj
CarmaObj< Tcomp > * d_proj
Definition: sutra_controller_geo.h:54
SutraController::current_context
CarmaContext * current_context
Definition: sutra_controller.h:75
sutra_controller_geo::sutra_controller_geo
sutra_controller_geo(CarmaContext *context, long nactu, long Nphi, float delay, SutraDms *dms, int *idx_dms, int ndm, int *idx_centro, int ncentro, bool wfs_direction)
SutraSource
this class provides the source features to COMPASS
Definition: sutra_source.h:62
sutra_controller_geo
this class provides the controller_geo features to COMPASS
Definition: sutra_controller_geo.h:48
sutra_controller_geo::init_proj
int init_proj(SutraDms *dms, int *indx_dm, Tcomp *unitpervolt, int *indx_pup)
sutra_controller_geo::load_Btt
int load_Btt(Tcomp *Btt_pzt, Tcomp *Btt_TT)
SutraController
this class provides the controller features to COMPASS
Definition: sutra_controller.h:73