MPI_mgparc
Functions
applybc1.cpp File Reference

Functions

int AdrCRS (const int row, const int col, const int id[], const int ik[], const int nnode)
 
void ApplyDirichletBC1 (const int nx, const int ny, const int neigh[], const double u[], double sk[], const int id[], const int ik[], double f[])
 

Function Documentation

int AdrCRS ( const int  row,
const int  col,
const int  id[],
const int  ik[],
const int  nnode 
)

Determines for a symmetrix CSR matrix the index of element (row, col).

Parameters
[in]rowrow index
[in]colcolum index
[in]idindex vector containing the last entry in a CSR row
[in]ikcolumn index vector of CSR matrix
Returns
index of element (row, col). -1 indicates that this entry is not available.
void ApplyDirichletBC1 ( const int  nx,
const int  ny,
const int  neigh[],
const double  u[],
double  sk[],
const int  id[],
const int  ik[],
double  f[] 
)

Applies Dirichlet boundary conditions to symmetric CSR matrix (sk,id, ik) and right hand side f of a system of equations resulting from a FEM/FDM discretization. This is a special version function ApplyDirichletBC for parallel matrix generation taking into account distributed matrix and distributed rhs.

See also
ApplyDirichletBC
Parameters
[in]nxnumber of discretization intervals in x-direction
[in]nynumber of discretization intervals in y-direction
[in]neighvector of 4 elements containing the ranks of neighbouring processes, -1 indicates a boundary in this direction
[in]ulocal vector with appropriately initialized b.c.
[in,out]skvector non-zero entries of CSR matrix
[in]idindex vector containing the last entry in a CSR row
[in]ikcolumn index vector of CSR matrix
[in,out]fright hand side