class.hpp
Go to the documentation of this file.
1 #ifndef CLASS_H
2 #define CLASS_H
3 #include <petscksp.h>
4 
5 namespace SPE
6 {
10  struct Mat_4terms{
11  Mat
13  v_term,
14  w_term,
15  P_term;
16  };
17 
21  class SPE {
22  public:
23  SPE();
24  void init();
25  void print();
26  ~SPE();
27  PetscInt destroy();
28 
29  // memory storage
30  Mat Dy,
31  DyP,
32  Dy_dim,
33  Dyy,
34  Dyy_dim,
35  DyyP,
36  Dz,
37  Dz_dim,
38  Dzz,
39  Dzz_dim,
40  Dt,
41  Dt_dim,
42  D,
43  Dp1,
44  U,
45  U_dim,
46  U_i,
47  Ux,
48  Ux_dim,
49  Uy,
50  Uy_dim,
51  V,
52  V_dim,
53  V_i,
54  Vx,
55  Vx_dim,
56  Vy,
57  Vy_dim,
58  VDy,
59  VDy_dim,
60  UDy,
61  UDy_dim,
62  P,
63  P_i,
64  //UDz, ///< matmatmult of \f$U \mathcal{D}_z\f$
65  A,
66  A_OSS,
67  Ap1,
68  Asolve,
69  B,
70  B_OSS,
71  Bsolve,
72  tempMatny,
73  P_SPE_from_OSS,
74  P_SPE_from_4nynz,
75  P_nynznt_to_dim_vel_only,
76  P_u_from_q,
77  P_U_from_Q,
78  P_v_from_q,
79  P_V_from_Q,
80  P_P_from_Q,
81  P_del_freestream_cont_base_flow,
82  P_w_from_q,
83  P_p_from_q,
84  P_avg_z_dim,
85  P_avg_z_base,
86  af_dim,
87  bf_dim,
88  df_dim,
89  ef_dim,
90  bfDy_dim,
91  efDz_dim,
92  IP,
93  I_4nznt,
94  I_dim,
95  MatTrapzy,
96  MatTrapzz,
97  MatTrapzt,
98  MatTrapz,
99  I;
100  Mat_4terms
101  P_u_dim,
102  P_v_dim,
103  P_w_dim,
104  P_cont_dim;
105  Vec b,
106  yVec,
107  yPVec,
108  zVec,
109  tVec,
110  Trapzy,
111  Trapzz,
112  Q_i,
113  *Q_istep,
114  Q,
115  q,
116  q_x,
117  //q_y, ///< \f$ \frac{\partial q_{i+1}}{\partial y} \f$
118  q_z,
119  q_af,
120  q_ybf,
121  q_xdf,
122  q_zef,
123  Fn,
124  F_bar,
125  F_bar_base,
126  F_bar_base_i,
127  F_bar_base_interp,
128  qp1,
129  qp1_oldNonLinear,
130  qp1_OSS,
131  u,
132  v,
133  w,
134  uhatconj,
135  vhatconj,
136  whatconj,
137  af,
138  bf,
139  df,
140  ef,
141  tempVecnynz,
142  onesVecny,
143  tempVecq,
144  tempVecny;
145  PetscReal initial_amplitude,
146  nonlinear_tol,
147  base_flow_tol,
148  nonlinear_error;
149  PetscScalar Re,
150  Re0,
151  U_inf,
152  V_inf,
153  P_inf,
154  rho,
155  Ialpha,
156  Ialpha_old,
157  alpha,
158  alpha_old,
159  delta_alpha,
160  closure_value,
161  target_alpha,
162  sum_divergence,
163  m,
164  omega,
165  beta,
166  T,
167  F,
168  F_initial,
169  hx,
170  deltay,
171  nu,
172  x,
173  num_boundary_layers_high,
174  closure_tol,
175  Deltay,
176  Deltat,
177  Deltaz;
178  PetscScalar *y,
179  *yP,
180  *xi,
181  *z,
182  *t,
183  *ones,
184  *eta,
185  *deta;
186  PetscInt ny,
187  nz,
188  nt,
189  dim,
190  dimOSS,
191  dim_nynznt,
192  order,
193  xsteps,
194  type_marching,
195  closure_iter,
196  nonlinear_iter,
197  baseflow_steps,
198  OSS_nev,
199  istep,
200  multiply_nypts_for_bblf,
201  type_base_flow;
202  // flags
203  PetscBool reduce_wall_order=PETSC_TRUE,
204  flag_read_q_filename=PETSC_FALSE,
205  flag_read_matlab_filename=PETSC_FALSE,
206  flag_set_D=PETSC_FALSE,
207  flag_uniform=PETSC_TRUE,
208  flag_OSS_gov_Schmid=PETSC_FALSE,
209  flag_update_alpha=PETSC_TRUE,
210  flag_noalpha=PETSC_FALSE,
211  flag_one_grid_pt_less_z=PETSC_TRUE,
212  flag_normalize=PETSC_TRUE,
213  flag_set_I=PETSC_FALSE,
214  flag_base_flow=PETSC_FALSE,
215  flag_blasius_first_step=PETSC_FALSE,
216  flag_init=PETSC_FALSE,
217  flag_debug_output=PETSC_FALSE,
218  flag_trapzy=PETSC_FALSE,
219  flag_trapzz=PETSC_FALSE,
220  flag_MatTrapz=PETSC_FALSE,
221  flag_marching=PETSC_TRUE,
222  flag_p_term=PETSC_FALSE,
223  flag_LST_marching=PETSC_FALSE,
224  flag_F_initial=PETSC_FALSE,
225  flag_Created_grid=PETSC_FALSE,
226  flag_parallel_blasius=PETSC_FALSE,
227  flag_parallel_baseflow=PETSC_FALSE,
228  flag_explicit_x=PETSC_FALSE,
229  flag_nonlinear=PETSC_FALSE,
230  flag_staggered_base_flow=PETSC_FALSE,
231  flag_2D=PETSC_FALSE,
232  flag_all_real=PETSC_FALSE,
233  flag_LST=PETSC_FALSE;
234 
235  PetscErrorCode ierr;
236 
237  std::string read_q_filename,
238  read_matlab_filename,
239  output_folder;
240 
241  };
242 
243 }
244 #endif
PetscScalar x
-location
Definition: class.hpp:149
Vec zVec
z values in Petsc parallel vector
Definition: class.hpp:105
Mat v_term
permutation matrix to postmultiply to dim matrix to shift diagonal to v_terms
Definition: class.hpp:12
std::string read_q_filename
base filename if reading output from the OSS python scripts
Definition: class.hpp:237
Namespace containing all functions and data classes for this solver.
Definition: Ax_b.hpp:5
Mat P_term
permutation matrix to postmultiply to dim matrix to shift diagonal to P_terms
Definition: class.hpp:12
Mat Vy_dim
base flow of size dim
Definition: class.hpp:30
PetscErrorCode ierr
flag to catch error from Petsc functions
Definition: class.hpp:235
structure for 4 mats to have u_term, v_term, w_term, P_term Mat
Definition: class.hpp:10
PetscInt xsteps
number of steps to take (default 15)
Definition: class.hpp:186
Mat u_term
permutation matrix to postmultiply to dim matrix to shift diagonal to u_terms
Definition: class.hpp:12
PetscReal nonlinear_tol
nonlinear tolerance (exit nonlinear iterations once nonlinear error is below this tolerance) (default...
Definition: class.hpp:145
Mat w_term
permutation matrix to postmultiply to dim matrix to shift diagonal to w_terms
Definition: class.hpp:12
Mat_4terms P_w_dim
permutation matrix to premultiply to dim matrix to extract only the w equation rows ...
Definition: class.hpp:101
PetscScalar * z
z vector (each processor has whole vector)
Definition: class.hpp:178