10 #ifndef MUELU_DISTANCELAPLACIANDROPPING_HPP
11 #define MUELU_DISTANCELAPLACIANDROPPING_HPP
13 #include "Kokkos_Macros.hpp"
14 #include "KokkosBatched_LU_Decl.hpp"
15 #include "KokkosBatched_LU_Serial_Impl.hpp"
16 #include "KokkosBatched_Trsv_Decl.hpp"
17 #include "KokkosBatched_Trsv_Serial_Impl.hpp"
19 #include "Kokkos_Core.hpp"
20 #if KOKKOS_VERSION >= 40799
21 #include "KokkosKernels_ArithTraits.hpp"
23 #include "Kokkos_ArithTraits.hpp"
28 #include "Xpetra_MultiVectorFactory.hpp"
30 namespace MueLu::DistanceLaplacian {
36 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
43 #if KOKKOS_VERSION >= 40799
44 using ATS = KokkosKernels::ArithTraits<scalar_type>;
46 using ATS = Kokkos::ArithTraits<scalar_type>;
49 #if KOKKOS_VERSION >= 40799
50 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
52 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
55 #if KOKKOS_VERSION >= 40799
56 using magATS = KokkosKernels::ArithTraits<magnitudeType>;
58 using magATS = Kokkos::ArithTraits<magnitudeType>;
73 if (!importer.is_null()) {
84 KOKKOS_FORCEINLINE_FUNCTION
88 for (
size_t j = 0; j <
coords.extent(1); ++j) {
100 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class weight_type>
107 #if KOKKOS_VERSION >= 40799
108 using ATS = KokkosKernels::ArithTraits<scalar_type>;
110 using ATS = Kokkos::ArithTraits<scalar_type>;
113 #if KOKKOS_VERSION >= 40799
114 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
116 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
119 #if KOKKOS_VERSION >= 40799
120 using magATS = KokkosKernels::ArithTraits<magnitudeType>;
122 using magATS = Kokkos::ArithTraits<magnitudeType>;
139 if (!importer.is_null()) {
152 KOKKOS_FORCEINLINE_FUNCTION
157 for (
size_t j = 0; j <
coords.extent(1); ++j) {
170 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class weight_type>
177 #if KOKKOS_VERSION >= 40799
178 using ATS = KokkosKernels::ArithTraits<scalar_type>;
180 using ATS = Kokkos::ArithTraits<scalar_type>;
183 #if KOKKOS_VERSION >= 40799
184 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
186 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
189 #if KOKKOS_VERSION >= 40799
190 using magATS = KokkosKernels::ArithTraits<magnitudeType>;
192 using magATS = Kokkos::ArithTraits<magnitudeType>;
210 if (!importer.is_null()) {
224 KOKKOS_FORCEINLINE_FUNCTION
231 for (
size_t j = 0; j <
coords.extent(1); ++j) {
233 w =
weight(block_start + j);
240 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
247 #if KOKKOS_VERSION >= 40799
248 using ATS = KokkosKernels::ArithTraits<scalar_type>;
250 using ATS = Kokkos::ArithTraits<scalar_type>;
253 #if KOKKOS_VERSION >= 40799
254 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
256 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
259 #if KOKKOS_VERSION >= 40799
260 using magATS = KokkosKernels::ArithTraits<magnitudeType>;
262 using magATS = Kokkos::ArithTraits<magnitudeType>;
286 if (!importer.is_null()) {
305 KOKKOS_INLINE_FUNCTION
315 for (
size_t j = 0; j <
coords.extent(1); ++j) {
323 return Kokkos::max(d_row, d_col);
327 template <
class local_ordinal_type,
class material_vector_type,
class material_matrix_type>
334 TensorInversion(material_vector_type& material_vector_, material_matrix_type& material_matrix_)
338 KOKKOS_FORCEINLINE_FUNCTION
345 auto matrix_material = Kokkos::subview(
material_matrix, i, Kokkos::ALL(), Kokkos::ALL());
346 KokkosBatched::SerialLU<KokkosBatched::Algo::LU::Unblocked>::invoke(matrix_material);
350 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
357 #if KOKKOS_VERSION >= 40799
358 using ATS = KokkosKernels::ArithTraits<scalar_type>;
360 using ATS = Kokkos::ArithTraits<scalar_type>;
363 #if KOKKOS_VERSION >= 40799
364 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
366 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
369 #if KOKKOS_VERSION >= 40799
370 using magATS = KokkosKernels::ArithTraits<magnitudeType>;
372 using magATS = Kokkos::ArithTraits<magnitudeType>;
399 if (!importer.is_null()) {
411 if (!importer.is_null()) {
415 ghostedMaterial = material_;
418 using execution_space =
typename Node::execution_space;
419 using range_type = Kokkos::RangePolicy<LocalOrdinal, execution_space>;
422 auto lclMaterial = ghostedMaterial->getLocalViewDevice(Xpetra::Access::ReadOnly);
426 Kokkos::parallel_for(
"MueLu:TensorMaterialDistanceFunctor::inversion", range_type(0, lclMaterial.extent(0)), functor);
430 KOKKOS_INLINE_FUNCTION
439 auto matrix_row_material = Kokkos::subview(
material, row, Kokkos::ALL(), Kokkos::ALL());
440 auto dist = Kokkos::subview(
lcl_dist, row, Kokkos::ALL());
442 for (
size_t j = 0; j <
coords.extent(1); ++j) {
446 KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Lower, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::Unit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(
one, matrix_row_material, dist);
447 KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Upper, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::NonUnit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(
one, matrix_row_material, dist);
449 for (
size_t j = 0; j <
coords.extent(1); ++j) {
457 auto matrix_col_material = Kokkos::subview(
material, col, Kokkos::ALL(), Kokkos::ALL());
458 auto dist = Kokkos::subview(
lcl_dist, row, Kokkos::ALL());
460 for (
size_t j = 0; j <
coords.extent(1); ++j) {
464 KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Lower, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::Unit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(
one, matrix_col_material, dist);
465 KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Upper, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::NonUnit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(
one, matrix_col_material, dist);
467 for (
size_t j = 0; j <
coords.extent(1); ++j) {
472 return Kokkos::max(implATS::magnitude(d_row), implATS::magnitude(d_col));
479 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType>
482 DistanceFunctorType& distFunctor) {
483 using scalar_type =
Scalar;
485 #if KOKKOS_VERSION >= 40799
486 using ATS = KokkosKernels::ArithTraits<scalar_type>;
488 using ATS = Kokkos::ArithTraits<scalar_type>;
490 using impl_scalar_type =
typename ATS::val_type;
491 #if KOKKOS_VERSION >= 40799
492 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
494 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
496 using magnitudeType =
typename implATS::magnitudeType;
497 using execution_space =
typename Node::execution_space;
498 using range_type = Kokkos::RangePolicy<LocalOrdinal, execution_space>;
502 auto lclA = A.getLocalMatrixDevice();
503 auto lclDiag = diag->getLocalViewDevice(Xpetra::Access::OverwriteAll);
505 Kokkos::parallel_for(
506 "MueLu:CoalesceDropF:Build:scalar_filter:laplacian_diag",
507 range_type(0, lclA.numRows()),
508 KOKKOS_LAMBDA(
const local_ordinal_type& row) {
509 auto rowView = lclA.rowConst(row);
510 auto length = rowView.length;
513 impl_scalar_type d2 = implATS::zero();
514 bool haveAddedToDiag =
false;
515 for (local_ordinal_type colID = 0; colID < length; colID++) {
516 auto col = rowView.colidx(colID);
518 d = distFunctor.distance2(row, col);
519 d2 += implATS::one() / d;
520 haveAddedToDiag =
true;
526 lclDiag(row, 0) = !haveAddedToDiag ? implATS::squareroot(implATS::rmax()) : d2;
530 if (!importer.is_null()) {
539 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType>
542 DistanceFunctorType& distFunctor) {
543 using scalar_type =
Scalar;
545 #if KOKKOS_VERSION >= 40799
546 using ATS = KokkosKernels::ArithTraits<scalar_type>;
548 using ATS = Kokkos::ArithTraits<scalar_type>;
550 using impl_scalar_type =
typename ATS::val_type;
551 #if KOKKOS_VERSION >= 40799
552 using implATS = KokkosKernels::ArithTraits<impl_scalar_type>;
554 using implATS = Kokkos::ArithTraits<impl_scalar_type>;
556 using magnitudeType =
typename implATS::magnitudeType;
557 using execution_space =
typename Node::execution_space;
558 using range_type = Kokkos::RangePolicy<LocalOrdinal, execution_space>;
562 auto lclA = A.getLocalMatrixDevice();
563 auto lclDiag = diag->getLocalViewDevice(Xpetra::Access::OverwriteAll);
565 Kokkos::parallel_for(
566 "MueLu:CoalesceDropF:Build:scalar_filter:laplacian_diag",
567 range_type(0, lclA.numRows()),
568 KOKKOS_LAMBDA(
const local_ordinal_type& row) {
569 auto rowView = lclA.rowConst(row);
570 auto length = rowView.length;
572 impl_scalar_type mymax = implATS::zero();
575 for (local_ordinal_type colID = 0; colID < length; colID++) {
576 auto col = rowView.colidx(colID);
578 d = distFunctor.distance2(row, col);
579 d2 = implATS::one() / d;
580 if (implATS::magnitude(mymax) < implATS::magnitude(d2))
581 mymax = implATS::magnitude(d2);
584 lclDiag(row, 0) = mymax;
588 if (!importer.is_null()) {
607 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType, Misc::StrengthMeasure measure>
616 using diag_view_type =
typename Kokkos::DualView<const scalar_type*, Kokkos::LayoutStride, typename Node::device_type, Kokkos::MemoryUnmanaged>::t_dev;
620 #if KOKKOS_VERSION >= 40799
621 using ATS = KokkosKernels::ArithTraits<scalar_type>;
623 using ATS = Kokkos::ArithTraits<scalar_type>;
627 #if KOKKOS_VERSION >= 40799
628 using mATS = KokkosKernels::ArithTraits<magnitudeType>;
630 using mATS = Kokkos::ArithTraits<magnitudeType>;
644 :
A(A_.getLocalMatrixDevice())
650 auto lclDiag2d =
diagVec->getLocalViewDevice(Xpetra::Access::ReadOnly);
651 diag = Kokkos::subview(lclDiag2d, Kokkos::ALL(), 0);
654 auto lclDiag2d =
diagVec->getLocalViewDevice(Xpetra::Access::ReadOnly);
655 diag = Kokkos::subview(lclDiag2d, Kokkos::ALL(), 0);
659 KOKKOS_FORCEINLINE_FUNCTION
661 auto row =
A.rowConst(rlid);
662 const size_t offset =
A.graph.row_map(rlid);
664 #ifdef MUELU_COALESCE_DROP_DEBUG
666 Kokkos::printf(
"SoC: ");
668 auto clid = row.colidx(k);
672 val = -
one /
dist2.distance2(rlid, clid);
678 auto aiiajj = ATS::magnitude(
diag(rlid)) * ATS::magnitude(
diag(clid));
679 auto aij2 = ATS::magnitude(val) * ATS::magnitude(val);
681 Kokkos::printf(
"%5f ", ATS::sqrt(aij2 / aiiajj));
683 auto neg_aij = -ATS::real(val);
684 auto max_neg_aik = ATS::real(
diag(rlid));
685 Kokkos::printf(
"%5f ", neg_aij / max_neg_aik);
687 auto aiiajj = ATS::magnitude(
diag(rlid)) * ATS::magnitude(
diag(clid));
688 const bool is_nonpositive = ATS::real(val) <= mATS::zero();
689 magnitudeType aij2 = ATS::magnitude(val) * ATS::magnitude(val);
693 Kokkos::printf(
"%5f ", ATS::sqrt(aij2 / aiiajj));
696 Kokkos::printf(
"\n");
701 auto clid = row.colidx(k);
705 val = -
one /
dist2.distance2(rlid, clid);
711 auto aiiajj = ATS::magnitude(
diag(rlid)) * ATS::magnitude(
diag(clid));
712 auto aij2 = ATS::magnitude(val) * ATS::magnitude(val);
717 auto neg_aij = -ATS::real(val);
718 auto max_neg_aik =
eps * ATS::real(
diag(rlid));
719 results(offset + k) = Kokkos::max((neg_aij < max_neg_aik) ?
DROP :
KEEP,
722 auto aiiajj = ATS::magnitude(
diag(rlid)) * ATS::magnitude(
diag(clid));
723 const bool is_nonpositive = ATS::real(val) <= mATS::zero();
724 magnitudeType aij2 = ATS::magnitude(val) * ATS::magnitude(val);
735 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType, Misc::StrengthMeasure measure>
745 using diag_view_type =
typename Kokkos::DualView<const scalar_type*, Kokkos::LayoutStride, typename Node::device_type, Kokkos::MemoryUnmanaged>::t_dev;
749 #if KOKKOS_VERSION >= 40799
750 using ATS = KokkosKernels::ArithTraits<scalar_type>;
752 using ATS = Kokkos::ArithTraits<scalar_type>;
756 #if KOKKOS_VERSION >= 40799
757 using mATS = KokkosKernels::ArithTraits<magnitudeType>;
759 using mATS = Kokkos::ArithTraits<magnitudeType>;
775 :
A(A_.getLocalMatrixDevice())
783 auto lclDiag2d =
diagVec->getLocalViewDevice(Xpetra::Access::ReadOnly);
784 diag = Kokkos::subview(lclDiag2d, Kokkos::ALL(), 0);
787 auto lclDiag2d =
diagVec->getLocalViewDevice(Xpetra::Access::ReadOnly);
788 diag = Kokkos::subview(lclDiag2d, Kokkos::ALL(), 0);
792 KOKKOS_FORCEINLINE_FUNCTION
795 auto row =
A.rowConst(rlid);
796 const size_t offset =
A.graph.row_map(rlid);
798 #ifdef MUELU_COALESCE_DROP_DEBUG
800 Kokkos::printf(
"SoC: ");
802 auto clid = row.colidx(k);
806 if (brlid != bclid) {
807 val = -
one /
dist2.distance2(brlid, bclid);
813 auto aiiajj = ATS::magnitude(
diag(brlid)) * ATS::magnitude(
diag(bclid));
814 auto aij2 = ATS::magnitude(val) * ATS::magnitude(val);
816 Kokkos::printf(
"%5f ", ATS::sqrt(aij2 / aiiajj));
818 auto neg_aij = -ATS::real(val);
819 auto max_neg_aik =
eps * ATS::real(
diag(brlid));
820 Kokkos::printf(
"%5f ", neg_aij / max_neg_aik);
822 auto aiiajj = ATS::magnitude(
diag(brlid)) * ATS::magnitude(
diag(bclid));
823 const bool is_nonpositive = ATS::real(val) <= mATS::zero();
824 magnitudeType aij2 = ATS::magnitude(val) * ATS::magnitude(val);
828 Kokkos::printf(
"%5f ", ATS::sqrt(aij2 / aiiajj));
831 Kokkos::printf(
"\n");
836 auto clid = row.colidx(k);
840 if (brlid != bclid) {
841 val = -
one /
dist2.distance2(brlid, bclid);
847 auto aiiajj = ATS::magnitude(
diag(brlid)) * ATS::magnitude(
diag(bclid));
848 auto aij2 = ATS::magnitude(val) * ATS::magnitude(val);
853 auto neg_aij = -ATS::real(val);
854 auto max_neg_aik =
eps * ATS::real(
diag(brlid));
855 results(offset + k) = Kokkos::max((neg_aij < max_neg_aik) ?
DROP :
KEEP,
858 auto aiiajj = ATS::magnitude(
diag(brlid)) * ATS::magnitude(
diag(bclid));
859 const bool is_nonpositive = ATS::real(val) <= mATS::zero();
860 magnitudeType aij2 = ATS::magnitude(val) * ATS::magnitude(val);
872 template <Misc::StrengthMeasure measure,
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType>
875 DistanceFunctorType& dist2_,
881 template <Misc::StrengthMeasure measure,
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node,
class DistanceFunctorType>
885 DistanceFunctorType& dist2_,
889 auto functor =
VectorDropFunctor<Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure>(A_, mergedA_, threshold, dist2_, results_, point_to_block_, ghosted_point_to_block_);
Drops entries the unscaled distance Laplacian.
typename matrix_type::local_matrix_type local_matrix_type
typename matrix_type::local_matrix_type local_matrix_type
local_coords_type ghostedCoords
typename material_type::dual_view_type_const::t_dev local_material_type
WeightedDistanceFunctor(matrix_type &A, Teuchos::RCP< coords_type > &coords_, weight_type weight_)
MueLu::DefaultLocalOrdinal LocalOrdinal
UnweightedDistanceFunctor(matrix_type &A, Teuchos::RCP< coords_type > &coords_)
Teuchos::RCP< coords_type > coordsMV
material_vector_type material_vector
Teuchos::RCP< material_type > materialMV
local_coords_type ghostedCoords
Kokkos::View< local_ordinal_type *, memory_space > block_indices_view_type
static Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &map, size_t NumVectors, bool zeroOut=true)
typename coords_type::dual_view_type_const::t_dev local_coords_type
Kokkos::ArithTraits< magnitudeType > magATS
typename local_matrix_type::memory_space memory_space
Kokkos::ArithTraits< scalar_type > ATS
Kokkos::ArithTraits< scalar_type > ATS
typename Kokkos::DualView< const scalar_type *, Kokkos::LayoutStride, typename Node::device_type, Kokkos::MemoryUnmanaged >::t_dev diag_view_type
Kokkos::ArithTraits< scalar_type > ATS
typename local_matrix_type::memory_space memory_space
typename ATS::val_type impl_scalar_type
typename coords_type::dual_view_type_const::t_dev local_coords_type
typename ATS::val_type impl_scalar_type
KOKKOS_INLINE_FUNCTION magnitudeType distance2(const local_ordinal_type row, const local_ordinal_type col) const
typename local_matrix_type::value_type scalar_type
typename implATS::magnitudeType magnitudeType
KOKKOS_INLINE_FUNCTION magnitudeType distance2(const local_ordinal_type row, const local_ordinal_type col) const
Teuchos::RCP< material_type > ghostedMaterialMV
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getMaxMinusOffDiagonal(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, DistanceFunctorType &distFunctor)
Kokkos::View< DecisionType *, memory_space > results_view
Teuchos::RCP< coords_type > ghostedCoordsMV
typename implATS::magnitudeType magnitudeType
local_material_type ghostedMaterial
BlockWeightedDistanceFunctor(matrix_type &A, Teuchos::RCP< coords_type > &coords_, weight_type weight_, local_ordinal_type interleaved_blocksize_)
Teuchos::RCP< coords_type > coordsMV
typename local_matrix_type::ordinal_type local_ordinal_type
typename matrix_type::local_matrix_type local_matrix_type
Kokkos::View< const bool *, memory_space > boundary_nodes_view
DropFunctor(matrix_type &A_, magnitudeType threshold, DistanceFunctorType &dist2_, results_view &results_)
virtual void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0
LocalOrdinal local_ordinal_type
Kokkos::ArithTraits< impl_scalar_type > implATS
Teuchos::RCP< coords_type > coordsMV
Teuchos::RCP< coords_type > coordsMV
Kokkos::ArithTraits< magnitudeType > magATS
Teuchos::RCP< coords_type > ghostedCoordsMV
TensorMaterialDistanceFunctor(matrix_type &A, Teuchos::RCP< coords_type > &coords_, Teuchos::RCP< material_type > &material_)
typename local_matrix_type::value_type scalar_type
KOKKOS_FORCEINLINE_FUNCTION void operator()(local_ordinal_type rlid) const
local_coords_type ghostedCoords
local_material_type material
Kokkos::View< DecisionType *, memory_space > results_view
Kokkos::ArithTraits< magnitudeType > magATS
MueLu::DefaultScalar Scalar
Kokkos::ArithTraits< impl_scalar_type > implATS
LocalOrdinal local_ordinal_type
typename local_matrix_type::value_type scalar_type
TensorInversion(material_vector_type &material_vector_, material_matrix_type &material_matrix_)
typename ATS::val_type impl_scalar_type
local_ordinal_type interleaved_blocksize
typename local_matrix_type::value_type scalar_type
block_indices_view_type point_to_block
typename Kokkos::DualView< const scalar_type *, Kokkos::LayoutStride, typename Node::device_type, Kokkos::MemoryUnmanaged >::t_dev diag_view_type
block_indices_view_type ghosted_point_to_block
Kokkos::ArithTraits< magnitudeType > mATS
typename matrix_type::local_matrix_type local_matrix_type
typename ATS::magnitudeType magnitudeType
typename coords_type::dual_view_type_const::t_dev local_coords_type
auto make_drop_functor(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A_, typename DropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::magnitudeType threshold, DistanceFunctorType &dist2_, typename DropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::results_view &results_)
typename implATS::magnitudeType magnitudeType
typename local_matrix_type::value_type scalar_type
typename ATS::magnitudeType magnitudeType
ScalarMaterialDistanceFunctor(matrix_type &A, Teuchos::RCP< coords_type > &coords_, Teuchos::RCP< material_type > &material_)
LocalOrdinal local_ordinal_type
typename implATS::magnitudeType magnitudeType
Computes the weighted distance Laplacian.
Kokkos::View< const bool *, memory_space > boundary_nodes_view
typename ATS::val_type impl_scalar_type
KOKKOS_FORCEINLINE_FUNCTION magnitudeType distance2(const local_ordinal_type row, const local_ordinal_type col) const
Kokkos::ArithTraits< impl_scalar_type > implATS
KOKKOS_FORCEINLINE_FUNCTION magnitudeType distance2(const local_ordinal_type row, const local_ordinal_type col) const
Teuchos::RCP< coords_type > ghostedCoordsMV
typename implATS::magnitudeType magnitudeType
Kokkos::ArithTraits< scalar_type > ATS
Computes the weighted distance Laplacian.
Kokkos::ArithTraits< magnitudeType > mATS
Kokkos::View< impl_scalar_type **, memory_space > local_dist_type
virtual RCP< const CrsGraph > getCrsGraph() const =0
local_material_type material
KOKKOS_FORCEINLINE_FUNCTION void operator()(local_ordinal_type rlid) const
DistanceFunctorType dist2
Kokkos::ArithTraits< scalar_type > ATS
Kokkos::ArithTraits< magnitudeType > magATS
typename coords_type::dual_view_type_const::t_dev local_coords_type
VectorDropFunctor(matrix_type &A_, matrix_type &mergedA_, magnitudeType threshold, DistanceFunctorType &dist2_, results_view &results_, block_indices_view_type point_to_block_, block_indices_view_type ghosted_point_to_block_)
typename coords_type::dual_view_type_const::t_dev local_coords_type
typename local_matrix_type::ordinal_type local_ordinal_type
typename ATS::val_type impl_scalar_type
Kokkos::ArithTraits< scalar_type > ATS
Computes the unscaled distance Laplacian.
LocalOrdinal local_ordinal_type
typename matrix_type::local_matrix_type local_matrix_type
local_coords_type ghostedCoords
KOKKOS_FORCEINLINE_FUNCTION void operator()(local_ordinal_type i) const
local_coords_type ghostedCoords
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getDiagonal(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, DistanceFunctorType &distFunctor)
Kokkos::View< impl_scalar_type ***, memory_space > local_material_type
typename local_matrix_type::value_type scalar_type
Teuchos::RCP< coords_type > ghostedCoordsMV
LocalOrdinal local_ordinal_type
DistanceFunctorType dist2
Kokkos::ArithTraits< impl_scalar_type > implATS
Kokkos::ArithTraits< scalar_type > ATS
#define TEUCHOS_ASSERT(assertion_test)
Teuchos::RCP< coords_type > ghostedCoordsMV
Kokkos::ArithTraits< impl_scalar_type > implATS
virtual size_t getNumVectors() const =0
typename local_matrix_type::memory_space memory_space
auto make_vector_drop_functor(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A_, Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &mergedA_, typename VectorDropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::magnitudeType threshold, DistanceFunctorType &dist2_, typename VectorDropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::results_view &results_, typename VectorDropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::block_indices_view_type point_to_block_, typename VectorDropFunctor< Scalar, LocalOrdinal, GlobalOrdinal, Node, DistanceFunctorType, measure >::block_indices_view_type ghosted_point_to_block_)
material_matrix_type material_matrix
Teuchos::RCP< coords_type > coordsMV
typename local_matrix_type::value_type scalar_type
Teuchos::RCP< diag_vec_type > diagVec
Teuchos::RCP< diag_vec_type > diagVec
typename matrix_type::local_matrix_type local_matrix_type
KOKKOS_FORCEINLINE_FUNCTION magnitudeType distance2(const local_ordinal_type row, const local_ordinal_type col) const
typename matrix_type::local_matrix_type local_matrix_type
Kokkos::ArithTraits< magnitudeType > magATS