#ifndef ION_H #define ION_H class MHD; /// C++ class that handles Ionosphere data and calls the FORTRAN ION solver /** * C++ interface to the LFM ionosphere solver. The actual ionosphere * solver is implemented in Fortran. For more information on the * numerics, see * - ion_fortran_arrays.F * - ionosphere.F * - Lyon, Fedder, Mobarry, 2004. "The Lyon-Fedder-Mobarry (LFM) global MHD magnetospheric simulation code". Journal of Atmospheric and Solar-Terrestrial Physics 66, 1333-1350. */ class ION { public: ION(int,int,int,Range,int, int,int); void initial(int); void step(); void startup(); private: // dimensioning information int NI,NJ,NK; int KKK,NO,NO2; int Nion_I, Nion_J; int ION_PROCESSOR; Partitioning_Type ION_3D; Partitioning_Type ION_3D_GUARD; Partitioning_Type ION_2D; // MHD interaction data FloatARRAY X; FloatARRAY Y; FloatARRAY Z; FloatARRAY Bx; FloatARRAY By; FloatARRAY Bz; FloatARRAY Rho; FloatARRAY Csound; FloatARRAY Ej_pot; FloatARRAY Ek_pot; FloatARRAY Vx_pot; FloatARRAY Vy_pot; FloatARRAY Vz_pot; // local arrays FloatARRAY J0; FloatARRAY Rho0; FloatARRAY C0; FloatARRAY X2ion; FloatARRAY Y2ion; FloatARRAY X_interp; FloatARRAY Y_interp; FloatARRAY J1_interp_N; FloatARRAY Phi_N; FloatARRAY Sigma_H_N; FloatARRAY Sigma_P_N; FloatARRAY Flux_N; FloatARRAY Av_Energy_N; FloatARRAY J1_interp_S; FloatARRAY Phi_S; FloatARRAY Sigma_H_S; FloatARRAY Sigma_P_S; FloatARRAY Flux_S; FloatARRAY Av_Energy_S; // friend functions friend class MHD; friend class IonIO; friend class TestSuite; // see LFM-para/test/integration/IO/ friend void mhd2ion(MHD*, ION*); friend void ion2mhd(MHD*, ION*); friend void grid2ion(MHD*, ION*); #if defined(USE_RCM) && !defined(USE_MIX) friend class MHD2RCM; #endif }; #endif //ION