HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Compute the global DOF index for all the grid points. More...
#include <stdlib.h>
#include <vector>
#include <basic.h>
#include <arrayfunctions.h>
#include <mpivars_cpp.h>
#include <simulation_object.h>
#include <petscinterface.h>
Go to the source code of this file.
Functions | |
static int | ApplyPeriodicity (int dir, int ndims, int *size, int ghosts, double *phi) |
int | PetscGlobalDOF (void *c) |
Compute the global DOF index for all the grid points.
Definition in file PetscGlobalDOF.cpp.
|
static |
dir | Spatial dimension along which to apply periodicity |
ndims | Number of spatial dimensions |
size | Integer array with the number of grid points in each spatial dimension |
ghosts | Number of ghost points |
phi | The array on which to apply the boundary condition |
Definition at line 16 of file PetscGlobalDOF.cpp.
int PetscGlobalDOF | ( | void * | c | ) |
Compute the global DOF index for all the grid points: The "global DOF index" is the component number (or block component number for HyPar::nvars > 1) of a grid point in the global solution vector. It is also the row number (or block row number) of the grid point in the global matrix representing, for example, the Jacobian of the right-hand-side.
PETScContext::globalDOF is an integer array with the same layout as the solution array HyPar::u (but with one component) containing the global DOF index for the corresponding grid points. It has the same number of ghost points as HyPar::u.
c | Object of type PETScContext |
Definition at line 69 of file PetscGlobalDOF.cpp.