HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InitializePhysicsData.c
Go to the documentation of this file.
1 
6 #include <stdio.h>
7 #include <simulation_object.h>
8 
12 int InitializePhysicsData(void *s,
13  int idx,
14  int nsims,
15  int *dim_data
16  )
17 {
19  HyPar *solver = &(sim->solver);
20  MPIVariables *mpi = &(sim->mpi);
21 
22  if (solver->PhysicsInput) {
23  int ierr = solver->PhysicsInput(solver, mpi, idx, nsims, dim_data);
24  if (ierr) {
25  fprintf(stderr, "Error in InitializePhysicsData():\n");
26  fprintf(stderr, " solver->PhysicsInput() returned error %d on rank %d\n",
27  ierr, mpi->rank);
28  return ierr;
29  }
30  }
31 
32  return 0;
33 }
34 
int(* PhysicsInput)(void *, void *, int, int, int *)
Definition: hypar.h:351
int InitializePhysicsData(void *, int, int, int *)
Simulation object.
Structure defining a simulation.
Structure of MPI-related variables.
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23