VERB4D
|
Same functionality as matrices found in Matrix.h but can also be updated from ini-files. More...
#include "UpdatableMatrix.h"
Macros | |
#define | UPDATE_EXT ".lst" |
Functions | |
void | MatrixAllocateMemory (Matrix1D< double > &M, const Matrix1D< double > Q1, const Matrix1D< double > Q2, const Matrix1D< double > Q3, const Matrix1D< double > Q4) |
void | MatrixAllocateMemory (Matrix2D< double > &M, const Matrix2D< double > Q1, const Matrix2D< double > Q2, const Matrix2D< double > Q3, const Matrix2D< double > Q4) |
void | MatrixAllocateMemory (Matrix3D< double > &M, const Matrix3D< double > Q1, const Matrix3D< double > Q2, const Matrix3D< double > Q3, const Matrix3D< double > Q4) |
void | MatrixAllocateMemory (Matrix4D< double > &M, const Matrix4D< double > Q1, const Matrix4D< double > Q2, const Matrix4D< double > Q3, const Matrix4D< double > Q4) |
void | MatrixReadFromFile (Matrix1D< double > &M, string data_filename, const Matrix1D< double > Q1, const Matrix1D< double > Q2, const Matrix1D< double > Q3, const Matrix1D< double > Q4) |
void | MatrixReadFromFile (Matrix2D< double > &M, string data_filename, const Matrix2D< double > Q1, const Matrix2D< double > Q2, const Matrix2D< double > Q3, const Matrix2D< double > Q4) |
void | MatrixReadFromFile (Matrix3D< double > &M, string data_filename, const Matrix3D< double > Q1, const Matrix3D< double > Q2, const Matrix3D< double > Q3, const Matrix3D< double > Q4) |
void | MatrixReadFromFile (Matrix4D< double > &M, string data_filename, const Matrix4D< double > Q1, const Matrix4D< double > Q2, const Matrix4D< double > Q3, const Matrix4D< double > Q4) |
void | MatrixLimit (UpdatableMatrix< Matrix1D< double > > &M, Matrix1D< double > &Q1, Matrix1D< double > &Q2, Matrix1D< double > &Q3, Matrix1D< double > &Q4, double Q1_from, double Q1_to, double Q2_from, double Q2_to, double Q3_from, double Q3_to, double Q4_from, double Q4_to) |
void | MatrixLimit (UpdatableMatrix< Matrix2D< double > > &M, Matrix2D< double > &Q1, Matrix2D< double > &Q2, Matrix2D< double > &Q3, Matrix2D< double > &Q4, double Q1_from, double Q1_to, double Q2_from, double Q2_to, double Q3_from, double Q3_to, double Q4_from, double Q4_to) |
void | MatrixLimit (UpdatableMatrix< Matrix3D< double > > &M, Matrix3D< double > &Q1, Matrix3D< double > &Q2, Matrix3D< double > &Q3, Matrix3D< double > &Q4, double Q1_from, double Q1_to, double Q2_from, double Q2_to, double Q3_from, double Q3_to, double Q4_from, double Q4_to) |
void | MatrixLimit (UpdatableMatrix< Matrix4D< double > > &M, Matrix4D< double > &Q1, Matrix4D< double > &Q2, Matrix4D< double > &Q3, Matrix4D< double > &Q4, double Q1_from, double Q1_to, double Q2_from, double Q2_to, double Q3_from, double Q3_to, double Q4_from, double Q4_to) |
string | GetCurrentTimeValue (string filename, double current_time, double &update_time) |
bool | is_number (const std::string &s) |
Same functionality as matrices found in Matrix.h but can also be updated from ini-files.
These can act just like matrices, but have the ability to be updated from ini-files at any point in time.
Templetes are used so we don't repeat exactly the same code 4 times - for 1D, 2D, 3D, and 4D matrices
string GetCurrentTimeValue | ( | string | filename, |
double | current_time, | ||
double & | update_time | ||
) |
Search for current time-step in an update-file and return the corresponding value
filename | - filename to check. Also can be just a value - then we just return this value! |
current_time | - the time we're searching for |
update_time | - this is a return value! It is the time we've found! |
bool is_number | ( | const std::string & | s | ) |
Check if a string is number
Note: Will accept any string (even badly formatted ones) consisting entirely of the following: Numbers, . , e , - , +
For example 1.2.3-e.4 will be accepted
s | - the string we need to check |
|
inline |
Allocates memory using the allocate memory function for Matrix1D
|
inline |
Allocates memory using the allocate memory function for Matrix2D
|
inline |
Allocates memory using the allocate memory function for Matrix3D
|
inline |
Allocates memory using the allocate memory function for Matrix4D
void MatrixLimit | ( | UpdatableMatrix< Matrix1D< double > > & | M, |
Matrix1D< double > & | Q1, | ||
Matrix1D< double > & | Q2, | ||
Matrix1D< double > & | Q3, | ||
Matrix1D< double > & | Q4, | ||
double | Q1_from, | ||
double | Q1_to, | ||
double | Q2_from, | ||
double | Q2_to, | ||
double | Q3_from, | ||
double | Q3_to, | ||
double | Q4_from, | ||
double | Q4_to | ||
) |
Function to limit the data on any direction (e.g. only above plasmapause location, or only on day/night side)
Sets all values to 0 which are not in the range of "from" to "to"
M | - The matrix that will be updated(limited) |
void MatrixLimit | ( | UpdatableMatrix< Matrix2D< double > > & | M, |
Matrix2D< double > & | Q1, | ||
Matrix2D< double > & | Q2, | ||
Matrix2D< double > & | Q3, | ||
Matrix2D< double > & | Q4, | ||
double | Q1_from, | ||
double | Q1_to, | ||
double | Q2_from, | ||
double | Q2_to, | ||
double | Q3_from, | ||
double | Q3_to, | ||
double | Q4_from, | ||
double | Q4_to | ||
) |
Function to limit the data on any direction (e.g. only above plasmapause location, or only on day/night side)
Sets all values to 0 which are not in the range of "from" to "to"
M | - The matrix that will be updated(limited) |
void MatrixLimit | ( | UpdatableMatrix< Matrix3D< double > > & | M, |
Matrix3D< double > & | Q1, | ||
Matrix3D< double > & | Q2, | ||
Matrix3D< double > & | Q3, | ||
Matrix3D< double > & | Q4, | ||
double | Q1_from, | ||
double | Q1_to, | ||
double | Q2_from, | ||
double | Q2_to, | ||
double | Q3_from, | ||
double | Q3_to, | ||
double | Q4_from, | ||
double | Q4_to | ||
) |
Function to limit the data on any direction (e.g. only above plasmapause location, or only on day/night side)
Sets all values to 0 which are not in the range of "from" to "to"
M | - The matrix that will be updated(limited) |
void MatrixLimit | ( | UpdatableMatrix< Matrix4D< double > > & | M, |
Matrix4D< double > & | Q1, | ||
Matrix4D< double > & | Q2, | ||
Matrix4D< double > & | Q3, | ||
Matrix4D< double > & | Q4, | ||
double | Q1_from, | ||
double | Q1_to, | ||
double | Q2_from, | ||
double | Q2_to, | ||
double | Q3_from, | ||
double | Q3_to, | ||
double | Q4_from, | ||
double | Q4_to | ||
) |
Function to limit the data on any direction (e.g. only above plasmapause location, or only on day/night side)
Sets all values to 0 which are not in the range of "from" to "to"
M | - The matrix that will be updated(limited) |
void MatrixReadFromFile | ( | Matrix1D< double > & | M, |
string | data_filename, | ||
const Matrix1D< double > | Q1, | ||
const Matrix1D< double > | Q2, | ||
const Matrix1D< double > | Q3, | ||
const Matrix1D< double > | Q4 | ||
) |
Reading from a file using Matrix1D::readFromFile(string filename, const Matrix1D< T > grid_x)
Only using Q1
void MatrixReadFromFile | ( | Matrix2D< double > & | M, |
string | data_filename, | ||
const Matrix2D< double > | Q1, | ||
const Matrix2D< double > | Q2, | ||
const Matrix2D< double > | Q3, | ||
const Matrix2D< double > | Q4 | ||
) |
Reading from a file using Matrix2D::readFromFile(string filename, const Matrix2D< T > grid_x,const Matrix2D< T > grid_y)
Only using Q1, Q2
void MatrixReadFromFile | ( | Matrix3D< double > & | M, |
string | data_filename, | ||
const Matrix3D< double > | Q1, | ||
const Matrix3D< double > | Q2, | ||
const Matrix3D< double > | Q3, | ||
const Matrix3D< double > | Q4 | ||
) |
Reading from a file using Matrix3D::readFromFile(string filename, const Matrix3D< T > grid_x,const Matrix3D< T > grid_y, const Matrix3D< T > grid_z)
Only using Q1, Q2, Q3
void MatrixReadFromFile | ( | Matrix4D< double > & | M, |
string | data_filename, | ||
const Matrix4D< double > | Q1, | ||
const Matrix4D< double > | Q2, | ||
const Matrix4D< double > | Q3, | ||
const Matrix4D< double > | Q4 | ||
) |
Reading from a file using Matrix4D::readFromFile(string filename, const Matrix4D< T > grid_w, const Matrix4D< T > grid_x,const Matrix4D< T > grid_y, const Matrix4D< T > grid_z)
Using Q1, Q2, Q3, Q4