My Project
Grid.h
1 
8 #ifndef Grid_H
9 #define Grid_H
10 
11 #include <string>
12 #include "../Matrix/Matrix.h"
13 #include "../Parameters/Parameters.h"
14 #include "../VariousFunctions/variousFunctions.h"
15 #include "Grid.h"
16 #include "BoundaryConditions.h"
17 
18 using namespace std;
19 
20 
28 class GridElement {
29 public:
30  Matrix3D<double> arr; // array of grid points
31 
32  // initialized flag
33  bool GridElement_initialized;
34 
35  // parameters
36  Parameters_structure::GridElement GridElement_parameters;
37 
38  // members
39  int size;
40 
41  // other functions
42  //GridElement Kfunc(); // return NEW Grid Element equal to Kfunc of present
43  void Kfunc_equal(GridElement arg); // make THIS element equal to Kfunc(arg). Preferred to use this one, works faster
44  void SetRegularGridValue(int il, int im, int ia, int gridElementDirection); // return value for specified parameters for regular grid
45 };
46 
47 
52 class Grid {
53 private:
54 public:
55  // members
56  GridElement L, pc, alpha, epc;
57  //Matrix3D<double> L, pc, alpha, epc;
58  //int LSize, pcSize, alphaSize, epcSize;
59 
60  string type;
61  bool Grid_initialized;
62 
63  void Create_Grid(Parameters_structure::GridElement parameters_L,
65  Parameters_structure::GridElement parameters_alpha,
66  Parameters_structure::GridElement parameters_epc,
67  string grid_filename, string gridType,
68  Grid SecondGrid = Grid()); // the last parameter is needed in case we create the grid based on another grid
69 
70  void Output(string filename);
71 
78  Matrix3D<double> Jacobian;
79 
80 };
81 
84 double find_alpha(double RHS, double alpha_min, double alhpa_max, double ERR = 1e-12, int max_it = 100, int it = 0);
85 
86 #endif
Array of values of coordinate axes.
Definition: Grid.h:28
General namespace.
functions for write log and support files. Functions are defined in Output.h and descripted in Output...
Definition: Output.cpp:15
Grid element parameters structure.
Definition: Parameters.h:141
Computational grid composed of 3 different GridElement.
Definition: Grid.h:53