HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
TimeForwardEuler.c
Go to the documentation of this file.
1 
6 #include <basic.h>
7 #include <arrayfunctions.h>
8 #include <simulation_object.h>
9 #include <timeintegration.h>
10 
26  void *ts
27  )
28 {
29  TimeIntegration* TS = (TimeIntegration*) ts;
31  int ns, nsims = TS->nsims;
33 
34  for (ns = 0; ns < nsims; ns++) {
35 
36  HyPar* solver = &(sim[ns].solver);
37  MPIVariables* mpi = &(sim[ns].mpi);
38 
39  double* rhs = TS->rhs + TS->u_offsets[ns];
40 
41  /* Evaluate right-hand side */
42  IERR TS->RHSFunction( rhs,
43  solver->u,
44  solver,
45  mpi,
46  TS->waqt ); CHECKERR(ierr);
47 
48  /* update solution */
49  _ArrayAXPY_( rhs,
50  TS->dt,
51  solver->u,
52  TS->u_sizes[ns] );
53 
55  TS->dt,
56  solver->StepBoundaryIntegral,
57  TS->bf_sizes[ns] );
58  }
59 
60  return(0);
61 }
Structure of variables/parameters and function pointers for time integration.
#define IERR
Definition: basic.h:16
#define CHECKERR(ierr)
Definition: basic.h:18
Structure defining a simulation.
double * u
Definition: hypar.h:116
Some basic definitions and macros.
Contains function declarations for time integration.
Simulation object.
int(* RHSFunction)(double *, double *, void *, void *, double)
#define _ArrayScaleCopy1D_(x, a, y, size)
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _ArrayAXPY_(x, a, y, size)
double * StageBoundaryIntegral
Definition: hypar.h:382
int TimeForwardEuler(void *ts)
double * StepBoundaryIntegral
Definition: hypar.h:384
Structure of MPI-related variables.
#define _DECLARE_IERR_
Definition: basic.h:17
Contains macros and function definitions for common array operations.