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 
53 class Grid {
54 private:
55 public:
56  // members
57  GridElement L, pc, alpha, epc;
58  //Matrix3D<double> L, pc, alpha, epc;
59  //int LSize, pcSize, alphaSize, epcSize;
60 
61  string type;
62  bool Grid_initialized;
63 
64  void Create_Grid(Parameters_structure::GridElement parameters_L,
66  Parameters_structure::GridElement parameters_alpha,
67  Parameters_structure::GridElement parameters_epc,
68  string grid_filename, string gridType,
69  Grid SecondGrid = Grid()); // the last parameter is needed in case we create the grid based on another grid
70 
71  void Output(string filename);
72 
80 
81 };
82 
85 double find_alpha(double RHS, double alpha_min, double alhpa_max, double ERR = 1e-12, int max_it = 100, int it = 0);
86 
87 #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
Matrix3D< double > Jacobian
Definition: Grid.h:79
Computational grid composed of 3 different GridElement.
Definition: Grid.h:53