MPI_jacsolve
 All Files Functions
getmatrix.h
Go to the documentation of this file.
1 #ifndef GETMATRIX_FILE
2 #define GETMATRIX_FILE
3 #include <cassert>
4 
16 int fetch(const int row, const int col, const int id[], const int ik[]);
17 
18 inline int fetch(const int row, const int col, const int id[], const int ik[])
19 {
20  const int id2 = id[row + 1];
21  int ip = id[row];
22 
23  while (ip<id2 && ik[ip] != col)
24  {
25  ++ip;
26  }
27 
28  if (ip>=id2) {
29  cout << "No column " << col << " in row " << row << endl;
30  ip = -1;
31  assert(ip>=id2);
32  }
33 
34  return ip;
35 }
36 
48 void Defect(double w[], const double f[], const double u[],
49  const int nnode, const int id[], const int ik[], const double sk[]);
50 
51 
62 void CrsMult(double w[], const double u[], const int nnode, const int id[], const int ik[], const double sk[]);
63 
64 
65 
75 void GetDiag(const int nnode, const int id[], const int ik[], const double sk[], double d[]);
76 
77 
92 void Get_Matrix_Pattern(const int nelem, const int ndof_e, int const *const ia,
93  int &nnz, int* &id, int* &ik, double* &sk);
94 
95 
96 
105 void CalcElem(const int ial[3], const double xc[], double ske[3][3], double fe[3]);
106 
119 void AddElem(const int ial[3], const double ske[3][3], const double fe[3],
120  const int id[], const int ik[], double sk[], double f[]);
121 
122 
123 
131 void DebugMatrix(const int nnode, const int id[], const int ik[], const double sk[]);
132 
133 
152 void GetMatrix (const int nelem, const int ndof_e, const int ia[], const int nnode, const double xc[],
153  const int nnz, const int id[], const int ik[], double sk[], double f[]);
154 
155 
156 
169 void ApplyDirichletBC(const int nx, const int ny, const int neigh[],
170  const double u[], const int id[], const int ik[] , double sk[], double f[]);
171 
172 
173 
174 
175 
176 #endif
void DebugMatrix(const int nnode, const int id[], const int ik[], const double sk[])
Definition: getmatrix.cpp:177
void Get_Matrix_Pattern(const int nelem, const int ndof_e, int const *const ia, int &nnz, int *&id, int *&ik, double *&sk)
Definition: getmatrix.cpp:59
void CrsMult(double w[], const double u[], const int nnode, const int id[], const int ik[], const double sk[])
Definition: getmatrix.cpp:30
void GetMatrix(const int nelem, const int ndof_e, const int ia[], const int nnode, const double xc[], const int nnz, const int id[], const int ik[], double sk[], double f[])
Definition: getmatrix.cpp:205
int fetch(const int row, const int col, const int id[], const int ik[])
Definition: getmatrix.h:18
void ApplyDirichletBC(const int nx, const int ny, const int neigh[], const double u[], const int id[], const int ik[], double sk[], double f[])
Definition: getmatrix.cpp:238
void AddElem(const int ial[3], const double ske[3][3], const double fe[3], const int id[], const int ik[], double sk[], double f[])
Definition: getmatrix.cpp:144
void GetDiag(const int nnode, const int id[], const int ik[], const double sk[], double d[])
Definition: getmatrix.cpp:47
void CalcElem(const int ial[3], const double xc[], double ske[3][3], double fe[3])
Definition: getmatrix.cpp:116
void Defect(double w[], const double f[], const double u[], const int nnode, const int id[], const int ik[], const double sk[])
Definition: getmatrix.cpp:15