HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 }
int(* RHSFunction)(double *, double *, void *, void *, double)
int TimeForwardEuler(void *)
double * u
Definition: hypar.h:116
#define _ArrayScaleCopy1D_(x, a, y, size)
Structure of variables/parameters and function pointers for time integration.
double * StepBoundaryIntegral
Definition: hypar.h:384
Simulation object.
#define CHECKERR(ierr)
Definition: basic.h:18
double * StageBoundaryIntegral
Definition: hypar.h:382
Contains function declarations for time integration.
Structure defining a simulation.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
#define IERR
Definition: basic.h:16
Structure of MPI-related variables.
#define _ArrayAXPY_(x, a, y, size)
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _DECLARE_IERR_
Definition: basic.h:17