proteus  1.8.1
C/C++/Fortran libraries
sparsity.cpp
Go to the documentation of this file.
1 #include "sparsity.h"
2 
3 namespace proteus
4 {
5  void SparsityInfo::findNonzeros(int nElements_global,
6  int nDOF_test_element,
7  int nDOF_trial_element,
8  int* nFreeDOF_test,
9  int* freeGlobal_test,
10  int* nFreeDOF_trial,
11  int* freeGlobal_trial,
12  int offset_test,
13  int stride_test,
14  int offset_trial,
15  int stride_trial,
16  int hasNumericalFlux,
17  int hasDiffusionInMixedForm,
18  int needNumericalFluxJacobian,
19  int nElementBoundaries_element,
20  int* elementNeighborsArray,
21  int nInteriorElementBoundaries_global,
22  int* interiorElementBoundariesArray,
23  int* elementBoundaryElementsArray,
24  int* elementBoundaryLocalElementBoundariesArray,
25  int hasFluxBoundaryConditions,
26  int nExteriorElementBoundaries_global,
27  int* exteriorElementBoundariesArray,
28  int hasOutflowBoundary,
29  int needOutflowJacobian)
30  {
31  //elements
32  for(int eN=0;eN<nElements_global;eN++)
33  {
34  for(int ii=0;ii<nFreeDOF_test[eN];ii++)
35  {
36  int I = offset_test + stride_test*freeGlobal_test[eN*nDOF_test_element+ii];
37  for(int jj=0;jj<nFreeDOF_trial[eN];jj++)
38  {
39  int J = offset_trial + stride_trial*freeGlobal_trial[eN*nDOF_trial_element+jj];
40  columnIndecesMap[I].insert(J);
41  }
42  }
43  //get element neighbor DOF for mixed form diffusion
44  if (hasNumericalFlux &&
45  hasDiffusionInMixedForm &&
46  needNumericalFluxJacobian)
47  {
48  for(int ebN=0;ebN<nElementBoundaries_element;ebN++)
49  {
50  int eN_ebN = elementNeighborsArray[eN*nElementBoundaries_element + ebN];
51  if (eN_ebN >= 0)
52  {
53  for (int ii=0;ii<nFreeDOF_test[eN];ii++)
54  {
55  int I = offset_test + stride_test*freeGlobal_test[eN*nDOF_test_element+ii];
56  for (int jj=0;jj<nFreeDOF_trial[eN_ebN];jj++)
57  {
58  int J = offset_trial + stride_trial*freeGlobal_trial[eN_ebN*nDOF_trial_element+jj];
59  columnIndecesMap[I].insert(J);
60  }
61  }
62  }
63  }
64  }
65  }
66  //interior element boundaries
67  if (hasNumericalFlux &&
68  needNumericalFluxJacobian)
69  {
70  for(int ebNI=0;ebNI<nInteriorElementBoundaries_global;ebNI++)
71  {
72  int ebN = interiorElementBoundariesArray[ebNI],
73  left_eN_global = elementBoundaryElementsArray[ebN*2 + 0],
74  right_eN_global = elementBoundaryElementsArray[ebN*2 + 1];
75  //left_ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2 + 0],
76  //right_ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2 + 1];
77  for(int ii=0;ii<nFreeDOF_test[left_eN_global];ii++)
78  {
79  int left_I = offset_test+stride_test*freeGlobal_test[left_eN_global*nDOF_test_element + ii];
80  for (int jj=0;jj<nFreeDOF_trial[left_eN_global];jj++)
81  {
82  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_global*nDOF_trial_element + jj];
83  columnIndecesMap[left_I].insert(left_J);
84  }
85  for (int jj=0;jj<nFreeDOF_trial[right_eN_global];jj++)
86  {
87  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_global*nDOF_trial_element + jj];
88  columnIndecesMap[left_I].insert(right_J);
89  }
90  }
91  for(int ii=0;ii<nFreeDOF_test[right_eN_global];ii++)
92  {
93  int right_I = offset_test+stride_test*freeGlobal_test[right_eN_global*nDOF_test_element+ii];
94  for(int jj=0;jj<nFreeDOF_trial[left_eN_global];jj++)
95  {
96  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_global*nDOF_trial_element+jj];
97  columnIndecesMap[right_I].insert(left_J);
98  }
99  for(int jj=0;jj<nFreeDOF_trial[right_eN_global];jj++)
100  {
101  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_global*nDOF_trial_element+jj];
102  columnIndecesMap[right_I].insert(right_J);
103  }
104  }
105  if(hasDiffusionInMixedForm)
106  {
107  for(int ebN_eN=0;ebN_eN<nElementBoundaries_element;ebN_eN++)
108  {
109  int left_eN_ebN = elementNeighborsArray[left_eN_global*nElementBoundaries_element+ebN_eN],
110  right_eN_ebN = elementNeighborsArray[right_eN_global*nElementBoundaries_element+ebN_eN];
111  for(int ii=0;ii<nFreeDOF_test[left_eN_global];ii++)
112  {
113  int left_I = offset_test+stride_test*freeGlobal_test[left_eN_global*nDOF_test_element+ii];
114  if(left_eN_ebN >= 0)
115  {
116  for (int jj=0;jj<nFreeDOF_trial[left_eN_ebN];jj++)
117  {
118  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_ebN*nDOF_trial_element+jj];
119  columnIndecesMap[left_I].insert(left_J);
120  }
121  }
122  if(right_eN_ebN >= 0)
123  {
124  for(int jj=0;jj<nFreeDOF_trial[right_eN_ebN];jj++)
125  {
126  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_ebN*nDOF_trial_element+jj];
127  columnIndecesMap[left_I].insert(right_J);
128  }
129  }
130  }
131  for(int ii=0;ii<nFreeDOF_test[right_eN_global];ii++)
132  {
133  int right_I = offset_test+stride_test*freeGlobal_test[right_eN_global*nDOF_test_element+ii];
134  if(left_eN_ebN >= 0)
135  {
136  for(int jj=0;jj<nFreeDOF_trial[left_eN_ebN];jj++)
137  {
138  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_ebN*nDOF_trial_element+jj];
139  columnIndecesMap[right_I].insert(left_J);
140  }
141  }
142  if(right_eN_ebN >= 0)
143  {
144  for(int jj=0;jj<nFreeDOF_trial[right_eN_ebN];jj++)
145  {
146  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_ebN*nDOF_trial_element+jj];
147  columnIndecesMap[right_I].insert(right_J);
148  }
149  }
150  }
151  }
152  }
153  }
154  }
155  //exterior element boundaries
156  if ((hasNumericalFlux &&
157  needNumericalFluxJacobian) ||
158  (hasOutflowBoundary &&
159  needOutflowJacobian))
160  {
161  for(int ebNE=0;ebNE<nExteriorElementBoundaries_global;ebNE++)
162  {
163  int ebN = exteriorElementBoundariesArray[ebNE],
164  eN_global = elementBoundaryElementsArray[ebN*2+0];
165  //ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2+0];
166  for (int ii=0;ii<nFreeDOF_test[eN_global];ii++)
167  {
168  int I = offset_test+stride_test*freeGlobal_test[eN_global*nDOF_test_element+ii];
169  for (int jj=0;jj<nFreeDOF_trial[eN_global];jj++)
170  {
171  int J = offset_trial+stride_trial*freeGlobal_trial[eN_global*nDOF_trial_element+jj];
172  columnIndecesMap[I].insert(J);
173  }
174  }
175  if(hasNumericalFlux &&
176  hasDiffusionInMixedForm)
177  {
178  for(int ebN_eN=0;ebN_eN < nElementBoundaries_element;ebN_eN++)
179  {
180  int eN_ebN = elementNeighborsArray[eN_global*nElementBoundaries_element+ebN_eN];
181  for (int ii=0;ii<nFreeDOF_test[eN_global];ii++)
182  {
183  int I = offset_test + stride_test*freeGlobal_test[eN_global*nDOF_test_element+ii];
184  if(eN_ebN >= 0)
185  {
186  for(int jj=0;jj<nFreeDOF_trial[eN_ebN];jj++)
187  {
188  int J = offset_trial+stride_trial*freeGlobal_trial[eN_ebN*nDOF_trial_element+jj];
189  columnIndecesMap[I].insert(J);
190  }
191  }
192  }
193  }
194  }
195  }
196  }
197  //debug
198  // for (std::map<int, std::set<int> >::iterator mit = columnIndecesMap.begin();mit != columnIndecesMap.end();mit++)
199  // {
200  // for(std::set<int>::iterator sit = mit->second.begin();sit!=mit->second.end();sit++)
201  // std::cout<<*sit<<'\t';
202  // std::cout<<std::endl;
203  // }
204  }
205 
206  void SparsityInfo::getOffsets_CSR(int nElements_global,
207  int nDOF_test_element,
208  int nDOF_trial_element,
209  int* nFreeDOF_test,
210  int* freeGlobal_test,
211  int* nFreeDOF_trial,
212  int* freeGlobal_trial,
213  int offset_test,
214  int stride_test,
215  int offset_trial,
216  int stride_trial,
217  int hasNumericalFlux,
218  int hasDiffusionInMixedForm,
219  int needNumericalFluxJacobian,
220  int nElementBoundaries_element,
221  int* elementNeighborsArray,
222  int nInteriorElementBoundaries_global,
223  int* interiorElementBoundariesArray,
224  int* elementBoundaryElementsArray,
225  int* elementBoundaryLocalElementBoundariesArray,
226  int hasFluxBoundaryConditions,
227  int nExteriorElementBoundaries_global,
228  int* exteriorElementBoundariesArray,
229  int hasOutflowBoundary,
230  int needOutflowJacobian,
231  int* rowptr,
232  int* csrRowIndeces,
233  int* csrColumnOffsets,
234  int* csrColumnOffsets_eNebN,
235  int* csrColumnOffsets_eb,
236  int* csrColumnOffsets_eb_eNebN)
237  {
238  //elements
239  for(int eN=0;eN<nElements_global;eN++)
240  {
241  for(int ii=0;ii<nFreeDOF_test[eN];ii++)
242  {
243  int I = offset_test + stride_test*freeGlobal_test[eN*nDOF_test_element+ii];
244  csrRowIndeces[eN*nDOF_test_element+ii] = rowptr[I];
245  for(int jj=0;jj<nFreeDOF_trial[eN];jj++)
246  {
247  int J = offset_trial + stride_trial*freeGlobal_trial[eN*nDOF_trial_element+jj];
248  csrColumnOffsets[eN*nDOF_test_element*nDOF_trial_element+
249  ii*nDOF_trial_element+
250  jj] = columnOffsetsMap[I][J];
251  }
252  }
253  //get element neighbor DOF for mixed form diffusion
254  if (hasNumericalFlux &&
255  hasDiffusionInMixedForm &&
256  needNumericalFluxJacobian)
257  {
258  for(int ebN=0;ebN<nElementBoundaries_element;ebN++)
259  {
260  int eN_ebN = elementNeighborsArray[eN*nElementBoundaries_element + ebN];
261  if (eN_ebN >= 0)
262  {
263  for (int ii=0;ii<nFreeDOF_test[eN];ii++)
264  {
265  int I = offset_test + stride_test*freeGlobal_test[eN*nDOF_test_element+ii];
266  for (int jj=0;jj<nFreeDOF_trial[eN_ebN];jj++)
267  {
268  int J = offset_trial + stride_trial*freeGlobal_trial[eN_ebN*nDOF_trial_element+jj];
269  csrColumnOffsets_eNebN[eN*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
270  ebN*nDOF_test_element*nDOF_trial_element+
271  ii*nDOF_test_element+
272  jj] = columnOffsetsMap[I][J];
273  }
274  }
275  }
276  }
277  }
278  }
279  //interior element boundaries
280  if (hasNumericalFlux &&
281  needNumericalFluxJacobian)
282  {
283  for(int ebNI=0;ebNI<nInteriorElementBoundaries_global;ebNI++)
284  {
285  int ebN = interiorElementBoundariesArray[ebNI],
286  left_eN_global = elementBoundaryElementsArray[ebN*2 + 0],
287  right_eN_global = elementBoundaryElementsArray[ebN*2 + 1];
288  //left_ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2 + 0],
289  //right_ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2 + 1];
290  for(int ii=0;ii<nFreeDOF_test[left_eN_global];ii++)
291  {
292  int left_I = offset_test+stride_test*freeGlobal_test[left_eN_global*nDOF_test_element + ii];
293  for (int jj=0;jj<nFreeDOF_trial[left_eN_global];jj++)
294  {
295  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_global*nDOF_trial_element + jj];
296  csrColumnOffsets_eb[ebN*2*2*nDOF_test_element*nDOF_trial_element+
297  0*2*nDOF_test_element*nDOF_trial_element+
298  0*nDOF_test_element*nDOF_trial_element+
299  ii*nDOF_trial_element+
300  jj] = columnOffsetsMap[left_I][left_J];
301  }
302  for (int jj=0;jj<nFreeDOF_trial[right_eN_global];jj++)
303  {
304  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_global*nDOF_trial_element + jj];
305  csrColumnOffsets_eb[ebN*2*2*nDOF_test_element*nDOF_trial_element+
306  0*2*nDOF_test_element*nDOF_trial_element+
307  1*nDOF_test_element*nDOF_trial_element+
308  ii*nDOF_trial_element+
309  jj] = columnOffsetsMap[left_I][right_J];
310  }
311  }
312  for(int ii=0;ii<nFreeDOF_test[right_eN_global];ii++)
313  {
314  int right_I = offset_test+stride_test*freeGlobal_test[right_eN_global*nDOF_test_element+ii];
315  for(int jj=0;jj<nFreeDOF_trial[left_eN_global];jj++)
316  {
317  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_global*nDOF_trial_element+jj];
318  csrColumnOffsets_eb[ebN*2*2*nDOF_test_element*nDOF_trial_element+
319  1*2*nDOF_test_element*nDOF_trial_element+
320  0*nDOF_test_element*nDOF_trial_element+
321  ii*nDOF_trial_element+
322  jj] = columnOffsetsMap[right_I][left_J];
323  }
324  for(int jj=0;jj<nFreeDOF_trial[right_eN_global];jj++)
325  {
326  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_global*nDOF_trial_element+jj];
327  csrColumnOffsets_eb[ebN*2*2*nDOF_test_element*nDOF_trial_element+
328  1*2*nDOF_test_element*nDOF_trial_element+
329  1*nDOF_test_element*nDOF_trial_element+
330  ii*nDOF_trial_element+
331  jj] = columnOffsetsMap[right_I][right_J];
332  }
333  }
334  if(hasDiffusionInMixedForm)
335  {
336  for(int ebN_eN=0;ebN_eN<nElementBoundaries_element;ebN_eN++)
337  {
338  int left_eN_ebN = elementNeighborsArray[left_eN_global*nElementBoundaries_element+ebN_eN],
339  right_eN_ebN = elementNeighborsArray[right_eN_global*nElementBoundaries_element+ebN_eN];
340  for(int ii=0;ii<nFreeDOF_test[left_eN_global];ii++)
341  {
342  int left_I = offset_test+stride_test*freeGlobal_test[left_eN_global*nDOF_test_element+ii];
343  if(left_eN_ebN >= 0)
344  {
345  for (int jj=0;jj<nFreeDOF_trial[left_eN_ebN];jj++)
346  {
347  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_ebN*nDOF_trial_element+jj];
348  csrColumnOffsets_eb_eNebN[ebN*2*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
349  0*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
350  0*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
351  ebN_eN*nDOF_test_element*nDOF_trial_element+
352  ii*nDOF_trial_element+
353  jj] = columnOffsetsMap[left_I][left_J];
354  }
355  }
356  if(right_eN_ebN >= 0)
357  {
358  for(int jj=0;jj<nFreeDOF_trial[right_eN_ebN];jj++)
359  {
360  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_ebN*nDOF_trial_element+jj];
361  csrColumnOffsets_eb_eNebN[ebN*2*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
362  0*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
363  1*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
364  ebN_eN*nDOF_test_element*nDOF_trial_element+
365  ii*nDOF_trial_element+
366  jj] = columnOffsetsMap[left_I][right_J];
367  }
368  }
369  }
370  for(int ii=0;ii<nFreeDOF_test[right_eN_global];ii++)
371  {
372  int right_I = offset_test+stride_test*freeGlobal_test[right_eN_global*nDOF_test_element+ii];
373  if(left_eN_ebN >= 0)
374  {
375  for(int jj=0;jj<nFreeDOF_trial[left_eN_ebN];jj++)
376  {
377  int left_J = offset_trial+stride_trial*freeGlobal_trial[left_eN_ebN*nDOF_trial_element+jj];
378  csrColumnOffsets_eb_eNebN[ebN*2*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
379  1*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
380  0*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
381  ebN_eN*nDOF_test_element*nDOF_trial_element+
382  ii*nDOF_trial_element+
383  jj] = columnOffsetsMap[right_I][left_J];
384  }
385  }
386  if(right_eN_ebN >= 0)
387  {
388  for(int jj=0;jj<nFreeDOF_trial[right_eN_ebN];jj++)
389  {
390  int right_J = offset_trial+stride_trial*freeGlobal_trial[right_eN_ebN*nDOF_trial_element+jj];
391  csrColumnOffsets_eb_eNebN[ebN*2*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
392  1*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
393  1*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
394  ebN_eN*nDOF_test_element*nDOF_trial_element+
395  ii*nDOF_trial_element+
396  jj] = columnOffsetsMap[right_I][right_J];
397  }
398  }
399  }
400  }
401  }
402  }
403  }
404  //exterior element boundaries
405  if ((hasNumericalFlux &&
406  needNumericalFluxJacobian) ||
407  (hasOutflowBoundary &&
408  needOutflowJacobian))
409  {
410  for(int ebNE=0;ebNE<nExteriorElementBoundaries_global;ebNE++)
411  {
412  int ebN = exteriorElementBoundariesArray[ebNE],
413  eN_global = elementBoundaryElementsArray[ebN*2+0];
414  //ebN_element = elementBoundaryLocalElementBoundariesArray[ebN*2+0];
415  for (int ii=0;ii<nFreeDOF_test[eN_global];ii++)
416  {
417  int I = offset_test+stride_test*freeGlobal_test[eN_global*nDOF_test_element+ii];
418  for (int jj=0;jj<nFreeDOF_trial[eN_global];jj++)
419  {
420  int J = offset_trial+stride_trial*freeGlobal_trial[eN_global*nDOF_trial_element+jj];
421  csrColumnOffsets_eb[ebN*2*2*nDOF_test_element*nDOF_trial_element+
422  0*2*nDOF_test_element*nDOF_trial_element+
423  0*nDOF_test_element*nDOF_trial_element+
424  ii*nDOF_trial_element+
425  jj] = columnOffsetsMap[I][J];
426  }
427  }
428  if(hasNumericalFlux &&
429  hasDiffusionInMixedForm)
430  {
431  for(int ebN_eN=0;ebN_eN < nElementBoundaries_element;ebN_eN++)
432  {
433  int eN_ebN = elementNeighborsArray[eN_global*nElementBoundaries_element+ebN_eN];
434  for (int ii=0;ii<nFreeDOF_test[eN_global];ii++)
435  {
436  int I = offset_test + stride_test*freeGlobal_test[eN_global*nDOF_test_element+ii];
437  if(eN_ebN >= 0)
438  {
439  for(int jj=0;jj<nFreeDOF_trial[eN_ebN];jj++)
440  {
441  int J = offset_trial+stride_trial*freeGlobal_trial[eN_ebN*nDOF_trial_element+jj];
442  csrColumnOffsets_eb_eNebN[ebN*2*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
443  0*2*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
444  0*nElementBoundaries_element*nDOF_test_element*nDOF_trial_element+
445  ebN_eN*nDOF_test_element*nDOF_trial_element+
446  ii*nDOF_trial_element+
447  jj] = columnOffsetsMap[I][J];
448  }
449  }
450  }
451  }
452  }
453  }
454  }
455  }
456 
458  {
459  //debug
460  // for (std::map<int, std::set<int> >::iterator mit = self->columnIndecesMap.begin();mit != self->columnIndecesMap.end();mit++)
461  // {
462  // for(std::set<int>::iterator sit = mit->second.begin();sit!=mit->second.end();sit++)
463  // std:://cout<<*sit<<'\t';
464  // std::cout<<std::endl;
465  // }
466  nrows = int(columnIndecesMap.size())+1;
467  rowptr = new int[nrows];
468  rowptr[0] = 0;
469  for(int I=1;I< columnIndecesMap.size()+1;I++)
470  rowptr[I]=rowptr[I-1] + int(columnIndecesMap[I-1].size());
471  nnz = rowptr[columnIndecesMap.size()];
472  colind = new int[nnz];
473  nzval = new double[nnz];
474  int max_nonzeros=0;
475  for(int I=0;I< columnIndecesMap.size();I++)
476  {
477  int offset=0;
478  for(std::set<int>::iterator sit=columnIndecesMap[I].begin();sit != columnIndecesMap[I].end();sit++)
479  {
480  columnOffsetsMap[I][*sit] = offset;
481  assert(rowptr[I]+offset < nnz);
482  colind[rowptr[I]+offset]=*sit;
483  offset++;
484  }
485  std::sort(&colind[rowptr[I]],&colind[rowptr[I+1]]);
486  max_nonzeros = std::max(max_nonzeros,rowptr[I+1] - rowptr[I]);
487  }
488  //std::cout<<"Proteus: Maximum nonzeros in any row is "<<max_nonzeros<<std::endl;
489  }
490 
492  rowptr(NULL),
493  colind(NULL),
494  nzval(NULL)
495  {}
496 
498  {
499  if (rowptr != NULL)
500  delete [] rowptr;
501  if (colind != NULL)
502  delete [] colind;
503  if (nzval != NULL)
504  delete [] nzval;
505  }
506 }//proteus
proteus::SparsityInfo::nnz
int nnz
Definition: sparsity.h:73
proteus::SparsityInfo::findNonzeros
void findNonzeros(int nElements_global, int nDOF_test_element, int nDOF_trial_element, int *nFreeDOF_test, int *freeGlobal_test, int *nFreeDOF_trial, int *freeGlobal_trial, int offset_test, int stride_test, int offset_trial, int stride_trial, int hasNumericalFlux, int hasDiffusionInMixedForm, int needNumericalFluxJacobian, int nElementBoundaries_element, int *elementNeighborsArray, int nInteriorElementBoundaries_global, int *interiorElementBoundariesArray, int *elementBoundaryElementsArray, int *elementBoundaryLocalElementBoundariesArray, int hasFluxBoundaryConditions, int nExteriorElementBoundaries_global, int *exteriorElementBoundariesArray, int hasOutflowBoundary, int needOutflowJacobian)
Definition: sparsity.cpp:5
sparsity.h
proteus::SparsityInfo::nzval
double * nzval
Definition: sparsity.h:75
proteus::SparsityInfo::nrows
int nrows
Definition: sparsity.h:72
proteus::SparsityInfo::rowptr
int * rowptr
Definition: sparsity.h:74
proteus::SparsityInfo::colind
int * colind
Definition: sparsity.h:74
proteus::SparsityInfo::getOffsets_CSR
void getOffsets_CSR(int nElements_global, int nDOF_test_element, int nDOF_trial_element, int *nFreeDOF_test, int *freeGlobal_test, int *nFreeDOF_trial, int *freeGlobal_trial, int offset_test, int stride_test, int offset_trial, int stride_trial, int hasNumericalFlux, int hasDiffusionInMixedForm, int needNumericalFluxJacobian, int nElementBoundaries_element, int *elementNeighborsArray, int nInteriorElementBoundaries_global, int *interiorElementBoundariesArray, int *elementBoundaryElementsArray, int *elementBoundaryLocalElementBoundariesArray, int hasFluxBoundaryConditions, int nExteriorElementBoundaries_global, int *exteriorElementBoundariesArray, int hasOutflowBoundary, int needOutflowJacobian, int *rowptr, int *csrRowIndeces, int *csrColumnOffsets, int *csrColumnOffsets_eNebN, int *csrColumnOffsets_eb, int *csrColumnOffsets_eb_eNebN)
Definition: sparsity.cpp:206
proteus::SparsityInfo::~SparsityInfo
~SparsityInfo()
Definition: sparsity.cpp:497
proteus
Definition: ADR.h:17
proteus::SparsityInfo::getCSR
void getCSR()
Definition: sparsity.cpp:457
max
#define max(a, b)
Definition: analyticalSolutions.h:14
proteus::SparsityInfo::SparsityInfo
SparsityInfo()
Definition: sparsity.cpp:491