VERB4D
Functions
ReadInitialData.h File Reference

Reads in all the data files created in Matlab in order to initialize the parameters. More...

#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include "Logger.h"
#include "UpdatableMatrix.h"
#include "Matrix.h"
#include "Parameters.h"

Go to the source code of this file.

Functions

bool ReadInitialData (string &InputFolder, string &OutputFolder, int argc, char *argv[], double &total_time, double &dt, double &output_time, double &time_first, long int &it_first, int &max_threads, string &inversion_method, string &use_matlab, string &include_boundary, Matrix4D< double > &PSD, Matrix4D< double > &P, Matrix4D< double > &R, Matrix4D< double > &V, Matrix4D< double > &K, UpdatableMatrix< Matrix4D< double > > &L, int &P_size, int &R_size, int &V_size, int &K_size, int &L_size, Matrix3D< double > &P_LBC, Matrix3D< double > &P_UBC, UpdatableMatrix< Matrix3D< double > > &R_LBC, UpdatableMatrix< Matrix3D< double > > &R_UBC, UpdatableMatrix< Matrix3D< double > > &V_LBC, UpdatableMatrix< Matrix3D< double > > &V_UBC, UpdatableMatrix< Matrix3D< double > > &K_LBC, UpdatableMatrix< Matrix3D< double > > &K_UBC, UpdatableMatrix< Matrix3D< double > > &L_LBC, UpdatableMatrix< Matrix3D< double > > &L_UBC, string &P_LBC_type, string &P_UBC_type, string &R_LBC_type, string &R_UBC_type, string &V_LBC_type, string &V_UBC_type, string &K_LBC_type, string &K_UBC_type, string &L_LBC_type, string &L_UBC_type, UpdatableListMatrix< Matrix4D< double > > &DLL, UpdatableListMatrix< Matrix4D< double > > &DVV, UpdatableListMatrix< Matrix4D< double > > &DKK, UpdatableListMatrix< Matrix4D< double > > &DVK, UpdatableMatrix< Matrix4D< double > > &VP, UpdatableMatrix< Matrix4D< double > > &VL, UpdatableMatrix< Matrix4D< double > > &G_local, UpdatableMatrix< Matrix4D< double > > &G_radial, UpdatableListMatrix< Matrix4D< double > > &Sources, UpdatableListMatrix< Matrix4D< double > > &Losses)
 

Detailed Description

Reads in all the data files created in Matlab in order to initialize the parameters.

Created on: Oct 5, 2012 Author: dimath

Function Documentation

bool ReadInitialData ( string &  InputFolder,
string &  OutputFolder,
int  argc,
char *  argv[],
double &  time_total,
double &  time_step,
double &  time_output,
double &  time_first,
long int &  it_first,
int &  max_threads,
string &  inversion_method,
string &  use_matlab,
string &  include_boundary,
Matrix4D< double > &  PSD,
Matrix4D< double > &  P,
Matrix4D< double > &  R,
Matrix4D< double > &  V,
Matrix4D< double > &  K,
UpdatableMatrix< Matrix4D< double > > &  L,
int &  P_size,
int &  R_size,
int &  V_size,
int &  K_size,
int &  L_size,
Matrix3D< double > &  PSD_l_P,
Matrix3D< double > &  PSD_u_P,
UpdatableMatrix< Matrix3D< double > > &  PSD_l_R,
UpdatableMatrix< Matrix3D< double > > &  PSD_u_R,
UpdatableMatrix< Matrix3D< double > > &  PSD_l_V,
UpdatableMatrix< Matrix3D< double > > &  PSD_u_V,
UpdatableMatrix< Matrix3D< double > > &  PSD_l_K,
UpdatableMatrix< Matrix3D< double > > &  PSD_u_K,
UpdatableMatrix< Matrix3D< double > > &  PSD_l_L,
UpdatableMatrix< Matrix3D< double > > &  PSD_u_L,
string &  Pl_BC_type,
string &  Pu_BC_type,
string &  Rl_BC_type,
string &  Ru_BC_type,
string &  Vl_BC_type,
string &  Vu_BC_type,
string &  Kl_BC_type,
string &  Ku_BC_type,
string &  Ll_BC_type,
string &  Lu_BC_type,
UpdatableListMatrix< Matrix4D< double > > &  DLL,
UpdatableListMatrix< Matrix4D< double > > &  DVV,
UpdatableListMatrix< Matrix4D< double > > &  DKK,
UpdatableListMatrix< Matrix4D< double > > &  DVK,
UpdatableMatrix< Matrix4D< double > > &  VP,
UpdatableMatrix< Matrix4D< double > > &  VL,
UpdatableMatrix< Matrix4D< double > > &  G_local,
UpdatableMatrix< Matrix4D< double > > &  G_radial,
UpdatableListMatrix< Matrix4D< double > > &  Sources,
UpdatableListMatrix< Matrix4D< double > > &  Losses 
)

Reads in all the data created in Matlab in order to initialize the parameters

Using Parameters::getParameter() for timesteps, number of threads, input and output folders, boundary condition types

Using AllocateMemory() for all the matrices

Using UpdatableMatrix<MatrixND>::update() for G_local and G_radial

Using UpdatableMatrix<MatrixND>::readFromIniFile() for all boundary conditions and data tables/matrices

Parameters
InputFolder- Folder to get input from
OutputFolder- Folder to write output to
argc- number of arguments given
argv- array of string arguments inputted
time_total,step,output,first- time variables for calculations
max_threads- number of threads that can be used
inversion_method- tool for doing calculations, usually Lapack
PSD- Phase Space Density Matrix
P,R,V,K,L- matrices for Phi, Actual Distance, Energy, Pitch Angle, Distance due to magnetic field, respectively
P,R,V,K,L_size - sizes for the corresponding matrices
PSD_l_P,R,V,K,L - lower boundaries for PSD with respect to P,R,V,K,L
PSD_u_P,R,V,K,L - upper boundaries for PSD with respect to P,R,V,K,L
BC_type- Type of boundary condition for each matrix - either BCT_CONSTANT_VALUE or BCT_CONSTANT_DERIVATIVE
DLL,DVV,DKK,DVK- diffusion matrices
G_local,G_radial- Jacobians for normalizing data
Sources,Losses- matrices for calculating Sources and Losses(loss cone)