MPI_mgparc
Functions
gridtransfer.cpp File Reference
#include "header.h"

Functions

void Interpolate (const int nx, const int ny, double w[], const int nx_c, const int ny_c, const double w_c[], const int neigh[])
 
void Restrict (const int nx, const int ny, const double w[], const int nx_c, const int ny_c, double w_c[], const int neigh[])
 

Function Documentation

void Interpolate ( const int  nx,
const int  ny,
double  w[],
const int  nx_c,
const int  ny_c,
const double  w_c[],
const int  neigh[] 
)

Bilinear interpolation of a coarse grid vector w_c onto a fine grid vector w. The underlying discretization is a tensor product grid.

Parameters
[in]nxnumber of fine grid intervals in x-direction
[in]nynumber of fine grid intervals in y-direction
[out]winterpolated vector on fine grid
[in]nx_cnumber of fine grid intervals in x-direction
[in]ny_cnumber of fine grid intervals in y-direction
[in]w_coriginal vector on coarse grid
[in]neighvector of 4 elements containing the ranks of neighbouring processes, -1 indicates a Dirichlet boundary in this direction. Use other negative values for Neumann boundary
void Restrict ( const int  nx,
const int  ny,
const double  w[],
const int  nx_c,
const int  ny_c,
double  w_c[],
const int  neigh[] 
)

Bilinear restriction of a fine grid vector w onto a coarse grid vector w_c. The underlying discretization is a tensor product grid.

Parameters
[in]nxnumber of fine grid intervals in x-direction
[in]nynumber of fine grid intervals in y-direction
[in]winterpolated vector on fine grid
[in]nx_cnumber of fine grid intervals in x-direction
[in]ny_cnumber of fine grid intervals in y-direction
[out]w_coriginal vector on coarse grid
[in]neighvector of 4 elements containing the ranks of neighbouring processes, -1 indicates a Dirichlet boundary in this direction. Use other negative values for Neumann boundary
See also
Interpolate