VERB_code_2.2  2
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
BoundaryConditions.h
Go to the documentation of this file.
1 /**
2  * \file "BoundaryConditions.h"
3  * Boundary condition class.
4  *
5  * Is a child of class Matrix2D and holds 3D array of boundary values for function or fuction derivative.
6  * The third dimentions is time.
7  *
8  * \author Developed under supervision of the PI Yuri Shprits
9  */
10 
11 #ifndef BoundaryConditions_H
12 #define BoundaryConditions_H
13 
14 #include <string>
15 #include "../Matrix/Matrix.h"
16 #include "../Parameters/Parameters.h"
17 #include "../VariousFunctions/variousFunctions.h"
18 
19 using namespace std;
20 
22 public:
24  //bool initialized;
25 
26  // Parameters
28 
29  /// Type: constant function/constant derivative
31  /// Initial type: how to set up boundary conditions. (Like read from a file, etc)
32  string type;
33 
34  // functions
35  void MakeBoundaryCondition(Parameters_structure::BoundaryCondition parameters, Matrix2D<double> psd2DSlice, Matrix2D<double> gridElement1, Matrix2D<double> gridElement2);
36  void LoadBoundaryCondition(Parameters_structure::BoundaryCondition parameters, Matrix2D<double> gridElement1, Matrix2D<double> gridElement2);
37 
38  // Update the boundary conditions for current time step
39  void Update(int iteration, Matrix2D<double> PSD_2D_Slice, double time=-1, double dt=-1);
40 
41  // Time-dependent boundary
42  // A file with two columns is used: first column - is a time, second - filename of a file with an array of values for the boundary at a boundary
43  // Time means we need to change the boundary value at that time
44  vector <double> BC_change_time; ///< If we change boundary conditions with time, this is the time when we need to change it.
45  vector <int> BC_change_iteration; ///< If we change boundary conditions with time, this is the iteration when we need to change it.
46  vector <string> BC_filename; ///< If we change boundary conditions with time, this is the filename for the new boundary condition values.
47 
48 };
49 
50 #endif