ParMooN
 All Classes Functions Variables Friends Pages
Bulk_2d3d.h
1 // =======================================================================
2 // Buld_2d3d.h
3 //
4 // Purpose: routines for bulk precipitation in 2d/3d
5 //
6 // Author: Volker John
7 //
8 // =======================================================================
9 
10 #ifndef __BULK_2D3D__
11 #define __BULK_2D3D__
12 
13 #ifdef __2D__
14 void Bulk_FWE_FDM_Upwind_3D(TCollection *coll,
15 TFEFunction2D *velocity1, TFEFunction2D *velocity2,
16 TFEFunction2D *concent_C,
17 double *f_old, double *rhs_psd,
18 int N_x, int N_y, int N_z,
19 double *x_coord, double *y_coord, double *z_coord,
20 double x_min, double x_max, double y_min, double y_max,
21 double z_min, double z_max,
22 double *velo1, double *velo2, double *concent_C_array,
23  int *correspond_2dgrid
24  );
25 
26 void Bulk_RKV_FDM_3D(TCollection *coll,
27  TFEFunction2D *velocity1, TFEFunction2D *velocity2,
28  TFEFunction2D *concent_C,
29  double *f_old, double **stages,
30  int N_x, int N_y, int N_z,
31  double *x_coord, double *y_coord, double *z_coord,
32  double *velo1, double *velo2, double *concent_C_array,
33  int *correspond_2dgrid);
34 
35 
36 void Bulk_BWE_FDM_Upwind_3D(TCollection *coll,
37  TFEFunction2D *velocity1, TFEFunction2D *velocity2,
38  TFEFunction2D *concent_C,
39  double *sol,
40  int *correspond_2dgrid,
41  int N_x, int N_y, int N_z,
42  double *x_coord, double *y_coord, double *z_coord,
43  TSquareMatrix2D *mat);
44 
45 void Evalute_f_at_outflow(int N_x, int N_y, int N_z, double *x_coord, double *z_layers_coord,
46  double *f, double *average_median, int *average_step);
47 
48 void Integral_For_Particle_Increase_Term(TFESpace2D *fespace, TFEFunction2D *fefct,
49  int N_x, int N_y, int N_z,
50  double *x_coord, double *y_coord, double *z_layers_coord,
51  double *concent_C_array, double *f);
52 
53 double Bulk_mesh_size_in_convection_direction(double hK, double b1, double b2,
54  double b3, double *x, double *y,
55  double *z);
56 
57 // void Build_3D_FEM_Matrix_Q1(double h, TFEFunction2D *velocity1, TFEFunction2D *velocity2,
58 // TFEFunction2D *concent_C, double *f_old,
59 // double *velo1, double *velo2, TCollection *coll);
60 
61 void grid_generator_3d(double x_min, double x_max, int N_x,
62  double y_min, double y_max, int N_y,
63  double z_min, double z_max, int N_z,
64  double *x_coord, double *y_coord, double *z_coord,
65  double *z_layers_coord);
66 
67 void generate_correspond_2d_grid(int N_x, int N_y, double *x_coord, double *y_coord,
68  TCollection *coll, int *correspond_2dgrid);
69 
70 void filling_row_and_col_ptr(int *N_Entries, int Nodes, int N_x, int N_y, double x_max, double x_min,
71  double y_max, double y_min, double z_max, double z_min,
72  double *x_coord, double *y_coord, double *z_coord,
73  int *row_ptr, int *col_ptr);
74 
75 void Build_3D_FEM_Matrix_Q1(TCollection *coll,
76  TFEFunction2D *velocity1, TFEFunction2D *velocity2,
77  TFEFunction2D *concent_C,
78  double *sol, double *oldsol,
79  double *lump_mass_PSD, double *matrix_D_Entries_PSD,
80  int *correspond_2dgrid,
81  int N_x, int N_y, int N_z,
82  double *x_coord, double *y_coord, double *z_coord,
83  TSquareMatrix2D *mat, TSquareMatrix2D *matM);
84 
85 void Compute_Neum_To_Diri_FEM_FCT(int N_x, int N_y, int N_z,
86  double *x_coord, double *y_coord,
87  double *z_coord,
88  int &N_neum_to_diri,
89  int* &neum_to_diri,
90  double* &neum_to_diri_x,
91  double* &neum_to_diri_y,
92  double* &neum_to_diri_z);
93 
94 void Build_3D_FEM_FCT_MassMatrix_Q1(TCollection *coll,
95  int N_x, int N_y, int N_z,
96  double *x_coord, double *y_coord, double *z_coord,
97  int* &index_test_ansatz,
98 // int* &index_test_ansatz_diag,
99  TSquareMatrix2D *matM,
100  double *lump_mass_PSD);
101 
102 void Build_3D_FEM_FCT_Matrix_Q1(TCollection *coll,
103  TFEFunction2D *velocity1, TFEFunction2D *velocity2,
104  TFEFunction2D *concent_C,
105  double *sol, double *oldsol,
106  double *lump_mass_PSD, double *matrix_D_Entries_PSD,
107  int *correspond_2dgrid,
108  int N_x, int N_y, int N_z,
109  double *x_coord, double *y_coord, double *z_coord,
110  TSquareMatrix2D *mat, TSquareMatrix2D *matM_cons,
111  TSquareMatrix2D *matM,
112  int *index_test_ansatz,
113 // int *index_test_ansatz_diag,
114  int N_neum_to_diri,
115  int *neum_to_diri,
116  double *neum_to_diri_x,
117  double *neum_to_diri_y,
118  double *neum_to_diri_z);
119 
120 void Build_3D_FEM_FCT_Matrices_Q1_GroupFEM_Bulk(TCollection *coll, int N_x,
121  int N_y, int N_z,
122  double *x_coord,
123  double *y_coord,
124  double *z_coord,
125  TSquareMatrix2D *matM,
126  TSquareMatrix2D *matU1,
127  TSquareMatrix2D *matU2,
128  TSquareMatrix2D *matG,
129  double *lump_mass_PSD);
130 
131 void FEM_FCT_Matrix_Q1_GroupFEM_3D_Bulk(TCollection *coll,
132  TFEFunction2D *velocity1,
133  TFEFunction2D *velocity2,
134  TFEFunction2D *concent_C,
135  double *sol, double *oldsol,
136  double *lump_mass_PSD,
137  double *matrix_D_Entries_PSD,
138  int *correspond_2dgrid,
139  int N_x, int N_y, int N_z,
140  double *x_coord, double *y_coord,
141  double *z_coord,
142  TSquareMatrix2D *mat,
143  TSquareMatrix2D *matM_cons,
144  TSquareMatrix2D *matM,
145  TSquareMatrix2D *matU1,
146  TSquareMatrix2D *matU2,
147  TSquareMatrix2D *matG,
148  double *psd_coeff, int N_neum_to_diri,
149  int *neum_to_diri,
150  double *neum_to_diri_x,
151  double *neum_to_diri_y,
152  double *neum_to_diri_z);
153 
154 
155 void write_vtk_psd(int N_x, int N_y, int N_z,
156  double *x_coord, double *y_coord, double *z_coord,
157  double *f_old, const char *name);
158 
159 
160 void write_psd(int N_x, int N_y, int N_z,
161  double *x_coord, double *y_coord, double *z_layers_coord,
162  double *f_old, const char *name);
163 
164 void PrepareAgglomerationBULK(TCollection *Coll, TFEFunction2D *velocity1,
165  TFEFunction2D *velocity2, int N_x, int N_y, int N_a,
166  double *x_coord, double *y_coord,
167  double *a_layers_coord, double *f,
168  double *rhs_new, int *correspond_2dgrid);
169 
170 #endif
171 
172 #endif // __2D__
Definition: SquareMatrix2D.h:20
Definition: FESpace2D.h:28
store cells in an array, used by cell iterators
Definition: Collection.h:18
Definition: FEFunction2D.h:24