HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BCDirichlet.c
Go to the documentation of this file.
1 
6 #include <stdlib.h>
7 #include <basic.h>
8 #include <arrayfunctions.h>
9 #include <boundaryconditions.h>
10 
14  void *b,
15  void *m,
16  int ndims,
17  int nvars,
18  int *size,
19  int ghosts,
20  double *phi,
21  double waqt
22  )
23 {
24  DomainBoundary *boundary = (DomainBoundary*) b;
25 
26  if (boundary->on_this_proc) {
27  int bounds[ndims], indexb[ndims];
28  _ArraySubtract1D_(bounds,boundary->ie,boundary->is,ndims);
29  _ArraySetValue_(indexb,ndims,0);
30  int done = 0;
31  while (!done) {
32  int p; _ArrayIndex1DWO_(ndims,size ,indexb,boundary->is,ghosts,p);
33  _ArrayCopy1D_((boundary->DirichletValue),(phi+nvars*p),nvars);
34  _ArrayIncrementIndex_(ndims,bounds,indexb,done);
35  }
36  }
37  return(0);
38 }
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
int BCDirichletU(void *, void *, int, int, int *, int, double *, double)
Definition: BCDirichlet.c:13
Containts the structures and definitions for boundary condition implementation.
#define _ArraySubtract1D_(x, a, b, size)
Structure containing the variables and function pointers defining a boundary.
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
#define _ArrayCopy1D_(x, y, size)
Some basic definitions and macros.
Contains macros and function definitions for common array operations.