46 #ifndef MUELU_COALESCEDROPFACTORY_KOKKOS_DEF_HPP
47 #define MUELU_COALESCEDROPFACTORY_KOKKOS_DEF_HPP
49 #include <Kokkos_Core.hpp>
50 #include <KokkosSparse_CrsMatrix.hpp>
56 #include "MueLu_AmalgamationInfo.hpp"
59 #include "MueLu_LWGraph_kokkos.hpp"
62 #include "MueLu_Utilities.hpp"
66 namespace CoalesceDrop_Kokkos_Details {
68 template <
class LO,
class RowType>
74 KOKKOS_INLINE_FUNCTION
85 template <
class LO,
class GhostedViewType>
88 typedef typename GhostedViewType::value_type
SC;
89 typedef Kokkos::ArithTraits<SC>
ATS;
101 KOKKOS_FORCEINLINE_FUNCTION
104 auto aiiajj = ATS::magnitude(
diag(row, 0)) * ATS::magnitude(
diag(col, 0));
105 auto aij2 = ATS::magnitude(val) * ATS::magnitude(val);
107 return (aij2 <=
eps *
eps * aiiajj);
111 template <
class LO,
class CoordsType>
114 typedef typename CoordsType::value_type
SC;
115 typedef Kokkos::ArithTraits<SC>
ATS;
125 KOKKOS_INLINE_FUNCTION
127 SC d = ATS::zero(), s;
128 for (
size_t j = 0; j <
coords.extent(1); j++) {
132 return ATS::magnitude(d);
139 template <
class LO,
class GhostedViewType,
class DistanceFunctor>
142 typedef typename GhostedViewType::value_type
SC;
143 typedef Kokkos::ArithTraits<SC>
ATS;
148 :
diag(ghostedLaplDiag)
153 KOKKOS_INLINE_FUNCTION
160 typedef Kokkos::ArithTraits<dSC> dATS;
163 auto aiiajj = ATS::magnitude(
diag(row, 0)) * ATS::magnitude(
diag(col, 0));
164 auto aij2 = ATS::magnitude(fval) * ATS::magnitude(fval);
166 return (aij2 <=
eps *
eps * aiiajj);
175 template <
class SC,
class LO,
class MatrixType,
class BndViewType,
class DropFunctorType>
182 typedef Kokkos::ArithTraits<SC>
ATS;
188 ScalarFunctor(MatrixType A_, BndViewType bndNodes_, DropFunctorType dropFunctor_,
189 typename rows_type::non_const_type rows_,
190 typename cols_type::non_const_type colsAux_,
191 typename vals_type::non_const_type valsAux_,
192 bool reuseGraph_,
bool lumping_,
SC ,
193 bool aggregationMayCreateDirichlet_)
204 zero = impl_ATS::zero();
207 KOKKOS_INLINE_FUNCTION
209 auto rowView =
A.rowConst(row);
210 auto length = rowView.length;
211 auto offset =
rowsA(row);
216 for (decltype(length) colID = 0; colID < length; colID++) {
217 LO col = rowView.colidx(colID);
220 if (!
dropFunctor(row, col, rowView.value(colID)) || row == col) {
221 colsAux(offset + rownnz) = col;
238 rows(row + 1) = rownnz;
246 valsAux(offset + diagID) += diag;
267 typename rows_type::non_const_type
rows;
278 template <
class MatrixType,
class NnzType,
class blkSizeType>
281 typedef typename MatrixType::ordinal_type
LO;
289 KOKKOS_INLINE_FUNCTION
293 LO nodeRowMaxNonZeros = 0;
296 nodeRowMaxNonZeros += rowView.length;
298 nnz(row + 1) = nodeRowMaxNonZeros;
299 totalnnz += nodeRowMaxNonZeros;
312 template <
class MatrixType,
class NnzType,
class blkSizeType,
class ColDofType,
class Dof2NodeTranslationType,
class BdryNodeTypeConst,
class BdryNodeType,
class boolType>
315 typedef typename MatrixType::ordinal_type
LO;
331 blkSizeType blkSize_,
333 Dof2NodeTranslationType dof2node_,
335 BdryNodeTypeConst dirichletdof_,
336 BdryNodeType bdrynode_,
337 boolType usegreedydirichlet_)
349 KOKKOS_INLINE_FUNCTION
356 auto numIndices = rowView.length;
362 for (decltype(numIndices) k = 0; k < numIndices; k++) {
363 auto dofID = rowView.colidx(k);
372 auto numIndices = rowView.length;
378 for (decltype(numIndices) k = 0; k < numIndices; k++) {
379 auto dofID = rowView.colidx(k);
390 for (
LO i = 0; i < (n - 1); i++) {
391 for (
LO j = 0; j < (n - i - 1); j++) {
401 for (
LO i = 0; i < n; i++) {
404 if (nodeID != lastNodeID) {
416 template <
class MatrixType,
class ColDofNnzType,
class ColDofType,
class ColNodeNnzType,
class ColNodeType>
419 typedef typename MatrixType::ordinal_type
LO;
420 typedef typename MatrixType::value_type
SC;
429 Stage1dVectorFunctor(ColDofType coldofs_, ColDofNnzType coldofnnz_, ColNodeType colnodes_, ColNodeNnzType colnodennz_)
436 KOKKOS_INLINE_FUNCTION
441 auto n = nodeend - nodebegin;
443 for (decltype(nodebegin) i = 0; i < n; i++) {
451 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
455 #define SET_VALID_ENTRY(name) validParamList->setEntry(name, MasterList::getEntry(name))
468 #undef SET_VALID_ENTRY
470 validParamList->
set<
RCP<const FactoryBase>>(
"UnAmalgamationInfo", Teuchos::null,
"Generating factory for UnAmalgamationInfo");
473 return validParamList;
476 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
478 Input(currentLevel,
"A");
479 Input(currentLevel,
"UnAmalgamationInfo");
482 if (pL.
get<std::string>(
"aggregation: drop scheme") ==
"distance laplacian")
483 Input(currentLevel,
"Coordinates");
486 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
492 typedef typename STS::magnitudeType MT;
495 auto A = Get<RCP<Matrix>>(currentLevel,
"A");
515 LO blkSize = A->GetFixedBlockSize() / A->GetStorageBlockSize();
517 auto amalInfo = Get<RCP<AmalgamationInfo>>(currentLevel,
"UnAmalgamationInfo");
522 TEUCHOS_TEST_FOR_EXCEPTION(pL.get<
bool>(
"aggregation: use ml scaling of drop tol"), std::invalid_argument,
"Option: 'aggregation: use ml scaling of drop tol' is not supported in the Kokkos version of CoalesceDroPFactory");
524 std::string algo = pL.get<std::string>(
"aggregation: drop scheme");
526 double threshold = pL.get<
double>(
"aggregation: drop tol");
527 GetOStream(
Runtime0) <<
"algorithm = \"" << algo <<
"\": threshold = " << threshold
528 <<
", blocksize = " << A->GetFixedBlockSize() << std::endl;
530 const typename STS::magnitudeType dirichletThreshold =
531 STS::magnitude(as<SC>(pL.get<
double>(
"aggregation: Dirichlet threshold")));
533 GO numDropped = 0, numTotal = 0;
539 boundary_nodes_type boundaryNodes;
542 if (blkSize == 1 && threshold == zero) {
549 graph =
rcp(
new LWGraph_kokkos(A->getCrsGraph()->getLocalGraphDevice(), A->getRowMap(), A->getColMap(),
"graph of A"));
552 numTotal = A->getLocalNumEntries();
557 }
else if (blkSize == 1 && threshold != zero) {
560 typedef typename Matrix::local_matrix_type local_matrix_type;
562 typedef typename kokkos_graph_type::row_map_type::non_const_type rows_type;
563 typedef typename kokkos_graph_type::entries_type::non_const_type cols_type;
564 typedef typename local_matrix_type::values_type::non_const_type vals_type;
566 LO numRows = A->getLocalNumRows();
567 local_matrix_type kokkosMatrix = A->getLocalMatrixDevice();
568 auto nnzA = kokkosMatrix.nnz();
569 auto rowsA = kokkosMatrix.graph.row_map;
571 typedef Kokkos::ArithTraits<SC> ATS;
572 typedef typename ATS::val_type impl_Scalar;
573 typedef Kokkos::ArithTraits<impl_Scalar> impl_ATS;
575 bool reuseGraph = pL.
get<
bool>(
"filtered matrix: reuse graph");
576 bool lumping = pL.get<
bool>(
"filtered matrix: use lumping");
578 GetOStream(
Runtime0) <<
"Lumping dropped entries" << std::endl;
580 const bool aggregationMayCreateDirichlet = pL.get<
bool>(
"aggregation: dropping may create Dirichlet");
583 rows_type
rows(
"FA_rows", numRows + 1);
584 cols_type
colsAux(Kokkos::ViewAllocateWithoutInitializing(
"FA_aux_cols"), nnzA);
590 filteredA = MatrixFactory::Build(A->getCrsGraph());
594 fillCompleteParams->set(
"No Nonlocal Changes",
true);
595 filteredA->fillComplete(fillCompleteParams);
598 valsAux = filteredA->getLocalMatrixDevice().values;
602 valsAux = vals_type(Kokkos::ViewAllocateWithoutInitializing(
"FA_aux_vals"), nnzA);
605 typename boundary_nodes_type::non_const_type bndNodes(Kokkos::ViewAllocateWithoutInitializing(
"boundaryNodes"), numRows);
609 if (algo ==
"classical") {
613 kokkosMatrix = local_matrix_type();
616 kokkosMatrix = A->getLocalMatrixDevice();
623 auto ghostedDiagView = ghostedDiag->getDeviceLocalView(Xpetra::Access::ReadWrite);
627 scalarFunctor(kokkosMatrix, bndNodes, dropFunctor, rows, colsAux, valsAux, reuseGraph, lumping, threshold, aggregationMayCreateDirichlet);
629 Kokkos::parallel_reduce(
"MueLu:CoalesceDropF:Build:scalar_filter:main_loop",
range_type(0, numRows),
630 scalarFunctor, nnzFA);
633 }
else if (algo ==
"distance laplacian") {
635 auto coords = Get<RCP<doubleMultiVector>>(currentLevel,
"Coordinates");
637 auto uniqueMap = A->getRowMap();
638 auto nonUniqueMap = A->getColMap();
644 importer = ImportFactory::Build(uniqueMap, nonUniqueMap);
653 auto ghostedCoordsView = ghostedCoords->getDeviceLocalView(Xpetra::Access::ReadWrite);
661 localLaplDiag = VectorFactory::Build(uniqueMap);
663 auto localLaplDiagView = localLaplDiag->getDeviceLocalView(Xpetra::Access::OverwriteAll);
664 auto kokkosGraph = kokkosMatrix.graph;
666 Kokkos::parallel_for(
667 "MueLu:CoalesceDropF:Build:scalar_filter:laplacian_diag",
range_type(0, numRows),
668 KOKKOS_LAMBDA(
const LO row) {
669 auto rowView = kokkosGraph.rowConst(row);
670 auto length = rowView.length;
672 impl_Scalar d = impl_ATS::zero();
673 for (decltype(length) colID = 0; colID < length; colID++) {
674 auto col = rowView(colID);
676 d += impl_ATS::one() / distFunctor.
distance2(row, col);
678 localLaplDiagView(row, 0) = d;
685 SubFactoryMonitor m2(*
this,
"Ghosted Laplacian diag construction", currentLevel);
686 ghostedLaplDiag = VectorFactory::Build(nonUniqueMap);
687 ghostedLaplDiag->doImport(*localLaplDiag, *importer,
Xpetra::INSERT);
694 auto ghostedLaplDiagView = ghostedLaplDiag->getDeviceLocalView(Xpetra::Access::ReadWrite);
697 dropFunctor(ghostedLaplDiagView, distFunctor, threshold);
699 scalarFunctor(kokkosMatrix, bndNodes, dropFunctor, rows, colsAux, valsAux, reuseGraph, lumping, threshold,
true);
701 Kokkos::parallel_reduce(
"MueLu:CoalesceDropF:Build:scalar_filter:main_loop",
range_type(0, numRows),
702 scalarFunctor, nnzFA);
706 numDropped = nnzA - nnzFA;
708 boundaryNodes = bndNodes;
714 Kokkos::parallel_scan(
715 "MueLu:CoalesceDropF:Build:scalar_filter:compress_rows",
range_type(0, numRows + 1),
716 KOKKOS_LAMBDA(
const LO i,
LO& update,
const bool& final_pass) {
728 cols_type cols(Kokkos::ViewAllocateWithoutInitializing(
"FA_cols"), nnzFA);
731 GetOStream(
Runtime1) <<
"reuse matrix graph for filtering (compress matrix columns only)" << std::endl;
735 Kokkos::parallel_for(
736 "MueLu:TentativePF:Build:compress_cols",
range_type(0, numRows),
737 KOKKOS_LAMBDA(
const LO i) {
740 LO rowAStart = rowsA(i);
741 size_t rownnz =
rows(i + 1) -
rows(i);
742 for (
size_t j = 0; j < rownnz; j++)
743 cols(rowStart + j) =
colsAux(rowAStart + j);
747 GetOStream(
Runtime1) <<
"new matrix graph for filtering (compress matrix columns and values)" << std::endl;
750 vals = vals_type(Kokkos::ViewAllocateWithoutInitializing(
"FA_vals"), nnzFA);
752 Kokkos::parallel_for(
753 "MueLu:TentativePF:Build:compress_cols",
range_type(0, numRows),
754 KOKKOS_LAMBDA(
const LO i) {
756 LO rowAStart = rowsA(i);
757 size_t rownnz =
rows(i + 1) -
rows(i);
758 for (
size_t j = 0; j < rownnz; j++) {
759 cols(rowStart + j) =
colsAux(rowAStart + j);
760 vals(rowStart + j) =
valsAux(rowAStart + j);
765 kokkos_graph_type kokkosGraph(cols, rows);
770 graph =
rcp(
new LWGraph_kokkos(kokkosGraph, A->getRowMap(), A->getColMap(),
"filtered graph of A"));
774 numTotal = A->getLocalNumEntries();
781 local_matrix_type localFA = local_matrix_type(
"A", numRows, A->getLocalMatrixDevice().numCols(), nnzFA, vals,
rows, cols);
782 auto filteredACrs = CrsMatrixFactory::Build(localFA, A->getRowMap(), A->getColMap(), A->getDomainMap(), A->getRangeMap(),
783 A->getCrsGraph()->getImporter(), A->getCrsGraph()->getExporter());
784 filteredA =
rcp(
new CrsMatrixWrap(filteredACrs));
787 filteredA->SetFixedBlockSize(A->GetFixedBlockSize());
789 if (pL.get<
bool>(
"filtered matrix: reuse eigenvalue")) {
794 filteredA->SetMaxEigenvalueEstimate(A->GetMaxEigenvalueEstimate());
799 }
else if (blkSize > 1 && threshold == zero) {
818 Array<LO> rowTranslationArray = *(amalInfo->getRowTranslation());
819 Array<LO> colTranslationArray = *(amalInfo->getColTranslation());
821 Kokkos::View<LO*, Kokkos::MemoryUnmanaged>
822 rowTranslationView(rowTranslationArray.
getRawPtr(), rowTranslationArray.
size());
823 Kokkos::View<LO*, Kokkos::MemoryUnmanaged>
824 colTranslationView(colTranslationArray.
getRawPtr(), colTranslationArray.
size());
827 LO numNodes = Teuchos::as<LocalOrdinal>(uniqueMap->getLocalNumElements());
828 typedef typename Kokkos::View<LocalOrdinal*, typename Node::device_type> id_translation_type;
829 id_translation_type rowTranslation(
"dofId2nodeId", rowTranslationArray.
size());
830 id_translation_type colTranslation(
"ov_dofId2nodeId", colTranslationArray.
size());
831 Kokkos::deep_copy(rowTranslation, rowTranslationView);
832 Kokkos::deep_copy(colTranslation, colTranslationView);
835 blkSize = A->GetFixedBlockSize();
838 if (A->IsView(
"stridedMaps") ==
true) {
842 blkSize = Teuchos::as<const LocalOrdinal>(strMap->getFixedBlockSize());
843 blkId = strMap->getStridedBlockId();
845 blkPartSize = Teuchos::as<LocalOrdinal>(strMap->getStridingData()[blkId]);
847 auto kokkosMatrix = A->getLocalMatrixDevice();
851 typedef typename kokkos_graph_type::row_map_type row_map_type;
853 typedef typename kokkos_graph_type::entries_type entries_type;
856 typename row_map_type::non_const_type dofNnz(
"nnz_map", numNodes + 1);
859 Kokkos::parallel_reduce(
"MueLu:CoalesceDropF:Build:scalar_filter:stage1a",
range_type(0, numNodes), stage1aFunctor, numDofCols);
862 Kokkos::parallel_scan(
"MueLu:CoalesceDropF:Build:scalar_filter:stage1_scan",
range_type(0, numNodes + 1), scanFunctor);
867 typename entries_type::non_const_type dofcols(
"dofcols", numDofCols );
871 typename row_map_type::non_const_type
rows(
"nnz_nodemap", numNodes + 1);
872 typename boundary_nodes_type::non_const_type bndNodes(
"boundaryNodes", numNodes);
874 CoalesceDrop_Kokkos_Details::Stage1bcVectorFunctor<decltype(kokkosMatrix), decltype(dofNnz), decltype(blkPartSize), decltype(dofcols), decltype(colTranslation), decltype(singleEntryRows), decltype(bndNodes), bool> stage1bcFunctor(kokkosMatrix, dofNnz, blkPartSize, dofcols, colTranslation, rows, singleEntryRows, bndNodes, pL.get<
bool>(
"aggregation: greedy Dirichlet"));
875 Kokkos::parallel_reduce(
"MueLu:CoalesceDropF:Build:scalar_filter:stage1c",
range_type(0, numNodes), stage1bcFunctor, numNodeCols);
879 Kokkos::parallel_scan(
"MueLu:CoalesceDropF:Build:scalar_filter:stage1_scan",
range_type(0, numNodes + 1), scanNodeFunctor);
882 typename entries_type::non_const_type cols(
"nodecols", numNodeCols);
885 Kokkos::parallel_for(
"MueLu:CoalesceDropF:Build:scalar_filter:stage1c",
range_type(0, numNodes), stage1dFunctor);
886 kokkos_graph_type kokkosGraph(cols, rows);
889 graph =
rcp(
new LWGraph_kokkos(kokkosGraph, uniqueMap, nonUniqueMap,
"amalgamated graph of A"));
891 boundaryNodes = bndNodes;
893 numTotal = A->getLocalNumEntries();
895 dofsPerNode = blkSize;
904 GO numLocalBoundaryNodes = 0;
905 GO numGlobalBoundaryNodes = 0;
907 Kokkos::parallel_reduce(
908 "MueLu:CoalesceDropF:Build:bnd",
range_type(0, boundaryNodes.extent(0)),
909 KOKKOS_LAMBDA(
const LO i,
GO& n) {
910 if (boundaryNodes(i))
913 numLocalBoundaryNodes);
915 auto comm = A->getRowMap()->getComm();
916 MueLu_sumAll(comm, numLocalBoundaryNodes, numGlobalBoundaryNodes);
917 GetOStream(
Statistics1) <<
"Detected " << numGlobalBoundaryNodes <<
" Dirichlet nodes" << std::endl;
920 if ((GetVerbLevel() &
Statistics1) && threshold != zero) {
921 auto comm = A->getRowMap()->getComm();
923 GO numGlobalTotal, numGlobalDropped;
927 if (numGlobalTotal != 0) {
928 GetOStream(
Statistics1) <<
"Number of dropped entries: "
929 << numGlobalDropped <<
"/" << numGlobalTotal
930 <<
" (" << 100 * Teuchos::as<double>(numGlobalDropped) / Teuchos::as<double>(numGlobalTotal) <<
"%)" << std::endl;
934 Set(currentLevel,
"DofsPerNode", dofsPerNode);
935 Set(currentLevel,
"Graph", graph);
936 Set(currentLevel,
"A", filteredA);
939 #endif // MUELU_COALESCEDROPFACTORY_KOKKOS_DEF_HPP
bool aggregationMayCreateDirichlet
Dof2NodeTranslationType dof2node
KOKKOS_INLINE_FUNCTION void operator()(const LO rowNode) const
#define MueLu_sumAll(rcpComm, in, out)
MueLu::DefaultLocalOrdinal LocalOrdinal
DropFunctorType dropFunctor
KOKKOS_INLINE_FUNCTION void operator()(const LO row, LO &nnz) const
Lightweight MueLu representation of a compressed row storage graph.
Stage1dVectorFunctor(ColDofType coldofs_, ColDofNnzType coldofnnz_, ColNodeType colnodes_, ColNodeNnzType colnodennz_)
ScalarFunctor(MatrixType A_, BndViewType bndNodes_, DropFunctorType dropFunctor_, typename rows_type::non_const_type rows_, typename cols_type::non_const_type colsAux_, typename vals_type::non_const_type valsAux_, bool reuseGraph_, bool lumping_, SC, bool aggregationMayCreateDirichlet_)
KOKKOS_INLINE_FUNCTION void SetBoundaryNodeMap(const boundary_nodes_type bndry)
Set boolean array indicating which rows correspond to Dirichlet boundaries.
graph_type::entries_type cols_type
Stage1aVectorFunctor(MatrixType kokkosMatrix_, NnzType nnz_, blkSizeType blkSize_)
BdryNodeTypeConst dirichletdof
ATS::val_type impl_Scalar
typename std::conditional< OnHost, typename local_graph_device_type::HostMirror, local_graph_device_type >::type local_graph_type
void setValidator(RCP< const ParameterEntryValidator > const &validator)
MatrixType::value_type SC
T & get(const std::string &name, T def_value)
KOKKOS_FORCEINLINE_FUNCTION bool operator()(LO row, LO col, SC val) const
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
ClassicalDropFunctor(GhostedViewType ghostedDiag, magnitudeType threshold)
graph_type::row_map_type rows_type
KOKKOS_INLINE_FUNCTION magnitudeType distance2(LO row, LO col) const
One-liner description of what is happening.
ScanFunctor(RowType rows_)
KOKKOS_INLINE_FUNCTION void operator()(const LO i, LO &upd, const bool &final) const
GhostedViewType::value_type SC
Kokkos::View< bool *, memory_space > boundary_nodes_type
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
ATS::magnitudeType magnitudeType
Class that holds all level-specific information.
KOKKOS_INLINE_FUNCTION bool operator()(LO row, LO col, SC) const
MatrixType::ordinal_type LO
Timer to be used in factories. Similar to SubMonitor but adds a timer level by level.
DistanceLaplacianDropFunctor(GhostedViewType ghostedLaplDiag, DistanceFunctor distFunctor_, magnitudeType threshold)
GhostedViewType::value_type SC
void DeclareInput(Level ¤tLevel) const
Input.
KOKKOS_INLINE_FUNCTION void operator()(const LO row, LO &totalnnz) const
DistanceFunctor distFunctor
Kokkos::ArithTraits< SC > ATS
Stage1bcVectorFunctor(MatrixType kokkosMatrix_, NnzType coldofnnz_, blkSizeType blkSize_, ColDofType coldofs_, Dof2NodeTranslationType dof2node_, NnzType colnodennz_, BdryNodeTypeConst dirichletdof_, BdryNodeType bdrynode_, boolType usegreedydirichlet_)
static RCP< Vector > GetMatrixOverlappedDiagonal(const Matrix &A)
Extract Overlapped Matrix Diagonal.
ATS::magnitudeType magnitudeType
Kokkos::RangePolicy< local_ordinal_type, execution_space > range_type
MatrixType::StaticCrsGraphType graph_type
vals_type::non_const_type valsAux
boolType usegreedydirichlet
MatrixType::ordinal_type LO
Kokkos::ArithTraits< SC > ATS
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void Build(Level ¤tLevel) const
Build an object with this factory.
MatrixType::values_type vals_type
#define SET_VALID_ENTRY(name)
ATS::magnitudeType magnitudeType
Kokkos::ArithTraits< impl_Scalar > impl_ATS
cols_type::non_const_type colsAux
Exception throws to report errors in the internal logical of the program.
Kokkos::ArithTraits< SC > ATS
Description of what is happening (more verbose)
Kokkos::ArithTraits< SC > ATS
ParameterEntry & getEntry(const std::string &name)
DistanceFunctor(CoordsType coords_)
static Kokkos::View< bool *, typename NO::device_type::memory_space > DetectDirichletRows_kokkos(const Matrix &A, const Magnitude &tol=Teuchos::ScalarTraits< typename Teuchos::ScalarTraits< SC >::magnitudeType >::zero(), const bool count_twos_as_dirichlet=false)
Detect Dirichlet rows.
ATS::magnitudeType magnitudeType
ColNodeNnzType colnodennz
KOKKOS_INLINE_FUNCTION void operator()(const LO rowNode, LO &nnz) const
CoordsType::value_type SC
rows_type::non_const_type rows
MatrixType::ordinal_type LO