HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains C++ function declarations for time integration. More...
#include <timeintegration_struct.h>
Go to the source code of this file.
Functions | |
int | TimeInitialize (void *, int, int, int, void *) |
int | TimeCleanup (void *) |
int | TimePreStep (void *) |
int | TimeStep (void *) |
int | TimePostStep (void *) |
int | TimePrintStep (void *) |
int | TimeError (void *, void *, double *) |
int | TimeGetAuxSolutions (int *, double **, void *, int, int) |
Contains C++ function declarations for time integration.
Definition in file timeintegration_cpp.h.
int TimeInitialize | ( | void * | s, |
int | nsims, | ||
int | rank, | ||
int | nproc, | ||
void * | ts | ||
) |
Initialize the time integration
Initialize time integration: This function initializes all that is required for time integration.
s | Array of simulation objects of type SimulationObject |
nsims | number of simulation objects |
rank | MPI rank of this process |
nproc | number of MPI processes |
ts | Time integration object of type TimeIntegration |
Definition at line 28 of file TimeInitialize.c.
int TimeCleanup | ( | void * | ts | ) |
Clean up variables related to time integration
Clean up all allocations related to time integration
ts | Object of type TimeIntegration |
Definition at line 18 of file TimeCleanup.c.
int TimePreStep | ( | void * | ts | ) |
Function called at the beginning of a time step
Pre-time-step function: This function is called before each time step. Some notable things this does are:
ts | Object of type TimeIntegration |
Definition at line 22 of file TimePreStep.c.
int TimeStep | ( | void * | ts | ) |
Take one step in time
Advance one time step.
ts | Object of type TimeIntegration |
Definition at line 13 of file TimeStep.c.
int TimePostStep | ( | void * | ts | ) |
Function called at the end of a time step
Post-time-step function: this function is called at the end of each time step.
ts | Object of type TimeIntegration |
Definition at line 28 of file TimePostStep.c.
int TimePrintStep | ( | void * | ts | ) |
Print time integration related information
Print information to screen (also calls any physics-specific printing function, if defined).
ts | Object of type TimeIntegration |
Definition at line 16 of file TimePrintStep.c.
int TimeError | ( | void * | s, |
void * | m, | ||
double * | uex | ||
) |
Compute/estimate error in solution
Computes the time integration error in the solution: If the time integration method chosen has a mechanism to compute the error in the numerical integration, it is computed in this function. In addition, if an exact solution is available (see function argument uex, the error of the computed solution (stored in HyPar::u) with respect to this exact solution is also computed. These errors are written to a text file whose name depends on the time integration method being used.
Time integration method with error estimation currently implemented:
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
uex | Exact solution (stored with the same array layout as HyPar::u (may be NULL) |
Definition at line 27 of file TimeError.c.
int TimeGetAuxSolutions | ( | int * | N, |
double ** | uaux, | ||
void * | s, | ||
int | nu, | ||
int | ns | ||
) |
Function to get auxiliary solutions if available (for example, in GLM-GEE methods)
Return auxiliary solution: Some time integrators may have the concept of auxiliary solutions that they evolve along with the main solution HyPar::u (these may be used for error estimation, for example). This function returns a pointer to such an auxiliary solution. Note that the auxiliary solution has the same dimensions and array layout as the main solution.
Note that auxiliary solutions are numbered in the C convention: 0,1,...,N-1.
Time integration methods which use auxiliary solutions currently implemented:
N | Number of auxiliary solutions |
uaux | Pointer to the array holding the auxiliary solution |
s | Solver object of type HyPar |
nu | Index of the auxiliary solution to return |
ns | Index of the simulation domain of which the auxiliary solution to return |
Definition at line 29 of file TimeGetAuxSolutions.c.