HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
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 
Structure defining a simulation.
Simulation object.
int(* PhysicsInput)(void *, void *, int, int, int *)
Definition: hypar.h:351
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
Structure of MPI-related variables.
int InitializePhysicsData(void *s, int idx, int nsims, int *dim_data)