Ifpack2 Templated Preconditioning Package Version 1.0
Loading...
Searching...
No Matches
Ifpack2_IlukGraph.hpp
Go to the documentation of this file.
1/*@HEADER
2// ***********************************************************************
3//
4// Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
5// Copyright (2009) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38//
39// ***********************************************************************
40//@HEADER
41 */
42
48
49#ifndef IFPACK2_ILUK_GRAPH_HPP
50#define IFPACK2_ILUK_GRAPH_HPP
51
52#include <algorithm>
53#include <vector>
54
55#include "KokkosSparse_spiluk.hpp"
56
57#include <Ifpack2_ConfigDefs.hpp>
58#include <Teuchos_ParameterList.hpp>
59#include <Teuchos_CommHelpers.hpp>
60#include <Tpetra_CrsGraph.hpp>
61#include <Tpetra_Details_WrappedDualView.hpp>
62#include <Tpetra_Import.hpp>
63#include <Ifpack2_CreateOverlapGraph.hpp>
64#include <Ifpack2_Parameters.hpp>
65
66namespace Ifpack2 {
67
99template<class GraphType, class KKHandleType>
100class IlukGraph : public Teuchos::Describable {
101public:
102 typedef typename GraphType::local_ordinal_type local_ordinal_type;
103 typedef typename GraphType::global_ordinal_type global_ordinal_type;
104 typedef typename GraphType::node_type node_type;
105
107 typedef Tpetra::RowGraph<local_ordinal_type,
108 global_ordinal_type,
109 node_type> row_graph_type;
111 typedef Tpetra::CrsGraph<local_ordinal_type,
112 global_ordinal_type,
113 node_type> crs_graph_type;
114
115
116
117 typedef typename crs_graph_type::nonconst_global_inds_host_view_type nonconst_global_inds_host_view_type;
118 typedef typename crs_graph_type::nonconst_local_inds_host_view_type nonconst_local_inds_host_view_type;
119 typedef typename crs_graph_type::global_inds_host_view_type global_inds_host_view_type;
120 typedef typename crs_graph_type::local_inds_host_view_type local_inds_host_view_type;
121
133 IlukGraph (const Teuchos::RCP<const GraphType>& G,
134 const int levelFill,
135 const int levelOverlap,
136 const double overalloc = 2.);
137
139 virtual ~IlukGraph ();
140
146 void setParameters (const Teuchos::ParameterList& parameterlist);
147
159 void initialize();
160 void initialize(const Teuchos::RCP<KKHandleType>& KernelHandle);
161
163 int getLevelFill () const { return LevelFill_; }
164
166 int getLevelOverlap () const { return LevelOverlap_; }
167
169 Teuchos::RCP<crs_graph_type> getL_Graph () const {
170 return L_Graph_;
171 }
172
174 Teuchos::RCP<crs_graph_type> getU_Graph () const {
175 return U_Graph_;
176 }
177
179 Teuchos::RCP<const crs_graph_type> getOverlapGraph () const {
180 return OverlapGraph_;
181 }
182
184 size_t getNumGlobalDiagonals() const { return NumGlobalDiagonals_; }
185
186private:
187 typedef typename GraphType::map_type map_type;
188
198
208
210 void constructOverlapGraph();
211
212 Teuchos::RCP<const GraphType> Graph_;
213 Teuchos::RCP<const crs_graph_type> OverlapGraph_;
214 int LevelFill_;
215 int LevelOverlap_;
216 const double Overalloc_;
217 Teuchos::RCP<crs_graph_type> L_Graph_;
218 Teuchos::RCP<crs_graph_type> U_Graph_;
219 size_t NumMyDiagonals_;
220 size_t NumGlobalDiagonals_;
221};
222
223
224template<class GraphType, class KKHandleType>
226IlukGraph (const Teuchos::RCP<const GraphType>& G,
227 const int levelFill,
228 const int levelOverlap,
229 const double overalloc)
230 : Graph_ (G),
231 LevelFill_ (levelFill),
232 LevelOverlap_ (levelOverlap),
233 Overalloc_ (overalloc),
234 NumMyDiagonals_ (0),
235 NumGlobalDiagonals_ (0)
236{
237 TEUCHOS_TEST_FOR_EXCEPTION(Overalloc_ <= 1., std::runtime_error,
238 "Ifpack2::IlukGraph: FATAL: overalloc must be greater than 1.")
239}
240
241
242template<class GraphType, class KKHandleType>
244{}
245
246
247template<class GraphType, class KKHandleType>
249setParameters (const Teuchos::ParameterList& parameterlist)
250{
251 getParameter (parameterlist, "iluk level-of-fill", LevelFill_);
252 getParameter (parameterlist, "iluk level-of-overlap", LevelOverlap_);
253}
254
255
256template<class GraphType, class KKHandleType>
258 // FIXME (mfh 22 Dec 2013) This won't do if we want
259 // RILUK::initialize() to do the right thing (that is,
260 // unconditionally recompute the "symbolic factorization").
261 if (OverlapGraph_ == Teuchos::null) {
262 OverlapGraph_ = createOverlapGraph<GraphType> (Graph_, LevelOverlap_);
263 }
264}
265
266
267template<class GraphType, class KKHandleType>
269{
270 using Teuchos::Array;
271 using Teuchos::ArrayView;
272 using Teuchos::RCP;
273 using Teuchos::rcp;
274 using Teuchos::REDUCE_SUM;
275 using Teuchos::reduceAll;
276
277 size_t NumIn, NumL, NumU;
278 bool DiagFound;
279
280 constructOverlapGraph();
281
282 // Get Maximum Row length
283 const int MaxNumIndices = OverlapGraph_->getLocalMaxNumRowEntries ();
284
285 // FIXME (mfh 23 Dec 2013) Use size_t or whatever
286 // getLocalNumElements() returns, instead of ptrdiff_t.
287 const int NumMyRows = OverlapGraph_->getRowMap ()->getLocalNumElements ();
288
289 using device_type = typename node_type::device_type;
290 using execution_space = typename device_type::execution_space;
291 using dual_view_type = Kokkos::DualView<size_t*,device_type>;
292 dual_view_type numEntPerRow_dv("numEntPerRow",NumMyRows);
293 Tpetra::Details::WrappedDualView<dual_view_type> numEntPerRow(numEntPerRow_dv);
294
295 const auto overalloc = Overalloc_;
296 const auto levelfill = LevelFill_;
297 {
298 // Scoping for the localOverlapGraph access
299 auto numEntPerRow_d = numEntPerRow.getDeviceView(Tpetra::Access::OverwriteAll);
300 auto localOverlapGraph = OverlapGraph_->getLocalGraphDevice();
301 Kokkos::parallel_for("CountOverlapGraphRowEntries",
302 Kokkos::RangePolicy<execution_space>(0, NumMyRows),
303 KOKKOS_LAMBDA(const int i)
304 {
305 // Heuristic to get the maximum number of entries per row.
306 int RowMaxNumIndices = localOverlapGraph.rowConst(i).length;
307 numEntPerRow_d(i) = (levelfill == 0) ? RowMaxNumIndices // No additional storage needed
308 : Kokkos::ceil(static_cast<double>(RowMaxNumIndices)
309 * Kokkos::pow(overalloc, levelfill));
310 });
311
312 };
313
314 bool insertError; // No error found yet while inserting entries
315 do {
316 insertError = false;
317 Teuchos::ArrayView<const size_t> a_numEntPerRow(numEntPerRow.getHostView(Tpetra::Access::ReadOnly).data(),NumMyRows);
318 L_Graph_ = rcp (new crs_graph_type (OverlapGraph_->getRowMap (),
319 OverlapGraph_->getRowMap (),
320 a_numEntPerRow));
321 U_Graph_ = rcp (new crs_graph_type (OverlapGraph_->getRowMap (),
322 OverlapGraph_->getRowMap (),
323 a_numEntPerRow));
324
325 Array<local_ordinal_type> L (MaxNumIndices);
326 Array<local_ordinal_type> U (MaxNumIndices);
327
328 // First we copy the user's graph into L and U, regardless of fill level
329
330 NumMyDiagonals_ = 0;
331
332 for (int i = 0; i< NumMyRows; ++i) {
333 local_inds_host_view_type my_indices;
334 OverlapGraph_->getLocalRowView (i, my_indices);
335
336 // Split into L and U (we don't assume that indices are ordered).
337
338 NumL = 0;
339 NumU = 0;
340 DiagFound = false;
341 NumIn = my_indices.size();
342
343 for (size_t j = 0; j < NumIn; ++j) {
344 const local_ordinal_type k = my_indices[j];
345
346 if (k<NumMyRows) { // Ignore column elements that are not in the square matrix
347
348 if (k==i) {
349 DiagFound = true;
350 }
351 else if (k < i) {
352 L[NumL] = k;
353 NumL++;
354 }
355 else {
356 U[NumU] = k;
357 NumU++;
358 }
359 }
360 }
361
362 // Check in things for this row of L and U
363
364 if (DiagFound) {
365 ++NumMyDiagonals_;
366 }
367 if (NumL) {
368 L_Graph_->insertLocalIndices (i, NumL, L.data());
369 }
370 if (NumU) {
371 U_Graph_->insertLocalIndices (i, NumU, U.data());
372 }
373 }
374
375 if (LevelFill_ > 0) {
376 // Complete Fill steps
377 RCP<const map_type> L_DomainMap = OverlapGraph_->getRowMap ();
378 RCP<const map_type> L_RangeMap = Graph_->getRangeMap ();
379 RCP<const map_type> U_DomainMap = Graph_->getDomainMap ();
380 RCP<const map_type> U_RangeMap = OverlapGraph_->getRowMap ();
381 RCP<Teuchos::ParameterList> params = Teuchos::parameterList ();
382 params->set ("Optimize Storage",false);
383 L_Graph_->fillComplete (L_DomainMap, L_RangeMap, params);
384 U_Graph_->fillComplete (U_DomainMap, U_RangeMap, params);
385 L_Graph_->resumeFill ();
386 U_Graph_->resumeFill ();
387
388 // At this point L_Graph and U_Graph are filled with the pattern of input graph,
389 // sorted and have redundant indices (if any) removed. Indices are zero based.
390 // LevelFill is greater than zero, so continue...
391
392 int MaxRC = NumMyRows;
393 std::vector<std::vector<int> > Levels(MaxRC);
394 std::vector<int> LinkList(MaxRC);
395 std::vector<int> CurrentLevel(MaxRC);
396 Array<local_ordinal_type> CurrentRow (MaxRC + 1);
397 std::vector<int> LevelsRowU(MaxRC);
398
399 try {
400 for (int i = 0; i < NumMyRows; ++i) {
401 int First, Next;
402
403 // copy column indices of row into workspace and sort them
404
405 size_t LenL = L_Graph_->getNumEntriesInLocalRow(i);
406 size_t LenU = U_Graph_->getNumEntriesInLocalRow(i);
407 size_t Len = LenL + LenU + 1;
408 CurrentRow.resize(Len);
409 nonconst_local_inds_host_view_type CurrentRow_view(CurrentRow.data(),CurrentRow.size());
410 L_Graph_->getLocalRowCopy(i, CurrentRow_view, LenL); // Get L Indices
411 CurrentRow[LenL] = i; // Put in Diagonal
412 if (LenU > 0) {
413 ArrayView<local_ordinal_type> URowView = CurrentRow.view (LenL+1,LenU);
414 nonconst_local_inds_host_view_type URowView_v(URowView.data(),URowView.size());
415
416 // Get U Indices
417 U_Graph_->getLocalRowCopy (i, URowView_v, LenU);
418 }
419
420 // Construct linked list for current row
421
422 for (size_t j=0; j<Len-1; j++) {
423 LinkList[CurrentRow[j]] = CurrentRow[j+1];
424 CurrentLevel[CurrentRow[j]] = 0;
425 }
426
427 LinkList[CurrentRow[Len-1]] = NumMyRows;
428 CurrentLevel[CurrentRow[Len-1]] = 0;
429
430 // Merge List with rows in U
431
432 First = CurrentRow[0];
433 Next = First;
434 while (Next < i) {
435 int PrevInList = Next;
436 int NextInList = LinkList[Next];
437 int RowU = Next;
438 // Get Indices for this row of U
439 local_inds_host_view_type IndicesU;
440 U_Graph_->getLocalRowView (RowU, IndicesU);
441 // FIXME (mfh 23 Dec 2013) size() returns ptrdiff_t, not int.
442 int LengthRowU = IndicesU.size ();
443
444 int ii;
445
446 // Scan RowU
447
448 for (ii = 0; ii < LengthRowU; /*nop*/) {
449 int CurInList = IndicesU[ii];
450 if (CurInList < NextInList) {
451 // new fill-in
452 int NewLevel = CurrentLevel[RowU] + Levels[RowU][ii+1] + 1;
453 if (NewLevel <= LevelFill_) {
454 LinkList[PrevInList] = CurInList;
455 LinkList[CurInList] = NextInList;
456 PrevInList = CurInList;
457 CurrentLevel[CurInList] = NewLevel;
458 }
459 ii++;
460 }
461 else if (CurInList == NextInList) {
462 PrevInList = NextInList;
463 NextInList = LinkList[PrevInList];
464 int NewLevel = CurrentLevel[RowU] + Levels[RowU][ii+1] + 1;
465 CurrentLevel[CurInList] = std::min (CurrentLevel[CurInList],
466 NewLevel);
467 ii++;
468 }
469 else { // (CurInList > NextInList)
470 PrevInList = NextInList;
471 NextInList = LinkList[PrevInList];
472 }
473 }
474 Next = LinkList[Next];
475 }
476
477 // Put pattern into L and U
478 CurrentRow.resize(0);
479
480 Next = First;
481
482 // Lower
483 while (Next < i) {
484 CurrentRow.push_back(Next);
485 Next = LinkList[Next];
486 }
487
488 // FIXME (mfh 23 Dec 2013) It's not clear to me that
489 // removeLocalIndices works like people expect it to work. In
490 // particular, it does not actually change the column Map.
491 L_Graph_->removeLocalIndices (i); // Delete current set of Indices
492 if (CurrentRow.size() > 0) {
493 L_Graph_->insertLocalIndices (i, CurrentRow.size(),CurrentRow.data());
494 }
495
496 // Diagonal
497
498 TEUCHOS_TEST_FOR_EXCEPTION(
499 Next != i, std::runtime_error,
500 "Ifpack2::IlukGraph::initialize: FATAL: U has zero diagonal")
501
502 LevelsRowU[0] = CurrentLevel[Next];
503 Next = LinkList[Next];
504
505 // Upper
506 CurrentRow.resize(0);
507 LenU = 0;
508
509 while (Next < NumMyRows) {
510 LevelsRowU[LenU+1] = CurrentLevel[Next];
511 CurrentRow.push_back (Next);
512 ++LenU;
513 Next = LinkList[Next];
514 }
515
516 // FIXME (mfh 23 Dec 2013) It's not clear to me that
517 // removeLocalIndices works like people expect it to work. In
518 // particular, it does not actually change the column Map.
519
520 U_Graph_->removeLocalIndices (i); // Delete current set of Indices
521 if (LenU > 0) {
522 U_Graph_->insertLocalIndices (i, CurrentRow.size(),CurrentRow.data());
523 }
524
525 // Allocate and fill Level info for this row
526 Levels[i] = std::vector<int> (LenU+1);
527 for (size_t jj=0; jj<LenU+1; jj++) {
528 Levels[i][jj] = LevelsRowU[jj];
529 }
530 }
531 }
532 catch (std::runtime_error &e) {
533 insertError = true;
534 auto numEntPerRow_d = numEntPerRow.getDeviceView(Tpetra::Access::OverwriteAll);
535 Kokkos::parallel_for("CountOverlapGraphRowEntries",
536 Kokkos::RangePolicy<execution_space>(0, NumMyRows),
537 KOKKOS_LAMBDA(const int i)
538 {
539 const auto numRowEnt = numEntPerRow_d(i);
540 numEntPerRow_d(i) = ceil(static_cast<double>((numRowEnt != 0 ? numRowEnt : 1)) * overalloc);
541 });
542 }
543 const int localInsertError = insertError ? 1 : 0;
544 int globalInsertError = 0;
545 reduceAll (* (OverlapGraph_->getRowMap ()->getComm ()), REDUCE_SUM, 1,
546 &localInsertError, &globalInsertError);
547 insertError = globalInsertError > 0;
548 }
549 } while (insertError); // do until all insertions complete successfully
550
551 // Complete Fill steps
552 RCP<const map_type> L_DomainMap = OverlapGraph_->getRowMap ();
553 RCP<const map_type> L_RangeMap = Graph_->getRangeMap ();
554 RCP<const map_type> U_DomainMap = Graph_->getDomainMap ();
555 RCP<const map_type> U_RangeMap = OverlapGraph_->getRowMap ();
556 L_Graph_->fillComplete (L_DomainMap, L_RangeMap);//DoOptimizeStorage is default here...
557 U_Graph_->fillComplete (U_DomainMap, U_RangeMap);//DoOptimizeStorage is default here...
558
559 reduceAll<int, size_t> (* (L_DomainMap->getComm ()), REDUCE_SUM, 1,
560 &NumMyDiagonals_, &NumGlobalDiagonals_);
561}
562
563
564template<class GraphType, class KKHandleType>
565void IlukGraph<GraphType, KKHandleType>::initialize(const Teuchos::RCP<KKHandleType>& KernelHandle)
566{
567 using Teuchos::Array;
568 using Teuchos::ArrayView;
569 using Teuchos::RCP;
570 using Teuchos::rcp;
571 using Teuchos::REDUCE_SUM;
572 using Teuchos::reduceAll;
573
574 typedef typename crs_graph_type::local_graph_device_type local_graph_device_type;
575 typedef typename local_graph_device_type::size_type size_type;
576 typedef typename local_graph_device_type::data_type data_type;
577 typedef typename local_graph_device_type::array_layout array_layout;
578 typedef typename local_graph_device_type::device_type device_type;
579
580 typedef typename Kokkos::View<size_type*, array_layout, device_type> lno_row_view_t;
581 typedef typename Kokkos::View<data_type*, array_layout, device_type> lno_nonzero_view_t;
582
583 constructOverlapGraph();
584
585 // FIXME (mfh 23 Dec 2013) Use size_t or whatever
586 // getLocalNumElements() returns, instead of ptrdiff_t.
587 const int NumMyRows = OverlapGraph_->getRowMap()->getLocalNumElements();
588 auto localOverlapGraph = OverlapGraph_->getLocalGraphDevice();
589
590 if (KernelHandle->get_spiluk_handle()->get_nrows() < static_cast<size_type>(NumMyRows)) {
591 KernelHandle->get_spiluk_handle()->reset_handle(NumMyRows,
592 KernelHandle->get_spiluk_handle()->get_nnzL(),
593 KernelHandle->get_spiluk_handle()->get_nnzU());
594 }
595
596 lno_row_view_t L_row_map("L_row_map", NumMyRows + 1);
597 lno_nonzero_view_t L_entries("L_entries", KernelHandle->get_spiluk_handle()->get_nnzL());
598 lno_row_view_t U_row_map("U_row_map", NumMyRows + 1);
599 lno_nonzero_view_t U_entries("U_entries", KernelHandle->get_spiluk_handle()->get_nnzU());
600
601 bool symbolicError;
602 do {
603 symbolicError = false;
604 try {
605 KokkosSparse::Experimental::spiluk_symbolic( KernelHandle.getRawPtr(), LevelFill_,
606 localOverlapGraph.row_map, localOverlapGraph.entries,
607 L_row_map, L_entries, U_row_map, U_entries );
608 }
609 catch (std::runtime_error &e) {
610 symbolicError = true;
611 data_type nnzL = static_cast<data_type>(Overalloc_)*L_entries.extent(0);
612 data_type nnzU = static_cast<data_type>(Overalloc_)*U_entries.extent(0);
613 KernelHandle->get_spiluk_handle()->reset_handle(NumMyRows, nnzL, nnzU);
614 Kokkos::resize(L_entries, KernelHandle->get_spiluk_handle()->get_nnzL());
615 Kokkos::resize(U_entries, KernelHandle->get_spiluk_handle()->get_nnzU());
616 }
617 const int localSymbolicError = symbolicError ? 1 : 0;
618 int globalSymbolicError = 0;
619 reduceAll (* (OverlapGraph_->getRowMap ()->getComm ()), REDUCE_SUM, 1,
620 &localSymbolicError, &globalSymbolicError);
621 symbolicError = globalSymbolicError > 0;
622 } while (symbolicError);
623
624 Kokkos::resize(L_entries, KernelHandle->get_spiluk_handle()->get_nnzL());
625 Kokkos::resize(U_entries, KernelHandle->get_spiluk_handle()->get_nnzU());
626
627 RCP<Teuchos::ParameterList> params = Teuchos::parameterList ();
628 params->set ("Optimize Storage",false);
629
630 L_Graph_ = rcp (new crs_graph_type (OverlapGraph_->getRowMap (),
631 OverlapGraph_->getRowMap (),
632 L_row_map, L_entries));
633 U_Graph_ = rcp (new crs_graph_type (OverlapGraph_->getRowMap (),
634 OverlapGraph_->getRowMap (),
635 U_row_map, U_entries));
636
637 RCP<const map_type> L_DomainMap = OverlapGraph_->getRowMap ();
638 RCP<const map_type> L_RangeMap = Graph_->getRangeMap ();
639 RCP<const map_type> U_DomainMap = Graph_->getDomainMap ();
640 RCP<const map_type> U_RangeMap = OverlapGraph_->getRowMap ();
641 L_Graph_->fillComplete (L_DomainMap, L_RangeMap, params);
642 U_Graph_->fillComplete (U_DomainMap, U_RangeMap, params);
643}
644
645} // namespace Ifpack2
646
647#endif /* IFPACK2_ILUK_GRAPH_HPP */
Construct a level filled graph for use in computing an ILU(k) incomplete factorization.
Definition: Ifpack2_IlukGraph.hpp:100
size_t getNumGlobalDiagonals() const
Returns the global number of diagonals in the ILU(k) graph.
Definition: Ifpack2_IlukGraph.hpp:184
Tpetra::CrsGraph< local_ordinal_type, global_ordinal_type, node_type > crs_graph_type
Tpetra::CrsGraph specialization used by this class.
Definition: Ifpack2_IlukGraph.hpp:113
Teuchos::RCP< crs_graph_type > getU_Graph() const
Returns the graph of upper triangle of the ILU(k) graph as a Tpetra::CrsGraph.
Definition: Ifpack2_IlukGraph.hpp:174
int getLevelFill() const
The level of fill used to construct this graph.
Definition: Ifpack2_IlukGraph.hpp:163
int getLevelOverlap() const
The level of overlap used to construct this graph.
Definition: Ifpack2_IlukGraph.hpp:166
void initialize()
Set up the graph structure of the L and U factors.
Definition: Ifpack2_IlukGraph.hpp:268
Teuchos::RCP< const crs_graph_type > getOverlapGraph() const
Returns the the overlapped graph.
Definition: Ifpack2_IlukGraph.hpp:179
void setParameters(const Teuchos::ParameterList &parameterlist)
Set parameters.
Definition: Ifpack2_IlukGraph.hpp:249
Tpetra::RowGraph< local_ordinal_type, global_ordinal_type, node_type > row_graph_type
Tpetra::RowGraph specialization used by this class.
Definition: Ifpack2_IlukGraph.hpp:109
Teuchos::RCP< crs_graph_type > getL_Graph() const
Returns the graph of lower triangle of the ILU(k) graph as a Tpetra::CrsGraph.
Definition: Ifpack2_IlukGraph.hpp:169
IlukGraph(const Teuchos::RCP< const GraphType > &G, const int levelFill, const int levelOverlap, const double overalloc=2.)
Constructor.
Definition: Ifpack2_IlukGraph.hpp:226
virtual ~IlukGraph()
IlukGraph Destructor.
Definition: Ifpack2_IlukGraph.hpp:243
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:74
void getParameter(const Teuchos::ParameterList &params, const std::string &name, T &value)
Set a value from a ParameterList if a parameter with the specified name exists.
Definition: Ifpack2_Parameters.hpp:59