|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Periodic boundary conditions. More...
#include <stdlib.h>#include <basic.h>#include <arrayfunctions.h>#include <mpivars.h>#include <boundaryconditions.h>Go to the source code of this file.
Functions | |
| int | BCPeriodicU (void *b, void *m, int ndims, int nvars, int *size, int ghosts, double *phi, double waqt) |
Periodic boundary conditions.
Definition in file BCPeriodic.c.
| int BCPeriodicU | ( | void * | b, |
| void * | m, | ||
| int | ndims, | ||
| int | nvars, | ||
| int * | size, | ||
| int | ghosts, | ||
| double * | phi, | ||
| double | waqt | ||
| ) |
Applies periodic boundary conditions: Implemented by copying the solution from the other end of the domain into the physical boundary ghost points.
Note**: This function only acts if the the number of processors is 1 along the spatial dimension this boundary corresponds to. If there are more than 1 processors along this dimension, periodicity is handled by MPIExchangeBoundariesnD() to minimize communication.
| b | Boundary object of type DomainBoundary |
| m | MPI object of type MPIVariables |
| ndims | Number of spatial dimensions |
| nvars | Number of variables/DoFs per grid point |
| size | Integer array with the number of grid points in each spatial dimension |
| ghosts | Number of ghost points |
| phi | The solution array on which to apply the boundary condition |
| waqt | Current solution time |
Definition at line 19 of file BCPeriodic.c.