#include <Grid.h>
Public Member Functions | |
GridElement () | |
GridElement (ParamStructure::GridElement parameters) | |
GridElement (ParamStructure::GridElement parameters, int L_size, int pc_size, int alpha_size) | |
Constructor. | |
void | Initialize (ParamStructure::GridElement parameters) |
Saving parameters to the class and initializing boundary conditions. | |
void | AllocateMemory (int L_size, int pc_size, int alpha_size) |
Allocating memory for grid element and boundaries. | |
void | Initialize (ParamStructure::GridElement parameters, int L_size, int pc_size, int alpha_size) |
Grid element initialization. | |
GridElement & | operator= (const Matrix3D< double > &M) |
GridElement = Matrix3D. | |
GridElement & | operator= (double val) |
GridElement = value. | |
GridElement | Kfunc () |
Returns epc (assumed to be applyed to pc). | |
void | Kfunc (GridElement arg) |
Convert agr to epc. | |
void | SetRegularGridValue (int il, int im, int ia, int gridElementDirection) |
Function return the value for the specified point on regular grid. | |
Public Attributes | |
ParamStructure::GridElement | GridElement_parameters |
int | size |
Class for GridElement in parent class Matrix3D holds values of one coordinate from 3-dimentional (usually) coordinate system. Has two BoundaryCondition members: lowerBoundaryCondition and upperBoundaryCondition. Has functions to create girds of different type.
Definition at line 28 of file Grid.h.
GridElement::GridElement | ( | ParamStructure::GridElement | parameters | ) |
GridElement::GridElement | ( | ParamStructure::GridElement | parameters, | |
int | L_size, | |||
int | pc_size, | |||
int | alpha_size | |||
) |
Constructor.
Allocate memory for grid element (allocate memory for arrays) and run initialization.
parameters | - grid element parameters structure | |
L_size | - L size | |
pc_size | - pc size | |
alpha_size | - alpha size |
Definition at line 35 of file Grid.cpp.
References AllocateMemory(), and Initialize().
void GridElement::AllocateMemory | ( | int | L_size, | |
int | pc_size, | |||
int | alpha_size | |||
) |
Allocating memory for grid element and boundaries.
L_size | - L size | |
pc_size | - pc size | |
alpha_size | - alpha size |
Reimplemented from Matrix3D< double >.
Definition at line 62 of file Grid.cpp.
Referenced by GridElement(), Grid::Initialize(), and Initialize().
void GridElement::Initialize | ( | ParamStructure::GridElement | parameters, | |
int | L_size, | |||
int | pc_size, | |||
int | alpha_size | |||
) |
Grid element initialization.
Allocate memory for grid element (allocate memory for array) and run initialization. In case we didn't do this in constructor.
Definition at line 48 of file Grid.cpp.
References AllocateMemory(), and Initialize().
void GridElement::Initialize | ( | ParamStructure::GridElement | parameters | ) |
Saving parameters to the class and initializing boundary conditions.
parameters | - grid element parameters structure |
Definition at line 72 of file Grid.cpp.
References GridElement_parameters, ParamStructure::GridElement::name, Matrix3D< double >::name, ParamStructure::GridElement::size, and size.
Referenced by GridElement(), Grid::Initialize(), and Initialize().
void GridElement::Kfunc | ( | GridElement | arg | ) |
Convert agr to epc.
Arg should be pc.
arg | - should be pc. |
Definition at line 120 of file Grid.cpp.
References Kfunc(), Matrix3D< double >::size_x, Matrix3D< double >::size_y, and Matrix3D< double >::size_z.
GridElement GridElement::Kfunc | ( | ) |
Returns epc (assumed to be applyed to pc).
Definition at line 103 of file Grid.cpp.
References VF::Kfunc(), Matrix3D< double >::size_x, Matrix3D< double >::size_y, and Matrix3D< double >::size_z.
Referenced by Kfunc(), and Grid::MakeGrid().
GridElement & GridElement::operator= | ( | double | val | ) |
GridElement = value.
val | - value val. |
Reimplemented from Matrix3D< double >.
Definition at line 94 of file Grid.cpp.
References operator=().
GridElement & GridElement::operator= | ( | const Matrix3D< double > & | M | ) |
GridElement = Matrix3D.
&M | - matrix M. |
Reimplemented from Matrix3D< double >.
Definition at line 83 of file Grid.cpp.
Referenced by operator=().
void GridElement::SetRegularGridValue | ( | int | iteratorL, | |
int | iteratorPc, | |||
int | iteratorAlpha, | |||
int | gridElementDirection | |||
) |
Function return the value for the specified point on regular grid.
Very usefull function, allows to avoid a lot of typos in creation of regular grids everywhere.
Just don't have to repeat regular grid creation code a lot of times. The function create logarithmic grid if useLogScale == true as: 10^(log10(min) + x * (log10(max) - log10(min))/(size-1); if useLogScale == false, then grid is: min + x * (max - min)/(size-1). If grid size == 1 the function returns max.
PS: size, min and max stored in the gridElement already. PPS: useLogScale is also there.
iteratorL | - index on L-grid. | |
iteratorPc | - index on pc-grid. | |
iteratorAlpha | - index on alpha-grid. | |
gridElementDirection | - index on the grid, which we are making. |
Definition at line 147 of file Grid.cpp.
References GridElement_parameters, ParamStructure::GridElement::max, ParamStructure::GridElement::min, ParamStructure::GridElement::size, and ParamStructure::GridElement::useLogScale.
Referenced by Grid::MakeGrid().
Definition at line 33 of file Grid.h.
Referenced by Initialize(), PSD::Load_initial_f_2d(), Grid::MakeGrid(), and SetRegularGridValue().
Definition at line 36 of file Grid.h.
Referenced by DiffusionCoefficient::Calculate(), PSD::Diffusion_alpha(), PSD::Diffusion_L(), PSD::Diffusion_pc(), PSD::Diffusion_pc_alpha(), DiffusionCoefficient::DiffusionCoefficient(), PSD::DiffusionMixTermExplicit(), Grid::Grid(), SourcesAndLosses::Initialize(), Grid::Initialize(), Initialize(), PSD::Interpolate(), PSD::Load_initial_f(), PSD::Load_initial_f_2d(), PSD::Load_initial_f_file(), DiffusionCoefficient::LoadDiffusionCoefficientFromFileWithGrid(), DiffusionCoefficient::LoadDiffusionCoefficientFromPlaneFile(), PSD::LoadInitialValue(), main(), DiffusionCoefficient::MakeDLL100(), DiffusionCoefficient::MakeDLL_B(), DiffusionCoefficient::MakeDLL_BE(), DiffusionCoefficient::MakeDLL_FAKE(), Grid::MakeGrid(), Grid::Output(), and PSD::SourcesAndLosses().