10 #ifndef LOAD_CONSTANCE_H // continue if have not load this file yet
11 #define LOAD_CONSTANCE_H
16 #include "../Matrix/Matrix.h"
17 #include "../VariousFunctions/variousConstants.h"
18 #include "../Logging/Output.h"
72 double L, EMeV, Alpha;
74 bool Load_dxx_parameters(
string filename);
111 string usetau, usetauLpp;
129 } general_Output_parameters;
133 localDiffusionsGrid_type;
152 radialDiffusionGrid_L, radialDiffusionGrid_pc, radialDiffusionGrid_alpha, radialDiffusionGrid_epc,
153 localDiffusionsGrid_L, localDiffusionsGrid_pc, localDiffusionsGrid_alpha, localDiffusionsGrid_epc;
168 L_LowerBoundaryCondition,
169 L_UpperBoundaryCondition,
170 pc_LowerBoundaryCondition,
171 pc_UpperBoundaryCondition,
172 alpha_LowerBoundaryCondition,
173 alpha_UpperBoundaryCondition;
186 string usetauLpp_SteadyState;
217 } psdRadialDiffusion,
226 string SL_L_top_filename;
228 string SL_E_min_filename;
257 bool Load_parameters(
string filename);
261 void StrToVal(
string input,
double &place);
262 void StrToVal(
string input,
int &place);
263 void StrToVal(
string input,
string &place);
264 void StrToVal(
string input,
bool &place);
266 void load_1d(
Matrix1D<double> &var,
string filename,
double dt,
int var_size = 0);
268 void load_2d(
Matrix2D<double> &var,
string filename,
double dt,
int var_size_x = 0,
int var_size_y = 0);
270 typedef vector<double> T_double_vector;
271 typedef vector<T_double_vector> T_2d_double_vector;
275 double& T_2d_double_vector_add(T_2d_double_vector &v,
size_t x,
size_t y);
278 bool str2bool(
string str);
279 string bool2str(
bool b);
Matrix1D< double > Kp
Kp array.
Definition: Parameters.h:99
bool useLmp
Magnitopause position flag.
Definition: Parameters.h:231
string preconditioner_type
maximum error, for iteration methods
Definition: Parameters.h:213
string folderName
output folder name.
Definition: Parameters.h:127
Interpolation parameters structure
Definition: Parameters.h:238
double constLpp
constant Lpp value (if it's constant).
Definition: Parameters.h:109
double min
min value.
Definition: Parameters.h:148
double initial_PSD_inner_psd
Inner PSD boundary value for steady state, default 0.
Definition: Parameters.h:195
Matrix1D< double > Lpp
Lpp array.
Definition: Parameters.h:107
string filetype
Type of the file (w/wo grid etc)
Definition: Parameters.h:35
bool useScale
Flag, use scaling if equal to true.
Definition: Parameters.h:41
Matrix1D< double > Bf
Boundary flux array.
Definition: Parameters.h:103
string output_PSD_fileName4D
File name for psd output.
Definition: Parameters.h:200
string Omega_mType
Omega_m type. Check StrToVal(string input, Omega_mTypes &place) for known values. ...
Definition: Parameters.h:51
bool useAlphaDiffusion
Using diffusions flags.
Definition: Parameters.h:94
double initial_PSD_Kp0
Kp for steady state?
Definition: Parameters.h:191
string particle
Type of particles, produced wave? Ions or electrons. Check StrToVal(string input, ParticleTypes &plac...
Definition: Parameters.h:69
string fileLpp
Lpp file name.
Definition: Parameters.h:110
Matrix1D< double > tauLpp
Lifetime inside of the plasmasphere.
Definition: Parameters.h:113
double lam_min
Minimum latitude.
Definition: Parameters.h:61
string filename
File name to load boundary conditions from.
Definition: Parameters.h:165
double initial_PSD_tauSteadyState
Tau for steady state, if we are calculation initial values as steady state solytion.
Definition: Parameters.h:183
Matrix1D< double > tau
Lifetime out of the plasmasphere.
Definition: Parameters.h:112
string logFileName
log-file name.
Definition: Parameters.h:126
string initial_PSD_Type
Tells us where to get initial PSD values. Check StrToVal(string input, InitialPSDTypes &place) for kn...
Definition: Parameters.h:181
Struct that holds various parameters to be used for Dxx.
Definition: Parameters.h:27
string useKp
Flag, using Kp index. constant - use constant value, file - read from file.
Definition: Parameters.h:100
double d_omega
d_omega value.
Definition: Parameters.h:53
double time_start
Time, when diffusion coefficient starts.
Definition: Parameters.h:38
bool useLogScale
Flag, use logarithmic scale.
Definition: Parameters.h:147
string loadOrCalculate
Load diffusion coefficient or calculate flag.
Definition: Parameters.h:44
Boundary conditions parameters structure.
Definition: Parameters.h:159
string type
Interpolation type: spline, linear etc.
Definition: Parameters.h:240
string radialDiffusionGrid_filename
filename, if grid load from file
Definition: Parameters.h:135
double MLT_averaging
MLT averaging part of the orbit.
Definition: Parameters.h:47
Matrix2D< double > Lmp
Magnitopause position Lmp (time, alpha)
Definition: Parameters.h:230
int nint
Number of points in integral.
Definition: Parameters.h:59
double maxSecondDerivative
Definition: Parameters.h:248
string filename
File name for loading or saving diffusion coefficients array.
Definition: Parameters.h:36
int iterStep
Number of iterations between outputs.
Definition: Parameters.h:125
string approximationMethod
Approximation method. Check StrToVal(string input, ApproximationMethods &place) for known values...
Definition: Parameters.h:204
string numberDensity
Number density model. Check StrToVal(string input, NumberDencities &place) for known values...
Definition: Parameters.h:46
double mirror_point_coeff
Coefficient for mirror point (like 0.999, cause we can not integrate all the way to mirror point) ...
Definition: Parameters.h:60
Grid element parameters structure.
Definition: Parameters.h:141
double linearSplineCoef
Definition: Parameters.h:245
string DxxType
Dxx type. Check StrToVal(string input, DiffusionCoefficientTypes &place) for known values...
Definition: Parameters.h:29
string type
Type. Check StrToVal(string input, BoundaryConditionTypes &place) for known values.
Definition: Parameters.h:161
Main parameters structure that holds smaller structures for individual parameters.
Definition: Parameters.h:87
double output_PSD_timeStep
Time step for psd output.
Definition: Parameters.h:201
double Bw
Bw value.
Definition: Parameters.h:57
bool useEnergyDiffusion
Using diffusions flags.
Definition: Parameters.h:95
bool useEnergyAlphaMixedTerms
Definition: Parameters.h:96
int totalIterationsNumber
Total number of iterations.
Definition: Parameters.h:92
double nDays
Simulation total time, days.
Definition: Parameters.h:90
double initial_PSD_some_constant_value
Some psd value. Used as initial PSD value everywhere if initial_PSD_Type = IPSDT_CONSTANT or as minim...
Definition: Parameters.h:192
bool NoNegative
Artificially no negative PSD.
Definition: Parameters.h:116
string name
Grid element name. Optional.
Definition: Parameters.h:143
double value
Value (if it is constant value on the boundary).
Definition: Parameters.h:163
double initial_PSD_tauLppSteadyState
Tau for steady state, if we are calculation initial values as steady state solytion.
Definition: Parameters.h:187
double DxxKp
Kp value associated with parameters (for Kp-scaling)
Definition: Parameters.h:42
string waveName
Wave name.
Definition: Parameters.h:33
string radialDiffusionGrid_type
Local diffusions grid type.
Definition: Parameters.h:132
string fileKp
Kp file name.
Definition: Parameters.h:102
double SOL_max_iter_err
For GMRES - number of iterations before restart.
Definition: Parameters.h:212
double constKp
constant Kp value (if it's constant).
Definition: Parameters.h:101
double timeStep
Time step for output.
Definition: Parameters.h:124
bool outputModelMatrix
Output model matrix.
Definition: Parameters.h:115
double multiplicator
Dxx is multiplied to this number after all other operations. Useful for fast Dxx modifications.
Definition: Parameters.h:49
General program output parameters structure.
Definition: Parameters.h:123
bool use_normalization
Type of preconditioner to yse.
Definition: Parameters.h:214
double timeStep
Time step, hours.
Definition: Parameters.h:91
string initial_PSD_fileName
File name, if we need to load initial values from file.
Definition: Parameters.h:182
Definition: Parameters.h:208
string output_PSD_folderName
Folder name for psd output.
Definition: Parameters.h:199
vector< DxxParameters_structure > DxxParametersList
List of diffusion coefficients parameters.
Definition: Parameters.h:254
bool BwFromLambda
Bw lambda dependance flag.
Definition: Parameters.h:58
string useLog
Flag, if we should interpolate logarithm of the values.
Definition: Parameters.h:242
string fileBf
Bf file name.
Definition: Parameters.h:106
string localDiffusionsGrid_filename
filename, if grid load from file
Definition: Parameters.h:136
string waveType
Wave type (chorus, hiss etc). Check StrToVal(string input, WaveTypes &place) for known values...
Definition: Parameters.h:32
string fileName1D
1d-output file name.
Definition: Parameters.h:128
string solutionMethod
Solution method. Check StrToVal(string input, SolutionMethods &place) for known values.
Definition: Parameters.h:206
double Omega_m
Omega_m value.
Definition: Parameters.h:52
string initial_PSD_J_L7_function
Name of the function for flux at L=7. Can be 'J_L7' or 'J_L7_corrected'.
Definition: Parameters.h:193
double constBf
constant Bf value (if it's constant).
Definition: Parameters.h:105
double max
max value.
Definition: Parameters.h:149
double initial_PSD_outer_psd
Outer PSD boundary value for steady state, default 1.
Definition: Parameters.h:194
double lam_max
Maximum latitude.
Definition: Parameters.h:62
double omega_lc
omega lower cutoff
Definition: Parameters.h:55
double time_end
Time, when diffusion coefficient ends.
Definition: Parameters.h:39
string DxxName
Dxx name.
Definition: Parameters.h:30
PSD parameters structure.
Definition: Parameters.h:178
double omega_uc
omega upper cutoff
Definition: Parameters.h:54
int size
Grid size.
Definition: Parameters.h:145
string useLpp
Flag, using plasma pause location dependences if equal true.
Definition: Parameters.h:108
string useBf
Flag, using boundary flux dependences if equal true.
Definition: Parameters.h:104
int SOL_i_max
Maximum number of steps, for iteration methods.
Definition: Parameters.h:211
bool useRadialDiffusion
Using diffusions flags.
Definition: Parameters.h:93
int outputLvl
Detalization level of screen output.
Definition: Parameters.h:89
Sources and losses parameters structure.
Definition: Parameters.h:223
string fileLmp
Magnitopause position file name.
Definition: Parameters.h:232