10#ifndef MUELU_MAXWELL_UTILS_DECL_HPP
11#define MUELU_MAXWELL_UTILS_DECL_HPP
16#include "Xpetra_Map_fwd.hpp"
17#include "Xpetra_Matrix_fwd.hpp"
18#include "Xpetra_VectorFactory_fwd.hpp"
37#undef MUELU_MAXWELL_UTILS_SHORT
41 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType
magnitudeType;
47 RCP<Matrix>& D0_Matrix,
50 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCrowsKokkos,
51 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCcolsKokkos,
52 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCdomainKokkos,
55 Teuchos::ArrayRCP<bool>& BCrows,
56 Teuchos::ArrayRCP<bool>& BCcols,
57 Teuchos::ArrayRCP<bool>& BCdomain,
58 bool& allEdgesBoundary,
59 bool& allNodesBoundary);
63 RCP<Matrix>& D0_Matrix,
65 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCrowsKokkos,
66 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCcolsKokkos,
67 Kokkos::View<bool*, typename Node::device_type::memory_space>& BCdomainKokkos,
70 bool& allEdgesBoundary,
71 bool& allNodesBoundary);
76 const bool keepDiagonal =
true,
77 const size_t expectedNNZperRow = 0);
80 RCP<Matrix>& D0_Matrix,
81 RCP<Matrix>& SM_Matrix,
82 RCP<Matrix>& M1_Matrix,
83 RCP<Matrix>& Ms_Matrix);
86 RCP<Matrix>& D0_Matrix,
87 RCP<Matrix>& SM_Matrix) {
96 static void setMatvecParams(Matrix& A, RCP<ParameterList> matvecParams);
99 static RCP<Xpetra::Matrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
100 PtAPWrapper(
const RCP<Matrix>& A,
const RCP<Matrix>& P, Teuchos::ParameterList& params,
const std::string& label);
105#define MUELU_MAXWELL_UTILS_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Utility functions for Maxwell.
static void detectBoundaryConditionsSM(RCP< Matrix > &SM_Matrix, RCP< Matrix > &D0_Matrix, magnitudeType rowSumTol, bool useKokkos_, Kokkos::View< bool *, typename Node::device_type::memory_space > &BCrowsKokkos, Kokkos::View< bool *, typename Node::device_type::memory_space > &BCcolsKokkos, Kokkos::View< bool *, typename Node::device_type::memory_space > &BCdomainKokkos, int &BCedges, int &BCnodes, Teuchos::ArrayRCP< bool > &BCrows, Teuchos::ArrayRCP< bool > &BCcols, Teuchos::ArrayRCP< bool > &BCdomain, bool &allEdgesBoundary, bool &allNodesBoundary)
Detect Dirichlet boundary conditions.
static void thresholdedAbs(const RCP< Matrix > &A, const magnitudeType thresholded)
Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
static void removeExplicitZeros(Teuchos::ParameterList ¶meterList, RCP< Matrix > &D0_Matrix, RCP< Matrix > &SM_Matrix)
static RCP< Matrix > removeExplicitZeros(const RCP< Matrix > &A, const magnitudeType tolerance, const bool keepDiagonal=true, const size_t expectedNNZperRow=0)
Remove explicit zeros.
static void setMatvecParams(Matrix &A, RCP< ParameterList > matvecParams)
Sets matvec params on a matrix.
static RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > PtAPWrapper(const RCP< Matrix > &A, const RCP< Matrix > &P, Teuchos::ParameterList ¶ms, const std::string &label)
Performs an P^T AP.
Verbose class for MueLu classes.
Namespace for MueLu classes and methods.