Select Git revision
test_reproject.py
-
Kelvin Rodriguez authored
* add reproject code * test reproject not pointing to autocnet * get travis to work
Kelvin Rodriguez authored* add reproject code * test reproject not pointing to autocnet * get travis to work
Commons.h 8.35 KiB
/* Distributed under the terms of GPLv3 or later. See COPYING for details. */
/*! \file Commons.h
*
* \brief C++ porting of common data structures.
*
* Many functions of the original FORTRAN code share complex data blocks in
* form of COMMON blocks. This poses the limit of freezing the structure of
* the data blocks in the code, therefore implying the necessity to modify
* the code to adapt it to the input and to recompile before running. C++,
* on the contrary, offers the possibility to represent the necessary data
* structures as classes that can dynamically instantiate the shared information
* in the most convenient format for the current configuration. This approach
* adds an abstraction layer that lifts the need to modify and recompile the
* code depending on the input.
*
*/
#ifndef INCLUDE_COMMONS_H_
#define INCLUDE_COMMONS_H_
/*! \brief Representation of the FORTRAN C1 common blocks.
*
* C1 common blocks are used to store vector field expansions and geometric
* properties, such as sphere sizes, positions and cross-sections. These are
* used by functions such as `aps`, `diel`, `pwma`, `rabas`, `sscr0`, `sscr2`,
* `wmamp`, `wmasp` and `dme`. QUESTION: correct?
*
* Due to the necessity to share the class contents with many functions that
* need to read and update various fields, all shared members of C1 are declared
* public (i.e., the class is just a structure with more advanced constructor
* and destroyer). Further development may go in the direction of creating
* a better encapsulation, either by unpacking the contents (recommended) or
* by creating public methods to access protected fields (standard way, but not
* recommended for HPC applications).
*/
class C1 {
protected:
//! \brief Number of spheres.
int nsph;
//! \brief Maximum order of field expansion.
int lm;
//! \brief NLMMT. QUESTION: definition?
int nlmmt;
public:
//! \brief QUESTION: definition?
dcomplex **rmi;
//! \brief QUESTION: definition?
dcomplex **rei;
//! \brief QUESTION: definition?
dcomplex **w;
//! \brief QUESTION: definition?
dcomplex *fsas;
//! \brief QUESTION: definition?
dcomplex **vints;
//! \brief QUESTION: definition?
double *sscs;
//! \brief QUESTION: definition?
double *sexs;
//! \brief QUESTION: definition?
double *sabs;
//! \brief QUESTION: definition?
double *sqscs;
//! \brief QUESTION: definition?
double *sqexs;
//! \brief QUESTION: definition?
double *sqabs;
//! \brief QUESTION: definition?
double *gcsv;
//! \brief Vector of sphere X coordinates.