HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
NavierStokes3DInitialize.c
Go to the documentation of this file.
1 
5 #include <float.h>
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <basic.h>
10 #include <arrayfunctions.h>
11 #include <boundaryconditions.h>
13 #include <mpivars.h>
14 #include <hypar.h>
15 
16 double NavierStokes3DComputeCFL (void*,void*,double,double);
17 
18 int NavierStokes3DFlux (double*,double*,int,void*,double);
19 int NavierStokes3DStiffFlux (double*,double*,int,void*,double);
20 int NavierStokes3DNonStiffFlux (double*,double*,int,void*,double);
21 int NavierStokes3DRoeAverage (double*,double*,double*,void*);
22 int NavierStokes3DParabolicFunction (double*,double*,void*,void*,double);
23 int NavierStokes3DSource (double*,double*,void*,void*,double);
24 
25 int NavierStokes3DJacobian (double*,double*,void*,int,int,int);
26 int NavierStokes3DStiffJacobian (double*,double*,void*,int,int,int);
27 
28 int NavierStokes3DLeftEigenvectors (double*,double*,void*,int);
29 int NavierStokes3DRightEigenvectors (double*,double*,void*,int);
30 
31 int NavierStokes3DUpwindRoe (double*,double*,double*,double*,double*,double*,int,void*,double);
32 int NavierStokes3DUpwindRF (double*,double*,double*,double*,double*,double*,int,void*,double);
33 int NavierStokes3DUpwindLLF (double*,double*,double*,double*,double*,double*,int,void*,double);
34 int NavierStokes3DUpwindRusanov (double*,double*,double*,double*,double*,double*,int,void*,double);
35 
36 int NavierStokes3DUpwinddFRoe (double*,double*,double*,double*,double*,double*,int,void*,double);
37 int NavierStokes3DUpwindFdFRoe (double*,double*,double*,double*,double*,double*,int,void*,double);
38 
39 int NavierStokes3DUpwindRusanovModified (double*,double*,double*,double*,double*,double*,int,void*,double);
40 int NavierStokes3DUpwinddFRusanovModified (double*,double*,double*,double*,double*,double*,int,void*,double);
41 int NavierStokes3DUpwindFdFRusanovModified(double*,double*,double*,double*,double*,double*,int,void*,double);
42 
43 int NavierStokes3DGravityField (void*,void*);
44 int NavierStokes3DModifiedSolution (double*,double*,int,void*,void*,double);
45 
46 int NavierStokes3DIBAdiabatic (void*,void*,double*,double);
47 int NavierStokes3DIBIsothermal (void*,void*,double*,double);
48 
49 int NavierStokes3DPreStep (double*,void*,void*,double);
50 int NavierStokes3DIBForces (void*,void*,double);
51 
52 #if defined(HAVE_CUDA)
53 int gpuNavierStokes3DInitialize (void*,void*);
54 int gpuNavierStokes3DFlux (double*,double*,int,void*,double);
55 int gpuNavierStokes3DParabolicFunction (double*,double*,void*,void*,double);
56 int gpuNavierStokes3DSource (double*,double*,void*,void*,double);
57 int gpuNavierStokes3DModifiedSolution (double*,double*,int,void*,void*,double);
58 int gpuNavierStokes3DUpwindRusanov (double*,double*,double*,double*,double*,double*,int,void*,double);
59 int gpuNavierStokes3DUpwindRoe (double*,double*,double*,double*,double*,double*,int,void*,double);
60 int gpuNavierStokes3DPreStep (double*,void*,void*,double);
61 #endif
62 
117  void *m
118  )
119 {
120  HyPar *solver = (HyPar*) s;
121  MPIVariables *mpi = (MPIVariables*) m;
122  NavierStokes3D *physics = (NavierStokes3D*) solver->physics;
123  int ferr = 0;
124 
125  static int count = 0;
126 
127  if (solver->nvars != _MODEL_NVARS_) {
128  fprintf(stderr,"Error in NavierStokes3DInitialize(): nvars has to be %d.\n",_MODEL_NVARS_);
129  return(1);
130  }
131  if (solver->ndims != _MODEL_NDIMS_) {
132  fprintf(stderr,"Error in NavierStokes3DInitialize(): ndims has to be %d.\n",_MODEL_NDIMS_);
133  return(1);
134  }
135 
136  /* default values */
137  physics->gamma = 1.4;
138  physics->Pr = 0.72;
139  physics->Re = -1;
140  physics->Minf = 1.0;
141  physics->C1 = 1.458e-6;
142  physics->C2 = 110.4;
143  physics->grav_x = 0.0;
144  physics->grav_y = 0.0;
145  physics->grav_z = 0.0;
146  physics->rho0 = 1.0;
147  physics->p0 = 1.0;
148  physics->HB = 1;
149  physics->R = 1.0;
150  physics->N_bv = 0.0;
151  physics->T_ib_wall = -DBL_MAX;
152  physics->t_ib_ramp = -1.0;
153  physics->t_ib_width= 0.05;
154  physics->ib_T_tol = 5;
155  strcpy(physics->upw_choice,"roe");
156  strcpy(physics->ib_write_surface_data,"yes");
157  strcpy(physics->ib_wall_type,"adiabatic");
158  strcpy(physics->ib_ramp_type,"linear");
159 
160  /* reading physical model specific inputs - all processes */
161  if (!mpi->rank) {
162  FILE *in;
163  if (!count) printf("Reading physical model inputs from file \"physics.inp\".\n");
164  in = fopen("physics.inp","r");
165  if (!in) printf("Warning: File \"physics.inp\" not found. Using default values.\n");
166  else {
167  char word[_MAX_STRING_SIZE_];
168  ferr = fscanf(in,"%s",word);
169  if (ferr != 1) {
170  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
171  return 1;
172  }
173  if (!strcmp(word, "begin")){
174  while (strcmp(word, "end")){
175  ferr = fscanf(in,"%s",word);
176  if (ferr != 1) {
177  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
178  return 1;
179  }
180  if (!strcmp(word, "gamma")) {
181  ferr = fscanf(in,"%lf",&physics->gamma);
182  if (ferr != 1) {
183  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
184  return 1;
185  }
186  } else if (!strcmp(word,"upwinding")) {
187  ferr = fscanf(in,"%s",physics->upw_choice);
188  if (ferr != 1) {
189  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
190  return 1;
191  }
192  } else if (!strcmp(word,"Pr")) {
193  ferr = fscanf(in,"%lf",&physics->Pr);
194  if (ferr != 1) {
195  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
196  return 1;
197  }
198  } else if (!strcmp(word,"Re")) {
199  ferr = fscanf(in,"%lf",&physics->Re);
200  if (ferr != 1) {
201  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
202  return 1;
203  }
204  } else if (!strcmp(word,"Minf")) {
205  ferr = fscanf(in,"%lf",&physics->Minf);
206  if (ferr != 1) {
207  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
208  return 1;
209  }
210  } else if (!strcmp(word,"gravity")) {
211  ferr = fscanf(in,"%lf",&physics->grav_x);
212  if (ferr != 1) {
213  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
214  return 1;
215  }
216  ferr = fscanf(in,"%lf",&physics->grav_y);
217  if (ferr != 1) {
218  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
219  return 1;
220  }
221  ferr = fscanf(in,"%lf",&physics->grav_z);
222  if (ferr != 1) {
223  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
224  return 1;
225  }
226  } else if (!strcmp(word,"rho_ref")) {
227  ferr = fscanf(in,"%lf",&physics->rho0);
228  if (ferr != 1) {
229  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
230  return 1;
231  }
232  } else if (!strcmp(word,"p_ref")) {
233  ferr = fscanf(in,"%lf",&physics->p0);
234  if (ferr != 1) {
235  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
236  return 1;
237  }
238  } else if (!strcmp(word,"HB")) {
239  ferr = fscanf(in,"%d",&physics->HB);
240  if (ferr != 1) {
241  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
242  return 1;
243  }
244  if (physics->HB==3) {
245  ferr = fscanf(in,"%lf",&physics->N_bv);
246  if (ferr != 1) {
247  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
248  return 1;
249  }
250  }
251  } else if (!strcmp(word,"R")) {
252  ferr = fscanf(in,"%lf",&physics->R);
253  if (ferr != 1) {
254  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
255  return 1;
256  }
257  } else if (!strcmp(word,"ib_surface_data")) {
258  ferr = fscanf(in,"%s",physics->ib_write_surface_data);
259  if (ferr != 1) {
260  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
261  return 1;
262  }
263  } else if (!strcmp(word,"ib_wall_type")) {
264  ferr = fscanf(in,"%s",physics->ib_wall_type);
265  if (ferr != 1) {
266  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
267  return 1;
268  }
269  if (!strcmp(physics->ib_wall_type,_IB_ISOTHERMAL_)) {
270  ferr = fscanf(in,"%lf",&physics->T_ib_wall);
271  if (ferr != 1) {
272  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
273  return 1;
274  }
275  }
276  if (!solver->flag_ib) {
277  printf("Warning: in NavierStokes3DInitialize().\n");
278  printf("Warning: no immersed body present; specification of ib_wall_type unnecessary.\n");
279  }
280  } else if (!strcmp(word,"ib_ramp_time")) {
281  ferr = fscanf(in,"%lf",&physics->t_ib_ramp);
282  if (ferr != 1) {
283  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
284  return 1;
285  }
286  if (!solver->flag_ib) {
287  printf("Warning: in NavierStokes3DInitialize().\n");
288  printf("Warning: no immersed body present; specification of ib_ramp_time unnecessary.\n");
289  }
290  } else if (!strcmp(word,"ib_ramp_width")) {
291  ferr = fscanf(in,"%lf",&physics->t_ib_width);
292  if (ferr != 1) {
293  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
294  return 1;
295  }
296  if (!solver->flag_ib) {
297  printf("Warning: in NavierStokes3DInitialize().\n");
298  printf("Warning: no immersed body present; specification of ib_ramp_width unnecessary.\n");
299  }
300  } else if (!strcmp(word,"ib_ramp_type")) {
301  ferr = fscanf(in,"%s",physics->ib_ramp_type);
302  if (ferr != 1) {
303  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
304  return 1;
305  }
306  if (!solver->flag_ib) {
307  printf("Warning: in NavierStokes3DInitialize().\n");
308  printf("Warning: no immersed body present; specification of ib_ramp_type unnecessary.\n");
309  }
310  } else if (!strcmp(word,"ib_T_tolerance")) {
311  ferr = fscanf(in,"%lf",&physics->ib_T_tol);
312  if (ferr != 1) {
313  fprintf(stderr, "Read error while reading physics.inp in NavierStokes3DInitialize().\n");
314  return 1;
315  }
316  if (!solver->flag_ib) {
317  printf("Warning: in NavierStokes3DInitialize().\n");
318  printf("Warning: no immersed body present; specification of ib_T_tolerance unnecessary.\n");
319  }
320  } else if (strcmp(word,"end")) {
321  char useless[_MAX_STRING_SIZE_];
322  ferr = fscanf(in,"%s",useless); if (ferr != 1) return(ferr);
323  printf("Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
324  printf("recognized or extraneous. Ignoring.\n");
325  }
326  }
327  } else {
328  fprintf(stderr,"Error: Illegal format in file \"physics.inp\".\n");
329  return(1);
330  }
331  }
332  fclose(in);
333  }
334 
339  IERR MPIBroadcast_double (&physics->gamma ,1 ,0,&mpi->world); CHECKERR(ierr);
340  IERR MPIBroadcast_double (&physics->Pr ,1 ,0,&mpi->world); CHECKERR(ierr);
341  IERR MPIBroadcast_double (&physics->Re ,1 ,0,&mpi->world); CHECKERR(ierr);
342  IERR MPIBroadcast_double (&physics->Minf ,1 ,0,&mpi->world); CHECKERR(ierr);
343  IERR MPIBroadcast_double (&physics->grav_x ,1 ,0,&mpi->world); CHECKERR(ierr);
344  IERR MPIBroadcast_double (&physics->grav_y ,1 ,0,&mpi->world); CHECKERR(ierr);
345  IERR MPIBroadcast_double (&physics->grav_z ,1 ,0,&mpi->world); CHECKERR(ierr);
346  IERR MPIBroadcast_double (&physics->rho0 ,1 ,0,&mpi->world); CHECKERR(ierr);
347  IERR MPIBroadcast_double (&physics->p0 ,1 ,0,&mpi->world); CHECKERR(ierr);
348  IERR MPIBroadcast_double (&physics->R ,1 ,0,&mpi->world); CHECKERR(ierr);
349  IERR MPIBroadcast_double (&physics->N_bv ,1 ,0,&mpi->world); CHECKERR(ierr);
350  IERR MPIBroadcast_double (&physics->T_ib_wall ,1 ,0,&mpi->world); CHECKERR(ierr);
351  IERR MPIBroadcast_double (&physics->t_ib_ramp ,1 ,0,&mpi->world); CHECKERR(ierr);
352  IERR MPIBroadcast_double (&physics->t_ib_width ,1 ,0,&mpi->world); CHECKERR(ierr);
353  IERR MPIBroadcast_double (&physics->ib_T_tol ,1 ,0,&mpi->world); CHECKERR(ierr);
354  IERR MPIBroadcast_integer (&physics->HB ,1 ,0,&mpi->world); CHECKERR(ierr);
355 
356  /* if file output is disabled in HyPar, respect that */
357  if (!strcmp(solver->op_file_format,"none")) {
358  if (!strcmp(physics->ib_write_surface_data,"yes")) {
359  if (!mpi->rank) {
360  printf("Warning from NavierStokes3DInitialize(): solver->op_file_format is set to \"none\", thus ");
361  printf("setting physics->ib_write_surface_data to \"no\" (no solution files will be written).\n");
362  }
363  }
364  strcpy(physics->ib_write_surface_data,"no");
365  }
366 
367  /* Scaling Re by M_inf */
368  physics->Re /= physics->Minf;
369 
370  /* check that a well-balanced upwinding scheme is being used for cases with gravity */
371  if ( ((physics->grav_x != 0.0) || (physics->grav_y != 0.0) || (physics->grav_z != 0.0) )
372  && (strcmp(physics->upw_choice,_RUSANOV_)) ) {
373  if (!mpi->rank) {
374  fprintf(stderr,"Error in NavierStokes3DInitialize: %s upwinding is needed for flows ",_RUSANOV_);
375  fprintf(stderr,"with gravitational forces.\n");
376  }
377  return(1);
378  }
379  /* check that solver has the correct choice of diffusion formulation, if viscous flow */
380  if (strcmp(solver->spatial_type_par,_NC_2STAGE_) && (physics->Re > 0)) {
381  if (!mpi->rank) {
382  fprintf(stderr,"Error in NavierStokes3DInitialize(): Parabolic term spatial discretization must be \"%s\"\n",_NC_2STAGE_);
383  }
384  return(1);
385  }
386 
387  /* initializing physical model-specific functions */
388 #if defined(HAVE_CUDA)
389  if (solver->use_gpu) {
394  } else {
395 #endif
396  solver->PreStep = NavierStokes3DPreStep;
398  solver->FFunction = NavierStokes3DFlux;
404 #if defined(HAVE_CUDA)
405  }
406 #endif
407 
408  if (solver->flag_ib) {
409  if (!strcmp(physics->ib_wall_type,_IB_ADIABATIC_)) {
411  } else if (!strcmp(physics->ib_wall_type,_IB_ISOTHERMAL_)) {
413  } else {
414  fprintf(stderr, "Error in NavierStokes3DInitialize()\n");
415  fprintf(stderr, " invalid value for IB wall type (%s).\n",
416  physics->ib_wall_type );
417  }
418  if (!strcmp(physics->ib_write_surface_data,"yes")) {
420  }
421  }
422 
423 #if defined(HAVE_CUDA)
424  if (solver->use_gpu) {
425 
426  if (!strcmp(solver->SplitHyperbolicFlux,"yes")) {
427  if (!mpi->rank) {
428  fprintf(stderr,"Error in NavierStokes3DInitialize(): Not available on GPU!");
429  }
430  return 1;
431  } else {
433  if (!strcmp(physics->upw_choice,_ROE_ )) {
435  } else if (!strcmp(physics->upw_choice,_RUSANOV_)) {
437  } else {
438  if (!mpi->rank) {
439  fprintf(stderr,"Error in NavierStokes3DInitialize(): %s is not a valid upwinding scheme on GPU. ",
440  physics->upw_choice);
441  fprintf(stderr,"Choices are %s and %s.\n",_ROE_,_RUSANOV_);
442  }
443  return(1);
444  }
445  }
446 
447  } else {
448 #endif
449 
450  if (!strcmp(solver->SplitHyperbolicFlux,"yes")) {
454  if (!strcmp(physics->upw_choice,_ROE_)) {
458  } else if (!strcmp(physics->upw_choice,_RUSANOV_)) {
462  } else {
463  if (!mpi->rank) {
464  fprintf(stderr,"Error in NavierStokes3DInitialize(): %s is not a valid upwinding scheme ",
465  physics->upw_choice);
466  fprintf(stderr,"for use with split hyperbolic flux form. Use %s or %s.\n",
467  _ROE_,_RUSANOV_);
468  }
469  return(1);
470  }
471  } else {
473  if (!strcmp(physics->upw_choice,_ROE_ )) solver->Upwind = NavierStokes3DUpwindRoe;
474  else if (!strcmp(physics->upw_choice,_RF_ )) solver->Upwind = NavierStokes3DUpwindRF;
475  else if (!strcmp(physics->upw_choice,_LLF_ )) solver->Upwind = NavierStokes3DUpwindLLF;
476  else if (!strcmp(physics->upw_choice,_RUSANOV_)) solver->Upwind = NavierStokes3DUpwindRusanov;
477  else {
478  if (!mpi->rank) {
479  fprintf(stderr,"Error in NavierStokes3DInitialize(): %s is not a valid upwinding scheme. ",
480  physics->upw_choice);
481  fprintf(stderr,"Choices are %s, %s, %s, and %s.\n",_ROE_,_RF_,_LLF_,_RUSANOV_);
482  }
483  return(1);
484  }
485  }
486 
487 #if defined(HAVE_CUDA)
488  }
489 #endif
490 
491  /* set the value of gamma in all the boundary objects */
492  int n;
493  DomainBoundary *boundary = (DomainBoundary*) solver->boundary;
494  for (n = 0; n < solver->nBoundaryZones; n++) boundary[n].gamma = physics->gamma;
495 
496  /* finally, hijack the main solver's dissipation function pointer
497  * to this model's own function, since it's difficult to express
498  * the dissipation terms in the general form */
499 #if defined(HAVE_CUDA)
500  if (solver->use_gpu) {
502  } else {
503 #endif
505 #if defined(HAVE_CUDA)
506  }
507 #endif
508 
509  /* allocate array to hold the gravity field */
510  int *dim = solver->dim_local;
511  int ghosts = solver->ghosts;
512  int d, size = 1; for (d=0; d<_MODEL_NDIMS_; d++) size *= (dim[d] + 2*ghosts);
513  physics->grav_field_f = (double*) calloc (size, sizeof(double));
514  physics->grav_field_g = (double*) calloc (size, sizeof(double));
515  /* allocate arrays to hold the fast Jacobian for split form of the hyperbolic flux */
516  physics->fast_jac = (double*) calloc (_MODEL_NDIMS_*size*_MODEL_NVARS_*_MODEL_NVARS_,sizeof(double));
517  physics->solution = (double*) calloc (size*_MODEL_NVARS_,sizeof(double));
518  /* initialize the gravity fields */
519  IERR NavierStokes3DGravityField(solver,mpi); CHECKERR(ierr);
520 
521 #if defined(HAVE_CUDA)
522  if (solver->use_gpu) gpuNavierStokes3DInitialize(s,m);
523 #endif
524 
525  count++;
526  return(0);
527 }
int NavierStokes3DGravityField(void *, void *)
int gpuNavierStokes3DUpwindRusanov(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* PhysicsOutput)(void *, void *, double)
Definition: hypar.h:347
int NavierStokes3DRightEigenvectors(double *, double *, void *, int)
int nvars
Definition: hypar.h:29
Containts the structures and definitions for boundary condition implementation.
#define IERR
Definition: basic.h:16
int gpuNavierStokes3DParabolicFunction(double *, double *, void *, void *, double)
MPI related function definitions.
#define CHECKERR(ierr)
Definition: basic.h:18
int(* ParabolicFunction)(double *, double *, void *, void *, double)
Definition: hypar.h:256
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
Definition: hypar.h:92
void * boundary
Definition: hypar.h:159
int gpuNavierStokes3DInitialize(void *, void *)
Structure containing variables and parameters specific to the 3D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 3D Navier-Stokes equations.
int NavierStokes3DUpwinddFRusanovModified(double *, double *, double *, double *, double *, double *, int, void *, double)
int MPIBroadcast_integer(int *, int, int, void *)
Definition: MPIBroadcast.c:23
int NavierStokes3DRoeAverage(double *, double *, double *, void *)
int gpuNavierStokes3DUpwindRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int NavierStokes3DUpwinddFRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* AveragingFunction)(double *, double *, double *, void *)
Definition: hypar.h:354
Some basic definitions and macros.
double * grav_field_g
int NavierStokes3DStiffFlux(double *, double *, int, void *, double)
int flag_ib
Definition: hypar.h:441
char ib_ramp_type[_MAX_STRING_SIZE_]
int(* FdFFunction)(double *, double *, int, void *, double)
Definition: hypar.h:286
int(* SFunction)(double *, double *, void *, void *, double)
Definition: hypar.h:317
int(* IBFunction)(void *, void *, double *, double)
Definition: hypar.h:446
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
Definition: hypar.h:295
Structure containing the variables and function pointers defining a boundary.
3D Navier Stokes equations (compressible flows)
int NavierStokes3DUpwindFdFRusanovModified(double *, double *, double *, double *, double *, double *, int, void *, double)
int ndims
Definition: hypar.h:26
int NavierStokes3DJacobian(double *, double *, void *, int, int, int)
int MPIBroadcast_character(char *, int, int, void *)
Definition: MPIBroadcast.c:37
int NavierStokes3DUpwindFdFRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int gpuNavierStokes3DPreStep(double *, void *, void *, double)
int NavierStokes3DIBForces(void *, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
Definition: hypar.h:276
int MPIBroadcast_double(double *, int, int, void *)
Definition: MPIBroadcast.c:9
double(* ComputeCFL)(void *, void *, double, double)
Definition: hypar.h:269
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
int NavierStokes3DLeftEigenvectors(double *, double *, void *, int)
#define _MAX_STRING_SIZE_
Definition: basic.h:14
double NavierStokes3DComputeCFL(void *, void *, double, double)
int gpuNavierStokes3DFlux(double *, double *, int, void *, double)
#define _ROE_
Definition: euler1d.h:62
int NavierStokes3DUpwindRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int NavierStokes3DNonStiffFlux(double *, double *, int, void *, double)
int NavierStokes3DStiffJacobian(double *, double *, void *, int, int, int)
int NavierStokes3DPreStep(double *, void *, void *, double)
#define _MODEL_NDIMS_
Definition: euler1d.h:56
int NavierStokes3DFlux(double *, double *, int, void *, double)
Contains structure definition for hypar.
#define _RUSANOV_
Definition: euler1d.h:70
int NavierStokes3DParabolicFunction(double *, double *, void *, void *, double)
int NavierStokes3DSource(double *, double *, void *, void *, double)
MPI_Comm world
char upw_choice[_MAX_STRING_SIZE_]
int NavierStokes3DInitialize(void *s, void *m)
int(* PreStep)(double *, void *, void *, double)
Definition: hypar.h:339
int NavierStokes3DUpwindRusanovModified(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* UpwindFdF)(double *, double *, double *, double *, double *, double *, int, void *, double)
Definition: hypar.h:307
char spatial_type_par[_MAX_STRING_SIZE_]
Definition: hypar.h:96
int NavierStokes3DIBIsothermal(void *, void *, double *, double)
int * dim_local
Definition: hypar.h:37
int(* dFFunction)(double *, double *, int, void *, double)
Definition: hypar.h:280
char ib_write_surface_data[_MAX_STRING_SIZE_]
int NavierStokes3DUpwindRF(double *, double *, double *, double *, double *, double *, int, void *, double)
void * physics
Definition: hypar.h:266
int(* JFunction)(double *, double *, void *, int, int, int)
Definition: hypar.h:326
int NavierStokes3DModifiedSolution(double *, double *, int, void *, void *, double)
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
Definition: hypar.h:300
int ghosts
Definition: hypar.h:52
Structure of MPI-related variables.
int use_gpu
Definition: hypar.h:449
#define _MODEL_NVARS_
Definition: euler1d.h:58
char ib_wall_type[_MAX_STRING_SIZE_]
int nBoundaryZones
Definition: hypar.h:157
int NavierStokes3DUpwindRusanov(double *, double *, double *, double *, double *, double *, int, void *, double)
#define _IB_ADIABATIC_
char op_file_format[_MAX_STRING_SIZE_]
Definition: hypar.h:186
Contains macros and function definitions for common array operations.
int NavierStokes3DIBAdiabatic(void *, void *, double *, double)
int(* GetRightEigenvectors)(double *, double *, void *, int)
Definition: hypar.h:359
int gpuNavierStokes3DModifiedSolution(double *, double *, int, void *, void *, double)
#define _RF_
Definition: euler1d.h:64
int(* GetLeftEigenvectors)(double *, double *, void *, int)
Definition: hypar.h:357
int gpuNavierStokes3DSource(double *, double *, void *, void *, double)
int NavierStokes3DUpwindLLF(double *, double *, double *, double *, double *, double *, int, void *, double)
#define _IB_ISOTHERMAL_
double * grav_field_f
int(* UFunction)(double *, double *, int, void *, void *, double)
Definition: hypar.h:321
#define _NC_2STAGE_
Definition: hypar.h:477
#define _LLF_
Definition: euler1d.h:66