Skip to content
Snippets Groups Projects
Select Git revision
  • 2efb9cd9863a34e8f467a2b0aabeadd2b846969f
  • main default protected
  • delete-3.8
  • master
  • reduced_normal
  • snooping
  • bundle_Fix
  • weights
  • bundle_adjust
  • 0.4.0
  • 0.3.0
  • 0.2.1
  • 0.1.0
13 results

test_reproject.py

Blame
  • 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.