MPI_mgparc
|
Functions | |
void | GetCoordsInRectangle (const int nx, const int ny, const double &xl, const double &xr, const double &yb, const double &yt, double xc[]) |
void | GetConnectivityInRectangle (const int nx, const int ny, int ia[]) |
void | GetMatrixpointersInRectangle (const int nx, const int ny, int id[], int ik[]) |
void | CalcElem (const int ial[3], const double xc[], double ske[3][3], double fe[3]) |
void | AddElem (const int ial[3], const double ske[3][3], const double fe[3], double sk[], const int id[], const int ik[], double f[]) |
void | DebugMatrix (const int nnode, const double sk[], const int id[], const int ik[]) |
void | GetMatrix (const int nx, const int ny, const double &xl, const double &xr, const double &yb, const double &yt, double sk[], int id[], int ik[], double f[]) |
void AddElem | ( | const int | ial[3], |
const double | ske[3][3], | ||
const double | fe[3], | ||
double | sk[], | ||
const int | id[], | ||
const int | ik[], | ||
double | f[] | ||
) |
Adds the element stiffness matrix ske
and the element load vector fe
of one triangular element with linear shape functions to the appropriate positions in the symmetric stiffness matrix, stored as CSR matrix K(sk
,id
, ik
)
[in] | ia | node indices of the three element vertices |
[in] | ske | element stiffness matrix |
[in] | fe | element load vector |
[out] | sk | vector non-zero entries of CSR matrix |
[in] | id | index vector containing the last entry in a CSR row |
[in] | ik | column index vector of CSR matrix |
[out] | f | distributed local vector storing the right hand side |
void CalcElem | ( | const int | ial[3], |
const double | xc[], | ||
double | ske[3][3], | ||
double | fe[3] | ||
) |
Calculates the element stiffness matrix ske
and the element load vector fe
of one triangular element with linear shape functions.
[in] | ia | node indices of the three element vertices |
[in] | xc | vector of node coordinates with x(2*k,2*k+1) as coodinates of node k |
[out] | ske | element stiffness matrix |
[out] | fe | element load vector |
void DebugMatrix | ( | const int | nnode, |
const double | sk[], | ||
const int | id[], | ||
const int | ik[] | ||
) |
Print entries of the CSR matrix K(sk
,id
, ik
).
[in] | nnode | number of rows |
[in] | sk | vector non-zero entries of CSR matrix |
[in] | id | index vector containing the last entry in a CSR row |
[in] | ik | column index vector of CSR matrix |
void GetConnectivityInRectangle | ( | const int | nx, |
const int | ny, | ||
int | ia[] | ||
) |
Determines the element connectivity of linear triangular elements of a FEM discretization of a rectangle using nx
x ny
equidistant intervals for discretization.
[in] | nx | number of discretization intervals in x-direction |
[in] | ny | number of discretization intervals in y-direction |
[out] | ia | element connectivity matrix with ia(3*s,3*s+1,3*s+2) as node numbers od element s |
void GetCoordsInRectangle | ( | const int | nx, |
const int | ny, | ||
const double & | xl, | ||
const double & | xr, | ||
const double & | yb, | ||
const double & | yt, | ||
double | xc[] | ||
) |
Determines the coordinates of the dicretization nodes of the domain [xl
, xr
] x [yb
, yt
] which is discretized into nx
x ny
intervals.
[in] | nx | number of discretization intervals in x-direction |
[in] | ny | number of discretization intervals in y-direction |
[in] | xl | x-coordinate of left boundary |
[in] | xr | x-coordinate of right boundary |
[in] | yb | y-coordinate of lower boundary |
[in] | yt | y-coordinate of upper boundary |
[out] | xc | coordinate vector of length 2n with x(2*k,2*k+1) as coodinates of node k |
void GetMatrix | ( | const int | nx, |
const int | ny, | ||
const double & | xl, | ||
const double & | xr, | ||
const double & | yb, | ||
const double & | yt, | ||
double | sk[], | ||
int | id[], | ||
int | ik[], | ||
double | f[] | ||
) |
Computes the stiffness matrix K(sk
,id
, ik
) and load vector f
for the Poisson problem without incorporating the boundary conditions in a domain [xl
, xr
] x [yb
, yt
] which is discretized into nx
x ny
intervals. The matrix pattern is generated and the matrix is stored as CSR matrix(sk
,id
, ik
).
[in] | nx | number of discretization intervals in x-direction |
[in] | ny | number of discretization intervals in y-direction |
[in] | xl | x-coordinate of left boundary |
[in] | xr | x-coordinate of right boundary |
[in] | yb | y-coordinate of lower boundary |
[in] | yt | y-coordinate of upper boundary |
[out] | sk | vector non-zero entries of CSR matrix |
[out] | id | index vector containing the last entry in a CSR row |
[out] | ik | column index vector of CSR matrix |
[out] | f | distributed local vector storing the right hand side |
void GetMatrixpointersInRectangle | ( | const int | nx, |
const int | ny, | ||
int | id[], | ||
int | ik[] | ||
) |
Determines the sparsity pattern (id
, ik
) of a symmetric sparse CSR matrix assuming linear triangular elements in a rectangle using nx
x ny
equidistant intervals for discretization.
[in] | nx | number of discretization intervals in x-direction |
[in] | ny | number of discretization intervals in y-direction |
[out] | id | index vector containing the last entry in a CSR row |
[out] | ik | column index vector of CSR matrix |