diff --git a/packages/muelu/CMakeLists.txt b/packages/muelu/CMakeLists.txt index 6f27ca3b36b5..486ede9230c8 100644 --- a/packages/muelu/CMakeLists.txt +++ b/packages/muelu/CMakeLists.txt @@ -8,7 +8,6 @@ TRIBITS_PACKAGE(MueLu ENABLE_SHADOWING_WARNINGS) # B) Set up package-specific options # -ASSERT_DEFINED(Xpetra_ENABLE_Epetra) ASSERT_DEFINED(Xpetra_ENABLE_Tpetra) ASSERT_DEFINED(Xpetra_INT_LONG_LONG) ASSERT_DEFINED(Xpetra_ENABLE_Experimental) @@ -64,32 +63,13 @@ IF (HAVE_${PACKAGE_NAME_UC}_DEPRECATED_TESTS) MESSAGE(STATUS "MueLu: Enabling deprecated tests") ENDIF () -IF (${PACKAGE_NAME}_ENABLE_Epetra AND NOT ${PACKAGE_NAME}_ENABLE_EpetraExt) - MESSAGE(FATAL_ERROR "You have enabled Epetra, but not EpetraExt. MueLu requires that either both are enabled, or both are disabled. Please either disable Epetra, or enable EpetraExt.") -ENDIF() - - -# If you want MueLu Epetra, you need Xpetra Epetra -ASSERT_DEFINED(Xpetra_ENABLE_Epetra) -IF (NOT Xpetra_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Epetra) - MESSAGE(FATAL_ERROR "MueLu Epetra support requires Xpetra Epetra support") -ENDIF() -# If you want MueLu Epetra, you need Xpetra Tpetra ASSERT_DEFINED(Xpetra_ENABLE_Tpetra) IF (NOT Xpetra_ENABLE_Tpetra) MESSAGE(FATAL_ERROR "MueLu Tpetra support requires Xpetra Tpetra support") ENDIF() -# Need to do this because Xpetra_ENABLE_Epetra might have been disabled after -# HAVE_MUELU_EPETRA was first set automatically -GLOBAL_SET(HAVE_${PACKAGE_NAME_UC}_EPETRA ${${PACKAGE_NAME}_ENABLE_Epetra}) - # Print a warning when we might be lacking a coarse solver. -ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_Amesos) -IF (${PACKAGE_NAME}_ENABLE_Epetra AND NOT ${PACKAGE_NAME}_ENABLE_Amesos) - MESSAGE(WARNING "MueLu's Epetra backend is enabled, but Amesos is disabled. This means only iterative coarse solves are available when using Epetra.") -ENDIF () ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_Amesos2) IF (NOT ${PACKAGE_NAME}_ENABLE_Amesos2) MESSAGE(WARNING "MueLu's Amesos2 backend is disabled. This means only iterative coarse solves are available when using Tpetra.") @@ -215,7 +195,6 @@ IF(${PACKAGE_NAME}_ENABLE_EXPLICIT_INSTANTIATION) GLOBAL_SET(${PACKAGE_NAME}_HAVE_GO_LONG_LONG OFF) # - # Examples and tests need at least this one, also if Epetra is enabled IF(Tpetra_INST_DOUBLE AND Tpetra_INST_INT_INT) GLOBAL_SET(${PACKAGE_NAME}_HAVE_GO_INT ON) GLOBAL_SET(${PACKAGE_NAME}_INST_DOUBLE_INT_INT ON) @@ -231,12 +210,6 @@ IF(${PACKAGE_NAME}_ENABLE_EXPLICIT_INSTANTIATION) # ENDIF() #ENDIF() - #IF(${PACKAGE_NAME}_ENABLE_Epetra) - # IF (NOT ${PACKAGE_NAME}_INST_DOUBLE_INT_INT) - # MESSAGE(FATAL_ERROR "Error: MueLu needs explicit template instantation with when enabling Epetra. Turn on the options Tpetra_INST_DOUBLE and Tpetra_INST_INT_INT or disable Epetra.") - # ENDIF() - #ENDIF() - # IF(Tpetra_INST_DOUBLE AND Tpetra_INST_INT_LONG) GLOBAL_SET(${PACKAGE_NAME}_HAVE_GO_LONG ON) @@ -328,10 +301,6 @@ IF(${PACKAGE_NAME}_ENABLE_EXPLICIT_INSTANTIATION) GLOBAL_SET (HAVE_${PACKAGE_NAME_UC}_CUDA ${Tpetra_INST_CUDA}) GLOBAL_SET (HAVE_${PACKAGE_NAME_UC}_HIP ${Tpetra_INST_HIP}) GLOBAL_SET (HAVE_${PACKAGE_NAME_UC}_SYCL ${Tpetra_INST_SYCL}) - IF (${PACKAGE_NAME}_ENABLE_Epetra) - # If Epetra is active, always activate SerialNode - GLOBAL_SET (HAVE_${PACKAGE_NAME_UC}_SERIAL ON) - ENDIF () MESSAGE(STATUS " HAVE_${PACKAGE_NAME_UC}_SERIAL : ${HAVE_${PACKAGE_NAME_UC}_SERIAL}") MESSAGE(STATUS " HAVE_${PACKAGE_NAME_UC}_OPENMP : ${HAVE_${PACKAGE_NAME_UC}_OPENMP}") MESSAGE(STATUS " HAVE_${PACKAGE_NAME_UC}_CUDA : ${HAVE_${PACKAGE_NAME_UC}_CUDA}") @@ -350,14 +319,6 @@ ELSE() GLOBAL_SET(${PACKAGE_NAME}_INST_FLOAT_INT_LONG_LONG OFF) GLOBAL_SET(HAVE_${PACKAGE_NAME_UC}_INST_FLOAT_INT_LONG_LONG OFF) - # If Epetra only is enabled, ETI is off by default. We have to make sure that - # the HAVE_MUELU_SERIAL variable is set such that the IfpackSmoother and other - # purely Epetra-related routines are enabled properly - IF (${PACKAGE_NAME}_ENABLE_Epetra) - # If Epetra only is active, only activate SerialNode by default - GLOBAL_SET (HAVE_${PACKAGE_NAME_UC}_SERIAL ON) - ENDIF() - # With ETI off, free to leave int as the default GO ENDIF() @@ -425,10 +386,6 @@ if(TPL_ENABLE_MATLAB) IF (NOT ${PROJECT_NAME}_ENABLE_EXPLICIT_INSTANTIATION) MESSAGE(FATAL_ERROR "Muemex interfaces require \"-D${PROJECT_NAME}_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON\".") ENDIF() - - IF(NOT ${PACKAGE_NAME}_ENABLE_Epetra) - MESSAGE(FATAL_ERROR "Muemex interfaces require \"-D${PACKAGE_NAME}_ENABLE_Epetra:BOOL=ON\".") - ENDIF() ENDIF() if(TPL_ENABLE_MATLAB) diff --git a/packages/muelu/adapters/CMakeLists.txt b/packages/muelu/adapters/CMakeLists.txt index f6498df28a69..cf3310179747 100644 --- a/packages/muelu/adapters/CMakeLists.txt +++ b/packages/muelu/adapters/CMakeLists.txt @@ -27,28 +27,6 @@ IF (${PACKAGE_NAME}_ENABLE_Belos) ENDIF() -# -# Epetra -# -IF (${PACKAGE_NAME}_ENABLE_Epetra) - - TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/epetra) - TRIBITS_SET_AND_INC_DIRS(DIR ${CMAKE_CURRENT_SOURCE_DIR}/aztecoo) - - APPEND_SET(HEADERS - epetra/MueLu_EpetraOperator.hpp - epetra/MueLu_CreateEpetraPreconditioner.hpp - aztecoo/MueLu_AztecEpetraOperator.hpp - ) - - APPEND_SET(SOURCES - epetra/MueLu_EpetraOperator.cpp - epetra/MueLu_CreateEpetraPreconditioner.cpp - aztecoo/MueLu_AztecEpetraOperator.cpp - ) - -ENDIF() - # # Tpetra # diff --git a/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.cpp b/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.cpp deleted file mode 100644 index 261614a84001..000000000000 --- a/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_ -#define PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_ - -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_CrsMatrixWrap.hpp" -#include "Xpetra_EpetraCrsMatrix.hpp" - -#include "MueLu_config.hpp" // for HAVE_MUELU_DEBUG -#include "MueLu_RefMaxwell.hpp" -#include "MueLu_Exceptions.hpp" - -#include "MueLu_AztecEpetraOperator.hpp" - -#if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA) - -namespace MueLu { - -int AztecEpetraOperator::ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const { - try { - // There is no rcpFromRef(const T&), so we need to do const_cast - const Xpetra::EpetraMultiVectorT eX(Teuchos::rcpFromRef(const_cast(X))); - Xpetra::EpetraMultiVectorT eY(Teuchos::rcpFromRef(Y)); - // Generally, we assume two different vectors, but AztecOO uses a single vector - if (X.Values() == Y.Values()) { - // X and Y point to the same memory, use an additional vector - Teuchos::RCP> tmpY = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(eY.getMap(), eY.getNumVectors())); - tmpY->putScalar(0.0); - xOp_->apply(eX, *tmpY); - // deep copy solution from MueLu - eY.update(1.0, *tmpY, 0.0); - } else { - // X and Y point to different memory, pass the vectors through - eY.putScalar(0.0); - xOp_->apply(eX, eY); - } - - } catch (std::exception& e) { - // TODO: error msg directly on std::cerr? - std::cerr << "Caught an exception in MueLu::AztecEpetraOperator::ApplyInverse():" << std::endl - << e.what() << std::endl; - return -1; - } - return 0; -} - -const Epetra_Comm& AztecEpetraOperator::Comm() const { - const Epetra_Map emap = Xpetra::toEpetra(xOp_->getDomainMap()); - return emap.Comm(); -} - -const Epetra_Map& AztecEpetraOperator::OperatorDomainMap() const { - if (Teuchos::rcp_dynamic_cast>(xOp_) != Teuchos::null) { - RCP> A = Teuchos::rcp_dynamic_cast>(xOp_)->getJacobian(); - RCP> crsOp = rcp_dynamic_cast>(A); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->DomainMap(); - } - - // TAW there is a problem with the Map version of toEeptra leading to code crashes - // we probably need to create a new copy of the Epetra_Map - Teuchos::RCP map = xOp_->getDomainMap(); - return Xpetra::toEpetra(map); -} - -const Epetra_Map& AztecEpetraOperator::OperatorRangeMap() const { - if (Teuchos::rcp_dynamic_cast>(xOp_) != Teuchos::null) { - RCP> A = Teuchos::rcp_dynamic_cast>(xOp_)->getJacobian(); - RCP> crsOp = rcp_dynamic_cast>(A); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->RangeMap(); - } - - // TAW there is a problem with the Map version of toEeptra leading to code crashes - // we probably need to create a new copy of the Epetra_Map - Teuchos::RCP map = xOp_->getRangeMap(); - return Xpetra::toEpetra(map); -} - -} // namespace MueLu - -#endif /*#if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA)*/ - -#endif /* PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_CPP_ */ diff --git a/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.hpp b/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.hpp deleted file mode 100644 index 30b73fc9dca5..000000000000 --- a/packages/muelu/adapters/aztecoo/MueLu_AztecEpetraOperator.hpp +++ /dev/null @@ -1,128 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_HPP_ -#define PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_HPP_ - -#include - -#include "Xpetra_Operator.hpp" - -#if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA) - -namespace MueLu { - -/*! @class AztecEpetraOperator - @brief Turns a Xpetra::Operator into a Epetra_Operator. - It allows an Xpetra::Operator to be used as a preconditioner for AztecOO (for instance). - - Currently only used for RefMaxwell. -*/ -class AztecEpetraOperator : public Epetra_Operator { - typedef double SC; - typedef int LO; - typedef int GO; - typedef Xpetra::EpetraNode NO; - - typedef Xpetra::Map Map; - typedef Xpetra::EpetraMapT EpetraMap; - typedef Xpetra::Operator Operator; - - public: - //! @name Constructor/Destructor - //@{ - - //! Constructor - AztecEpetraOperator(const Teuchos::RCP& Op) - : xOp_(Op) {} - - //! Destructor. - virtual ~AztecEpetraOperator() {} - - //@} - - int SetUseTranspose(bool /* UseTransposeBool */) { return -1; } - - //! @name Mathematical functions - //@{ - - //! Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y. - /*! - \param In - X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix. - \param Out - Y -A Epetra_MultiVector of dimension NumVectors containing result. - - \return Integer error code, set to 0 if successful. - */ - int Apply(const Epetra_MultiVector& /* X */, Epetra_MultiVector& /* Y */) const { return -1; } - - //! Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y. - /*! - \param In - X - A Epetra_MultiVector of dimension NumVectors to solve for. - \param Out - Y -A Epetra_MultiVector of dimension NumVectors containing result. - - \return Integer error code, set to 0 if successful. - - \warning In order to work with AztecOO, any implementation of this method must - support the case where X and Y are the same object. - */ - int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const; - - //! Returns the infinity norm of the global matrix. - /* Returns the quantity \f$ \| A \|_\infty\f$ such that - \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f]. - - \warning This method must not be called unless HasNormInf() returns true. - */ - double NormInf() const { return 0; } - //@} - - //! @name Attribute access functions - //@{ - - //! Returns a character string describing the operator - const char* Label() const { return "MueLu::AztecEpetraOperator"; } - - //! Returns the current UseTranspose setting. - bool UseTranspose() const { return false; } - - //! Returns true if the \e this object can provide an approximate Inf-norm, false otherwise. - bool HasNormInf() const { return 0; } - - //! Returns a pointer to the Epetra_Comm communicator associated with this operator. - const Epetra_Comm& Comm() const; - - //! Returns the Epetra_Map object associated with the domain of this operator. - const Epetra_Map& OperatorDomainMap() const; - - //! Returns the Epetra_Map object associated with the range of this operator. - const Epetra_Map& OperatorRangeMap() const; - - //@} - - //! @name MueLu specific - //@{ - - //! Direct access to the underlying Xpetra::Operator. - Teuchos::RCP GetOperator() const { return xOp_; } - - //@} - - private: - Teuchos::RCP xOp_; -}; - -} // namespace MueLu - -#endif - -#endif /* PACKAGES_MUELU_ADAPTERS_AZTECOO_MUELU_AZTECEPETRAOPERATOR_HPP_ */ diff --git a/packages/muelu/adapters/belos/BelosMueLuAdapter.hpp b/packages/muelu/adapters/belos/BelosMueLuAdapter.hpp index 44b1d3b18161..79ee28d0c2a4 100644 --- a/packages/muelu/adapters/belos/BelosMueLuAdapter.hpp +++ b/packages/muelu/adapters/belos/BelosMueLuAdapter.hpp @@ -12,10 +12,6 @@ // TAW: 3/4/2016: we use the Xpetra macros // These are available and Xpetra is prerequisite for MueLu -#ifdef HAVE_XPETRA_EPETRA -#include -#include -#endif //#ifdef HAVE_XPETRA_TPETRA //#include "TpetraCore_config.h" @@ -63,10 +59,8 @@ template class MueLuOp : public OperatorT > -#ifdef HAVE_XPETRA_TPETRA , public OperatorT > -#endif { public: //! @name Constructor/Destructor @@ -111,7 +105,6 @@ class MueLuOp : public OperatorTIterate(tX, tY, 1, true); } } -#endif - - private: - RCP > Hierarchy_; -#ifdef HAVE_MUELU_AMGX - RCP > AMGX_; -#endif -}; - -#ifdef HAVE_XPETRA_EPETRA -#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES -/*! @class MueLuOp - * - * @brief MueLuOp derives from Belos::OperatorT and administrates a MueLu::Hierarchy. It implements the apply - * call which represents the effect of the multigrid preconditioner on a given vector. - * Note, in contrast to Belos::XpetraOp this operator has the multigrid hierarchy. - * - * The Belos::OperatorT class is a generalization of the Belos::Operator<> class, which - * deals with any kind of vector (not only Belos::MultiVec as the Belos::Operator<> interface does). - * - * This is the specialization for - */ -template <> -class MueLuOp : public OperatorT > -#ifdef HAVE_XPETRA_TPETRA -// check whether Tpetra is instantiated on double,int,int,EpetraNode -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - , - public OperatorT > -#endif -#endif -#ifdef HAVE_XPETRA_EPETRA - , - public OperatorT, - public Belos::Operator -#endif -{ - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; - - public: - MueLuOp(const RCP >& H) - : Hierarchy_(H) {} -#ifdef HAVE_MUELU_AMGX - MueLuOp(const RCP >& A) - : AMGX_(A) {} -#endif - virtual ~MueLuOp() {} - - void Apply(const Xpetra::MultiVector& x, Xpetra::MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(), but it matters for AMGX - y.putScalar(0.0); - -#ifdef HAVE_MUELU_AMGX - if (!AMGX_.is_null()) { - Tpetra::MultiVector tX = Xpetra::toTpetra(x); - Tpetra::MultiVector tY = Xpetra::toTpetra(y); - - AMGX_->apply(tX, tY); - } -#endif - if (!Hierarchy_.is_null()) - Hierarchy_->Iterate(x, y, 1, true); - } - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - void Apply(const Tpetra::MultiVector& x, Tpetra::MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(), but it matters for AMGX - y.putScalar(0.0); - -#ifdef HAVE_MUELU_AMGX - if (!AMGX_.is_null()) - AMGX_->apply(x, y); -#endif - - if (!Hierarchy_.is_null()) { - Tpetra::MultiVector& temp_x = const_cast&>(x); - - const Xpetra::TpetraMultiVector tX(rcpFromRef(temp_x)); - Xpetra::TpetraMultiVector tY(rcpFromRef(y)); - - tY.putScalar(0.0); - - Hierarchy_->Iterate(tX, tY, 1, true); - } - } -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - // TO SKIP THE TRAIT IMPLEMENTATION OF XPETRA::MULTIVECTOR - /*! \brief This routine takes the Tpetra::MultiVector \c x and applies the operator - to it resulting in the Tpetra::MultiVector \c y, which is returned. - \note It is expected that any problem with applying this operator to \c x will be - indicated by an std::exception being thrown. - */ - void Apply(const Epetra_MultiVector& x, Epetra_MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - Epetra_MultiVector& temp_x = const_cast(x); - - const Xpetra::EpetraMultiVectorT tX(rcpFromRef(temp_x)); - Xpetra::EpetraMultiVectorT tY(rcpFromRef(y)); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(). - tY.putScalar(0.0); - - Hierarchy_->Iterate(tX, tY, 1, true); - } - - /*! \brief This routine takes the Belos::MultiVec \c x and applies the operator - to it resulting in the Belos::MultiVec \c y, which is returned. - \note It is expected that any problem with applying this operator to \c x will be - indicated by an std::exception being thrown. - */ - void Apply(const Belos::MultiVec& x, Belos::MultiVec& y, ETrans trans = NOTRANS) const { - const Epetra_MultiVector* vec_x = dynamic_cast(&x); - Epetra_MultiVector* vec_y = dynamic_cast(&y); - - TEUCHOS_TEST_FOR_EXCEPTION(vec_x == NULL || vec_y == NULL, MueLuOpFailure, - "Belos::MueLuOp::Apply, x and/or y cannot be dynamic cast to an Epetra_MultiVector."); - - Apply(*vec_x, *vec_y, trans); - } -#endif private: RCP > Hierarchy_; @@ -282,146 +138,7 @@ class MueLuOp : public OperatorT > AMGX_; #endif }; -#endif // !EPETRA_NO_32BIT_GLOBAL_INDICES -#endif // HAVE_XPETRA_EPETRA - -#ifdef HAVE_XPETRA_EPETRA -#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES -/*! @class MueLuOp - * - * @brief MueLuOp derives from Belos::OperatorT and administrates a MueLu::Hierarchy. It implements the apply - * call which represents the effect of the multigrid preconditioner on a given vector. - * Note, in contrast to Belos::XpetraOp this operator has the multigrid hierarchy. - * - * The Belos::OperatorT class is a generalization of the Belos::Operator<> class, which - * deals with any kind of vector (not only Belos::MultiVec as the Belos::Operator<> interface does). - * - * This is the specialization for - */ -template <> -class MueLuOp : public OperatorT > -#ifdef HAVE_XPETRA_TPETRA -// check whether Tpetra is instantiated on double,int,int,EpetraNode -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - , - public OperatorT > -#endif -#endif -#ifdef HAVE_XPETRA_EPETRA - , - public OperatorT, - public Belos::Operator -#endif -{ - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef Xpetra::EpetraNode Node; - - public: - MueLuOp(const RCP >& H) - : Hierarchy_(H) {} -#ifdef HAVE_MUELU_AMGX - MueLuOp(const RCP >& A) - : AMGX_(A) {} -#endif - virtual ~MueLuOp() {} - - void Apply(const Xpetra::MultiVector& x, Xpetra::MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(), but it matters for AMGX - y.putScalar(0.0); - -#ifdef HAVE_MUELU_AMGX - if (!AMGX_.is_null()) { - Tpetra::MultiVector tX = Xpetra::toTpetra(x); - Tpetra::MultiVector tY = Xpetra::toTpetra(y); - - AMGX_->apply(tX, tY); - } -#endif - if (!Hierarchy_.is_null()) - Hierarchy_->Iterate(x, y, 1, true); - } - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - void Apply(const Tpetra::MultiVector& x, Tpetra::MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(), but it matters for AMGX - y.putScalar(0.0); - -#ifdef HAVE_MUELU_AMGX - if (!AMGX_.is_null()) - AMGX_->apply(x, y); -#endif - - if (!Hierarchy_.is_null()) { - Tpetra::MultiVector& temp_x = const_cast&>(x); - - const Xpetra::TpetraMultiVector tX(rcpFromRef(temp_x)); - Xpetra::TpetraMultiVector tY(rcpFromRef(y)); - - tY.putScalar(0.0); - - Hierarchy_->Iterate(tX, tY, 1, true); - } - } -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - // TO SKIP THE TRAIT IMPLEMENTATION OF XPETRA::MULTIVECTOR - /*! \brief This routine takes the Tpetra::MultiVector \c x and applies the operator - to it resulting in the Tpetra::MultiVector \c y, which is returned. - \note It is expected that any problem with applying this operator to \c x will be - indicated by an std::exception being thrown. - */ - void Apply(const Epetra_MultiVector& x, Epetra_MultiVector& y, ETrans trans = NOTRANS) const { - TEUCHOS_TEST_FOR_EXCEPTION(trans != NOTRANS, MueLuOpFailure, - "Belos::MueLuOp::Apply, transpose mode != NOTRANS not supported by MueLu preconditionners."); - - Epetra_MultiVector& temp_x = const_cast(x); - const Xpetra::EpetraMultiVectorT tX(rcpFromRef(temp_x)); - Xpetra::EpetraMultiVectorT tY(rcpFromRef(y)); - - // FIXME InitialGuessIsZero currently does nothing in MueLu::Hierarchy.Iterate(). - tY.putScalar(0.0); - - Hierarchy_->Iterate(tX, tY, 1, true); - } - - /*! \brief This routine takes the Belos::MultiVec \c x and applies the operator - to it resulting in the Belos::MultiVec \c y, which is returned. - \note It is expected that any problem with applying this operator to \c x will be - indicated by an std::exception being thrown. - */ - void Apply(const Belos::MultiVec& x, Belos::MultiVec& y, ETrans trans = NOTRANS) const { - const Epetra_MultiVector* vec_x = dynamic_cast(&x); - Epetra_MultiVector* vec_y = dynamic_cast(&y); - - TEUCHOS_TEST_FOR_EXCEPTION(vec_x == NULL || vec_y == NULL, MueLuOpFailure, - "Belos::MueLuOp::Apply, x and/or y cannot be dynamic cast to an Epetra_MultiVector."); - - Apply(*vec_x, *vec_y, trans); - } -#endif - - private: - RCP > Hierarchy_; -#ifdef HAVE_MUELU_AMGX - RCP > AMGX_; -#endif -}; -#endif // !EPETRA_NO_64BIT_GLOBAL_INDICES -#endif // HAVE_XPETRA_EPETRA } // namespace Belos #endif // BELOS_MUELU_ADAPTER_HPP diff --git a/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.cpp b/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.cpp deleted file mode 100644 index 4ec5ece1997a..000000000000 --- a/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef MUELU_CREATE_EPETRA_PRECONDITIONER_CPP -#define MUELU_CREATE_EPETRA_PRECONDITIONER_CPP - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -//! @file -//! @brief Various adapters that will create a MueLu preconditioner that is an Epetra_Operator. -#if defined(HAVE_MUELU_EPETRA) -namespace MueLu { - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a EpetraCrs_Matrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix - @param[in] paramListIn Parameter list - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& inA, - // FIXME: why is it non-const - Teuchos::ParameterList& paramListIn) { - using SC = double; - using LO = int; - using GO = int; - using NO = Xpetra::EpetraNode; - - using Teuchos::ParameterList; - - using MultiVector = Xpetra::MultiVector; - using Matrix = Xpetra::Matrix; - using Hierarchy = Hierarchy; - using HierarchyManager = HierarchyManager; - - Teuchos::ParameterList& userList = paramListIn.sublist("user data"); - if (userList.isParameter("Coordinates")) { - RCP::coordinateType, LO, GO, NO> > coordinates = Teuchos::null; - try { - coordinates = EpetraMultiVector_To_XpetraMultiVector::coordinateType, LO, GO, NO>(userList.get >("Coordinates")); - } catch (Teuchos::Exceptions::InvalidParameterType&) { - coordinates = userList.get::coordinateType, LO, GO, NO> > >("Coordinates"); - } - if (Teuchos::nonnull(coordinates)) { - userList.set::coordinateType, LO, GO, NO> > >("Coordinates", coordinates); - } - } - if (userList.isParameter("Nullspace")) { - RCP::coordinateType, LO, GO, NO> > nullspace = Teuchos::null; - try { - nullspace = EpetraMultiVector_To_XpetraMultiVector(userList.get >("Nullspace")); - } catch (Teuchos::Exceptions::InvalidParameterType&) { - nullspace = userList.get > >("Nullspace"); - } - if (Teuchos::nonnull(nullspace)) { - userList.set::coordinateType, LO, GO, NO> > >("Nullspace", nullspace); - } - } - - RCP A = EpetraCrs_To_XpetraMatrix(inA); - RCP H = MueLu::CreateXpetraPreconditioner(A, paramListIn); - return rcp(new EpetraOperator(H)); -} - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a Epetra_CrsMatrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix - @param[in] xmlFileName XML file containing MueLu options. - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& A, - const std::string& xmlFileName) { - Teuchos::ParameterList paramList; - Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, Teuchos::Ptr(¶mList), *Xpetra::toXpetra(A->Comm())); - - return CreateEpetraPreconditioner(A, paramList); -} - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a Epetra_CrsMatrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix. - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& A) { - Teuchos::ParameterList paramList; - return CreateEpetraPreconditioner(A, paramList); -} - -void ReuseEpetraPreconditioner(const Teuchos::RCP& inA, MueLu::EpetraOperator& Op) { - using SC = double; - using LO = int; - using GO = int; - using NO = Xpetra::EpetraNode; - - using Teuchos::ParameterList; - - using Matrix = Xpetra::Matrix; - using Hierarchy = Hierarchy; - - RCP H = Op.GetHierarchy(); - RCP A = EpetraCrs_To_XpetraMatrix(inA); - - MueLu::ReuseXpetraPreconditioner(A, H); -} - -} // namespace MueLu -#endif // HAVE_MUELU_SERIAL and HAVE_MUELU_EPETRA - -#endif // ifndef MUELU_CREATE_EPETRA_PRECONDITIONER_CPP diff --git a/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.hpp b/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.hpp deleted file mode 100644 index af448200cb9a..000000000000 --- a/packages/muelu/adapters/epetra/MueLu_CreateEpetraPreconditioner.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef MUELU_CREATE_EPETRA_PRECONDITIONER_HPP -#define MUELU_CREATE_EPETRA_PRECONDITIONER_HPP - -#include -#include - -#include - -#include - -#include - -//! @file -//! @brief Various adapters that will create a MueLu preconditioner that is an Epetra_Operator. -#if defined(HAVE_MUELU_EPETRA) -namespace MueLu { - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a EpetraCrs_Matrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix - @param[in] paramListIn Parameter list - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& inA, - // FIXME: why is it non-const - Teuchos::ParameterList& paramListIn); - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a Epetra_CrsMatrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix - @param[in] xmlFileName XML file containing MueLu options. - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& A, - const std::string& xmlFileName); - -/*! - @brief Helper function to create a MueLu preconditioner that can be used by Epetra. - @ingroup MueLuAdapters - Given a Epetra_CrsMatrix, this function returns a constructed MueLu preconditioner. - @param[in] inA Matrix - */ -Teuchos::RCP -CreateEpetraPreconditioner(const Teuchos::RCP& A, - const std::string& xmlFileName); - -void ReuseEpetraPreconditioner(const Teuchos::RCP& inA, MueLu::EpetraOperator& Op); - -} // namespace MueLu -#endif // HAVE_MUELU_SERIAL and HAVE_MUELU_EPETRA - -#endif // ifndef MUELU_CREATE_EPETRA_PRECONDITIONER_HPP diff --git a/packages/muelu/adapters/epetra/MueLu_EpetraOperator.cpp b/packages/muelu/adapters/epetra/MueLu_EpetraOperator.cpp deleted file mode 100644 index ef4d687fd46e..000000000000 --- a/packages/muelu/adapters/epetra/MueLu_EpetraOperator.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include -#include - -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_Level.hpp" - -#if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA) - -namespace MueLu { - -int EpetraOperator::ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const { - try { - // There is no rcpFromRef(const T&), so we need to do const_cast - const Xpetra::EpetraMultiVectorT eX(rcpFromRef(const_cast(X))); - Xpetra::EpetraMultiVectorT eY(rcpFromRef(Y)); - // Generally, we assume two different vectors, but AztecOO uses a single vector - if (X.Values() == Y.Values()) { - // X and Y point to the same memory, use an additional vector - RCP> tmpY = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(eY.getMap(), eY.getNumVectors())); - // InitialGuessIsZero in MueLu::Hierarchy.Iterate() does not zero out components, it - // only assumes that user provided an already zeroed out vector - bool initialGuessZero = true; - tmpY->putScalar(0.0); - // apply one V-cycle as preconditioner - Hierarchy_->Iterate(eX, *tmpY, 1, initialGuessZero); - // deep copy solution from MueLu - eY.update(1.0, *tmpY, 0.0); - } else { - // X and Y point to different memory, pass the vectors through - - // InitialGuessIsZero in MueLu::Hierarchy.Iterate() does not zero out components, it - // only assumes that user provided an already zeroed out vector - bool initialGuessZero = true; - eY.putScalar(0.0); - Hierarchy_->Iterate(eX, eY, 1, initialGuessZero); - } - - } catch (std::exception& e) { - // TODO: error msg directly on std::cerr? - std::cerr << "Caught an exception in MueLu::EpetraOperator::ApplyInverse():" << std::endl - << e.what() << std::endl; - return -1; - } - return 0; -} - -const Epetra_Comm& EpetraOperator::Comm() const { - RCP A = Hierarchy_->GetLevel(0)->Get>("A"); - - // TODO: This code is not pretty - RCP> epbA = Teuchos::rcp_dynamic_cast>(A); - if (epbA != Teuchos::null) { - RCP> blockMat = epbA->getMatrix(0, 0); - RCP> blockCrsWrap = Teuchos::rcp_dynamic_cast>(blockMat); - if (blockCrsWrap == Teuchos::null) - throw Exceptions::BadCast("MueLu::EpetraOperator::Comm(): Cast from block (0,0) to CrsMatrixWrap failed. Could be a block matrix. TODO implement recursive support for block matrices."); - RCP> tmp_ECrsMtx = rcp_dynamic_cast>(blockCrsWrap->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("MueLu::EpetraOperator::Comm(): Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - RCP epA = tmp_ECrsMtx->getEpetra_CrsMatrixNonConst(); - return epA->Comm(); - } - - RCP> crsOp = rcp_dynamic_cast>(A); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->Comm(); -} - -const Epetra_Map& EpetraOperator::OperatorDomainMap() const { - RCP> A = Hierarchy_->GetLevel(0)->Get>("A"); - - RCP> epbA = Teuchos::rcp_dynamic_cast>(A); - if (epbA != Teuchos::null) - return Xpetra::toEpetra(epbA->getFullDomainMap()); // TODO check me - - RCP> crsOp = rcp_dynamic_cast>(A); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->DomainMap(); -} - -const Epetra_Map& EpetraOperator::OperatorRangeMap() const { - RCP> A = Hierarchy_->GetLevel(0)->Get>("A"); - - RCP> epbA = Teuchos::rcp_dynamic_cast>(A); - if (epbA != Teuchos::null) - return Xpetra::toEpetra(epbA->getFullRangeMap()); - - RCP> crsOp = rcp_dynamic_cast>(A); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst()->RangeMap(); -} - -} // namespace MueLu - -#endif // #if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA) diff --git a/packages/muelu/adapters/epetra/MueLu_EpetraOperator.hpp b/packages/muelu/adapters/epetra/MueLu_EpetraOperator.hpp deleted file mode 100644 index 12f46ae89f95..000000000000 --- a/packages/muelu/adapters/epetra/MueLu_EpetraOperator.hpp +++ /dev/null @@ -1,128 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef MUELU_EPETRAOPERATOR_HPP -#define MUELU_EPETRAOPERATOR_HPP - -//! @file - -#include -#include "MueLu_Hierarchy.hpp" -// TODO: Kokkos headers - -#if defined(HAVE_MUELU_SERIAL) and defined(HAVE_MUELU_EPETRA) - -namespace MueLu { - -/*! @class EpetraOperator - @brief Turns a MueLu::Hierarchy into a Epetra_Operator. - It allows MueLu to be used as a preconditioner for AztecOO (for instance). -*/ -class EpetraOperator : public Epetra_Operator { - typedef double SC; - typedef int LO; - typedef int GO; - typedef Xpetra::EpetraNode NO; - - typedef Xpetra::Matrix Matrix; - typedef MueLu::Hierarchy Hierarchy; - typedef MueLu::Utilities Utils; - - public: - //! @name Constructor/Destructor - //@{ - - //! Constructor - EpetraOperator(const RCP& H) - : Hierarchy_(H) {} - - //! Destructor. - virtual ~EpetraOperator() {} - - //@} - - int SetUseTranspose(bool /* UseTransposeBool */) { return -1; } - - //! @name Mathematical functions - //@{ - - //! Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y. - /*! - \param In - X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix. - \param Out - Y -A Epetra_MultiVector of dimension NumVectors containing result. - - \return Integer error code, set to 0 if successful. - */ - int Apply(const Epetra_MultiVector& /* X */, Epetra_MultiVector& /* Y */) const { return -1; } - - //! Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y. - /*! - \param In - X - A Epetra_MultiVector of dimension NumVectors to solve for. - \param Out - Y -A Epetra_MultiVector of dimension NumVectors containing result. - - \return Integer error code, set to 0 if successful. - - \warning In order to work with AztecOO, any implementation of this method must - support the case where X and Y are the same object. - */ - int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const; - - //! Returns the infinity norm of the global matrix. - /* Returns the quantity \f$ \| A \|_\infty\f$ such that - \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f]. - - \warning This method must not be called unless HasNormInf() returns true. - */ - double NormInf() const { return 0; } - //@} - - //! @name Attribute access functions - //@{ - - //! Returns a character string describing the operator - const char* Label() const { return "MueLu::Hierarchy"; } - - //! Returns the current UseTranspose setting. - bool UseTranspose() const { return false; } - - //! Returns true if the \e this object can provide an approximate Inf-norm, false otherwise. - bool HasNormInf() const { return 0; } - - //! Returns a pointer to the Epetra_Comm communicator associated with this operator. - const Epetra_Comm& Comm() const; - - //! Returns the Epetra_Map object associated with the domain of this operator. - const Epetra_Map& OperatorDomainMap() const; - - //! Returns the Epetra_Map object associated with the range of this operator. - const Epetra_Map& OperatorRangeMap() const; - - //@} - - //! @name MueLu specific - //@{ - - //! Direct access to the underlying MueLu::Hierarchy. - RCP GetHierarchy() const { return Hierarchy_; } - - //@} - - private: - RCP Hierarchy_; -}; - -} // namespace MueLu - -#endif // HAVE_MUELU_EPETRA and HAVE_MUELU_SERIAL - -#endif // MUELU_EPETRAOPERATOR_HPP diff --git a/packages/muelu/adapters/linear_solver_factory/MueLu_Details_LinearSolverFactory_def.hpp b/packages/muelu/adapters/linear_solver_factory/MueLu_Details_LinearSolverFactory_def.hpp index b0abcce3b5d5..73bb6ecefc7c 100644 --- a/packages/muelu/adapters/linear_solver_factory/MueLu_Details_LinearSolverFactory_def.hpp +++ b/packages/muelu/adapters/linear_solver_factory/MueLu_Details_LinearSolverFactory_def.hpp @@ -19,11 +19,6 @@ #include "Trilinos_Details_LinearSolverFactory.hpp" #include -#ifdef HAVE_MUELU_EPETRA -#include "Epetra_CrsMatrix.h" -#include "MueLu_CreateEpetraPreconditioner.hpp" -#endif // HAVE_MUELU_EPETRA - #include "Tpetra_Operator.hpp" #include "MueLu_CreateTpetraPreconditioner.hpp" diff --git a/packages/muelu/adapters/linear_solver_factory/MueLu_Details_registerLinearSolverFactory.cpp b/packages/muelu/adapters/linear_solver_factory/MueLu_Details_registerLinearSolverFactory.cpp deleted file mode 100644 index 54f5679e1a19..000000000000 --- a/packages/muelu/adapters/linear_solver_factory/MueLu_Details_registerLinearSolverFactory.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "MueLu_Details_registerLinearSolverFactory.hpp" -#include "MueLu_Details_LinearSolverFactory.hpp" -#include "Tpetra_MultiVector.hpp" -#include "Tpetra_Operator.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "Epetra_MultiVector.h" -#include "Epetra_Operator.h" -#endif -#include "TpetraCore_ETIHelperMacros.h" - -// Define Tpetra instantiation macros and typedefs that make the -// macros work. The fix for Bug 6380 makes this work whether or not -// ETI is ON. We use the Tpetra macros because MueLu doesn't have -// its own macos. -TPETRA_ETI_MANGLING_TYPEDEFS() - -// Macro that registers MueLu's LinearSolverFactory for Tpetra -// objects, for the given four template parameters (Scalar = SC, -// LocalOrdinal = LO, GlobalOrdinal = GO, Node = NT). The macro is -// local to this file. -// -// NOTE: This macro does NOT do explicit instantiation! That's why I -// call it LCL_CALL and not LCL_INST. We are just using the macros to -// invoke this class method over the set of enabled template -// parameters. -#define LCL_CALL(SC, LO, GO, NT) \ - ::MueLu::Details::LinearSolverFactory, \ - Tpetra::Operator, \ - typename Tpetra::MultiVector::mag_type>::registerLinearSolverFactory(); - -namespace MueLu { -namespace Details { - -void registerLinearSolverFactory() { - // Fill in the body of the function with all the type-specific - // run-time registration functions, for registering MueLu's - // LinearSolverFactory with Tpetra objects. - TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(LCL_CALL) - - // If Epetra is enabled in MueLu, also register MueLu's - // LinearSolverFactory for Epetra objects. -#ifdef HAVE_MUELU_EPETRA - ::MueLu::Details::LinearSolverFactory::registerLinearSolverFactory(); -#endif // HAVE_MUELU_EPETRA -} - -} // namespace Details -} // namespace MueLu \ No newline at end of file diff --git a/packages/muelu/adapters/stratimikos/Thyra_MueLuMaxwell1PreconditionerFactory_def.hpp b/packages/muelu/adapters/stratimikos/Thyra_MueLuMaxwell1PreconditionerFactory_def.hpp index 5427491e0a3d..418484e0d39e 100644 --- a/packages/muelu/adapters/stratimikos/Thyra_MueLuMaxwell1PreconditionerFactory_def.hpp +++ b/packages/muelu/adapters/stratimikos/Thyra_MueLuMaxwell1PreconditionerFactory_def.hpp @@ -50,10 +50,6 @@ bool MueLuMaxwell1PreconditionerFactory::isTpetra(fwdOp)) return true; -#ifdef HAVE_MUELU_EPETRA - if (Xpetra::ThyraUtils::isEpetra(fwdOp)) return true; -#endif - return false; } diff --git a/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_decl.hpp b/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_decl.hpp index 5d3a61f0ea5b..c60aa851ff59 100644 --- a/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_decl.hpp +++ b/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_decl.hpp @@ -21,9 +21,6 @@ #include "Thyra_XpetraLinearOp.hpp" #include "Thyra_TpetraLinearOp.hpp" #include "Thyra_TpetraThyraWrappers.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "Thyra_EpetraLinearOp.hpp" -#endif #include "Teuchos_Ptr.hpp" #include "Teuchos_TestForException.hpp" @@ -45,9 +42,6 @@ #include #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#endif #include "Thyra_PreconditionerFactoryBase.hpp" @@ -65,13 +59,6 @@ struct Converters { static bool replaceWithXpetra(ParameterList& paramList, std::string parameterName); }; -#ifdef HAVE_MUELU_EPETRA -template -struct Converters { - static bool replaceWithXpetra(ParameterList& paramList, std::string parameterName); -}; -#endif - /** @brief Concrete preconditioner factory subclass for Thyra based on MueLu. @ingroup MueLuAdapters Add support for MueLu preconditioners in Thyra. This class provides an interface both diff --git a/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_def.hpp b/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_def.hpp index 313c2a98b497..5b8a036c805f 100644 --- a/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_def.hpp +++ b/packages/muelu/adapters/stratimikos/Thyra_MueLuPreconditionerFactory_def.hpp @@ -165,181 +165,6 @@ bool Converters::replaceWithXpetra(Pa return false; } -#ifdef HAVE_MUELU_EPETRA -template -bool Converters::replaceWithXpetra(ParameterList& paramList, std::string parameterName) { - typedef double Scalar; - typedef int LocalOrdinal; - typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode Node; - typedef typename Teuchos::ScalarTraits::magnitudeType Magnitude; - typedef Xpetra::Operator XpOp; - typedef Xpetra::ThyraUtils XpThyUtils; - typedef Xpetra::CrsMatrixWrap XpCrsMatWrap; - typedef Xpetra::CrsMatrix XpCrsMat; - typedef Xpetra::Matrix XpMat; - typedef Xpetra::MultiVector XpMultVec; - typedef Xpetra::MultiVector XpMagMultVec; - typedef Xpetra::Vector XpVec; - - typedef Thyra::LinearOpBase ThyLinOpBase; - typedef Thyra::DiagonalLinearOpBase ThyDiagLinOpBase; - typedef Thyra::SpmdVectorSpaceBase ThyVSBase; - - typedef Tpetra::CrsMatrix TpCrsMat; - typedef Tpetra::Operator tOp; - typedef Tpetra::Vector tV; - typedef Thyra::TpetraVector thyTpV; - typedef Tpetra::MultiVector tMV; - typedef Tpetra::MultiVector tMagMV; -#if defined(MUELU_CAN_USE_MIXED_PRECISION) - typedef typename Teuchos::ScalarTraits::halfPrecision HalfMagnitude; - typedef Tpetra::MultiVector tHalfMagMV; -#endif -#if defined(HAVE_MUELU_EPETRA) - typedef Xpetra::EpetraCrsMatrixT XpEpCrsMat; -#endif - - if (paramList.isParameter(parameterName)) { - if (paramList.isType >(parameterName)) - return true; - else if (paramList.isType >(parameterName)) { - RCP constM = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP M = rcp_const_cast(constM); - paramList.set >(parameterName, M); - return true; - } else if (paramList.isType >(parameterName)) - return true; - else if (paramList.isType >(parameterName)) { - RCP constX = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP X = rcp_const_cast(constX); - paramList.set >(parameterName, X); - return true; - } else if (paramList.isType >(parameterName)) - return true; - else if (paramList.isType >(parameterName)) { - RCP constX = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP X = rcp_const_cast(constX); - paramList.set >(parameterName, X); - return true; - } else if (paramList.isType >(parameterName)) { - RCP tM = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP xM = MueLu::TpetraCrs_To_XpetraMatrix(tM); - paramList.set >(parameterName, xM); - return true; - } else if (paramList.isType >(parameterName)) { - RCP tpetra_X = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP X = MueLu::TpetraMultiVector_To_XpetraMultiVector(tpetra_X); - paramList.set >(parameterName, X); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(X)); - return true; - } else if (paramList.isType >(parameterName)) { - RCP tpetra_X = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP X = MueLu::TpetraMultiVector_To_XpetraMultiVector(tpetra_X); - paramList.set >(parameterName, X); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(X)); - return true; - } -#if defined(MUELU_CAN_USE_MIXED_PRECISION) - else if (paramList.isType >(parameterName)) { - RCP tpetra_hX = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP tpetra_X = rcp(new tMagMV(tpetra_hX->getMap(), tpetra_hX->getNumVectors())); - Tpetra::deep_copy(*tpetra_X, *tpetra_hX); - RCP X = MueLu::TpetraMultiVector_To_XpetraMultiVector(tpetra_X); - paramList.set >(parameterName, X); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(X)); - return true; - } -#endif -#ifdef HAVE_MUELU_EPETRA - else if (paramList.isType >(parameterName)) { - RCP eM = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP xeM = rcp(new XpEpCrsMat(eM)); - RCP xCrsM = rcp_dynamic_cast(xeM, true); - RCP xwM = rcp(new XpCrsMatWrap(xCrsM)); - RCP xM = rcp_dynamic_cast(xwM); - paramList.set >(parameterName, xM); - return true; - } else if (paramList.isType >(parameterName)) { - RCP epetra_X = Teuchos::null; - epetra_X = paramList.get >(parameterName); - paramList.remove(parameterName); - RCP > xpEpX = rcp(new Xpetra::EpetraMultiVectorT(epetra_X)); - RCP > xpEpXMult = rcp_dynamic_cast >(xpEpX, true); - RCP X = rcp_dynamic_cast(xpEpXMult, true); - paramList.set >(parameterName, X); - return true; - } -#endif - else if (paramList.isType >(parameterName) || - (paramList.isType >(parameterName) && !rcp_dynamic_cast(paramList.get >(parameterName)).is_null())) { - RCP thyM; - if (paramList.isType >(parameterName)) - thyM = paramList.get >(parameterName); - else - thyM = rcp_dynamic_cast(paramList.get >(parameterName), true); - paramList.remove(parameterName); - RCP > diag = thyM->getDiag(); - - RCP xpDiag; - if (!rcp_dynamic_cast(diag).is_null()) { - RCP tDiag = Thyra::TpetraOperatorVectorExtraction::getConstTpetraVector(diag); - if (!tDiag.is_null()) - xpDiag = Xpetra::toXpetra(tDiag); - } -#ifdef HAVE_MUELU_EPETRA - if (xpDiag.is_null()) { - RCP comm = Thyra::get_Epetra_Comm(*rcp_dynamic_cast(thyM->range())->getComm()); - RCP map = Thyra::get_Epetra_Map(*(thyM->range()), comm); - if (!map.is_null()) { - RCP eDiag = Thyra::get_Epetra_Vector(*map, diag); - RCP nceDiag = rcp_const_cast(eDiag); - RCP > xpEpDiag = rcp(new Xpetra::EpetraVectorT(nceDiag)); - xpDiag = rcp_dynamic_cast(xpEpDiag, true); - } - } -#endif - TEUCHOS_ASSERT(!xpDiag.is_null()); - RCP M = Xpetra::MatrixFactory::Build(xpDiag); - paramList.set >(parameterName, M); - return true; - } else if (paramList.isType >(parameterName)) { - RCP thyM = paramList.get >(parameterName); - paramList.remove(parameterName); - try { - RCP M = XpThyUtils::toXpetra(Teuchos::rcp_const_cast(thyM)); - paramList.set >(parameterName, M); - } catch (std::exception& e) { - RCP M = XpThyUtils::toXpetraOperator(Teuchos::rcp_const_cast(thyM)); - RCP > tpOp = rcp_dynamic_cast >(M, true); - RCP tO = tpOp->getOperator(); - RCP diag; - if (tO->hasDiagonal()) { - diag = rcp(new tV(tO->getRangeMap())); - tO->getLocalDiagCopy(*diag); - } - auto fTpRow = rcp(new MueLu::TpetraOperatorAsRowMatrix(tO, diag)); - RCP > tpFOp = rcp(new Xpetra::TpetraOperator(fTpRow)); - auto op = rcp_dynamic_cast(tpFOp); - paramList.set >(parameterName, op); - } - return true; - } else { - TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::RuntimeError, "Parameter " << parameterName << " has wrong type."); - return false; - } - } else - return false; -} -#endif - // Constructors/initializers/accessors template @@ -357,10 +182,6 @@ bool MueLuPreconditionerFactory::isCo if (Xpetra::ThyraUtils::isTpetra(fwdOp)) return true; -#ifdef HAVE_MUELU_EPETRA - if (Xpetra::ThyraUtils::isEpetra(fwdOp)) return true; -#endif - if (Xpetra::ThyraUtils::isBlockedOperator(fwdOp)) return true; return false; diff --git a/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_decl.hpp b/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_decl.hpp index f60bd7385aa8..82cb3b0e2882 100644 --- a/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_decl.hpp +++ b/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_decl.hpp @@ -22,10 +22,6 @@ #include #include "Thyra_TpetraLinearOp.hpp" #include "Thyra_TpetraThyraWrappers.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "Thyra_EpetraLinearOp.hpp" -#include "Thyra_EpetraThyraWrappers.hpp" -#endif #include "Teuchos_Ptr.hpp" #include "Teuchos_TestForException.hpp" @@ -42,10 +38,6 @@ #include #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#include -#endif #include "Thyra_PreconditionerFactoryBase.hpp" diff --git a/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_def.hpp b/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_def.hpp index 19aa9e34db37..3abdac4b7814 100644 --- a/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_def.hpp +++ b/packages/muelu/adapters/stratimikos/Thyra_MueLuRefMaxwellPreconditionerFactory_def.hpp @@ -44,10 +44,6 @@ bool MueLuRefMaxwellPreconditionerFactory::isTpetra(fwdOp)) return true; -#ifdef HAVE_MUELU_EPETRA - if (Xpetra::ThyraUtils::isEpetra(fwdOp)) return true; -#endif - return false; } diff --git a/packages/muelu/adapters/tpetra/MueLu_ShiftedLaplacian_decl.hpp b/packages/muelu/adapters/tpetra/MueLu_ShiftedLaplacian_decl.hpp index 74b69a90603e..219602bd0d31 100644 --- a/packages/muelu/adapters/tpetra/MueLu_ShiftedLaplacian_decl.hpp +++ b/packages/muelu/adapters/tpetra/MueLu_ShiftedLaplacian_decl.hpp @@ -20,8 +20,6 @@ #include "MueLu.hpp" #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_IFPACK2) - #include #include #include @@ -270,6 +268,4 @@ class ShiftedLaplacian : public BaseClass { #define MUELU_SHIFTEDLAPLACIAN_SHORT -#endif // if defined(HAVE_MUELU_IFPACK2) and defined(HAVE_MUELU_TPETRA) - #endif // MUELU_SHIFTEDLAPLACIAN_DECL_HPP diff --git a/packages/muelu/cmake/Dependencies.cmake b/packages/muelu/cmake/Dependencies.cmake index 3448abbc02bd..3a8ea1cc24f9 100644 --- a/packages/muelu/cmake/Dependencies.cmake +++ b/packages/muelu/cmake/Dependencies.cmake @@ -1,8 +1,7 @@ SET(LIB_REQUIRED_DEP_PACKAGES Teuchos Tpetra Xpetra Kokkos KokkosKernels) -SET(LIB_OPTIONAL_DEP_PACKAGES Amesos Amesos2 AvatarT Belos Epetra EpetraExt Teko - Ifpack Ifpack2 Intrepid2 ML - Zoltan Zoltan2Core Stratimikos Thyra ThyraTpetraAdapters - Isorropia) +SET(LIB_OPTIONAL_DEP_PACKAGES Amesos2 AvatarT Belos Teko + Ifpack2 Intrepid2 ML + Zoltan Zoltan2Core Stratimikos Thyra) SET(TEST_REQUIRED_DEP_PACKAGES Galeri) SET(TEST_OPTIONAL_DEP_PACKAGES AztecOO Pamgen) SET(LIB_REQUIRED_DEP_TPLS BLAS LAPACK) diff --git a/packages/muelu/doc/CMakeLists.txt b/packages/muelu/doc/CMakeLists.txt index 305929b30e41..67eba88a117e 100644 --- a/packages/muelu/doc/CMakeLists.txt +++ b/packages/muelu/doc/CMakeLists.txt @@ -9,10 +9,4 @@ COMMENT "Generating ${PACKAGE_NAME} API documentation with Doxygen" VERBATIM ) endif(DOXYGEN_FOUND) -if (${PACKAGE_NAME}_ENABLE_Tutorial) - TRIBITS_ADD_EXAMPLE_DIRECTORIES(Tutorial) -else() - MESSAGE(STATUS "disabling tutorial") -endif() - ADD_SUBDIRECTORY(UsersGuide) diff --git a/packages/muelu/doc/Tutorial/CMakeLists.txt b/packages/muelu/doc/Tutorial/CMakeLists.txt deleted file mode 100644 index 65e9210a17a4..000000000000 --- a/packages/muelu/doc/Tutorial/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(tex) - -TRIBITS_COPY_FILES_TO_BINARY_DIR(copy_tutorial_build_files - SOURCE_FILES - src/Challenge.cpp - src/MLParameterList.cpp - src/laplace2d.cpp - ) diff --git a/packages/muelu/doc/Tutorial/README b/packages/muelu/doc/Tutorial/README deleted file mode 100644 index 79fd3a6fbccd..000000000000 --- a/packages/muelu/doc/Tutorial/README +++ /dev/null @@ -1,59 +0,0 @@ -How to build the Tutorial -------------------------- - -1) Compile MueLu with the tests and examples enabled. You should find the - executables in the packages/muelu/doc/Tutorial/src subfolder of the build - folder of Trilinos. - -2) Switch to the packages/muelu/doc/Tutorial/tex subfolder of your Trilinos - build folder. - -3) Run the command - - ./prepareTexTutorial.py - - This python scripts runs the examples using the executables built in step 1 - of this tutorial, parses the screen output and includes the results and - code-snippets into the LaTeX document. This way, the MueLu tutorial always - contains the latest numbers/results. - - The screen output of the python script should look like the following: - - Prepare files... - Split source files in src folder for inclusion in pdf... - Run test examples to include results in pdf... - s1_easy.txt OK - s1_easy_10levels OK - s1_easy_3levels_unsmoothed OK - s1_easy_3levels_smoothed OK - s1_easy_jacobi OK - s1_easy_jacobi2 OK - s1_easy_exercise OK - s2_adv_b OK - s2_adv_c OK - s3a OK - s3b OK - s3b1 OK - s3b2 OK - s3b3 OK - s5a OK - s5a.txt OK - Run LaTeX to generate PDF... - If the script stops here you can skip the step by pressing CTRL+C and run - "pdflatex main.tex" by hand to fix the errors - Success - Clean up files... - Finished. - - Note, that running the script might take a while (especially the LaTeX call - in the end). - -4) It might be necessary to run the latex process one or two times more to - resolve all references. Use the command - - pdflatex main.tex - - You need a rather new LaTeX version which understands Tikz commands. - -5) If successful you should have a main.pdf which has the most recent version - of the MueLu tutorial. diff --git a/packages/muelu/doc/Tutorial/src/CMakeLists.txt b/packages/muelu/doc/Tutorial/src/CMakeLists.txt deleted file mode 100644 index 4c396e99ff33..000000000000 --- a/packages/muelu/doc/Tutorial/src/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ - -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos - ${PACKAGE_NAME}_ENABLE_AztecOO - ${PACKAGE_NAME}_ENABLE_Epetra - ${PACKAGE_NAME}_ENABLE_EpetraExt - ${PACKAGE_NAME}_ENABLE_Ifpack - ) - -IF (${PACKAGE_NAME}_ENABLE_Amesos AND - ${PACKAGE_NAME}_ENABLE_AztecOO AND - ${PACKAGE_NAME}_ENABLE_Epetra AND - ${PACKAGE_NAME}_ENABLE_EpetraExt AND - ${PACKAGE_NAME}_ENABLE_Ifpack - ) - TRIBITS_ADD_EXECUTABLE( - tutorial_laplace2d - SOURCES laplace2d.cpp - COMM mpi serial - ) - - TRIBITS_COPY_FILES_TO_BINARY_DIR(tutorial_laplace2d_cp - SOURCE_FILES hands-on.py MueLu_Agg2VTK.py - tmpl/MueLu_Agg2VTK.py_TMPL tmpl/muelu.xml_TMPL tmpl/muelu_easy.xml_TMPL - xml/s1_easy.xml xml/s1_easy_3levels_smoothed.xml xml/s1_easy_3levels_unsmoothed.xml - xml/s1_easy_10levels.xml xml/s1_easy_exercise.xml xml/s1_easy_jacobi.xml xml/s1_easy_jacobi2.xml - xml/s2_adv_a.xml xml/s2_adv_b.xml xml/s2_adv_c.xml - xml/s2a.xml xml/s2b.xml - xml/s4a.xml xml/s4av.xml xml/s4b.xml xml/s4c.xml - xml/s5a.xml xml/s5b.xml - xml/s6_dep.xml xml/s6_export.xml - xml/s2_easy.xml xml/s3a_easy.xml xml/s3b_easy.xml xml/s3c_easy.xml - xml/n1_easy.xml xml/n1_easy_pg.xml - xml/n2_easy_agg.xml xml/n2_easy_agg2.xml xml/n2_easy_agg3.xml xml/n2_easy_export.xml - EXEDEPS tutorial_laplace2d - ) - - TRIBITS_ADD_EXECUTABLE( - tutorial_recirc2d - SOURCES recirc2d.cpp - COMM mpi serial - ) - - TRIBITS_COPY_FILES_TO_BINARY_DIR(tutorial_recirc2d_cp - SOURCE_FILES xml/s3a.xml xml/s3b.xml xml/s3c.xml xml/s3b1.xml xml/s3b2.xml xml/s3b3.xml - EXEDEPS tutorial_recirc2d - ) - - TRIBITS_ADD_EXECUTABLE( - tutorial_recirc2d_api - SOURCES recirc2d_api.cpp - COMM mpi serial - ) - - TRIBITS_COPY_FILES_TO_BINARY_DIR(userguide_srcfiles_cp - SOURCE_FILES ScalingTest.cpp ScalingTestParamList.cpp - EXEDEPS tutorial_recirc2d_api - ) - - TRIBITS_ADD_EXECUTABLE( - Challenge_XML - SOURCES Challenge.cpp - COMM mpi - ) - - #TRIBITS_ADD_TEST( - # Challenge_XML - # NAME "Challenge_convectiondiffusion" - # ARGS "--globalNumDofs=16641 --nDofsPerNode=1 --solver=gmres --tol=1e-12 --xml=challenges/condif2d_reference.xml --problem=challenges/condif2d" - # NUM_MPI_PROCS 2 - # COMM mpi - # ) - - #TRIBITS_ADD_TEST( - # Challenge_XML - # NAME "Challenge_structure" - # ARGS "--globalNumDofs=7020 --nDofsPerNode=2 --solver=cg --tol=1e-12 --xml=challenges/stru2d_reference.xml --problem=challenges/stru2d" - # NUM_MPI_PROCS 2 - # COMM mpi - # ) - - #TRIBITS_COPY_FILES_TO_BINARY_DIR(userguide_challenge_cp - # SOURCE_FILES challenges/condif2d_A.txt challenges/condif2d_b.txt challenges/condif2d_ns.txt challenges/condif2d_reference.xml - # challenges/stru2d_A.txt challenges/stru2d_b.txt challenges/stru2d_ns.txt challenges/stru2d_reference.xml - # ) -ENDIF() diff --git a/packages/muelu/doc/Tutorial/src/Challenge.cpp b/packages/muelu/doc/Tutorial/src/Challenge.cpp deleted file mode 100644 index e9723aeb797b..000000000000 --- a/packages/muelu/doc/Tutorial/src/Challenge.cpp +++ /dev/null @@ -1,229 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Structure2D_epetra.cpp - * - * Created on: Oct 24, 2011 - * Author: wiesner - */ - -#include -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -#include - -// AztecOO -#include - -// Xpetra -#include -#include -#include -#include -#include - -// MueLu -#include -#include -#include - -#if defined(HAVE_MUELU_EPETRA) -#include - -// prescribe types -// run plain Epetra -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Xpetra::EpetraNode Node; -#endif - -/*! - * 2d structural mechanics example for Epetra - * - * (Nearly) Symmetric problem (except of Dirichlet boundaries) solved with AMG solver using a - * 3 level multigrid with smoothed aggregation transfer operators. - * - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) -#include "MueLu_UseShortNames.hpp" - using Teuchos::RCP; - using Teuchos::rcp; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - -#ifndef HAVE_XPETRA_INT_LONG_LONG - *out << "Warning: scaling test was not compiled with long long int support" << std::endl; -#endif - - // ========================================================================= - // Parameters initialization - // ========================================================================= - Teuchos::CommandLineProcessor clp(false); - - std::string xmlFileName = "xml/muelu_ParameterList.xml"; - clp.setOption("xml", &xmlFileName, "read parameters from a file [default = 'xml/muelu_ParameterList.xml']"); - - int globalNumDofs = 0; // 7020; - clp.setOption("globalNumDofs", &globalNumDofs, "global number of degrees of freedom [has to be set by user, default = 0 -> error]"); - int nDofsPerNode = 1; - clp.setOption("nDofsPerNode", &nDofsPerNode, "number of degrees of freedom per node [has to be set by user, default = 1]"); - int nProcs = comm->getSize(); - std::string dsolveType = "cg"; - clp.setOption("solver", &dsolveType, "solve type: (none | cg | gmres | standalone) [default = cg]"); - double dtol = 1e-12; - clp.setOption("tol", &dtol, "solver convergence tolerance [default = 1e-12]"); - std::string problemFile = "stru2d"; - clp.setOption("problem", &problemFile, "string for problem file (e.g. 'stru2d' expects 'stru2d_A.txt', 'stru2d_b.txt' and 'stru2d_ns.txt')"); - std::string coordsFile = ""; - clp.setOption("coordinates", &coordsFile, "file name containing coordinates in matrix market format"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - if (globalNumDofs == 0) { - std::cout << "Please specify '--globalNumDofs'! Simulation cannot run without that parameter correctly set" << std::endl; - return EXIT_FAILURE; - } - - int nLocalDofs = (int)globalNumDofs / nProcs; - nLocalDofs = nLocalDofs - (nLocalDofs % nDofsPerNode); - int nCumulatedDofs = 0; - MueLu_sumAll(comm, nLocalDofs, nCumulatedDofs); - - if (comm->getRank() == nProcs - 1) { - nLocalDofs += globalNumDofs - nCumulatedDofs; - } - - // read in problem - Epetra_Map emap(globalNumDofs, nLocalDofs, 0, *Xpetra::toEpetra(comm)); - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - std::cout << "Reading matrix market file" << std::endl; - - std::stringstream ssA, ssB, ssNS; - ssA << problemFile << "_A.txt"; - ssB << problemFile << "_b.txt"; - ssNS << problemFile << "_ns.txt"; - std::string fileA = ssA.str(); - std::string fileB = ssB.str(); - std::string fileNS = ssNS.str(); - EpetraExt::MatrixMarketFileToCrsMatrix(fileA.c_str(), emap, emap, emap, ptrA); - EpetraExt::MatrixMarketFileToVector(fileB.c_str(), emap, ptrf); - EpetraExt::MatrixMarketFileToMultiVector(fileNS.c_str(), emap, ptrNS); - RCP epA = Teuchos::rcp(ptrA); - RCP epB = Teuchos::rcp(ptrf); - RCP epNS = Teuchos::rcp(ptrNS); - - // read in coordinates - RCP xCoords = Teuchos::null; - if (coordsFile != "") { - Epetra_MultiVector* ptrcoords = 0; - Epetra_Map coords_emap(globalNumDofs / nDofsPerNode, nLocalDofs / nDofsPerNode, 0, *Xpetra::toEpetra(comm)); - EpetraExt::MatrixMarketFileToMultiVector(coordsFile.c_str(), coords_emap, ptrcoords); - RCP epCoords = Teuchos::rcp(ptrcoords); - xCoords = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epCoords)); - } - - // Epetra_CrsMatrix -> Xpetra::Matrix - RCP exA = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epA)); - RCP crsOp = Teuchos::rcp(new CrsMatrixWrap(exA)); - RCP Op = Teuchos::rcp_dynamic_cast(crsOp); - Op->SetFixedBlockSize(nDofsPerNode); - - RCP xNS = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epNS)); - - // Epetra_Map -> Xpetra::Map - const RCP map = Xpetra::toXpetra(emap); - - ParameterListInterpreter mueLuFactory(xmlFileName, *comm); - RCP H = mueLuFactory.CreateHierarchy(); - RCP Finest = H->GetLevel(0); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); - Finest->Set("Nullspace", xNS); - if (xCoords != Teuchos::null) Finest->Set("Coordinates", xCoords); - - mueLuFactory.SetupHierarchy(*H); - -#ifdef HAVE_MUELU_AZTECOO - - H->IsPreconditioner(true); - MueLu::EpetraOperator mueluPrec(H); // Wrap MueLu preconditioner into an Epetra Operator - - // create a solution vector - RCP epX = rcp(new Epetra_Vector(epA->RowMap())); - epX->PutScalar((Scalar)0.0); - - Epetra_LinearProblem eProblem(epA.get(), epX.get(), epB.get()); - - // AMG as preconditioner within AztecOO - AztecOO solver(eProblem); - solver.SetPrecOperator(&mueluPrec); - if (dsolveType == "cg") - solver.SetAztecOption(AZ_solver, AZ_cg); - else if (dsolveType == "gmres") - solver.SetAztecOption(AZ_solver, AZ_gmres); - else { // use fix point method instead - solver.SetAztecOption(AZ_solver, AZ_fixed_pt); - } - solver.SetAztecOption(AZ_output, 1); - - solver.Iterate(500, dtol); - - { // TODO: simplify this - RCP mueluX = rcp(new Xpetra::EpetraVectorT(epX)); - RCP mueluB = rcp(new Xpetra::EpetraVectorT(epB)); - // Print relative residual norm - Teuchos::ScalarTraits::magnitudeType residualNorms = Utilities::ResidualNorm(*Op, *mueluX, *mueluB)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms << std::endl; - } -#endif // HAVE_MUELU_AZTECOO - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(true, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - return EXIT_SUCCESS; -#endif // #ifdef defined(HAVE_MUELU_EPETRA) and defined(HAVE_MUELU_SERIAL) -} diff --git a/packages/muelu/doc/Tutorial/src/MLParameterList.cpp b/packages/muelu/doc/Tutorial/src/MLParameterList.cpp deleted file mode 100644 index 2cce1ff9bcb9..000000000000 --- a/packages/muelu/doc/Tutorial/src/MLParameterList.cpp +++ /dev/null @@ -1,337 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include - -#include // getParametersFromXmlFile() -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) -#include -#include -#include -#endif - -#ifdef HAVE_MUELU_AZTECOO -#include -#endif - -#if defined(HAVE_MUELU_EPETRA) -#include - -#include -#include -#include - -// Galeri -#include -#include - -// prescribe types -// run plain Epetra -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Xpetra::EpetraNode Node; -#endif - -// Default problem is Laplace1D with nx = 8748. Use --help to list available options. - -int main(int argc, char *argv[]) { -#if defined(HAVE_MUELU_EPETRA) -#include - - using Teuchos::RCP; - using Teuchos::rcp; - - // - // MPI initialization using Teuchos - // - - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - RCP > comm = Teuchos::DefaultComm::getComm(); - - // - // Parameters - // - - // TODO: FIXME: option by default does not work for MueLu/Tpetra - - int nIts = 9; - - Teuchos::CommandLineProcessor clp(false); // Note: - - Galeri::Xpetra::Parameters matrixParameters(clp, 256); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - std::string xmlFileName; - clp.setOption("xml", &xmlFileName, "read parameters from a file. Otherwise, this example uses by default an hard-coded parameter list."); - int muelu = true; - clp.setOption("muelu", &muelu, "use muelu"); // TODO: bool instead of int - int ml = true; -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) - clp.setOption("ml", &ml, "use ml"); -#endif - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - // TODO: check -ml and --linAlgebra - - if (comm->getRank() == 0) { - std::cout << xpetraParameters << matrixParameters; - } - if (ml && xpetraParameters.GetLib() == Xpetra::UseTpetra) { - ml = false; - std::cout << "ML preconditionner can only be built if --linAlgebra=Epetra. Option --ml ignored" << std::endl; - } - - // - // Construct the problem - // - - // TUTORIALSPLIT =========================================================== - RCP map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm); - RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); - RCP A = Pr->BuildMatrix(); - // TUTORIALSPLIT =========================================================== - - // - // Preconditionner configuration - // - - // ML parameter list - RCP params; - if (xmlFileName != "") { - std::cout << "Reading " << xmlFileName << " ..." << std::endl; - // TUTORIALSPLIT =========================================================== - params = Teuchos::getParametersFromXmlFile(xmlFileName); - // TUTORIALSPLIT =========================================================== - - } else { - std::cout << "Using hard-coded parameter list:" << std::endl; - // TUTORIALSPLIT =========================================================== - params = rcp(new Teuchos::ParameterList()); - - params->set("ML output", 10); - params->set("max levels", 2); - params->set("smoother: type", "symmetric Gauss-Seidel"); - - if (xpetraParameters.GetLib() == Xpetra::UseTpetra) - params->set("coarse: type", "Amesos-Superlu"); - else - params->set("coarse: type", "Amesos-KLU"); - // TUTORIALSPLIT =========================================================== - } - - std::cout << "Initial parameter list" << std::endl; - std::cout << *params << std::endl; - - if (muelu) { - // - // Construct a multigrid preconditioner - // - - // Multigrid Hierarchy - // TUTORIALSPLIT =========================================================== - std::string paramXML = MueLu::ML2MueLuParameterTranslator::translate(*params, ""); - params = Teuchos::getParametersFromXmlString(paramXML); - ParameterListInterpreter mueLuFactory(*params); - RCP H = mueLuFactory.CreateHierarchy(); - // TUTORIALSPLIT =========================================================== - - // build default null space - LocalOrdinal numPDEs = 1; - if (A->IsView("stridedMaps") == true) { - Xpetra::viewLabel_t oldView = A->SwitchToView("stridedMaps"); // note: "stridedMaps are always non-overlapping (correspond to range and domain maps!) - numPDEs = Teuchos::rcp_dynamic_cast(A->getRowMap())->getFixedBlockSize(); - oldView = A->SwitchToView(oldView); - } - - // TUTORIALSPLIT =========================================================== - RCP nullspace = MultiVectorFactory::Build(A->getDomainMap(), numPDEs); - - for (int i = 0; i < numPDEs; ++i) { - Teuchos::ArrayRCP nsValues = nullspace->getDataNonConst(i); - int numBlocks = nsValues.size() / numPDEs; - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * numPDEs + i] = 1.0; - } - } - // TUTORIALSPLIT =========================================================== - H->GetLevel(0)->Set("Nullspace", nullspace); - H->GetLevel(0)->Set("A", A); - // TUTORIALSPLIT =========================================================== - - // - // build hierarchy - // - // TUTORIALSPLIT =========================================================== - mueLuFactory.SetupHierarchy(*H); - // TUTORIALSPLIT =========================================================== - - // - // Solve Ax = b - // - - RCP X = VectorFactory::Build(map); - RCP B = VectorFactory::Build(map); - - X->putScalar((Scalar)0.0); - B->setSeed(846930886); - B->randomize(); - - // AMG as a standalone solver - H->IsPreconditioner(false); - H->Iterate(*B, *X, nIts); - - // Print relative residual norm - Teuchos::ScalarTraits::magnitudeType residualNorms = Utils::ResidualNorm(*A, *X, *B)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms << std::endl; - -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AZTECOO) - if (xpetraParameters.GetLib() == Xpetra::UseEpetra) { // TODO: should be doable with Tpetra too - - // AMG as a preconditioner - - // TODO: name mueluPrec and mlPrec not - - H->IsPreconditioner(true); - MueLu::EpetraOperator mueluPrec(H); // Wrap MueLu preconditioner into an Epetra Operator - - // - // Solve Ax = b - // - RCP eA; // duplicate code - { // TODO: simplify this - RCP xCrsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP xCrsMtx = xCrsOp->getCrsMatrix(); - RCP > eCrsMtx = Teuchos::rcp_dynamic_cast >(xCrsMtx, true); - eA = eCrsMtx->getEpetra_CrsMatrixNonConst(); - } - - RCP eX = rcp(new Epetra_Vector(eA->RowMap())); - RCP eB = rcp(new Epetra_Vector(eA->RowMap())); - - eX->PutScalar((Scalar)0.0); - eB->SetSeed(846930886); - eB->Random(); - - Epetra_LinearProblem eProblem(eA.get(), eX.get(), eB.get()); - - // AMG as a standalone solver - AztecOO solver(eProblem); - solver.SetPrecOperator(&mueluPrec); - solver.SetAztecOption(AZ_solver, AZ_fixed_pt); - solver.SetAztecOption(AZ_output, 1); - - solver.Iterate(nIts, 1e-10); - - { // TODO: simplify this - RCP mueluX = rcp(new Xpetra::EpetraVector(eX)); - RCP mueluB = rcp(new Xpetra::EpetraVector(eB)); - // Print relative residual norm - Teuchos::ScalarTraits::magnitudeType residualNorms2 = Utils::ResidualNorm(*A, *mueluX, *mueluB)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms2 << std::endl; - } - - // TODO: AMG as a preconditioner (AZ_cg) - } -#endif // HAVE_MUELU_AZTECOO - - } // if (muelu) - -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) - if (ml) { - std::cout << std::endl - << std::endl - << std::endl - << std::endl - << "**** ML ml ML ml ML" << std::endl - << std::endl - << std::endl - << std::endl; - - // - // Construct a multigrid preconditioner - // - - // Multigrid Hierarchy - // TUTORIALSPLIT =========================================================== - RCP crsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP crsMtx = crsOp->getCrsMatrix(); - RCP > epetraCrsMtx = Teuchos::rcp_dynamic_cast >(crsMtx, true); - RCP epetra_CrsMtx = epetraCrsMtx->getEpetra_CrsMatrix(); - - RCP eA; - { - // TUTORIALSPLIT =========================================================== - RCP xCrsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP xCrsMtx = xCrsOp->getCrsMatrix(); - RCP > eCrsMtx = Teuchos::rcp_dynamic_cast >(xCrsMtx, true); - eA = eCrsMtx->getEpetra_CrsMatrixNonConst(); - // TUTORIALSPLIT =========================================================== - } - // TUTORIALSPLIT =========================================================== - RCP mlPrec = rcp(new ML_Epetra::MultiLevelPreconditioner(*eA, *params)); - // TUTORIALSPLIT =========================================================== -#ifdef HAVE_MUELU_AZTECOO - - // - // Solve Ax = b - // - - RCP eX = rcp(new Epetra_Vector(eA->RowMap())); - RCP eB = rcp(new Epetra_Vector(eA->RowMap())); - - eX->PutScalar((Scalar)0.0); - eB->SetSeed(846930886); - eB->Random(); - - Epetra_LinearProblem eProblem(eA.get(), eX.get(), eB.get()); - - // AMG as a standalone solver - AztecOO solver(eProblem); - solver.SetPrecOperator(mlPrec.get()); - solver.SetAztecOption(AZ_solver, AZ_fixed_pt); - solver.SetAztecOption(AZ_output, 1); - - solver.Iterate(nIts, 1e-10); - - { // TODO: simplify this - RCP mueluX = rcp(new Xpetra::EpetraVector(eX)); - RCP mueluB = rcp(new Xpetra::EpetraVector(eB)); - // Print relative residual norm - Teuchos::ScalarTraits::magnitudeType residualNorms = Utils::ResidualNorm(*A, *mueluX, *mueluB)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms << std::endl; - } - - // TODO: AMG as a preconditioner (AZ_cg) -#else - std::cout << "Enable AztecOO to see solution" << std::endl; -#endif // HAVE_MUELU_AZTECOO - - std::cout << "Parameter list after ML run" << std::endl; - const Teuchos::ParameterList ¶msAfterML = mlPrec->GetList(); - std::cout << paramsAfterML << std::endl; - - } // if (ml) - -#endif // HAVE_MUELU_ML && HAVE_MUELU_EPETRA -#endif // #if defined(HAVE_MUELU_EPETRA) and defined(HAVE_MUELU_SERIAL) - return EXIT_SUCCESS; -} diff --git a/packages/muelu/doc/Tutorial/src/MueLu_Agg2VTK.py b/packages/muelu/doc/Tutorial/src/MueLu_Agg2VTK.py deleted file mode 100755 index f8eddaddd6d1..000000000000 --- a/packages/muelu/doc/Tutorial/src/MueLu_Agg2VTK.py +++ /dev/null @@ -1,448 +0,0 @@ -#!/usr/bin/env python -import sys -import os -import vtk -import random -from subprocess import Popen, PIPE, STDOUT -from vtk import * - -############################################ -# read in nodes file -def read_nodecoords_from_file(filename): - global_nodecoords = [] - for l in file(filename): - line = l.strip() - if len(line)==1: - dimension = int(line) - else: - line = line.split(" ") - x = float(line[0]) #+ 0.0001 * random.random() - y = float(line[1]) #+ 0.0001 * random.random() - if len(line) == 3: - z = float(line[2]) #+ 0.0001 * random.random() - global_nodecoords.append((x,y,z)) - else: - global_nodecoords.append((x,y)) - return global_nodecoords,dimension - -def read_finelevel_nodecoords_from_file(filename): - global_nodecoords = [] - dimension = 2 # we only support 2D aggregates here... - for l in file(filename): - line = l.strip() - if line.find("#") == 0: - continue - else: - while ' ' in line: - line = line.replace(' ', ' ') - line = line.split(" ") - x = float(line[2]) #+ 0.0001 * random.random() - y = float(line[3]) #+ 0.0001 * random.random() - global_nodecoords.append((x,y)) - return global_nodecoords,dimension - -# dimension: problem dimension, i.e. either 2 or 3 -# agg_globalnodeidx: global node ids of current aggregate -# global_nodecoords: coordinates of nodes -# aggpolygons: vtk append object for aggregates -# aggid: aggregate id (global) -# aggid2nodes: map aggid -> nodeid (for visualization) -# aggid2procs: map aggid -> proc id (for visualization) -def prepareDelaunayData3d(dimension, agg_globalnodeidx, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs): - - local_nodeidx2global_nodeidx = {} - no_of_aggnodes = len(agg_globalnodeidx) - no_aggs = len(aggid2nodes) - - Points = vtk.vtkPoints() - Vertices = vtk.vtkCellArray() - - for i in range(0,len(agg_globalnodeidx)): - id = -1 - local_nodeidx2global_nodeidx[i] = agg_globalnodeidx[i] - nodecoords = global_nodecoords[int(agg_globalnodeidx[i])] - id = Points.InsertNextPoint(nodecoords[0]+ 0.0001 * random.random(),nodecoords[1]+ 0.0001 * random.random(),nodecoords[2]+ 0.0001 * random.random()) - Vertices.InsertNextCell(1) - Vertices.InsertCellPoint(id) - - polydata2 = vtk.vtkPolyData() - polydata2.SetPoints(Points) - polydata2.Modified() - polydata2.Update() - - delaunay = vtk.vtkDelaunay3D() - delaunay.SetInput(polydata2) - delaunay.Update() - - # create surfaceFilter - surfaceFilter = vtk.vtkDataSetSurfaceFilter() - surfaceFilter.SetInputConnection(delaunay.GetOutputPort()) - surfaceFilter.Update() - - pt_polydata = surfaceFilter.GetOutput() - - lookupTable = vtk.vtkLookupTable() - lookupTable.SetNumberOfTableValues(no_aggs) - lookupTable.Build() - - Ids = vtk.vtkUnsignedIntArray() - Ids.SetNumberOfComponents(1) - Ids.SetName("Ids") - for i in range(0,Points.GetNumberOfPoints()): - Ids.InsertNextTuple1(int(aggid)) - Ids.SetLookupTable(lookupTable) - - Procs = vtk.vtkUnsignedCharArray() - Procs.SetNumberOfComponents(1) - Procs.SetName("proc") - for i in range(0,Points.GetNumberOfPoints()): - Procs.InsertNextTuple1(aggid2procs[aggid]) - - polydata3 = vtk.vtkPolyData() - polydata3 = surfaceFilter.GetOutput() - polydata3.GetPointData().SetScalars(Ids) - polydata3.GetPointData().AddArray(Procs) - - polydata4 = vtk.vtkPolyData() - polydata4.SetPoints(Points) - polydata4.SetVerts(Vertices) - polydata4.GetPointData().SetScalars(Ids) - polydata4.GetPointData().AddArray(Procs) - - #datamapper = vtk.vtkDataSetMapper() - #datamapper.SetInputConnection(delaunay.GetOutputPort()) - #datamapper.SetInput(polydata3) - - #actor = vtk.vtkActor() - #actor.SetMapper(datamapper) - - #renderer = vtk.vtkRenderer() - #renderWindow = vtk.vtkRenderWindow() - #renderWindow.AddRenderer(renderer) - #renderWindowInteractor = vtk.vtkRenderWindowInteractor() - #renderWindowInteractor.SetRenderWindow(renderWindow) - #renderer.AddActor(actor) - #renderWindow.Render() - #renderWindowInteractor.Start() - - #print polydata.GetVertices() - - aggpolygons.AddInput(polydata3) - aggpolygons.AddInput(polydata4) - -# dimension: problem dimension, i.e. either 2 or 3 -# agg_globalnodeidx: global node ids of current aggregate -# global_nodecoords: coordinates of nodes -# aggpolygons: vtk append object for aggregates -# aggid: aggregate id (global) -# aggid2nodes: map aggid -> nodeid (for visualization) -# aggid2procs: map aggid -> proc id (for visualization) -def prepareDelaunayData(dimension, agg_globalnodeidx, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs): - local_nodeidx2global_nodeidx = {} - no_of_aggnodes = len(agg_globalnodeidx) - dim = len(global_nodecoords[0]) - - no_aggs = len(aggid2nodes) - - Points = vtk.vtkPoints() - Vertices = vtk.vtkCellArray() - - for i in range(0,len(agg_globalnodeidx)): - local_nodeidx2global_nodeidx[i] = agg_globalnodeidx[i] - nodecoords = global_nodecoords[int(agg_globalnodeidx[i])] - if dimension==2: - id = Points.InsertNextPoint(nodecoords[0],nodecoords[1],0.0) - elif dimension==3: - id = Points.InsertNextPoint(nodecoords[0]+ 0.001 * random.random(),nodecoords[1]+ 0.001 * random.random(),nodecoords[2]+ 0.001 * random.random()) - Vertices.InsertNextCell(1) - Vertices.InsertCellPoint(id) - - # create polygon for current aggregate - polydata = vtk.vtkPolyData() - polydata.SetPoints(Points) - polydata.SetVerts(Vertices) - polydata.Modified() - polydata.Update() - - polydata2 = vtk.vtkPolyData() - if Points.GetNumberOfPoints()>2: # todo: avoid error messages + add support for lines/surfaces - # create delaunay object - if dimension==2: - delaunay = vtk.vtkDelaunay2D() - elif dimension==3: - delaunay = vtk.vtkDelaunay3D() - #delaunay.SetAlpha(0.1) - delaunay.SetInput(polydata) - delaunay.Update() - - # create surfaceFilter - surfaceFilter = vtk.vtkDataSetSurfaceFilter() - surfaceFilter.SetInputConnection(delaunay.GetOutputPort()) - surfaceFilter.Update() - - polydata2 = surfaceFilter.GetOutput() - - lookupTable = vtk.vtkLookupTable() - lookupTable.SetNumberOfTableValues(no_aggs) - lookupTable.Build() - - Ids = vtk.vtkUnsignedIntArray() - Ids.SetNumberOfComponents(1) - Ids.SetName("Ids") - for i in range(0,Points.GetNumberOfPoints()): - Ids.InsertNextTuple1(int(aggid)) - Ids.SetLookupTable(lookupTable) - - Procs = vtk.vtkUnsignedCharArray() - Procs.SetNumberOfComponents(1) - Procs.SetName("proc") - for i in range(0,Points.GetNumberOfPoints()): - Procs.InsertNextTuple1(aggid2procs[aggid]) - - - polydata2.SetPoints(Points) - polydata2.SetVerts(Vertices) - polydata2.GetPointData().SetScalars(Ids) - polydata2.GetPointData().AddArray(Procs) - polydata2.Modified() - polydata2.Update() - - aggpolygons.AddInput(polydata2) - - -################################################################################ -# READ IN AGGREGATES -# routines that read aggregation information from files - -def checkAggregateLine(line): - if line.find("Agg ") == 0: - return 1,line - else: - return 0,line - -def read_aggregates_from_file(filename,procid): - aggid2nodes = {} - aggid2procs = {} - for l in file(filename): - line = l.strip() - - # filter out only Agg lines - ret,line = checkAggregateLine(line) - if ret == 0: - continue - - # line now contains a list of all tokens in that line - line = line.split(": ") - - # extract aggid and proc number - agginfo = line[0] - agginfo = agginfo.split(" ") - - aggid = agginfo[1] - procid = agginfo[3] - - # handle node ids for aggregate - aggnodeids = line[1] - aggnodeids = aggnodeids.split(" ") - - # fill in data variables - aggid2nodes[aggid] = aggnodeids - aggid2procs[aggid] = int(procid) - - return aggid2nodes,aggid2procs - -################################################################################ -# read in aggregation info from file -# input: filename_prototype string with prototype for filename, e.g. aggs_level%LEVEL_proc%PROCS.outlines -# the variables %LEVEL and %PROCS are replaced by the corresponding values -# input: procs: number of processors (4 means that information from processors 0..3 is expected) -# input: level: level number -def readin_aggregates(filename_prototype,procs,level): - aggid2nodes = {} - aggid2procs = {} - for proc in range(0,procs): - #filename = "aggs_level" + str(level) + "_proc" + str(proc) + ".out" - filename = filename_prototype - filename = filename.replace("%LEVEL",str(level)) - filename = filename.replace("%PROC",str(proc)) - print "process ", filename - if os.path.exists(filename): - [aggid2nodesfromproc,aggid2procsfromproc] = read_aggregates_from_file(filename,proc) - aggid2nodes.update(aggid2nodesfromproc) - aggid2procs.update(aggid2procsfromproc) - - return aggid2nodes,aggid2procs - -################################################################################ -# HELPER ROUTINES -# for generating next level information (nodesX.txt) - -################################################################################ -# get_agg_coords (helper function for get_rootnodes) -# input: list of nodes (coordinates) -# input: map aggid2gids: map of local agg ids -> GIDs -# input: aggid: global aggregate id -# output: returns set of node coordinates for aggregate with global aggid -def get_agg_coords(nodes,aggid2nodes,aggid): - agg_nodes = aggid2nodes[aggid] - nodeset = [] - for node in range(0,len(agg_nodes)): - nodeset.append(nodes[int(agg_nodes[node])]) - return nodeset - -################################################################################ -# get rootnodes -# input: aggs = map: aggid -> list of nodeids in this agg -# output: list of rootnodes -# note: we calculate the "midpoint" of each aggregate -# TODO extend me for 3d! -def get_rootnodes(aggid2nodes,nodes): - dim = 2 - if len(nodes[0]) == 3: - dim = 3 - - rootnodes = [] - for i in range(0,len(aggid2nodes.keys())): - rootnodes.append((0,0)) - for k in aggid2nodes.keys(): - - nodecoords = get_agg_coords(nodes,aggid2nodes,k) - - x = 0.0 - y = 0.0 - z = 0.0 - for m in nodecoords: - - x = x + m[0] - y = y + m[1] - if dim==3: - z = z + m[2] - x = x/len(aggid2nodes[k]) - y = y/len(aggid2nodes[k]) - if dim == 3: - z = z/len(aggid2nodes[k]) - - if dim == 2: - rootnodes[int(k)] = (x,y) - elif dim == 3: - rootnodes[int(k)] = (x,y,z) - else: print "error: dim must be 2 or 3 but it is " + str(dim) - - return rootnodes - -# write nodes file -# input: filename: filename for nodes file (should follow nodeX.txt style) -# input: aggid2nodes map for aggid to list of global nodeidx -# input: nodes list of node coordinates -# input: dimension (2 or 3) -def write_nodes_file(filename,aggid2nodes,nodes,dimension): - - # calculate root nodes (works only for 2d) - rootnodes = get_rootnodes(aggid2nodes,nodes) - - # write nodes file - f = open(filename,"w") - f.write(str(dimension)) - f.write("\r\n") - for i in range(len(rootnodes)): - rootnode = rootnodes[i] - f.write(str(rootnode[0])) - f.write(" ") - f.write(str(rootnode[1])) - if len(rootnode)==3: - f.write(" ") - f.write(str(rootnode[2])) - f.write("\r\n") - f.close() - print "node file " + filename + " generated: OK" - -################################################################################ -# check if all files exist to proceed with next level -# we need a nodesX.txt file for the node coordinates -# and all aggregation information files (from the AggregationExportFactory) -# input: nextlevel: id for next level -# procs: number of procs -# file_prototype: prototype for filename of aggregation information -def check_files_for_next_level(nextlevel,procs,file_prototype): - - if nextlevel==0: - if os.path.isfile("example.txt") == False: - return False - else: - # check if coarse level node coordinates are available - if os.path.isfile("nodes"+str(nextlevel)+".txt") == False: - return False - - #for p in range(0,procs): - for p in range(0,1): # check only processor one - filename = file_prototype - filename = filename.replace("%LEVEL",str(nextlevel)) - filename = filename.replace("%PROC",str(p)) - if os.path.isfile(filename) == False: - return False - - return True - -########### -# MAIN routine -def main(argv=None): - dimension = 2 - numprocs = 2 - level = 0 # startlevel - - no_multigridlevels = 0 - - # check how many processors generated aggregation output - #while check_files_for_next_level(0,numprocs, "aggs_level%LEVEL_proc%PROC.out") == True: - # numprocs = numprocs + 1 - #numprocs = numprocs - 1 - #print "Aggregtaion information for " + str(numprocs) + " processors found" - - # process all multigrid levels - while check_files_for_next_level(level,numprocs,"aggs_level%LEVEL_proc%PROC.out"): - global_nodecoords = [] - - print "Level " + str(level) - - if level==0: # read in coordinates (finest level - global_nodecoords,dimension = read_finelevel_nodecoords_from_file("example.txt") - else: - global_nodecoords,dimension = read_nodecoords_from_file("nodes"+str(level)+".txt") - - # read aggregates - aggid2nodes, aggid2procs = readin_aggregates("aggs_level%LEVEL_proc%PROC.out",numprocs,level) - - # vtk polygon for output - aggpolygons = vtk.vtkAppendPolyData() - - # collect all aggregates - for aggid,agg_nodes in aggid2nodes.iteritems(): - # build an aggregate - if dimension==2: - prepareDelaunayData(dimension, agg_nodes, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs) - else: - prepareDelaunayData3d(dimension, agg_nodes, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs) - - #aggpolygons.GetOutput().GetPointData().SetVectors(vtkDisplacementVector) - #aggpolygons.Update() - - writer = vtk.vtkXMLPolyDataWriter() - fname = "aggs"+str(level)+".vtp" - writer.SetFileName(fname) - writer.SetInput(aggpolygons.GetOutput()) - writer.Write() - - - write_nodes_file("nodes"+str(level+1)+".txt",aggid2nodes,global_nodecoords,dimension) - - # increment number of multigrid levels that have been found in the files - if no_multigridlevels < level: - no_multigridlevels = level - - print "VTK Export for level " + str(level) + " finished...\r\n" - - level = level + 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/packages/muelu/doc/Tutorial/src/ScalingTest.cpp b/packages/muelu/doc/Tutorial/src/ScalingTest.cpp deleted file mode 100644 index 872879f5f99d..000000000000 --- a/packages/muelu/doc/Tutorial/src/ScalingTest.cpp +++ /dev/null @@ -1,660 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include - -// Teuchos -#include -#include -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_RAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_RepartitionFactory.hpp" -#include "MueLu_RebalanceTransferFactory.hpp" -#include "MueLu_CoordinatesTransferFactory.hpp" -#include "MueLu_ZoltanInterface.hpp" -#include "MueLu_RebalanceAcFactory.hpp" -#include "MueLu_CoalesceDropFactory.hpp" - -// Belos -#ifdef HAVE_MUELU_BELOS -#include "BelosConfigDefs.hpp" -#include "BelosLinearProblem.hpp" -#include "BelosBlockCGSolMgr.hpp" -#include "BelosBlockGmresSolMgr.hpp" -#include "BelosXpetraAdapter.hpp" // this header defines Belos::XpetraOp() -#include "BelosMueLuAdapter.hpp" // this header defines Belos::MueLuOp() -#endif - -#ifdef HAVE_MUELU_ISORROPIA -#include "MueLu_IsorropiaInterface.hpp" -#endif - -// -typedef double Scalar; -typedef int LocalOrdinal; -// FIXME we need a HAVE_MUELU_LONG_LONG_INT option -// -// NOTE (mfh 11 Aug 2015) I just added a HAVE_XPETRA_INT_LONG_LONG option. - -#ifdef HAVE_XPETRA_INT_LONG_LONG -typedef long long int GlobalOrdinal; -#else -typedef int GlobalOrdinal; -#endif -// -typedef Tpetra::KokkosClassic::DefaultNode::DefaultNodeType Node; -// - -int main(int argc, char *argv[]) { -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using Teuchos::TimeMonitor; - // using Galeri::Xpetra::CreateCartesianCoordinates; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - // USER GUIDE // define communicator - RCP > comm = Teuchos::DefaultComm::getComm(); - // USER GUIDE // create fancy output stream - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - -// out->setOutputToRootOnly(-1); -// out->precision(12); - -// FIXME we need a HAVE_MUELU_LONG_LONG_INT option -// -// NOTE (mfh 11 Aug 2015) I just added a HAVE_XPETRA_INT_LONG_LONG option. -// -#ifndef HAVE_XPETRA_INT_LONG_LONG - *out << "Warning: scaling test was not compiled with long long int support" << std::endl; -#endif - - // - // SET TEST PARAMETERS - // - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561 = 3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748 = 4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // Custom command line parameters - int optDump = 0; - clp.setOption("dump", &optDump, "write matrix to file"); - int optTimings = 0; - clp.setOption("timings", &optTimings, "print timings to screen"); - - // - Levels - LO optMaxLevels = 10; - clp.setOption("maxLevels", &optMaxLevels, "maximum number of levels allowed"); - int optMaxCoarseSize = 50; - clp.setOption("maxCoarseSize", &optMaxCoarseSize, "maximum #dofs in coarse operator"); // FIXME clp doesn't like long long int - - // - Smoothed-Aggregation - Scalar optSaDamping = 4. / 3; - clp.setOption("saDamping", &optSaDamping, "prolongator damping factor"); - - // - Aggregation - std::string optAggOrdering = "natural"; - clp.setOption("aggOrdering", &optAggOrdering, "aggregation ordering strategy (natural, random, graph)"); - int optMinPerAgg = 2; - clp.setOption("minPerAgg", &optMinPerAgg, "minimum #DOFs per aggregate"); - int optMaxNbrSel = 0; - clp.setOption("maxNbrSel", &optMaxNbrSel, "maximum # of nbrs allowed to be in other aggregates"); - - // - R - int optExplicitR = 1; - clp.setOption("explicitR", &optExplicitR, "restriction will be explicitly stored as transpose of prolongator"); - - // - Smoothers - std::string optSmooType = "sgs"; - clp.setOption("smooType", &optSmooType, "smoother type ('l1-sgs', 'sgs 'or 'cheby')"); - int optSweeps = 2; - clp.setOption("sweeps", &optSweeps, "sweeps to be used in SGS (or Chebyshev degree)"); - - // - Repartitioning -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) - int optRepartition = 1; - clp.setOption("repartition", &optRepartition, "enable repartitioning (0=no repartitioning, 1=Zoltan RCB, 2=Isorropia+Zoltan PHG"); - LO optMinRowsPerProc = 2000; - clp.setOption("minRowsPerProc", &optMinRowsPerProc, "min #rows allowable per proc before repartitioning occurs"); - double optNnzImbalance = 1.2; - clp.setOption("nnzImbalance", &optNnzImbalance, "max allowable nonzero imbalance before repartitioning occurs"); -#else - int optRepartition = 0; -#endif // HAVE_MPI && HAVE_MUELU_ZOLTAN - - // - Solve - int optFixPoint = 1; - clp.setOption("fixPoint", &optFixPoint, "apply multigrid as solver"); - int optPrecond = 1; - clp.setOption("precond", &optPrecond, "apply multigrid as preconditioner"); - LO optIts = 10; - clp.setOption("its", &optIts, "number of multigrid cycles"); - double optTol = 1e-7; - clp.setOption("tol", &optTol, "stopping tolerance for Krylov method"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - RCP globalTimeMonitor = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: S - Global Time"))); - - matrixParameters.check(); - xpetraParameters.check(); - // TODO: check custom parameters - std::transform(optSmooType.begin(), optSmooType.end(), optSmooType.begin(), ::tolower); - Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); - - if (comm->getRank() == 0) { - std::cout << xpetraParameters << matrixParameters; - // TODO: print custom parameters // Or use paramList::print()! - } - - // - // CREATE INITIAL MATRIX */ - // - RCP map; - RCP A; - - RCP coordinates; - { - TimeMonitor tm(*TimeMonitor::getNewTimer("ScalingTest: 1 - Matrix Build")); - - map = MapFactory::Build(lib, matrixParameters.GetNumGlobalElements(), 0, comm); - Teuchos::RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - A = Pr->BuildMatrix(); - - if (matrixParameters.GetMatrixType() == "Laplace1D") { - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", map, matrixParameters.GetParameterList()); - } else if (matrixParameters.GetMatrixType() == "Laplace2D") { - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("2D", map, matrixParameters.GetParameterList()); - } else if (matrixParameters.GetMatrixType() == "Laplace3D") { - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("3D", map, matrixParameters.GetParameterList()); - } - } - - // - // - // - - // dump matrix to file - if (optDump) { - std::string fileName = "Amat.mm"; - Utils::Write(fileName, *A); - } - - // USER GUIDE // define near null space - RCP nullspace = MultiVectorFactory::Build(map, 1); - nullspace->putScalar((SC)1.0); - // USER GUIDE // - Teuchos::Array::magnitudeType> norms(1); - - nullspace->norm1(norms); - if (comm->getRank() == 0) - std::cout << "||NS|| = " << norms[0] << std::endl; - - // USER GUIDE // create new hierarchy - RCP > H; - // USER GUIDE // - - // - // - // SETUP - // - // - - { - TimeMonitor tm(*TimeMonitor::getNewTimer("ScalingTest: 2 - MueLu Setup")); - - // - // Hierarchy - // - - // USER GUIDE // instantiate new Hierarchy object - H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - H->SetMaxCoarseSize((GO)optMaxCoarseSize); - // USER GUIDE // - - // - // Finest level - // - - // USER GUIDE // create a fine level object - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", A); - Finest->Set("Nullspace", nullspace); - Finest->Set("Coordinates", coordinates); // FIXME: XCoordinates, YCoordinates, .. - // USER GUIDE // - - // - // FactoryManager - // - - // USER GUIDE // define a factory manager - FactoryManager M; - // USER GUIDE // - - // - // - // Aggregation - // - - { - RCP AggregationFact = rcp(new UncoupledAggregationFactory()); - *out << "========================= Aggregate option summary =========================" << std::endl; - *out << "min DOFs per aggregate : " << optMinPerAgg << std::endl; - *out << "min # of root nbrs already aggregated : " << optMaxNbrSel << std::endl; - AggregationFact->SetMinNodesPerAggregate(optMinPerAgg); // TODO should increase if run anything othpermRFacter than 1D - AggregationFact->SetMaxNeighAlreadySelected(optMaxNbrSel); - std::transform(optAggOrdering.begin(), optAggOrdering.end(), optAggOrdering.begin(), ::tolower); - if (optAggOrdering == "natural" || optAggOrdering == "random" || optAggOrdering == "graph") { - *out << "aggregate ordering : " << optAggOrdering << std::endl; - AggregationFact->SetOrdering(optAggOrdering); - } else { - std::string msg = - "main: bad aggregation option " - "" + - optAggOrdering + - "" - "."; - throw(MueLu::Exceptions::RuntimeError(msg)); - } - // AggregationFact->SetPhase3AggCreation(0.5); - M.SetFactory("Aggregates", AggregationFact); - - *out << "=============================================================================" << std::endl; - } - - // - // Transfer - // - - { - // - // Non rebalanced factories - // - - // USER GUIDE // declare some factories (potentially overwrite default factories) - RCP PFact = rcp(new SaPFactory()); - PFact->SetParameter("sa: damping factor", ParameterEntry(optSaDamping)); - - RCP RFact = rcp(new TransPFactory()); - - RCP AFact = rcp(new RAPFactory()); - AFact->setVerbLevel(Teuchos::VERB_HIGH); - // USER GUIDE // - - if (!optExplicitR) { - H->SetImplicitTranspose(true); - ParameterList Aclist = *(AFact->GetValidParameterList()); - Aclist.set("transpose: use implicit", true); - AFact->SetParameterList(Aclist); - if (comm->getRank() == 0) std::cout << "\n\n* ***** USING IMPLICIT RESTRICTION OPERATOR ***** *\n" - << std::endl; - } - - // - // Repartitioning (if needed) - // - - if (optRepartition == 0) { - // No repartitioning - - // USER GUIDE // configure factory manager - M.SetFactory("P", PFact); - M.SetFactory("R", RFact); - M.SetFactory("A", AFact); - // USER GUIDE // - - } else { -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) - // Repartitioning - - // The Factory Manager will be configured to return the rebalanced versions of P, R, A by default. - // Everytime we want to use the non-rebalanced versions, we need to explicitly define the generating factory. - RFact->SetFactory("P", PFact); - // - AFact->SetFactory("P", PFact); - AFact->SetFactory("R", RFact); - - // Transfer coordinates - RCP TransferCoordinatesFact = rcp(new CoordinatesTransferFactory()); - AFact->AddTransferFactory(TransferCoordinatesFact); // FIXME REMOVE - - // Compute partition (creates "Partition" object) - if (optRepartition == 1) { // use plain Zoltan Interface - - } else if (optRepartition == 2) { // use Isorropia + Zoltan interface - } - - // Repartitioning (creates "Importer" from "Partition") - RCP RepartitionFact = rcp(new RepartitionFactory()); - { - Teuchos::ParameterList paramList; - paramList.set("repartition: min rows per proc", optMinRowsPerProc); - paramList.set("repartition: max imbalance", optNnzImbalance); - RepartitionFact->SetParameterList(paramList); - } - RepartitionFact->SetFactory("A", AFact); - - if (optRepartition == 1) { - RCP ZoltanFact = rcp(new ZoltanInterface()); - ZoltanFact->SetFactory("A", AFact); - ZoltanFact->SetFactory("Coordinates", TransferCoordinatesFact); - RepartitionFact->SetFactory("Partition", ZoltanFact); - } else if (optRepartition == 2) { -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ISORROPIA) - RCP > isoInterface = rcp(new MueLu::IsorropiaInterface()); - isoInterface->SetFactory("A", AFact); - // we don't need Coordinates here! - RepartitionFact->SetFactory("Partition", isoInterface); -#else - if (comm->getRank() == 0) - std::cout << "Please recompile Trilinos with Isorropia support enabled." << std::endl; - return EXIT_FAILURE; -#endif - } - - // Reordering of the transfer operators - RCP RebalancedPFact = rcp(new RebalanceTransferFactory()); - RebalancedPFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Interpolation"))); - RebalancedPFact->SetFactory("P", PFact); - RebalancedPFact->SetFactory("Coordinates", TransferCoordinatesFact); - RebalancedPFact->SetFactory("Nullspace", M.GetFactory("Ptent")); // TODO - - RCP RebalancedRFact = rcp(new RebalanceTransferFactory()); - RebalancedRFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Restriction"))); - RebalancedRFact->SetFactory("R", RFact); - - // Compute Ac from rebalanced P and R - RCP RebalancedAFact = rcp(new RebalanceAcFactory()); - RebalancedAFact->SetFactory("A", AFact); - - // Configure FactoryManager - M.SetFactory("A", RebalancedAFact); - M.SetFactory("P", RebalancedPFact); - M.SetFactory("R", RebalancedRFact); - M.SetFactory("Nullspace", RebalancedPFact); - M.SetFactory("Coordinates", RebalancedPFact); - M.SetFactory("Importer", RepartitionFact); - -#else - TEUCHOS_TEST_FOR_EXCEPT(true); -#endif - } // optRepartition - - } // Transfer - - // - // Smoothers - // - - { - // USER GUIDE // define smoother object - std::string ifpackType; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)optSweeps); - ifpackList.set("relaxation: damping factor", (SC)1.0); - if (optSmooType == "sgs") { - ifpackType = "RELAXATION"; - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - } - // USER GUIDE // - else if (optSmooType == "l1-sgs") { - ifpackType = "RELAXATION"; - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - ifpackList.set("relaxation: use l1", true); - } else if (optSmooType == "cheby") { - ifpackType = "CHEBYSHEV"; - ifpackList.set("chebyshev: degree", (LO)optSweeps); - - if (matrixParameters.GetMatrixType() == "Laplace1D") { - ifpackList.set("chebyshev: ratio eigenvalue", (SC)3); - } else if (matrixParameters.GetMatrixType() == "Laplace2D") { - ifpackList.set("chebyshev: ratio eigenvalue", (SC)7); - } else if (matrixParameters.GetMatrixType() == "Laplace3D") { - ifpackList.set("chebyshev: ratio eigenvalue", (SC)20); - } - // ifpackList.set("chebyshev: max eigenvalue", (double) -1.0); - // ifpackList.set("chebyshev: min eigenvalue", (double) 1.0); - } - - // USER GUIDE // create smoother factory - RCP smootherPrototype = rcp(new TrilinosSmoother(ifpackType, ifpackList)); - M.SetFactory("Smoother", rcp(new SmootherFactory(smootherPrototype))); - // USER GUIDE // - } - - // - // Setup preconditioner - // - - // USER GUIDE // setup multigrid hierarchy - int startLevel = 0; - H->Setup(M, startLevel, optMaxLevels); - // USER GUIDE // - - } // end of Setup TimeMonitor - - /*{ // some debug output - // print out content of levels - std::cout << "FINAL CONTENT of multigrid levels" << std::endl; - for(LO l = 0; l < H->GetNumLevels(); l++) { - RCP coarseLevel = H->GetLevel(l); - coarseLevel->print(*out); - } - std::cout << "END FINAL CONTENT of multigrid levels" << std::endl; - } // end debug output*/ - - // - // - // SOLVE - // - // - - // USER GUIDE // Define X, B - RCP X = MultiVectorFactory::Build(map, 1); - RCP B = MultiVectorFactory::Build(map, 1); - - X->setSeed(846930886); - X->randomize(); - A->apply(*X, *B, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - B->norm2(norms); - B->scale(1.0 / norms[0]); - // USER GUIDE // - - // - // Use AMG directly as an iterative method - // - - if (optFixPoint) { - X->putScalar((SC)0.0); - - TimeMonitor tm(*TimeMonitor::getNewTimer("ScalingTest: 3 - Fixed Point Solve")); - - H->IsPreconditioner(false); - H->Iterate(*B, *X, optIts); - - } // optFixedPt - - // - // Use AMG as a preconditioner in Belos - // - -#ifdef HAVE_MUELU_BELOS - - if (optPrecond) { - RCP tm; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 5 - Belos Solve"))); - - // USER GUIDE // Operator and Multivector type that will be used with Belos - typedef MultiVector MV; - typedef Belos::OperatorT OP; - H->IsPreconditioner(true); - - // Define Operator and Preconditioner - Teuchos::RCP belosOp = Teuchos::rcp(new Belos::XpetraOp(A)); // Turns a Xpetra::Operator object into a Belos operator - Teuchos::RCP belosPrec = Teuchos::rcp(new Belos::MueLuOp(H)); // Turns a MueLu::Hierarchy object into a Belos operator - - // Construct a Belos LinearProblem object - RCP > belosProblem = rcp(new Belos::LinearProblem(belosOp, X, B)); - belosProblem->setLeftPrec(belosPrec); - - bool set = belosProblem->setProblem(); - if (set == false) { - if (comm->getRank() == 0) - std::cout << std::endl - << "ERROR: Belos::LinearProblem failed to set up correctly!" << std::endl; - return EXIT_FAILURE; - } - // USER GUIDE // - - // USER GUIDE // Belos parameter list - int maxIts = 100; - Teuchos::ParameterList belosList; - belosList.set("Maximum Iterations", maxIts); // Maximum number of iterations allowed - belosList.set("Convergence Tolerance", optTol); // Relative convergence tolerance requested - // belosList.set("Verbosity", Belos::Errors + Belos::Warnings + Belos::TimingDetails + Belos::StatusTestDetails); - belosList.set("Verbosity", Belos::Errors + Belos::Warnings + Belos::StatusTestDetails); - belosList.set("Output Frequency", 1); - belosList.set("Output Style", Belos::Brief); - - // Create an iterative solver manager - RCP > solver = rcp(new Belos::BlockCGSolMgr(belosProblem, rcp(&belosList, false))); - // USER GUIDE // - - // Perform solve - Belos::ReturnType ret = Belos::Unconverged; - try { - { - TimeMonitor tm2(*TimeMonitor::getNewTimer("ScalingTest: 5bis - Belos Internal Solve")); - // USER GUIDE // solve linear system - ret = solver->solve(); - // USER GUIDE // - } // end of TimeMonitor - - // Get the number of iterations for this solve. - if (comm->getRank() == 0) - std::cout << "Number of iterations performed for this solve: " << solver->getNumIters() << std::endl; - - // Compute actual residuals. - int numrhs = 1; - std::vector actual_resids(numrhs); // TODO: double? - std::vector rhs_norm(numrhs); - RCP resid = MultiVectorFactory::Build(map, numrhs); - - typedef Belos::OperatorTraits OPT; - typedef Belos::MultiVecTraits MVT; - - OPT::Apply(*belosOp, *X, *resid); - MVT::MvAddMv(-1.0, *resid, 1.0, *B, *resid); - MVT::MvNorm(*resid, actual_resids); - MVT::MvNorm(*B, rhs_norm); - *out << "---------- Actual Residuals (normalized) ----------" << std::endl - << std::endl; - for (int i = 0; i < numrhs; i++) { - double actRes = actual_resids[i] / rhs_norm[i]; - *out << "Problem " << i << " : \t" << actRes << std::endl; - // if (actRes > tol) { badRes = true; } - } - - } // try - - catch (...) { - if (comm->getRank() == 0) - std::cout << std::endl - << "ERROR: Belos threw an error! " << std::endl; - } - - // USER GUIDE // Check convergence - if (ret != Belos::Converged) { - if (comm->getRank() == 0) std::cout << std::endl - << "ERROR: Belos did not converge! " << std::endl; - } else { - if (comm->getRank() == 0) std::cout << std::endl - << "SUCCESS: Belos converged!" << std::endl; - } - // USER GUIDE // - tm = Teuchos::null; - - } // if (optPrecond) - -#endif // HAVE_MUELU_BELOS - - // - // Timer final summaries - // - - globalTimeMonitor = Teuchos::null; // stop this timer before summary - - if (optTimings) - TimeMonitor::summarize(); - - // - - return EXIT_SUCCESS; -} - -// TODO: add warning if: -// DEBUG_MODE, LONG_LONG or KLU - -/* test direct solve */ -/* if (optMaxLevels == 1) { - Teuchos::ParameterList amesosList; - amesosList.set("PrintTiming", true); - smootherPrototype = rcp(new DirectSolver("", amesosList)); - } -*/ - -// TODO: option one level diff --git a/packages/muelu/doc/Tutorial/src/ScalingTestParamList.cpp b/packages/muelu/doc/Tutorial/src/ScalingTestParamList.cpp deleted file mode 100644 index 44c727aa3cc7..000000000000 --- a/packages/muelu/doc/Tutorial/src/ScalingTestParamList.cpp +++ /dev/null @@ -1,494 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include - -#include - -#include // For Epetra only runs this points to FakeKokkos in Xpetra - -#include "Xpetra_ConfigDefs.hpp" -#include -#include - -// Galeri -#include -#include -#include -#include -// - -#include -#include -#include -#include // TODO: move into MueLu.hpp - -#include - -#include - -#ifdef HAVE_MUELU_BELOS -#include -#include -#include -#include -#include -#include // => This header defines Belos::XpetraOp -#include // => This header defines Belos::MueLuOp -#endif - -// Define default data types -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Tpetra::KokkosClassic::DefaultNode::DefaultNodeType Node; - -int main(int argc, char* argv[]) { -#include - - using Teuchos::ArrayRCP; - using Teuchos::ParameterList; - using Teuchos::RCP; - using Teuchos::rcp; - using Teuchos::TimeMonitor; - - // ========================================================================= - // MPI initialization using Teuchos - // ========================================================================= - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - RCP > comm = Teuchos::DefaultComm::getComm(); - - // ========================================================================= - // Convenient definitions - // ========================================================================= - typedef Teuchos::ScalarTraits STS; - SC zero = STS::zero(), one = STS::one(); - - // ========================================================================= - // Parameters initialization - // ========================================================================= - Teuchos::CommandLineProcessor clp(false); - - GO nx = 100, ny = 100, nz = 100; - Galeri::Xpetra::Parameters galeriParameters(clp, nx, ny, nz, "Laplace2D"); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of Xpetra - - std::string xmlFileName = "scalingTest.xml"; - clp.setOption("xml", &xmlFileName, "read parameters from a file [default = 'scalingTest.xml']"); - bool printTimings = true; - clp.setOption("timings", "notimings", &printTimings, "print timings to screen"); - int writeMatricesOPT = -2; - clp.setOption("write", &writeMatricesOPT, "write matrices to file (-1 means all; i>=0 means level i)"); - std::string dsolveType = "cg", solveType; - clp.setOption("solver", &dsolveType, "solve type: (none | cg | gmres | standalone)"); - double dtol = 1e-12, tol; - clp.setOption("tol", &dtol, "solver convergence tolerance"); - - std::string mapFile; - clp.setOption("map", &mapFile, "map data file"); - std::string matrixFile; - clp.setOption("matrix", &matrixFile, "matrix data file"); - std::string coordFile; - clp.setOption("coords", &coordFile, "coordinates data file"); - std::string nullFile; - clp.setOption("nullspace", &nullFile, "nullspace data file"); - int numRebuilds = 0; - clp.setOption("rebuild", &numRebuilds, "#times to rebuild hierarchy"); - int maxIts = 200; - clp.setOption("its", &maxIts, "maximum number of solver iterations"); - bool scaleResidualHistory = true; - clp.setOption("scale", "noscale", &scaleResidualHistory, "scaled Krylov residual history"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); - - ParameterList paramList; - Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, Teuchos::Ptr(¶mList), *comm); - bool isDriver = paramList.isSublist("Run1"); - if (isDriver) { - // update galeriParameters with the values from the XML file - ParameterList& realParams = galeriParameters.GetParameterList(); - - for (ParameterList::ConstIterator it = realParams.begin(); it != realParams.end(); it++) { - const std::string& name = realParams.name(it); - if (paramList.isParameter(name)) - realParams.setEntry(name, paramList.getEntry(name)); - } - } - - // Retrieve matrix parameters (they may have been changed on the command line) - // [for instance, if we changed matrix type from 2D to 3D we need to update nz] - ParameterList galeriList = galeriParameters.GetParameterList(); - - // ========================================================================= - // Problem construction - // ========================================================================= - std::ostringstream galeriStream; - comm->barrier(); - RCP globalTimeMonitor = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: S - Global Time"))); - RCP tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1 - Matrix Build"))); - - RCP A; - RCP map; - RCP coordinates; - RCP nullspace; - if (matrixFile.empty()) { - galeriStream << "========================================================\n" - << xpetraParameters << galeriParameters; - - // Galeri will attempt to create a square-as-possible distribution of subdomains di, e.g., - // d1 d2 d3 - // d4 d5 d6 - // d7 d8 d9 - // d10 d11 d12 - // A perfect distribution is only possible when the #processors is a perfect square. - // This *will* result in "strip" distribution if the #processors is a prime number or if the factors are very different in - // size. For example, np=14 will give a 7-by-2 distribution. - // If you don't want Galeri to do this, specify mx or my on the galeriList. - std::string matrixType = galeriParameters.GetMatrixType(); - - // Create map and coordinates - // In the future, we hope to be able to first create a Galeri problem, and then request map and coordinates from it - // At the moment, however, things are fragile as we hope that the Problem uses same map and coordinates inside - if (matrixType == "Laplace1D") { - map = Galeri::Xpetra::CreateMap(xpetraParameters.GetLib(), "Cartesian1D", comm, galeriList); - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", map, galeriList); - - } else if (matrixType == "Laplace2D" || matrixType == "Star2D" || - matrixType == "BigStar2D" || matrixType == "Elasticity2D") { - map = Galeri::Xpetra::CreateMap(xpetraParameters.GetLib(), "Cartesian2D", comm, galeriList); - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("2D", map, galeriList); - - } else if (matrixType == "Laplace3D" || matrixType == "Brick3D" || matrixType == "Elasticity3D") { - map = Galeri::Xpetra::CreateMap(xpetraParameters.GetLib(), "Cartesian3D", comm, galeriList); - coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("3D", map, galeriList); - } - - // Expand map to do multiple DOF per node for block problems - if (matrixType == "Elasticity2D") - map = Xpetra::MapFactory::Build(map, 2); - if (matrixType == "Elasticity3D") - map = Xpetra::MapFactory::Build(map, 3); - - galeriStream << "Processor subdomains in x direction: " << galeriList.get("mx") << std::endl - << "Processor subdomains in y direction: " << galeriList.get("my") << std::endl - << "Processor subdomains in z direction: " << galeriList.get("mz") << std::endl - << "========================================================" << std::endl; - - if (matrixType == "Elasticity2D" || matrixType == "Elasticity3D") { - // Our default test case for elasticity: all boundaries of a square/cube have Neumann b.c. except left which has Dirichlet - galeriList.set("right boundary", "Neumann"); - galeriList.set("bottom boundary", "Neumann"); - galeriList.set("top boundary", "Neumann"); - galeriList.set("front boundary", "Neumann"); - galeriList.set("back boundary", "Neumann"); - } - - RCP > Pr = - Galeri::Xpetra::BuildProblem(galeriParameters.GetMatrixType(), map, galeriList); - A = Pr->BuildMatrix(); - - if (matrixType == "Elasticity2D" || - matrixType == "Elasticity3D") { - nullspace = Pr->BuildNullspace(); - A->SetFixedBlockSize((galeriParameters.GetMatrixType() == "Elasticity2D") ? 2 : 3); - } - - } else { - if (!mapFile.empty()) - map = Utils2::ReadMap(mapFile, xpetraParameters.GetLib(), comm); - comm->barrier(); - - if (lib == Xpetra::UseEpetra) { - A = Utils::Read(matrixFile, map); - - } else { - // Tpetra matrix reader is still broken, so instead we read in - // a matrix in a binary format and then redistribute it - const bool binaryFormat = true; - A = Utils::Read(matrixFile, lib, comm, binaryFormat); - - if (!map.is_null()) { - RCP newMatrix = MatrixFactory::Build(map, 1); - RCP importer = ImportFactory::Build(A->getRowMap(), map); - newMatrix->doImport(*A, *importer, Xpetra::INSERT); - newMatrix->fillComplete(); - - A.swap(newMatrix); - } - } - map = A->getMap(); - - comm->barrier(); - - if (!coordFile.empty()) - coordinates = Utils2::ReadMultiVector(coordFile, map); - - if (!nullFile.empty()) - nullspace = Utils2::ReadMultiVector(nullFile, map); - } - - comm->barrier(); - tm = Teuchos::null; - - galeriStream << "Galeri complete.\n========================================================" << std::endl; - - int numReruns = 1; - if (paramList.isParameter("number of reruns")) - numReruns = paramList.get("number of reruns"); - - const bool mustAlreadyExist = true; - for (int rerunCount = 1; rerunCount <= numReruns; rerunCount++) { - ParameterList mueluList, runList; - - bool stop = false; - if (isDriver) { - runList = paramList.sublist("Run1", mustAlreadyExist); - mueluList = runList.sublist("MueLu", mustAlreadyExist); - } else { - mueluList = paramList; - stop = true; - } - - if (nullspace.is_null()) { - int blkSize = 1; - if (mueluList.isSublist("Matrix")) { - // Factory style parameter list - const Teuchos::ParameterList& operatorList = paramList.sublist("Matrix"); - if (operatorList.isParameter("PDE equations")) - blkSize = operatorList.get("PDE equations"); - - } else if (paramList.isParameter("number of equations")) { - // Easy style parameter list - blkSize = paramList.get("number of equations"); - } - - nullspace = MultiVectorFactory::Build(map, blkSize); - for (int i = 0; i < blkSize; i++) { - RCP domainMap = A->getDomainMap(); - GO indexBase = domainMap->getIndexBase(); - - ArrayRCP nsData = nullspace->getDataNonConst(i); - for (int j = 0; j < nsData.size(); j++) { - GO GID = domainMap->getGlobalElement(j) - indexBase; - - if ((GID - i) % blkSize == 0) - nsData[j] = Teuchos::ScalarTraits::one(); - } - } - } - - int runCount = 1; - do { - A->SetMaxEigenvalueEstimate(-one); - - solveType = dsolveType; - tol = dtol; - - int savedOut = -1; - FILE* openedOut = NULL; - if (isDriver) { - if (runList.isParameter("filename")) { - // Redirect all output into a filename We have to redirect all output, - // including printf's, therefore we cannot simply replace C++ cout - // buffers, and have to use heavy machinary (dup2) - std::string filename = runList.get("filename"); - if (numReruns > 1) - filename += "_run" + MueLu::toString(rerunCount); - filename += (lib == Xpetra::UseEpetra ? ".epetra" : ".tpetra"); - - savedOut = dup(STDOUT_FILENO); - openedOut = fopen(filename.c_str(), "w"); - dup2(fileno(openedOut), STDOUT_FILENO); - } - if (runList.isParameter("solver")) solveType = runList.get("solver"); - if (runList.isParameter("tol")) tol = runList.get("tol"); - } - - // Instead of checking each time for rank, create a rank 0 stream - RCP fancy = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - Teuchos::FancyOStream& out = *fancy; - out.setOutputToRootOnly(0); - - out << galeriStream.str(); - - // ========================================================================= - // Preconditioner construction - // ========================================================================= - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1.5 - MueLu read XML"))); - //============================================ SPLIT - RCP mueLuFactory = rcp(new ParameterListInterpreter(mueluList)); - //============================================ SPLIT - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 2 - MueLu Setup"))); - //============================================ SPLIT - RCP H; - //============================================ SPLIT - for (int i = 0; i <= numRebuilds; i++) { - A->SetMaxEigenvalueEstimate(-one); - //============================================ SPLIT - H = mueLuFactory->CreateHierarchy(); - H->GetLevel(0)->Set("A", A); - H->GetLevel(0)->Set("Nullspace", nullspace); - if (!coordinates.is_null()) - H->GetLevel(0)->Set("Coordinates", coordinates); - mueLuFactory->SetupHierarchy(*H); - //============================================ SPLIT - } - - comm->barrier(); - tm = Teuchos::null; - - // ========================================================================= - // System solution (Ax = b) - // ========================================================================= - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 3 - LHS and RHS initialization"))); - - RCP X = VectorFactory::Build(map); - RCP B = VectorFactory::Build(map); - - { - // we set seed for reproducibility - Utils::SetRandomSeed(*comm); - X->randomize(); - A->apply(*X, *B, Teuchos::NO_TRANS, one, zero); - - Teuchos::Array norms(1); - B->norm2(norms); - B->scale(one / norms[0]); - X->putScalar(zero); - } - tm = Teuchos::null; - - if (writeMatricesOPT > -2) { - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 3.5 - Matrix output"))); - H->Write(writeMatricesOPT, writeMatricesOPT); - tm = Teuchos::null; - } - - comm->barrier(); - if (solveType == "none") { - // Do not perform a solve - - } else if (solveType == "standalone") { - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 4 - Fixed Point Solve"))); - - H->IsPreconditioner(false); - H->Iterate(*B, *X, maxIts); - - } else if (solveType == "cg" || solveType == "gmres") { -#ifdef HAVE_MUELU_BELOS - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 5 - Belos Solve"))); - - // Operator and Multivector type that will be used with Belos - typedef MultiVector MV; - typedef Belos::OperatorT OP; - - H->IsPreconditioner(true); - - // Define Operator and Preconditioner - Teuchos::RCP belosOp = Teuchos::rcp(new Belos::XpetraOp(A)); // Turns a Xpetra::Matrix object into a Belos operator - Teuchos::RCP belosPrec = Teuchos::rcp(new Belos::MueLuOp(H)); // Turns a MueLu::Hierarchy object into a Belos operator - - // Construct a Belos LinearProblem object - RCP > belosProblem = rcp(new Belos::LinearProblem(belosOp, X, B)); - belosProblem->setRightPrec(belosPrec); - - bool set = belosProblem->setProblem(); - if (set == false) { - out << "\nERROR: Belos::LinearProblem failed to set up correctly!" << std::endl; - return EXIT_FAILURE; - } - - // Belos parameter list - Teuchos::ParameterList belosList; - belosList.set("Maximum Iterations", maxIts); // Maximum number of iterations allowed - belosList.set("Convergence Tolerance", tol); // Relative convergence tolerance requested - belosList.set("Verbosity", Belos::Errors + Belos::Warnings + Belos::StatusTestDetails); - belosList.set("Output Frequency", 1); - belosList.set("Output Style", Belos::Brief); - if (!scaleResidualHistory) - belosList.set("Implicit Residual Scaling", "None"); - - // Create an iterative solver manager - RCP > solver; - if (solveType == "cg") { - solver = rcp(new Belos::PseudoBlockCGSolMgr(belosProblem, rcp(&belosList, false))); - } else if (solveType == "gmres") { - solver = rcp(new Belos::BlockGmresSolMgr(belosProblem, rcp(&belosList, false))); - } - - // Perform solve - Belos::ReturnType ret = Belos::Unconverged; - try { - ret = solver->solve(); - - // Get the number of iterations for this solve. - out << "Number of iterations performed for this solve: " << solver->getNumIters() << std::endl; - - } catch (const std::exception& ex) { - out << std::endl - << "ERROR: Belos threw an error! The exception message is:" << std::endl; - std::cout << ex.what() << std::endl; - } - - catch (...) { - out << std::endl - << "ERROR: Belos threw an unknown error! " << std::endl; - } - - // Check convergence - if (ret != Belos::Converged) - out << std::endl - << "ERROR: Belos did not converge! " << std::endl; - else - out << std::endl - << "SUCCESS: Belos converged!" << std::endl; -#endif // ifdef HAVE_MUELU_BELOS - } else { - throw MueLu::Exceptions::RuntimeError("Unknown solver type: \"" + solveType + "\""); - } - comm->barrier(); - tm = Teuchos::null; - globalTimeMonitor = Teuchos::null; - - if (printTimings) - TimeMonitor::summarize(A->getRowMap()->getComm().ptr(), std::cout, false, true, false, Teuchos::Union, "", true); - - TimeMonitor::clearCounters(); - - if (isDriver) { - if (openedOut != NULL) { - dup2(savedOut, STDOUT_FILENO); - fclose(openedOut); - openedOut = NULL; - } - try { - runList = paramList.sublist("Run" + MueLu::toString(++runCount), mustAlreadyExist); - mueluList = runList.sublist("MueLu", mustAlreadyExist); - } catch (std::exception) { - stop = true; - } - } - - } while (stop == false); - } - - return 0; -} // main diff --git a/packages/muelu/doc/Tutorial/src/hands-on.py b/packages/muelu/doc/Tutorial/src/hands-on.py deleted file mode 100755 index c3f6acaa615b..000000000000 --- a/packages/muelu/doc/Tutorial/src/hands-on.py +++ /dev/null @@ -1,889 +0,0 @@ -#!/usr/bin/env python -import os -import sys -import math -import subprocess - -def getstatusoutput(cmd): - """Return (status, output) of executing cmd in a shell.""" - pipe = os.popen(cmd + ' 2>&1', 'r') - text = pipe.read() - sts = pipe.close() - if sts is None: sts = 0 - if text[-1:] == '\n': text = text[:-1] - return sts, text - - -def deleteDir(path): - """deletes the path entirely""" - cmd = "rm -rf "+path - result = getstatusoutput(cmd) - if(result[0]!=0): - raise RuntimeError(result[1]) - -def createDir(path): - """deletes the path entirely""" - cmd = "mkdir "+path - result = getstatusoutput(cmd) - if(result[0]!=0): - raise RuntimeError(result[1]) - -def runCommand(cmd): - """deletes the path entirely""" - result = getstatusoutput(cmd) - #if(result[0]!=0): - # raise RuntimeError(result[1]) - return result[1] - -def clearWindow(): - os.system('cls' if os.name == 'nt' else 'clear') - -def waitForKey(): - os.system("""bash -c 'read -s -n 1 -p "Press any key to continue..."'""") - print - -def is_number(s): - try: - float(s) - return True - except ValueError: - return False - -# some colors -class bcolors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - OKDARKGREEN = '\033[32m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - -def disable(self): - self.HEADER = '' - self.OKBLUE = '' - self.OKGREEN = '' - self.OKDARKGREEN = '' - self.WARNING = '' - self.FAIL = '' - self.ENDC = '' - - -class ProblemHandler(): - """Class for handling demonstration problems""" - - def __init__(self): - self.problem = "Laplace 2D" - self.solver = "cg" - self.executable = "MueLu_tutorial_laplace2d.exe" - self.meshx = 50 - self.meshy = 50 - self.mgsweeps = 1 - self.numprocs = 2 - self.xmlFileName = "xml/s2a.xml" - - self.proc1 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc2 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc3 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc4 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc5 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - - self.isDirty = True # flag to store, whether problem has to be rerun or not - - self.editor = "gedit" # TODO replace me by local editor... - - def main(self): - self.printMainMenu() - - def runMenu(self,options,callbacks): - for i,option in enumerate(options): - print('%s. %s' % (i, option)) # display all options - choice = raw_input('your choice? ') - if is_number(str(choice)) and int(choice) < len(options): - callbacks[int(choice)]() # call correspondending function - else: - print "ups: choice = " + str(choice) + " len(option)=" + str(len(option)) - - - - def doLaplace2Dn(self): - self.problem = "Laplace 2D" - self.executable = "MueLu_tutorial_laplace2d.exe" - self.solver = "cg" - self.meshx = raw_input("Mesh: Elements in x direction = ") - self.meshy = raw_input("Mesh: Elements in y direction = ") - self.runLaplaceProblem() - - def doLaplace2D50(self): - self.problem = "Laplace 2D" - self.executable = "MueLu_tutorial_laplace2d.exe" - self.solver = "cg" - self.meshx = 50 - self.meshy = 50 - self.runLaplaceProblem() - - def doRecirc2Dn(self): - self.problem = "Recirc 2D" - self.executable = "MueLu_tutorial_recirc2d.exe" - self.solver = "gmres" - self.meshx = raw_input("Mesh: Elements in x direction = ") - self.meshy = raw_input("Mesh: Elements in y direction = ") - self.runLaplaceProblem() # we can use the same routine as for Laplace... - - def doRecirc2D50(self): - self.problem = "Recirc 2D" - self.executable = "MueLu_tutorial_recirc2d.exe" - self.solver = "gmres" - self.meshx = 50 - self.meshy = 50 - self.runLaplaceProblem() # we can use the same routine as for Laplace... - - def doChallenge1(self): - m = MueLu_XMLChallengeMode() - m.numProcs = 1 # number of processors - m.globalNumDofs = 16641 # number of DOFs - m.nDofsPerNode = 1 # DOFs per node - m.solver = "gmres" # AztecOO solver - m.tol = 1e-12 # solver tolerance - m.executable = "./MueLu_Challenge_XML.exe" # executable - m.problem = "condif2d" # string describing problem - m.main() - - def doChallenge2(self): - m = MueLu_XMLChallengeMode() - m.numProcs = 1 # number of processors - m.globalNumDofs = 7020 # number of DOFs - m.nDofsPerNode = 2 # DOFs per node - m.solver = "cg" # AztecOO solver - m.tol = 1e-12 # solver tolerance - m.executable = "./MueLu_Challenge_XML.exe" # executable - m.problem = "stru2d" # string describing problem - m.main() - - def runLaplaceProblem(self): - # check whether xml file exists - - while self.xmlFileName == "" or not os.path.isfile(self.xmlFileName) or not os.access(self.xmlFileName, os.R_OK): - print bcolors.FAIL+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) + bcolors.FAIL + " invalid" + bcolors.ENDC - m = MueLu_XMLgenerator() - m.askForSolver() - self.xmlFileName = m.xmlFileName # store xml file - - while True: - self.printActionMenu() - - def printActionMenu(self): - #options = ['Rerun example', 'Show screen output', 'Change solver', 'Change processors', 'Exit'] - #callbacks = [self.runExample,self.printScreenOutput,self.changeSolver,self.changeProcs,self.doExitProgram] - options = ['Rerun simulation', 'Show screen output', 'Change solver', 'Open xml file', 'Change procs', 'Change MG sweeps','Plot solution','Plot residual norm over ' + self.solver + ' solver iterations','Postprocess aggregates', 'Exit'] - callbacks = [self.runExample,self.printScreenOutput,self.changeSolver,self.openXMLfile,self.changeProcs, self.changeMGsweeps,self.plotSolution,self.doPlotResidual, self.postprocessAggregates, self.doExitProgram] - while True: - clearWindow() - self.printSettings() - print "" - if self.isDirty == True: - print bcolors.FAIL+ "DO NOT FORGET TO RUN THE EXAMPLE (option 0)" + bcolors.ENDC - else: - print bcolors.OKDARKGREEN + "Results up to date!" + bcolors.ENDC - print "" - self.runMenu(options,callbacks) - - def runExample(self): - # runs example - print "PREPARE SIMULATON" - cmd = "rm *.vtp *.mat example*.txt output.log aggs*.txt nodes*.txt" - runCommand(cmd) - print "RUN EXAMPLE" - cmd = "mpirun -np " + str(self.numprocs) + " " + str(self.executable) + " --nx=" + str(self.meshx) + " --ny=" + str(self.meshy) + " --mgridSweeps=" + str(self.mgsweeps) + " --xml=" + str(self.xmlFileName) + " | tee output.log 2>&1" - print cmd - runCommand(cmd) - runCommand("echo 'Press q to return.' >> output.log") - print "POSTPROCESSING..." - runCommand("cat example*.txt > example.txt") - print "COMPLETE" - self.isDirty = False - waitForKey() - - def plotSolution(self): - #cmd = "gnuplot -persist << _TTT_" - #print cmd - #runCommand(cmd) - #cmd = "set dgrid3d " + str(self.meshy) + "," + str(self.meshx) + "\n set style data lines\n set nolabel \n set key off\n set autoscale\n splot " + "example.txt" + " using 3:4:5\n quit\n_TTT_" - #runCommand(cmd) - - #proc1 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc1.stdin.write("set term x11 1\n") - self.proc1.stdin.write("set title \"Solution\"\n") - self.proc1.stdin.write("set dgrid3d " + str(self.meshy) + "," + str(self.meshx) + "\n") - self.proc1.stdin.write("set style data lines\n") - self.proc1.stdin.write("set nolabel\n") - self.proc1.stdin.write("set key off\n") - self.proc1.stdin.write("set autoscale\n") - self.proc1.stdin.write("splot \"example.txt\" using 3:4:5\n") - #self.proc1.stdin.write("quit\n") #close the gnuplot window - self.proc1.stdin.flush() - - #proc2 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc2.stdin.write("set term x11 2\n") #wxt - if (self.mgsweeps==1): - self.proc2.stdin.write("set title \"Multigrid solution after " + str(self.mgsweeps) + " multigrid sweep\"\n") - else: - self.proc2.stdin.write("set title \"Multigrid solution after " + str(self.mgsweeps) + " multigrid sweeps\"\n") - self.proc2.stdin.write("set dgrid3d " + str(self.meshy) + "," + str(self.meshx) + "\n") - self.proc2.stdin.write("set style data lines\n") - self.proc2.stdin.write("set nolabel\n") - self.proc2.stdin.write("set key off\n") - self.proc2.stdin.write("set autoscale\n") - self.proc2.stdin.write("splot \"example.txt\" using 3:4:7\n") - #self.proc2.stdin.write("quit\n") #close the gnuplot window - self.proc2.stdin.flush() - - #proc3 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc3.stdin.write("set term x11 3\n") - if (self.mgsweeps==1): - self.proc3.stdin.write("set title \"Error (Exact vs. " + str(self.mgsweeps) + " multigrid sweep)\"\n") - else: - self.proc3.stdin.write("set title \"Error (Exact vs. " + str(self.mgsweeps) + " multigrid sweeps)\"\n") - self.proc3.stdin.write("set dgrid3d " + str(self.meshy) + "," + str(self.meshx) + "\n") - self.proc3.stdin.write("set style data lines\n") - self.proc3.stdin.write("set palette model RGB defined ( 0 'black', 1 'white')\n") - self.proc3.stdin.write("set nolabel\n") - self.proc3.stdin.write("set key off\n") - self.proc3.stdin.write("set autoscale\n") - self.proc3.stdin.write("set hidden3d\n") - self.proc3.stdin.write("set style line 1 lt 4 lw .5\n") - self.proc3.stdin.write("set pm3d\n") - self.proc3.stdin.write("splot \"example.txt\" using 3:4:($ 5-$ 7) with lines palette\n") - #self.proc3.stdin.write("quit\n") #close the gnuplot window - self.proc3.stdin.flush() - - #proc4 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - self.proc4.stdin.write("set term x11 4\n") - self.proc4.stdin.write("set title \"Distribution of processors\"\n") - self.proc4.stdin.write("set dgrid3d " + str(self.meshy) + "," + str(self.meshx) + "\n") - self.proc4.stdin.write("set style data lines\n") - self.proc4.stdin.write("set palette model RGB defined ( 0 'red', 1 'green', 2 'blue', 3 'yellow', 4 'pink')\n") - self.proc4.stdin.write("set nolabel\n") - self.proc4.stdin.write("set key off\n") - self.proc4.stdin.write("set autoscale\n") - self.proc4.stdin.write("set hidden3d\n") - self.proc4.stdin.write("set style line 1 lt 4 lw .5\n") - self.proc4.stdin.write("set pm3d\n") - self.proc4.stdin.write("splot \"example.txt\" using 3:4:1 with points palette\n") - #self.proc3.stdin.write("quit\n") #close the gnuplot window - self.proc3.stdin.flush() - - def postprocessAggregates(self): - # check whether "example.txt" is available - if os.path.isfile("example.txt") == False: - print bcolors.FAIL+"Simulation data not available. Run the simulation first." + bcolors.ENDC - waitForKey() - return - - if os.path.isfile("aggs_level0_proc0.out") == False: - print bcolors.FAIL+"No aggregation debug output found. Do not forget to turn on the AggregationExport factory in your xml file." + bcolors.ENDC - waitForKey() - return - - if os.path.isfile("MueLu_Agg2VTK.py"): - os.remove("MueLu_Agg2VTK.py") - o = open("MueLu_Agg2VTK.py","a") - for line in open("tmpl/MueLu_Agg2VTK.py_TMPL"): - line = line.replace("$NUMPROCS", str(self.numprocs)) - o.write(line) - o.close() - - print "POSTPROCESS AGGREGATION OUTPUT DATA" - cmd = "chmod 750 ./MueLu_Agg2VTK.py" - runCommand(cmd) - cmd = "./MueLu_Agg2VTK.py" - print runCommand(cmd) - - if os.path.isfile("aggs0.vtp") == False: - print bcolors.WARNING+"Seems that the postprocessing failed (vtp files could not be created)." + bcolors.ENDC - waitForKey() - return - - print bcolors.OKDARKGREEN+"Use paraview to visualize generated vtk files for aggregates." + bcolors.ENDC - waitForKey() - - def printScreenOutput(self): - clearWindow() - if not os.path.isfile("output.log") or not os.access("output.log", os.R_OK): - print bcolors.FAIL+"Screen output not available."+bcolors.ENDC - else: - print runCommand("less output.log") - waitForKey() - - def openXMLfile(self): - editor = subprocess.Popen([self.editor + " " + self.xmlFileName], shell=True, stdin=subprocess.PIPE, ) - - def printProblemSelectionMenu(self): - options = ['Laplace 2D (50x50)', 'Laplace 2D', 'Recirc 2D (50x50)', 'Recirc 2D', 'Challenge: Convection diffusion', 'Challenge: Elasticity problem', 'Exit'] - callbacks = [self.doLaplace2D50,self.doLaplace2Dn,self.doRecirc2D50,self.doRecirc2Dn,self.doChallenge1,self.doChallenge2, self.doExitProgram] - while True: - self.runMenu(options,callbacks) - - def changeSolver(self): - self.xmlFileName = raw_input("XML file name: ") - self.isDirty = True - while self.xmlFileName == "" or not os.path.isfile(self.xmlFileName) or not os.access(self.xmlFileName, os.R_OK): - print bcolors.FAIL+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) + bcolors.FAIL + " invalid" + bcolors.ENDC - m = MueLu_XMLgenerator() - m.xmlFileName=self.xmlFileName - m.generateXMLfile() - m.askForSolver() - m.generateXMLfile() - self.xmlFileName = m.xmlFileName # store xml file - - def changeProcs(self): - self.numprocs = raw_input("Number of processors: ") - while not is_number(str(self.numprocs)): - self.numprocs = raw_input("Number of processors: ") - self.isDirty = True - - def changeMGsweeps(self): - self.mgsweeps = raw_input("Number of Multigrid sweeps: ") - while not is_number(str(self.mgsweeps)): - self.mgsweeps = raw_input("Number of Multigrid sweeps: ") - self.isDirty = True - - def doPlotResidual(self): - - # prepare residual output file - cmd = "grep iter: output.log > output.res" - runCommand(cmd) - - self.proc5.stdin.write("set term x11 1\n") - self.proc5.stdin.write("set title \"Residual norm over " + str(self.solver) + " iterations\"\n") - self.proc5.stdin.write("set style data lines\n") - self.proc5.stdin.write("set xlabel \"# iterations\"\n") - self.proc5.stdin.write("set ylabel \"Relative residual\"\n") - self.proc5.stdin.write("set autoscale\n") - self.proc5.stdin.write("set logscale y\n") - printcmd = "plot \"output.res\" using 5 w linespoints title \"" + str(self.xmlFileName) + "\"\n" - self.proc5.stdin.write(printcmd) - self.proc5.stdin.flush() - - def printMainMenu(self): - clearWindow() - self.printSettings() - print "" - print "" - while True: - self.printProblemSelectionMenu() - - def doExitProgram(self): - print "CLEAN UP temporary data" - cmd = "rm *.vtp *.mat example*.txt output.log aggs*.txt nodes*.txt" - runCommand(cmd) - print "QUIT" - sys.exit() - - def printSettings(self): - ## print out all made settings for xml file - print bcolors.HEADER+"*************************** PROBLEM ****************************"+bcolors.ENDC - print bcolors.WARNING+"Problem type: "+bcolors.ENDC + str(self.problem) - print bcolors.WARNING+"Mesh: "+bcolors.ENDC + str(self.meshx) + "x" + str(self.meshy) - print "" - if self.xmlFileName == "" or not os.path.isfile(self.xmlFileName) or not os.access(self.xmlFileName, os.R_OK): - print bcolors.FAIL+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) + bcolors.FAIL + " invalid" + bcolors.ENDC - else: - print bcolors.WARNING+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) - print bcolors.WARNING+"Number of processors: "+bcolors.ENDC + str(self.numprocs) - print bcolors.WARNING+"Number of Multigrid solving sweeps: "+bcolors.ENDC + str(self.mgsweeps) - print bcolors.HEADER+"*************************** PROBLEM ****************************"+bcolors.ENDC - -class MueLu_XMLChallengeMode(): - """ Menu and options for challenge mode """ - - def __init__(self): - - self.numProcs = 1 # number of processors - self.globalNumDofs = 7020 # number of DOFs - self.nDofsPerNode = 2 # DOFs per node - self.solver = "cg" # AztecOO solver - self.tol = 1e-12 # solver tolerance - self.executable = "./MueLu_Challenge_XML.exe" # executable - self.problem = "stru2d" # string describing problem - self.xmlReferenceFileName = "" - self.xmlFileName = "" - self.isDirty = True # dirty flag - self.editor = "gedit" ### fix me - self.has_coords = False - - self.proc1 = subprocess.Popen(['gnuplot','-p'], shell=True, stdin=subprocess.PIPE, ) - - def main(self): - - # check if tar.gz file with data is in subfolder challenges: - if os.path.isfile("challenges/" + self.problem + ".tar.gz") == False: - cmd = "rm -Rf challenges" - runCommand(cmd) - print "Download additional files" - print bcolors.WARNING+"https://trilinos.org/wordpress/wp-content/uploads/2015/07/MueLu_tutorial_challenges.tar.gz"+bcolors.ENDC - cmd = "wget --no-check-certificate https://trilinos.org/wordpress/wp-content/uploads/2015/07/MueLu_tutorial_challenges.tar.gz" - runCommand(cmd) - print "Extract files..." - cmd = "tar xvf MueLu_tutorial_challenges.tar.gz" - runCommand(cmd) - print bcolors.OKDARKGREEN + "Success!" + bcolors.ENDC - - # generate results for reference xml files - self.xmlReferenceFileName = "challenges/" + self.problem + "_reference.xml" - - # copy file with reference parameters for this example - cmd = "cp challenges/" + self.problem + "_reference.xml " + self.problem + "_parameters.xml" - runCommand(cmd) - - self.xmlFileName = self.problem + "_parameters.xml" # xml parameter file - - if os.path.isfile("challenges/" + self.problem + "_coords.txt"): - self.has_coords = True - - self.doRunReference() - - while True: - self.printMainMenu() - - def runMenu(self,options,callbacks): - for i,option in enumerate(options): - print('%s. %s' % (i, option)) # display all options - choice = raw_input('your choice? ') - if is_number(str(choice)) and int(choice) < len(options): - callbacks[int(choice)]() # call correspondending function - - # print main menu for challenge mode - def printMainMenu(self): - clearWindow() - self.printSettings() - print "" - if self.isDirty == True: - print bcolors.FAIL+ "DO NOT FORGET TO RUN THE EXAMPLE (option 0)" + bcolors.ENDC - else: - print bcolors.OKDARKGREEN + "Results up to date!" + bcolors.ENDC - print "" - self.printResults() - print "" - - options = ['Run example','Show screen output', 'Change XML parameter file', 'Open xml file', 'Change procs', 'Change linear solver', 'Plot residual', 'Exit'] - callbacks = [self.doRunExample,self.printScreenOutput,self.changeSolver,self.openXMLfile,self.changeProcs, self.doSolverMenu,self.doPlotResidual, self.doExitProgram] - - self.runMenu(options,callbacks) - - def printSettings(self): - ## print out all made settings for xml file - print bcolors.HEADER+"*************************** PROBLEM ****************************"+bcolors.ENDC - print bcolors.WARNING+"Problem type: "+bcolors.ENDC + str(self.problem) - print bcolors.WARNING+"Problem size: "+bcolors.ENDC + str(self.globalNumDofs) - print "" - if self.xmlFileName == "" or not os.path.isfile(self.xmlFileName) or not os.access(self.xmlFileName, os.R_OK): - print bcolors.FAIL+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) + bcolors.FAIL + " invalid" + bcolors.ENDC - else: - print bcolors.WARNING+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) - print bcolors.WARNING+"Number of processors: "+bcolors.ENDC + str(self.numProcs) - print bcolors.WARNING+"Solver (Tolerance): "+bcolors.ENDC + str(self.solver) + " (" + str(self.tol) + ")" - print bcolors.HEADER+"*************************** PROBLEM ****************************"+bcolors.ENDC - - def printResults(self): - cmd = "grep 'total iterations:' output.log" - iter = runCommand(cmd) - cmd = "grep 'Solution time:' output.log" - time = runCommand(cmd) - cmd = "grep 'total iterations:' reference.log" - refiter = runCommand(cmd) - cmd = "grep 'Solution time:' reference.log" - reftime = runCommand(cmd) - print bcolors.HEADER+"*************************** RESULTS ****************************"+bcolors.ENDC - print "Reference settings:" - print str(refiter) - print str(reftime) - print "Your settings:" - print str(iter) - print str(time) - print bcolors.HEADER+"*************************** RESULTS ****************************"+bcolors.ENDC - - def doRunReference(self): - print "Please wait..." - # runs example - cmd = "rm -f *.vtp *.mat example*.txt output.log output.res reference.log reference.res aggs*.txt nodes*.txt" - runCommand(cmd) - cmd = "mpirun -np " + str(self.numProcs) + " " + str(self.executable) + " --globalNumDofs=" + str(self.globalNumDofs) + " --nDofsPerNode=" + str(self.nDofsPerNode) + " --solver=" + str(self.solver) + " --tol=" + str(self.tol) + " --xml=" + self.xmlReferenceFileName + " --problem=challenges/" + str(self.problem) + " --coordinates=challenges/" + str(self.problem) + "_coords.txt" + " | tee reference.log 2>&1" - runCommand(cmd) - self.isDirty = False - - - def doRunExample(self): - # runs example - print "PREPARE SIMULATON" - cmd = "rm -f *.vtp *.mat example*.txt output.log output.res aggs*.txt nodes*.txt" - runCommand(cmd) - print "RUN EXAMPLE" - cmd = "mpirun -np " + str(self.numProcs) + " " + str(self.executable) + " --globalNumDofs=" + str(self.globalNumDofs) + " --nDofsPerNode=" + str(self.nDofsPerNode) + " --solver=" + str(self.solver) + " --tol=" + str(self.tol) + " --xml=" + self.xmlFileName + " --problem=challenges/" + str(self.problem) + " --coordinates=challenges/" + str(self.problem) + "_coords.txt" + " | tee output.log 2>&1" - print cmd - runCommand(cmd) - runCommand("echo 'Press q to return.' >> output.log") - print "POSTPROCESSING..." - runCommand("cat example*.txt > example.txt") - print "COMPLETE" - self.isDirty = False - waitForKey() - - def printScreenOutput(self): - clearWindow() - if not os.path.isfile("output.log") or not os.access("output.log", os.R_OK): - print bcolors.FAIL+"Screen output not available."+bcolors.ENDC - else: - print runCommand("less output.log") - waitForKey() - - def changeSolver(self): - self.xmlFileName = raw_input("XML file name: ") - self.isDirty = True - while self.xmlFileName == "" or not os.path.isfile(self.xmlFileName) or not os.access(self.xmlFileName, os.R_OK): - print bcolors.FAIL+"Solver xml parameters: "+bcolors.ENDC + str(self.xmlFileName) + bcolors.FAIL + " invalid" + bcolors.ENDC - m = MueLu_XMLgenerator() - m.xmlFileName=self.xmlFileName - m.generateXMLfile() - m.askForSolver() - m.generateXMLfile() - self.xmlFileName = m.xmlFileName # store xml file - - def openXMLfile(self): - editor = subprocess.Popen([self.editor + " " + self.xmlFileName], shell=True, stdin=subprocess.PIPE, ) - - def changeProcs(self): - self.numProcs = raw_input("Number of processors: ") - while not is_number(str(self.numProcs)): - self.numProcs = raw_input("Number of processors: ") - self.isDirty = True - self.doRunReference() - - def doCGIteration(self): - self.solver = "cg" - self.isDirty = True - self.doRunReference() - def doGMRESIteration(self): - self.solver = "gmres" - self.isDirty = True - self.doRunReference() - - def doSolverMenu(self): - options = ['CG method', 'GMRES method'] - callbacks = [self.doCGIteration,self.doGMRESIteration] - #while self.exitLoop == False: - self.runMenu(options,callbacks) - #self.exitLoop=True #False - - def doPlotResidual(self): - - # prepare residual output file - cmd = "grep iter: output.log > output.res" - runCommand(cmd) - - # prepare reference data - cmd = "grep iter: reference.log > reference.res" - runCommand(cmd) - self.proc1.stdin.write("set term x11 1\n") - self.proc1.stdin.write("set title \"Residual norm over " + str(self.solver) + " iterations\"\n") - self.proc1.stdin.write("set style data lines\n") - self.proc1.stdin.write("set xlabel \"# iterations\"\n") - self.proc1.stdin.write("set ylabel \"Relative residual\"\n") - self.proc1.stdin.write("set autoscale\n") - self.proc1.stdin.write("set logscale y\n") - printcmd = "plot \"reference.res\" using 5 w linespoints title \"REFERENCE\", \"output.res\" using 5 w linespoints title \"" + str(self.xmlFileName) + "\"\n" - self.proc1.stdin.write(printcmd) - - self.proc1.stdin.flush() - - def doExitProgram(self): - runCommand("rm output.log reference.log output.res reference.res") - sys.exit() # terminate full program - - - # gnuplot commands - # set logscale y - # plot "temp.log" using 5 w linespoints - -class MueLu_XMLgenerator(): - """Simple generator for MueLu xml files.""" - - def __init__(self): - # common MG settings - self.xmlFileName = "" # output file name for xml data - self.maxMultLevels = 5 # maximum number of levels - self.maxCoarseSize = 1000 # max. coarse size - - # aggregate settings - self.dropTolerance = 0.0 - self.minAggSize = 4 - self.maxAggSize = 9 - self.maxNeighCount = 0 - - # smoother settings - self.levelSmoother = "Jacobi" - self.levelSmootherSweeps = 1 - self.levelSmootherDamp = 0.7 - self.coarseSolver = "Direct" - - # transfer operators - self.transferOps = "PA-AMG" - self.transferOpDamp = 1.33 - - # restriction operators - self.restrictionOp = "TransPFactory" - - # rebalancing - self.doRebalancing = False - self.minRowsPerProc = 800 - self.nnzImbalance = 1.1 - self.rebStartLevel = 1 - - self.isDirty = True # flag to store, whether changes have been saved or not - self.exitLoop = False # set to true to exit current loop - - print bcolors.FAIL+'===================================================================================='+bcolors.ENDC - print '===================================================================================='+bcolors.ENDC - - - - - def main(self): - #self.view, self.exit_view = self.setup_view() - #self.loop = urwid.MainLoop(self.view, self.palette, - # unhandled_input=self.unhandled_input) - #self.loop.run() - while True: - self.printMainMenu() - - def askForSolver(self): - - self.exitLoop = False - while self.exitLoop == False: - self.printMainMenu() - - def doFileName(self): - self.xmlFileName = raw_input("XML file name: ") - self.isDirty = True - - def doRelaxationMaxLevels(self): - self.maxMultLevels = raw_input("Max. multigrid levels: ") - self.isDirty = True - - def doRelaxationMaxCoarseSize(self): - self.maxCoarseSize = raw_input("Max. coarse size: ") - self.isDirty = True - - def doRelaxationJacobi(self): - self.levelSmoother = "Jacobi" - self.levelSmootherSweeps = raw_input("Smoother sweeps: ") - self.levelSmootherDamp = raw_input("Smoother damping: ") - self.isDirty = True - - def doRelaxationGS(self): - self.levelSmoother = "Gauss-Seidel" - self.levelSmootherSweeps = raw_input("Smoother sweeps: ") - self.levelSmootherDamp = raw_input("Smoother damping: ") - self.isDirty = True - - def doRelaxationSymGS(self): - self.levelSmoother = "Sym.Gauss-Seidel" - self.levelSmootherSweeps = raw_input("Smoother sweeps: ") - self.levelSmootherDamp = raw_input("Smoother damping: ") - self.isDirty = True - - def doDropTolerance(self): - self.dropTolerance = raw_input("Drop tolerance for matrix graph (default = 0.0): ") - self.isDirty = True - def doMinAggSize(self): - self.minAggSize = raw_input("Minimum number of nodes per aggregate: ") - self.isDirty - def doMaxAggSize(self): - self.maxAggSize = raw_input("Maximum number of nodes per aggregate: ") - self.isDirty - def doMaxNeigh(self): - self.maxNeighCount = raw_input("Maximum number of already aggregated neighbor nodes (default = 0): ") - self.isDirty - - # Transfer operators - def doPaAMG(self): - self.transferOps = "PA-AMG" - self.transferOpDamp = 0.0 - if self.restrictionOp == "GenericRFactory": - self.restrictionOp = "TransPFactory" - print bcolors.WARNING + "GenericRFactory cannot be used with non-smoothed PA-AMG prolongation operators. We change it back to TransPFactory."+bcolors.ENDC - print "" - print "Press any key to proceed" - waitForKey() - - self.isDirty = True - def doSaAMG(self): - self.transferOps = "SA-AMG" - self.transferOpDamp = raw_input("Transfer operator damping: ") - self.isDirty = True - def doPgAMG(self): - self.transferOps = "PG-AMG" - self.transferOpDamp = 0.0 - self.isDirty = True - - # Restriction operators - def doSymR(self): - self.restrictionOp = "TransPFactory" - self.isDirty = True - def doNonsymR(self): - self.restrictionOp = "GenericRFactory" - if self.transferOps == "PA-AMG": - self.restrictionOp = "TransPFactory" - print bcolors.WARNING+"GenericRFactory cannot be used with non-smoothed PA-AMG prolongation operators. We change it back to TransPFactory." - print "To use GenericRFactory you have to select either SaPFactory or PgPFactory for prolongation."+bcolors.ENDC - print "" - print "Press any key to proceed" - waitForKey() - self.isDirty = True - - # Rebalancing - def doRebalancingOption(self): - self.doRebalancing = True - self.minRowsPerProc = raw_input("Minimum number of DOFs per processor: ") - self.nnzImbalance = raw_input("Max. nonzero imbalance (default 1.1): ") - self.rebStartLevel = raw_input("Start rebalancing on level (default 1): ") - self.isDirty = True - - def doNoRebalancingOption(self): - self.doRebalancing = False - self.isDirty = True - - def runMenu(self,options,callbacks): - for i,option in enumerate(options): - print('%s. %s' % (i, option)) # display all options - choice = raw_input('your choice? ') - if is_number(str(choice)) and int(choice) < len(options): - callbacks[int(choice)]() # call correspondending function - - def doCommonMenu(self): - options = ['Max. multigrid levels', 'Max. coarse size', 'Back'] - callbacks = [self.doRelaxationMaxLevels,self.doRelaxationMaxCoarseSize, self.askForSolver] - while self.exitLoop == False: - self.runMenu(options,callbacks) - self.exitLoop=True #False - - def doAggregatesMenu(self): - options = ['Drop tolerance', 'Min. aggregate size', 'Max. aggregate size', 'Max. Neighbor Count', 'Back'] - callbacks = [self.doDropTolerance,self.doMinAggSize, self.doMaxAggSize, self.doMaxNeigh, self.askForSolver] - while self.exitLoop == False: - self.runMenu(options,callbacks) - self.exitLoop=True #False - - def doSmootherMenu(self): - options = ['Jacobi', 'Gauss-Seidel', 'Sym. Gauss-Seidel', 'Back'] - callbacks = [self.doRelaxationJacobi,self.doRelaxationGS, self.doRelaxationSymGS, self.askForSolver] - self.runMenu(options,callbacks) - - def doTransferMenu(self): - options = ['Non-smoothed transfer (PA-AMG)', 'Smoothed transfer (SA-AMG)', 'Smoothed transfer (PG-AMG)', 'Back'] - callbacks = [self.doPaAMG,self.doSaAMG, self.doPgAMG, self.askForSolver] - self.runMenu(options,callbacks) - - def doRestrictorMenu(self): - options = ['Symmetric', 'Non-symmetric', 'Back'] - callbacks = [self.doSymR,self.doNonsymR, self.askForSolver] - self.runMenu(options,callbacks) - - def doRebalancingMenu(self): - options = ['No rebalancing', 'Activate rebalancing', 'Back'] - callbacks = [self.doNoRebalancingOption,self.doRebalancingOption, self.askForSolver] - self.runMenu(options,callbacks) - - def doExitProgram(self): - #sys.exit() - print "doEXIT" - self.exitLoop = True - - def printMainMenu(self): - clearWindow() - self.printSettings() - print "" - print "" - - #options = ['Set Output file name','Common Multigrid settings', 'Level smoother settings', 'Transfer operators', 'Restriction operators', 'Save XML file', 'Exit'] - #callbacks = [self.doFileName, self.doCommonMenu, self.doSmootherMenu, self.doTransferMenu, self.doRestrictorMenu, self.generateXMLfile, self.doExitProgram] - options = ['Common Multigrid settings', 'Aggregate settings', 'Level smoother settings', 'Transfer operators', 'Restriction operators', 'Rebalancing options', 'Save XML file', 'Back'] - callbacks = [self.doCommonMenu, self.doAggregatesMenu, self.doSmootherMenu, self.doTransferMenu, self.doRestrictorMenu, self.doRebalancingMenu, self.generateXMLfile, self.doExitProgram] - - self.runMenu(options,callbacks) - - def printSettings(self): - ## print out all made settings for xml file - print bcolors.HEADER+"*************************** SETTINGS ****************************"+bcolors.ENDC - print bcolors.WARNING+"XML file name: "+bcolors.ENDC + str(self.xmlFileName) - print "" - print bcolors.WARNING+"Max. MultiGrid levels: "+bcolors.ENDC + str(self.maxMultLevels) - print bcolors.WARNING+"Max. CoarseSize: "+bcolors.ENDC + str(self.maxCoarseSize) - print "" - print bcolors.WARNING+"Level smoother: "+bcolors.ENDC + str(self.levelSmoother) - print bcolors.WARNING+"Level smoothing sweeps: "+bcolors.ENDC + str(self.levelSmootherSweeps) - print bcolors.WARNING+"Level damping parameter: "+bcolors.ENDC + str(self.levelSmootherDamp) - print "" - print bcolors.WARNING+"Coarse solver: "+bcolors.ENDC + str(self.coarseSolver) - print "" - print bcolors.WARNING+"Graph drop tolerance: "+bcolors.ENDC + str(self.dropTolerance) - print bcolors.WARNING+"Aggregate size (min/max):"+bcolors.ENDC + str(self.minAggSize) + "/" + str(self.maxAggSize) - print bcolors.WARNING+"Max. neighbor count: "+bcolors.ENDC + str(self.maxNeighCount) - print "" - print bcolors.WARNING+"Transfer operators: "+bcolors.ENDC + str(self.transferOps) - print bcolors.WARNING+"Transfer smoothing par.:"+bcolors.ENDC + str(self.transferOpDamp) - print "" - print bcolors.WARNING+"Restriction operator: "+bcolors.ENDC + str(self.restrictionOp) - print "" - if self.doRebalancing == False: - print bcolors.WARNING+"NO Rebalancing"+bcolors.ENDC - else: - print bcolors.WARNING+"Rebalancing active:"+ bcolors.ENDC - print bcolors.WARNING+"Minimum DOFs per proc: "+ bcolors.ENDC + str(self.minRowsPerProc) - print bcolors.WARNING+"Nonzero imbalance: "+ bcolors.ENDC + str(self.nnzImbalance) - print bcolors.WARNING+"Start level for rebal.: "+ bcolors.ENDC + str(self.rebStartLevel) - print bcolors.HEADER+"*************************** SETTINGS ****************************"+bcolors.ENDC - - print "" - if self.isDirty == True: - print bcolors.FAIL+ "CHANGES HAVE NOT BEEN SAVED!" + bcolors.ENDC - else: - print bcolors.OKDARKGREEN + "CHANGES HAVE BEEN SAVED!" + bcolors.ENDC - - def generateXMLfile(self): - # generate HEAD file for pre_exodus - if os.path.isfile(self.xmlFileName): - os.remove(self.xmlFileName) - o = open(self.xmlFileName,"a") - for line in open("tmpl/muelu.xml_TMPL"): - #for line in open(headfile_tmpl): - line = line.replace("$SMOO_SWEEPS", str(self.levelSmootherSweeps)) - line = line.replace("$SMOO_DAMP" , str(self.levelSmootherDamp)) - line = line.replace("$SMOOTHER" , str(self.levelSmoother)) - line = line.replace("$MAXLEVELS" , str(self.maxMultLevels)) - line = line.replace("$MAXCOARSESIZE", str(self.maxCoarseSize)) - line = line.replace("$RESTRICTOR", str(self.restrictionOp)) - line = line.replace("$PROLONGATOR", str(self.transferOps)) - line = line.replace("$SADAMPING" , str(self.transferOpDamp)) - line = line.replace("$DROPTOL" , str(self.dropTolerance)) - line = line.replace("$MAXNEIGH" , str(self.maxNeighCount)) - line = line.replace("$MINAGGS" , str(self.minAggSize)) - line = line.replace("$MAXAGGS" , str(self.maxAggSize)) - - if self.doRebalancing == False: - line = line.replace("$MANAGER_PROLONGATOR", str(self.transferOps)) - line = line.replace("$MANAGER_RESTRICTOR", "myRestrictorFact") - line = line.replace("$MANAGER_RAP", "myRAPFact") - line = line.replace("$MANAGER_NULLSPACE", "PA-AMG") - else: - line = line.replace("$MANAGER_PROLONGATOR", "myRebalanceProlongatorFact") - line = line.replace("$MANAGER_RESTRICTOR", "myRebalanceRestrictionFact") - line = line.replace("$MANAGER_RAP", "myRebalanceAFact") - line = line.replace("$MANAGER_NULLSPACE", "myRebalanceProlongatorFact") - o.write(line) - o.close() - self.isDirty = False - -if __name__ == '__main__': - #MueLu_XMLgenerator().main() - ProblemHandler().main() diff --git a/packages/muelu/doc/Tutorial/src/laplace2d.cpp b/packages/muelu/doc/Tutorial/src/laplace2d.cpp deleted file mode 100644 index ae82cf59c02b..000000000000 --- a/packages/muelu/doc/Tutorial/src/laplace2d.cpp +++ /dev/null @@ -1,423 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include - -#include - -#include -#include -#include -#include - -// EpetraExt -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include -#include - -#include -#include -#include -#include // TODO: move into MueLu.hpp - -#include - -#include - -#include -#include -#include -#include - -#if defined(HAVE_MUELU_EPETRA) -#include - -// prescribe types -// run plain Epetra -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Xpetra::EpetraNode Node; -#endif - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) -#include - - using Teuchos::RCP; // reference count pointers - using Teuchos::rcp; - using Teuchos::TimeMonitor; - - // TUTORIALSPLIT =========================================================== - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - - bool success = false; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - int MyPID = comm->getRank(); - int NumProc = comm->getSize(); - - const Teuchos::RCP epComm = Teuchos::rcp_const_cast(Xpetra::toEpetra(comm)); - - // TUTORIALSPLIT =========================================================== - // ================================ - // Convenient definitions - // ================================ - // SC zero = Teuchos::ScalarTraits::zero(); - SC one = Teuchos::ScalarTraits::one(); - - // Instead of checking each time for rank, create a rank 0 stream - RCP fancy = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - Teuchos::FancyOStream& fancyout = *fancy; - fancyout.setOutputToRootOnly(0); - - // ================================ - // Parameters initialization - // ================================ - Teuchos::CommandLineProcessor clp(false); - GO nx = 100; - clp.setOption("nx", &nx, "mesh size in x direction"); - GO ny = 100; - clp.setOption("ny", &ny, "mesh size in y direction"); - std::string xmlFileName = "xml/s2a.xml"; - clp.setOption("xml", &xmlFileName, "read parameters from a file"); - int mgridSweeps = 1; - clp.setOption("mgridSweeps", &mgridSweeps, "number of multigrid sweeps within Multigrid solver."); - std::string printTimings = "no"; - clp.setOption("timings", &printTimings, "print timings to screen [yes/no]"); - double tol = 1e-12; - clp.setOption("tol", &tol, "solver convergence tolerance"); - int importOldData = 0; - clp.setOption("importOldData", &importOldData, "import map and matrix from previous run (highly experimental)."); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - // ================================ - // Problem construction - // ================================ - RCP globalTimeMonitor = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: S - Global Time"))), tm; - - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1 - Matrix Build"))); - - Teuchos::ParameterList GaleriList; - GaleriList.set("nx", nx); - GaleriList.set("ny", ny); - GaleriList.set("mx", epComm->NumProc()); - GaleriList.set("my", 1); - GaleriList.set("lx", 1.0); // length of x-axis - GaleriList.set("ly", 1.0); // length of y-axis - - Teuchos::RCP epMap = Teuchos::null; - Teuchos::RCP epCoord = Teuchos::null; - Teuchos::RCP epA = Teuchos::null; - - if (importOldData == 0) { - // TUTORIALSPLIT =========================================================== - // create map - epMap = Teuchos::rcp(Galeri::CreateMap("Cartesian2D", *epComm, GaleriList)); - - // create coordinates - epCoord = Teuchos::rcp(Galeri::CreateCartesianCoordinates("2D", epMap.get(), GaleriList)); - - // create matrix - epA = Teuchos::rcp(Galeri::CreateCrsMatrix("Laplace2D", epMap.get(), GaleriList)); - - double hx = 1. / (nx - 1); - double hy = 1. / (ny - 1); - epA->Scale(1. / (hx * hy)); - // TUTORIALSPLIT =========================================================== - } else { - std::cout << "Import old data" << std::endl; - Epetra_Map* myEpMap; - EpetraExt::MatrixMarketFileToMap("ARowMap.mat", *(Xpetra::toEpetra(comm)), myEpMap); - epMap = Teuchos::rcp(myEpMap); - comm->barrier(); - Epetra_MultiVector* myEpVector; - EpetraExt::MatrixMarketFileToMultiVector("ACoordVector.mat", *epMap, myEpVector); - epCoord = Teuchos::rcp(myEpVector); - comm->barrier(); - Epetra_CrsMatrix* myEpMatrix; - EpetraExt::MatrixMarketFileToCrsMatrix("A.mat", *(Xpetra::toEpetra(comm)), myEpMatrix); - epA = Teuchos::rcp(myEpMatrix); - comm->barrier(); - } - - // TUTORIALSPLIT =========================================================== - // Epetra -> Xpetra - Teuchos::RCP exA = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epA)); - Teuchos::RCP exAWrap = Teuchos::rcp(new CrsMatrixWrap(exA)); - - RCP A = Teuchos::rcp_dynamic_cast(exAWrap); - A->SetFixedBlockSize(1); - - // TUTORIALSPLIT =========================================================== - // set rhs and solution vector - RCP B = Teuchos::rcp(new Epetra_Vector(*epMap)); - RCP X = Teuchos::rcp(new Epetra_Vector(*epMap)); - B->PutScalar(1.0); - X->PutScalar(0.0); - - // Epetra -> Xpetra - RCP xB = Teuchos::rcp(new Xpetra::EpetraVectorT(B)); - RCP xX = Teuchos::rcp(new Xpetra::EpetraVectorT(X)); - RCP coords = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epCoord)); - - xX->setSeed(100); - xX->randomize(); - - // TUTORIALSPLIT =========================================================== - // build null space vector - RCP map = A->getRowMap(); - RCP nullspace = MultiVectorFactory::Build(map, 1); - nullspace->putScalar(one); - - // TUTORIALSPLIT =========================================================== - comm->barrier(); - tm = Teuchos::null; - - fancyout << "========================================================\nGaleri complete.\n========================================================" << std::endl; - - // ================================ - // Preconditioner construction - // ================================ - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1.5 - MueLu read XML"))); - // TUTORIALSPLIT =========================================================== - ParameterListInterpreter mueLuFactory(xmlFileName, *comm); - // TUTORIALSPLIT =========================================================== - comm->barrier(); - tm = Teuchos::null; - - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 2 - MueLu Setup"))); - - // TUTORIALSPLIT =========================================================== - RCP H = mueLuFactory.CreateHierarchy(); - - H->GetLevel(0)->Set("A", A); - H->GetLevel(0)->Set("Nullspace", nullspace); - H->GetLevel(0)->Set("Coordinates", coords); - - mueLuFactory.SetupHierarchy(*H); - - // TUTORIALSPLIT =========================================================== - comm->barrier(); - tm = Teuchos::null; - - // ================================ - // System solution (Ax = b) - // ================================ - - // - // generate exact solution using a direct solver - // - RCP exactLsgVec = rcp(new Epetra_Vector(X->Map())); - { - fancyout << "========================================================\nCalculate exact solution." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 3 - direct solve"))); - exactLsgVec->PutScalar(0.0); - exactLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), exactLsgVec.get(), B.get()); - - Amesos amesosFactory; - RCP rcp_directSolver = Teuchos::rcp(amesosFactory.Create("Amesos_Klu", epetraProblem)); - rcp_directSolver->SymbolicFactorization(); - rcp_directSolver->NumericFactorization(); - rcp_directSolver->Solve(); - - comm->barrier(); - tm = Teuchos::null; - } - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - // TUTORIALSPLIT =========================================================== - RCP precLsgVec = rcp(new Epetra_Vector(X->Map())); - // TUTORIALSPLIT =========================================================== - { - fancyout << "========================================================\nUse multigrid hierarchy as preconditioner within CG." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 4 - AMG as preconditioner"))); - - // TUTORIALSPLIT =========================================================== - precLsgVec->PutScalar(0.0); - precLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), precLsgVec.get(), B.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_cg); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - - aztecSolver.Iterate(maxIts, tol); - // TUTORIALSPLIT =========================================================== - comm->barrier(); - tm = Teuchos::null; - } - - ////////////////// - // TUTORIALSPLIT =========================================================== - // use multigrid hierarchy as solver - RCP mgridLsgVec = VectorFactory::Build(map); - mgridLsgVec->putScalar(0.0); - { - fancyout << "========================================================\nUse multigrid hierarchy as solver." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 5 - Multigrid Solve"))); - mgridLsgVec->update(1.0, *xX, 1.0); - H->IsPreconditioner(false); - H->Iterate(*xB, *mgridLsgVec, mgridSweeps); - comm->barrier(); - tm = Teuchos::null; - } - // TUTORIALSPLIT =========================================================== - ////////////////// - - fancyout << "========================================================\nExport results.\n========================================================" << std::endl; - std::ofstream myfile; - std::stringstream ss; - ss << "example" << MyPID << ".txt"; - myfile.open(ss.str().c_str()); - - ////////////////// - - // loop over all procs - for (int iproc = 0; iproc < NumProc; iproc++) { - if (MyPID == iproc) { - int NumVectors1 = 2; - int NumMyElements1 = epCoord->Map().NumMyElements(); - int MaxElementSize1 = epCoord->Map().MaxElementSize(); - int* FirstPointInElementList1 = NULL; - if (MaxElementSize1 != 1) FirstPointInElementList1 = epCoord->Map().FirstPointInElementList(); - double** A_Pointers = epCoord->Pointers(); - - if (MyPID == 0) { - myfile.width(8); - myfile << "# MyPID"; - myfile << " "; - myfile.width(12); - if (MaxElementSize1 == 1) - myfile << "GID "; - else - myfile << " GID/Point"; - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << "Value "; - } - myfile << std::endl; - } - for (int i = 0; i < NumMyElements1; i++) { - for (int ii = 0; ii < epCoord->Map().ElementSize(i); ii++) { - int iii; - myfile.width(10); - myfile << MyPID; - myfile << " "; - myfile.width(10); - if (MaxElementSize1 == 1) { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << " "; - } - - iii = i; - } else { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << "/" << ii << " "; - } - - iii = FirstPointInElementList1[i] + ii; - } - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << A_Pointers[j][iii]; - } - - myfile.precision(18); // set high precision for output - - // add solution vector entry - myfile.width(25); - myfile << (*exactLsgVec)[iii]; - - // add preconditioned solution vector entry - myfile.width(25); - myfile << (*precLsgVec)[iii]; - - myfile.width(25); - Teuchos::ArrayRCP mgridLsgVecData = mgridLsgVec->getDataNonConst(0); - myfile << mgridLsgVecData[iii]; - - myfile.precision(6); // set default precision - myfile << std::endl; - } - } // end loop over all lines on current proc - myfile << std::flush; - - // syncronize procs - comm->barrier(); - comm->barrier(); - comm->barrier(); - - } // end myProc - } - - // export map - RCP Amap = A->getRowMap(); - RCP > epAmap = Teuchos::rcp_dynamic_cast >(Amap); - - // Epetra_Map* eMap; - // int rv = EpetraExt::MatrixMarketFileToMap(fileName.c_str(), *(Xpetra::toEpetra(comm)), eMap); - EpetraExt::BlockMapToMatrixMarketFile("ARowMap.mat", epAmap->getEpetra_BlockMap(), - "ARowMap", - "Row map of matrix A", - true); - - EpetraExt::MultiVectorToMatrixMarketFile("ACoordVector.mat", *epCoord, "Coordinate multi vector", "Multi vector with mesh coordinates", true); - EpetraExt::RowMatrixToMatrixMarketFile("A.mat", *epA, "A matrix", "Matrix A", true); - - //////////// - myfile.close(); - - comm->barrier(); - tm = Teuchos::null; - globalTimeMonitor = Teuchos::null; - - if (printTimings == "yes") { - TimeMonitor::summarize(A->getRowMap()->getComm().ptr(), std::cout, false, true, false, Teuchos::Union, "", true); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(true, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_EPETRA) and defined(HAVE_MUELU_SERIAL) -} // main diff --git a/packages/muelu/doc/Tutorial/src/recirc2d.cpp b/packages/muelu/doc/Tutorial/src/recirc2d.cpp deleted file mode 100644 index d7fb93a33a11..000000000000 --- a/packages/muelu/doc/Tutorial/src/recirc2d.cpp +++ /dev/null @@ -1,373 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include - -#include - -#include -#include -#include -#include - -// Galeri -#include -#include -#include -// - -//#include - -#include -#include -#include -#include // TODO: move into MueLu.hpp - -#include - -#include - -#include -#include -#include -#include - -#if defined(HAVE_MUELU_EPETRA) -#include - -// prescribe types -// run plain Epetra -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Xpetra::EpetraNode Node; // Epetra needs SerialNode -#endif - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) -#include - - using Teuchos::RCP; // reference count pointers - using Teuchos::rcp; - using Teuchos::TimeMonitor; - - // ========================================================================= - // MPI initialization using Teuchos - // ========================================================================= - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - - bool success = false; - bool verbose = true; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - int MyPID = comm->getRank(); - int NumProc = comm->getSize(); - - const Teuchos::RCP epComm = Teuchos::rcp_const_cast(Xpetra::toEpetra(comm)); - - // ========================================================================= - // Convenient definitions - // ========================================================================= - // SC zero = Teuchos::ScalarTraits::zero(), one = Teuchos::ScalarTraits::one(); - - // Instead of checking each time for rank, create a rank 0 stream - RCP fancy = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - Teuchos::FancyOStream& fancyout = *fancy; - fancyout.setOutputToRootOnly(0); - - // ========================================================================= - // Parameters initialization - // ========================================================================= - Teuchos::CommandLineProcessor clp(false); - GO nx = 100, ny = 100; - clp.setOption("nx", &nx, "mesh size in x direction"); - clp.setOption("ny", &ny, "mesh size in y direction"); - std::string xmlFileName = "xml/s3a.xml"; - clp.setOption("xml", &xmlFileName, "read parameters from a file. Otherwise, this example uses by default 'tutorial1a.xml'"); - int mgridSweeps = 1; - clp.setOption("mgridSweeps", &mgridSweeps, "number of multigrid sweeps within Multigrid solver."); - std::string printTimings = "no"; - clp.setOption("timings", &printTimings, "print timings to screen [yes/no]"); - double tol = 1e-12; - clp.setOption("tol", &tol, "solver convergence tolerance"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - // ========================================================================= - // Problem construction - // ========================================================================= - RCP globalTimeMonitor = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: S - Global Time"))), tm; - - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1 - Matrix Build"))); - - Teuchos::ParameterList GaleriList; - GaleriList.set("nx", nx); - GaleriList.set("ny", ny); - GaleriList.set("mx", epComm->NumProc()); - GaleriList.set("my", 1); - GaleriList.set("lx", 1.0); // length of x-axis - GaleriList.set("ly", 1.0); // length of y-axis - GaleriList.set("diff", 1e-5); - GaleriList.set("conv", 1.0); - - // create map - Teuchos::RCP epMap = Teuchos::rcp(Galeri::CreateMap("Cartesian2D", *epComm, GaleriList)); - - // create coordinates - Teuchos::RCP epCoord = Teuchos::rcp(Galeri::CreateCartesianCoordinates("2D", epMap.get(), GaleriList)); - - // create matrix - Teuchos::RCP epA = Teuchos::rcp(Galeri::CreateCrsMatrix("Recirc2D", epMap.get(), GaleriList)); - - // Epetra -> Xpetra - Teuchos::RCP exA = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epA)); - Teuchos::RCP exAWrap = Teuchos::rcp(new CrsMatrixWrap(exA)); - - RCP A = Teuchos::rcp_dynamic_cast(exAWrap); - int numPDEs = 1; - A->SetFixedBlockSize(numPDEs); - - // set rhs and solution vector - RCP B = Teuchos::rcp(new Epetra_Vector(*epMap)); - RCP X = Teuchos::rcp(new Epetra_Vector(*epMap)); - B->PutScalar(1.0); - X->PutScalar(0.0); - - // Epetra -> Xpetra - RCP xB = Teuchos::rcp(new Xpetra::EpetraVectorT(B)); - RCP xX = Teuchos::rcp(new Xpetra::EpetraVectorT(X)); - RCP coords = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epCoord)); - - xX->setSeed(100); - xX->randomize(); - - // build null space vector - RCP map = A->getRowMap(); - RCP nullspace = MultiVectorFactory::Build(map, numPDEs); - - for (int i = 0; i < numPDEs; ++i) { - Teuchos::ArrayRCP nsValues = nullspace->getDataNonConst(i); - int numBlocks = nsValues.size() / numPDEs; - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * numPDEs + i] = 1.0; - } - } - - comm->barrier(); - tm = Teuchos::null; - - fancyout << "========================================================\nGaleri complete.\n========================================================" << std::endl; - - // ========================================================================= - // Preconditioner construction - // ========================================================================= - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1.5 - MueLu read XML"))); - ParameterListInterpreter mueLuFactory(xmlFileName, *comm); - comm->barrier(); - tm = Teuchos::null; - - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 2 - MueLu Setup"))); - - RCP H = mueLuFactory.CreateHierarchy(); - - H->GetLevel(0)->Set("A", A); - H->GetLevel(0)->Set("Nullspace", nullspace); - H->GetLevel(0)->Set("Coordinates", coords); - - mueLuFactory.SetupHierarchy(*H); - - comm->barrier(); - tm = Teuchos::null; - - // ========================================================================= - // System solution (Ax = b) - // ========================================================================= - - // - // generate exact solution using a direct solver - // - RCP exactLsgVec = rcp(new Epetra_Vector(X->Map())); - { - fancyout << "========================================================\nCalculate exact solution." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 3 - direct solve"))); - exactLsgVec->PutScalar(0.0); - exactLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), exactLsgVec.get(), B.get()); - - Amesos amesosFactory; - RCP rcp_directSolver = Teuchos::rcp(amesosFactory.Create("Amesos_Klu", epetraProblem)); - rcp_directSolver->SymbolicFactorization(); - rcp_directSolver->NumericFactorization(); - rcp_directSolver->Solve(); - - comm->barrier(); - tm = Teuchos::null; - } - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - - RCP precLsgVec = rcp(new Epetra_Vector(X->Map())); - { - fancyout << "========================================================\nUse multigrid hierarchy as preconditioner within CG." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 4 - AMG as preconditioner"))); - - precLsgVec->PutScalar(0.0); - precLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), precLsgVec.get(), B.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - - aztecSolver.Iterate(maxIts, tol); - - comm->barrier(); - tm = Teuchos::null; - } - - ////////////////// - - // use multigrid hierarchy as solver - RCP mgridLsgVec = VectorFactory::Build(map); - mgridLsgVec->putScalar(0.0); - { - fancyout << "========================================================\nUse multigrid hierarchy as solver." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 5 - Multigrid Solve"))); - mgridLsgVec->update(1.0, *xX, 1.0); - H->IsPreconditioner(false); - H->Iterate(*xB, *mgridLsgVec, mgridSweeps); - comm->barrier(); - tm = Teuchos::null; - } - - ////////////////// - - fancyout << "========================================================\nExport results.\n========================================================" << std::endl; - std::ofstream myfile; - std::stringstream ss; - ss << "example" << MyPID << ".txt"; - myfile.open(ss.str().c_str()); - - ////////////////// - - // loop over all procs - for (int iproc = 0; iproc < NumProc; iproc++) { - if (MyPID == iproc) { - int NumVectors1 = 2; - int NumMyElements1 = epCoord->Map().NumMyElements(); - int MaxElementSize1 = epCoord->Map().MaxElementSize(); - int* FirstPointInElementList1 = NULL; - if (MaxElementSize1 != 1) FirstPointInElementList1 = epCoord->Map().FirstPointInElementList(); - double** A_Pointers = epCoord->Pointers(); - - if (MyPID == 0) { - myfile.width(8); - myfile << "# MyPID"; - myfile << " "; - myfile.width(12); - if (MaxElementSize1 == 1) - myfile << "GID "; - else - myfile << " GID/Point"; - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << "Value "; - } - myfile << std::endl; - } - for (int i = 0; i < NumMyElements1; i++) { - for (int ii = 0; ii < epCoord->Map().ElementSize(i); ii++) { - int iii; - myfile.width(10); - myfile << MyPID; - myfile << " "; - myfile.width(10); - if (MaxElementSize1 == 1) { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << " "; - } - - iii = i; - } else { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << "/" << ii << " "; - } - - iii = FirstPointInElementList1[i] + ii; - } - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << A_Pointers[j][iii]; - } - - myfile.precision(18); // set high precision for output - - // add solution vector entry - myfile.width(25); - myfile << (*exactLsgVec)[iii]; - - // add preconditioned solution vector entry - myfile.width(25); - myfile << (*precLsgVec)[iii]; - - Teuchos::ArrayRCP mgridLsgVecData = mgridLsgVec->getDataNonConst(0); - myfile.width(25); - myfile << mgridLsgVecData[iii]; - - myfile.precision(6); // set default precision - myfile << std::endl; - } - } // end loop over all lines on current proc - myfile << std::flush; - - // syncronize procs - comm->barrier(); - comm->barrier(); - comm->barrier(); - - } // end myProc - } - - //////////// - myfile.close(); - - comm->barrier(); - tm = Teuchos::null; - globalTimeMonitor = Teuchos::null; - - if (printTimings == "yes") { - TimeMonitor::summarize(A->getRowMap()->getComm().ptr(), std::cout, false, true, false, Teuchos::Union, "", true); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_EPETRA) and defined(HAVE_MUELU_SERIAL) -} // main diff --git a/packages/muelu/doc/Tutorial/src/recirc2d_api.cpp b/packages/muelu/doc/Tutorial/src/recirc2d_api.cpp deleted file mode 100644 index fd2bef0152c0..000000000000 --- a/packages/muelu/doc/Tutorial/src/recirc2d_api.cpp +++ /dev/null @@ -1,401 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include - -#include - -#include -#include -#include -#include - -// Galeri -#include -#include -#include -// - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#if defined(HAVE_MUELU_EPETRA) -#include - -// prescribe types -// run plain Epetra -typedef double Scalar; -typedef int LocalOrdinal; -typedef int GlobalOrdinal; -typedef Xpetra::EpetraNode Node; // Epetra needs SerialNode -#endif - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) -#include - - using Teuchos::RCP; // reference count pointers - using Teuchos::rcp; - using Teuchos::TimeMonitor; - - // ========================================================================= - // MPI initialization using Teuchos - // ========================================================================= - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - - bool success = false; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - int MyPID = comm->getRank(); - int NumProc = comm->getSize(); - - const Teuchos::RCP epComm = Teuchos::rcp_const_cast(Xpetra::toEpetra(comm)); - - // ========================================================================= - // Convenient definitions - // ========================================================================= - // SC zero = Teuchos::ScalarTraits::zero(), one = Teuchos::ScalarTraits::one(); - - // Instead of checking each time for rank, create a rank 0 stream - RCP fancy = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - Teuchos::FancyOStream& fancyout = *fancy; - fancyout.setOutputToRootOnly(0); - - // ========================================================================= - // Parameters initialization - // ========================================================================= - Teuchos::CommandLineProcessor clp(false); - GO nx = 100, ny = 100; - GO maxCoarseSize = 10; - LO maxLevels = 4; - clp.setOption("nx", &nx, "mesh size in x direction"); - clp.setOption("ny", &ny, "mesh size in y direction"); - clp.setOption("maxCoarseSize", &maxCoarseSize, "maximum coarse size"); - clp.setOption("maxLevels", &maxLevels, "maximum number of multigrid levels"); - int mgridSweeps = 1; - clp.setOption("mgridSweeps", &mgridSweeps, "number of multigrid sweeps within Multigrid solver."); - std::string printTimings = "no"; - clp.setOption("timings", &printTimings, "print timings to screen [yes/no]"); - double tol = 1e-12; - clp.setOption("tol", &tol, "solver convergence tolerance"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - // ========================================================================= - // Problem construction - // ========================================================================= - RCP globalTimeMonitor = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: S - Global Time"))), tm; - - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1 - Matrix Build"))); - - Teuchos::ParameterList GaleriList; - GaleriList.set("nx", nx); - GaleriList.set("ny", ny); - GaleriList.set("mx", epComm->NumProc()); - GaleriList.set("my", 1); - GaleriList.set("lx", 1.0); // length of x-axis - GaleriList.set("ly", 1.0); // length of y-axis - GaleriList.set("diff", 1e-5); - GaleriList.set("conv", 1.0); - - // create map - Teuchos::RCP epMap = Teuchos::rcp(Galeri::CreateMap("Cartesian2D", *epComm, GaleriList)); - - // create coordinates - Teuchos::RCP epCoord = Teuchos::rcp(Galeri::CreateCartesianCoordinates("2D", epMap.get(), GaleriList)); - - // create matrix - Teuchos::RCP epA = Teuchos::rcp(Galeri::CreateCrsMatrix("Recirc2D", epMap.get(), GaleriList)); - - // Epetra -> Xpetra - Teuchos::RCP exA = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epA)); - Teuchos::RCP exAWrap = Teuchos::rcp(new CrsMatrixWrap(exA)); - - RCP A = Teuchos::rcp_dynamic_cast(exAWrap); - int numPDEs = 1; - A->SetFixedBlockSize(numPDEs); - - // set rhs and solution vector - RCP B = Teuchos::rcp(new Epetra_Vector(*epMap)); - RCP X = Teuchos::rcp(new Epetra_Vector(*epMap)); - B->PutScalar(1.0); - X->PutScalar(0.0); - - // Epetra -> Xpetra - RCP xB = Teuchos::rcp(new Xpetra::EpetraVectorT(B)); - RCP xX = Teuchos::rcp(new Xpetra::EpetraVectorT(X)); - - xX->setSeed(100); - xX->randomize(); - - // build null space vector - RCP map = A->getRowMap(); - RCP nullspace = MultiVectorFactory::Build(map, numPDEs); - - for (int i = 0; i < numPDEs; ++i) { - Teuchos::ArrayRCP nsValues = nullspace->getDataNonConst(i); - int numBlocks = nsValues.size() / numPDEs; - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * numPDEs + i] = 1.0; - } - } - - comm->barrier(); - tm = Teuchos::null; - - fancyout << "========================================================\nGaleri complete.\n========================================================" << std::endl; - - // ========================================================================= - // Preconditioner construction - // ========================================================================= - comm->barrier(); - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 1.5 - MueLu read XML"))); - - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - H->SetMaxCoarseSize(maxCoarseSize); - - // build finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", A); - Finest->Set("Nullspace", nullspace); - - // create factories for transfer operators - RCP PFact = Teuchos::rcp(new TentativePFactory()); - RCP RFact = Teuchos::rcp(new TransPFactory()); - RFact->SetFactory("P", PFact); - - // build level smoothers - // use symmetric Gauss-Seidel both for fine and coarse level smoother - RCP smooProto; - std::string ifpackType; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)1); - ifpackList.set("relaxation: damping factor", (SC)1.0); - ifpackType = "RELAXATION"; - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - - smooProto = Teuchos::rcp(new TrilinosSmoother(ifpackType, ifpackList)); - RCP SmooFact; - if (maxLevels > 1) - SmooFact = rcp(new SmootherFactory(smooProto)); - - // design multigrid hierarchy - FactoryManager M; - M.SetFactory("P", PFact); - M.SetFactory("R", RFact); - M.SetFactory("Nullspace", PFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", SmooFact); - - H->Setup(M, 0, maxLevels); - - comm->barrier(); - tm = Teuchos::null; - - // ========================================================================= - // System solution (Ax = b) - // ========================================================================= - - // - // generate exact solution using a direct solver - // - RCP exactLsgVec = rcp(new Epetra_Vector(X->Map())); - { - fancyout << "========================================================\nCalculate exact solution." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 3 - direct solve"))); - exactLsgVec->PutScalar(0.0); - exactLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), exactLsgVec.get(), B.get()); - - Amesos amesosFactory; - RCP rcp_directSolver = Teuchos::rcp(amesosFactory.Create("Amesos_Klu", epetraProblem)); - rcp_directSolver->SymbolicFactorization(); - rcp_directSolver->NumericFactorization(); - rcp_directSolver->Solve(); - - comm->barrier(); - tm = Teuchos::null; - } - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - - RCP precLsgVec = rcp(new Epetra_Vector(X->Map())); - { - fancyout << "========================================================\nUse multigrid hierarchy as preconditioner within CG." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 4 - AMG as preconditioner"))); - - precLsgVec->PutScalar(0.0); - precLsgVec->Update(1.0, *X, 1.0); - Epetra_LinearProblem epetraProblem(epA.get(), precLsgVec.get(), B.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 100; - // double tol2 = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - - comm->barrier(); - tm = Teuchos::null; - } - - ////////////////// - - // use multigrid hierarchy as solver - RCP mgridLsgVec = VectorFactory::Build(map); - mgridLsgVec->putScalar(0.0); - { - fancyout << "========================================================\nUse multigrid hierarchy as solver." << std::endl; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("ScalingTest: 5 - Multigrid Solve"))); - mgridLsgVec->update(1.0, *xX, 1.0); - H->IsPreconditioner(false); - H->Iterate(*xB, *mgridLsgVec, mgridSweeps); - comm->barrier(); - tm = Teuchos::null; - } - - ////////////////// - - fancyout << "========================================================\nExport results.\n========================================================" << std::endl; - std::ofstream myfile; - std::stringstream ss; - ss << "example" << MyPID << ".txt"; - myfile.open(ss.str().c_str()); - - ////////////////// - - // loop over all procs - for (int iproc = 0; iproc < NumProc; iproc++) { - if (MyPID == iproc) { - int NumVectors1 = 2; - int NumMyElements1 = epCoord->Map().NumMyElements(); - int MaxElementSize1 = epCoord->Map().MaxElementSize(); - int* FirstPointInElementList1 = NULL; - if (MaxElementSize1 != 1) FirstPointInElementList1 = epCoord->Map().FirstPointInElementList(); - double** A_Pointers = epCoord->Pointers(); - - if (MyPID == 0) { - myfile.width(8); - myfile << "# MyPID"; - myfile << " "; - myfile.width(12); - if (MaxElementSize1 == 1) - myfile << "GID "; - else - myfile << " GID/Point"; - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << "Value "; - } - myfile << std::endl; - } - for (int i = 0; i < NumMyElements1; i++) { - for (int ii = 0; ii < epCoord->Map().ElementSize(i); ii++) { - int iii; - myfile.width(10); - myfile << MyPID; - myfile << " "; - myfile.width(10); - if (MaxElementSize1 == 1) { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << " "; - } - - iii = i; - } else { - if (epCoord->Map().GlobalIndicesInt()) { - int* MyGlobalElements1 = epCoord->Map().MyGlobalElements(); - myfile << MyGlobalElements1[i] << "/" << ii << " "; - } - - iii = FirstPointInElementList1[i] + ii; - } - for (int j = 0; j < NumVectors1; j++) { - myfile.width(20); - myfile << A_Pointers[j][iii]; - } - - myfile.precision(18); // set high precision for output - - // add solution vector entry - myfile.width(25); - myfile << (*exactLsgVec)[iii]; - - // add preconditioned solution vector entry - myfile.width(25); - myfile << (*precLsgVec)[iii]; - - Teuchos::ArrayRCP mgridLsgVecData = mgridLsgVec->getDataNonConst(0); - myfile.width(25); - myfile << mgridLsgVecData[iii]; - - myfile.precision(6); // set default precision - myfile << std::endl; - } - } // end loop over all lines on current proc - myfile << std::flush; - - // syncronize procs - comm->barrier(); - comm->barrier(); - comm->barrier(); - - } // end myProc - } - - //////////// - myfile.close(); - - comm->barrier(); - tm = Teuchos::null; - globalTimeMonitor = Teuchos::null; - - if (printTimings == "yes") { - TimeMonitor::summarize(A->getRowMap()->getComm().ptr(), std::cout, false, true, false, Teuchos::Union, "", true); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(true, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_EPETRA) and defined(HAVE_MUELU_SERIAL) -} // main diff --git a/packages/muelu/doc/Tutorial/src/tmpl/MueLu_Agg2VTK.py_TMPL b/packages/muelu/doc/Tutorial/src/tmpl/MueLu_Agg2VTK.py_TMPL deleted file mode 100755 index 99bda9c2328d..000000000000 --- a/packages/muelu/doc/Tutorial/src/tmpl/MueLu_Agg2VTK.py_TMPL +++ /dev/null @@ -1,448 +0,0 @@ -#!/usr/bin/python -import sys -import os -import vtk -import random -from subprocess import Popen, PIPE, STDOUT -from vtk import * - -############################################ -# read in nodes file -def read_nodecoords_from_file(filename): - global_nodecoords = [] - for l in file(filename): - line = l.strip() - if len(line)==1: - dimension = int(line) - else: - line = line.split(" ") - x = float(line[0]) #+ 0.0001 * random.random() - y = float(line[1]) #+ 0.0001 * random.random() - if len(line) == 3: - z = float(line[2]) #+ 0.0001 * random.random() - global_nodecoords.append((x,y,z)) - else: - global_nodecoords.append((x,y)) - return global_nodecoords,dimension - -def read_finelevel_nodecoords_from_file(filename): - global_nodecoords = [] - dimension = 2 # we only support 2D aggregates here... - for l in file(filename): - line = l.strip() - if line.find("#") == 0: - continue - else: - while ' ' in line: - line = line.replace(' ', ' ') - line = line.split(" ") - x = float(line[2]) #+ 0.0001 * random.random() - y = float(line[3]) #+ 0.0001 * random.random() - global_nodecoords.append((x,y)) - return global_nodecoords,dimension - -# dimension: problem dimension, i.e. either 2 or 3 -# agg_globalnodeidx: global node ids of current aggregate -# global_nodecoords: coordinates of nodes -# aggpolygons: vtk append object for aggregates -# aggid: aggregate id (global) -# aggid2nodes: map aggid -> nodeid (for visualization) -# aggid2procs: map aggid -> proc id (for visualization) -def prepareDelaunayData3d(dimension, agg_globalnodeidx, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs): - - local_nodeidx2global_nodeidx = {} - no_of_aggnodes = len(agg_globalnodeidx) - no_aggs = len(aggid2nodes) - - Points = vtk.vtkPoints() - Vertices = vtk.vtkCellArray() - - for i in range(0,len(agg_globalnodeidx)): - id = -1 - local_nodeidx2global_nodeidx[i] = agg_globalnodeidx[i] - nodecoords = global_nodecoords[int(agg_globalnodeidx[i])] - id = Points.InsertNextPoint(nodecoords[0]+ 0.0001 * random.random(),nodecoords[1]+ 0.0001 * random.random(),nodecoords[2]+ 0.0001 * random.random()) - Vertices.InsertNextCell(1) - Vertices.InsertCellPoint(id) - - polydata2 = vtk.vtkPolyData() - polydata2.SetPoints(Points) - polydata2.Modified() - polydata2.Update() - - delaunay = vtk.vtkDelaunay3D() - delaunay.SetInput(polydata2) - delaunay.Update() - - # create surfaceFilter - surfaceFilter = vtk.vtkDataSetSurfaceFilter() - surfaceFilter.SetInputConnection(delaunay.GetOutputPort()) - surfaceFilter.Update() - - pt_polydata = surfaceFilter.GetOutput() - - lookupTable = vtk.vtkLookupTable() - lookupTable.SetNumberOfTableValues(no_aggs) - lookupTable.Build() - - Ids = vtk.vtkUnsignedIntArray() - Ids.SetNumberOfComponents(1) - Ids.SetName("Ids") - for i in range(0,Points.GetNumberOfPoints()): - Ids.InsertNextTuple1(int(aggid)) - Ids.SetLookupTable(lookupTable) - - Procs = vtk.vtkUnsignedCharArray() - Procs.SetNumberOfComponents(1) - Procs.SetName("proc") - for i in range(0,Points.GetNumberOfPoints()): - Procs.InsertNextTuple1(aggid2procs[aggid]) - - polydata3 = vtk.vtkPolyData() - polydata3 = surfaceFilter.GetOutput() - polydata3.GetPointData().SetScalars(Ids) - polydata3.GetPointData().AddArray(Procs) - - polydata4 = vtk.vtkPolyData() - polydata4.SetPoints(Points) - polydata4.SetVerts(Vertices) - polydata4.GetPointData().SetScalars(Ids) - polydata4.GetPointData().AddArray(Procs) - - #datamapper = vtk.vtkDataSetMapper() - #datamapper.SetInputConnection(delaunay.GetOutputPort()) - #datamapper.SetInput(polydata3) - - #actor = vtk.vtkActor() - #actor.SetMapper(datamapper) - - #renderer = vtk.vtkRenderer() - #renderWindow = vtk.vtkRenderWindow() - #renderWindow.AddRenderer(renderer) - #renderWindowInteractor = vtk.vtkRenderWindowInteractor() - #renderWindowInteractor.SetRenderWindow(renderWindow) - #renderer.AddActor(actor) - #renderWindow.Render() - #renderWindowInteractor.Start() - - #print polydata.GetVertices() - - aggpolygons.AddInput(polydata3) - aggpolygons.AddInput(polydata4) - -# dimension: problem dimension, i.e. either 2 or 3 -# agg_globalnodeidx: global node ids of current aggregate -# global_nodecoords: coordinates of nodes -# aggpolygons: vtk append object for aggregates -# aggid: aggregate id (global) -# aggid2nodes: map aggid -> nodeid (for visualization) -# aggid2procs: map aggid -> proc id (for visualization) -def prepareDelaunayData(dimension, agg_globalnodeidx, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs): - local_nodeidx2global_nodeidx = {} - no_of_aggnodes = len(agg_globalnodeidx) - dim = len(global_nodecoords[0]) - - no_aggs = len(aggid2nodes) - - Points = vtk.vtkPoints() - Vertices = vtk.vtkCellArray() - - for i in range(0,len(agg_globalnodeidx)): - local_nodeidx2global_nodeidx[i] = agg_globalnodeidx[i] - nodecoords = global_nodecoords[int(agg_globalnodeidx[i])] - if dimension==2: - id = Points.InsertNextPoint(nodecoords[0],nodecoords[1],0.0) - elif dimension==3: - id = Points.InsertNextPoint(nodecoords[0]+ 0.001 * random.random(),nodecoords[1]+ 0.001 * random.random(),nodecoords[2]+ 0.001 * random.random()) - Vertices.InsertNextCell(1) - Vertices.InsertCellPoint(id) - - # create polygon for current aggregate - polydata = vtk.vtkPolyData() - polydata.SetPoints(Points) - polydata.SetVerts(Vertices) - polydata.Modified() - polydata.Update() - - polydata2 = vtk.vtkPolyData() - if Points.GetNumberOfPoints()>2: # todo: avoid error messages + add support for lines/surfaces - # create delaunay object - if dimension==2: - delaunay = vtk.vtkDelaunay2D() - elif dimension==3: - delaunay = vtk.vtkDelaunay3D() - #delaunay.SetAlpha(0.1) - delaunay.SetInput(polydata) - delaunay.Update() - - # create surfaceFilter - surfaceFilter = vtk.vtkDataSetSurfaceFilter() - surfaceFilter.SetInputConnection(delaunay.GetOutputPort()) - surfaceFilter.Update() - - polydata2 = surfaceFilter.GetOutput() - - lookupTable = vtk.vtkLookupTable() - lookupTable.SetNumberOfTableValues(no_aggs) - lookupTable.Build() - - Ids = vtk.vtkUnsignedIntArray() - Ids.SetNumberOfComponents(1) - Ids.SetName("Ids") - for i in range(0,Points.GetNumberOfPoints()): - Ids.InsertNextTuple1(int(aggid)) - Ids.SetLookupTable(lookupTable) - - Procs = vtk.vtkUnsignedCharArray() - Procs.SetNumberOfComponents(1) - Procs.SetName("proc") - for i in range(0,Points.GetNumberOfPoints()): - Procs.InsertNextTuple1(aggid2procs[aggid]) - - - polydata2.SetPoints(Points) - polydata2.SetVerts(Vertices) - polydata2.GetPointData().SetScalars(Ids) - polydata2.GetPointData().AddArray(Procs) - polydata2.Modified() - polydata2.Update() - - aggpolygons.AddInput(polydata2) - - -################################################################################ -# READ IN AGGREGATES -# routines that read aggregation information from files - -def checkAggregateLine(line): - if line.find("Agg ") == 0: - return 1,line - else: - return 0,line - -def read_aggregates_from_file(filename,procid): - aggid2nodes = {} - aggid2procs = {} - for l in file(filename): - line = l.strip() - - # filter out only Agg lines - ret,line = checkAggregateLine(line) - if ret == 0: - continue - - # line now contains a list of all tokens in that line - line = line.split(": ") - - # extract aggid and proc number - agginfo = line[0] - agginfo = agginfo.split(" ") - - aggid = agginfo[1] - procid = agginfo[3] - - # handle node ids for aggregate - aggnodeids = line[1] - aggnodeids = aggnodeids.split(" ") - - # fill in data variables - aggid2nodes[aggid] = aggnodeids - aggid2procs[aggid] = int(procid) - - return aggid2nodes,aggid2procs - -################################################################################ -# read in aggregation info from file -# input: filename_prototype string with prototype for filename, e.g. aggs_level%LEVEL_proc%PROCS.outlines -# the variables %LEVEL and %PROCS are replaced by the corresponding values -# input: procs: number of processors (4 means that information from processors 0..3 is expected) -# input: level: level number -def readin_aggregates(filename_prototype,procs,level): - aggid2nodes = {} - aggid2procs = {} - for proc in range(0,procs): - #filename = "aggs_level" + str(level) + "_proc" + str(proc) + ".out" - filename = filename_prototype - filename = filename.replace("%LEVEL",str(level)) - filename = filename.replace("%PROC",str(proc)) - print "process ", filename - if os.path.exists(filename): - [aggid2nodesfromproc,aggid2procsfromproc] = read_aggregates_from_file(filename,proc) - aggid2nodes.update(aggid2nodesfromproc) - aggid2procs.update(aggid2procsfromproc) - - return aggid2nodes,aggid2procs - -################################################################################ -# HELPER ROUTINES -# for generating next level information (nodesX.txt) - -################################################################################ -# get_agg_coords (helper function for get_rootnodes) -# input: list of nodes (coordinates) -# input: map aggid2gids: map of local agg ids -> GIDs -# input: aggid: global aggregate id -# output: returns set of node coordinates for aggregate with global aggid -def get_agg_coords(nodes,aggid2nodes,aggid): - agg_nodes = aggid2nodes[aggid] - nodeset = [] - for node in range(0,len(agg_nodes)): - nodeset.append(nodes[int(agg_nodes[node])]) - return nodeset - -################################################################################ -# get rootnodes -# input: aggs = map: aggid -> list of nodeids in this agg -# output: list of rootnodes -# note: we calculate the "midpoint" of each aggregate -# TODO extend me for 3d! -def get_rootnodes(aggid2nodes,nodes): - dim = 2 - if len(nodes[0]) == 3: - dim = 3 - - rootnodes = [] - for i in range(0,len(aggid2nodes.keys())): - rootnodes.append((0,0)) - for k in aggid2nodes.keys(): - - nodecoords = get_agg_coords(nodes,aggid2nodes,k) - - x = 0.0 - y = 0.0 - z = 0.0 - for m in nodecoords: - - x = x + m[0] - y = y + m[1] - if dim==3: - z = z + m[2] - x = x/len(aggid2nodes[k]) - y = y/len(aggid2nodes[k]) - if dim == 3: - z = z/len(aggid2nodes[k]) - - if dim == 2: - rootnodes[int(k)] = (x,y) - elif dim == 3: - rootnodes[int(k)] = (x,y,z) - else: print "error: dim must be 2 or 3 but it is " + str(dim) - - return rootnodes - -# write nodes file -# input: filename: filename for nodes file (should follow nodeX.txt style) -# input: aggid2nodes map for aggid to list of global nodeidx -# input: nodes list of node coordinates -# input: dimension (2 or 3) -def write_nodes_file(filename,aggid2nodes,nodes,dimension): - - # calculate root nodes (works only for 2d) - rootnodes = get_rootnodes(aggid2nodes,nodes) - - # write nodes file - f = open(filename,"w") - f.write(str(dimension)) - f.write("\r\n") - for i in range(len(rootnodes)): - rootnode = rootnodes[i] - f.write(str(rootnode[0])) - f.write(" ") - f.write(str(rootnode[1])) - if len(rootnode)==3: - f.write(" ") - f.write(str(rootnode[2])) - f.write("\r\n") - f.close() - print "node file " + filename + " generated: OK" - -################################################################################ -# check if all files exist to proceed with next level -# we need a nodesX.txt file for the node coordinates -# and all aggregation information files (from the AggregationExportFactory) -# input: nextlevel: id for next level -# procs: number of procs -# file_prototype: prototype for filename of aggregation information -def check_files_for_next_level(nextlevel,procs,file_prototype): - - if nextlevel==0: - if os.path.isfile("example.txt") == False: - return False - else: - # check if coarse level node coordinates are available - if os.path.isfile("nodes"+str(nextlevel)+".txt") == False: - return False - - #for p in range(0,procs): - for p in range(0,1): # check only processor one - filename = file_prototype - filename = filename.replace("%LEVEL",str(nextlevel)) - filename = filename.replace("%PROC",str(p)) - if os.path.isfile(filename) == False: - return False - - return True - -########### -# MAIN routine -def main(argv=None): - dimension = 2 - numprocs = $NUMPROCS - level = 0 # startlevel - - no_multigridlevels = 0 - - # check how many processors generated aggregation output - #while check_files_for_next_level(0,numprocs, "aggs_level%LEVEL_proc%PROC.out") == True: - # numprocs = numprocs + 1 - #numprocs = numprocs - 1 - #print "Aggregtaion information for " + str(numprocs) + " processors found" - - # process all multigrid levels - while check_files_for_next_level(level,numprocs,"aggs_level%LEVEL_proc%PROC.out"): - global_nodecoords = [] - - print "Level " + str(level) - - if level==0: # read in coordinates (finest level - global_nodecoords,dimension = read_finelevel_nodecoords_from_file("example.txt") - else: - global_nodecoords,dimension = read_nodecoords_from_file("nodes"+str(level)+".txt") - - # read aggregates - aggid2nodes, aggid2procs = readin_aggregates("aggs_level%LEVEL_proc%PROC.out",numprocs,level) - - # vtk polygon for output - aggpolygons = vtk.vtkAppendPolyData() - - # collect all aggregates - for aggid,agg_nodes in aggid2nodes.iteritems(): - # build an aggregate - if dimension==2: - prepareDelaunayData(dimension, agg_nodes, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs) - else: - prepareDelaunayData3d(dimension, agg_nodes, global_nodecoords, aggpolygons, aggid, aggid2nodes, aggid2procs) - - #aggpolygons.GetOutput().GetPointData().SetVectors(vtkDisplacementVector) - #aggpolygons.Update() - - writer = vtk.vtkXMLPolyDataWriter() - fname = "aggs"+str(level)+".vtp" - writer.SetFileName(fname) - writer.SetInput(aggpolygons.GetOutput()) - writer.Write() - - - write_nodes_file("nodes"+str(level+1)+".txt",aggid2nodes,global_nodecoords,dimension) - - # increment number of multigrid levels that have been found in the files - if no_multigridlevels < level: - no_multigridlevels = level - - print "VTK Export for level " + str(level) + " finished...\r\n" - - level = level + 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/packages/muelu/doc/Tutorial/src/tmpl/muelu.xml_TMPL b/packages/muelu/doc/Tutorial/src/tmpl/muelu.xml_TMPL deleted file mode 100644 index 3bc306943a3b..000000000000 --- a/packages/muelu/doc/Tutorial/src/tmpl/muelu.xml_TMPL +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/tmpl/muelu_easy.xml_TMPL b/packages/muelu/doc/Tutorial/src/tmpl/muelu_easy.xml_TMPL deleted file mode 100644 index f9c15cf155a6..000000000000 --- a/packages/muelu/doc/Tutorial/src/tmpl/muelu_easy.xml_TMPL +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -$IF_CHEBYSHEV - - - - - -$ENDIF_CHEBYSHEV -$IF_RELAXATION - - - -$ENDIF_RELAXATION - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/ml_ParameterList.xml b/packages/muelu/doc/Tutorial/src/xml/ml_ParameterList.xml deleted file mode 100644 index ccef1f584a58..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/ml_ParameterList.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/ml_RebalancedParameterList.xml b/packages/muelu/doc/Tutorial/src/xml/ml_RebalancedParameterList.xml deleted file mode 100644 index 30d58e42afc3..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/ml_RebalancedParameterList.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/muelu_ParameterList.xml b/packages/muelu/doc/Tutorial/src/xml/muelu_ParameterList.xml deleted file mode 100644 index a58192418d8e..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/muelu_ParameterList.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n1_easy.xml b/packages/muelu/doc/Tutorial/src/xml/n1_easy.xml deleted file mode 100644 index 381875567795..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n1_easy.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n1_easy_pg.xml b/packages/muelu/doc/Tutorial/src/xml/n1_easy_pg.xml deleted file mode 100644 index 33215cccbfbc..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n1_easy_pg.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg.xml b/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg.xml deleted file mode 100644 index d2fde4c9f131..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg2.xml b/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg2.xml deleted file mode 100644 index 1c7edd079731..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg2.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg3.xml b/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg3.xml deleted file mode 100644 index a473fd0d1eff..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n2_easy_agg3.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/n2_easy_export.xml b/packages/muelu/doc/Tutorial/src/xml/n2_easy_export.xml deleted file mode 100644 index 7ce75acc701d..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/n2_easy_export.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy.xml deleted file mode 100644 index 0088ea906c4d..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_10levels.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_10levels.xml deleted file mode 100644 index 701cfa38e689..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_10levels.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_smoothed.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_smoothed.xml deleted file mode 100644 index 03674583be0b..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_smoothed.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_unsmoothed.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_unsmoothed.xml deleted file mode 100644 index c7818ddec7a6..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_3levels_unsmoothed.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_exercise.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_exercise.xml deleted file mode 100644 index 7b00631d0108..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_exercise.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi.xml deleted file mode 100644 index 355b9f6a5499..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi2.xml b/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi2.xml deleted file mode 100644 index 37eb039d0afb..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s1_easy_jacobi2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2_adv_a.xml b/packages/muelu/doc/Tutorial/src/xml/s2_adv_a.xml deleted file mode 100644 index e303bd46f45b..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2_adv_a.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2_adv_b.xml b/packages/muelu/doc/Tutorial/src/xml/s2_adv_b.xml deleted file mode 100644 index e972413a230c..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2_adv_b.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2_adv_c.xml b/packages/muelu/doc/Tutorial/src/xml/s2_adv_c.xml deleted file mode 100644 index 2f53c07663c5..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2_adv_c.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2_easy.xml b/packages/muelu/doc/Tutorial/src/xml/s2_easy.xml deleted file mode 100644 index bf44a8444a94..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2_easy.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2a.xml b/packages/muelu/doc/Tutorial/src/xml/s2a.xml deleted file mode 100644 index 2b67e5301535..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2a.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s2b.xml b/packages/muelu/doc/Tutorial/src/xml/s2b.xml deleted file mode 100644 index 4c1bafa5dbd2..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s2b.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3a.xml b/packages/muelu/doc/Tutorial/src/xml/s3a.xml deleted file mode 100644 index 3302e709839e..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3a.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3a_easy.xml b/packages/muelu/doc/Tutorial/src/xml/s3a_easy.xml deleted file mode 100644 index dcd8b2ba8328..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3a_easy.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3b.xml b/packages/muelu/doc/Tutorial/src/xml/s3b.xml deleted file mode 100644 index 84b7556fe854..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3b.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3b1.xml b/packages/muelu/doc/Tutorial/src/xml/s3b1.xml deleted file mode 100644 index 792cb5ebe38a..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3b1.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3b2.xml b/packages/muelu/doc/Tutorial/src/xml/s3b2.xml deleted file mode 100644 index 588c596993b7..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3b2.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3b3.xml b/packages/muelu/doc/Tutorial/src/xml/s3b3.xml deleted file mode 100644 index 51e5e069a4f5..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3b3.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3b_easy.xml b/packages/muelu/doc/Tutorial/src/xml/s3b_easy.xml deleted file mode 100644 index 0b729300e58d..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3b_easy.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3c.xml b/packages/muelu/doc/Tutorial/src/xml/s3c.xml deleted file mode 100644 index 17a487d848ea..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3c.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s3c_easy.xml b/packages/muelu/doc/Tutorial/src/xml/s3c_easy.xml deleted file mode 100644 index 08d3b8695d69..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s3c_easy.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s4a.xml b/packages/muelu/doc/Tutorial/src/xml/s4a.xml deleted file mode 100644 index 0f63a4171a66..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s4a.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s4av.xml b/packages/muelu/doc/Tutorial/src/xml/s4av.xml deleted file mode 100644 index 904a99aae29b..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s4av.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s4b.xml b/packages/muelu/doc/Tutorial/src/xml/s4b.xml deleted file mode 100644 index da7800e51bb5..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s4b.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s4c.xml b/packages/muelu/doc/Tutorial/src/xml/s4c.xml deleted file mode 100644 index 740c92e44707..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s4c.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s5a.xml b/packages/muelu/doc/Tutorial/src/xml/s5a.xml deleted file mode 100644 index fcba9e41cb26..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s5a.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s5b.xml b/packages/muelu/doc/Tutorial/src/xml/s5b.xml deleted file mode 100755 index 7ac0441b3175..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s5b.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s6_dep.xml b/packages/muelu/doc/Tutorial/src/xml/s6_dep.xml deleted file mode 100644 index 7bc96244d158..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s6_dep.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/src/xml/s6_export.xml b/packages/muelu/doc/Tutorial/src/xml/s6_export.xml deleted file mode 100644 index 328a5c5c1f4f..000000000000 --- a/packages/muelu/doc/Tutorial/src/xml/s6_export.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/doc/Tutorial/tex/CMakeLists.txt b/packages/muelu/doc/Tutorial/tex/CMakeLists.txt deleted file mode 100644 index d61c3f1428d6..000000000000 --- a/packages/muelu/doc/Tutorial/tex/CMakeLists.txt +++ /dev/null @@ -1,75 +0,0 @@ - -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - - - #TRIBITS_ADD_EXECUTABLE_AND_TEST( - # tutorial_laplace2d - # SOURCES laplace2d.cpp - # NUM_MPI_PROCS 2 - # COMM mpi serial - #) - - TRIBITS_COPY_FILES_TO_BINARY_DIR(tutorial_generateTutorial - SOURCE_FILES prepareTexTutorial.py main.tex definitions.tex bookstyle.tex - pics/1level_100jac09.png - pics/1level_1000jac09.png - pics/3level_1jac09.png - pics/3level_10jac09.png - pics/3level_100jac09.png - pics/s4bl1.png - pics/s4bl2.png - pics/s4bl3.png - pics/aggsSymm.png - pics/aggsSymmReb.png - pics/aggsNonSymm.png - pics/aggsSymmCoupled.png - pics/1level_1jac09.png - pics/1level_10jac09.png - pics/2level_1jac09.png - pics/2level_10jac09.png - pics/2level_100jac09.png - pics/2level_1000jac09.png - pics/5sweeps_1level_1jac09.png - pics/5sweeps_1level_10jac09.png - pics/5sweeps_1level_100jac09.png - pics/5sweeps_2level_1jac09.png - pics/5sweeps_2level_10jac09.png - pics/5sweeps_2level_100jac09.png - pics/5sweeps_3level_1jac09.png - pics/5sweeps_3level_10jac09.png - pics/5sweeps_3level_100jac09.png - pics/background.pdf - pics/lubuntu_1.png - pics/lubuntu_2.png - pics/lubuntu_3.png - pics/lubuntu_4.png - pics/lubuntu_5.png - pics/lubuntu_6.png - pics/dep_graph.png - pics/installation_1.png - pics/installation_2.png - pics/s4al1.png - pics/s4al2.png - pics/s4al3.png - pics/tut1_1.png - pics/tut1_2.png - pics/tut1_3.png - pics/tut1_4.png - pics/tut1_5.png - pics/tut1_6.png - pics/tut1_7.png - pics/tut1_8.png - pics/tut1_9.png - pics/tut1_10.png - pics/tut1_11.png - pics/tut1_12.png - pics/tut1_13.png - pics/tut1_14.png - pics/tut1_15.png - pics/tut1_16.png - pics/tut1_17.png - pics/tut1_18.png - ) - - - diff --git a/packages/muelu/doc/Tutorial/tex/bookstyle.tex b/packages/muelu/doc/Tutorial/tex/bookstyle.tex deleted file mode 100755 index a6ed6358ecd5..000000000000 --- a/packages/muelu/doc/Tutorial/tex/bookstyle.tex +++ /dev/null @@ -1,408 +0,0 @@ -%---------------------------------------------------------------------------------------- -% VARIOUS REQUIRED PACKAGES -%---------------------------------------------------------------------------------------- - -\usepackage{titlesec} % Allows customization of titles - -\usepackage{graphicx} % Required for including pictures -%\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored - - -\usepackage{tikz} % Required for drawing custom shapes - -\usepackage[english]{babel} % English language/hyphenation - -\usepackage{enumitem} % Customize lists -\setlist{nolistsep} % Reduce spacing between bullet points and numbered lists - -\usepackage{booktabs} % Required for nicer horizontal rules in tables - -\usepackage{eso-pic} % Required for specifying an image background in the title page - -%---------------------------------------------------------------------------------------- -% MAIN TABLE OF CONTENTS -%---------------------------------------------------------------------------------------- - -\usepackage{titletoc} % Required for manipulating the table of contents - -\contentsmargin{0cm} % Removes the default margin -% Chapter text styling -\titlecontents{chapter}[1.25cm] % Indentation -{\addvspace{15pt}\large\sffamily\bfseries} % Spacing and font options for chapters -{\color{ocre!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Chapter number -{} -{\color{ocre!60}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number -% Section text styling -\titlecontents{section}[1.25cm] % Indentation -{\addvspace{5pt}\sffamily\bfseries} % Spacing and font options for sections -{\contentslabel[\thecontentslabel]{1.25cm}} % Section number -{} -{\sffamily\hfill\color{black}\thecontentspage} % Page number -[] -% Subsection text styling -\titlecontents{subsection}[1.25cm] % Indentation -{\addvspace{1pt}\sffamily\small} % Spacing and font options for subsections -{\contentslabel[\thecontentslabel]{1.25cm}} % Subsection number -{} -{\sffamily\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number -[] - -%---------------------------------------------------------------------------------------- -% MINI TABLE OF CONTENTS IN CHAPTER HEADS -%---------------------------------------------------------------------------------------- - -% Section text styling -\titlecontents{lsection}[0em] % Indendating -{\footnotesize\sffamily} % Font settings -{} -{} -{} - -% Subsection text styling -\titlecontents{lsubsection}[.5em] % Indentation -{\normalfont\footnotesize\sffamily} % Font settings -{} -{} -{} - -%---------------------------------------------------------------------------------------- -% PAGE HEADERS -%---------------------------------------------------------------------------------------- - -\usepackage{fancyhdr} % Required for header and footer configuration - -\pagestyle{fancy} -\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}} % Chapter text font settings -\renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}} % Section text font settings -\fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\thepage} % Font setting for the page number in the header -\fancyhead[LO]{\rightmark} % Print the nearest section name on the left side of odd pages -\fancyhead[RE]{\leftmark} % Print the current chapter name on the right side of even pages -\renewcommand{\headrulewidth}{0.5pt} % Width of the rule under the header -\addtolength{\headheight}{2.5pt} % Increase the spacing around the header slightly -\renewcommand{\footrulewidth}{0pt} % Removes the rule in the footer -\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} % Style for when a plain pagestyle is specified - -% Removes the header from odd empty pages at the end of chapters -\makeatletter -\renewcommand{\cleardoublepage}{ -\clearpage\ifodd\c@page\else -\hbox{} -\vspace*{\fill} -\thispagestyle{empty} -\newpage -\fi} - -%---------------------------------------------------------------------------------------- -% THEOREM STYLES -%---------------------------------------------------------------------------------------- - -\usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc - -\newcommand{\intoo}[2]{\mathopen{]}#1\,;#2\mathclose{[}} -\newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}} -\newcommand{\intff}[2]{\mathopen{[}#1\,;#2\mathclose{]}} -\newtheorem{notation}{Notation}[chapter] - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%% dedicated to boxed/framed environements %%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newtheoremstyle{ocrenumbox}% % Theorem style name -{0pt}% Space above -{0pt}% Space below -{\normalfont}% % Body font -{}% Indent amount -{\small\bf\sffamily\color{ocre}}% % Theorem head font -{\;}% Punctuation after theorem head -{0.25em}% Space after theorem head -{\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1) -\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note -\renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square - -\newtheoremstyle{blacknumex}% Theorem style name -{5pt}% Space above -{5pt}% Space below -{\normalfont}% Body font -{} % Indent amount -{\small\bf\sffamily}% Theorem head font -{\;}% Punctuation after theorem head -{0.25em}% Space after theorem head -{\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1) -\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note - -\newtheoremstyle{blacknumbox} % Theorem style name -{0pt}% Space above -{0pt}% Space below -{\normalfont}% Body font -{}% Indent amount -{\small\bf\sffamily}% Theorem head font -{\;}% Punctuation after theorem head -{0.25em}% Space after theorem head -{\small\sffamily\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1) -\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%% dedicated to non-boxed/non-framed environements %%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newtheoremstyle{ocrenum}% % Theorem style name -{5pt}% Space above -{5pt}% Space below -{\normalfont}% % Body font -{}% Indent amount -{\small\bf\sffamily\color{ocre}}% % Theorem head font -{\;}% Punctuation after theorem head -{0.25em}% Space after theorem head -{\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1) -\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note -\renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square -\makeatother - -% Defines the theorem text style for each type of theorem to one of the three styles above -\newcounter{dummy} -\numberwithin{dummy}{section} -\theoremstyle{ocrenumbox} -\newtheorem{theoremeT}[dummy]{Theorem} -\newtheorem{problem}{Problem}[chapter] -\newtheorem{exerciseT}{Exercise}[chapter] -\theoremstyle{blacknumex} -\newtheorem{exampleT}{Example}[chapter] -\theoremstyle{blacknumbox} -\newtheorem{vocabulary}{Vocabulary}[chapter] -\newtheorem{definitionT}{Definition}[section] -\newtheorem{corollaryT}[dummy]{Corollary} -\theoremstyle{ocrenum} -\newtheorem{proposition}[dummy]{Proposition} - -%---------------------------------------------------------------------------------------- -% DEFINITION OF COLORED BOXES -%---------------------------------------------------------------------------------------- - -\RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes - -% Theorem box -\newmdenv[skipabove=7pt, -skipbelow=7pt, -backgroundcolor=black!5, -linecolor=ocre, -innerleftmargin=5pt, -innerrightmargin=5pt, -innertopmargin=5pt, -leftmargin=0cm, -rightmargin=0cm, -innerbottommargin=5pt]{tBox} - -% Exercise box -\newmdenv[skipabove=7pt, -skipbelow=7pt, -rightline=false, -leftline=true, -topline=false, -bottomline=false, -backgroundcolor=ocre!10, -linecolor=ocre, -innerleftmargin=5pt, -innerrightmargin=5pt, -innertopmargin=5pt, -innerbottommargin=5pt, -leftmargin=0cm, -rightmargin=0cm, -linewidth=4pt]{eBox} - -% Definition box -\newmdenv[skipabove=7pt, -skipbelow=7pt, -rightline=false, -leftline=true, -topline=false, -bottomline=false, -linecolor=ocre, -innerleftmargin=5pt, -innerrightmargin=5pt, -innertopmargin=0pt, -leftmargin=0cm, -rightmargin=0cm, -linewidth=4pt, -innerbottommargin=0pt]{dBox} - -% Corollary box -\newmdenv[skipabove=7pt, -skipbelow=7pt, -rightline=false, -leftline=true, -topline=false, -bottomline=false, -linecolor=gray, -backgroundcolor=black!5, -innerleftmargin=5pt, -innerrightmargin=5pt, -innertopmargin=5pt, -leftmargin=0cm, -rightmargin=0cm, -linewidth=4pt, -innerbottommargin=5pt]{cBox} - -% Creates an environment for each type of theorem and assigns it a theorem text style from the "Theorem Styles" section above and a colored box from above -\newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}} -\newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{exerciseT}\end{eBox}} -\newenvironment{definition}{\begin{dBox}\begin{definitionT}}{\end{definitionT}\end{dBox}} -\newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}} -\newenvironment{corollary}{\begin{cBox}\begin{corollaryT}}{\end{corollaryT}\end{cBox}} - -%---------------------------------------------------------------------------------------- -% REMARK ENVIRONMENT -%---------------------------------------------------------------------------------------- - -\newenvironment{remark}{\par\vspace{10pt}\small % Vertical white space above the remark and smaller font size -\begin{list}{}{ -\leftmargin=35pt % Indentation on the left -\rightmargin=25pt}\item\ignorespaces % Indentation on the right -\makebox[-2.5pt]{\begin{tikzpicture}[overlay] -\node[draw=ocre!60,line width=1pt,circle,fill=ocre!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-15pt,0pt){\textcolor{ocre}{R}};\end{tikzpicture}} % Orange R in a circle -\advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark - -%---------------------------------------------------------------------------------------- -% SECTION NUMBERING IN THE MARGIN -%---------------------------------------------------------------------------------------- - -\makeatletter -\renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}} -\renewcommand{\section}{\@startsection{section}{1}{\z@} -{-4ex \@plus -1ex \@minus -.4ex} -{1ex \@plus.2ex } -{\normalfont\large\sffamily\bfseries}} -\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@} -{-3ex \@plus -0.1ex \@minus -.4ex} -{0.5ex \@plus.2ex } -{\normalfont\sffamily\bfseries}} -\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@} -{-2ex \@plus -0.1ex \@minus -.2ex} -{.2ex \@plus.2ex } -{\normalfont\small\sffamily\bfseries}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@} -{-2ex \@plus-.2ex \@minus .2ex} -{.1ex} -{\normalfont\small\sffamily\bfseries}} - -%---------------------------------------------------------------------------------------- -% HYPERLINKS IN THE DOCUMENTS -%---------------------------------------------------------------------------------------- - -% For an unclear reason, the package should be loaded now and not later -\usepackage{hyperref} -\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}} - -%---------------------------------------------------------------------------------------- -% PART HEADINGS -%---------------------------------------------------------------------------------------- - -\titleformat{\part}[display] %[frame] - {\Huge\color{black}} % format - % label: PART I - { - %\tikzexternaldisable\tikz{% - %\draw[->](0,0) -- (10,-10) -- (5,10); - %} % end tikz - %\tikzexternalenable - }% - {1pt} - { - \tikz{% - %\draw[-,color=black] (0,0.3\textheight) -- (\textwidth,0.3\textheight); - %\draw[-,color=black] (0,0.5\textheight) -- (\textwidth,0.5\textheight); - \node [fill=white,font=\fontsize{35}{35}\selectfont\color{black}] (mid) at (0.5\textwidth, 0.4 \textheight) - {\begin{minipage}{0.8\textwidth}\centering \normalfont\fontsize{35}{35}\sffamily\selectfont #1\end{minipage}}; - \draw[fill=ocre!50!white,color=ocre!50!white,rounded corners=2mm] (0.12\textwidth,0.445\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!40!white,color=ocre!40!white,rounded corners=2mm] (0.22\textwidth,0.445\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!30!white,color=ocre!30!white,rounded corners=2mm] (0.32\textwidth,0.445\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!20!white,color=ocre!20!white,rounded corners=2mm] (0.42\textwidth,0.445\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!10!white,color=ocre!10!white,rounded corners=2mm] (0.52\textwidth,0.445\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!10!white,color=gray!10!white,rounded corners=2mm] (0.52\textwidth,0.295\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!20!white,color=gray!20!white,rounded corners=2mm] (0.62\textwidth,0.295\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!30!white,color=gray!30!white,rounded corners=2mm] (0.72\textwidth,0.295\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!40!white,color=gray!40!white,rounded corners=2mm] (0.82\textwidth,0.295\textheight) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!50!white,color=gray!50!white,rounded corners=2mm] (0.92\textwidth,0.295\textheight) rectangle ++(1.3cm,1.3cm); - } % end tikz - %\partname #1%\IfColorDefined{sectioncolor}{}{}% - } - -%---------------------------------------------------------------------------------------- -% CHAPTER HEADINGS -%---------------------------------------------------------------------------------------- - -% The set-up below should be (sadly) manually adapted to the overall margin page septup controlled by the geometry package loaded in the main.tex document. It is possible to implement below the dimensions used in the goemetry package (top,bottom,left,right)... TO BE DONE - -\newcommand{\thechapterimage}{} -\newcommand{\chapterimage}[1]{\renewcommand{\thechapterimage}{#1}} - -% Numbered chapters with mini tableofcontents -\def\thechapter{\arabic{chapter}} -\def\@makechapterhead#1{ -\thispagestyle{empty} -{\centering \normalfont\sffamily -\ifnum \c@secnumdepth >\m@ne -\if@mainmatter -\startcontents -\begin{tikzpicture}[remember picture,overlay] -\node at (current page.north west) -{\begin{tikzpicture}[remember picture,overlay] -%\node[anchor=north west,inner sep=0pt] at (0,0) {\includegraphics[width=\paperwidth]{\thechapterimage}}; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Commenting the 3 lines below removes the small contents box in the chapter heading -%\fill[color=ocre!10!white,opacity=.6,rounded corners=2mm] (13cm,-2cm) rectangle (18cm,-6.5cm); -%\node[anchor=north west] at (13.1cm,-2.35cm) {\parbox[t][5cm][t]{4.5cm}{\huge\bfseries\flushleft \printcontents{l}{1}{\setcounter{tocdepth}{2}}}}; -%\node[anchor=north west] at (13.1cm,-2.2cm) {\textbf{Content:}}; -\draw[anchor=west] (5cm,-9cm) node [rounded corners=20pt,fill=ocre!10!white,text opacity=1,draw=ocre,draw opacity=1,line width=1.5pt,fill opacity=.6,inner sep=12pt]{\huge\sffamily\bfseries\textcolor{black}{\thechapter. #1\strut\makebox[22cm]{}}}; - \draw[fill=ocre!50!white,color=ocre!50!white,rounded corners=2mm] (4,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!40!white,color=ocre!40!white,rounded corners=2mm] (5.5,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!30!white,color=ocre!30!white,rounded corners=2mm] (5.5,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!20!white,color=ocre!20!white,rounded corners=2mm] (8.5,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!10!white,color=ocre!10!white,rounded corners=2mm] (10,-6.5) rectangle ++(1.3cm,1.3cm); - - \draw[fill=gray!10!white,color=gray!10!white,rounded corners=2mm] (11.5,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!20!white,color=gray!20!white,rounded corners=2mm] (7,-3.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!30!white,color=gray!30!white,rounded corners=2mm] (4,-3.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!40!white,color=gray!40!white,rounded corners=2mm] (7,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!50!white,color=gray!50!white,rounded corners=2mm] (4,-6.5) rectangle ++(1.3cm,1.3cm); - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\end{tikzpicture}}; -\end{tikzpicture}} -\par\vspace*{230\p@} -\fi -\fi} - -% Unnumbered chapters without mini tableofcontents (could be added though) -\def\@makeschapterhead#1{ -\thispagestyle{empty} -{\centering \normalfont\sffamily -\ifnum \c@secnumdepth >\m@ne -\if@mainmatter -\begin{tikzpicture}[remember picture,overlay] -\node at (current page.north west) -{\begin{tikzpicture}[remember picture,overlay] -%\node[anchor=north west,inner sep=0pt] at (0,0) {\includegraphics[width=\paperwidth]{\thechapterimage}}; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Commenting the 3 lines below removes the small contents box in the chapter heading -%\fill[color=ocre!10!white,opacity=.6,rounded corners=2mm] (13cm,-2cm) rectangle (18cm,-6.5cm); -%\node[anchor=north west] at (13.1cm,-2.35cm) {\parbox[t][5cm][t]{4.5cm}{\huge\bfseries\flushleft \printcontents{l}{1}{\setcounter{tocdepth}{2}}}}; -%\node[anchor=north west] at (13.1cm,-2.2cm) {\textbf{Content:}}; -\draw[anchor=west] (5cm,-9cm) node [rounded corners=20pt,fill=ocre!10!white,text opacity=1,draw=ocre,draw opacity=1,line width=1.5pt,fill opacity=.6,inner sep=12pt]{\huge\sffamily\bfseries\textcolor{black}{#1\strut\makebox[22cm]{}}}; - \draw[fill=ocre!50!white,color=ocre!50!white,rounded corners=2mm] (4,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!40!white,color=ocre!40!white,rounded corners=2mm] (5.5,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!30!white,color=ocre!30!white,rounded corners=2mm] (5.5,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!20!white,color=ocre!20!white,rounded corners=2mm] (8.5,-5) rectangle ++(1.3cm,1.3cm); - \draw[fill=ocre!10!white,color=ocre!10!white,rounded corners=2mm] (10,-6.5) rectangle ++(1.3cm,1.3cm); - - \draw[fill=gray!10!white,color=gray!10!white,rounded corners=2mm] (11.5,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!20!white,color=gray!20!white,rounded corners=2mm] (7,-3.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!30!white,color=gray!30!white,rounded corners=2mm] (4,-3.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!40!white,color=gray!40!white,rounded corners=2mm] (7,-6.5) rectangle ++(1.3cm,1.3cm); - \draw[fill=gray!50!white,color=gray!50!white,rounded corners=2mm] (4,-6.5) rectangle ++(1.3cm,1.3cm); - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\end{tikzpicture}}; -\end{tikzpicture}} -\par\vspace*{230\p@} -\fi -\fi -} -\makeatother \ No newline at end of file diff --git a/packages/muelu/doc/Tutorial/tex/definitions.tex b/packages/muelu/doc/Tutorial/tex/definitions.tex deleted file mode 100644 index 5268dc614c80..000000000000 --- a/packages/muelu/doc/Tutorial/tex/definitions.tex +++ /dev/null @@ -1,52 +0,0 @@ -\newcommand{\amesos} {\textsc{Amesos}\xspace} -\newcommand{\amesostwo} {\textsc{Amesos2}\xspace} -\newcommand{\anasazi} {\textsc{Anasazi}\xspace} -\newcommand{\aztecoo} {\textsc{AztecOO}\xspace} -\newcommand{\belos} {\textsc{Belos}\xspace} -\newcommand{\epetra} {\textsc{Epetra}\xspace} -\newcommand{\epetraext} {\textsc{EpetraExt}\xspace} -\newcommand{\galeri} {\textsc{Galeri}\xspace} -\newcommand{\ifpack} {\textsc{Ifpack}\xspace} -\newcommand{\ifpacktwo} {\textsc{Ifpack2}\xspace} -\newcommand{\isorropia} {\textsc{Isorropia}\xspace} -\newcommand{\loca} {\textsc{Loca}\xspace} -\newcommand{\ml} {\textsc{ML}\xspace} -\newcommand{\muelu} {\textsc{MueLu}\xspace} -\newcommand{\nox} {\textsc{NOX}\xspace} -\newcommand{\stratimikos} {\textsc{Stratimikos}\xspace} -\newcommand{\teuchos} {\textsc{Teuchos}\xspace} -\newcommand{\teko} {\textsc{Teko}\xspace} -\newcommand{\thyra} {\textsc{Thyra}\xspace} -\newcommand{\tpetra} {\textsc{Tpetra}\xspace} -\newcommand{\trilinos} {\textsc{Trilinos}\xspace} -\newcommand{\xpetra} {\textsc{Xpetra}\xspace} -\newcommand{\zoltan} {\textsc{Zoltan}\xspace} -\newcommand{\zoltantwo} {\textsc{Zoltan2}\xspace} - - -\newcommand{\klu} {\textsc{Klu}\xspace} -\newcommand{\metis} {\textsc{Metis}\xspace} -\newcommand{\mumps} {\textsc{Mumps}\xspace} -\newcommand{\umfpack} {\textsc{Umfpack}\xspace} -\newcommand{\superlu} {\textsc{SuperLU}\xspace} -\newcommand{\superludist} {\textsc{SuperLU\_dist}\xspace} -\newcommand{\parmetis} {\textsc{ParMetis}\xspace} -\newcommand{\paraview} {\textsc{ParaView}\xspace} - -\newcommand{\parameterlist}{\texttt{ParameterList}\xspace} - -\newcommand \trilinosWeb {trilinos.sandia.gov\xspace} - -%\newcommand{\be} {\begin{enumerate}} -%\newcommand{\ee} {\end{enumerate}} -%\newcommand{\cba}[3]{\choicebox{\texttt{#1}}{[{\texttt #2}] #3}} -%\newcommand{\cbb}[4]{\choicebox{\texttt{#1}}{[{\texttt #2}] #4 {\bf Default:~}#3.}} -%\newcommand{\cbc}[4]{\choicebox{\texttt{\color{red}#1}}{[{\texttt #2}] #4 {\bf Default:~}#3.}} -% -%\newcommand{\comm}[2]{\bigskip -% \begin{tabular}{|p{4.5in}|}\hline -% \multicolumn{1}{|c|}{{\bf Comment by #1}}\\ \hline -% #2\\ \hline -% \end{tabular}\\ -% \bigskip -% } diff --git a/packages/muelu/doc/Tutorial/tex/main.tex b/packages/muelu/doc/Tutorial/tex/main.tex deleted file mode 100644 index feae3cdb5f2e..000000000000 --- a/packages/muelu/doc/Tutorial/tex/main.tex +++ /dev/null @@ -1,3520 +0,0 @@ - -%\documentclass{article} -\documentclass[10pt,fleqn]{book} -\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} % Page margins - -\usepackage{xcolor} % Required for specifying colors by name -\definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book - -% Font Settings -\usepackage{avant} % Use the Avantgarde font for headings -%\usepackage{times} % Use the Times font for headings -%\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Symbol, Chancery and Computer Modern fonts - -\usepackage{microtype} % Slightly tweak font spacing for aesthetics - -\usepackage[latin1]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{xspace} -\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{amssymb} -\usepackage{makeidx} -\usepackage{amsthm} -\usepackage{pifont} -\usepackage{listings} -\usepackage{calc} -\usepackage{subfigure} - -\usepackage{flowchart} % also loads tikz -\usepackage{tikz} -\usetikzlibrary{arrows,shapes,positioning,calc} -\usepackage{dot2texi} - -\usepackage[explicit]{titlesec} -\usepackage{titletoc} -\usepackage{keystroke} - -\input{bookstyle} - -% -\definecolor{hellgelb}{rgb}{1,1,0.8} -\definecolor{hellgrau}{rgb}{0.9,0.9,0.9} -\definecolor{hellblau}{HTML}{B0FAFF} -\definecolor{hellgruen}{HTML}{C2FFA4} -\definecolor{hellrot}{HTML}{FFA4C2} -\definecolor{colKeys}{rgb}{0,0,1} -\definecolor{colIdentifier}{rgb}{0,0,0} -\definecolor{colComments}{rgb}{1,0,0} -\definecolor{colString}{rgb}{0,0.5,0} - -\lstset{% - float=hbp,% - basicstyle=\ttfamily\small, % - identifierstyle=\color{colIdentifier}, % - keywordstyle=\color{colKeys}, % - stringstyle=\color{colString}, % - commentstyle=\color{colComments}, % - columns=flexible, % - tabsize=2, % - frame=single, % - extendedchars=true, % - showspaces=false, % - showstringspaces=false, % - numbers=left, % - numberstyle=\tiny, % - breaklines=true, % - backgroundcolor=\color{ocre!20!white}, % - breakautoindent=true, % - captionpos=b% -} - - -\newtheorem*{mycomment}{\ding{42}} -\newtheoremstyle{plain} - {\topsep} % ABOVESPACE - {\topsep} % BELOWSPACE - {\normalfont} % BODYFONT - {0pt} % INDENT (empty value is the same as 0pt) - {\bfseries} % HEADFONT - {} % HEADPUNCT - {5pt plus 1pt minus 1pt} % HEADSPACE - {} % CUSTOM-HEAD-SPEC - - -\definecolor{MyGray}{rgb}{0.96,0.97,0.98} -\makeatletter\newenvironment{graybox}{% - \noindent\begin{lrbox}{\@tempboxa}\begin{minipage}{0.95\textwidth}}{\end{minipage}\end{lrbox}% - \colorbox{MyGray}{\usebox{\@tempboxa}} -}\makeatother - -\newcommand\printScreenOutput[1]{ -\lstinputlisting[firstline=2]{#1} -{\vspace{-0.3cm}\hfill\tiny{created with \muelu version \input{version.txt}}} -} - -\providecommand\printCppListing[1]{ -\lstinputlisting[language=C++]{#1} -%{\vspace{-0.3cm}\hfill\tiny{created with \muelu version \input{version.txt}}} -} -\providecommand\printCppListingSkipLine[1]{ -\lstinputlisting[language=C++,firstline=2]{#1} -%{\vspace{-0.3cm}\hfill\tiny{created with \muelu version \input{version.txt}}} -} - -\providecommand\printError[1]{ -\begin{lstlisting} -#1 -\end{lstlisting} -} - -\title{A MueLu hands-on tutorial} -\author{Tobias A. Wiesner \\ - Institute for Computational Mechanics \\ - Technische Universit\"at M\"unchen \\ - Boltzmannstr. 15 \\ - 85747 Garching - \and -Michael W. Gee\\ -Mechanics \& High Performance Computing Group \\ - Technische Universit\"at M\"unchen \\ - Parkring 35 \\ - 85748 Garching - \and -Andrey Prokopenko \\ -Scalable Algorithms \\ -Sandia National Laboratories\\ -Mailstop 1318 \\ -P.O.~Box 5800 \\ -Albuquerque, NM 87185-1318\\ -\and -Jonathan J. Hu \\ -Scalable Algorithms \\ -Sandia National Laboratories\\ -Mailstop 9159 \\ -P.O.~Box 0969 \\ -Livermore, CA 94551-0969 - } - -\date{\today} - -\begin{document} - -\include{definitions} - -%---------------------------------------------------------------------------------------- -% TITLE PAGE -%---------------------------------------------------------------------------------------- - -\begingroup -\thispagestyle{empty} -\AddToShipoutPicture*{\put(6,5){\includegraphics[scale=1]{pics/background}}} % Image background -\centering -\vspace*{9cm} -\par\normalfont\fontsize{35}{35}\sffamily\selectfont -The \muelu tutorial \par % Book title -\vspace*{1cm} -{\Huge \parbox{10cm}{Tobias Wiesner\newline Michael Gee \newline Andrey Prokopenko \newline Jonathan Hu}}\par % Author name -\endgroup - -%---------------------------------------------------------------------------------------- -% COPYRIGHT PAGE -%---------------------------------------------------------------------------------------- - -\newpage -~\vfill -\thispagestyle{empty} - -\noindent \textbf{Tobias A. Wiesner} \\ -Institute for Computational Mechanics \\ -Technische Universit\"at M\"unchen \\ -Boltzmannstr. 15 \\ -85747 Garching\\ -Germany\\ - -\noindent \textbf{Michael W. Gee}\\ -Mechanics \& High Performance Computing Group \\ -Technische Universit\"at M\"unchen \\ -Parkring 35 \\ -85748 Garching\\ -Germany\\ - -\noindent \textbf{Andrey Prokopenko} \\ -Scalable Algorithms \\ -Sandia National Laboratories\\ -Mailstop 1318 \\ -P.O.~Box 5800 \\ -Albuquerque, NM 87185-1318\\ - -\noindent \textbf{Jonathan J. Hu} \\ -Scalable Algorithms \\ -Sandia National Laboratories\\ -Mailstop 9159 \\ -P.O.~Box 0969 \\ -Livermore, CA 94551-0969\\ - -\noindent Sandia National Laboratories is a multimission laboratory -managed and operated by National Technology \& Engineering Solutions -of Sandia, LLC, a wholly owned subsidiary of Honeywell International -Inc., for the U.S. Department of Energy’s National Nuclear Security -Administration under contract DE-NA0003525. - - -%\noindent Copyright \copyright\ 2013 John Smith\\ % Copyright notice -% -%\noindent \textsc{Published by Publisher}\\ % Publisher -% - -% - - -%\noindent Licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported License (the ``License''). You may not use this file except in compliance with the License. You may obtain a copy of the License at \url{http://creativecommons.org/licenses/by-nc/3.0}. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \textsc{``as is'' basis, without warranties or conditions of any kind}, either express or implied. See the License for the specific language governing permissions and limitations under the License.\\ % License information - -\noindent \textsc{http://trilinos.org/packages/muelu/}\\ % URL - -\noindent \textit{SAND2014-18624 R} - -\noindent \textit{First printing, September 2014} % Printing/edition date - -\noindent {\tiny{\textit{Version: \input{version.txt}}}} - -\chapter*{Preface} - -\section*{Idea and concept} -The \muelu tutorial is written as a hands-on tutorial for \muelu, the next generation multigrid framework in \trilinos. It covers the whole spectrum from absolute beginners' topics to expert level. Since the focus of this tutorial is on practical and technical aspects of multigrid methods in general and \muelu in particular, the reader is expected to have a basic understanding of multigrid methods and its general underlying concepts. Please refer to multigrid textbooks (e.g. \cite{briggs}) for the theoretical background. - -\subsection*{Content} -The tutorial is split into three parts. The first part contains four tutorials for beginners who are interested in using multigrid methods. -No knowledge about C++ is required if the programs are used that come with the tutorial (in the \trilinos repository). If one uses the virtual box image one can even avoid the \trilinos compilation process. -So, the tutorials in the first part can also be used for teaching purposes. One can easily study the smoothing effect of multigrid smoothers and perform some very basic experiments which helps to gain a better understanding of multigrid methods. In the quick start tutorial all steps are documented step by step such that it should be very easy to follow the tutorial. Different exercises may encourage the reader for performing some more experiments and tests. The following tutorials give an overview of the existing level smoothers and transfer operators that can easily be used with the simple XML format \muelu uses for defining the multigrid hierarchies. In addition, it is explained how to visualize the aggregates and export the multigrid levels for a more in-depth analysis. - -The second part consists of five tutorials which are for users which are interested in some more background on the underlying techniques that are used in \muelu. The user still does not need explicit knowledge of C++ or any other programming language, but some interest in object-oriented design concepts may be helpful to understand the factory concept. The focus of the second part is on the introduction of the advanced XML interface for \muelu which describes all internal building blocks of the multigrid setup procedures with its internal dependencies. In context of transfer operator smoothing a brief introduction of the theory is given with some in-depth details on the algorithmic design in \muelu. More advanced topics such as rebalancing are handled as well as aggregation strategies. Additional exercises help the reader to perform some experiments in practice. - -The third part is meant for expert users who want to use \muelu within their own software. Many detailed C++ examples show how to use \muelu from an user application as preconditioner for a Krylov subspace method or as a standalone multigrid solver. We expect the reader to be familiar with \trilinos, especially with the linear algebra packages \epetra and \tpetra as well as the linear solver packages \aztecoo or \belos. For users who are already using \ml, the predecessor multigrid package of \muelu in \trilinos, we provide a chapter describing the migration process from \ml to \muelu. - -\section*{References} - -For a complete overview of all features and available parameters in \muelu the reader may refer to the \muelu user guide \cite{Mue}. For the most current version of \muelu it is recommended to visit the homepage -\begin{verbatim} -http://trilinos.org/packages/muelu/ -\end{verbatim} -If you find errors in this tutorial, please contact the \muelu user list -\begin{verbatim} -muelu-users@software.sandia.gov -\end{verbatim} - -\section*{Acknowledgments} -Many people have helped to develop \muelu, and we would like to acknowledge their contributions: Tom Benson, Julian Cortial, Jeremie Gaidamour, Axel Gerstenberger, Chetan Jhurani, Mark Hoemmen, Jonathan Hu, Paul Lin, Eric Phipps, Andrey Prokopenko, Chris Siefert, Paul Tsuji, Ray Tuminaro, and Tobias Wiesner. - -\part{Beginners tutorial} - -\lstset{ - breaklines=true, % sets automatic line breaking -} - - - -%\chapterimage{chapter_head_1.pdf} % Table of contents heading image -\chapterimage{pics/ch_bg1_small.png} % Table of contents heading image -\chapter{Quick start} - -The first example is meant to quickly get into touch with \muelu. - -\section{Example problem} -\label{lab:examplesym} -We generate a test matrix corresponding to the stencil of a 2D Laplacian operator on a structured Cartesian grid. The matrix stencil is -\begin{equation} -\label{lab:eq1} -\frac{1}{h^2}\begin{pmatrix} & -1 & \\ -1 & 4 & -1 \\ & -1 & \end{pmatrix}, -\end{equation} -where $h$ denotes the mesh size parameter. -The resulting matrix is symmetric positive definite. We choose the right hand side to be the constant vector one and use a random initial guess for the iterative solution process. The problem domain is the unit square with a Cartesian (uniform) mesh. - -\section{User interface} -For this tutorial there is an easy-to-use user interface to perform some experiments with multigrid methods for the given problem as described in \S\ref{lab:examplesym}. -To use the user-interface run -\begin{verbatim} -./hands-on.py -\end{verbatim} -in a terminal in the \texttt{doc/Tutorial/src} folder. - -First one has to choose a problem. For this tutorial the right choice is the option 0 for the Laplace 2D problem on a $50\times 50$ mesh. -\begin{center}\includegraphics[width=10cm]{pics/tut1_1.png} \end{center} - -Next one has to choose a xml file with the multigrid parameters. Choose option 2 and put in \texttt{xml/s1\_easy.xml} as filename for the xml file containing the xml parameters that are used for the multigrid method. -\begin{mycomment} -Please make sure that you enter a filename that actually exists on your hard disk! -\end{mycomment} - -\begin{center}\includegraphics[width=10cm]{pics/tut1_3.png} \end{center} - -The \texttt{s1\_easy.xml} file has the following content -\small -\lstinputlisting{../src/xml/s1_easy.xml} -\normalsize -As one can easily find from the xml parameters, a multigrid method with not more than 3 levels and a damped Jacobi method for level smoothing shall be used. - -Next, choose option 0 and run the example. That is, the linear system is created and iteratively solved both by a preconditioned CG method (from the \aztecoo package) with a \muelu multigrid preconditioner and a standalone multigrid solver (again using \muelu) with the given multigrid parameters. -\begin{center}\includegraphics[width=10cm]{pics/tut1_4.png} \end{center} -Note that the line \texttt{mpirun -np 2 MueLu\_tutorial\_laplace2d.exe --nx ...} is the command that is executed in the background. Per default are 2 processors used. - -After pressing a key we are ready for a first analysis as it is stated by the green letters \textit{Results up to date!} -\begin{center}\includegraphics[width=10cm]{pics/tut1_5.png} \end{center} -\begin{mycomment} -If the results are not up to date always choose option 0 first to recalculate the results. -\end{mycomment} - -To check the output select option 1 and you should find the following screen output: - -\printScreenOutput{s1_easy.txt_3.fragment_1.fragment} - -\begin{mycomment} -Depending on the number of lines in your terminal you may have to scroll up to the top of the file. -\end{mycomment} - -These lines give you some information about the setup process with some details on the aggregation process and the transfer operators. Note that for this example three levels are built (Level 0 for the finest level, level 1 as inter-medium level and level 2 for the coarsest level). Then an overview of the different multigrid levels is given by - -\printScreenOutput{s1_easy.txt_3.fragment_3.fragment} - -One can see that a three level multigrid method is used with a direct solver on the coarsest level and Jacobi level smoothers on the fine and inter-medium level. Furthermore some basic information is printed such as the operator complexity. - -In the end the CG convergence is printed when applying the generated multigrid method as preconditioner within a CG solver from the \aztecoo package in \trilinos. -The numbers give the relative residual after the corresponding number of iterations as well as the solution time in seconds. -\printScreenOutput{s1_easy.txt_5.fragment} - -Selecting option 6 gives you four plots. -\begin{center}\includegraphics[width=10cm]{pics/tut1_6.png} \end{center} -The lower left plot shows the exact solution of the linear system (using a direct solver from the \amesos package). The lower right plot shows the multigrid solution when 1 sweep with a V-cycle of the multigrid method as defined in the xml parameter file is applied to the linear system as a standalone multigrid solver. As one can see, the multigrid solution with a random initial guess is far away from the exact solution. The upper left plot shows the difference between the multigrid solution and the exact solution. Finally, the upper right plot shows the distribution of the fine level mesh nodes over the processors (in our example we use 2 processors). - -\begin{mycomment} -Note, that the plots do not show the solution of the preconditioned CG method! The solution of the CG method is always exact up to a given tolerance as long as the multigrid preconditioner is sufficient. This can be checked by the screen output under option 1. -\end{mycomment} - -As a first experiment we change the number of multigrid sweeps for the stand alone multigrid smoother. Let's choose option 5 and use 10 multigrid sweeps. -\begin{center}\includegraphics[width=10cm]{pics/tut1_7.png} \end{center} -Then, do not forget to rerun the examples to update the results. That is, choose option 0 and wait for the simulation to finish. Then plot again the results using menu option 6 and you should obtain -\begin{center}\includegraphics[width=10cm]{pics/tut1_8.png} \end{center} -As one can see is the multigrid solution rather close to the exact solution. In the error plot one finds some low and high frequency error components. - -\begin{exercise} -Change the number of processors. Use option 4 and select for example 4 processors (instead of 2). Rerun the example and plot the results. -\begin{center}\includegraphics[width=10cm]{pics/tut1_9.png} \end{center} -\end{exercise} -\begin{exercise} -Compare the output when using 4 processors with the output for only 2 processors. Is the number of aggregates changing? Is there some effect on the quality of the multigrid solution. How does the number and convergence history change for the preconditioned CG method? -\end{exercise} -\begin{exercise} -Choose option 9 to close the program. -\end{exercise} - -\section{The XML input deck -- multigrid parameters} - -After we have learned the basics of the driver program for our experiments we now perform some experiments with our multigrid methods. We again use the simple 2D Laplace problem. First, we create a copy of the solver parameters using -\begin{verbatim} -cp xml/s1_easy.xml mysolver.xml -\end{verbatim} -Then, we run the driver program again using -\begin{verbatim} -./hands-on.sh -\end{verbatim} -and choose option 0 for the 2D Laplace example on the $50\times 50$ mesh. Use the xml parameters from the \texttt{mysolver.xml} file, that is, choose option 2 and put in \texttt{mysolver.xml}. Make sure that the problem can be solved with the parameters (option 0) and verify the solver output. - -Once that is done it is time for some first experiments. Open you \texttt{mysolver.xml} file in a text editor. You can try option 3 for doing that, but alternatively you can also do it by hand choosing your favorite text editor. - -\begin{center}\includegraphics[width=\textwidth]{pics/tut1_10.png} \end{center} - -Now, let's change the maximum number of multigrid levels from 3 to 10 in the xml file, that is, change the value of the parameter \textit{max levels} from 3 to 10. Do not forget to save the file and rerun the example by choosing option 0 in the driver program. -The screen output should be the following - -\printScreenOutput{s1_easy_10levels.txt_3.fragment_3.fragment} - -Note that even though we allow for at maximum 10 multigrid levels the coarsening process stops after level 4. The reason is that the linear operator on multigrid level 4 has only 4 lines and therefore is smaller than the \texttt{coarse: max size} parameter in the xml parameter list which defines the maximum size of the linear operator on the coarsest level. - - -\begin{exercise} -How do you have to choose the \texttt{coarse: max size} parameter to obtain a 3 level multigrid method again? Increase the parameter accordingly, rerun the simulation and check your results. -\end{exercise} -\begin{exercise} -What happens if you allow only for a 1 level method (i.e., no multigrid)? How does this affect the preconditioned CG method? -\end{exercise} - -The option \texttt{sa} for \textit{smoothed aggregation} in the \texttt{multigrid algorithm} parameter can be considered to be optimal for symmetric positive definite problems. We can compare it with the option \texttt{unsmoothed} as a robust but slower alternative. Let's choose a 3 level multigrid method with unsmoothed transfer operators (i.e., \texttt{max levels = 3}, \texttt{multigrid algorithm = unsmoothed}), then we obtain -\printScreenOutput{s1_easy_3levels_unsmoothed.txt_5.fragment} - -Compared with the smoothed aggregation method (\texttt{multigrid algorithm = sa}) which uses some smoothed transfer operator basis functions within the multigrid method, the unsmoothed multigrid algorithm needs a significantly higher number of iterations. -The same method with smoothed transfer operator basis functions gives -\printScreenOutput{s1_easy_3levels_smoothed.txt_5.fragment} -\begin{mycomment} -You can find the corresponding xml files also in \texttt{xml/s1\_easy\_3levels\_unsmoothed.xml} and \texttt{xml/s1\_easy\_3levels\_smoothed.xml}. -\end{mycomment} - -\begin{exercise} -Compare the screen output of the unsmoothed multigrid method and the smoothed aggregation multigrid method. Which parts are missing in the multigrid setup for the unsmoothed multigrid method? How does the multigrid method affect the aggregates? -\end{exercise} -\begin{exercise} -Performing 10 multigrid sweeps both with the unsmoothed and the smoothed aggregation multigrid method gives the following error plots - \begin{center}\includegraphics[width=8cm]{pics/tut1_11.png} -\includegraphics[width=8cm]{pics/tut1_12.png} \end{center} - Which one belongs to the unsmoothed multigrid method? -\end{exercise} - -\chapter{Level smoothers} - -From the last tutorial we have learned that the used multigrid algorithm may have a significant influence in the convergence speed. When comparing the error plots for the standalone multigrid smoothers with unsmoothed and smoothed aggregation multigrid one finds also a notable difference in the ``smoothness'' of the error. - -\section{Background on multigrid methods} -Obviously there are cases where some highly oscillatory error modes are left and overlaying some low frequency modes. In other cases there are only low frequency error modes left. Theses are basically the two typical cases one might find in practice. - -Multigrid methods are based on the fact, that (cheap) level smoothing method often are able to smooth out high oscillatory error components whereas they cannot reduce low frequency error components very well. These low frequency error components then are transferred to a coarse level where they can be seen as high frequency error component for a level smoother on the coarse level. - -One should not forget that for an efficient multigrid method both the so-called coarse level correction method and the level smoothers have to work together. That is, one has to choose the right multigrid method (e.g., \texttt{unsmoothed} or \texttt{sa}) in combination with an appropriate level smoothing strategy. - -\section{Example} -In context of multigrid level smoothers we have to define both the level smoothers and the coarse solver. Usually, a direct solver is used as coarse solver that is applied to the coarsest multigrid levels. However, it is also possible to apply any other kind of iterative smoothing method or even no solver at all (even though this would be non-standard). The following XML file shows how to use a Jacobi smoother both for level smoothing and as coarse solver. -\lstinputlisting{../src/xml/s1_easy_jacobi.xml} -The corresponding multigrid hierarchy is -\printScreenOutput{s1_easy_jacobi.txt_3.fragment_3.fragment} - -Figures \ref{fig:1vcycles} and \ref{fig:5vcycles} show the multigrid effect of different number of Jacobi smoothers on all multigrid levels. - -One has even more fine-grained control over pre- and post-smoothing. -\lstinputlisting{../src/xml/s1_easy_jacobi2.xml} -This produces the following multigrid hierarchy -\printScreenOutput{s1_easy_jacobi2.txt_3.fragment_3.fragment} - -\begin{mycomment} -Note that the relaxation based methods provided by the \ifpack package are embedded in an outer additive Schwarz method. -\end{mycomment} - -Of course, there exist other smoother methods such as polynomial smoothers (Chebyshev) and ILU based methods. -A detailed overview of the different available smoothers can be found in the \muelu users guide (\cite{Mue}). - - -\begin{figure} -\subfigure[1 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap111}]{\includegraphics[width=0.3\textwidth]{pics/1level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[1 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap1110}]{\includegraphics[width=0.3\textwidth]{pics/1level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[1 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap11100}]{\includegraphics[width=0.3\textwidth]{pics/1level_100jac09.png}} \\ -\subfigure[2 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap121}]{\includegraphics[width=0.3\textwidth]{pics/2level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[2 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap1210}]{\includegraphics[width=0.3\textwidth]{pics/2level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[2 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap12100}]{\includegraphics[width=0.3\textwidth]{pics/2level_100jac09.png}} \\ -\subfigure[3 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap131}]{\includegraphics[width=0.3\textwidth]{pics/3level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[3 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap1310}]{\includegraphics[width=0.3\textwidth]{pics/3level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[3 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap13100}]{\includegraphics[width=0.3\textwidth]{pics/3level_100jac09.png}} \\ -\caption{2D Laplace equation on $50\times 50$ mesh after 1 V-cycle with an AMG multigrid solver and Jacobi smoothers on all multigrid levels. (2 processors)} -\label{fig:1vcycles} -\end{figure} - - -\begin{figure} -\subfigure[1 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap511}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_1level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[1 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap5110}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_1level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[1 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap51100}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_1level_100jac09.png}} \\ -\subfigure[2 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap521}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_2level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[2 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap5210}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_2level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[2 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap52100}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_2level_100jac09.png}} \\ -\subfigure[3 level with 1 Jacobi sweep ($\omega=0.9$)\label{fig:2dlap531}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_3level_1jac09.png}}\hspace{0.03\textwidth} -\subfigure[3 level with 10 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap5310}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_3level_10jac09.png}}\hspace{0.03\textwidth} -\subfigure[3 level with 100 Jacobi sweeps ($\omega=0.9$)\label{fig:2dlap53100}]{\includegraphics[width=0.3\textwidth]{pics/5sweeps_3level_100jac09.png}} \\ -\caption{2D Laplace equation on $50\times 50$ mesh after 5 V-cycle with an AMG multigrid solver and Jacobi smoothers on all multigrid levels. (2 processors)} -\label{fig:5vcycles} -\end{figure} - -\begin{exercise} -Play around with the smoother parameters and study their effect on the error plot and the convergence of the preconditioned cg method. For all available smoothing options and parameters refer to the \muelu user guide (\cite{Mue}). Hint: use \texttt{unsmoothed} transfer operator basis functions (i.e., \texttt{multigrid algorithm = unsmoothed}) to highlight the effect of the level smoothers. -\end{exercise} -\begin{exercise} -Use the following parameters to solve the $50\times 50$ Laplace 2D problem on 2 processors - \lstinputlisting{../src/xml/s1_easy_exercise.xml} - That is, we change to smoothed aggregation AMG. You can find the xml file also in \texttt{xml/s1\_easy\_exercise.xml}. - Run the example on 2 processors and check the number of linear iterations and the solver timings in the screen output. - Can you find smoother parameters which reduce the number of iterations? Can you find smoother parameters which reduce the iteration timings? -\end{exercise} - -\chapter{Multigrid for non-symmetric problems} - -\section{Test example} -\label{sec:recircexample} -The \texttt{Recirc2D} example uses a matrix corresponding to the finite-difference discretization of the problem -\begin{displaymath} --\varepsilon\Delta u + (v_x,v_y)\cdot \nabla u=f -\end{displaymath} -on the unit square, with $\varepsilon=1e-5$ and homogeneous Dirichlet boundary conditions. It is $v_x=4x(x-1)(1-2y)$ and $v_y=-4y(y-1)(1-2x)$. -The right hand side vector $f$ is chosen to be the constant vector 1. Due to the convective term the resulting linear system is non-symmetric and therefore more challenging for the iterative solver. The multigrid algorithm has to be adapted to the non-symmetry to obtain good convergence behavior. - -\section{User interface} - -For this tutorial again we can use the easy-to-use user interface. Run the \texttt{hands-on.py} script in your terminal and choose option 2 for the \texttt{Recirc 2D} example on a $50\times 50$ mesh. -Note that the default values from the file \texttt{xml/s2a.xml} do not lead to a convergent multigrid preconditioner. -\begin{center}\includegraphics[width=10cm]{pics/tut1_13.png} \end{center} - -The convergence of the used unsmoothed transfer operators (\texttt{multigrid algorithm = unsmoothed}) is not optimal. In case of symmetric problems one can reduce the number of iterations using smoothed aggregation algebraic multigrid methods. In context of non-symmetric problems, especially when arising from problems with (highly) convective phenomena, one should use a Petrov-Galerkin approach for smoothing the prolongation and restriction operators more carefully. - -In \muelu one can choose a Petrov-Galerkin approach for the transfer operators by setting \texttt{multigrid algorithm = pg}. Furthermore, one has to state that the system is non-symmetric by setting \texttt{problem: symmetric = false}. In addition you have to set \texttt{transpose: use implicit = false} to make sure that the prolongation and restriction are built separately. This is highly important for non-symmetric problems since $R=P^T$ is not a good choice for non-symmetric problems (see, e.g., \cite{sala2008,wiesner2013}). - -The role of the \texttt{transpose: use implicit} and the \texttt{problem: symmetric} paramters are the following: -\begin{description} -\item[transpose: use implicit] Use $R=P^T$ for the restriction operator and do not explicitly build the operator $R$. This can save a lot of memory and might be very performant when building the multigrid Galerkin product. However, for non-symmetric problems this is not working and has to be turned off. -\item[problem: symmetric] If \texttt{true}, use $R=P^T$ as restriction operator. Depending on the \texttt{transpose: use implicit} parameter the restriction operator is explicitly built. If \texttt{false} a Petrov-Galerkin approach as described in \cite{sala2008} is used to build the restriction operator separately. Note, that for the Galerkin approach it is necessary to build the restriction operator explicitly and store it. -\end{description} - -\begin{mycomment} -One can also use unsmoothed transfer operators (\texttt{multigrid algorithm = unsmoothed}) for non-symmetric problems. These might not give optimal results with respect to the iteration count, but they can be used with \texttt{transpose: use implicit = true} for non-symmetric problems, too, without disturbing the convergence. This way one can save a significant amount of memory compared to the smoothed aggregation method with Petrov-Galerkin for non-symmetric problems. -\end{mycomment} - -\begin{exercise} Choose the parameters from the \texttt{n1\_easy.xml} file. If you run the example you might find that the GMRES method did not converge within 50 iterations. Use \texttt{multigrid algorithm = pg} and compare the results with \texttt{multigrid algorithm = unsmoothed}. Do not forget to set the other parameters correctly for Petrov-Galerkin methods as described before. What is the difference in the number of GMRES iterations? What is changing in the multigrid setup? -\end{exercise} -\begin{exercise} -For slightly non-symmetric problems the \texttt{sa} method often performs satisfactorily. Change the verbosity to high (\texttt{verbosity = high}) and compare the results of the \texttt{multigrid algorithm = pg} option with the \texttt{multigrid algorithm = sa} option. Check the role of the \texttt{transpose: use implicit} parameter. What is changed by the \texttt{problem: symmetric} parameter? Try different values between 0 and 1.5 for the damping parameter within the smoothed aggregation method (i.e., try values 0.0, 0.5, 1.0, 1.33 and 1.5 for \texttt{sa: damping factor}). What do you observe? -\end{exercise} - -\chapter{Useful tools for analysis} - -\section{Visualization of aggregates} - -\subsection{Technical prerequisites} -\muelu allows to export plain aggregation information in simple text files that have to be interpreted by some post-processing scripts to generate pictures from the raw data. The post-processing script provided with the \muelu tutorial is written in python and produces VTK output. Please make sure that you have all necessary python packages installed on your machine (including \verb|python-vtk|). - -\begin{mycomment} -The visualization script has successfully been tested with VTK 5.x. Note that it is not compatible to VTK 6.x. -\end{mycomment} - -\subsection{Visualization of aggregates with \muelu using VTK} -We can visualize the aggregates using the vtk file format and paraview. First add the parameter \texttt{aggregation: export visualization data = true} to the list of aggregation parameters. Use, e.g., the following xml file -\lstinputlisting{../src/xml/n2_easy_agg.xml} -The file is stored in \texttt{xml/n2\_easy\_agg.xml}. - -Run the \texttt{hands-on.py} script and select, e.g., the Laplace 2D example on a $50\times 50$ mesh. Select above xml file for the multigrid parameters with the \texttt{aggregation: export visualization data} enabled. Run the program and then choose option 8 for post-processing the aggregates. -\begin{center}\includegraphics[width=10cm]{pics/tut1_14.png} \end{center} -\begin{mycomment} -Be aware that without \texttt{aggregation: export visualization data = true} the post processing step for the aggregates will fail. -\end{mycomment} - -Once the visualization data is exported and post-processed you can run \texttt{paraview} (if it is installed on your machine) and open the files \texttt{aggs0.vtp} and \texttt{aggs1.vtp} for visualization. - -Start \verb|paraview| and open the files \texttt{aggs0.vtp} and/or \texttt{aggs1.vtp}. Do not forget to press the \verb|Apply| button to show the aggregates on screen. -\begin{center}\includegraphics[width=\textwidth]{pics/tut1_17.png} \end{center} -Then the aggregates should be visualized as follows. -\begin{center}\includegraphics[width=\textwidth]{pics/tut1_18.png} \end{center} -Here the colors represent the unique aggregate id. You can change the coloring in the left column from \verb|Ids| to \verb|proc| which denotes the owning processor of the aggregate. - -Figure \ref{fig:symAggs} shows the aggregates for the Laplace2D problem on the different multigrid levels starting with an isotropic $50\times 50$ mesh. No dropping of small entries was used when building the matrix graph (\texttt{aggregation: drop tol=0.0}). For visualization purposes the ``midpoint'' of each aggregate defines the coordinate of the supernode on the next coarser level. Be aware that these supernodes are purely algebraic. There is no coarse mesh for algebraic multigrid methods. As one can see from the colors an uncoupled aggregation strategy has been applied using 2 processors. The aggregates do not cross the processor boundaries. - -\begin{figure} -\centering -\includegraphics[width=0.7\textwidth]{pics/aggsSymm.png} -\caption{Aggregates for Laplace2D example on $50\times 50$ mesh without dropping.} -\label{fig:symAggs} -\end{figure} - -\begin{exercise} -Repeat above steps for the \verb|Recirc2D| example on a $50\times 50$ mesh. Compare the aggregates from the \verb|xml/n2_easy_agg.xml| parameter file with the aggregates when using the \verb|xml/n2_easy_agg2.xml| parameter file, which drops some small entries of the fine level matrix $A$ when building the graph. -\end{exercise} -\begin{exercise} -Vary the number of processors. Do not forget to export the aggregation data (option 7) after the simulation has rerun with a new number of processors. In \verb|paraview| choose the variable \verb|proc| for the coloring. Then the color denotes the processor the aggregate belongs to. How do the aggregates change when switching from 2 to 3 processors? -% \item Try the solver parameters from \verb|xml/s4c.xml| vor the \verb|Recirc2D| example on a $50\times 50$ mesh and compare them with the results for the \verb|xml/s4a.xml| and \verb|xml/s4b.xml| parameters. Which differences do you observe? -\end{exercise} - -Figure \ref{fig:nonsymAggs} shows the aggregates for the Recirc2D problem. When building the matrix graph, entries with values smaller than $0.01$ were dropped. Obviously the shape of the aggregates follows the direction of convection of the example. Using an uncoupled aggregation method (i.e., \texttt{aggregation: type = uncoupled}) as default the aggregates do not cross processor boundaries. -\begin{figure} -\centering -\includegraphics[width=0.7\textwidth]{pics/aggsNonSymm.png} -\caption{Aggregates for Recirc2D example on $50\times 50$ mesh with dropping.} -\label{fig:nonsymAggs} -\end{figure} - -\paragraph{Note on coupled aggregation strategy:} -Comparing Figures \ref{fig:symAggs} and \ref{fig:nonsymAggsCoupled} one finds the difference between the \verb|uncoupled| and the \verb|coupled| aggregation method (\texttt{aggregation: type}). For the \verb|coupled| aggregation strategy the aggregates can overlap processor boundaries. -\begin{figure} -\centering -\includegraphics[width=0.7\textwidth]{pics/aggsSymmCoupled.png} -\caption{Aggregates for Laplace2D example on $50\times 50$ mesh without dropping using a coupled aggregation strategy.} -\label{fig:nonsymAggsCoupled} -\end{figure} - -\begin{mycomment} -Using the \verb|coupled| aggregation in general is not recommended, since -\begin{itemize} -\item[-] the aggregation routine itself needs some global communication, -\item[-] building the tentative prolongation operator from the aggregates needs some global communication, -\item[-] prolongator smoothing is more expensive due to a higher overlap. -\end{itemize} -The implementation of a \verb|coupled| aggregation method is much more complicated and therefore error-prone and less robust. -\end{mycomment} - - - -\section{Export data} -\label{sec:exportdatasimple} -For debugging purposes it can be very helpful to have a look at the coarse level matrices as well as the transfer operators. \muelu allows to export the corresponding operators to the matrix market format such that the files can be imported, e.g., into MATLAB (or FreeMat\footnote{In the virtual image you find a FreeMat installation (\texttt{http://freemat.sourceforge.net/}).}) for some in-depth analysis. - -Using the following xml file writes the fine level operator and the coarse level operator as well as the prolongation and restriction operator to the hard disk using the filenames \texttt{A\_0.m}, \texttt{A\_1.m} as well as \texttt{P\_1.m} and \texttt{R\_1.m} -\lstinputlisting{../src/xml/n2_easy_export.xml} -\begin{mycomment} -Be aware that there is no prolongator and restrictor on the finest level (level 0) since the transfer operators between level $\ell$ and $\ell+1$ are always associated with the coarse level $\ell +1$ (for technical reasons). So, be not confused if there is no \texttt{P\_0.m} and \texttt{R\_0.m}. Only the operators are written to external files which really exist and are requested in the corresponding list in the xml parameters. -\end{mycomment} - -The exported files can easily imported into MATLAB and used for some in-depth analysis (determining the eigenvalue spectrum, sparsity pattern,\ldots). - -\chapter{Challenge: CD example} - -\section{Practical example} - -Often one has only very rough information about the linear system that is supposed to be effectively solved using iterative methods with multigrid preconditioners. Therefore, it is highly essential to gain some experience with the solver and preconditioner parameters and learn to optimize the multigrid parameters just by looking at the convergence behavior of the linear solver. - -Here, we consider a convection-diffusion example with $16641$ degrees of freedom. No further information is provided (geometry, discretization technique, \ldots). - -\section{User-interface} -Run the \verb|hands-on.sh| script and choose the option 4 for the convection-diffusion example. The script automatically generates a XML file with reference multigrid parameters which are far from being optimal. -\begin{center}\includegraphics[width=10cm]{pics/tut1_16.png} \end{center} - -When using the reference settings for the multigrid preconditioner we need 94 linear iterations. The challenge is to find optimized multigrid settings which results in a significantly lower number of linear iterations and -- even more important -- a lower computational time. - -\begin{mycomment} -Please notice that we have automatically chosen GMRES as solver as the linear systems arising from convection-diffusion problems are non-symmetric (due to the convective term). A CG methods would not converge. -\end{mycomment} - -\begin{exercise} -Open the \verb|condif2d_parameters.xml| file by pressing option 3. Try to find optimized multigrid settings using your knowledge from the previous tutorials. Save the file and rerun the example (using option 0). Compare your results with the reference results. With option 6 you can plot the convergence of the relative residual of the iterative solver (for comparison). -\end{exercise} - -\section{General hints} -\label{sec:generalhings} -There is a very simple strategy for optimizing the solver and preconditioner parameters iteratively that works for many examples surprisingly well. - -\subsection{Linear solver settings} -The parameters for the linear solver usually are fixed. Just make sure that you consider the non-symmetry in the choice of your iterative method and choose the solver tolerance in a reasonable way. Before you think about finding good preconditioner parameters you should be absolutely sure that your linear solver is chosen appropriately for your problem. - -\subsection{General multigrid settings} -Next, one should choose the multigrid settings. This includes the desired number of multigrid levels and the stopping criterion for the coarsening process. An appropriate choice here is mainly dominated by the size of the problem and the discretization. The multigrid parameters should be chosen such that one obtains a reasonably small problem on the coarsest level which is solved directly. - -\subsection{Transfer operators} -Then, one should think about the transfer operators. In the symmetric case one can try smoothed aggregation transfer operators. If unsure, the non-smooth transfer operators always should be a safe and robust starting point. - -\subsection{Level smoothers} -Once the multigrid skeleton is fixed by the choice of transfer operators one can start with optimizing the level smoothers. When using relaxation based level smoothers one should first try different smoothing parameters and increase the number of smoothing sweeps only when necessary. - -\subsection{Fine tuning} -Sometimes it is very helpful to have a look at the multigrid matrices. -First of all, one should check whether the aggregation is working properly. This can be done by checking the screen output for the coarsening rate and the aggregation details (this is often the only way to do it if aggregates cannot be visualized due to missing node coordinates). If there is some problem with the aggregation one should try to adapt the aggregation parameters. Here it might make sense to export the coarse level matrices first and study their properties. For finding aggregation parameters one should, e.g., check the number of non-zeros in each row and choose the minimum aggregation size accordingly. - -\part{Advanced topics} - -\chapter{XML interface for advanced users} - -This tutorial introduces the more advanced (and more flexible) XML interface that can be used for setting up multigrid hierarchies in \muelu. -Again we use the 2D Laplace problem on a $50\times 50$ mesh as introduced in \S\ref{lab:examplesym}. That is, in the \verb|hands-on.py| script you have to choose option 0 for the problem type. - - -\section{One-level method} -Before applying a multigrid method as solver, we start with a simple Jacobi iteration as solver and look at the error. By setting the maximum number of multigrid levels to 1 and using a Jacobi smoother as coarse solver we obtain a pseudo multigrid method which corresponds to a simple Jacobi iteration. - -\lstinputlisting{../src/xml/s2_adv_a.xml} - -The advanced XML format is more hierarchical in the structure. Each XML file in the advanced format consists of two major blocks. First there is a set of ``Factory'' blocks which describe the building blocks within your multigrid methods. In above example there is only one building block specified for the Jacobi method. Each building block needs a (unique) name. In above example the building block has the name \textit{myJacobi}. It is a factory of type \verb|TrilinosSmoother| and describes a damped Jacobi method as declared by the internal parameters. - -Later we will see examples for other building blocks describing transfer operators or the aggregation strategy. -In the ``Factories'' list, the user has to declare all building blocks of the multigrid method that are used for the setup. The user cannot specify all building blocks involved in the setup process. \muelu will take care of that and use default building blocks for all parts of the setup process where the user makes no explicit statement. This way the user only has to describe what he explicitly needs. - -It is not sufficient just to declare some building blocks. One also has to register them in the setup process. This is done in the second part of the XML file. The so-called \textit{Hierarchy} block describes the setup process. First there are some basic multigrid parameters that are well-known from the easy XML interface (cf. the previous tutorials). Then, there is an additional list of parameters \textit{All} which encapsulates the information which factory block is responsible to provide certain data. In above example you can see, that the building block \textit{myJacobi} shall be used both for the level smoother and the coarse solver. Since it is only a 1 level problem it would be sufficient to define a coarse solver only. -The name of the parameter list \textit{All} can be chosen by the user. It basically describes the user-specified parts of the setup process for all multigrid levels. In this case we just overwrite the internal default factories both for the level smoother and the coarse solver by our Jacobi smoother. -\begin{mycomment} -Be aware that we can have different parameter list sets for different levels, that is, we can use different factories on certain levels. -\end{mycomment} - -\begin{exercise} -Run the \verb|hands-on.py| script and choose the XML file \texttt{xml/s2\_adv\_a.xml} which contains above XML parameters. Use only 1 processor and visualize the error for an increasing number of multigrid cycles (e.g. 1, 5, 10, 30, 100). What do you observe? -\end{exercise} -\begin{exercise} -Note that the relaxation based smoothers are based on a Schwarz method (see \ifpack documentation). Repeat above steps using 2 processors. What do you observe in the error plots? -\end{exercise} - -\section{Multigrid method} -The next step is to introduce a full multigrid algorithm. First one should increase the number of multigrid levels. Second, we switch to a direct solver on the coarsest level.\\ - -\begin{exercise} -Create your own copy of the \texttt{xml/s2\_adv\_a.xml} parameter file. Adapt it to obtain a 3 level multigrid method. Check how this affects the error plots. -\end{exercise} -\begin{exercise} -Change to a direct solver on the coarsest level. You can do this by using \texttt{} in the \textit{Hierarchy} block of the xml file. Check the output of the multigrid hierarchy. -\end{exercise} - -\section{Level smoothers} -\label{sec:advLevelSmoothers} -Next, we give some building blocks for different types of level smoothers that you can use. Note that all these xml blocks can be put into the \textit{Factories} block of the advanced \muelu XML file format. Then you can use them by adding the corresponding link into the \textit{Hierarchy} block using the name of the parameter block. - -\subsection{Standard level smoothers} - -Here is a list of the standard level smoothers and how to define them in the XML format. All these standard smoothers are generated by the \texttt{TrilinosSmoother} factory class (set in the \texttt{factory} parameter in the xml snippets below). - -\begin{itemize} - -\item Chebyshev smoother: -\begin{lstlisting} - - - - - - > - - - - - -\end{lstlisting} -\item Jacobi smoother: -\begin{lstlisting} - - - - - - - - - -\end{lstlisting} -\item Gauss--Seidel smoother variants: -\begin{lstlisting} - - - - - - - - - -\end{lstlisting} - -\begin{lstlisting} - - - - - - - - - - - -\end{lstlisting} - -\begin{lstlisting} - - - - - - - - - - - -\end{lstlisting} -\item ILU smoothers: -\begin{lstlisting} - - - - - - - -\end{lstlisting} -Above listing shows how to create an ILU(0) level smoother (using Ifpack). Please refer to the Ifpack documentation of all parameters on how to choose, e.g. overlapping. - -\begin{remark} -There is an inconsistency between \texttt{Ifpack} (for the \texttt{Epetra} stack) and \texttt{Ifpack2} (for the \texttt{Tpetra} stack) with respect to the \texttt{type} parameter in above listing. Not all types of ILU methods available in \texttt{Ifpack} are available in \texttt{Ifpack2} and vice versa. \texttt{Ifpack2} has an implementation of ILUT (\texttt{type = ILUT}), but there ILUT parameters may also be slightly different. Please check and adapt the parameters if you switch between the \texttt{Epetra} and \texttt{Tpetra} stack. Please refer to the \texttt{Ifpack} and \texttt{Ifpack2} documentation for the details -\end{remark} - -For Ifpack2 ILUT you can use, e.g., the following settings -\begin{lstlisting} - - - - - - - -\end{lstlisting} - -In Ifpack the parameters might be -\begin{lstlisting} - - - - - - - -\end{lstlisting} -\end{itemize} - -\begin{exercise} -Pick out one level smoother from above and use them for your problem. Note that you may have to adapt the \texttt{relaxation: damping factor} for reasonable results. -\end{exercise} - -\subsection{Level smoothers for the Epetra and Tpetra stack} - -Generally, the \texttt{TrilinosSmoother} factory class tries to provide the same set of standard level smoothers for the \texttt{Epetra} and \texttt{Tpetra} stack as far as possible. Under the hood it uses \texttt{Ifpack} and \texttt{Ifpack2}. -\texttt{MueLu} partially tries to internally translate the parameters from \texttt{Ifpack2} to \texttt{Ifpack}, but this is not always possible and error-prone. The available values for the \texttt{type} parameter are \texttt{RELAXATION}, \texttt{CHEBYSHEV}, \texttt{ILUT}, \texttt{RILUK} and \texttt{ILU}. - -\begin{remark} -In order to define a multigrid hierarchy that is working for both the \texttt{Epetra} and \texttt{Tpetra} stack it is recommended to use \texttt{CHEBYSHEV} or \texttt{RELAXATION} based smoothers. -\end{remark} - -The \texttt{TrilinosSmoother} factory may provide support more types of smoothers, but these have to be considered as experimental and often are only available for the \texttt{Tpetra} branch. Please check the source code for a list of all available smoothers and options. More advanced smoothing strategies will also introduced later in this guide (e.g. line smoothing in Section \ref{sec:linesmoothing}). - -\section{Advanced features} -\muelu allows full control over the behavior of the multigrid levels. Here, we demonstrate the capabilities of \muelu using the level smoothers. -Take a look at the following example XML parameter list -\lstinputlisting{../src/xml/s2_adv_b.xml} - -You can find the parameters in \texttt{xml/s2\_adv\_b.xml}. We have one building block \textit{BackwardGaussSeidel} representing the level smoother that we want to use in our multigrid hierarchy. As one can see from the \textit{Hierarchy} block we request a 4 level multigrid method. There are two blocks called \textit{Finest} and \textit{Remaining} describing the behavior of the different multigrid levels. Note the \texttt{startLevel} parameter in the block \textit{Remaining}. This parameter is missing in the \textit{Finest} block (where it is assumed to be the default value which is zero). That is, in this example we use the backward Gauss--Seidel method as pre-smoother on the finest level (note the keyword \textit{NoFactory} for \texttt{PostSmoother}). The parameter \texttt{startLevel=1} in the \textit{Remaining} block means that for level 1 and all coarser levels (unless there is another block with \texttt{startLevel > 1}) the building blocks from \textit{Remaining} shall be used for the multigrid setup. -That is, on the multigrid levels 1 and 2 the backward Gauss--Seidel method is used for post smoothing only. The corresponding multigrid hierarchy has the form -\printScreenOutput{s2_adv_b.txt_3.fragment_3.fragment} - -\begin{exercise} - Create an XML file in advanced format which produces the following multigrid layout - \printScreenOutput{s2_adv_c.txt_3.fragment_3.fragment}. - - Hint: create a copy of the file \texttt{xml/s2\_adv\_b.xml} and extend it accordingly. A possible solution can be found in \texttt{xml/s2\_adv\_c.xml}. -\end{exercise} - - -\chapter{\muelu factories for transfer operators} - -For this example we reuse the \verb|Recirc2D| example as introduced in \S\ref{sec:recircexample}. The resulting linear systems are (slightly) non-symmetric and classical smoothed aggregation methods may be able to solve the problem but are not optimal in sense of convergence. - -\section{Multigrid setup phase -- algorithmic design} - -Smoothed aggregation based algebraic multigrid methods originally have not been designed for non-symmetric linear systems. Inappropriately smoothed transfer operators may significantly deteriorate the convergence rate or even break convergence completely. - -\subsection{Unsmoothed transfer operators} -Before we introduce smoothed aggregation methods for non-symmetric linear systems we first go back one step and demonstrate how to use non-smoothed transfer operators which are eligible for non-symmetric linear systems. Figure \ref{fig:simpledesignnonsmoothed} gives a simplified example how to build the coarse level matrix $A_c$ using the fine level matrix $A$ only. First, we ``somehow'' build aggregates using the information of the fine level matrix $A$. The aggregates are then used to build the tentative non-smoothed prolongation operator. The restrictor is just the transpose of the (tentative) prolongator and finally the coarse level matrix $A_c$ is calculated by the triple product $A_c=RAP$. - -In Figure \ref{fig:simpledesignsaamg} the \verb|SaPFactory| has been added after the \verb|TentativePFactory|. Therein the non-smoothed transfer operator from the \verb|TentativePFactory| is smoothed using information of the fine level matrix $A$. This transfer operator design is used per default when the user does not specify its own transfer operator design. The default settings are optimal for symmetric positive definite systems. However for our non-symmetric problem they might be problematic. - -\begin{figure} -\subfigure[Non-smoothed aggregation based AMG\label{fig:simpledesignnonsmoothed}]{ -\scalebox{0.5}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=TentativePFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (RAPFactory) {RAPFactory}; -\node(A2) at (-3,0) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, below] {P} (TransPFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\end{scope} -\end{tikzpicture} -} % end scalebox -} % end subfigure 1 -\subfigure[Smoothed aggregation AMG (SA-AMG)\label{fig:simpledesignsaamg}]{ -\scalebox{0.5}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {SaPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=SaPFactory] (RAPFactory) {RAPFactory}; -\node(A2) at (-3,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->] (SaPFactory) -- node [near start, below] {P} (TransPFactory); -\draw[->] (SaPFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\end{scope} -\end{tikzpicture} -} % end scalebox -} % end subfigure 2 -\caption{Simple factory design for aggregation based algebraic multigrid methods.} -\label{fig:simpledesign} -\end{figure} - - -\subsection{Smoothed transfer operators for non-symmetric systems} -In case of non-symmetric linear systems it is $A\neq A^T$. Therefore it is a bad idea just to use the transposed of the smoothed prolongation operator for the restrictor. Let $\widehat{P}$ be the non-smoothed tentative prolongation operator. Then the smoothed prolongation operator $P$ is built using -\begin{displaymath} -P = \bigl(I-\omega A\bigr) \widehat{P}, -\end{displaymath} -with some reasonable smoothing parameter $\omega>0$. -The standard restrictor is -\begin{displaymath} -R = P^T = \widehat{P}^T - \omega \widehat{P}^T A^T = \widehat{P}^T\bigl(I-\omega A^T\bigr). -\end{displaymath} -That is, the restrictor would be smoothed using the information of $A^T$. However, for non-symmetric systems we want to use the information of matrix $A$ for smoothing the restriction operator, too. The restriction operator shall we built by the formula -\begin{displaymath} -R = P^T = \widehat{P}^T - \omega \widehat{P}^T A. -\end{displaymath} -This corresponds to apply the same smoothing strategy to the non-smoothed restriction operator $\widehat{R}=\widehat{P}^T$ which is applied to the (tentative) prolongation operator with using $A^T$ as input instead of matrix $A$. Figure \ref{fig:simpledesignpgamg} shows the changed factory design. The dashed line denotes, that the same smoothing strategy is used than for the prolongation operator. The concept is known as Petrov-Galerkin smoothed aggregation approach in the literature. -A more advanced transfer operator smoothing strategy for non-symmetric linear systems that is based on the Petrov-Galerkin approach is described in \cite{sala2008}. Another approach based on SchurComplement approximations can be found in \cite{wiesner2013}. - -\begin{figure} -\begin{center} -\scalebox{0.5}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {SaPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (GenericRFactory) {GenericRFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=SaPFactory] (RAPFactory) {RAPFactory}; -\node(A2) at (-3,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (A) to[out=0,in=90] node [near end, right] {$A^T$} (GenericRFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->,dashed] (SaPFactory) -- node [near start, below] {} (GenericRFactory); -\draw[->] (SaPFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (GenericRFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Simple factory design for smoothed aggregation based algebraic multigrid methods for non-symmetric systems.} -\label{fig:simpledesignpgamg} -\end{figure} - -\section{XML interface} - -\subsection{Unsmoothed transfer operators} -To construct a multigrid hierarchy with unsmoothed transfer operators one can use the following XML file (stored in \texttt{xml/s3a.xml}) - -\lstinputlisting{../src/xml/s3a.xml} - -Beside the \verb|TentativePFactory| which is responsible to generate the unsmoothed transfer operators we also introduce the \verb|UncoupledAggregationFactory| with this example. In the \textit{Factories} section of the XML file you find both an entry for the aggregation factory and the prolongation operator factory with its parameters. In the \textit{Hierarchy} section the defined factories are just put in into the multigrid setup algorithm. That is, the factory with the name \verb|UncoupledAggregationFact| is used to generate the \verb|Aggregates| and the \verb|myTentativePFact| is responsible for generating both the (unsmoothed) prolongation operator \verb|P| and the (coarse) near null space vectors \verb|Nullspace|.\\ - -\begin{mycomment} -Be aware that it is highly important not to forget to register the \verb|myTentativePFact| object for generating null space \verb|Nullspace|. It is not visualized in the dependency trees, but the \verb|TentativePFactory| factory both generates the unsmoothed prolongation operator and the set of near null space vectors for the coarse level. So, if you declare your own explicit instance of a \verb|TentativePFactory| you \textbf{always have to register} it for the near null space, too. In general it is a good idea to register a factory in the \textit{Hierarchy} sublist for all output variables of the factory. -\end{mycomment} - -\begin{mycomment} -For some more details about the (hidden) \texttt{NullspaceFactory} which is internally used to handle the null space information and the dependencies, the reader might refer to Section \ref{sec:blocktransfersetup}. -\end{mycomment} - -\begin{mycomment} -Note that one can also use the \verb|Ptent| variable for registering a \verb|TentativePFactory|. This makes the \verb|TentativePFactory| somewhat special in its central role for generating an aggregation based multigrid hierarchy. \muelu is smart enough to understand that you want to use the near null space vectors generated by the factory registered as \verb|Ptent| for setting up the transfer operators. - -That is, the following code would explicitly use the \verb|TentativePFactory| object that is created as \verb|myTentativePFact|. Since no factory is specified for the prolongation operator \verb|P| \muelu would decide to use a smoothed aggregation prolongation operator (represented by the \verb|SaPFactory|) which correctly uses the factory for \verb|Ptent| for the unsmoothed transfers with all its dependencies. -\begin{lstlisting} - - - - - - - - - - - - - -\end{lstlisting} - -\end{mycomment} - -\begin{exercise} - Create a sublist in the \textit{Factories} part of the XML file for the restriction operator factory. Use a \verb|TransPFactory| which builds the transposed of \verb|P| to generate the restriction operator \verb|R|. Register your restriction factory in the \textit{Hierarchy} section to generate the variable \verb|R|. -\end{exercise} - -\subsection{Smoothed aggregation for non-symmetric problems} - -Next, let's try smoothed transfer operators for the non-symmetric linear system and compare the results of the transfer operator designs. Take a look at the XML file (in \texttt{xml/s3b.xml}). - -\lstinputlisting{../src/xml/s3b.xml} - -The interesting part is the \textit{Factories} section where several different factories for the restriction operator are defined -\begin{description} -\item[\textit{myTentRestrictorFact:}] just uses the transposed of the unsmoothed prolongator for restriction. -\item[\textit{mySymRestrictorFact:}] uses the transposed of the smoothed prolongator for restriction. -\item[\textit{myNonsymRestrictorFact:}] uses the special non-symmetric smoothing for the restriction operator (based on the \verb|SaPFactory| smoothing factory). -\end{description} - -\begin{mycomment} -The \muelu framework is very flexible and allows for arbitrary combinations of factories. However, be aware that the \verb|TentativePFactory| cannot be used as input for the \verb|GenericRFactory|. That is no problem since this combination not really makes sense. If you are using the \verb|TentativePFactory| as your final prolongation operator you always have to use the \verb|TransPFactory| for generating the restriction operators. -\end{mycomment} - -\begin{exercise} -Run the \verb|Recirc2D| example with the different restriction operator strategies and compare the results for the iterative solver. What do you observe? What is the best choice for the transfer operators in the non-symmetric case? -\end{exercise} -\begin{exercise} -Change the \verb|myProlongatorFact| from type \verb|SaPFactory| to \verb|PgPFactory| which uses automatically calculated local damping factors instead of a global damping factor (with some user parameter \texttt{sa: damping factor}). Note that the \verb|PgPFactory| might not accept the \verb|sa: damping factor| parameter such that you have to comment it out (using \texttt{}). -\end{exercise} -\begin{exercise} -Try to set up a multigrid hierarchy with unsmoothed transfer operators for the transition from the finest level to level 1 and then use smoothed aggregation for the coarser levels (starting from level 1). -\end{exercise} - -% results -%\printScreenOutput{s3b1.txt_5.fragment} -%\printScreenOutput{s3b2.txt_5.fragment} -%\printScreenOutput{s3b3.txt_5.fragment} - -\chapter{Rebalancing - Hypergraph repartitioning} - -\section{Basic concepts and parameters} -Especially when using the uncoupled aggregation strategy it is essential to reduce the number of processors used on the coarser levels. A natural strategy is to make sure that each processor gets a minimum number of equations to solve and reduce the number of active processors accordingly. - -In this tutorial we use a hypergraph based repartitioning for the coarse level matrices $A_c$ to rebalance the coarse level problems. The repartitioning algorithm is implemented in the \zoltan package of \trilinos. The advantage of the hypergraph based repartitioning methods is, that they do not need additional information such as node coordinates and therefore are the consequent choice within algebraic multigrid preconditioners. - -\begin{mycomment} -Hypergraph partitioning algorithms as PHG are not available in the new \zoltantwo package of \trilinos, yet. Therefore we can use this type of repartitioning only in context of \epetra based applications. If you use the new templated \tpetra stack you have to use repartitioning algorithms which are available in \zoltantwo such as RCB. -\end{mycomment} - -Repartitioning algorithms are a very wide field of research and can be very complicated. Here, we cannot go into details and just focus on how to use them. Basically there are only a few really important parameters that the user has to set properly: -\begin{description} -\item \texttt{repartition: min rows per proc} the minimum number of rows each processor shall handle. This parameter is used to reduce the number of involved processors on the coarser levels. If for example the parameter value is chosen to be 1000 and the fine level problem has 10000 rows whereas the coarse level problem has 2000 rows, then the fine level problem is solved on not more than 10 processors at maximum and for the coarse level problem there are not more processors than at maximum 2 being used. -\item \texttt{repartition: max imbalance} This parameter defines the maximum allowed imbalance ratio of nonzeros on all processors. If the value is set to 1.2, and there is one processor with more than 20\% nonzeros compared to another processor, than the problem will be rebalanced. -\item \texttt{repartition: start level} start rebalancing on given level and coarser levels. This allows to avoid the costs of rebalancing on the finer levels (where it is not really necessary). -\end{description} - -\section{Transfer operator design} - -Figure \ref{fig:rebalanceddesignpgamg} gives the extended factory design for smoothed aggregation based AMG for non-symmetric linear systems with rebalancing enabled. Nothing has changed in the upper part where the non-rebalanced Galerkin product has been calculated using the \verb|RAPFactory|. The coarse level matrix $A_c$ as output from the \verb|RAPFactory| then is checked for its partition and rebalanced. - -The \verb|AmalgamationFactory| amalgamates the matrix, i.e. it generates some mapping between the actual degrees of freedom and the corresponding nodes or supernodes. In fact the \verb|AmalgamationFactory| is only important if there are more than one degree of freedom per node. Otherwise the mappings are trivial to build. - -The \verb|RepartitionHeuristicFactory| contains the rebalancing logic. Depending on the chosen repartitioning parameters it determines the number of partitions (variable name \verb|number of partitions|) for the coarse level problem. -The \verb|IsorropiaInterface| class first builds internally the graph of the coarse level matrix $A_c$ using the information from the \verb|AmalgamationInformation| and then calls the repartitioning algorithm from \zoltan through the \isorropia interface\footnote{\isorropia is a \trilinos package which provides an easy-to-use interface to many partitioning algorithms in \zoltan.}. The output is an amalgamated repartitioning information. Then the \verb|RepartitionInterface| factory resembles the un-amalgamated repartitioning information which is put into the \verb|RepartitionFactory|. - -The \verb|RepartitionFactory| creates the communication ``plan'' that is used to rebalance the transfer operators and the coarse level matrix. - -\begin{figure} -\begin{center} -\scalebox{0.8}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (0,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {PgPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (GenericRFactory) {GenericRFactory}; -\node(RAPFactory) at(0,0) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RAPFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below left = 1cm and -1cm of RAPFactory] (RebAmalgFactory) {AmalgamationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below right = 1cm and -1cm of RAPFactory] (RebHeuristicFactory) {RepartitionHeuristicFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below right = 1cm and -1cm of RebAmalgFactory] (IsorropiaInterface) {IsorropiaInterface}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=IsorropiaInterface] (RepartitionInterface) {RepartitionInterface}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=RepartitionInterface] (RepartitionFactory) {RepartitionFactory}; -\node(RebalanceTransferFactory) at(-3,-10) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RebalanceTransferFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=RebalanceTransferFactory,node distance=6cm] (RebalanceTransferFactory2) {RebalanceTransferFactory}; -\node(RebalanceAcFactory) at (0,-12) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RebalanceAcFactory}; - -\node(A2) at (0,-14) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\node(P2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, left of=A2]{$P$}; -\node(R2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, right of=A2]{$R$}; -\node(H1) [left = 0.2cm of RebAmalgFactory]{}; -\node(H2) [left = 0.2cm of RebalanceTransferFactory]{}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=270,in=90] node [near start, left] {} (RAPFactory); -\draw[->] (A) to[out=0,in=90] node [near end, right] {$A^T$} (GenericRFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->,dashed] (SaPFactory) -- node [near start, below] {} (GenericRFactory); -\draw[->] (SaPFactory) -- node [near start, below] {P} (RAPFactory); -\draw[->] (GenericRFactory) -- node [near start, below] {R} (RAPFactory); -%\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\draw[->] (RAPFactory) -- node [near start, right] {$A_c$} (RebAmalgFactory); -\draw[->] (RAPFactory) -- node [near start, left] {$A_c$} (RebHeuristicFactory); -\draw[->] (RAPFactory) -- node [near end, left] {$A_c$} (IsorropiaInterface); -\draw[->] (RebHeuristicFactory) to[out=290,in=0] node {} (RepartitionInterface); -\draw[->] (RebHeuristicFactory) to[out=290,in=0] node [near start, left] {number of part.} (IsorropiaInterface); -\draw[->] (RebHeuristicFactory) to[out=290,in=0] node {} (RepartitionFactory); -%\draw[->] (RAPFactory) to[out=190,in=180] node [near end, left] {$A_c$} (RepartitionInterface); -%\draw[->] (RAPFactory) to[out=190,in=180] node [near end, left] {$A_c$} (RepartitionFactory); -\draw[->] (RAPFactory) to[out=180,in=70] node [near end, left] {} (H1) to[out=250,in=180] node [near end, left] {$A_c$} (RepartitionFactory); -\draw[->] (RAPFactory) to[out=180,in=70] node [near end, left] {} (H1) to[out=250,in=180] node [near end, left] {$A_c$} (RepartitionInterface); -\draw[->] (H1) to[out=250,in=110] node [near end, left] {} (H2) to[out=290,in=180] node [below] {$A_c$} (RebalanceAcFactory); -\draw[->] (RebAmalgFactory) to [out=250,in=180] node [near start, right] {UnAmalg.Info} (IsorropiaInterface); -%\draw[->] (RebAmalgFactory) to[out=0,in=0] node [near start, right] {UnAmalg.Info} (RepartitionInterface); -\draw[->] (IsorropiaInterface) -- node [near start, left] {Amalg.Partition} (RepartitionInterface); -\draw[->] (RepartitionInterface) -- node [near start, left] {Partition} (RepartitionFactory); -\draw[->] (RepartitionFactory) -- node [near start, left] {Importer} (RebalanceTransferFactory); -\draw[->] (RepartitionFactory) -- node [near start, right] {Importer} (RebalanceTransferFactory2); -\draw[->] (RepartitionFactory) -- node [near end, left] {Importer} (RebalanceAcFactory); -\draw[->] (RebalanceAcFactory) -- node [near end, left] {} (A2); -\draw[->] (SaPFactory) to[out=210,in=150] node [near end, right] {P} (RebalanceTransferFactory); -\draw[->] (GenericRFactory) to[out=330,in=30] node [near end, left] {R} (RebalanceTransferFactory2); -\draw[->] (RebalanceTransferFactory) -- (P2); -\draw[->] (RebalanceTransferFactory2) -- (R2); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Factory design for smoothed aggregation based algebraic multigrid methods for non-symmetric systems with rebalancing.} -\label{fig:rebalanceddesignpgamg} -\end{figure} - -\section{XML interface} -The corresponding XML parameter file looks as - -\lstinputlisting{../src/xml/s5a.xml} - -It is stored in \texttt{xml/s5a.xml}. In this example we define a smoothed aggregation transfer operator strategy (using the \verb|PgPFactory|) for non-symmetric systems. The level smoother is chosen to be an over-relaxed symmetric Gauss--Seidel method. A direct solver is applied on the coarsest level. Please compare the building blocks in the xml file with Figure \ref{fig:rebalanceddesignpgamg}. Be aware that the \textit{Nullspace} variable now is also generated by the \texttt{myRebalanceProlongatorFact}. - -\begin{exercise} -Choose option 1 in the problem menu of \verb|hands-on.py| to run the \verb|Laplace 2D| example on a $300\times 300$ mesh. -Change the solver to \verb|xml/s5a.xml|. -Use a reasonable number of processors. For demonstration purposes 4 processors should be fine for the $300\times 300$ mesh. -Run the example and check the screen output to see the effect of rebalancing. Try to visualize the ownership of the aggregates. -\begin{mycomment} -The XML parameters in \verb|xml/s5a.xml| write out the aggregation data for debugging. See the next tutorial for some more background information on aggregation and debugging. -\end{mycomment} -\end{exercise} - -You should observe a multigrid hierarchy as follows - -\printScreenOutput{s5a.txt_3.fragment_3.fragment} - -\chapter{Aggregation} - -This tutorial provides some background information about the aggregation process in \muelu. A very detailed description of the aggregation algorithms with all internal details can be found in \cite[Chapter 3.3]{wiesner2014}. - -\section{Building aggregates} - -The aggregates are built using the graph of the fine level matrix $A$. The graph is generated by the \verb|CoalesceDropFactory|. Since we still only restrict ourselves to scalar problems with one degree of freedom per node (\texttt{DofsPerNode=1}), the graph of the fine level matrix is trivial to build. -Figure \ref{fig:simpledesignaggregates} shows the extended transfer operator design with the additional \verb|CoalesceDropFactory|. - -\begin{figure} -\begin{center} -\scalebox{0.6}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(CoalesceDropFactory) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{CoalesceDropFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {SaPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=SaPFactory] (RAPFactory) {RAPFactory}; -%\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=RAPFactory,node distance=9cm] (AggExportFactory) {AggregationExportFactory}; -\node(A2) at (-3,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\draw[->] (A) -- (CoalesceDropFactory); -\draw[->] (CoalesceDropFactory) -- node [near start, left] {Graph} (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->] (SaPFactory) -- node [near start, below] {} (TransPFactory); -\draw[->] (SaPFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -%\draw[o->] (RAPFactory) -- (AggExportFactory); -%\draw[->] (AggregationFactory) to[out=0,in=100] node [near start, right] {Aggregates} (AggExportFactory); -%\draw[->] (CoalesceDropFactory) to[out=0,in=80] node [near start, right] {DofsPerNode} (AggExportFactory); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Simple factory design for building aggregates.} -\label{fig:simpledesignaggregates} -\end{figure} - - -Especially for anisotropic or non-symmetric problems it may be advantageous to drop small entries from the graph of $A$ and use a filtered graph for generating aggregates. - -The following listing shows the definition of the \verb|myCoalesceDropFactory| which drops all values of the fine level matrix $A$ with the absolute value smaller than $0.01$. Of course, the \verb|myCoalesceDropFactory| has to be registered to generate the variable \verb|Graph|, which is used by the aggregation factory. -The \verb|Graph| and the variable \verb|DofsPerNode| generated by the \verb|myCoalesceDropFactory| are needed as input by the \verb|UncoupledAggregationFact|. Note that the aggregation routine always works on the node-based information instead of DOF-based information. Therefore, we first have to build the graph of $A$ which then can be processed by the aggregation algorithm. - -\lstinputlisting{../src/xml/s4a.xml} - -The listing shows how the \verb|Graph| and the variable \verb|DofsPerNode| generated by the coalescing factory \verb|myCoalesceDropFact| are explicitly used as input for the aggregation routine. This is an example for a direct link of variables from output to the corresponding input. In addition, the \verb|myCoalesceDropFact| is registered to produce the variable \verb|Graph| in the \textit{Hierarchy} section of the XML file. One should also register \verb|myCoalesceDropFact| to produce the \verb|DofsPerNode| information. In our case it is not really necessary, since all factories which rely on information from \verb|DofsPerNode| get the information directly in the XML file (see also \verb|myAggExportFact| in above listing). So, one has in general two possibilities to declare inter-factory dependencies. One can either explicitly describe the input for each factory (as demonstrated for the \verb|Graph| in \verb|UncoupledAggregationFact|) or use the default factories (provided either by \muelu or explicitly -set by the user in the \textit{Hierarchy} section). \muelu uses the following ordering: first, the explicit input dependencies within the factories are used by \muelu. If a user does not define input variables (e.g., there is no input for \verb|Aggregates| in \verb|myTentativePFact|), \muelu checks whether there is a default factory for the data variable set in the \textit{Hierarchy} section (in above listing it will find \verb|UncoupledAggregationFact| to be responsible to provide the \verb|Aggregates|). Otherwise \muelu will use some internal default factory. - -For demonstration purposes we also introduced a \verb|RAPFactory| which makes use of the user-defined transfer factories \verb|myProlongatorFact| as well as \verb|myRestrictorFact|. The full XML file can be found in \verb|xml/s4a.xml|.\\ - - - -\section{Visualization of aggregates} - -For debugging purposes it can be very useful to visualize the aggregates. \muelu~provides several ways to graphically visualize the coarsening process and the aggregates. In order to visualize aggregates one needs the coordinates of the mesh nodes as geometric information. Whereas the user is expected to provide the mesh node coordinates in the \verb|Coordinates| variable on the finest level, we have to transfer the mesh information to the coarser levels. - -\subsection{General data transfer} - -The \verb|RAPFactory| is responsible to generate the coarse level matrix $A_c$, which is beside the transfer operators $P$ and $R$ the only information needed for an algebraic multigrid method to further coarsen the problem. However, in some situations the user might be able to transfer further user-specific information to coarser levels. The \verb|RAPFactory| can be extended by further helper transfer functions. These helper factories have to be registered in the \verb|RAPFactory| and then are called during the multigrid setup phase after the Galerkin product has been built. A typical example for such a helper factory is the \verb|CoordinatesTransferFactory| which transfers the \verb|Coordinates| variable to the coarser level and builds coarse node coordinates using the aggregation information. Further examples for special helper transfer factories are the \verb|AggregationExportFactory| and the \verb|CoarseningVisualizationFactory| which are all introduced in the following sections. - -\subsection{Use the AggregationExportFactory} - -\begin{figure} -\begin{center} -\scalebox{0.6}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(Coordinates) at (12,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{Coordinates}; -\node(CoalesceDropFactory) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{CoalesceDropFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {SaPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=SaPFactory] (RAPFactory) {RAPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=RAPFactory,node distance=9cm] (AggExportFactory) {AggregationExportFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=AggExportFactory,node distance=6cm] (CoordinatesTransferFactory) {CoordinatesTransferFactory}; -\node(A2) at (-3,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\node(Coordinates2) at (12,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{Coordinates}; -\draw[->] (A) -- (CoalesceDropFactory); -\draw[->] (CoalesceDropFactory) -- node [near start, left] {Graph} (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->] (SaPFactory) -- node [near start, below] {} (TransPFactory); -\draw[->] (SaPFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\draw[o->] (RAPFactory) -- (AggExportFactory); -\draw[o->] (RAPFactory) to[out=-20,in=200] node [near start, right] {} (CoordinatesTransferFactory); -\draw[->] (AggregationFactory) to[out=0,in=100] node [near start, right] {Aggregates} (AggExportFactory); -\draw[->] (CoalesceDropFactory) to[out=0,in=80] node [near start, right] {DofsPerNode} (AggExportFactory); -\draw[->] (Coordinates) to[out=270,in=70] node [near end, right] {} (AggExportFactory); -\draw[->] (AggregationFactory) to[out=0,in=100] node [near end, right] {} (CoordinatesTransferFactory); -\draw[->] (Coordinates) to[out=270,in=90] node [near end, right] {} (CoordinatesTransferFactory); -\draw[->] (CoordinatesTransferFactory) to[out=270,in=90] node [near end, right] {} (Coordinates2); -\draw[->,dashed] (TentativePFactory) to[out=0,in=100] node [near start, below] {CoarseMap} (CoordinatesTransferFactory); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Visualization of aggregates using the AggregationExportFactory.} -\label{fig:simpledesignaggregatesvis} -\end{figure} - -If you have an aggregation-based algebraic multigrid method, the \verb|AggregationExportFactory| is the first choice to export the aggregates for visualization purposes. - -The file \verb|xml/s4av.xml| extends the multigrid hierarchy from file \verb|xml/s4a.xml| for support of visualization of aggregates. -The important changes are the following: - -{\small -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - -\end{lstlisting} -} - -The \verb|AggregationExportFactory| acts as a small helper factory within the \verb|RAPFactory| which writes out some aggregation information to VTK files on the hard disk (see Figure \ref{fig:simpledesignaggregatesvis}). For visualization the user has to provide the coordinates associated with the mesh nodes in the \verb|Coordinates| variable. The coordinates are transferred to the coarse level by the \verb|CoordinatesTransferFactory| which is also a helper transfer factory called by the \verb|RAPFactory| as the \verb|AggregationExportFactory|. The \verb|CoordinatesTransferFactory| needs the aggregation information to build a coarse coordinate by using the midpoint of each aggregate. -Note, that the \verb|RAPFactory| accepts a sublist \verb|TransferFactories| to register all the additional helper transfer factories which are called after the Galerkin product is calculated. The helper transfer factories are called in the ordering in which they are registered in the \verb|RAPFactory|, but for this example the ordering is not important. - -To complete the xml file one has to declare the \verb|CoordinatesTransferFactory| to be the default factory for producing \verb|coordinates| by making the following statements in the \verb|Hierarchy| sublist of the xml file. - -\begin{lstlisting} - - - - - - - - - - - - - - - - - -\end{lstlisting} - -This way, the \verb|myCoordTransferFact| is declared as the default factory to generate the coarse coordinates in \verb|Coordinates| on the coarser levels. - -\begin{mycomment} -The fine level coordinates have to be provided by the user in the \verb|Coordinates| variable on the finest level. They are automatically used as input for the \verb|CoordinatesTransferFactory| to produce the coarse level coordinates for level 1. On the coarser levels then the \verb|CoordinatesTransferFactory| serves as input factory for being responsible to produce the coarse coordinates vector. Therefore, it is not a problem to declare \verb|myCoordTransferFact| as generating factory for the \verb|Coordinates| on all multigrid levels as per default input data on level 0 provided by the user has always precedence over factory-generated data. -\end{mycomment} - -\begin{figure} -\centering -%\subfigure[Aggregates with settings from \texttt{xml/s4a.xml}]{\includegraphics[width=0.3\textwidth]{pics/s4al1.png}\includegraphics[width=0.3\textwidth]{pics/s4al2.png}\includegraphics[width=0.3\textwidth]{pics/s4al3.png}} -%\subfigure[Aggregates with settings from \texttt{xml/s4b.xml} (default parameters)]{\includegraphics[width=0.3\textwidth]{pics/s4bl1.png}\includegraphics[width=0.3\textwidth]{pics/s4bl2.png}\includegraphics[width=0.3\textwidth]{pics/s4bl3.png}} -\includegraphics[width=0.3\textwidth]{pics/s4al1.png}\includegraphics[width=0.3\textwidth]{pics/s4al2.png}\includegraphics[width=0.3\textwidth]{pics/s4al3.png} -\caption{Aggregates with settings from \texttt{xml/s4av.xml}} -\label{fig:diffaggregates} -\end{figure} - -\begin{exercise} -Run the \verb|Laplace 2D| example on a $50\times 50$ mesh using the XML file \verb|xml/s4av.xml|. Open \verb|paraview| and load the \verb|aggs\_level*\_proc.out-master.pvtu| file. -\end{exercise} -\begin{exercise} -In the \verb|xml/s4av.xml| file an uncoupled aggregation factory has been explicitly defined using with some user-chosen aggregation parameters. Make a copy of \verb|xml/s4av.xml| and use the default (uncoupled) aggregation routine that is provided by \muelu if no user-specified aggregation algorithm with parameters is prescribed. Which line in the XML file do you have to remove to obtain this behavior? Compare the results (screen output of aggregates, multigrid hierarchy). Try to visualize the aggregates. -\end{exercise} - -\begin{figure} -\centering -%\subfigure[Aggregates with settings from \texttt{xml/s4a.xml}]{\includegraphics[width=0.3\textwidth]{pics/s4al1.png}\includegraphics[width=0.3\textwidth]{pics/s4al2.png}\includegraphics[width=0.3\textwidth]{pics/s4al3.png}} -%\subfigure[Aggregates with settings from \texttt{xml/s4b.xml} (default parameters)]{\includegraphics[width=0.3\textwidth]{pics/s4bl1.png}\includegraphics[width=0.3\textwidth]{pics/s4bl2.png}\includegraphics[width=0.3\textwidth]{pics/s4bl3.png}} -\includegraphics[width=0.3\textwidth]{pics/s4bl1.png}\includegraphics[width=0.3\textwidth]{pics/s4bl2.png}\includegraphics[width=0.3\textwidth]{pics/s4bl3.png} -\caption{Demonstration of different visualization options. Convex hulls with fine level mesh, coarse level mesh and jacks.} -\label{fig:diffaggregatesstyles} -\end{figure} - -The \verb|AggregationExportFactory| has several parameters which allow to change the visualization of the aggregates. The -\verb|aggregation: output file: agg style| parameter allows to change the style of the aggregates. It can be \verb|Point Cloud|, \verb|Jacks| or \verb|Convex Hulls|. With the boolean parameter \verb|aggregation: output file: fine graph edges| the factory also writes out mesh information for visualization. Figure \ref{fig:diffaggregatesstyles} shows some examples of visualization. All data is exported to vtk files and can be loaded into \verb|paraview| where it can be combined in overlays. One can, e.g., show the fine level aggregates with the "mesh information" from the next coarser levels which visualizes the connections between aggregates. The \verb|Jacks| style in the rightmost picture of Figure \ref{fig:diffaggregatesstyles} shows which nodes are attached to the supernode in each aggregate. - - -\subsection{Use the CoarseningVisualizationFactory} - -A more general alternative to visualize coarsening information is available with the so-called \verb|CoarseningVisualizationFactory|. It uses the same graphical VTK backend for writing out data. But instead of \verb|Aggregates| as input it expects a prolongation operator \verb|P| or \verb|Ptent|. Internally, the coarsening information is reconstructed from the prolongator basis functions through reverse engineering. - -\begin{mycomment} -The prolongator basis functions must not overlap. That is, only transfer operators generated by the \verb|TentativePFactory| or the \verb|SemiCoarsenPFactory| are valid input transfer operators. -\end{mycomment} - -The usage is very similar to the \verb|AggregationExportFactory|: -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -\begin{figure} -\begin{center} -\scalebox{0.6}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (-3,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node(Coordinates) at (12,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{Coordinates}; -\node(CoalesceDropFactory) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{CoalesceDropFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (SaPFactory) {SaPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=SaPFactory] (RAPFactory) {RAPFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=RAPFactory,node distance=9cm] (AggExportFactory) {CoarseningVisualizationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=AggExportFactory,node distance=6cm] (CoordinatesTransferFactory) {CoordinatesTransferFactory}; -\node(A2) at (-3,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\node(Coordinates2) at (12,-2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{Coordinates}; -\draw[->] (A) -- (CoalesceDropFactory); -\draw[->] (CoalesceDropFactory) -- node [near start, left] {Graph} (AggregationFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (SaPFactory); -\draw[->] (A) to[out=180,in=180] node [near start, left] {} (RAPFactory); -\draw[->] (AggregationFactory) -- node [near start, left] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {P} (SaPFactory); -\draw[->] (SaPFactory) -- node [near start, below] {} (TransPFactory); -\draw[->] (SaPFactory) -- node [near start, left] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\draw[o->] (RAPFactory) -- (AggExportFactory); -\draw[o->] (RAPFactory) to[out=-20,in=200] node [near start, right] {} (CoordinatesTransferFactory); -\draw[->] (TentativePFactory) to[out=0,in=90] node [near start, below] {P} (AggExportFactory); -\draw[->] (CoalesceDropFactory) to[out=0,in=80] node [near start, right] {DofsPerNode} (AggExportFactory); -\draw[->] (Coordinates) to[out=270,in=70] node [near end, right] {} (AggExportFactory); -\draw[->] (AggregationFactory) to[out=0,in=100] node [near start, below] {Aggregates} (CoordinatesTransferFactory); -\draw[->] (Coordinates) to[out=270,in=90] node [near end, right] {} (CoordinatesTransferFactory); -\draw[->] (CoordinatesTransferFactory) to[out=270,in=90] node [near end, right] {} (Coordinates2); -\draw[->,dashed] (TentativePFactory) to[out=0,in=100] node [near start, above] {CoarseMap} (CoordinatesTransferFactory); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Visualization of aggregates using the CoarseningVisualizationFactory.} -\label{fig:simpledesignaggregatesvis2} -\end{figure} - -The most important difference is, that the user has to specify either \verb|P| or \verb|Ptent| as input for visualization. Furthermore, the parameter names for the \verb|CoarseningVisualizationFactory| are different to the corresponding parameters of the \verb|AggregationExportFactory|. - -\begin{mycomment} -Note, that in the factory configuration as shown in Figure \ref{fig:simpledesignaggregatesvis2} one still needs the \verb|Aggregates| for building the coarse level node coordinates in the \verb|CoordinatesTransferFacotory|. That is, for coarsening methods other than aggregation-based coarsening the user has to provide a mechanism to generate the coarse level coordinates (e.g., using geometric considerations). -\end{mycomment} - -\begin{exercise} -Run the \verb|Laplace 2D| example on a $50\times 50$ mesh using the XML file \verb|xml/s4av.xml|. Create a copy of the \verb|xml/s4av.xml| file and try to adapt it to use the \verb|CoarseningVisualizationFactory| instead of the \verb|AggregationExportFactory|. The aggregates should be the same in both cases. -\end{exercise} - -\subsection{General remarks} -Before we close this tutorial there are some general remarks that might help in setting up valid XML files. -\begin{mycomment} -In general it is a good idea to use the \textit{Hierarchy} section to register the factories to generate the variables. It is very hard to declare all dependencies in the factory sections itself. In the worst case you declare, e.g., a \verb|UncoupledAggregationFactory| and use it as input for the \verb|TentativePFactory| but forget to declare it also explicitly as input for the aggregation export factory \verb|AggregationExportFactory|. If you \verb|UncoupledAggregationFactory| is not declared as default for \verb|Aggregates| in the \verb|AggregationExportFactory|, the \verb|AggregationExportFactory| will use default aggregates provided by \muelu which are not identical to the aggregates used for building the transfer operators! Missing or wrong dependencies in the factory list are very hard to debug. Therefore one should always start with the \textit{Hierarchy} section and only locally overwrite the dependencies where necessary. -\end{mycomment} - -\chapter{Advanced concepts} - -As already mentioned in the beginning, \muelu~is designed as a multigrid framework, and, even though initiated as an aggregation-based algebraic multigrid method, it can also be used for other kinds of coarsening methods. In this chapter we demonstrate the combination of a semi-coarsening method with an aggregation-based coarsening on the coarser levels. Semi-coarsening is combined with a line-smoothing method which then changes to a point-relaxation smoothing once no further semi-coarsening is possible. In both cases, the semi-coarsening and the line-smoothing, the key element here is the dynamic switch from one to the another coarsening or smoothing strategy during runtime. - -\section{Semi-coarsening} - -\subsection{Basic idea} -Assuming that you have a 3D problem which is based on an extruded 2D mesh, semi-coarsening might be an interesting option. That is, on the finer levels we apply a semi-coarsening transfer operator which basically reduces the problem to a pseudo 2D problem which then is handled by any other type of (smoothed aggregation based) transfer operator the usual way. - -\subsection{Factory layout without rebalancing} - -The semi-coarsening is provided by the \texttt{SemiCoarsenPFactory} for generating the semi-coarsening transfer operators in combination with the \texttt{LineDetectionFactory} which performs the line detection, i.e. it searchs for the vertical node lines along the extrusion axis of the 2D mesh. -Once all mesh layers are reduced to one by the \texttt{SemiCoarsenPFactory} we switch to the aggregation-based standard coarsening process. There is a \texttt{TogglePFactory} which allows to switch back and forth between two different transfer operator strategies (such as semi-coarsening and standard aggregation-based coarsening). In principle, any combination of two different transfer operator strategies is allowed. However, the current implementation only contains decision criteria to switch between semi-coarsening and aggregation-based types of coarsening. - -Figure \ref{fig:rebalancedtoggledesign} shows a typical factory layout for the combination of semi-coarsening with a standard (non-smoothed) aggregation-based coarsening with repartitioning enabled. First, one can see the \texttt{TogglePFactory} which has knowledge about the two different transfer operator branches and makes a decision which transfer operator is used and provided to the restriction operator factory and the \texttt{RAPFactory}. Depending on the line detection algorithm in \texttt{LineDetectionFactory} one might also need some information about the fine level mesh (such as the fine level coordinates). The user only has to provide the mesh on the finest level. On the coarser levels the \texttt{LineDetectionFactory} uses a standard ordering of the degrees of freedom which corresponds to a vertical node ordering. - -\begin{figure} -\begin{center} -\scalebox{0.8}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (0,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node [draw, terminal, minimum width=\datawidth, minimum height=\dataheight, left of=A,node distance=6cm] (Coords) {Coordinates}; - -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (TogglePFactory) {TogglePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node(RAPFactory) at(0,0) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RAPFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, left of=TentativePFactory,node distance=6cm] (SemiCoarsenPFactory) {SemiCoarsenPFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, left of=AggregationFactory,node distance=6cm] (LineDetectionFactory) {LineDetectionFactory}; - -\node(A2) at (0,-3) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\node(P2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, left of=A2]{$P$}; -\node(R2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, right of=A2]{$R$}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (TogglePFactory); -\draw[->] (A) to[out=270,in=90] node [near start, left] {} (RAPFactory); -%\draw[->] (A) to[out=0,in=90] node [near end, right] {$A^T$} (GenericRFactory); -\draw[->] (AggregationFactory) -- node [near start, right] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, right] {P} (TogglePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {Nullspace} (TogglePFactory); -\draw[->] (LineDetectionFactory) -- node [near start, right] {VertLineIds,$\ldots$} (SemiCoarsenPFactory); -\draw[->] (SemiCoarsenPFactory) -- node [near end, below] {P} (TogglePFactory); -\draw[->] (SemiCoarsenPFactory) -- node [near start, below] {Nullspace} (TogglePFactory); -\draw[->] (TogglePFactory) -- node [near start, below] {P} (TransPFactory); -\draw[->] (TogglePFactory) -- node [near start, below] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -%\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\draw[->] (RAPFactory) -- node [near start, left] {$A_c$} (A2); - -\draw[->] (Coords) to[out=200,in=90] node [near end, left] {} (LineDetectionFactory); -\draw[->] (Coords) to[out=270,in=20] node [near end, left] {} (SemiCoarsenPFactory); -%\draw[->] (SaPFactory) to[out=230,in=130] node [near end, left] {P} (RebalanceTransferFactory); -%\draw[->] (GenericRFactory) to[out=310,in=50] node [near end, left] {R} (RebalanceTransferFactory2); -\draw[->] (TogglePFactory) -- (P2); -\draw[->] (TransPFactory) -- (R2); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Factory design for semi-coarsening with rebalancing enabled on the coarser levels.} -\label{fig:rebalancedtoggledesign} -\end{figure} - -\subsection{Factory layout with rebalancing} - -Figure \ref{fig:rebalancedtogglerebalancingdesign} gives the extended factory layout when rebalancing is enabled. -There is a new \texttt{ToggleCoordinatesTransferFactory} which is controlled by the \texttt{TogglePFactory} and appropriately generates the coarse coordinates depending on the used transfer operator. In case of semi-coarsening, the \texttt{SemiCoarsenPFactory} provides the coarse coordinates which are then piped through the \texttt{ToggleCoordinatesTransferFactory}. In case of standard aggregation the \texttt{CoordinatesTransferFactory} calculates the coarse coordinates using the aggregation information provided by the \texttt{AggregationFactory}. The coarse coordinate information is finally rebalanced by the \texttt{RebalanceTransferFactory} based on the rebalancing information provided by the \texttt{RepartitionFactory}. - -\begin{mycomment} -Note, that the \texttt{LineDetectionFactory} algorithm expects all nodes of a vertical line along the extrusion axis of the underlying 2D mesh to be owned by the same processor. Do not allow for rebalancing before semi-coarsening is complete! Alternatively, you can implement a new interface class to replace the \texttt{ZoltanInterface} which makes sure that the nodes are rebalanced appropriately. This could be easily done by rebalancing the \texttt{VertLineIds} info that is provided by the \texttt{LineDetectionFactory} and reconstruct the node based \texttt{Partition} data. The \texttt{Chosen P} variable provided by the \texttt{TogglePFactory} would tell the new interface class whether we are in semi-coarsening mode or in standard aggregation mode. -\end{mycomment} - -\begin{figure} -\begin{center} -\scalebox{0.8}{ -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] -\def\datawidth{2cm} -\def\dataheight{0.5cm} -\def\factorywidth{4cm} -\def\factoryheight{0.75cm} -%\draw[help lines] (-10,-10) grid (10,10); -\begin{scope}[>=triangle 60] -\node(A) at (0,10) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A$}; -\node [draw, terminal, minimum width=\datawidth, minimum height=\dataheight, left of=A,node distance=6cm] (Coords) {Coordinates}; - -\node(nothing) at (-3,8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight]{...}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=nothing] (AggregationFactory) {AggregationFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=AggregationFactory] (TentativePFactory) {TentativePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=TentativePFactory] (TogglePFactory) {TogglePFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=SaPFactory,node distance=6cm] (TransPFactory) {TransPFactory}; -\node(RAPFactory) at(0,-2) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RAPFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=RAPFactory] (ZoltanInterface) {ZoltanInterface}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, below of=ZoltanInterface] (RepartitionFactory) {RepartitionFactory}; -\node(RebalanceTransferFactory) at(-3,-8) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RebalanceTransferFactory}; -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, right of=RebalanceTransferFactory,node distance=6cm] (RebalanceTransferFactory2) {RebalanceTransferFactory}; -\node(RebalanceAcFactory) at (0,-10) [draw, process, minimum width=\factorywidth, minimum height=\factoryheight] {RebalanceAcFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, left of=TentativePFactory,node distance=6cm] (SemiCoarsenPFactory) {SemiCoarsenPFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, left of=AggregationFactory,node distance=6cm] (LineDetectionFactory) {LineDetectionFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, left of=RAPFactory,node distance=6cm] (ToggleCoordinatesTransferFactory) {ToggleCoordinatesTransferFactory}; - -\node [draw, process, minimum width=\factorywidth, minimum height=\factoryheight, above of=ToggleCoordinatesTransferFactory,node distance=2cm] (CoordinatesTransferFactory) {CoordinatesTransferFactory}; - -\node [right of=RebalanceTransferFactory2,node distance=3cm] (H1) {}; - -\node(A2) at (0,-14) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight]{$A_c$}; -\node(P2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, left of=A2]{$P$}; -\node(R2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, right of=A2]{$R$}; -\node(Coords2) [draw, terminal, minimum width=\datawidth, minimum height=\dataheight,node distance=3cm, left of=P2]{Coordinates}; -\draw[->] (A) -- (nothing); -\draw[->] (nothing) -- (AggregationFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (TentativePFactory); -\draw[->] (A) to[out=270,in=25] node [near start, left] {} (TogglePFactory); -\draw[->] (A) to[out=270,in=90] node [near start, left] {} (RAPFactory); -%\draw[->] (A) to[out=0,in=90] node [near end, right] {$A^T$} (GenericRFactory); -\draw[->] (AggregationFactory) -- node [near start, right] {Aggregates} (TentativePFactory); -\draw[->] (TentativePFactory) -- node [near start, right] {P} (TogglePFactory); -\draw[->] (TentativePFactory) -- node [near start, left] {Nullspace} (TogglePFactory); -\draw[->] (LineDetectionFactory) -- node [near start, right] {VertLineIds,$\ldots$} (SemiCoarsenPFactory); -\draw[->] (SemiCoarsenPFactory) -- node [near end, below] {P} (TogglePFactory); -\draw[->] (SemiCoarsenPFactory) -- node [near start, below] {Nullspace} (TogglePFactory); -\draw[->] (TogglePFactory) to[out=270,in=25] node [near end, right] {Chosen P} (ToggleCoordinatesTransferFactory); -\draw[->] (TogglePFactory) -- node [near start, below] {P} (TransPFactory); -\draw[->] (TogglePFactory) -- node [near start, below] {P} (RAPFactory); -\draw[->] (TransPFactory) -- node [near start, below] {R} (RAPFactory); -%\draw[->] (RAPFactory) -- node [near start, below] {} (A2); -\draw[->] (RAPFactory) -- node [near start, left] {$A_c$} (ZoltanInterface); -\draw[<->,dashed] (RAPFactory) -- (ToggleCoordinatesTransferFactory); -\draw[->] (RAPFactory) to[out=190,in=180] node [near end, left] {$A_c$} (RepartitionFactory); -\draw[->] (ZoltanInterface) -- node [near start, left] {Partition} (RepartitionFactory); -\draw[->] (CoordinatesTransferFactory) -- node [near start, left] {Coordinates} (ToggleCoordinatesTransferFactory); -\draw[->] (SemiCoarsenPFactory) to[out=270,in=160] node [near start, left] {Coordinates} (ToggleCoordinatesTransferFactory); -\draw[->] (ToggleCoordinatesTransferFactory) to[out=270,in=160] node [near start, left] {Coordinates} (RebalanceTransferFactory); -\draw[-] (RAPFactory) to[out=0,in=90] node [near end, left] {$A_c$} (H1.north east); -\draw[->] (H1.north east) to[out=270,in=0] node [near end, left] {} (RebalanceAcFactory); -\draw[->] (RepartitionFactory) -- node [near start, left] {Importer} (RebalanceTransferFactory); -\draw[->] (RepartitionFactory) -- node [near start, right] {Importer} (RebalanceTransferFactory2); -\draw[->] (RepartitionFactory) -- node [near end, left] {Importer} (RebalanceAcFactory); -\draw[->] (RebalanceAcFactory) -- node [near end, left] {} (A2); -\draw[->] (AggregationFactory) to[out=200,in=80] node [near start, right] {Aggregates} (CoordinatesTransferFactory); -\draw[->] (Coords) -- node [near end, left] {} (CoordinatesTransferFactory); -\draw[->] (Coords) to[out=200,in=90] node [near end, left] {} (LineDetectionFactory); -\draw[->] (Coords) to[out=270,in=20] node [near end, left] {} (SemiCoarsenPFactory); -\draw[->] (RebalanceTransferFactory) to[out=220,in=90] node [near end, left] {} (Coords2); -%\draw[->] (SaPFactory) to[out=230,in=130] node [near end, left] {P} (RebalanceTransferFactory); -%\draw[->] (GenericRFactory) to[out=310,in=50] node [near end, left] {R} (RebalanceTransferFactory2); -\draw[->] (RebalanceTransferFactory) -- (P2); -\draw[->] (RebalanceTransferFactory2) -- (R2); -\end{scope} -\end{tikzpicture} -} % end scalebox -\end{center} -\caption{Factory design for semi-coarsening with rebalancing enabled on the coarser levels.} -\label{fig:rebalancedtogglerebalancingdesign} -\end{figure} - -The following listing shows exemplary the content of the xml file to set up a factory hierarchy similar to the one shown in Figure \ref{fig:rebalancedtogglerebalancingdesign}. - -In the \verb|Factories| section, first the \verb|SemiCoarsenPFactory| and the line detection algorithm are defined representing the left transfer operator branch. Next, the smoothed aggregation coarsening branch is defined in Part II together with an instance of the \verb|TransferCoordinatesTransferFactory| for calculating the corresponding coarse coordinates. -In Part III the \verb|TogglePFactory| is defined. It contains a \verb|TransferFactories| sublist where all different coarsening branches (i.e., the semi-coarsening and aggregation-based coarsening) are defined. The corresponding prolongation operators are listed using the variable name \verb|P| with a number between 1 and 9. In addition to the prolongation operator factories one has also to declare the factories providing the coarse level null space and the \textit{tentative} prolongation operator. In case of semi-coarsening this is the \verb|SemiCoarsenPFactory| and for the aggregation-based coarsening this is the \verb|TentativePFactory|. These factories are declared for generating the \verb|Nullspace| variable with a number between 1 and 9 corresponding to the associated transfer operator branch. Similar for the \textit{tentative} prolongation operators denoted by the variable \verb|Ptent|. - -\begin{mycomment} -\verb|SemiCoarsenPFactory| provides this information for compatibility reasons even though there is no tentative prolongation operator for the geometrically generated \verb|SemiCoarsenPFactory| operator. But the \verb|TogglePFactory| is designed to be more general and allows for combining different kinds of smoothed prolongation operators. These need information about the non-smoothed transfer operators in the variable \verb|Ptent|. -\end{mycomment} - -Similarly, a \verb|ToggleCoordinatesTransferFactory| is declared with an internal list of all factories providing the coarse level coordinates. This is the previously defined \verb|CoordinatesTransferFactory| for the standard aggregation-based coarsening branch and the \verb|SemiCoarsenPFactory| for the semi-coarsening branch. - -Part IV contains the standard factories for the rebalancing. - -Finally, it is important to declare all necessary main factories in the \verb|Hierarchy| section of the xml file. - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -\section{Line-smoothing} -\label{sec:linesmoothing} -\subsection{General idea} -Semi-coarsening should be combined with line-smoothing as the complementary smoothing operation. Whereas semi-coarsening coarsens, e.g., along the z-axis trying to produce a 2D representation of a 3D problem, the line-smoothing operates orthogonal to the coarsening and smoothes in the x- and y-direction and interprets all vertical z-layers technically as nodes in a pseudo 2D problem. - -\subsection{Usage} - -The following listing shows how to choose a Jacobi line smoother. The reader might compare the xml code snippets with Section \ref{sec:advLevelSmoothers} for a detailed description of the different smoothers and parameters. - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -The parameters are standard except of \verb|type|. The standard choice would be \verb|RELAXATION| for relaxation based smoothers. To use line-smoothing instead one has the following options: - -\begin{description} -\item [LINESMOOTHING\_BANDEDRELAXATION] Use banded containers to store the local block associated with one vertical line. This is the recommended variant as it saves memory and is usually faster. -\item [LINESMOOTHING\_BLOCKEDRELAXATION] Use a dense matrix container to store the local block associated with one vertical line. This is the safe fallback variant. Use the \verb|LINESMOOTHING\_BANDEDRELAXATION| variant instead. -\end{description} - -All the other parameters in the parameter sublist correspond to the usual parameters for relaxation based smoothers such as Jacobi, Gauss-Seidel or Symmetric Gauss-Seidel methods. Refer to Section \ref{sec:advLevelSmoothers} or the \muelu user guide \cite{Mue} for an overview of all available parameters. - -\chapter{Useful commands and debugging} - -\section{Export level information} -Of course, it is possible to export the multigrid hierarchy in matrix market format similar to \S\ref{sec:exportdatasimple} when using the advanced XML file format instead of the simple XML format. - -To export the multigrid hierarchy one can use, e.g., the following parameters - -\lstinputlisting{../src/xml/s6_export.xml} - -\section{Dependency trees} -\label{sec:dependencytrees} -For debugging it can be extremely helpful to automatically generate the dependency tree of the factories for a given XML file. However, it shall be noticed that even with a graphical dependency tree it might be hard to find the missing links and dependencies without a sufficient understanding of the overall framework. - -To write out the dependencies you just have to put in the \verb|dependencyOutputLevel| parameter. The value gives you the fine level index that you are interested in (e.g., 1 means: print dependencies between level 1 and level 2). - -\lstinputlisting{../src/xml/s6_dep.xml} - -After running the example you should find a file named \verb|dep_graph.dot| in the current folder which you can transform into a graph using the \verb|dot| utility from the graphviz package. -Run, e.g. the commands -\begin{verbatim} -sed -i 's/label=Graph\]/label=\"Graph\"\]/' dep_graph.dot -sed -i 's/\\"/"/g' dep_graph.dot -sed -i 's/""/>/' dep_graph.dot -dot -Tpng dep_graph.dot -o dep_graph.dot.png -\end{verbatim} -in your terminal to obtain the graph as given in Figure \ref{fig:autograph}. -\begin{figure} -\begin{center} -\includegraphics[width=1.0\textwidth]{pics/dep_graph} -\end{center} -\caption{Visualization of aggregates using the CoarseningVisualizationFactory.} -\label{fig:autograph} -\end{figure} - -Note that the red arrows correspond to the fine level (level 1) and the blue arrows correspond to data on the coarse level (level 2). - -\begin{mycomment} -In case that the file \verb|dep_graph.dot| is not generated you have to check the prerequisites. To be able to auto-generate the dependency graphs you have to compile \muelu with Boost enabled. Furthermore you have to set the \verb|MueLu_ENABLE_Boost_for_real:BOOL = ON| defines flag in your configuration script. If these requirements are not fulfilled you should find the error message \textit{Dependency graph output requires boost and MueLu\_ENABLE\_Boost\_for\_real} in the screen output of \muelu. -\end{mycomment} - -As one can see from the dependency output there are also some internal factories which have not been visualized in the Figures \ref{fig:simpledesign}. A good example is the \verb|NullspaceFactory| which seems to build a dependency cycle with the \verb|TentativePFactory|. In fact, the \verb|NullspaceFactory| is a helper factory which allows to use the user-provided near null space vectors as input on the finest level. On the coarser levels it just loops through the generated coarse set of near null space vectors from the \verb|TentativePFactory|. This is a technical detail which sometimes can cause some problems when the corresponding dependency is not defined properly in the XML file. -Another example for a special factory is the \verb|NoFactory|. This special factory is used for all data which is kept in memory and needed by the level smoothers during the iteration. Usually, the final transfer operators $P$ and $R$ as well as the level matrix $A$ are transformed to \verb|NoFactory| objects after the setup phase has completed. However, expert users can also use the \verb|NoFactory| mechanism for special data during the setup phase. But this is not recommended. - -\begin{exercise} -Compare the factory layout in Figure \ref{fig:simpledesignaggregates} with above dependency graph. Try to read it from bottom to top. Which factories are missing in Figure \ref{fig:simpledesignaggregates}? Which variables are missing in Figure \ref{fig:simpledesignaggregates}? -\end{exercise} - -\section{Helper routines for mathematical analysis of level operators} - -There is a small helper transfer factory \verb|MatrixAnalysisFactory| which can be registered in the \verb|RAPFactory|. It checks the current fine level operator $A$ for certain properties and prints the result on screen. The intention of this helper factory is to provide a simple tool for tracking mathematical problems, such as nan's or inf entries during the calculation. - -The \verb|MatrixAnalysisFactory| is used as follows: -\begin{lstlisting} - - - - - - - - - - -\end{lstlisting} - - -In particular, the factory performs the following checks: -\begin{itemize} -\item Check for empty processors in distribution. In contrary to the \ml~package, empty processors should technically not be a problem for \muelu, but it can be an indicator for a failure in the rebalancing mechanism. -\item Check the matrix diagonal for zero entries or nan's/inf values. Zero entries on the diagonal are usually catastrophic for any kind of smoothing, including relaxation-based level smoothers or transfer operator smoothing. Infinite values are a sign of defect operators or can result from incited error modes (e.g., missing or insufficient damping for the level smoothers). -\item Check whether matrix is diagonally dominant. Diagonal dominance is an important property for (relaxation-based) level smoothers. -\item Apply a one-vector and a random vector to the operator $A$ and check the result for zeros and inf values. -\item Perform one sweep with a damped Jacobi method applied to the one-vector and a random vector. Check the result for zeros and inf values. -\end{itemize} - -\section{Graphical assistant for XML file generation} - -The \verb|hands-on.py| driver script contains a graphical assistant to generate new XML parameter files in the advanced \muelu file format. - -Just run the \verb|hands-on.py| script and choose a problem type from the list. Then choose option 2 to set the xml file. If you enter a filename that does not exist then the assistant is started to generate that new XML file. - -\begin{center}\includegraphics[width=10cm]{pics/tut1_15.png} \end{center} - -Just go through the menu and make your choices for level smoothers, transfer operators and so on. Do not forget to call option 6 to save the XML file under the given name, that you have entered before. Then you can use option 7 to go back to the main menu for the example problem and try your new preconditioner with your parameter choices. - -\begin{mycomment} -Of course, we could have introduced this feature with the earlier tutorials, but the idea was to familiarize the user with the XML files. -\end{mycomment} - -\chapter{Challenge: elasticity example} -\section{Practical example} - -For the second challenge, we consider an 2D elasticity example with $7020$ degrees of freedom. No further information is provided (geometry, discretization technique, \ldots). - -\section{User-interface} -Run the \verb|hands-on.sh| script and choose the option 5 for the elasticity. The script automatically generates a XML file with reference multigrid parameters which are far from being optimal. The resulting problem matrix is symmetric. Therefore, we can use a CG method as outer linear solver. - -\begin{exercise} -Open the \verb|stru2d_parameters.xml| file by pressing option 3. Try to find optimized multigrid settings using your knowledge from the previous tutorials. We have 2 (displacement) degrees of freedom per node and 3 vectors describing the near null space components (rigid body modes). All this information is automatically set correctly by the \verb|hands-on.py| script. -Run the example. Check the screen output (using option 1) and verify \verb|blockdim=2| on level 1 and \verb|blockdim=3| on level 2. -\end{exercise} - -In the screen output of the \verb|CoalesceDropFactory| the \verb|blockdim| denotes the number of degrees of freedom per node (or super node on the coarser levels). Since the number of near null space vectors differs from the number of PDE equations, the number of degrees of freedom per node changes on the different multigrid levels. - -\begin{exercise} -Open the XML parameter file (choose option 3) and try to find optimized settings. Use the advanced XML file format. Save the file, rerun the example (option 0) and compare the output with the reference results. -\end{exercise} - -\begin{mycomment} -Use \S\ref{sec:generalhings} for a general step-by-step procedure to optimize the multigrid parameters. -\end{mycomment} - -\begin{exercise} -How do the reference settings and your XML parameter settings perform when increasing the number of processors? -\end{exercise} - -\begin{exercise} -Compare the results of the reference method and your preconditioner parameters when changing to a GMRES solver (instead of CG). What is changing? What about the solver timings? -\end{exercise} - - -\part{Expert tutorials} - -\chapter{Multigrid for Multiphysics} - -\section{General concept} -Assuming we have a multiphysics application which generates a $n\times n$ block operator (e.g. a Fluid-Structure-Interaction problem, or a Navier-Stokes problem with the splitting into velocity and pressure degrees of freedom), the idea is to preserve the block structure on the coarse levels using block-diagonal segregated transfer operators and block smoothers on all multigrid levels. -The blocks $P_{i,i}$ and $R_{i,i}$ in the block-diagonal transfer operators $P$ and $R$ usually are built using the diagonal blocks $A_{i,i}$ or - for applications where $A_{i,i}$ does not contain sufficient information to build aggregates - any other kind of application-specific method. - -For the block smoothers we apply well-established block smoothers (e.g. block relaxation methods or Schur complement based methods) as well as application-specific adaptions. - -\section{Exemplary setup for a $2\times 2$ problem} - -\subsection{Setup of block transfer operators} -\label{sec:blocktransfersetup} - -Figure \ref{fig:transferoperatorsetup} shows a typical layout for the setup of a $2\times 2$ blocked operator block transfer operators. We group factories for building transfer operators for the upper-left and lower-right blocks and build the corresponding blocked transfer operators. In general we can distinguish volume-coupled and interface-coupled problems. In the simpler case of volume-coupled problems we usually can use the same aggregates for the second block than we have built for the first block. That is, we reuse the same aggregates (built, e.g., by \texttt{myAggFact1}) for the second block. For interface-coupled problems we usually need a separate aggregation strategy for the interface DOFs. This can be a second standard aggregation factory object or an application-specific aggregation routine. - -In the following we give more details on the corresponding xml files for setting up the transfer operator layout given in Figure \ref{fig:transferoperatorsetup}. - - -\begin{figure} -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] - \tikzstyle{style_factory}=[anchor=center,rectangle, draw=black, fill=white, text centered, anchor=north, text=black, text width=3cm, line width=0.5mm]% - \tikzstyle{style_var_output}=[anchor=center, rounded corners=3pt, draw=black, fill=white, text centered, anchor=north, text=black, text width=1.4cm, line width=0.5mm]% - \tikzstyle{myarrow}=[->, >=stealth, line width=0.5mm] - \begin{scope}[shift={(-2.5,0)}] - \node[node distance=6.5] (SubBlockAFact1) [style_factory] { \tiny mySubBlockAFactory1 }; - \node[node distance=25] (AggFact1) [style_factory,below of=SubBlockAFact1] { \tiny myAggFact1 }; - \node[node distance=25] (CoarseMapFact1) [style_factory,below of=AggFact1] { \tiny myCoarseMap1 }; - \node[node distance=25] (TentativePFact1) [style_factory,below of=CoarseMapFact1] { \tiny myTentativePFact1 }; - \node[node distance=25] (NullspaceFact1) [style_factory,below of=TentativePFact1] { \tiny myNspFact1 }; - \node[node distance=80] (varA1) [style_var_output,left of=SubBlockAFact1] { \tiny A }; - \node[node distance=80] (varAgg1) [style_var_output,left of=AggFact1] { \tiny Aggregates }; - \node[node distance=80] (varCoarseMap1) [style_var_output,left of=CoarseMapFact1] { \tiny CoarseMap }; - \node[node distance=80] (varTentativeP1) [style_var_output,left of=TentativePFact1] { \tiny P }; - \node[node distance=80] (varNullspace1) [style_var_output,left of=NullspaceFact1] { \tiny Nullspace }; - \draw[myarrow,->] (SubBlockAFact1) -- (varA1); - \draw[myarrow,->] (AggFact1) -- (varAgg1); - \draw[myarrow,->] (TentativePFact1) -- (varTentativeP1); - \draw[myarrow,->] (CoarseMapFact1) -- (varCoarseMap1); - \draw[myarrow,->] (NullspaceFact1) -- (varNullspace1); - \draw[myarrow,->] (CoarseMapFact1) -- (TentativePFact1); - \draw[myarrow,->] (TentativePFact1) -- (NullspaceFact1); - \draw[red,thick,line width=0.5mm, dotted] ($(varA1.north west)+(-0.3,0.3)$) rectangle ($(NullspaceFact1.south east)+(0.3,-0.3)$); - \end{scope} -% - \begin{scope}[shift={(2.5,0)}] - \node[node distance=6.5] (SubBlockAFact2) [style_factory] { \tiny mySubBlockAFactory2 }; - \node[node distance=50] (CoarseMapFact2) [style_factory,below of=SubBlockAFact2] { \tiny myCoarseMap2 }; - \node[node distance=25] (TentativePFact2) [style_factory,below of=CoarseMapFact2] { \tiny myTentativePFact }; - \node[node distance=25] (NullspaceFact2) [style_factory,below of=TentativePFact2] { \tiny myNspFact2 }; - \node[node distance=80] (varA2) [style_var_output,right of=SubBlockAFact2] { \tiny A }; - \node[node distance=25] (varAgg2) [style_var_output,below of=varA2] { \tiny Aggregates }; - \node[node distance=80] (varCoarseMap2) [style_var_output,right of=CoarseMapFact2] { \tiny CoarseMap }; - \node[node distance=80] (varTentativeP2) [style_var_output,right of=TentativePFact2] { \tiny P }; - \node[node distance=80] (varNullspace2) [style_var_output,right of=NullspaceFact2] { \tiny Nullspace }; - \draw[myarrow,->] (SubBlockAFact2) -- (varA2); - \draw[myarrow,->] (AggFact1) -- (varAgg2); - \draw[myarrow,->] (TentativePFact2) -- (varTentativeP2); - \draw[myarrow,->] (CoarseMapFact2) -- (varCoarseMap2); - \draw[myarrow,->] (NullspaceFact2) -- (varNullspace2); - \draw[myarrow,->] (CoarseMapFact2) -- (TentativePFact2); - \draw[myarrow,->] (TentativePFact2) -- (NullspaceFact2); - \draw[red,thick,line width=0.5mm, dotted] ($(SubBlockAFact2.north west)+(-0.3,0.3)$) rectangle ($(varNullspace2.south east)+(0.3,-0.3)$); - \end{scope} - - \draw[myarrow,->] (CoarseMapFact1) -- (CoarseMapFact2); - - - \node[node distance=50] (BlockedPFact) [style_factory,below of=NullspaceFact1] { \tiny myBlockedPFact }; - \node[node distance=50] (BlockedRFact) [style_factory,below of=NullspaceFact2] { \tiny myBlockedRFact }; - - \draw[myarrow,->] (BlockedPFact) -- (BlockedRFact); - - \node[node distance=40] (BlockedRAPFact) [style_factory,below of=BlockedRFact] { \tiny myBlockedRAPFact }; - \draw[myarrow,->] (BlockedPFact) -- (BlockedRAPFact); - \draw[myarrow,->] (BlockedRFact) -- (BlockedRAPFact); - - \draw[myarrow,red] ($(NullspaceFact1.south)+(0.0,-0.3)$) -- node[left]{\tiny myFirstGroup} (BlockedPFact); - \draw[myarrow,red] ($(NullspaceFact2.south)+(0.0,-0.3)$) -- node[above]{\tiny mySecondGroup} ($(BlockedPFact.north)+(+1.6,0.0)$); - - %\draw[myarrow,green] ($(AggFact1.east)+(0.0,0.0)$) -|node[right, near end]{\tiny block2} ($(TentativePFact2.west)+(-0.5,0.0)$) -- ($(TentativePFact2.west)+(0.0,0.0)$); - -\end{tikzpicture} -\caption{Setup of $2\times 2$ block transfer operators} -\label{fig:transferoperatorsetup} -\end{figure} - -\subsubsection{Factory list} -All the following definitions of factories are contained in the \texttt{Factories} sublist of the \texttt{MueLu} parameter list, which basically is meant as a factory collection for all used factories in the multigrid setup. -To keep things simple, we only give the factories necessary to define the setup for the most upper-left block in the $n\times n$ block matrix. - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -\begin{mycomment} -Please note, that the ordering of the factories is important in the sense that factories have to be defined before they are used as input -for other following factories. As an example, the \texttt{myCoarseMap1} factory has to be defined before the \texttt{myTentativePFact1} as it is used as input for the \texttt{CoarseMap} variable. Switching the ordering of the factories in the xml file would result in an error that \texttt{myCoarseMap1} is unknown. Technically, one could avoid this restriction by a two pass reading process which first reads all factories and then resolves the dependencies. On the other side, this restriction helps to keep a straightforward linear design of the setup process. -\end{mycomment} - -\noindent The meaning of the factories is the following:\smallskip -\begin{description} -\item[SubBlockAFactory] Given a $n\times n$ block operator $A$, the \texttt{SubBlockAFactory} extracts the $(i,j)$ block where $i$ is defined by the parameter \texttt{block row} and $j$ by the parameter \texttt{block col} where $0\leq i,j < n$. Above example assumes a Thyra-style numbering of the global ids for a simple 2D Navier-Stokes example. That is, the matrix block $A_{00}$ has two degrees of freedom per node (one for the velocity in $x$-direction and one in the $y$-direction). The \texttt{Range map: Striding info} contains this information (i.e. 2 dofs per node), since this information might get lost (or never was stored) when using Thyra block operators. -\item[UncoupledAggregationFactory] The aggregation factory is used to build the aggregates. In this case the aggregates shall be built using the graph of $A_{00}$ that is returned by the \texttt{SubBlockAFactory}. In this example we only give the user parameters for the aggregation. Later it is shown how to declare the \texttt{FactoryManager} which makes sure that this concrete instance of an aggregation factory builds the aggregates for $A_{00}$ only. -\item[CoarseMapFactory] The \texttt{CoarseMapFactory} is used in the \texttt{TentativePFactory} and basically is responsible to provide a proper domain map for the transfer operator block $P_i$. For $P_0$ this is usually a standard map. The only information that is important is \texttt{Striding info} which means that the coarse domain map has 2 dofs per node again. Note: we have 2 dofs per node (for the velocities in $x$ and $y$-direction). We have 2 null space vectors. Therefore, the coarse problem has also 2 dofs per node which means the domain map of $P_i$ has to be built for 2 dofs per node. -\item[TentativePFactory] Here, the \texttt{TentativePFactory} builds the $P_i$ block for the blocked transfer operator $P$. We explicitly give the names of the factories used to generate $P_i$, which include the previously defined factories for the \texttt{CoarseMap, Aggregates} and \texttt{A}. This information is not really needed in this place as we later define a \texttt{FactoryManager} for the $i$-th block, but often it makes it easier to understand the dependencies. That is, the short version would just be -\begin{lstlisting} - - - -\end{lstlisting} -\item[NullspaceFactory] For defining multigrid methods for multiphysics problems the \texttt{NullspaceFactory} is very important. In general, the \texttt{TentativePFactory} uses the provided fine level near null space vectors to generate the tentative prolongation operator $P_i$ together with a coarse represenation of the near null space vectors. That is, the \texttt{TentativePFactory} produces the \texttt{Nullspace} information that it needs itself on the next coarser level. That is a hidden dependency which usually automatically works without any changes necessary by the user. The user is only responsible to provide proper fine level near null space vectors as \texttt{Nullspace} variable on the finest level. -The \texttt{NullspaceFactory} is just a helper factory which processes the null space information on the finest level and pipes it in into the global setup process. For multiphysics problems, the user has to provide $n$ partial near null space vectors (one for each mathematical or physical field) using the variable names ``Nullspace1'' to ``Nullspace9'' on the finest level. The \texttt{Fine level nullspace} parameter in the \texttt{NullspaceFactory} then can be set to the corresponding variable name (e.g. \texttt{Nullspace1}). That is, the \texttt{NullspaceFactory} checks the fine level variable container for a variable named ``Nullspace1'' and uses the content as fine level null space for input in the \texttt{TentativePFactory}. It is important, that besides of the \texttt{Fine level nullspace} parameter another parameter with the name of the near null space vector (in above case ``Nullspace1'') is declared with the corresponding \texttt{TentativePFactory} name as value. This closes the circle for the null space generation for block $P_i$ on all coarser levels. -It is important that the \texttt{NullspaceFactory} is defined after the corresponding \texttt{TentativePFactory} class such that the dependency circle can be closed correctly. -\end{description} -\begin{mycomment} -Instead of \texttt{TentativePFactory} any other factory which generates a coarse null space can be used as well (e.g. \texttt{SemiCoarsenPFactory}). -\end{mycomment} -\begin{mycomment} -Of course, above factory list can be extended for smoothed aggregation. We also skipped the factories for the restriction operators. -\end{mycomment} - -\subsubsection{Factory manager} -Once the necessary factories for building $P_i$ are defined in the \texttt{FactoryList} section of the xml file, we can group them together. Right after the factories we can add a \texttt{FactoryManager} block in the \texttt{FactoryList} section. - -\begin{lstlisting} - - - - - - - - - -\end{lstlisting} - -The name for the group can be chosen freely (e.g. ``myFirstGroup''). Besides the declaration of the \texttt{FactoryManager} group using the -\begin{lstlisting} - -\end{lstlisting} -parameter, it contains a list of all factories which are used in context of building the coarsening information for the corresponding block. - -The group block defining a \texttt{FactoryManager} has a similar role than in the \texttt{Hierarchy} section in the xml file later. It allows to group together factories into subgroups that can be referred to by the common name (e.g. ``myFirstGroup'') later. These groups help to organize the different factories. Note, that we basically need one group for each physical/mathematical field in our $n\times n$ block operator, that is we need $n$ groups. - -\begin{mycomment} -The group block for the second row in the block operator could look like the following -\begin{lstlisting} - - - - - - - - - - -\end{lstlisting} -This assumes that all the factories have been defined before similar to the first group blocks. Note, that in some cases for certain applications it is possible to reuse information from the first block in the second block. In this case we use the abstract aggregation information that has been built using the velocity information for the associated pressure degrees of freedom. This is possible, since in our example each node has 2 velocity and 1 pressure degree of freedom. -\end{mycomment} - -\subsubsection{Block prolongation operator} - -The diagonal block prolongation operator is built using -\begin{lstlisting} - - - - - - - - - - - - -\end{lstlisting} -in the \texttt{FactoryList} section of the xml file after all groups have been defined. It contains basically sublist with the names ``block1'' to ``block\texttt{n}''. Each of these sublists contains a parameter \texttt{group} with the group name defined before. - -\begin{mycomment} -Instead of using groups you could also put all the factory definitions within the corresponding ``block\texttt{n}'' parameter list. But this would mean that you have to set all inter-factory dependencies in the corresponding block by hand. You cannot use the general defaults that are defined in the groups. It would also make it impossible to reuse information from factories belonging to a different block (e.g., you could not reuse the aggregation information built by the \texttt{myAggFact1} for the aggregates in block 2. -\end{mycomment} - -\subsubsection{Block restriction operator and coarse level operator} - -The following definitions should be the standard for nearly all multiphysics problems. We use the \texttt{GenericRFactory} for building the restriction operator out of the blocked prolongation factory. - -\begin{lstlisting} - - - - - - -\end{lstlisting} - -It uses the blocks $P_i$ to generate the corresponding blocks $R_i$ for the diagonal of the restriction operator. If PG-AMG is used for some or all blocks $P_i$ this is automatically considered when generating $R_i$. - -\begin{mycomment} -Please note, that you cannot use \texttt{TransPFactory} as it has no support for block operators. However, this is not a problem, since the \texttt{TransPFactory} might be used locally for single blocks wherever possible. -\end{mycomment} - -Once, the block diagonal transfer operators $P$ and $R$ are set up, the \texttt{BlockedRAPFactory} builds the coarse $n\times n$ operator: -\begin{lstlisting} - - - - - -\end{lstlisting} - -\subsection{Setup of block smoothers} - -Once the transfer operators are set up properly, it is time to define the block smoothing methods - -\subsubsection{Xpetra block smoothers} - -Xpetra contains a set of general block smoothers, including a block Gauss-Seidel method for $n\times n$ block operators and a Schur complement based SIMPLE variant for $2\times 2$ block operators. Here we just explain the setup for the Schur complement smoother as an example. - -The Schur complement based smoother internally needs two solvers/smoothers. The first smoother/solver is need for calculating a prediction for the velocities, the second solver/smoother then has to (approximately) solve the Schur complement equation. - -We are still in the \texttt{FactoryList} section of the xml file and define the corresponding solver/smoother blocks: - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -It is not necessary but helpful to declare variable ``A'' in ``mySmooFact1'' to be the diagonal block $A_{00}$ of the blocked operator. This way it is obvious that this smoother is supposed to generate the prediction within the Schur complement approach. The second smoother (with the name ``mySchurSmooFact'' is supposed to solve the Schur complement equation, that is, the input matrix $A$ for this smoother should be the Schur complement operator $A_{11}-A_{10}A_{00}^{-1}A_{01}$ or at least a good approximation of the Schur complement operator. This operator is provided by the \texttt{SchurComplementFactory}. Be aware, that the \texttt{SchurComplementFactory} uses the full $2\times 2$ operator $A$ as input to generate the approximation of the Schur complement operator. It is not defined as input variable ``A'' since the full $2\times 2$ operator is the standard answer for variable ``A''. It would make sense, though, to declare ``mySchurCompFact'' as variable ``A'' for ``mySchurSmooFact''. - -The Schur complement smoother then is defined by the block: - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -In this case, we use the \texttt{SimpleSmoother} as example. Besides of the typical smoother parameters (number of sweeps, damping, \ldots) the interesting part are the sublists ``block1'' and ``block2'' which contain the information about the internal smoothers/solvers. In above example we just declare the factories for ``A'' and ``Smoother''. The variable ``A'' always gives the internal linear operator that is used within the solver/smoother. By defining ``A'' in this place, we do not really have to define it extra in the smoother blocks above. - -\begin{mycomment} -Please note, that instead of the explicit variable definitions in the ``block\texttt{n}'' sublists, one could also have given just the group names. However, this only works if the ``Smoother'' variable is also contained in the corresponding groups. In above examples from the previous section we skipped the ``Smoother'' variable. This makes sense especially if the aggregation information is built using a different $A$ operator as the smoother is using. In above example we do not build aggregates using the Schur complement operator but want to reuse aggregates from the first block. -\end{mycomment} - -As a side note it shall be mentioned, that you can also directly make all definitions in the ``block\texttt{n}'' parameter lists: -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} -However, this is not really recommended since it prevents the reuse of factories in several places. E.g., instead of the new \texttt{SubBlockAFactory} one should just reuse the \texttt{SubBlockAFactory} which has been defined and used before for the block transfers. This drastically simplifies and shortens the factory definitions and reduces the number of potential errors. Be aware, that each new block in the xml file means that a new instance of the corresponding factory is instantiated and built. In the worst case some expensive information is calculated twice which might heavily impact the overall performance. - -\subsubsection{Teko block smoothers} - -In \trilinos the \teko package provides block preconditioners that can be used as alternative to the existing Xpetra block smoothers. The \xpetra linear algebra layer also provides support for \thyra block operators which allows us to use the \teko block smoothers within a \muelu multigrid hierarchy. In case of the \teko SIMPLE implementation one again needs to internal solvers/smoothers (one for the prediction of the primary variables and one for the solution of the Schur complement equation). \teko uses the \stratimikos interface for defining the corresponding smoothers/solvers. So, instead of the \texttt{SimpleSmoother} object from the previous subsection one can also use the SIMPLE implementation from \teko. - -We define a \texttt{TekoSmoother} as block smoother using -\begin{lstlisting} - - - - - - - - - - - - - -\end{lstlisting} - -The \texttt{tekosmoother} accepts the full $2\times 2$ block operator as input (not declared above, since it is the default) and contains a sublist with the name \texttt{Inverse Factory Library}. Within this sublist all local smoothers/solvers as well as the \teko block smoother (or several \teko block smoothers) are defined. In the above example, there is only one \teko block smoother (of type ``NS SIMPLE'') declare which internally uses direct solvers from the \amesos package for the velocity and pressure (Schur complement) problem. -The \texttt{Inverse Type} parameter of the \texttt{TekoSmoother} defines the \teko block smoother from the \texttt{Inverse Factory Library}. -For the available parameters and block smoothers in \teko, the reader is referred to the \teko documentation. - -\begin{mycomment} -\muelu provides the \thyra blocked operator for \teko. There are subtle differences between the native Xpetra format for blocked operators and the more abstract \thyra format. For the block smoothers in \teko this makes no difference. The reader might refer to Section \ref{sec:xpetraversusthyra} for a detailed description of the differences and the effect on the design of multigrid hierarchies. -\end{mycomment} - -\subsection{Multigrid setup} - -Last but not least, once both the transfers and the block smoothers are defined the multigrid method itself has to be set up. -Note, that all previous definitions and declarations have been made in the \texttt{Factories} section of the xml file. The multigrid setup is done in the \texttt{Hierarchy} section of the xml file and looks like that: - -\begin{lstlisting} - - - - - - - - - - - - - - - -\end{lstlisting} - -The interesting part is the ``AllLevel'' sublist (you can freely choose the name of this list), which - in some sense - corresponds to the groups introduced before to setup the block transfers and block smoothers. In fact, this sublist defines the master \texttt{FactoryManager} for the overall multigrid method. Note, that all variables (``A'',``P'',``R'',\ldots) are generated by the block versions instead of the single block factories. - - -\section{Exemplary setup for a $2\times 2$ problem with rebalancing} - -\subsection{Transfer operator setup} - -\begin{figure} -\begin{tikzpicture}[>=latex',font={\sf \small}, node distance=2cm] - \tikzstyle{style_factory}=[anchor=center,rectangle, draw=black, fill=white, text centered, anchor=north, text=black, text width=3cm, line width=0.5mm]% - \tikzstyle{style_var_output}=[anchor=center, rounded corners=3pt, draw=black, fill=white, text centered, anchor=north, text=black, text width=1.4cm, line width=0.5mm]% - \tikzstyle{myarrow}=[->, >=stealth, line width=0.5mm] - \begin{scope}[shift={(-2.5,0)}] - \node[node distance=6.5] (SubBlockAFact1) [style_factory] { \tiny mySubBlockAFactory1 }; - \node[node distance=25] (AggFact1) [style_factory,below of=SubBlockAFact1] { \tiny myAggFact1 }; - \node[node distance=25] (CoarseMapFact1) [style_factory,below of=AggFact1] { \tiny myCoarseMap1 }; - \node[node distance=25] (TentativePFact1) [style_factory,below of=CoarseMapFact1] { \tiny myTentativePFact1 }; - \node[node distance=25] (NullspaceFact1) [style_factory,below of=TentativePFact1] { \tiny myNspFact1 }; - \node[node distance=80] (varA1) [style_var_output,left of=SubBlockAFact1] { \tiny A }; - \node[node distance=80] (varAgg1) [style_var_output,left of=AggFact1] { \tiny Aggregates }; - \node[node distance=80] (varCoarseMap1) [style_var_output,left of=CoarseMapFact1] { \tiny CoarseMap }; - \node[node distance=80] (varTentativeP1) [style_var_output,left of=TentativePFact1] { \tiny P }; - \node[node distance=80] (varNullspace1) [style_var_output,left of=NullspaceFact1] { \tiny Nullspace }; - \draw[myarrow,->] (SubBlockAFact1) -- (varA1); - \draw[myarrow,->] (AggFact1) -- (varAgg1); - \draw[myarrow,->] (TentativePFact1) -- (varTentativeP1); - \draw[myarrow,->] (CoarseMapFact1) -- (varCoarseMap1); - \draw[myarrow,->] (NullspaceFact1) -- (varNullspace1); - \draw[myarrow,->] (CoarseMapFact1) -- (TentativePFact1); - \draw[myarrow,->] (TentativePFact1) -- (NullspaceFact1); - \draw[red,thick,line width=0.5mm, dotted] ($(varA1.north west)+(-0.3,0.3)$) rectangle ($(NullspaceFact1.south east)+(0.3,-0.3)$); - \end{scope} -% - \begin{scope}[shift={(2.5,0)}] - \node[node distance=6.5] (SubBlockAFact2) [style_factory] { \tiny mySubBlockAFactory2 }; - \node[node distance=50] (CoarseMapFact2) [style_factory,below of=SubBlockAFact2] { \tiny myCoarseMap2 }; - \node[node distance=25] (TentativePFact2) [style_factory,below of=CoarseMapFact2] { \tiny myTentativePFact }; - \node[node distance=25] (NullspaceFact2) [style_factory,below of=TentativePFact2] { \tiny myNspFact2 }; - \node[node distance=80] (varA2) [style_var_output,right of=SubBlockAFact2] { \tiny A }; - \node[node distance=25] (varAgg2) [style_var_output,below of=varA2] { \tiny Aggregates }; - \node[node distance=80] (varCoarseMap2) [style_var_output,right of=CoarseMapFact2] { \tiny CoarseMap }; - \node[node distance=80] (varTentativeP2) [style_var_output,right of=TentativePFact2] { \tiny P }; - \node[node distance=80] (varNullspace2) [style_var_output,right of=NullspaceFact2] { \tiny Nullspace }; - \draw[myarrow,->] (SubBlockAFact2) -- (varA2); - \draw[myarrow,->] (AggFact1) -- (varAgg2); - \draw[myarrow,->] (TentativePFact2) -- (varTentativeP2); - \draw[myarrow,->] (CoarseMapFact2) -- (varCoarseMap2); - \draw[myarrow,->] (NullspaceFact2) -- (varNullspace2); - \draw[myarrow,->] (CoarseMapFact2) -- (TentativePFact2); - \draw[myarrow,->] (TentativePFact2) -- (NullspaceFact2); - \draw[red,thick,line width=0.5mm, dotted] ($(SubBlockAFact2.north west)+(-0.3,0.3)$) rectangle ($(varNullspace2.south east)+(0.3,-0.3)$); - \end{scope} - - \draw[myarrow,->] (CoarseMapFact1) -- (CoarseMapFact2); - - - \node[node distance=50] (BlockedPFact) [style_factory,below of=NullspaceFact1] { \tiny myBlockedPFact }; - \node[node distance=50] (BlockedRFact) [style_factory,below of=NullspaceFact2] { \tiny myBlockedRFact }; - - \draw[myarrow,->] (BlockedPFact) -- (BlockedRFact); - - \node[node distance=40] (BlockedRAPFact) at ($(BlockedRFact.west)+(-1.0,-1.0)$) [style_factory] { \tiny myBlockedRAPFact }; - \draw[myarrow,->] (BlockedPFact) -- (BlockedRAPFact); - \draw[myarrow,->] (BlockedRFact) -- (BlockedRAPFact); - - \draw[myarrow,red] ($(NullspaceFact1.south)+(0.0,-0.3)$) -- node[left]{\tiny myFirstGroup} (BlockedPFact); - \draw[myarrow,red] ($(NullspaceFact2.south)+(0.0,-0.3)$) to [out=230,in=10] node[above,near end]{\tiny mySecondGroup} ($(BlockedPFact.north)+(+1.6,0.0)$); - - - \node[node distance=40] (RepHeuristicFact) [style_factory,below of=BlockedRAPFact] { \tiny myRepartitionHeuristicFact }; - - \node[node distance=100] (rebSubBlockAFact1) [style_factory, left of=RepHeuristicFact] { \tiny myRebSubBlockAFactory1 }; - \node[node distance=100] (rebSubBlockAFact2) [style_factory, right of=RepHeuristicFact] { \tiny myRebSubBlockAFactory2 }; - - \node[node distance=25] (rebZoltanFact1) [style_factory, below of=rebSubBlockAFact1] { \tiny myZoltanInterface1 }; - \node[node distance=25] (rebZoltanFact2) [style_factory, below of=rebSubBlockAFact2] { \tiny myRepartitionInterface2 }; - - \node[node distance=25] (rebRepartitionFact1) [style_factory, below of=rebZoltanFact1] { \tiny myRepartitionFactory1 }; - \node[node distance=25] (rebRepartitionFact2) [style_factory, below of=rebZoltanFact2] { \tiny myRepartitionFactory2 }; - - \draw[blue,thick,line width=0.5mm, dotted] ($(RepHeuristicFact.north east)+(0.15,0.15)$) rectangle ($(rebRepartitionFact1.south west)+(-0.3,-0.3)$); - \draw[blue,thick,line width=0.5mm, dotted] ($(NullspaceFact1.north east)+(0.15,0.15)$) rectangle ($(varNullspace1.south west)+(-0.15,-0.15)$); - \draw[orange,thick,line width=0.5mm, dotted] ($(NullspaceFact2.north west)+(-0.15,0.15)$) rectangle ($(varNullspace2.south east)+(0.15,-0.15)$); - \draw[orange,thick,line width=0.5mm, dotted] ($(RepHeuristicFact.north west)+(-0.1,0.1)$) rectangle ($(rebRepartitionFact2.south east)+(+0.15,-0.15)$); - - \draw[myarrow,->] (BlockedRAPFact) -- (RepHeuristicFact); - \draw[myarrow,->] (BlockedRAPFact) -- (rebSubBlockAFact1); - \draw[myarrow,->] (BlockedRAPFact) -- (rebSubBlockAFact2); - \draw[myarrow,->] (rebSubBlockAFact1) -- (rebZoltanFact1); - \draw[myarrow,->] (rebSubBlockAFact2) -- (rebZoltanFact2); - \draw[myarrow,->] (rebZoltanFact1) -- (rebRepartitionFact1); - \draw[myarrow,->] (rebZoltanFact2) -- (rebRepartitionFact2); - \draw[myarrow,->] (rebZoltanFact1) -- (rebZoltanFact2); - \draw[myarrow,->] (RepHeuristicFact) -- (rebZoltanFact1); - \draw[myarrow,->] (RepHeuristicFact) -- (rebZoltanFact2); - \draw[myarrow,->] (RepHeuristicFact) to [out=270,in=10] (rebRepartitionFact1); - \draw[myarrow,->] (RepHeuristicFact) to [out=270,in=170] (rebRepartitionFact2); - - \node[node distance=50] (rebBlockedPFact) [style_factory,below of=rebRepartitionFact1] { \tiny myRebBlockedPFact }; - \node[node distance=50] (rebBlockedRFact) [style_factory,below of=rebRepartitionFact2] { \tiny myRebBlockedRFact }; - - \node[node distance=140] (rebBlockedRAPFact)[style_factory,below of=RepHeuristicFact] { \tiny myRebBlockedAcFact }; - %\draw[myarrow,->] (rebBlockedPFact) -- (rebBlockedRAPFact); - %\draw[myarrow,->] (rebBlockedRFact) -- (rebBlockedRAPFact); - - \draw[myarrow,blue] ($(rebRepartitionFact1.south)+(0.0,-0.3)$) -- node[left]{\tiny myRebFirstGroup} (rebBlockedPFact); - \draw[myarrow,orange] ($(rebRepartitionFact2.south)+(-5.0,-0.15)$) -- node[left]{} ($(rebBlockedPFact.north)+(+1.6,0.0)$); - - \draw[myarrow,blue] ($(rebRepartitionFact1.south)+(5.0,-0.3)$) -- node[left]{} (rebBlockedRFact); - \draw[myarrow,orange] ($(rebRepartitionFact2.south)+(0.0,-0.15)$) -- node[right]{\tiny myRebSecondGroup} ($(rebBlockedRFact.north)+(0,0.0)$); - - \draw[myarrow,blue] ($(rebRepartitionFact1.south)+(3.0,-0.3)$) -- node[left]{} ($(rebBlockedRAPFact.north)+(-0.5,0.0)$); - \draw[myarrow,orange] ($(rebRepartitionFact2.south)+(-3.0,-0.15)$) -- node[right]{} ($(rebBlockedRAPFact.north)+(0.5,0.0)$); - - \draw[myarrow] (BlockedPFact) -| node[left]{} ($(rebBlockedPFact.west)+(-1.8,0.0)$) -- (rebBlockedPFact); - \draw[myarrow] (BlockedRAPFact) -| node[left]{} ($(rebBlockedRAPFact.west)+(-4.0,0.0)$) -- (rebBlockedRAPFact); - \draw[myarrow] (BlockedRFact) -| node[left]{} ($(rebBlockedRFact.east)+(1.8,0.0)$) -- (rebBlockedRFact); -\end{tikzpicture} -\caption{Setup of $2\times 2$ block transfer operators with rebalancing} -\label{fig:transferoperatorsetuprebalancing} -\end{figure} - -Figure \ref{fig:transferoperatorsetuprebalancing} shows the basic setup for block transfer operators with rebalancing enabled. Please compare it with the complete XML input deck in Section \ref{sec:xmlinputdeckrebalancing}. - -As one can see from the upper part of Figure \ref{fig:transferoperatorsetuprebalancing} first we build blocked transfer operators and a blocked coarse level operator using sub-factory manager objects \texttt{myFirstGroup} and \texttt{mySecondGroup} in the factories \texttt{myBlockedPFact}, \texttt{myBlockedRFact} and \texttt{myBlockedRAPFact}. Then, we rebalance the coarse level blocked operator $A$ from \texttt{myBlockedRAPFact}. - -The \texttt{myRepartitionHeuristicFact} object will decide whether rebalancing is necessary. If yes, then it will return the number of required partitions for the coarse level operator. This input is processed by the repartition interface and repartition factory objects that finally create \texttt{Xpetra::Importer} to do the rebalancing. The \texttt{myRebBlocked\{P,R,Ac\}Fact} objects use those \texttt{Importer} objects to perform the rebalancing. - -Please note, that we build additional helper factory manager objects \texttt{myRebFirstGroup} and \texttt{myRebSecondGroup} which contain all factories relevant for rebalancing the two blocks. - -\begin{mycomment} -No changes are necessary when setting up the block smoothers as they use the matrices on the current level as input (which may or may not be rebalanced in the previous transfer operator setup process). -\end{mycomment} - -\subsection{Complete XML input deck} - -The following listing shows the full input deck for a $2\times 2$ blocked operator multigrid setup including rebalancing and level smoothers. - -\label{sec:xmlinputdeckrebalancing} - -\begin{lstlisting} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\end{lstlisting} - -Note, that we are using a coordinate-based rebalancing method from the \texttt{Zoltan} package. The \texttt{myInputCoordsFact} provides the \texttt{Coordinates} variable to the \texttt{ZoltanInterface}. That is, \texttt{myInputCoordsFact} uses user-provided data on the finest level and switches to Coordinates provided by the \texttt{myTransferCoordinatesFact} on the coarser level. - -\begin{mycomment} -To deal with potential logical circular dependencies between factories you can use the \textit{dependency for} keyword as demonstrated for the \texttt{myTransferCoordinatesFact} and \texttt{myInputCoordsFact} in this example. Note: you can always use the \textit{dependency for} keyword to extend/change factory dependencies in the xml file. -\end{mycomment} - - - -\section{Background} - -\subsection{Xpetra-style versus Thyra-style numbering} -\label{sec:xpetraversusthyra} - - -\chapter{Using \muelu in user applications} - -This tutorial demonstrates how to use \muelu from within user applications in C++. In \cite[Section 2.6]{Mue} it is explained how to use \muelu through the \texttt{MueLu::CreateE/TpetraPreconditioner} interface. This interface is designed for beginners which want to try \muelu through standard \trilinos interfaces. Note that there is also support for \stratimikos. Please refer to the \texttt{examples} in the \muelu folder for more details. - -This tutorial aims at more advanced methods to use \muelu, creating an explicit instance of some \muelu classes like \texttt{MueLu::Hierarchy} and \texttt{MueLu::HierarchyManager}. In the next sections we give some code snippets. Most of them are borrowed form the \texttt{laplace2d.cpp} file in the tutorial. - -\section{Preparations} -First of all, we have to define a communicator object. -\printCppListing{laplace2d.cpp_2.fragment} - -For the multigrid method we need a linear operator $A$. For demonstration purposes, here we just generate a 2D Laplacian operator using the \textsc{Galeri} package (see \ref{lab:examplesym}). In this example we use \epetra for the underlying linear algebra framework, but it shall be mentioned that it works for \tpetra in a similar way (refer to the code examples in the \muelu examples folder). -\printCppListing{laplace2d.cpp_4.fragment} - -\muelu is based on \xpetra which provides a common interface both for \epetra and \tpetra. Therefore we have to encapsulate our \epetra objects into \xpetra wrapper objects. This is done using the following code. -\printCppListing{laplace2d.cpp_6.fragment} -Note that the \muelu setup routines require a \texttt{Xpetra::Matrix} object. The wrapper class \texttt{Xpetra::CrsMatrixWrap} is just a wrapper derived from \texttt{Xpetra::Matrix} which manages a \texttt{Xpetra::CrsMatrix} object which is the common base class for both \epetra and \tpetra CRS matrix classes. The details are not really important as long as one understands that one needs a \texttt{Xpetra::Matrix} object for \muelu in the end. -With the \texttt{SetFixedBlockSize} routine we state that there is only one degree of freedom per node (pure Laplace problem). -For aggregation-based algebraic multigrid methods one has to provide a valid set of near null space vectors to produce transfer operators. In case of a Laplace problem we just use a constant vector. -\printCppListing{laplace2d.cpp_8.fragment} - -\section{Setup phase} - -With a fine level operator $A$ available as \texttt{Xpetra::Matrix} object and a set of near null space vectors (available as \texttt{Xpetra::MultiVector}) all minimum requirements are fulfilled for generating an algebraic multigrid hierarchy. There are two different ways to setup a multigrid hierarchy in \muelu. One can either use a parameter list driven setup process which accepts either \texttt{Teuchos::ParameterList} objects or XML files in two different XML file formats. Alternatively, one can use the \muelu C++ API to define the multigrid setup at compile time. In the next sections we show both variants. - -\subsection{XML Interface} - -The most comfortable way to declare the multigrid parameters for \muelu is using the XML interface. In fact, \muelu provides two different XML interfaces. There is a simplified XML interface for multigrid users and a more advanced XML interface for expert which allows to make use of all features of \muelu as a multigrid framework. Both XML file formats are introduced in the previous sections of this hands on tutorial. -However, for the C++ code it makes no difference which type of XML interface is used. - -Assuming that we have a \texttt{Teuchos::ParameterList} object with valid \muelu parameters we can create a \texttt{MueLu::HierarchyManager} object -%First of all, one has to create a \texttt{MueLu::ParameterListInterpreter} object which either accepts a \texttt{Teuchos::ParameterList} or a file with XML parameters. -\printCppListing{ScalingTestParamList.cpp_2.fragment} -For an example how to fill the parameter list the reader may refer to \cite[Section 2.3]{Mue}. Note that there are routines to fill the parameter lists with the information from XML files. You can also directly provide a file name of a XML file to the \texttt{Muelu::ParameterListInterpreter}. For details you may refer to the doxygen documentation or the example in \texttt{laplace2d.cpp}. - -Next a new \texttt{MueLu::Hierarchy} object is generated -\printCppListing{ScalingTestParamList.cpp_4.fragment} -The \texttt{CreateHierarchy} creates a new empty multigrid hierarchy with a finest level only. The user has to feed in the linear operator $A$ and the near null space vector. If further information is available, such as the node coordinates, they can be also stored in the finest level. The coordinates are needed, e.g., for rebalancing the coarse levels. -Finally, the \texttt{SetupHierarchy} call initiates the coarsening process and the multigrid hierarchy is built according to the parameters from the \texttt{mueluList} parameters. -\printCppListing{ScalingTestParamList.cpp_6.fragment} - -As XML parameter file any of the files shown in the previous tutorials can be used. - -\begin{mycomment} -As one can see from the last code snippet, the \texttt{Hierarchy} allows access to all important parts of the multigrid method before setup. So, if you have to feed in some non-standard information, this is the way how it works. Using the \texttt{CreateE/TpetraPreconditioner} interface may be easier but does not allow to access the finest level before setup. -\end{mycomment} - -Once the \texttt{SetupHierarchy} call is completed, the multigrid hierarchy is ready to use. The reader can skip the next section about the C++ interface and proceed with \S\ref{sec:muelu_belospreconditioner} for an example how to use the multigrid method as preconditioner within a Krylov subspace method from the \belos package. - -\subsection{C++ Interface} - -As an alternative to the XML interfaces, the user can also define the multigrid hierarchy using the C++ API directly. In contrary to the XML interface which allows to build the layout of the multigrid preconditioner at runtime, the preconditioner is fully defined at compile time when using the C++ interface. - -First, a \texttt{MueLu::Hierarchy} object has to be defined, which manages the multigrid hierarchy including all multigrid levels. It provides routines for the multigrid setup and the multigrid cycle algorithms (such as V-cycle and W-cycle). -\printCppListing{ScalingTest.cpp_6.fragment} - -There are some member functions which can be used to describe the basic multigrid hierarchy. The \texttt{SetMaxCoarseSize} member function is used to set the maximum size of the coarse level problem before the coarsening process can be stopped. -\printCppListing{ScalingTest.cpp_8.fragment} - -Next, one defines an empty \texttt{MueLu::Level} object for the finest level. The \texttt{MueLu::Level} objects represent a data container storing the internal variables on each multigrid level. The user has to provide and fill the level container for the finest level only. The \texttt{MueLu::Hierarchy} object then automatically generates the coarse levels using the multigrid parameters. The absolute minimum requirements for the finest level that the user has to provide is the fine level operator $A$ which represents the fine level matrix. \muelu is based on \xpetra. So, the matrix $A$ has to be of type \texttt{Xpetra::Matrix}. In addition, the user should also provide a valid set of near null space vectors. For a Laplace problem we can just use the constant \texttt{nullspace} vector that has previously been defined. Some routines need additional information. For example, the user has to provide the node coordinates for repartitioning. -\printCppListing{ScalingTest.cpp_10.fragment} -\begin{mycomment} -When including the \texttt{MueLu\_UseShortNames.hpp} header file the template parameters usually can be dropped for compiling. The most important template parameters are \texttt{SC} for the scalar type, \texttt{LO} for the local ordinal type (usually \texttt{int}) and \texttt{GO} for the global ordinal type. For a detailed description of the template parameters the reader may refer to the \tpetra documentation. -\end{mycomment} - -A \texttt{MueLu::FactoryManager} object is used for the internal management of data dependencies and generating algorithms of the multigrid setup. Even though not absolutely necessary, we show the usage of the \texttt{MueLu::FactoryManager} object as it allows for user-specific enhancements of the multigrid code. -\printCppListing{ScalingTest.cpp_12.fragment} - -The user can define its own factories for performing different tasks in the setup process. The following code shows how to define a smoothed aggregation transfer operator and a restriction operator. The \texttt{MueLu::RAPFactory} is used for the (standard) Galerkin product to generate the coarse level matrix $A$. -\printCppListing{ScalingTest.cpp_14.fragment} - -The user-defined factories have to be registered in the \texttt{FactoryManager} using the lines -\printCppListing{ScalingTest.cpp_16.fragment} -\begin{mycomment} -If you forget to register the new factories, the \texttt{FactoryManager} will use some internal default factories for being responsible to create the corresponding variables. Then your user-specified factories are just ignored during the multigrid setup! -\end{mycomment} -Note, that the \texttt{FactoryManager} is also responsible for resolving all dependencies between different factories. That is, after the user-defined factories have been registered, all factories that request variable $P$ are provided with the prolongation operator $P$ that has been generated by the registered factory \texttt{PFact}. If there is some data requested for which no factory has been registered by the user, the \texttt{FactoryManager} manages an internal list for reasonable default choices and default factories. - -Next, the user has to declare a level smoother. The following code can be used to define a symmetric Gauss-Seidel smoother. Other methods can be set up in a similar way. -\printCppListing{ScalingTest.cpp_18.fragment} -Before the level smoother can be used, a \texttt{MueLu::SmootherFactory} has to be defined for the smoother factory. The \texttt{SmootherFactory} is used in the multigrid setup to generate level smoothers for the corresponding levels using the prototyping design pattern. Note, that the \texttt{SmootherFactory} has also to be registered in the \texttt{FactoryManager} object. If the user forgets this, the multigrid setup will use some kind of default smoother, i.e., the user-chosen smoother options are just ignored. -\printCppListing{ScalingTest.cpp_20.fragment} -Once the \texttt{FactoryManager} is set up, it can be used with the \texttt{Hierarchy::Setup} routine to initiate the coarsening process and set up the multigrid hierarchy. -\printCppListing{ScalingTest.cpp_22.fragment} - -\section{Iteration phase} -\label{sec:iterationphase} -Once the setup phase is completed, the \muelu multigrid hierarchy is ready for being used. - -There are several ways how to use the multigrid method. One can apply the multigrid method as standalone solver for linear systems. Multigrid methods are also known to be efficient preconditioners within iterative (Krylov) solvers such as CG or GMRES methods. - -In the next subsections it is demonstrated how to use \muelu as standalone solver and as preconditioner for iterative solvers from the \belos and \aztecoo package in \trilinos. - -For solving a linear system $Ax=b$ we need a right hand side vector $b$. When using iterative solvers we also need an initial guess for the solution vector. -\printCppListing{laplace2d.cpp_7.fragment} -In this example we just create \epetra vectors and wrap them into \xpetra objects. The right hand side vector is initialized with one and the solution vector is filled with random values. - -\subsection{\muelu as multigrid solver} -To use \muelu as standalone solver one can use the following code -\printCppListing{laplace2d.cpp_18.fragment} -In this code snippet a solution vector is created using the \texttt{Xpetra::VectorFactory} and initialized with the content from the solution vector \verb|xX| containing the initial guess. Then, the \texttt{MueLu::Hierarchy} object is set to the non-preconditioner mode and the \texttt{Iterate} routine is called -to perform \texttt{mgridSweeps} sweeps with the chosen multigrid cycle. If successful, the \texttt{mgridLsgVec} vector contains the solution. - -\subsection{\muelu as preconditioner for \aztecoo} -Commonly, multigrid methods are used as preconditioners for iterative linear solvers. Here, we show how to use the \texttt{MueLu::Hierarchy} as preconditioner within an \aztecoo solver (using \epetra). -After an \epetra solution vector has been created by -\lstinputlisting[firstline=2]{laplace2d.cpp_14.fragment} -the following code can be used to apply the \muelu hierarchy as preconditioner within the \aztecoo CG solver -\lstinputlisting[firstline=2]{laplace2d.cpp_16.fragment} -Basically, the \muelu hierarchy is put into an \texttt{MueLu::EpetraOperator} object, which implements the \epetra interface for preconditioners. -With the \texttt{SetPrecOperator} routine from the \aztecoo solver the \texttt{MueLu::EpetraOperator} object then is defined as preconditioner. - -\subsection{\muelu as preconditioner for \belos} -\label{sec:muelu_belospreconditioner} -%% common part - -\belos is the successor package of \aztecoo for linear solvers in \trilinos and works both for \epetra and \tpetra. Here we demonstrate how to use \muelu as preconditioner for \belos solvers using \xpetra. -First, we have to declare objects for the solution vector and the right hand side vector in \xpetra. The following code just uses a random vector for the initial guess and solution variable. -\printCppListing{ScalingTest.cpp_24.fragment} - -In the following we demonstrate how to use the \muelu hierarchy as preconditioner within a \belos solver. There are special wrapper objects for wrapping the \xpetra matrix and the \muelu hierarchy to \belos compatible objects. These can be used to define a linear problem for use with \belos. -\printCppListing{ScalingTest.cpp_26.fragment} - -Then, one can set up the \belos solver. For a \belos GMRES solver one uses -\printCppListing{ScalingTest.cpp_28.fragment} -Finally, we can solve the linear system using \belos with the \muelu multigrid preconditioner (left-preconditioning) by calling -\printCppListing{ScalingTest.cpp_30.fragment} -and perform some convergence checks -\printCppListing{ScalingTest.cpp_32.fragment} - -\section{Full example} - -The reader may refer to \texttt{laplace2d.cpp} for a working example to study the source code. This demonstration program has some more features that are not discussed in this tutorial. - -\begin{exercise} -Compile the example in \texttt{laplace2d.cpp} and then run the program in parallel using two processors - \begin{verbatim} - mpirun -np 2 ./MueLu_tutorial_laplace2d.exe --help - \end{verbatim} - Study the screen output and try to run the example with an XML file as input for the multigrid setup. -\end{exercise} -\begin{exercise} -Create large scale examples using the \verb|nx| and \verb|ny| parameters for a finer mesh. Choose reasonable numbers for \verb|nx| and \verb|ny| for your machine and make use of your knowledge about \muelu for generating efficient preconditioners. -\end{exercise} - -\chapter{ML ParameterList interpreter} - -\section{Backwards compatibility} -\ml \cite{mlguide} is the predecessor multigrid package of \muelu in \trilinos and widely used in the community for smoothed aggregation multigrid methods. \ml is implemented in C and known for its good performance properties. However, the disadvantage is that \ml is harder to adapt to new applications and non-standard problems. Furthermore, \ml uses its own internal data structure and is somewhat limited to the use with \epetra objects only. In contrast, \muelu provides a fully flexible multigrid framework which is designed to be adapted to any kind of new application with non-standard requirements. Furthermore, it is based on \xpetra and therefore can be used both with \epetra or \tpetra. Nevertheless, it is an important point to provide some kind of backwards compatibility to allow \ml users to easily migrate to \muelu (or make experiments with \muelu without having to write to much new code). - -In this tutorial we present the \texttt{MueLu::MLParameterListInterpreter} which provides support for the most important \ml parameters to be used with \muelu. - -\section{C++ part} - -\subsection{Preparations} -In order to use \muelu (instead or aside of \ml) you first have to add it to your application. Please refer to the \muelu user guide for information about compilation and linking (see \cite{Mue}). Basically, if your application is already working with \ml you should only need to compile and install \muelu and make sure that the \muelu libraries are found by the linker. - -\subsection{C++ interface} - - -In the following we assume that the linear operator $A$ is available as \verb|RCP A|. - -Then we create a parameter list and fill it with \ml parameters. Please refer to the \ml guide \cite{mlguide} for a complete list of available parameters. -\printCppListingSkipLine{MLParameterList.cpp_6.fragment} - -\begin{mycomment} -Be aware that the \verb|MLParameterListInterpreter| does not support all \ml parameters but only the most important ones (e.g., smoothers, transfer operators, rebalancing, ...). There is, e.g., no support for the Maxwell specific enhancements in \ml. -\end{mycomment} - -Instead of defining the \ml parameters by hand in the ParameterList you can also read in XML files with \ml parameters using -\printCppListingSkipLine{MLParameterList.cpp_4.fragment} - -Next, you create a \verb|MLParameterListInterpreter| object using the parameters and create a new \verb|MueLu::Hierarchy| from it. -\printCppListingSkipLine{MLParameterList.cpp_8.fragment} - -Of course, we have to provide all necessary information for the multigrid setup routine. This does not only include the fine level operator but also the set of near null space vectors. Assuming that \verb|numPDEs| stores the number of equations (and near null space vectors) the following code allows to produce piecewise constant standard near null space vectors (which should be valid for many PDE discretizations). -\printCppListingSkipLine{MLParameterList.cpp_10.fragment} - -Then we just feed in the information to the finest level -\printCppListingSkipLine{MLParameterList.cpp_11.fragment} - -Finally we call the \verb|Setup| routine which actually builds the multigrid hierarchy. -\printCppListingSkipLine{MLParameterList.cpp_13.fragment} - -Once we have the multigrid hierarchy set up we can use it the same way as described in \S\ref{sec:iterationphase}. - -\begin{exercise} -Study the source code of \texttt{../src/MLParameterList.cpp} and compile it. Run the executable \verb|MueLu_tutorial_MLParameterList.exe| with the \verb|--help| command line parameter to get an overview of all available command line parameters. Run the example using -\begin{verbatim} -./MueLu_tutorial_MLParameterList.exe --ml=1 --muelu=0 - --xml=xml/ml_ParameterList.xml --linAlgebra=Epetra -\end{verbatim} -and study the \ml output. Compare the output and results when switching to \muelu using the same input file -\begin{verbatim} -./MueLu_tutorial_MLParameterList.exe --ml=0 --muelu=1 - --xml=xml/ml_ParameterList.xml --linAlgebra=Epetra -\end{verbatim} -\end{exercise} - -\begin{exercise} -Play around with the parameters from \verb|MueLu_tutorial_MLParameterList.exe|. Change, e.g., the problem type to a 2D Laplace problem (\verb|--matrixType=Laplace2D|) and adapt the \verb|--nx| and \verb|--ny| parameters accordingly. -Try to run both \ml and \muelu and compare the results. Do you find significant differences? -\end{exercise} - - - - -% \begin{tikzpicture}[>=latex',scale=0.24] -% \tikzstyle{nodestyle} = [draw, shape=rectangle, inner sep=1pt, fill=red!20, font=\tiny] -% \tikzstyle{edgestyle} = [draw, font=\tiny] -% -%\begin{dot2tex}[dot,tikz,styleonly,codeonly] -%digraph G { -%size="7.5,7.5"; -%d2ttikzedgelabels = true; -%{ -%node [shape=plaintext, fontsize=16]; -%edge [style=invisible]; -%l0 -> l1 -> l2 -> l3 -> l4 -> l5 -> l6 -> l7 -> l8 -> l9 -> l10 -> l11 -> l12 -> l13 -> l14 -> l15; -%} -%node[style="nodestyle"]; -%edge[style="edgestyle"]; -%0 [label="MueLu::CoarseMapFactory"]; -%1 [label="MueLu::TentativePFactory"]; -%2 [label="MueLu::CoordinatesTransferFactory"]; -%3 [label="MueLu::ZoltanInterface"]; -%4 [label="MueLu::RAPFactory"]; -%5 [label="MueLu::TogglePFactory"]; -%6 [label="MueLu::ToggleCoordinatesTransferFactory"]; -%7 [label="MueLu::SaPFactory"]; -%8 [label="MueLu::RebalanceTransferFactory"]; -%9 [label="MueLu::SemiCoarsenPFactory"]; -%10 [label="MueLu::NoFactory"]; -%11 [label="MueLu::RebalanceAcFactory"]; -%12 [label="MueLu::CoalesceDropFactory"]; -%13 [label="MueLu::AmalgamationFactory"]; -%14 [label="MueLu::UncoupledAggregationFactory"]; -%16 [label="MueLu::TransPFactory"]; -%17 [label="MueLu::RepartitionFactory"]; -%18 [label="MueLu::LineDetectionFactory"]; -%19 [label="MueLu::TransPFactory"]; -% -%{rank = same; l1; 13} -%{rank = same; l2; 12} -%{rank = same; l3; 14} -%{rank = same; l4; 18; 1} -%{rank = same; l5; 9; 7} -%{rank = same; l6; 5; 19} -%{rank = same; l7; 13} -%{rank = same; l8; 2} -%{rank = same; l9; 6;4} -%{rank = same; l10; 3} -%{rank = same; l11; 17} -%{rank = same; l12; 8; 11} -% -%0->8 [color=red, label=Nullspace]; -%0->14 [color=red, label=Aggregates]; -%1->0 [color=red, label=CoarseMap]; -%1->8 [color=red, label=Nullspace]; -%1->11 [color=red, label=A]; -%1->13 [color=red, label=UnAmalgamationInfo]; -%1->14 [color=red, label=Aggregates]; -%2->0 [color=red, label=CoarseMap]; -%2->8 [color=red, label=Coordinates]; -%2->14 [color=red, label=Aggregates]; -%4->11 [color=red, label=A]; -%5->10 [color=red, label=NumZLayers]; -%7->11 [color=red, label=A]; -%8->17 [color=red, label=Importer]; -%9->8 [color=red, label=Nullspace]; -%9->11 [color=red, label=A]; -%9->18 [color=red, label=LineDetection_VertLineIds]; -%10->8 [color=red, label=P]; -%10->11 [color=red, label=A]; -%10->19 [color=red, label=R]; -%11->17 [color=red, label=Importer]; -%12->11 [color=red, label=A]; -%12->13 [color=red, label=UnAmalgamationInfo]; -%13->11 [color=red, label=A]; -%14->12 [color=red, label="Graph"]; -%} -%\end{dot2tex} -% \end{tikzpicture} - - -\appendix -\part{Appendix} - -\chapter{Virtual box image} - -This chapter discusses the basics of the virtual box image that comes with this tutorial to allow the user to follow above explanations and do its own experiments with \muelu and \trilinos. A virtual machine has the advantage that it is rather easy to set up for a user. Even though compiling and installing got easier the last years by using a cmake based build system it is still a nightmare for not so experienced users. The virtual machine runs both on Linux and Windows as host and brings all the necessary tools for a quick start to \muelu. - -\section{Preparations} - -To use the virtual machine you basically have to perform the following steps. - -\begin{enumerate} -\item Install \verb|VirtualBox| on your host machine. You can download it from \verb|www.virtualbox.org|. -\item Download the \verb|MueLu_Tutorial.ova| virtual machine. The image file has 4 GB. -\item Run \verb|VirtualBox| and import the \verb|MueLu_Tutorial.ova| machine. -\begin{center}\includegraphics[width=0.8\textwidth]{pics/installation_1.png} \end{center} -Then, check and adapt the settings of the virtual machine. -\begin{center}\includegraphics[width=0.8\textwidth]{pics/installation_2.png} \end{center} -In general, one processor should be enough. But if you want to make some more reasonable tests with parallel multigrid you should increase the number of processors accordingly. -Click import, to import the virtual machine. -\item With a click on the start button the virtual machine is booting. -\end{enumerate} - -\section{First steps} - -\subsection{Login and setup} - -Once the virtual machine is started you first have to login. - -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_1.png} \end{center} - -The login data is: -\begin{center} -\begin{tabular}{ll} -Username: & muelu \\ -Password: & sandia -\end{tabular} -\end{center} - -\begin{mycomment} -You only need to enter the password in above screen. -\end{mycomment} - -After the login you should see the following desktop. -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_2.png} \end{center} - -First, you should adapt the language settings and the keyboard layout. You can switch the keyboard layout by clicking on the logo in the lower right corner. A right click on the logo allows you to change more details -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_3.png} \end{center} - -Then you are ready to go with the tutorial. - -\subsection{\muelu tutorial} - -Open the tutorial with \verb|evince| as pdf viewer. To open \verb|evince| you can either use the shortcut in the lower left corner of your desktop or press \Alt+\keystroke{F2} to open the \verb|Run| dialog and enter \verb|evince|. Load the \verb|muelu_tutorial.pdf| file in the \verb|tutorial| folder of your home directory. - -To open a terminal you have several option. Either use the shortcut button in the lower left corner. Alternatively you can open the \verb|Run| dialog (\Alt+\keystroke{F2}) and enter \verb|lxterminal|. As a third alternative you can just press \Ctrl+\Alt+\keystroke{T}. In the terminal, change to the \verb|tutorial| folder by entering \verb|cd tutorial|. Therein you can find the \verb|hands-on.py| script which is used throughout the whole \muelu tutorial. - -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_4.png} \end{center} - -\begin{mycomment} -Use the \keystroke{Win}+\LArrow and \keystroke{Win}+\RArrow keys to arrange the windows in a split view as shown above. -There are other useful keyboard shortcuts such as \keystroke{Win}+\keystroke{R} to open the \verb|Run| dialog or \keystroke{Win}+\keystroke{E} to open the file manager. -\end{mycomment} - -When plotting the results with gnuplot from within the \verb|hands-on.py| script it might be useful to make the plot windows to stay on top. - -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_5.png} \end{center} - -The virtual machine has all software installed that you need to follow the tutorial (including \verb|paraview|) - -\begin{center}\includegraphics[width=0.8\textwidth]{pics/lubuntu_6.png} \end{center} - -\section{Software} - -The virtual machine is based on a minimal installation of \textbf{Lubuntu 14.04}. The image file has 4 GB with about 250 MB free for the user. - -The following software is pre-installed: - -\begin{tabular}{ll} -Web-browser: & midori \\ -PDF-viewer: & evince \\ -Terminal: & LXTerminal\\ -Visualization: & paraview, gnuplot \\ -File manager: & PCManFM \\ -Analysis: & FreeMat v4.0 \\ -& GNU octave 3.8.1\\ -\end{tabular} - -The following system libraries are installed: - -\begin{tabular}{ll} -Trilinos: & Trilinos (developer branch: Oct 1, 2014) \\ -Direct solver: & SuperLU 4.3 \\ -VTK: & VTK 5.8 \\ -MPI: & OpenMPI 1.6.5 \\ -Python: & Python 2.7.6 \\ -Compiler: & gcc 4.8.2 -\end{tabular} - -\lstset{% - float=hbp,% - basicstyle=\ttfamily\small, % - identifierstyle=\color{colIdentifier}, % - keywordstyle=\color{colKeys}, % - stringstyle=\color{colString}, % - commentstyle=\color{colComments}, % - columns=flexible, % - tabsize=2, % - frame=none, % - extendedchars=true, % - showspaces=false, % - showstringspaces=false, % - numbers=none, % - breaklines=true, % - backgroundcolor=, % - breakautoindent=true, % - captionpos=b% -} - -\chapter{Error messages} - -\section{Syntax errors} - -\subsection{Parser errors} -\begin{cBox} -\begin{lstlisting} -XML parse error at line 27: file ended before closing element 'ParameterList' from line 1 -\end{lstlisting} -\end{cBox} -Forgot to close the \verb|| section that is opened in line 1 of the xml file. - -\begin{cBox} -\begin{lstlisting} -XML parse error at line 15: start element not well-formed: invalid character -\end{lstlisting} -\end{cBox} -Check line 15 for an invalid xml format. The reason can be, e.g., a missing closing character \verb|/>| for a parameter. - -\subsection{Parameter list errors} -\begin{cBox} -\begin{lstlisting} -All child nodes of a ParameterList must have a name attribute! -\end{lstlisting} -\end{cBox} -You probably forgot to add a name attribute in one or more elements of your xml file, that is you used, e.g., -\begin{lstlisting} - -\end{lstlisting} -instead of -\begin{lstlisting} - -\end{lstlisting} - - - -\begin{cBox} -\begin{lstlisting} -Error, the parameter {name="smoother: type",type="int",value="0"} -in the parameter (sub)list "ANONYMOUS" -exists in the list of valid parameters but has the wrong type. - -The correct type is "string". -\end{lstlisting} -\end{cBox} -Use the correct (proposed) value type for the given parameter name, i.e., -\begin{lstlisting} - -\end{lstlisting} -instead of -\begin{lstlisting} - -\end{lstlisting} - -\section{\muelu errors} - -\subsection{General errors} - -\begin{cBox} -\begin{lstlisting} -Throw test that evaluated to true: s_.is_null() - -Smoother for Epetra was not constructed - during request for data " PreSmoother" on level 0 by factory NoFactory -\end{lstlisting} -\end{cBox} -Failed to create a level smoother. Check the smoother blocks in your xml file. -The error occurs, e.g., if there is a typing error in the \verb|smoother: type| parameter. -For example -\begin{lstlisting} - -\end{lstlisting} -would trigger above error since the smoother type should be \verb|RELAXATION|. - -\begin{cBox} -\begin{lstlisting} -IFPACK ERROR -2, ifpack/src/Ifpack_PointRelaxation.cpp, line 117 -\end{lstlisting} -\end{cBox} -Errors like this indicate that it is a problem within the \verb|smoother: params| section. Most likely a (relaxation) smoother is requested which is not existing (e.g., \verb|Jadobi| instead of \verb|Jacobi|). - -\begin{cBox} -\begin{lstlisting} -The parameter name "smother: type" is not valid. Did you mean "smoother: type"? -\end{lstlisting} -\end{cBox} -There is a typo in your parameter list. Locate the parameter and fix it (using the suggestions, that come with the error message). - -\begin{cBox} -\begin{lstlisting} -Throw test that evaluated to true: maxNodesPerAggregate < minNodesPerAggregate -\end{lstlisting} -\end{cBox} -Choose the \verb|aggregation: min agg size| parameter to be smallter than the \verb|aggregation: max agg size| parameter for the aggregation routine. - -\subsection{Advanced XML file format} - -\begin{cBox} -\begin{lstlisting} -Throw test that evaluated to true: bIsZeroNSColumn == true - -MueLu::TentativePFactory::MakeTentative: fine level NS part has a zero column -\end{lstlisting} -\end{cBox} -This error indicates that there is a problem with the provided near null space vectors. There are different reasons which can trigger this problem: -\begin{itemize} -\item The near null space vectors are not valid (containing zeros, wrong ordering of internal degrees of freedom). Please check your near null space vectors. Maybe there is an empty vector or the ordering of degrees of freedom for the linear operator does not match with the ordering of the near null space vectors. -\item The near null space vectors are correct but used in a wrong way (e.g., a wrong number of degrees of freedom). Check the screen output for wrong block dimensions (CoalesceDropFactory). -\item There is a problem with the aggregates. Validate the screen output and look for unusual (e.g. very small or empty) aggregates. -\end{itemize} - - -\begin{cBox} -\begin{lstlisting} -Throw test that evaluated to true: factoryManager_ == null - -MueLu::Level(0)::GetFactory(Aggregates, 0): No FactoryManager -\end{lstlisting} -\end{cBox} -This is a typical error when the dependency tree is screwed up. If aggregates and/or transfer operators are involved usually one has forgotten some entries in the \verb|Hierarchy| sublist of the extended XML file format for the internal factory managers. These errors can be quite tricky to fix. In general it is a good idea to start with a working XML file and extend it step by step if possible. -The following general strategies may help to track down the problem: -\begin{itemize} -\item Run the problem with \verb|verbosity=high| to get as much screen output as possible. Check for unusual screen output (such as \verb|Nullspace factory|. -\item Try to generate a graphical dependency tree as described in \S\ref{sec:dependencytrees}. -\end{itemize} - -For example, above error is caused by the following XML file - -\lstset{% - float=hbp,% - basicstyle=\ttfamily\small, % - identifierstyle=\color{colIdentifier}, % - keywordstyle=\color{colKeys}, % - stringstyle=\color{colString}, % - commentstyle=\color{colComments}, % - columns=flexible, % - tabsize=2, % - frame=single, % - extendedchars=true, % - showspaces=false, % - showstringspaces=false, % - numbers=left, % - numberstyle=\tiny, % - breaklines=true, % - backgroundcolor=\color{ocre!20!white}, % - breakautoindent=true, % - captionpos=b% -} -\begin{lstlisting} - - - - - - - - - - - - - - -\end{lstlisting} - -\lstset{% - float=hbp,% - basicstyle=\ttfamily\small, % - identifierstyle=\color{colIdentifier}, % - keywordstyle=\color{colKeys}, % - stringstyle=\color{colString}, % - commentstyle=\color{colComments}, % - columns=flexible, % - tabsize=2, % - frame=none, % - extendedchars=true, % - showspaces=false, % - showstringspaces=false, % - numbers=none, % - breaklines=true, % - backgroundcolor=, % - breakautoindent=true, % - captionpos=b% -} - -Looking at the error output it seems to be a problem with aggregates. However, in the XML file no special aggregation factory has been declared. The only factory which has been introduced was a tentative prolongation factory for generating unsmoothed transfer operators. Therefore, one should start digging into the details of the \verb|TentativePFactory| to find out that the unsmoothed transfer operator factory is responsible both for creating the unsmoothed prolongator and the coarse level null space information. When looking at the screen output one should find that the last called/generated factory is a \verb|NullspaceFactory| which can also be a hint that the problem is the null space. - -When looking at the XML file one can see that the \verb|myTentativePFact| factory has been registered to be responsible for generating the prolongator $P$, but the generating factory for the variable \verb|Nullspace| is not declared. \muelu tries to generate the default null space, but since it does not know about \verb|myTentativePFact| to be a \verb|TentativePFactory| which would already produce the needed information the calling ordering of the dependent factories (e.g., aggregation) gets mixed up. - -Note that the \verb|TentativePFactory| is special. If you declare an explicit instance of the \verb|TentativePFactory| you always have to register it for generating the \verb|Nullspace| variable, too. Only in very special cases this would not be necessary. - -\begin{mycomment} -This is a general rule: if a factory generates more than one output variables, always make sure that all these output variables are properly defined in the \verb|FactoryManager| list (or \verb|Hierarchy| sublist in the xml files, respectively). -\end{mycomment} - -To solve above problem there are two possibilities: -\begin{itemize} -\item Following above comment, just register \verb|myTentativePFact| for generating \verb|Nullspace|. That is, just comment in the corresponding line in above xml file. -\item Alternatively you can register \verb|myTentativePFact| for generating \verb|Ptent| (and \verb|P|). This way you mark the \verb|myTentativePFact| object to be used for generating the unsmoothed transfer operators (and state that they shall be used for the final prolongation operators). \muelu is smart enough to understand that the factory responsible for generating \verb|Ptent| is also supposed to generate the null space vectors. -\end{itemize} - - -\begin{thebibliography}{99} -\bibitem{briggs} W.L. Briggs, S.F. McCormick and others, A multigrid tutorial, SIAM, 2000. -\bibitem{Mue} A. Prokopenko, J.J. Hu, T.A. Wiesner, C.M. Siefert and R.S. Tuminaro \emph{MueLu User's Guide 1.0 (Trilinos Version 11.12)}, SAND2014-18874, 2014 -\bibitem{vanek1996} Vanek, P. and Mandel, J. and Brezina, M. Algebraic Multigrid by Smoothed Aggregation for Second and Fourth Order Elliptic Problems, Computing, 1996, 56, p. 179--196 -\bibitem{sala2008} Sala, M. and Tuminaro, R. S., A new Petrov-Galerkin Smoothed Aggregation Preconditioner for nonsymmetric Linear Systems, SIAM J. Sci. Comput., 2008, 31, p. 143--166 -\bibitem{wiesner2013} Wiesner, T. A., Tuminaro, R. S., Wall, W. A. and Gee, M. W., Multigrid transfers for nonsymmetric systems based on Schur complements and Galerkin projections., Numer. Linear Algebra Appl., 2013, doi: 10.1002/nla.1889 -\bibitem{wiesner2014} Wiesner, T. A., Flexible Aggregation-based Algebraic Multigrid Methods for Contact and Flow Problems., PhD thesis, Technische Universit\"at M\"unchen, 2014 -\bibitem{mlguide} M.W. Gee, C.M. Siefert, J.J. Hu, R.S. Tuminaro and M.G. Sala, ML 5.0 Smoothed Aggregation User's Guide, Sandia National Laboratories, 2006, SAND2006-2649 -\end{thebibliography} - -\end{document} diff --git a/packages/muelu/doc/Tutorial/tex/pics/1level_1000jac09.png b/packages/muelu/doc/Tutorial/tex/pics/1level_1000jac09.png deleted file mode 100644 index c09c927384d1..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/1level_1000jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/1level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/1level_100jac09.png deleted file mode 100644 index ba6a670334a8..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/1level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/1level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/1level_10jac09.png deleted file mode 100644 index b837220b19bd..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/1level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/1level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/1level_1jac09.png deleted file mode 100644 index 370bfffa7d68..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/1level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/2level_1000jac09.png b/packages/muelu/doc/Tutorial/tex/pics/2level_1000jac09.png deleted file mode 100644 index fc46f8fc5aad..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/2level_1000jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/2level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/2level_100jac09.png deleted file mode 100644 index 606dc3ef769b..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/2level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/2level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/2level_10jac09.png deleted file mode 100644 index 8edeb6844aeb..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/2level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/2level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/2level_1jac09.png deleted file mode 100644 index 962ebcecc560..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/2level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/3level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/3level_100jac09.png deleted file mode 100644 index ead93f7ab77c..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/3level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/3level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/3level_10jac09.png deleted file mode 100644 index 87d3181f605f..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/3level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/3level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/3level_1jac09.png deleted file mode 100644 index 9c4e844c7159..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/3level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_100jac09.png deleted file mode 100644 index 4176770ce95e..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_10jac09.png deleted file mode 100644 index 1ca2993a1291..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_1jac09.png deleted file mode 100644 index 5db88dfc2165..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_1level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_100jac09.png deleted file mode 100644 index 0c60da141894..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_10jac09.png deleted file mode 100644 index 40b380fbd7d2..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_1jac09.png deleted file mode 100644 index 1a348596452a..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_2level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_100jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_100jac09.png deleted file mode 100644 index c2c9ca71aef6..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_100jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_10jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_10jac09.png deleted file mode 100644 index e731b575d46a..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_10jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_1jac09.png b/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_1jac09.png deleted file mode 100644 index 6354d930ecb1..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/5sweeps_3level_1jac09.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/aggsNonSymm.png b/packages/muelu/doc/Tutorial/tex/pics/aggsNonSymm.png deleted file mode 100644 index d92d70abc30d..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/aggsNonSymm.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/aggsSymm.png b/packages/muelu/doc/Tutorial/tex/pics/aggsSymm.png deleted file mode 100644 index deca4eff8353..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/aggsSymm.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/aggsSymmCoupled.png b/packages/muelu/doc/Tutorial/tex/pics/aggsSymmCoupled.png deleted file mode 100644 index 5d79ef10c012..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/aggsSymmCoupled.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/aggsSymmReb.png b/packages/muelu/doc/Tutorial/tex/pics/aggsSymmReb.png deleted file mode 100644 index 3f9660ac90f6..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/aggsSymmReb.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/background.pdf b/packages/muelu/doc/Tutorial/tex/pics/background.pdf deleted file mode 100644 index f4186b4ec22e..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/background.pdf and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/dep_graph.png b/packages/muelu/doc/Tutorial/tex/pics/dep_graph.png deleted file mode 100644 index af62eea78dce..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/dep_graph.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/installation_1.png b/packages/muelu/doc/Tutorial/tex/pics/installation_1.png deleted file mode 100644 index 1fcfb5162ce1..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/installation_1.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/installation_2.png b/packages/muelu/doc/Tutorial/tex/pics/installation_2.png deleted file mode 100644 index 5c68fb8d9e77..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/installation_2.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_1.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_1.png deleted file mode 100644 index a8cef3f268d0..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_1.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_2.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_2.png deleted file mode 100644 index e6d528f5d38c..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_2.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_3.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_3.png deleted file mode 100644 index 72db46f1eaf9..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_3.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_4.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_4.png deleted file mode 100644 index 9d805f2fa227..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_4.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_5.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_5.png deleted file mode 100644 index 0f5434d6dbfa..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_5.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_6.png b/packages/muelu/doc/Tutorial/tex/pics/lubuntu_6.png deleted file mode 100644 index 4532655704f9..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/lubuntu_6.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4al1.png b/packages/muelu/doc/Tutorial/tex/pics/s4al1.png deleted file mode 100644 index 09744ec44d7a..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4al1.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4al2.png b/packages/muelu/doc/Tutorial/tex/pics/s4al2.png deleted file mode 100644 index 5d90273df3bf..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4al2.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4al3.png b/packages/muelu/doc/Tutorial/tex/pics/s4al3.png deleted file mode 100644 index 47619a09e818..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4al3.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4bl1.png b/packages/muelu/doc/Tutorial/tex/pics/s4bl1.png deleted file mode 100644 index 4b15b4936c98..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4bl1.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4bl2.png b/packages/muelu/doc/Tutorial/tex/pics/s4bl2.png deleted file mode 100644 index a484a089af0e..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4bl2.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/s4bl3.png b/packages/muelu/doc/Tutorial/tex/pics/s4bl3.png deleted file mode 100644 index 96cb2146c9f0..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/s4bl3.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_1.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_1.png deleted file mode 100644 index 2e9aecac8070..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_1.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_10.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_10.png deleted file mode 100644 index bc0d392757c1..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_10.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_11.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_11.png deleted file mode 100644 index 5a94b894a7d8..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_11.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_12.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_12.png deleted file mode 100644 index a78e2d2771d8..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_12.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_13.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_13.png deleted file mode 100644 index aa93b003dd43..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_13.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_14.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_14.png deleted file mode 100644 index 932e84c8bbbc..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_14.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_15.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_15.png deleted file mode 100644 index 60f41213be52..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_15.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_16.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_16.png deleted file mode 100644 index bb986e7d93dd..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_16.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_17.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_17.png deleted file mode 100644 index ab6ec8817536..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_17.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_18.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_18.png deleted file mode 100644 index 05aeef0e37e0..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_18.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_2.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_2.png deleted file mode 100644 index 54a2ce92e289..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_2.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_3.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_3.png deleted file mode 100644 index ed231d51025b..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_3.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_4.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_4.png deleted file mode 100644 index 7f27ca957625..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_4.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_5.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_5.png deleted file mode 100644 index 961763bf5aac..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_5.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_6.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_6.png deleted file mode 100644 index c37e73059618..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_6.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_7.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_7.png deleted file mode 100644 index 3a5d21439b45..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_7.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_8.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_8.png deleted file mode 100644 index 020801406fb7..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_8.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/pics/tut1_9.png b/packages/muelu/doc/Tutorial/tex/pics/tut1_9.png deleted file mode 100644 index 32bab8fc2344..000000000000 Binary files a/packages/muelu/doc/Tutorial/tex/pics/tut1_9.png and /dev/null differ diff --git a/packages/muelu/doc/Tutorial/tex/prepareTexTutorial.py b/packages/muelu/doc/Tutorial/tex/prepareTexTutorial.py deleted file mode 100755 index 9588cf355fbd..000000000000 --- a/packages/muelu/doc/Tutorial/tex/prepareTexTutorial.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python -import os -import sys -import math -import subprocess - -def getstatusoutput(cmd): - """Return (status, output) of executing cmd in a shell.""" - pipe = os.popen(cmd + ' 2>&1', 'r') - text = pipe.read() - sts = pipe.close() - if sts is None: sts = 0 - if text[-1:] == '\n': text = text[:-1] - return sts, text - - -def deleteDir(path): - """deletes the path entirely""" - cmd = "rm -rf "+path - result = getstatusoutput(cmd) - if(result[0]!=0): - raise RuntimeError(result[1]) - -def createDir(path): - """deletes the path entirely""" - cmd = "mkdir "+path - result = getstatusoutput(cmd) - if(result[0]!=0): - raise RuntimeError(result[1]) - -def runCommand(cmd): - """deletes the path entirely""" - result = getstatusoutput(cmd) - #if(result[0]!=0): - # raise RuntimeError(result[1]) - return result[1] - -def clearWindow(): - os.system('cls' if os.name == 'nt' else 'clear') - -def waitForKey(): - os.system('read -s -n 1 -p "Press any key to continue..."') - print - -def is_number(s): - try: - float(s) - return True - except ValueError: - return False - -# some colors -class bcolors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - OKDARKGREEN = '\033[32m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - -def disable(self): - self.HEADER = '' - self.OKBLUE = '' - self.OKGREEN = '' - self.OKDARKGREEN = '' - self.WARNING = '' - self.FAIL = '' - self.ENDC = '' - -def print_part_output(filenum,filenameformat,line): - filename = filenameformat.replace('#',str(filenum) ) - fout=open(filename,'w') - fout.write(line) - fout.close - -def splitfileintofragments(inputfile,splittingtxt): - - filenameformat = inputfile + '_#.fragment' - file = open( inputfile ) - lines=file.read().split(splittingtxt) - - bLeadingLines = True - - for i in range(0,len( lines ) ): - line = lines[i] - if not line.strip(): - continue - else: - print_part_output( i+1 , filenameformat, line ) - - # move fragment files to this folder - runCommand("mv ../src/*.fragment .") - - -def runXMLfile(xmlfile, executable): - # run simple easy input xml deck test (10 multigrid levels) - cmd = "mpirun -np 2 ../src/"+executable+" --xml=../src/xml/"+xmlfile+ ".xml > "+xmlfile+".txt" - runCommand(cmd) - if os.path.isfile(xmlfile+".txt") and os.access(xmlfile+".txt", os.R_OK): - splitfileintofragments(xmlfile+'.txt','========================================================') - splitfileintofragments(xmlfile+'.txt_3.fragment','--------------------------------------------------------------------------------') - print xmlfile + bcolors.OKGREEN+" OK"+bcolors.ENDC - #runCommand("rm s1_easy.txt") - else: - print xmlfile + bcolors.FAIL+" Failure"+bcolors.ENDC - bAllDataPrepared = False # some data are missing - runCommand("rm " + xmlfile + ".txt") - -################################# MAIN routine -if __name__ == '__main__': - - bAllDataPrepared = True # set to false if something is missing to generate pdf file - - print bcolors.OKDARKGREEN + "Prepare files... " + bcolors.ENDC - - if not os.path.isfile("../src/MueLu_Challenge_XML.exe") or not os.access("../src/MueLu_Challenge_XML.exe", os.R_OK): - print bcolors.FAIL+"Failure 1: Could not copy executables from trilinos repository"+bcolors.ENDC - print "You have to run the script in the binary folder. Make sure that the executables in the doc/Tutorial/src folder are built." - bAllDataPrepared = False # some data are missing - - if not os.path.isfile("../src/MueLu_tutorial_laplace2d.exe") or not os.access("../src/MueLu_tutorial_laplace2d.exe", os.R_OK): - print bcolors.FAIL+"Failure 2: Could not copy executables from trilinos repository"+bcolors.ENDC - bAllDataPrepared = False # some data are missing - - if not os.path.isfile("../src/MueLu_tutorial_recirc2d.exe") or not os.access("../src/MueLu_tutorial_recirc2d.exe", os.R_OK): - print bcolors.FAIL+"Failure 3: Could not copy executables from trilinos repository"+bcolors.ENDC - bAllDataPrepared = False # some data are missing - - # here starts the preparation script - - #print bcolors.OKDARKGREEN + "Extract version number from git repository... " + bcolors.ENDC - ## create version file - cmd = "rm version.txt" - runCommand(cmd) - #cmd = "git log --pretty=format:'%h' -n 1 > version.txt" - #runCommand(cmd) - cmd = "echo 'unknown version' > version.txt" - runCommand(cmd) - - print bcolors.OKDARKGREEN + "Split source files in src folder for inclusion in pdf... " + bcolors.ENDC - # split cpp file for first example - splitfileintofragments('../src/laplace2d.cpp','// TUTORIALSPLIT ===========================================================') - - # split cpp file for ML interface example - splitfileintofragments('../src/MLParameterList.cpp','// TUTORIALSPLIT ===========================================================') - - splitfileintofragments('../src/ScalingTestParamList.cpp','//============================================ SPLIT') - splitfileintofragments('../src/ScalingTest.cpp','// USER GUIDE ') - - print bcolors.OKDARKGREEN + "Run test examples to include results in pdf... " + bcolors.ENDC - # run simple easy input xml deck test - cmd = "mpirun -np 2 ../src/MueLu_tutorial_laplace2d.exe --nx=50 --ny=50 --xml=../src/xml/s1_easy.xml > s1_easy.txt" - runCommand(cmd) - - if os.path.isfile("s1_easy.txt") and os.access("s1_easy.txt", os.R_OK): - splitfileintofragments('s1_easy.txt','========================================================') - splitfileintofragments('s1_easy.txt_3.fragment','--------------------------------------------------------------------------------') - print "s1_easy.txt" + bcolors.OKGREEN+" OK"+bcolors.ENDC - #runCommand("rm s1_easy.txt") - else: - print "s1_easy.txt" + bcolors.FAIL+" Failure"+bcolors.ENDC - bAllDataPrepared = False # some data are missing - runCommand("rm s1_easy.txt") - - runXMLfile("s1_easy_10levels", "MueLu_tutorial_laplace2d.exe") - runXMLfile("s1_easy_3levels_unsmoothed", "MueLu_tutorial_laplace2d.exe") - runXMLfile("s1_easy_3levels_smoothed", "MueLu_tutorial_laplace2d.exe") - - runXMLfile("s1_easy_jacobi", "MueLu_tutorial_laplace2d.exe") - runXMLfile("s1_easy_jacobi2", "MueLu_tutorial_laplace2d.exe") - runXMLfile("s1_easy_exercise", "MueLu_tutorial_laplace2d.exe") - - runXMLfile("s2_adv_b", "MueLu_tutorial_laplace2d.exe") - runXMLfile("s2_adv_c", "MueLu_tutorial_laplace2d.exe") - - runXMLfile("s3a", "MueLu_tutorial_recirc2d.exe") - runXMLfile("s3b", "MueLu_tutorial_recirc2d.exe") - runXMLfile("s3b1", "MueLu_tutorial_recirc2d.exe") - runXMLfile("s3b2", "MueLu_tutorial_recirc2d.exe") - runXMLfile("s3b3", "MueLu_tutorial_recirc2d.exe") - - runXMLfile("s5a", "MueLu_tutorial_laplace2d.exe") - - # run rebalancing example - cmd = "mpirun -np 4 ../src/MueLu_tutorial_laplace2d.exe --nx=300 --ny=300 --xml=../src/xml/s5a.xml > s5a.txt" - runCommand(cmd) - if os.path.isfile("s5a.txt") and os.access("s5a.txt", os.R_OK): - splitfileintofragments('s5a.txt','========================================================') - splitfileintofragments('s5a.txt_3.fragment','--------------------------------------------------------------------------------') - print "s5a.txt " + bcolors.OKGREEN+"OK"+bcolors.ENDC - else: - print "s5a.txt " + bcolors.FAIL+"Failure"+bcolors.ENDC - bAllDataPrepared = False # some data are missing - runCommand("rm s5a.txt") - - print bcolors.OKDARKGREEN + "Run LaTeX to generate PDF... " + bcolors.ENDC - print bcolors.WARNING + "If the script stops here you can skip the step by pressing CTRL+C and run \"pdflatex main.tex\" by hand to fix the errors " + bcolors.ENDC - # generate pdf for tutorial - if bAllDataPrepared == True: - runCommand("pdflatex main.tex") - if os.path.isfile("main.pdf") and os.access("main.pdf", os.R_OK): - print bcolors.WARNING+"Success"+bcolors.ENDC - else: - print bcolors.FAIL+"Failure"+bcolors.ENDC - - else: - print bcolors.FAIL+"Cannot generate pdf file due to missing data."+bcolors.ENDC - - # clean up - print bcolors.OKDARKGREEN + "Clean up files... " + bcolors.ENDC - #runCommand("rm *.fragment *.out *.txt") - #runCommand("mv main.pdf muelu_tutorial.pdf") - - print bcolors.OKDARKGREEN + "Finished. " + bcolors.ENDC diff --git a/packages/muelu/doc/Tutorial/tex/s1_easy.txt b/packages/muelu/doc/Tutorial/tex/s1_easy.txt deleted file mode 100644 index 3adb4d23d397..000000000000 --- a/packages/muelu/doc/Tutorial/tex/s1_easy.txt +++ /dev/null @@ -1 +0,0 @@ -sh: ../src/MueLu_tutorial_laplace2d.exe: No such file or directory diff --git a/packages/muelu/doc/Tutorial/tex/version.txt b/packages/muelu/doc/Tutorial/tex/version.txt deleted file mode 100644 index 8801345759bb..000000000000 --- a/packages/muelu/doc/Tutorial/tex/version.txt +++ /dev/null @@ -1 +0,0 @@ -bc8757e \ No newline at end of file diff --git a/packages/muelu/example/ParameterList/CMakeLists.txt b/packages/muelu/example/ParameterList/CMakeLists.txt index 120eb07c3d6b..93576165d912 100644 --- a/packages/muelu/example/ParameterList/CMakeLists.txt +++ b/packages/muelu/example/ParameterList/CMakeLists.txt @@ -7,8 +7,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) # # -IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) +IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) # # MLParameterList @@ -34,17 +33,5 @@ IF(${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) # XPETRA_ADD_TEST_TPETRA(MLParameterList 1-4) ENDIF() -IF(${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - XPETRA_ADD_TEST_EPETRA(MLParameterList 1-4) - - TRIBITS_ADD_TEST( - MLParameterList - NAME MLParameterList_Repartition-Epetra - ARGS "--xml=ml_RebalancedParameterList.xml --linAlgebra=Epetra --muelu2=0" - NUM_MPI_PROCS 4 - COMM serial mpi - ) -ENDIF() - # TODO: add a test with the --xml option diff --git a/packages/muelu/example/ParameterList/MLParameterList.cpp b/packages/muelu/example/ParameterList/MLParameterList.cpp index afcc58d03679..78e2bd419414 100644 --- a/packages/muelu/example/ParameterList/MLParameterList.cpp +++ b/packages/muelu/example/ParameterList/MLParameterList.cpp @@ -15,20 +15,6 @@ #include // getParametersFromXmlFile() -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) -#include -#include -#include -#endif - -#ifdef HAVE_MUELU_AZTECOO -#include -#endif - -#ifdef HAVE_MUELU_EPETRA -#include -#endif - #include #include #include @@ -76,9 +62,6 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib lib, int arg int translatedmuelu = true; clp.setOption("muelu2", &translatedmuelu, "use muelu through XML parameter translation and ParameterListInterpreter"); int ml = true; -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) - clp.setOption("ml", &ml, "use ml"); -#endif switch (clp.parse(argc, argv)) { case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; @@ -195,134 +178,8 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib lib, int arg if (comm->getRank() == 0) std::cout << "||Residual|| = " << residualNorms << std::endl; -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AZTECOO) && !defined(HAVE_MUELU_CUDA) && !defined(HAVE_MUELU_HIP) && !defined(HAVE_MUELU_SYCL) - // TODO TAW: 4/8/2016 - // temporarely deactivate this due to runtime error on perseus: - // Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed - // if SERIAL=OFF, OPENMP=OFF, PTHREAD=ON, CUDA=OFF - // probably a fix necessary in EpetraOperator (which only supports - // SERIAL or OPENMP, but not PTHREAD of course). - - if (xpetraParameters.GetLib() == Xpetra::UseEpetra) { // TODO: should be doable with Tpetra too - - // AMG as a preconditioner - - // TODO: name mueluPrec and mlPrec not - - H->IsPreconditioner(true); - MueLu::EpetraOperator mueluPrec(H); // Wrap MueLu preconditioner into an Epetra Operator - - // - // Solve Ax = b - // - RCP eA; // duplicate code - { // TODO: simplify this - RCP xCrsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP xCrsMtx = xCrsOp->getCrsMatrix(); - RCP eCrsMtx = Teuchos::rcp_dynamic_cast(xCrsMtx, true); - eA = eCrsMtx->getEpetra_CrsMatrixNonConst(); - } - - RCP eX = rcp(new Epetra_Vector(eA->RowMap())); - RCP eB = rcp(new Epetra_Vector(eA->RowMap())); - - eX->PutScalar((Scalar)0.0); - eB->SetSeed(846930886); - eB->Random(); - - Epetra_LinearProblem eProblem(eA.get(), eX.get(), eB.get()); - - // AMG as a standalone solver - AztecOO solver(eProblem); - solver.SetPrecOperator(&mueluPrec); - solver.SetAztecOption(AZ_solver, AZ_fixed_pt); - solver.SetAztecOption(AZ_output, 1); - - solver.Iterate(nIts, 1e-10); - - { // TODO: simplify this - RCP mueluX = rcp(new Xpetra::EpetraVectorT(eX)); - RCP mueluB = rcp(new Xpetra::EpetraVectorT(eB)); - // Print relative residual norm - typename Teuchos::ScalarTraits::magnitudeType residualNorms2 = Utilities::ResidualNorm(*A, *mueluX, *mueluB)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms2 << std::endl; - } - - // TODO: AMG as a preconditioner (AZ_cg) - } -#endif // HAVE_MUELU_AZTECOO } // if (translatedmuelu) -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AZTECOO) && !defined(HAVE_MUELU_CUDA) && !defined(HAVE_MUELU_HIP) && !defined(HAVE_MUELU_SYCL) - if (ml) { - std::cout << std::endl - << std::endl - << std::endl - << std::endl - << "**** ML ml ML ml ML" << std::endl - << std::endl - << std::endl - << std::endl; - - // - // Construct a multigrid preconditioner - // - - // Multigrid Hierarchy - RCP crsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP crsMtx = crsOp->getCrsMatrix(); - RCP epetraCrsMtx = Teuchos::rcp_dynamic_cast(crsMtx, true); - RCP epetra_CrsMtx = epetraCrsMtx->getEpetra_CrsMatrix(); - - RCP eA; - { // TODO: simplify this - RCP xCrsOp = Teuchos::rcp_dynamic_cast(A, true); - RCP xCrsMtx = xCrsOp->getCrsMatrix(); - RCP eCrsMtx = Teuchos::rcp_dynamic_cast(xCrsMtx, true); - eA = eCrsMtx->getEpetra_CrsMatrixNonConst(); - } - - RCP mlPrec = rcp(new ML_Epetra::MultiLevelPreconditioner(*eA, *params)); - - // - // Solve Ax = b - // - - RCP eX = rcp(new Epetra_Vector(eA->RowMap())); - RCP eB = rcp(new Epetra_Vector(eA->RowMap())); - - eX->PutScalar((Scalar)0.0); - eB->SetSeed(846930886); - eB->Random(); - - Epetra_LinearProblem eProblem(eA.get(), eX.get(), eB.get()); - - // AMG as a standalone solver - AztecOO solver(eProblem); - solver.SetPrecOperator(mlPrec.get()); - solver.SetAztecOption(AZ_solver, AZ_fixed_pt); - solver.SetAztecOption(AZ_output, 1); - - solver.Iterate(nIts, 1e-10); - - { // TODO: simplify this - RCP mueluX = rcp(new Xpetra::EpetraVectorT(eX)); - RCP mueluB = rcp(new Xpetra::EpetraVectorT(eB)); - // Print relative residual norm - typename Teuchos::ScalarTraits::magnitudeType residualNorms = Utilities::ResidualNorm(*A, *mueluX, *mueluB)[0]; - if (comm->getRank() == 0) - std::cout << "||Residual|| = " << residualNorms << std::endl; - } - - std::cout << "Parameter list after ML run" << std::endl; - const Teuchos::ParameterList ¶msAfterML = mlPrec->GetList(); - std::cout << paramsAfterML << std::endl; - - } // if (ml) - -#endif // HAVE_MUELU_ML && HAVE_MUELU_EPETRA - success = true; } TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); @@ -356,11 +213,7 @@ int main(int argc, char *argv[]) { Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - return main_(clp, lib, argc, argv); -#else throw MueLu::Exceptions::RuntimeError("Epetra is not available"); -#endif } if (lib == Xpetra::UseTpetra) { std::cout << "Skipped tests for Tpetra. We officially only support the MLParameterListInterpreter for Epetra. It is supposed to be a transition from ML with Epetra to MueLu. Furthermore, there is only support for Epetra and not for Epetra64. That is, only GO=int allowed." << std::endl; diff --git a/packages/muelu/example/advanced/levelwrap/CMakeLists.txt b/packages/muelu/example/advanced/levelwrap/CMakeLists.txt index 54b68f47f176..925fdc2b5ee0 100644 --- a/packages/muelu/example/advanced/levelwrap/CMakeLists.txt +++ b/packages/muelu/example/advanced/levelwrap/CMakeLists.txt @@ -5,8 +5,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../test/unit_tests # Executables # -IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) +IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) @@ -27,6 +26,3 @@ INCLUDE(XpetraAddTest) IF(${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) XPETRA_ADD_TEST_TPETRA(LevelWrap 4) ENDIF() -IF(${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - XPETRA_ADD_TEST_EPETRA(LevelWrap 4) -ENDIF() diff --git a/packages/muelu/example/advanced/memory/CMakeLists.txt b/packages/muelu/example/advanced/memory/CMakeLists.txt index ba19d3a18596..077ac41aacbd 100644 --- a/packages/muelu/example/advanced/memory/CMakeLists.txt +++ b/packages/muelu/example/advanced/memory/CMakeLists.txt @@ -7,13 +7,6 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST( SOURCES MueLu_MatrixDriver.cpp ) -IF (${PACKAGE_NAME}_ENABLE_Epetra) - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Epetra1DLaplace - SOURCES Epetra1DLaplace.cpp MueLu_MemoryProfiler.cpp - ) -ENDIF() - TRIBITS_ADD_EXECUTABLE_AND_TEST( Tpetra1DLaplace SOURCES Tpetra1DLaplace.cpp MueLu_MemoryProfiler.cpp diff --git a/packages/muelu/example/advanced/memory/Epetra1DLaplace.cpp b/packages/muelu/example/advanced/memory/Epetra1DLaplace.cpp deleted file mode 100644 index cd6bfd83555a..000000000000 --- a/packages/muelu/example/advanced/memory/Epetra1DLaplace.cpp +++ /dev/null @@ -1,123 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include -#include - -#include -#include -#ifdef HAVE_MPI -#include -#include -#endif -#include -#include -#include - -#include "MueLu_MemoryProfiler.hpp" - -int main(int argc, char *argv[]) { - int ierr, i; - -#ifdef HAVE_MPI - MPI_Init(&argc, &argv); - Epetra_MpiComm Comm(MPI_COMM_WORLD); -#else - Epetra_SerialComm Comm; -#endif - - bool success = false; - bool verbose = true; - try { - // int myRank = Comm.MyPID(); - - // int numGlobalElements = 10000000; - int numGlobalElements = 100; - - Teuchos::CommandLineProcessor cmdp(false, true); - cmdp.setOption("numGlobalElements", &numGlobalElements, "Global problem size."); - if (cmdp.parse(argc, argv) != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL) { - throw -1; - } - - Epetra_Map Map(numGlobalElements, 0, Comm); - - int NumMyElements = Map.NumMyElements(); - - std::vector MyGlobalElements(NumMyElements); - Map.MyGlobalElements(&MyGlobalElements[0]); - - int NumNz = 3; - // std::vector NumNz(NumMyElements); - // for (i=0; i Values(2); - Values[0] = -1.0; - Values[1] = -1.0; - std::vector Indices(2); - double two = 2.0; - int NumEntries; - - for (i = 0; i < NumMyElements; i++) { - if (MyGlobalElements[i] == 0) { - Indices[0] = 1; - NumEntries = 1; - } else if (MyGlobalElements[i] == numGlobalElements - 1) { - Indices[0] = numGlobalElements - 2; - NumEntries = 1; - } else { - Indices[0] = MyGlobalElements[i] - 1; - Indices[1] = MyGlobalElements[i] + 1; - NumEntries = 2; - } - - ierr = A.InsertGlobalValues(MyGlobalElements[i], NumEntries, &Values[0], &Indices[0]); - assert(ierr == 0); - - // Put in the diagonal entry - ierr = A.InsertGlobalValues(MyGlobalElements[i], 1, &two, &MyGlobalElements[i]); - assert(ierr == 0); - } - - PrintMemoryUsage("Memory after InsertGlobalValues()", "epetra-after-insert.heap"); - - ierr = A.FillComplete(); - assert(ierr == 0); - - PrintMemoryUsage("Memory after FillComplete()", "epetra-after-fillcomplete.heap"); - - MemoryUsageStop(); - - if (ierr == 0) - success = true; - else - success = false; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - -#ifdef HAVE_MPI - MPI_Finalize(); -#endif - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -} diff --git a/packages/muelu/example/advanced/multiplesolve/CMakeLists.txt b/packages/muelu/example/advanced/multiplesolve/CMakeLists.txt index 387d6d579c16..b8171c3eb1cf 100644 --- a/packages/muelu/example/advanced/multiplesolve/CMakeLists.txt +++ b/packages/muelu/example/advanced/multiplesolve/CMakeLists.txt @@ -5,8 +5,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../test/unit_tests # Executables # -IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) +IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( @@ -51,14 +50,3 @@ IF(${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) COMM serial mpi ) ENDIF() -IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - XPETRA_ADD_TEST_EPETRA(FixedMatrixPattern 4) - XPETRA_ADD_TEST_EPETRA(StandardReuse 4) - MUELU_ADD_SERIAL_AND_MPI_TEST( - ReuseSequence - NAME "ReuseSequenceEpetra" - ARGS "--linAlgebra=Epetra --xml=reuse_seq.xml --nx=40 --ny=40 --dim=2" - NUM_MPI_PROCS 1 - COMM serial mpi - ) -ENDIF() diff --git a/packages/muelu/example/basic/CMakeLists.txt b/packages/muelu/example/basic/CMakeLists.txt index 01f4b61d164e..5df8a82c66a8 100644 --- a/packages/muelu/example/basic/CMakeLists.txt +++ b/packages/muelu/example/basic/CMakeLists.txt @@ -11,12 +11,6 @@ IF (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) SET(${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK YES) ENDIF() -IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - SET(${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK YES) -ENDIF() - - - IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK) TRIBITS_ADD_EXECUTABLE( Simple @@ -50,7 +44,7 @@ ENDIF() # Stratimikos example # IF(${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Thyra) - + # build executable TRIBITS_ADD_EXECUTABLE( Stratimikos @@ -77,18 +71,6 @@ IF(${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Thyra) mg-gpu.xml ) - IF (${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Stratimikos - NAME Stratimikos_Epetra - ARGS "--xml=stratimikos_ParameterList2.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - ENDIF() - IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK) MUELU_ADD_SERIAL_AND_MPI_TEST( @@ -98,7 +80,7 @@ IF(${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Thyra) NUM_MPI_PROCS 4 COMM serial mpi ) - + ENDIF() ENDIF() diff --git a/packages/muelu/matlab/bin/muemex.cpp b/packages/muelu/matlab/bin/muemex.cpp index 03068adff0e4..67ca22bd35ae 100644 --- a/packages/muelu/matlab/bin/muemex.cpp +++ b/packages/muelu/matlab/bin/muemex.cpp @@ -14,9 +14,7 @@ #define MUEMEX_ERROR -1 // Do not compile MueMex if any of these aren't available -#if !defined HAVE_MUELU_EPETRA || !defined HAVE_MUELU_MATLAB #error "MueMex requires Epetra, Tpetra and MATLAB." -#endif #include #include "MueLu_MatlabUtils.hpp" diff --git a/packages/muelu/matlab/bin/muemex.h b/packages/muelu/matlab/bin/muemex.h deleted file mode 100644 index fb66654a13de..000000000000 --- a/packages/muelu/matlab/bin/muemex.h +++ /dev/null @@ -1,193 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef MUEMEX_H -#define MUEMEX_H - -#include -#include -#include -#include -#include -#include - -#include "Teuchos_ParameterList.hpp" -#include "Teuchos_RCP.hpp" -#include "MueLu_config.hpp" -#include "MueLu.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_TpetraOperator.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_MatlabUtils.hpp" -#include "MueLu_CreateEpetraPreconditioner.hpp" -#include "MueLu_CreateTpetraPreconditioner.hpp" -#include "Epetra_SerialComm.h" -#include "Epetra_Map.h" -#include "Epetra_MultiVector.h" -#include "Epetra_CrsMatrix.h" -#include "Epetra_LinearProblem.h" -#include "Tpetra_CrsMatrix.hpp" -#include "Xpetra_EpetraCrsMatrix.hpp" -#include "BelosSolverFactory.hpp" -#include "BelosEpetraAdapter.hpp" -#include "BelosTpetraAdapter.hpp" -#include "BelosPseudoBlockGmresSolMgr.hpp" -#include "BelosBlockGmresSolMgr.hpp" -#include "BelosMueLuAdapter.hpp" -#include "MueLu_MatlabUtils.hpp" - -#include "mex.h" - -#ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE -#define HAVE_COMPLEX_SCALARS -#endif - -namespace MueLu -{ - -typedef enum - { - EPETRA, - TPETRA, - TPETRA_COMPLEX - } DataPackType; - -//Mode value passed to MATLAB muemex function as 1st arg (int) -typedef enum - { - MODE_SETUP, //0 - MODE_SOLVE, //1 - MODE_CLEANUP, //2 - MODE_STATUS, //3 - MODE_AGGREGATE, //4 - MODE_GET, //5 - MODE_SET, //6 - MODE_ERROR, //7 - MODE_APPLY //8 - } MODE_TYPE; - -/* Note: MuemexSystem is declared friend in MueLu::Hierarchy and MueLu::FactoryManager. - This gives access to the private method Hierarchy::GetFactoryManager, which allows - muelu('get', ...) to retrieve nonstandard "kept" items like Nullspace and Aggregates. -*/ -class MuemexSystem -{ - public: - MuemexSystem(DataPackType type); //type is one of EPETRA, TPETRA or TPETRA_COMPLEX - virtual ~MuemexSystem() = 0; - virtual int status() = 0; - virtual int setup(const mxArray* matlabA, bool haveCoords , const mxArray* matlabCoords) = 0; - int id; - Teuchos::RCP List; - DataPackType type; - mxArray* getHierarchyData(std::string dataName, MuemexType dataType, int levelID); //Works for all dp types -}; - -class EpetraSystem : public MuemexSystem -{ - public: - EpetraSystem(); - ~EpetraSystem(); - int setup(const mxArray* matlabA, bool haveCoords = false, const mxArray* matlabCoords = NULL); - int status(); - mxArray* solve(Teuchos::RCP params, Teuchos::RCP matrix, const mxArray* rhs, int &iters); - mxArray* apply(const mxArray* rhs); - Teuchos::RCP GetMatrix() - { - return A; - } - Teuchos::RCP GetPrec() - { - return prec; - } - int NumGlobalRows() - { - return A->NumGlobalRows(); - } - int NumMyCols() - { - return A->NumGlobalCols(); - } - double operatorComplexity; - Teuchos::RCP getHierarchy(); - private: - Teuchos::RCP A; - Teuchos::RCP prec; -}; - -//Scalar can be double or std::complex (complex_t) -//Note: DataPackType is either TPETRA or TPETRA_COMPLEX - -template -class TpetraSystem : public MuemexSystem -{ - public: - TpetraSystem(); - ~TpetraSystem(); - typedef Tpetra::CrsMatrix TMatrix; - typedef Tpetra::Operator TOperator; - int setup(const mxArray* matlabA, bool haveCoords = false, const mxArray* matlabCoords = NULL); - void normalSetup(const mxArray* matlabA, bool haveCoords = false, const mxArray* matlabCoords = NULL); - void customSetup(const mxArray* matlabA, bool haveCoords = false, const mxArray* matlabCoords = NULL); - int status(); - mxArray* solve(Teuchos::RCP params, Teuchos::RCP matrix, const mxArray* rhs, int &iters); - mxArray* apply(const mxArray* rhs); - //note: I typedef'd mm_node_t at the top of this file as the Kokkos default type - Teuchos::RCP GetMatrix() - { - return A; - } - Teuchos::RCP GetPrec() - { - return prec; - } - int NumMyRows() - { - if(A.is_null()) - return 0; - else - return A->getGlobalNumRows(); - } - int NumMyCols() - { - if(A.is_null()) - return 0; - else - return A->getGlobalNumCols(); - } - double operatorComplexity; - Teuchos::RCP> getHierarchy(); - private: - Teuchos::RCP A; - Teuchos::RCP prec; - public: - bool keepAll; - std::vector> systemManagers; -}; - -namespace MuemexSystemList -{ - extern std::vector> list; - extern int nextID; - int add(Teuchos::RCP D); - Teuchos::RCP find(int id); - int remove(int id); - int size(); - int status_all(); - bool isInList(int id); - void clearAll(); -} - -// Get a hierarchy from a MuemexSystem -template -Teuchos::RCP> getDatapackHierarchy(MuemexSystem* dp); - -}// end namespace - -#endif //MUEMEX_H diff --git a/packages/muelu/matlab/src/MueLu_MatlabUtils.cpp b/packages/muelu/matlab/src/MueLu_MatlabUtils.cpp index 9d0e4444069b..ab47b286d14c 100644 --- a/packages/muelu/matlab/src/MueLu_MatlabUtils.cpp +++ b/packages/muelu/matlab/src/MueLu_MatlabUtils.cpp @@ -9,405 +9,4 @@ #include "MueLu_MatlabUtils_def.hpp" -#if !defined(HAVE_MUELU_MATLAB) || !defined(HAVE_MUELU_EPETRA) #error "Muemex types require MATLAB, Epetra and Tpetra." -#else - -/* Stuff for MATLAB R2006b vs. previous versions */ -#if (defined(MX_API_VER) && MX_API_VER >= 0x07030000) -#else -typedef int mwIndex; -#endif - -using namespace std; -using namespace Teuchos; - -namespace MueLu { - -/* Explicit instantiation of MuemexData variants */ -template class MuemexData > >; -template class MuemexData > >; -template class MuemexData > >; -template class MuemexData > >; -template class MuemexData >; -template class MuemexData >; -template class MuemexData; -template class MuemexData; -template class MuemexData; -template class MuemexData; -template class MuemexData; -template class MuemexData > >; -template class MuemexData > >; -template class MuemexData >; -template class MuemexData > >; -template class MuemexData > >; -template class MuemexData > >; - -// Flag set to true if MATLAB's CSC matrix index type is not int (usually false) -bool rewrap_ints = sizeof(int) != sizeof(mwIndex); - -int* mwIndex_to_int(int N, mwIndex* mwi_array) { - // int* rv = (int*) malloc(N * sizeof(int)); - int* rv = new int[N]; // not really better but may avoid confusion for valgrind - for (int i = 0; i < N; i++) - rv[i] = (int)mwi_array[i]; - return rv; -} - -/* ******************************* */ -/* Specializations */ -/* ******************************* */ - -template <> -mxArray* createMatlabSparse(int numRows, int numCols, int nnz) { - return mxCreateSparse(numRows, numCols, nnz, mxREAL); -} - -template <> -mxArray* createMatlabSparse(int numRows, int numCols, int nnz) { - return mxCreateSparse(numRows, numCols, nnz, mxCOMPLEX); -} - -template <> -void fillMatlabArray(double* array, const mxArray* mxa, int n) { - memcpy(mxGetPr(mxa), array, n * sizeof(double)); -} - -template <> -void fillMatlabArray(complex_t* array, const mxArray* mxa, int n) { - double* pr = mxGetPr(mxa); - double* pi = mxGetPi(mxa); - for (int i = 0; i < n; i++) { - pr[i] = std::real(array[i]); - pi[i] = std::imag(array[i]); - } -} - -/******************************/ -/* Callback Functions */ -/******************************/ - -void callMatlabNoArgs(std::string function) { - int result = mexEvalString(function.c_str()); - if (result != 0) - mexPrintf("An error occurred while running a MATLAB command."); -} - -std::vector > callMatlab(std::string function, int numOutputs, std::vector > args) { - using Teuchos::rcp_static_cast; - mxArray** matlabArgs = new mxArray*[args.size()]; - mxArray** matlabOutput = new mxArray*[numOutputs]; - std::vector > output; - - for (int i = 0; i < int(args.size()); i++) { - try { - switch (args[i]->type) { - case BOOL: - matlabArgs[i] = rcp_static_cast, MuemexArg>(args[i])->convertToMatlab(); - break; - case INT: - matlabArgs[i] = rcp_static_cast, MuemexArg>(args[i])->convertToMatlab(); - break; - case DOUBLE: - matlabArgs[i] = rcp_static_cast, MuemexArg>(args[i])->convertToMatlab(); - break; - case STRING: - matlabArgs[i] = rcp_static_cast, MuemexArg>(args[i])->convertToMatlab(); - break; - case COMPLEX: - matlabArgs[i] = rcp_static_cast, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_MAP: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_ORDINAL_VECTOR: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case TPETRA_MULTIVECTOR_DOUBLE: - matlabArgs[i] = rcp_static_cast > >, MuemexArg>(args[i])->convertToMatlab(); - break; - case TPETRA_MULTIVECTOR_COMPLEX: - matlabArgs[i] = rcp_static_cast > >, MuemexArg>(args[i])->convertToMatlab(); - break; - case TPETRA_MATRIX_DOUBLE: - matlabArgs[i] = rcp_static_cast > >, MuemexArg>(args[i])->convertToMatlab(); - break; - case TPETRA_MATRIX_COMPLEX: - matlabArgs[i] = rcp_static_cast > >, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_MATRIX_DOUBLE: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_MATRIX_COMPLEX: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_MULTIVECTOR_DOUBLE: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case XPETRA_MULTIVECTOR_COMPLEX: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case EPETRA_CRSMATRIX: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case EPETRA_MULTIVECTOR: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case AGGREGATES: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case AMALGAMATION_INFO: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; - case GRAPH: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); -#ifdef HAVE_MUELU_INTREPID2 - case FIELDCONTAINER_ORDINAL: - matlabArgs[i] = rcp_static_cast >, MuemexArg>(args[i])->convertToMatlab(); - break; -#endif - } - } catch (std::exception& e) { - mexPrintf("An error occurred while converting arg #%d to MATLAB:\n", i); - std::cout << e.what() << std::endl; - mexPrintf("Passing 0 instead.\n"); - matlabArgs[i] = mxCreateDoubleScalar(0); - } - } - // now matlabArgs is populated with MATLAB data types - int result = mexCallMATLAB(numOutputs, matlabOutput, args.size(), matlabArgs, function.c_str()); - if (result != 0) - mexPrintf("Matlab encountered an error while running command through muemexCallbacks.\n"); - // now, if all went well, matlabOutput contains all the output to return to user - for (int i = 0; i < numOutputs; i++) { - try { - output.push_back(convertMatlabVar(matlabOutput[i])); - } catch (std::exception& e) { - mexPrintf("An error occurred while converting output #%d from MATLAB:\n", i); - std::cout << e.what() << std::endl; - } - } - delete[] matlabOutput; - delete[] matlabArgs; - return output; -} - -/******************************/ -/* More utility functions */ -/******************************/ - -template <> -mxArray* createMatlabMultiVector(int numRows, int numCols) { - return mxCreateDoubleMatrix(numRows, numCols, mxREAL); -} - -template <> -mxArray* createMatlabMultiVector(int numRows, int numCols) { - return mxCreateDoubleMatrix(numRows, numCols, mxCOMPLEX); -} - -mxArray* saveAmalInfo(RCP& amalInfo) { - throw runtime_error("AmalgamationInfo not supported in MueMex yet."); - return mxCreateDoubleScalar(0); -} - -bool isValidMatlabAggregates(const mxArray* mxa) { - bool isValidAggregates = true; - if (!mxIsStruct(mxa)) - return false; - int numFields = mxGetNumberOfFields(mxa); // check that struct has correct # of fields - if (numFields != 5) - isValidAggregates = false; - if (isValidAggregates) { - const char* mem1 = mxGetFieldNameByNumber(mxa, 0); - if (mem1 == NULL || strcmp(mem1, "nVertices") != 0) - isValidAggregates = false; - const char* mem2 = mxGetFieldNameByNumber(mxa, 1); - if (mem2 == NULL || strcmp(mem2, "nAggregates") != 0) - isValidAggregates = false; - const char* mem3 = mxGetFieldNameByNumber(mxa, 2); - if (mem3 == NULL || strcmp(mem3, "vertexToAggID") != 0) - isValidAggregates = false; - const char* mem4 = mxGetFieldNameByNumber(mxa, 3); - if (mem3 == NULL || strcmp(mem4, "rootNodes") != 0) - isValidAggregates = false; - const char* mem5 = mxGetFieldNameByNumber(mxa, 4); - if (mem4 == NULL || strcmp(mem5, "aggSizes") != 0) - isValidAggregates = false; - } - return isValidAggregates; -} - -bool isValidMatlabGraph(const mxArray* mxa) { - bool isValidGraph = true; - if (!mxIsStruct(mxa)) - return false; - int numFields = mxGetNumberOfFields(mxa); // check that struct has correct # of fields - if (numFields != 2) - isValidGraph = false; - if (isValidGraph) { - const char* mem1 = mxGetFieldNameByNumber(mxa, 0); - if (mem1 == NULL || strcmp(mem1, "edges") != 0) - isValidGraph = false; - const char* mem2 = mxGetFieldNameByNumber(mxa, 1); - if (mem2 == NULL || strcmp(mem2, "boundaryNodes") != 0) - isValidGraph = false; - } - return isValidGraph; -} - -std::vector tokenizeList(const std::string& params) { - using namespace std; - vector rlist; - const char* delims = ","; - char* copy = (char*)malloc(params.length() + 1); - strcpy(copy, params.c_str()); - char* mark = (char*)strtok(copy, delims); - while (mark != NULL) { - // Remove leading and trailing whitespace in token - char* tail = mark + strlen(mark) - 1; - while (*mark == ' ') - mark++; - while (*tail == ' ' && tail > mark) - tail--; - tail++; - *tail = 0; - string tok(mark); // copies the characters to string object - rlist.push_back(tok); - mark = strtok(NULL, delims); - } - free(copy); - return rlist; -} - -Teuchos::RCP getInputParamList() { - using namespace Teuchos; - RCP validParamList = rcp(new ParameterList()); - validParamList->set >("A", Teuchos::null, "Factory for the matrix A."); - validParamList->set >("P", Teuchos::null, "Factory for the prolongator."); - validParamList->set >("R", Teuchos::null, "Factory for the restrictor."); - validParamList->set >("Ptent", Teuchos::null, "Factory for the tentative (unsmoothed) prolongator."); - validParamList->set >("Coordinates", Teuchos::null, "Factory for the node coordinates."); - validParamList->set >("Nullspace", Teuchos::null, "Factory for the nullspace."); - validParamList->set >("Aggregates", Teuchos::null, "Factory for the aggregates."); - validParamList->set >("UnamalgamationInfo", Teuchos::null, "Factory for amalgamation."); -#ifdef HAVE_MUELU_INTREPID2 - validParamList->set >("pcoarsen: element to node map", Teuchos::null, "Generating factory of the element to node map"); -#endif - return validParamList; -} - -Teuchos::RCP convertMatlabVar(const mxArray* mxa) { - switch (mxGetClassID(mxa)) { - case mxCHAR_CLASS: - // string - return rcp_implicit_cast(rcp(new MuemexData(mxa))); - break; - case mxLOGICAL_CLASS: - // boolean - return rcp_implicit_cast(rcp(new MuemexData(mxa))); - break; - case mxINT32_CLASS: - if (mxGetM(mxa) == 1 && mxGetN(mxa) == 1) - // individual integer - return rcp_implicit_cast(rcp(new MuemexData(mxa))); - else if (mxGetM(mxa) != 1 || mxGetN(mxa) != 1) - // ordinal vector - return rcp_implicit_cast(rcp(new MuemexData >(mxa))); - else - throw std::runtime_error("Error: Don't know what to do with integer array.\n"); - break; - case mxDOUBLE_CLASS: - if (mxGetM(mxa) == 1 && mxGetN(mxa) == 1) { - if (mxIsComplex(mxa)) - // single double (scalar, real) - return rcp_implicit_cast(rcp(new MuemexData(mxa))); - else - // single complex scalar - return rcp_implicit_cast(rcp(new MuemexData(mxa))); - } else if (mxIsSparse(mxa)) // use a CRS matrix - { - // Default to Tpetra matrix for this - if (mxIsComplex(mxa)) - // complex matrix - return rcp_implicit_cast(rcp(new MuemexData >(mxa))); - else - // real-valued matrix - return rcp_implicit_cast(rcp(new MuemexData >(mxa))); - } else { - // Default to Xpetra multivector for this case - if (mxIsComplex(mxa)) - return rcp_implicit_cast(rcp(new MuemexData > >(mxa))); - else - return rcp_implicit_cast(rcp(new MuemexData > >(mxa))); - } - break; - case mxSTRUCT_CLASS: { - // the only thing that should get here currently is an Aggregates struct or Graph struct - // verify that it has the correct fields with the correct types - // also assume that aggregates data will not be stored in an array of more than 1 element. - if (isValidMatlabAggregates(mxa)) { - return rcp_implicit_cast(rcp(new MuemexData >(mxa))); - } else if (isValidMatlabGraph(mxa)) { - return rcp_implicit_cast(rcp(new MuemexData >(mxa))); - } else { - throw runtime_error("Invalid aggregates or graph struct passed in from MATLAB."); - return Teuchos::null; - } - break; - } - default: - throw std::runtime_error("MATLAB returned an unsupported type as a function output.\n"); - return Teuchos::null; - } -} - -/******************************/ -/* Explicit Instantiations */ -/******************************/ - -template bool loadDataFromMatlab(const mxArray* mxa); -template int loadDataFromMatlab(const mxArray* mxa); -template double loadDataFromMatlab(const mxArray* mxa); -template complex_t loadDataFromMatlab(const mxArray* mxa); -template string loadDataFromMatlab(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); -template RCP loadDataFromMatlab >(const mxArray* mxa); - -template mxArray* saveDataToMatlab(bool& data); -template mxArray* saveDataToMatlab(int& data); -template mxArray* saveDataToMatlab(double& data); -template mxArray* saveDataToMatlab(complex_t& data); -template mxArray* saveDataToMatlab(string& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); -template mxArray* saveDataToMatlab(RCP& data); - -template vector > processNeeds(const Factory* factory, string& needsParam, Level& lvl); -template vector > processNeeds(const Factory* factory, string& needsParam, Level& lvl); -template void processProvides(vector >& mexOutput, const Factory* factory, string& providesParam, Level& lvl); -template void processProvides(vector >& mexOutput, const Factory* factory, string& providesParam, Level& lvl); - -} // namespace MueLu -#endif // HAVE_MUELU_MATLAB diff --git a/packages/muelu/matlab/src/MueLu_MatlabUtils_decl.hpp b/packages/muelu/matlab/src/MueLu_MatlabUtils_decl.hpp index ddcdf3ba6ef1..ecae02d15374 100644 --- a/packages/muelu/matlab/src/MueLu_MatlabUtils_decl.hpp +++ b/packages/muelu/matlab/src/MueLu_MatlabUtils_decl.hpp @@ -12,173 +12,5 @@ #include "MueLu_ConfigDefs.hpp" -#if !defined(HAVE_MUELU_MATLAB) || !defined(HAVE_MUELU_EPETRA) #error "Muemex requires MATLAB, Epetra and Tpetra." -#else - -#include "mex.h" -#include -#include -#include -#include -#include -#include -#include "MueLu_Factory.hpp" -#include "MueLu_Hierarchy_decl.hpp" -#include "MueLu_Aggregates_decl.hpp" -#include "MueLu_AmalgamationInfo_decl.hpp" -#include "MueLu_Utilities_decl.hpp" -#include "MueLu_Graph_decl.hpp" -#include "Epetra_MultiVector.h" -#include "Epetra_CrsMatrix.h" -#include "Tpetra_CrsMatrix_decl.hpp" -#include "Xpetra_EpetraCrsMatrix.hpp" -#include "Xpetra_MapFactory.hpp" -#include "Xpetra_CrsGraph.hpp" -#include "Xpetra_VectorFactory.hpp" -#include - -#include "Kokkos_DynRankView.hpp" - -namespace MueLu { - -enum MuemexType { - INT, - BOOL, - DOUBLE, - COMPLEX, - STRING, - XPETRA_MAP, - XPETRA_ORDINAL_VECTOR, - TPETRA_MULTIVECTOR_DOUBLE, - TPETRA_MULTIVECTOR_COMPLEX, - TPETRA_MATRIX_DOUBLE, - TPETRA_MATRIX_COMPLEX, - XPETRA_MATRIX_DOUBLE, - XPETRA_MATRIX_COMPLEX, - XPETRA_MULTIVECTOR_DOUBLE, - XPETRA_MULTIVECTOR_COMPLEX, - EPETRA_CRSMATRIX, - EPETRA_MULTIVECTOR, - AGGREGATES, - AMALGAMATION_INFO, - GRAPH -#ifdef HAVE_MUELU_INTREPID2 - , - FIELDCONTAINER_ORDINAL -#endif -}; - -typedef Tpetra::KokkosCompat::KokkosDeviceWrapperNode mm_node_t; -typedef typename Tpetra::Map<>::local_ordinal_type mm_LocalOrd; // these are used for LocalOrdinal and GlobalOrdinal of all xpetra/tpetra templated types -typedef typename Tpetra::Map<>::global_ordinal_type mm_GlobalOrd; -typedef std::complex complex_t; -typedef Tpetra::Map<> muemex_map_type; -typedef Tpetra::CrsMatrix Tpetra_CrsMatrix_double; -typedef Tpetra::CrsMatrix Tpetra_CrsMatrix_complex; -typedef Tpetra::MultiVector Tpetra_MultiVector_double; -typedef Tpetra::MultiVector Tpetra_MultiVector_complex; -typedef Xpetra::Map Xpetra_map; -typedef Xpetra::Vector Xpetra_ordinal_vector; -typedef Xpetra::Matrix Xpetra_Matrix_double; -typedef Xpetra::Matrix Xpetra_Matrix_complex; -typedef Xpetra::CrsGraph Xpetra_CrsGraph; -typedef Xpetra::MultiVector Xpetra_MultiVector_double; -typedef Xpetra::MultiVector Xpetra_MultiVector_complex; -typedef MueLu::Hierarchy Hierarchy_double; -typedef MueLu::Hierarchy Hierarchy_complex; -typedef MueLu::Aggregates MAggregates; -typedef MueLu::AmalgamationInfo MAmalInfo; -typedef MueLu::LWGraph MGraph; - -#ifdef HAVE_MUELU_INTREPID2 -typedef Kokkos::DynRankView FieldContainer_ordinal; -#endif - -class MuemexArg { - public: - MuemexArg(MuemexType dataType) { type = dataType; } - MuemexType type; -}; - -template -MuemexType getMuemexType(const T& data); - -template -class MuemexData : public MuemexArg { - public: - MuemexData(T& data); // Construct from pre-existing data, to pass to MATLAB. - MuemexData(T& data, MuemexType type); // Construct from pre-existing data, to pass to MATLAB. - MuemexData(const mxArray* mxa); // Construct from MATLAB array, to get from MATLAB. - mxArray* convertToMatlab(); // Create a MATLAB object and copy this data to it - T& getData(); // Set and get methods - void setData(T& data); - - private: - T data; -}; - -template -MuemexType getMuemexType(const T& data); - -template -MuemexType getMuemexType(); - -template -T loadDataFromMatlab(const mxArray* mxa); - -template -mxArray* saveDataToMatlab(T& data); - -// Add data to level. Set the keep flag on the data to "user-provided" so it's not deleted. -template -void addLevelVariable(const T& data, std::string& name, Level& lvl, const FactoryBase* fact = NoFactory::get()); - -template -const T& getLevelVariable(std::string& name, Level& lvl); - -// Functions used to put data through matlab factories - first arg is "this" pointer of matlab factory -template -std::vector > processNeeds(const Factory* factory, std::string& needsParam, Level& lvl); - -template -void processProvides(std::vector >& mexOutput, const Factory* factory, std::string& providesParam, Level& lvl); - -// create a sparse array in Matlab -template -mxArray* createMatlabSparse(int numRows, int numCols, int nnz); -template -mxArray* createMatlabMultiVector(int numRows, int numCols); -template -void fillMatlabArray(Scalar* array, const mxArray* mxa, int n); -int* mwIndex_to_int(int N, mwIndex* mwi_array); -bool isValidMatlabAggregates(const mxArray* mxa); -bool isValidMatlabGraph(const mxArray* mxa); -std::vector tokenizeList(const std::string& param); -// The two callback functions that MueLu can call to run anything in MATLAB -void callMatlabNoArgs(std::string function); -std::vector > callMatlab(std::string function, int numOutputs, std::vector > args); -Teuchos::RCP getInputParamList(); -Teuchos::RCP convertMatlabVar(const mxArray* mxa); - -// trim from start -static inline std::string& ltrim(std::string& s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(std::isspace)))); - return s; -} - -// trim from end -static inline std::string& rtrim(std::string& s) { - s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end()); - return s; -} - -// trim from both ends -static inline std::string& trim(std::string& s) { - return ltrim(rtrim(s)); -} - -} // namespace MueLu - -#endif // HAVE_MUELU_MATLAB error handler #endif // MUELU_MATLABUTILS_DECL_HPP guard diff --git a/packages/muelu/matlab/src/MueLu_MatlabUtils_def.hpp b/packages/muelu/matlab/src/MueLu_MatlabUtils_def.hpp index bb70471b1066..71816beee58f 100644 --- a/packages/muelu/matlab/src/MueLu_MatlabUtils_def.hpp +++ b/packages/muelu/matlab/src/MueLu_MatlabUtils_def.hpp @@ -12,1466 +12,5 @@ #include "MueLu_MatlabUtils_decl.hpp" -#if !defined(HAVE_MUELU_MATLAB) || !defined(HAVE_MUELU_EPETRA) #error "Muemex types require MATLAB, Epetra and Tpetra." -#else - -using Teuchos::RCP; -using Teuchos::rcp; -using namespace std; - -namespace MueLu { - -extern bool rewrap_ints; - -/* ******************************* */ -/* getMuemexType */ -/* ******************************* */ - -template -MuemexType getMuemexType(const T& data) { throw std::runtime_error("Unknown Type"); } - -template <> -MuemexType getMuemexType(const int& data) { return INT; } -template <> -MuemexType getMuemexType() { return INT; } -template <> -MuemexType getMuemexType() { return BOOL; } - -template <> -MuemexType getMuemexType(const double& data) { return DOUBLE; } -template <> -MuemexType getMuemexType() { return DOUBLE; } - -template <> -MuemexType getMuemexType(const std::string& data) { return STRING; } -template <> -MuemexType getMuemexType() { return STRING; } - -template <> -MuemexType getMuemexType(const complex_t& data) { return COMPLEX; } -template <> -MuemexType getMuemexType() { return COMPLEX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_MAP; } -template <> -MuemexType getMuemexType >() { return XPETRA_MAP; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_ORDINAL_VECTOR; } -template <> -MuemexType getMuemexType >() { return XPETRA_ORDINAL_VECTOR; } - -template <> -MuemexType getMuemexType(const RCP& data) { return TPETRA_MULTIVECTOR_DOUBLE; } -template <> -MuemexType getMuemexType >() { return TPETRA_MULTIVECTOR_DOUBLE; } - -template <> -MuemexType getMuemexType(const RCP& data) { return TPETRA_MULTIVECTOR_COMPLEX; } -template <> -MuemexType getMuemexType >() { return TPETRA_MULTIVECTOR_COMPLEX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return TPETRA_MATRIX_DOUBLE; } -template <> -MuemexType getMuemexType >() { return TPETRA_MATRIX_DOUBLE; } - -template <> -MuemexType getMuemexType(const RCP& data) { return TPETRA_MATRIX_COMPLEX; } -template <> -MuemexType getMuemexType >() { return TPETRA_MATRIX_COMPLEX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_MULTIVECTOR_DOUBLE; } -template <> -MuemexType getMuemexType >() { return XPETRA_MULTIVECTOR_DOUBLE; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_MULTIVECTOR_COMPLEX; } -template <> -MuemexType getMuemexType >() { return XPETRA_MULTIVECTOR_COMPLEX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_MATRIX_DOUBLE; } -template <> -MuemexType getMuemexType >() { return XPETRA_MATRIX_DOUBLE; } - -template <> -MuemexType getMuemexType(const RCP& data) { return XPETRA_MATRIX_COMPLEX; } -template <> -MuemexType getMuemexType >() { return XPETRA_MATRIX_COMPLEX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return EPETRA_CRSMATRIX; } -template <> -MuemexType getMuemexType >() { return EPETRA_CRSMATRIX; } - -template <> -MuemexType getMuemexType(const RCP& data) { return EPETRA_MULTIVECTOR; } -template <> -MuemexType getMuemexType >() { return EPETRA_MULTIVECTOR; } - -template <> -MuemexType getMuemexType(const RCP& data) { return AGGREGATES; } -template <> -MuemexType getMuemexType >() { return AGGREGATES; } - -template <> -MuemexType getMuemexType(const RCP& data) { return AMALGAMATION_INFO; } -template <> -MuemexType getMuemexType >() { return AMALGAMATION_INFO; } - -template <> -MuemexType getMuemexType(const RCP& data) { return GRAPH; } -template <> -MuemexType getMuemexType >() { return GRAPH; } - -#ifdef HAVE_MUELU_INTREPID2 -template <> -MuemexType getMuemexType(const RCP& data) { return FIELDCONTAINER_ORDINAL; } -template <> -MuemexType getMuemexType >() { return FIELDCONTAINER_ORDINAL; } -#endif - -/* "prototypes" for specialized functions used in other specialized functions */ - -template <> -mxArray* createMatlabSparse(int numRows, int numCols, int nnz); -template <> -mxArray* createMatlabSparse(int numRows, int numCols, int nnz); -template <> -mxArray* createMatlabMultiVector(int numRows, int numCols); -template <> -mxArray* createMatlabMultiVector(int numRows, int numCols); -template <> -void fillMatlabArray(double* array, const mxArray* mxa, int n); -template <> -void fillMatlabArray(complex_t* array, const mxArray* mxa, int n); -template <> -mxArray* saveDataToMatlab(RCP& data); -template <> -mxArray* saveDataToMatlab(RCP& data); -template <> -mxArray* saveDataToMatlab(RCP& data); -template <> -mxArray* saveDataToMatlab(RCP& data); - -/* ******************************* */ -/* loadDataFromMatlab */ -/* ******************************* */ - -template <> -int loadDataFromMatlab(const mxArray* mxa) { - mxClassID probIDtype = mxGetClassID(mxa); - int rv; - if (probIDtype == mxINT32_CLASS) { - rv = *((int*)mxGetData(mxa)); - } else if (probIDtype == mxLOGICAL_CLASS) { - rv = (int)*((bool*)mxGetData(mxa)); - } else if (probIDtype == mxDOUBLE_CLASS) { - rv = (int)*((double*)mxGetData(mxa)); - } else if (probIDtype == mxUINT32_CLASS) { - rv = (int)*((unsigned int*)mxGetData(mxa)); - } else { - rv = -1; - throw std::runtime_error("Error: Unrecognized numerical type."); - } - return rv; -} - -template <> -bool loadDataFromMatlab(const mxArray* mxa) { - return *((bool*)mxGetData(mxa)); -} - -template <> -double loadDataFromMatlab(const mxArray* mxa) { - return *((double*)mxGetPr(mxa)); -} - -template <> -complex_t loadDataFromMatlab(const mxArray* mxa) { - double realpart = real(*((double*)mxGetPr(mxa))); - double imagpart = imag(*((double*)mxGetPi(mxa))); - return complex_t(realpart, imagpart); -} - -template <> -string loadDataFromMatlab(const mxArray* mxa) { - string rv = ""; - if (mxGetClassID(mxa) != mxCHAR_CLASS) { - throw runtime_error("Can't construct string from anything but a char array."); - } - rv = string(mxArrayToString(mxa)); - return rv; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP > comm = rcp(new Teuchos::SerialComm()); - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - if (nr != 1) - throw std::runtime_error("A Xpetra::Map representation from MATLAB must be a single row vector."); - double* pr = mxGetPr(mxa); - mm_GlobalOrd numGlobalIndices = nc; - - std::vector localGIDs(numGlobalIndices); - for (int i = 0; i < int(numGlobalIndices); i++) { - localGIDs[i] = Teuchos::as(pr[i]); - } - - const Teuchos::ArrayView localGIDs_view(&localGIDs[0], localGIDs.size()); - RCP map = - Xpetra::MapFactory::Build( - Xpetra::UseTpetra, - Teuchos::OrdinalTraits::invalid(), - localGIDs_view, - 0, comm); - - if (map.is_null()) - throw runtime_error("Failed to create Xpetra::Map."); - return map; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP > comm = rcp(new Teuchos::SerialComm()); - if (mxGetN(mxa) != 1 && mxGetM(mxa) != 1) - throw std::runtime_error("An OrdinalVector from MATLAB must be a single row or column vector."); - mm_GlobalOrd numGlobalIndices = mxGetM(mxa) * mxGetN(mxa); - RCP > map = Xpetra::MapFactory::Build(Xpetra::UseTpetra, numGlobalIndices, 0, comm); - if (mxGetClassID(mxa) != mxINT32_CLASS) - throw std::runtime_error("Can only construct LOVector with int32 data."); - int* array = (int*)mxGetData(mxa); - if (map.is_null()) - throw runtime_error("Failed to create map for Xpetra ordinal vector."); - RCP loVec = Xpetra::VectorFactory::Build(map, false); - if (loVec.is_null()) - throw runtime_error("Failed to create ordinal vector with Xpetra::VectorFactory."); - for (int i = 0; i < int(numGlobalIndices); i++) { - loVec->replaceGlobalValue(i, 0, array[i]); - } - return loVec; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP > mv; - try { - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - double* pr = mxGetPr(mxa); - RCP > comm = Tpetra::getDefaultComm(); - // numGlobalIndices for map constructor is the number of rows in matrix/vectors, right? - RCP map = rcp(new muemex_map_type(nr, (mm_GlobalOrd)0, comm)); - // Allocate a new array of complex values to use with the multivector - Teuchos::ArrayView arrView(pr, nr * nc); - mv = rcp(new Tpetra::MultiVector(map, arrView, size_t(nr), size_t(nc))); - } catch (std::exception& e) { - mexPrintf("Error constructing Tpetra MultiVector.\n"); - std::cout << e.what() << std::endl; - } - return mv; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP > mv; - try { - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - double* pr = mxGetPr(mxa); - double* pi = mxGetPi(mxa); - RCP > comm = Tpetra::getDefaultComm(); - // numGlobalIndices for map constructor is the number of rows in matrix/vectors, right? - RCP map = rcp(new muemex_map_type(nr, (mm_GlobalOrd)0, comm)); - // Allocate a new array of complex values to use with the multivector - complex_t* myArr = new complex_t[nr * nc]; - for (int n = 0; n < nc; n++) { - for (int m = 0; m < nr; m++) { - myArr[n * nr + m] = complex_t(pr[n * nr + m], pi[n * nr + m]); - } - } - Teuchos::ArrayView arrView(myArr, nr * nc); - mv = rcp(new Tpetra::MultiVector(map, arrView, nr, nc)); - } catch (std::exception& e) { - mexPrintf("Error constructing Tpetra MultiVector.\n"); - std::cout << e.what() << std::endl; - } - return mv; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - bool success = false; - RCP A; - - int* colptr = NULL; - int* rowind = NULL; - - try { - RCP > comm = rcp(new Teuchos::SerialComm()); - // numGlobalIndices is just the number of rows in the matrix - const size_t numGlobalIndices = mxGetM(mxa); - RCP rowMap = rcp(new muemex_map_type(numGlobalIndices, 0, comm)); - RCP domainMap = rcp(new muemex_map_type(mxGetN(mxa), 0, comm)); - double* valueArray = mxGetPr(mxa); - int nc = mxGetN(mxa); - if (rewrap_ints) { - // mwIndex_to_int allocates memory so must delete[] later - colptr = mwIndex_to_int(nc + 1, mxGetJc(mxa)); - rowind = mwIndex_to_int(colptr[nc], mxGetIr(mxa)); - } else { - rowind = (int*)mxGetIr(mxa); - colptr = (int*)mxGetJc(mxa); - } - // Need this to convert CSC colptrs to CRS row counts - Teuchos::Array rowCounts(numGlobalIndices); - for (int i = 0; i < nc; i++) { - for (int j = colptr[i]; j < colptr[i + 1]; j++) { - rowCounts[rowind[j]]++; - } - } - A = rcp(new Tpetra::CrsMatrix(rowMap, rowCounts())); - for (int i = 0; i < nc; i++) { - for (int j = colptr[i]; j < colptr[i + 1]; j++) { - //'array' of 1 element, containing column (in global matrix). - Teuchos::ArrayView cols = Teuchos::ArrayView(&i, 1); - //'array' of 1 element, containing value - Teuchos::ArrayView vals = Teuchos::ArrayView(&valueArray[j], 1); - A->insertGlobalValues(rowind[j], cols, vals); - } - } - A->fillComplete(domainMap, rowMap); - if (rewrap_ints) { - delete[] rowind; - rowind = NULL; - delete[] colptr; - colptr = NULL; - } - success = true; - } catch (std::exception& e) { - if (rewrap_ints) { - if (rowind != NULL) delete[] rowind; - if (colptr != NULL) delete[] colptr; - rowind = NULL; - colptr = NULL; - } - mexPrintf("Error while constructing Tpetra matrix:\n"); - std::cout << e.what() << std::endl; - } - if (!success) - mexErrMsgTxt("An error occurred while setting up a Tpetra matrix.\n"); - return A; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP A; - // Create a map in order to create the matrix (taken from muelu basic example - complex) - try { - RCP > comm = Tpetra::getDefaultComm(); - const Tpetra::global_size_t numGlobalIndices = mxGetM(mxa); - const mm_GlobalOrd indexBase = 0; - RCP rowMap = rcp(new muemex_map_type(numGlobalIndices, indexBase, comm)); - RCP domainMap = rcp(new muemex_map_type(mxGetN(mxa), indexBase, comm)); - double* realArray = mxGetPr(mxa); - double* imagArray = mxGetPi(mxa); - int* colptr; - int* rowind; - int nc = mxGetN(mxa); - if (rewrap_ints) { - // mwIndex_to_int allocates memory so must delete[] later - colptr = mwIndex_to_int(nc + 1, mxGetJc(mxa)); - rowind = mwIndex_to_int(colptr[nc], mxGetIr(mxa)); - } else { - rowind = (int*)mxGetIr(mxa); - colptr = (int*)mxGetJc(mxa); - } - // Need this to convert CSC colptrs to CRS row counts - Teuchos::Array rowCounts(numGlobalIndices); - for (int i = 0; i < nc; i++) { - for (int j = colptr[i]; j < colptr[i + 1]; j++) { - rowCounts[rowind[j]]++; - } - } - A = rcp(new Tpetra::CrsMatrix(rowMap, rowCounts())); - for (int i = 0; i < nc; i++) { - for (int j = colptr[i]; j < colptr[i + 1]; j++) { - // here assuming that complex_t will always be defined as std::complex - // use 'value' over and over again with Teuchos::ArrayViews to insert into matrix - complex_t value = std::complex(realArray[j], imagArray[j]); - Teuchos::ArrayView cols = Teuchos::ArrayView(&i, 1); - Teuchos::ArrayView vals = Teuchos::ArrayView(&value, 1); - A->insertGlobalValues(rowind[j], cols, vals); - } - } - A->fillComplete(domainMap, rowMap); - if (rewrap_ints) { - delete[] rowind; - delete[] colptr; - } - } catch (std::exception& e) { - mexPrintf("Error while constructing tpetra matrix:\n"); - std::cout << e.what() << std::endl; - } - return A; -} - -template <> -RCP > loadDataFromMatlab > >(const mxArray* mxa) { - RCP > tmat = loadDataFromMatlab > >(mxa); - return MueLu::TpetraCrs_To_XpetraMatrix(tmat); -} - -template <> -RCP > loadDataFromMatlab > >(const mxArray* mxa) { - RCP > tmat = loadDataFromMatlab > >(mxa); - return MueLu::TpetraCrs_To_XpetraMatrix(tmat); -} - -template <> -RCP > loadDataFromMatlab > >(const mxArray* mxa) { - RCP > tpetraMV = loadDataFromMatlab > >(mxa); - return MueLu::TpetraMultiVector_To_XpetraMultiVector(tpetraMV); -} - -template <> -RCP > loadDataFromMatlab > >(const mxArray* mxa) { - RCP > tpetraMV = loadDataFromMatlab > >(mxa); - return MueLu::TpetraMultiVector_To_XpetraMultiVector(tpetraMV); -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP matrix; - try { - int* colptr; - int* rowind; - double* vals = mxGetPr(mxa); - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - if (rewrap_ints) { - colptr = mwIndex_to_int(nc + 1, mxGetJc(mxa)); - rowind = mwIndex_to_int(colptr[nc], mxGetIr(mxa)); - } else { - rowind = (int*)mxGetIr(mxa); - colptr = (int*)mxGetJc(mxa); - } - Epetra_SerialComm Comm; - Epetra_Map RangeMap(nr, 0, Comm); - Epetra_Map DomainMap(nc, 0, Comm); - matrix = rcp(new Epetra_CrsMatrix(Epetra_DataAccess::Copy, RangeMap, DomainMap, 0)); - /* Do the matrix assembly */ - for (int i = 0; i < nc; i++) { - for (int j = colptr[i]; j < colptr[i + 1]; j++) { - // global row, # of entries, value array, column indices array - matrix->InsertGlobalValues(rowind[j], 1, &vals[j], &i); - } - } - matrix->FillComplete(DomainMap, RangeMap); - if (rewrap_ints) { - delete[] rowind; - delete[] colptr; - } - } catch (std::exception& e) { - mexPrintf("An error occurred while setting up an Epetra matrix:\n"); - std::cout << e.what() << std::endl; - } - return matrix; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - Epetra_SerialComm Comm; - Epetra_BlockMap map(nr * nc, 1, 0, Comm); - return rcp(new Epetra_MultiVector(Epetra_DataAccess::Copy, map, mxGetPr(mxa), nr, nc)); -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - if (mxGetNumberOfElements(mxa) != 1) - throw runtime_error("Aggregates must be individual structs in MATLAB."); - if (!mxIsStruct(mxa)) - throw runtime_error("Trying to pull aggregates from non-struct MATLAB object."); - // assume that in matlab aggregate structs will only be stored in a 1x1 array - // mxa must have the same fields as the ones declared in constructAggregates function in muelu.m for this to work - const int correctNumFields = 5; // change if more fields are added to the aggregates representation in constructAggregates in muelu.m - if (mxGetNumberOfFields(mxa) != correctNumFields) - throw runtime_error("Aggregates structure has wrong number of fields."); - // Pull MuemexData types back out - int nVert = *(int*)mxGetData(mxGetField(mxa, 0, "nVertices")); - int nAgg = *(int*)mxGetData(mxGetField(mxa, 0, "nAggregates")); - // Now have all the data needed to fully reconstruct the aggregate - // Use similar approach as UserAggregationFactory (which is written for >1 thread but will just be serial here) - RCP > comm = Teuchos::DefaultComm::getComm(); - int myRank = comm->getRank(); - Xpetra::UnderlyingLib lib = Xpetra::UseTpetra; - RCP > map = Xpetra::MapFactory::Build(lib, nVert, 0, comm); - RCP agg = rcp(new MAggregates(map)); - agg->SetNumAggregates(nAgg); - // Get handles for the vertex2AggId and procwinner arrays in reconstituted aggregates object - // this is serial so all procwinner values will be same (0) - ArrayRCP vertex2AggId = agg->GetVertex2AggId()->getDataNonConst(0); // the '0' means first (and only) column of multivector, since is just vector - ArrayRCP procWinner = agg->GetProcWinner()->getDataNonConst(0); - // mm_LocalOrd and int are equivalent, so is ok to talk about aggSize with just 'int' - // Deep copy the entire vertex2AggID and isRoot arrays, which are both nVert items long - // At the same time, set ProcWinner - mxArray* vertToAggID_in = mxGetField(mxa, 0, "vertexToAggID"); - int* vertToAggID_inArray = (int*)mxGetData(vertToAggID_in); - mxArray* rootNodes_in = mxGetField(mxa, 0, "rootNodes"); - int* rootNodes_inArray = (int*)mxGetData(rootNodes_in); - for (int i = 0; i < nVert; i++) { - vertex2AggId[i] = vertToAggID_inArray[i]; - procWinner[i] = myRank; // all nodes are going to be on the same proc - agg->SetIsRoot(i, false); // the ones that are root will be set in next loop - } - for (int i = 0; i < nAgg; i++) // rootNodesToCopy is an array of node IDs which are the roots of their aggs - { - agg->SetIsRoot(rootNodes_inArray[i], true); - } - // Now recompute the aggSize array the results in the object - agg->ComputeAggregateSizes(true); - agg->AggregatesCrossProcessors(false); - return agg; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - RCP amal; - throw runtime_error("AmalgamationInfo not supported in Muemex yet."); - return amal; -} - -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - // mxa must be struct with logical sparse matrix called 'edges' and Nx1 int32 array 'boundaryNodes' - mxArray* edges = mxGetField(mxa, 0, "edges"); - mxArray* boundaryNodes = mxGetField(mxa, 0, "boundaryNodes"); - if (edges == NULL) - throw runtime_error("Graph structure in MATLAB must have a field called 'edges' (logical sparse matrix)"); - if (boundaryNodes == NULL) - throw runtime_error("Graph structure in MATLAB must have a field called 'boundaryNodes' (int32 array containing list of boundary nodes)"); - int* boundaryList = (int*)mxGetData(boundaryNodes); - if (!mxIsSparse(edges) || mxGetClassID(edges) != mxLOGICAL_CLASS) - throw runtime_error("Graph edges must be stored as a logical sparse matrix."); - // Note that Matlab stores sparse matrices in column major format. - mwIndex* matlabColPtrs = mxGetJc(edges); - mwIndex* matlabRowIndices = mxGetIr(edges); - mm_GlobalOrd nRows = (mm_GlobalOrd)mxGetM(edges); - - // Create and populate row-major CRS data structures for Xpetra::TpetraCrsGraph. - - // calculate number of nonzeros in each row - Teuchos::Array entriesPerRow(nRows); - int nnz = matlabColPtrs[mxGetN(edges)]; // last entry in matlabColPtrs - for (int i = 0; i < nnz; i++) - entriesPerRow[matlabRowIndices[i]]++; - // Populate usual row index array. We don't need this for the Xpetra Graph ctor, but - // it's convenient for building up the column index array, which the ctor does need. - Teuchos::Array rows(nRows + 1); - rows[0] = 0; - for (int i = 0; i < nRows; i++) - rows[i + 1] = rows[i] + entriesPerRow[i]; - Teuchos::Array cols(nnz); // column index array - Teuchos::Array insertionsPerRow(nRows, 0); // track of #insertions done per row - int ncols = mxGetN(edges); - for (int colNum = 0; colNum < ncols; ++colNum) { - int ci = matlabColPtrs[colNum]; - for (int j = ci; j < Teuchos::as(matlabColPtrs[colNum + 1]); ++j) { - int rowNum = matlabRowIndices[j]; - cols[rows[rowNum] + insertionsPerRow[rowNum]] = colNum; - insertionsPerRow[rowNum]++; - } - } - // Find maximum - int maxNzPerRow = 0; - for (int i = 0; i < nRows; i++) { - if (maxNzPerRow < entriesPerRow[i]) - maxNzPerRow = entriesPerRow[i]; - } - - RCP > comm = rcp(new Teuchos::SerialComm()); - typedef Xpetra::TpetraMap MMap; - RCP map = rcp(new MMap(nRows, 0, comm)); - typedef Xpetra::TpetraCrsGraph TpetraGraph; - RCP tgraph = rcp(new TpetraGraph(map, (size_t)maxNzPerRow)); - // Populate tgraph in compressed-row format. Must get each row individually... - for (int i = 0; i < nRows; ++i) { - tgraph->insertGlobalIndices((mm_GlobalOrd)i, cols(rows[i], entriesPerRow[i])); - } - tgraph->fillComplete(map, map); - RCP mgraph = rcp(new MueLu::Graph(tgraph)); - // Set boundary nodes - int numBoundaryNodes = mxGetNumberOfElements(boundaryNodes); - bool* boundaryFlags = new bool[nRows]; - for (int i = 0; i < nRows; i++) { - boundaryFlags[i] = false; - } - for (int i = 0; i < numBoundaryNodes; i++) { - boundaryFlags[boundaryList[i]] = true; - } - ArrayRCP boundaryNodesInput(boundaryFlags, 0, nRows, true); - mgraph->SetBoundaryNodeMap(boundaryNodesInput); - return mgraph; -} - -#ifdef HAVE_MUELU_INTREPID2 -template <> -RCP loadDataFromMatlab >(const mxArray* mxa) { - if (mxGetClassID(mxa) != mxINT32_CLASS) - throw runtime_error("FieldContainer must have integer storage entries"); - - int* data = (int*)mxGetData(mxa); - int nr = mxGetM(mxa); - int nc = mxGetN(mxa); - - RCP fc = rcp(new FieldContainer_ordinal("FC from Matlab", nr, nc)); - for (int col = 0; col < nc; col++) { - for (int row = 0; row < nr; row++) { - (*fc)(row, col) = data[col * nr + row]; - } - } - return fc; -} -#endif - -/* ******************************* */ -/* saveDataToMatlab */ -/* ******************************* */ - -template <> -mxArray* saveDataToMatlab(int& data) { - mwSize dims[] = {1, 1}; - mxArray* mxa = mxCreateNumericArray(2, dims, mxINT32_CLASS, mxREAL); - *((int*)mxGetData(mxa)) = data; - return mxa; -} - -template <> -mxArray* saveDataToMatlab(bool& data) { - mwSize dims[] = {1, 1}; - mxArray* mxa = mxCreateLogicalArray(2, dims); - *((bool*)mxGetData(mxa)) = data; - return mxa; -} - -template <> -mxArray* saveDataToMatlab(double& data) { - return mxCreateDoubleScalar(data); -} - -template <> -mxArray* saveDataToMatlab(complex_t& data) { - mwSize dims[] = {1, 1}; - mxArray* mxa = mxCreateNumericArray(2, dims, mxDOUBLE_CLASS, mxCOMPLEX); - *((double*)mxGetPr(mxa)) = real(data); - *((double*)mxGetPi(mxa)) = imag(data); - return mxa; -} - -template <> -mxArray* saveDataToMatlab(string& data) { - return mxCreateString(data.c_str()); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - // Precondition: Memory has already been allocated by MATLAB for the array. - int nc = data->getGlobalNumElements(); - int nr = 1; - mxArray* output = createMatlabMultiVector(nr, nc); - double* array = (double*)malloc(sizeof(double) * nr * nc); - for (int col = 0; col < nc; col++) { - mm_GlobalOrd gid = data->getGlobalElement(col); - array[col] = Teuchos::as(gid); - } - fillMatlabArray(array, output, nc * nr); - free(array); - return output; -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - mwSize len = data->getGlobalLength(); - // create a single column vector - mwSize dimensions[] = {len, 1}; - mxArray* rv = mxCreateNumericArray(2, dimensions, mxINT32_CLASS, mxREAL); - int* dataPtr = (int*)mxGetData(rv); - ArrayRCP arr = data->getData(0); - for (int i = 0; i < int(data->getGlobalLength()); i++) { - dataPtr[i] = arr[i]; - } - return rv; -} - -template <> -mxArray* saveDataToMatlab(RCP >& data) { - RCP xmv = MueLu::TpetraMultiVector_To_XpetraMultiVector(data); - return saveDataToMatlab(xmv); -} - -template <> -mxArray* saveDataToMatlab(RCP >& data) { - RCP xmv = MueLu::TpetraMultiVector_To_XpetraMultiVector(data); - return saveDataToMatlab(xmv); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - RCP > xmat = TpetraCrs_To_XpetraMatrix(data); - return saveDataToMatlab(xmat); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - RCP > xmat = TpetraCrs_To_XpetraMatrix(data); - return saveDataToMatlab(xmat); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - typedef double Scalar; - // Compute global constants, if we need them - Teuchos::rcp_const_cast(data->getCrsGraph())->computeGlobalConstants(); - - int nr = data->getGlobalNumRows(); - int nc = data->getGlobalNumCols(); - int nnz = data->getGlobalNumEntries(); - -#ifdef VERBOSE_OUTPUT - RCP fancyStream = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - mat->describe(*fancyStream, Teuchos::VERB_EXTREME); -#endif - mxArray* mxa = createMatlabSparse(nr, nc, nnz); - mwIndex* ir = mxGetIr(mxa); - mwIndex* jc = mxGetJc(mxa); - for (int i = 0; i < nc + 1; i++) { - jc[i] = 0; - } - - size_t maxEntriesPerRow = data->getGlobalMaxNumRowEntries(); - if (maxEntriesPerRow == Teuchos::OrdinalTraits::invalid() || maxEntriesPerRow == 0) maxEntriesPerRow = data->getLocalMaxNumRowEntries(); - - int* rowProgress = new int[nc]; - // The array that will be copied to Pr and (if complex) Pi later - Scalar* sparseVals = new Scalar[nnz]; - size_t numEntries; - if (data->isLocallyIndexed()) { - Scalar* rowValArray = new Scalar[maxEntriesPerRow]; - Teuchos::ArrayView rowVals(rowValArray, maxEntriesPerRow); - mm_LocalOrd* rowIndicesArray = new mm_LocalOrd[maxEntriesPerRow]; - Teuchos::ArrayView rowIndices(rowIndicesArray, maxEntriesPerRow); - for (mm_LocalOrd m = 0; m < nr; m++) // All rows in the Xpetra matrix - { - data->getLocalRowCopy(m, rowIndices, rowVals, numEntries); // Get the row - for (mm_LocalOrd entry = 0; entry < int(numEntries); entry++) // All entries in row - { - jc[rowIndices[entry] + 1]++; // for each entry, increase jc for the entry's column - } - } - - // now jc holds the number of elements in each column, but needs cumulative sum over all previous columns also - int entriesAccum = 0; - for (int n = 0; n <= nc; n++) { - int temp = entriesAccum; - entriesAccum += jc[n]; - jc[n] += temp; - } - // Jc now populated with colptrs - for (int i = 0; i < nc; i++) { - rowProgress[i] = 0; - } - // Row progress values like jc but keep track as the MATLAB matrix is being filled in - for (mm_LocalOrd m = 0; m < nr; m++) // rows - { - data->getLocalRowCopy(m, rowIndices, rowVals, numEntries); - for (mm_LocalOrd i = 0; i < int(numEntries); i++) // entries in row m (NOT columns) - { - // row is m, col is rowIndices[i], val is rowVals[i] - mm_LocalOrd col = rowIndices[i]; - sparseVals[jc[col] + rowProgress[col]] = rowVals[i]; // Set value - ir[jc[col] + rowProgress[col]] = m; // Set row at which value occurs - rowProgress[col]++; - } - } - delete[] rowIndicesArray; - } else { - Teuchos::ArrayView rowIndices; - Teuchos::ArrayView rowVals; - for (mm_GlobalOrd m = 0; m < nr; m++) { - data->getGlobalRowView(m, rowIndices, rowVals); - for (mm_GlobalOrd n = 0; n < rowIndices.size(); n++) { - jc[rowIndices[n] + 1]++; - } - } - // Last element of jc is just nnz - jc[nc] = nnz; - // Jc now populated with colptrs - for (int i = 0; i < nc; i++) { - rowProgress[i] = 0; - } - int entriesAccum = 0; - for (int n = 0; n <= nc; n++) { - int temp = entriesAccum; - entriesAccum += jc[n]; - jc[n] += temp; - } - // Row progress values like jc but keep track as the MATLAB matrix is being filled in - for (mm_GlobalOrd m = 0; m < nr; m++) // rows - { - data->getGlobalRowView(m, rowIndices, rowVals); - for (mm_LocalOrd i = 0; i < rowIndices.size(); i++) // entries in row m - { - mm_GlobalOrd col = rowIndices[i]; // row is m, col is rowIndices[i], val is rowVals[i] - sparseVals[jc[col] + rowProgress[col]] = rowVals[i]; // Set value - ir[jc[col] + rowProgress[col]] = m; // Set row at which value occurs - rowProgress[col]++; - } - } - } - // finally, copy sparseVals into pr (and pi, if complex) - fillMatlabArray(sparseVals, mxa, nnz); - delete[] sparseVals; - delete[] rowProgress; - return mxa; -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - typedef complex_t Scalar; - - // Compute global constants, if we need them - Teuchos::rcp_const_cast(data->getCrsGraph())->computeGlobalConstants(); - - int nr = data->getGlobalNumRows(); - int nc = data->getGlobalNumCols(); - int nnz = data->getGlobalNumEntries(); -#ifdef VERBOSE_OUTPUT - RCP fancyStream = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - mat->describe(*fancyStream, Teuchos::VERB_EXTREME); -#endif - mxArray* mxa = createMatlabSparse(nr, nc, nnz); - mwIndex* ir = mxGetIr(mxa); - mwIndex* jc = mxGetJc(mxa); - for (int i = 0; i < nc + 1; i++) { - jc[i] = 0; - } - size_t maxEntriesPerRow = data->getGlobalMaxNumRowEntries(); - int* rowProgress = new int[nc]; - // The array that will be copied to Pr and (if complex) Pi later - Scalar* sparseVals = new Scalar[nnz]; - size_t numEntries; - if (data->isLocallyIndexed()) { - Scalar* rowValArray = new Scalar[maxEntriesPerRow]; - Teuchos::ArrayView rowVals(rowValArray, maxEntriesPerRow); - mm_LocalOrd* rowIndicesArray = new mm_LocalOrd[maxEntriesPerRow]; - Teuchos::ArrayView rowIndices(rowIndicesArray, maxEntriesPerRow); - for (mm_LocalOrd m = 0; m < nr; m++) // All rows in the Xpetra matrix - { - data->getLocalRowCopy(m, rowIndices, rowVals, numEntries); // Get the row - for (mm_LocalOrd entry = 0; entry < int(numEntries); entry++) // All entries in row - { - jc[rowIndices[entry] + 1]++; // for each entry, increase jc for the entry's column - } - } - // now jc holds the number of elements in each column, but needs cumulative sum over all previous columns also - int entriesAccum = 0; - for (int n = 0; n <= nc; n++) { - int temp = entriesAccum; - entriesAccum += jc[n]; - jc[n] += temp; - } - // Jc now populated with colptrs - for (int i = 0; i < nc; i++) { - rowProgress[i] = 0; - } - // Row progress values like jc but keep track as the MATLAB matrix is being filled in - for (mm_LocalOrd m = 0; m < nr; m++) // rows - { - data->getLocalRowCopy(m, rowIndices, rowVals, numEntries); - for (mm_LocalOrd i = 0; i < int(numEntries); i++) // entries in row m (NOT columns) - { - // row is m, col is rowIndices[i], val is rowVals[i] - mm_LocalOrd col = rowIndices[i]; - sparseVals[jc[col] + rowProgress[col]] = rowVals[i]; // Set value - ir[jc[col] + rowProgress[col]] = m; // Set row at which value occurs - rowProgress[col]++; - } - } - delete[] rowIndicesArray; - } else { - Teuchos::ArrayView rowIndices; - Teuchos::ArrayView rowVals; - for (mm_GlobalOrd m = 0; m < nr; m++) { - data->getGlobalRowView(m, rowIndices, rowVals); - for (mm_GlobalOrd n = 0; n < rowIndices.size(); n++) { - jc[rowIndices[n] + 1]++; - } - } - // Last element of jc is just nnz - jc[nc] = nnz; - // Jc now populated with colptrs - for (int i = 0; i < nc; i++) { - rowProgress[i] = 0; - } - int entriesAccum = 0; - for (int n = 0; n <= nc; n++) { - int temp = entriesAccum; - entriesAccum += jc[n]; - jc[n] += temp; - } - // Row progress values like jc but keep track as the MATLAB matrix is being filled in - for (mm_GlobalOrd m = 0; m < nr; m++) // rows - { - data->getGlobalRowView(m, rowIndices, rowVals); - for (mm_LocalOrd i = 0; i < rowIndices.size(); i++) // entries in row m - { - mm_GlobalOrd col = rowIndices[i]; // row is m, col is rowIndices[i], val is rowVals[i] - sparseVals[jc[col] + rowProgress[col]] = rowVals[i]; // Set value - ir[jc[col] + rowProgress[col]] = m; // Set row at which value occurs - rowProgress[col]++; - } - } - } - // finally, copy sparseVals into pr (and pi, if complex) - fillMatlabArray(sparseVals, mxa, nnz); - delete[] sparseVals; - delete[] rowProgress; - return mxa; -} - -/* -template<> -mxArray* saveDataToMatlab(RCP>& data) -{ - //Precondition: Memory has already been allocated by MATLAB for the array. - int nr = data->getGlobalLength(); - int nc = data->getNumVectors(); - mxArray* output = createMatlabMultiVector(nr, nc); - Scalar* array = (Scalar*) malloc(sizeof(Scalar) * nr * nc); - for(int col = 0; col < nc; col++) - { - Teuchos::ArrayRCP colData = data->getData(col); - for(int row = 0; row < nr; row++) - { - array[col * nr + row] = colData[row]; - } - } - fillMatlabArray(array, output, nc * nr); - free(array); - return output; -} -*/ - -template <> -mxArray* saveDataToMatlab(RCP >& data) { - // Precondition: Memory has already been allocated by MATLAB for the array. - int nr = data->getGlobalLength(); - int nc = data->getNumVectors(); - mxArray* output = createMatlabMultiVector(nr, nc); - double* array = (double*)malloc(sizeof(double) * nr * nc); - for (int col = 0; col < nc; col++) { - Teuchos::ArrayRCP colData = data->getData(col); - for (int row = 0; row < nr; row++) { - array[col * nr + row] = colData[row]; - } - } - fillMatlabArray(array, output, nc * nr); - free(array); - return output; -} - -template <> -mxArray* saveDataToMatlab(RCP >& data) { - // Precondition: Memory has already been allocated by MATLAB for the array. - int nr = data->getGlobalLength(); - int nc = data->getNumVectors(); - mxArray* output = createMatlabMultiVector(nr, nc); - complex_t* array = (complex_t*)malloc(sizeof(complex_t) * nr * nc); - for (int col = 0; col < nc; col++) { - Teuchos::ArrayRCP colData = data->getData(col); - for (int row = 0; row < nr; row++) { - array[col * nr + row] = colData[row]; - } - } - fillMatlabArray(array, output, nc * nr); - free(array); - return output; -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - RCP xmat = EpetraCrs_To_XpetraMatrix(data); - return saveDataToMatlab(xmat); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - mxArray* output = mxCreateDoubleMatrix(data->GlobalLength(), data->NumVectors(), mxREAL); - double* dataPtr = mxGetPr(output); - data->ExtractCopy(dataPtr, data->GlobalLength()); - return output; -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - // Set up array of inputs for matlab constructAggregates - int numNodes = data->GetVertex2AggId()->getData(0).size(); - int numAggs = data->GetNumAggregates(); - mxArray* dataIn[5]; - mwSize singleton[] = {1, 1}; - dataIn[0] = mxCreateNumericArray(2, singleton, mxINT32_CLASS, mxREAL); - *((int*)mxGetData(dataIn[0])) = numNodes; - dataIn[1] = mxCreateNumericArray(2, singleton, mxINT32_CLASS, mxREAL); - *((int*)mxGetData(dataIn[1])) = numAggs; - mwSize nodeArrayDims[] = {(mwSize)numNodes, 1}; // dimensions for Nx1 array, where N is number of nodes (vert2Agg) - dataIn[2] = mxCreateNumericArray(2, nodeArrayDims, mxINT32_CLASS, mxREAL); - int* vtaid = (int*)mxGetData(dataIn[2]); - ArrayRCP vertexToAggID = data->GetVertex2AggId()->getData(0); - for (int i = 0; i < numNodes; i++) { - vtaid[i] = vertexToAggID[i]; - } - mwSize aggArrayDims[] = {(mwSize)numAggs, 1}; // dims for Nx1 array, where N is number of aggregates (rootNodes, aggSizes) - dataIn[3] = mxCreateNumericArray(2, aggArrayDims, mxINT32_CLASS, mxREAL); - // First, find out if the aggregates even have 1 root node per aggregate. If not, assume roots are invalid and assign ourselves - int totalRoots = 0; - for (int i = 0; i < numNodes; i++) { - if (data->IsRoot(i)) - totalRoots++; - } - bool reassignRoots = false; - if (totalRoots != numAggs) { - cout << endl - << "Warning: Number of root nodes and number of aggregates do not match." << endl; - cout << "Will reassign root nodes when writing aggregates to matlab." << endl - << endl; - reassignRoots = true; - } - int* rn = (int*)mxGetData(dataIn[3]); // list of root nodes (in no particular order) - { - if (reassignRoots) { - // For each aggregate, just pick the first node we see in it and set it as root - int lastFoundNode = 0; // heuristic for speed, a node in aggregate N+1 is likely to come very soon after a node in agg N - for (int i = 0; i < numAggs; i++) { - rn[i] = -1; - for (int j = lastFoundNode; j < lastFoundNode + numNodes; j++) { - int index = j % numNodes; - if (vertexToAggID[index] == i) { - rn[i] = index; - lastFoundNode = index; - } - } - TEUCHOS_TEST_FOR_EXCEPTION(rn[i] == -1, runtime_error, "Invalid aggregates: Couldn't find any node in aggregate #" << i << "."); - } - } else { - int i = 0; // iterates over aggregate IDs - for (int j = 0; j < numNodes; j++) { - if (data->IsRoot(j)) { - if (i == numAggs) - throw runtime_error("Cannot store invalid aggregates in MATLAB - more root nodes than aggregates."); - rn[i] = j; // now we know this won't go out of bounds (rn's underlying matlab array is numAggs in length) - i++; - } - } - if (i + 1 < numAggs) - throw runtime_error("Cannot store invalid aggregates in MATLAB - fewer root nodes than aggregates."); - } - } - dataIn[4] = mxCreateNumericArray(1, aggArrayDims, mxINT32_CLASS, mxREAL); - int* as = (int*)mxGetData(dataIn[4]); // list of aggregate sizes - ArrayRCP aggSizes = data->ComputeAggregateSizes(); - for (int i = 0; i < numAggs; i++) { - as[i] = aggSizes[i]; - } - mxArray* matlabAggs[1]; - int result = mexCallMATLAB(1, matlabAggs, 5, dataIn, "constructAggregates"); - if (result != 0) - throw runtime_error("Matlab encountered an error while constructing aggregates struct."); - return matlabAggs[0]; -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - throw runtime_error("AmalgamationInfo not supported in MueMex yet."); - return mxCreateDoubleScalar(0); -} - -template <> -mxArray* saveDataToMatlab(RCP& data) { - int numEntries = (int)data->GetGlobalNumEdges(); - int numRows = (int)data->GetDomainMap()->getGlobalNumElements(); // assume numRows == numCols - mxArray* mat = mxCreateSparseLogicalMatrix(numRows, numRows, numEntries); - mxLogical* outData = (mxLogical*)mxGetData(mat); - mwIndex* rowInds = mxGetIr(mat); - mwIndex* colPtrs = mxGetJc(mat); - mm_LocalOrd* dataCopy = new mm_LocalOrd[numEntries]; - mm_LocalOrd* iter = dataCopy; - int* entriesPerRow = new int[numRows]; - int* entriesPerCol = new int[numRows]; - for (int i = 0; i < numRows; i++) { - entriesPerRow[i] = 0; - entriesPerCol[i] = 0; - } - for (int i = 0; i < numRows; i++) { - ArrayView neighbors = data->getNeighborVertices(i); // neighbors has the column indices for row i - memcpy(iter, neighbors.getRawPtr(), sizeof(mm_LocalOrd) * neighbors.size()); - entriesPerRow[i] = neighbors.size(); - for (int j = 0; j < neighbors.size(); j++) { - entriesPerCol[neighbors[j]]++; - } - iter += neighbors.size(); - } - mwIndex** rowIndsByColumn = new mwIndex*[numRows]; // rowIndsByColumn[0] points to array of row indices in column 1 - mxLogical** valuesByColumn = new mxLogical*[numRows]; - int* numEnteredPerCol = new int[numRows]; - int accum = 0; - for (int i = 0; i < numRows; i++) { - rowIndsByColumn[i] = &rowInds[accum]; - // cout << "Entries in column " << i << " start at offset " << accum << endl; - valuesByColumn[i] = &outData[accum]; - accum += entriesPerCol[i]; - if (accum > numEntries) - throw runtime_error("potato"); - } - for (int i = 0; i < numRows; i++) { - numEnteredPerCol[i] = 0; // rowIndsByColumn[n][numEnteredPerCol[n]] gives the next place to put a row index - } - // entriesPerCol now has Jc information (col offsets) - accum = 0; // keep track of cumulative index in dataCopy - for (int row = 0; row < numRows; row++) { - for (int entryInRow = 0; entryInRow < entriesPerRow[row]; entryInRow++) { - int col = dataCopy[accum]; - accum++; - rowIndsByColumn[col][numEnteredPerCol[col]] = row; - valuesByColumn[col][numEnteredPerCol[col]] = (mxLogical)1; - numEnteredPerCol[col]++; - } - } - accum = 0; // keep track of total entries over all columns - for (int col = 0; col < numRows; col++) { - colPtrs[col] = accum; - accum += entriesPerCol[col]; - } - colPtrs[numRows] = accum; // the last entry in jc, which is equivalent to numEntries - delete[] numEnteredPerCol; - delete[] rowIndsByColumn; - delete[] valuesByColumn; - delete[] dataCopy; - delete[] entriesPerRow; - delete[] entriesPerCol; - // Construct list of boundary nodes - const ArrayRCP boundaryFlags = data->GetBoundaryNodeMap(); - int numBoundaryNodes = 0; - for (int i = 0; i < boundaryFlags.size(); i++) { - if (boundaryFlags[i]) - numBoundaryNodes++; - } - cout << "Graph has " << numBoundaryNodes << " Dirichlet boundary nodes." << endl; - mwSize dims[] = {(mwSize)numBoundaryNodes, 1}; - mxArray* boundaryList = mxCreateNumericArray(2, dims, mxINT32_CLASS, mxREAL); - int* dest = (int*)mxGetData(boundaryList); - int* destIter = dest; - for (int i = 0; i < boundaryFlags.size(); i++) { - if (boundaryFlags[i]) { - *destIter = i; - destIter++; - } - } - mxArray* constructArgs[] = {mat, boundaryList}; - mxArray* out[1]; - mexCallMATLAB(1, out, 2, constructArgs, "constructGraph"); - return out[0]; -} - -#ifdef HAVE_MUELU_INTREPID2 -template <> -mxArray* saveDataToMatlab(RCP& data) { - int rank = data->rank(); - // NOTE: Only supports rank 2 arrays - if (rank != 2) - throw std::runtime_error("Error: Only rank two FieldContainers are supported."); - - int nr = data->extent(0); - int nc = data->extent(1); - - mwSize dims[] = {(mwSize)nr, (mwSize)nc}; - mxArray* mxa = mxCreateNumericArray(2, dims, mxINT32_CLASS, mxREAL); - int* array = (int*)mxGetData(mxa); - - for (int col = 0; col < nc; col++) { - for (int row = 0; row < nr; row++) { - array[col * nr + row] = (*data)(row, col); - } - } - return mxa; -} -#endif - -template -MuemexData::MuemexData(const mxArray* mxa) - : MuemexArg(getMuemexType()) { - data = loadDataFromMatlab(mxa); -} - -template -mxArray* MuemexData::convertToMatlab() { - return saveDataToMatlab(data); -} - -template -MuemexData::MuemexData(T& dataToCopy, MuemexType dataType) - : MuemexArg(dataType) { - data = dataToCopy; -} - -template -MuemexData::MuemexData(T& dataToCopy) - : MuemexData(dataToCopy, getMuemexType(dataToCopy)) {} - -template -T& MuemexData::getData() { - return data; -} - -template -void MuemexData::setData(T& newData) { - this->data = newData; -} - -/* ***************************** */ -/* More Template Functions */ -/* ***************************** */ - -template -void addLevelVariable(const T& data, std::string& name, Level& lvl, const Factory* fact) { - lvl.AddKeepFlag(name, fact, MueLu::UserData); - lvl.Set(name, data, fact); -} - -template -const T& getLevelVariable(std::string& name, Level& lvl) { - try { - return lvl.Get(name); - } catch (std::exception& e) { - throw std::runtime_error("Requested custom variable " + name + " is not in the level."); - } -} - -// Functions used to put data through matlab factories - first arg is "this" pointer of matlab factory -template -std::vector > processNeeds(const Factory* factory, std::string& needsParam, Level& lvl) { - using namespace std; - using namespace Teuchos; - typedef RCP > Matrix_t; - typedef RCP > MultiVector_t; - typedef RCP > Aggregates_t; - typedef RCP > AmalgamationInfo_t; - typedef RCP Graph_t; - vector needsList = tokenizeList(needsParam); - vector > args; - for (size_t i = 0; i < needsList.size(); i++) { - if (needsList[i] == "A" || needsList[i] == "P" || needsList[i] == "R" || needsList[i] == "Ptent") { - Matrix_t mydata = lvl.Get(needsList[i], factory->GetFactory(needsList[i]).get()); - args.push_back(rcp(new MuemexData(mydata))); - } else if (needsList[i] == "Nullspace" || needsList[i] == "Coordinates") { - MultiVector_t mydata = lvl.Get(needsList[i], factory->GetFactory(needsList[i]).get()); - args.push_back(rcp(new MuemexData(mydata))); - } else if (needsList[i] == "Aggregates") { - Aggregates_t mydata = lvl.Get(needsList[i], factory->GetFactory(needsList[i]).get()); - args.push_back(rcp(new MuemexData(mydata))); - } else if (needsList[i] == "UnAmalgamationInfo") { - AmalgamationInfo_t mydata = lvl.Get(needsList[i], factory->GetFactory(needsList[i]).get()); - args.push_back(rcp(new MuemexData(mydata))); - } else if (needsList[i] == "Level") { - int levelNum = lvl.GetLevelID(); - args.push_back(rcp(new MuemexData(levelNum))); - } else if (needsList[i] == "Graph") { - Graph_t mydata = lvl.Get(needsList[i], factory->GetFactory(needsList[i]).get()); - args.push_back(rcp(new MuemexData(mydata))); - } else { - vector words; - string badNameMsg = "Custom Muemex variables in \"Needs\" list require a type and a name, e.g. \"double myVal\". \n Leading and trailing spaces are OK. \n Don't know how to handle \"" + needsList[i] + "\".\n"; - // compare type without case sensitivity - char* buf = (char*)malloc(needsList[i].size() + 1); - strcpy(buf, needsList[i].c_str()); - for (char* iter = buf; *iter != ' '; iter++) { - if (*iter == 0) { - free(buf); - throw runtime_error(badNameMsg); - } - *iter = (char)tolower(*iter); - } - const char* wordDelim = " "; - char* mark = strtok(buf, wordDelim); - while (mark != NULL) { - string wordStr(mark); - words.push_back(wordStr); - mark = strtok(NULL, wordDelim); - } - if (words.size() != 2) { - free(buf); - throw runtime_error(badNameMsg); - } - char* typeStr = (char*)words[0].c_str(); - if (strstr(typeStr, "ordinalvector")) { - typedef RCP > LOVector_t; - LOVector_t mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "map")) { - typedef RCP > Map_t; - Map_t mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "scalar")) { - Scalar mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "double")) { - double mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "complex")) { - complex_t mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "matrix")) { - Matrix_t mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "multivector")) { - MultiVector_t mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "int")) { - int mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else if (strstr(typeStr, "string")) { - string mydata = getLevelVariable(needsList[i], lvl); - args.push_back(rcp(new MuemexData(mydata))); - } else { - free(buf); - throw std::runtime_error(words[0] + " is not a known variable type."); - } - free(buf); - } - } - return args; -} - -template -void processProvides(std::vector >& mexOutput, const Factory* factory, std::string& providesParam, Level& lvl) { - using namespace std; - using namespace Teuchos; - typedef RCP > Matrix_t; - typedef RCP > MultiVector_t; - typedef RCP > Aggregates_t; - typedef RCP > AmalgamationInfo_t; - typedef RCP Graph_t; - vector provides = tokenizeList(providesParam); - for (size_t i = 0; i < size_t(provides.size()); i++) { - if (provides[i] == "A" || provides[i] == "P" || provides[i] == "R" || provides[i] == "Ptent") { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - lvl.Set(provides[i], mydata->getData(), factory); - } else if (provides[i] == "Nullspace" || provides[i] == "Coordinates") { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - lvl.Set(provides[i], mydata->getData(), factory); - } else if (provides[i] == "Aggregates") { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - lvl.Set(provides[i], mydata->getData(), factory); - } else if (provides[i] == "UnAmalgamationInfo") { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - lvl.Set(provides[i], mydata->getData(), factory); - } else if (provides[i] == "Graph") { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - lvl.Set(provides[i], mydata->getData(), factory); - } else { - vector words; - string badNameMsg = "Custom Muemex variables in \"Provides\" list require a type and a name, e.g. \"double myVal\". \n Leading and trailing spaces are OK. \n Don't know how to handle \"" + provides[i] + "\".\n"; - // compare type without case sensitivity - char* buf = (char*)malloc(provides[i].size() + 1); - strcpy(buf, provides[i].c_str()); - for (char* iter = buf; *iter != ' '; iter++) { - if (*iter == 0) { - free(buf); - throw runtime_error(badNameMsg); - } - *iter = (char)tolower(*iter); - } - const char* wordDelim = " "; - char* mark = strtok(buf, wordDelim); - while (mark != NULL) { - string wordStr(mark); - words.push_back(wordStr); - mark = strtok(NULL, wordDelim); - } - if (words.size() != 2) { - free(buf); - throw runtime_error(badNameMsg); - } - const char* typeStr = words[0].c_str(); - if (strstr(typeStr, "ordinalvector")) { - typedef RCP > LOVector_t; - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "map")) { - typedef RCP > Map_t; - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "scalar")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "double")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "complex")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "matrix")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "multivector")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "int")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "bool")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else if (strstr(typeStr, "string")) { - RCP > mydata = Teuchos::rcp_static_cast >(mexOutput[i]); - addLevelVariable(mydata->getData(), words[1], lvl, factory); - } else { - free(buf); - throw std::runtime_error(words[0] + " is not a known variable type."); - } - free(buf); - } - } -} - -// Throwable Stubs for long long - -template <> -std::vector > processNeeds(const Factory* factory, std::string& needsParam, Level& lvl) { - throw std::runtime_error("Muemex does not support long long for global indices"); -} - -template <> -std::vector > processNeeds(const Factory* factory, std::string& needsParam, Level& lvl) { - throw std::runtime_error("Muemex does not support long long for global indices"); -} - -template <> -void processProvides(std::vector >& mexOutput, const Factory* factory, std::string& providesParam, Level& lvl) { - throw std::runtime_error("Muemex does not support long long for global indices"); -} - -template <> -void processProvides(std::vector >& mexOutput, const Factory* factory, std::string& providesParam, Level& lvl) { - throw std::runtime_error("Muemex does not support long long for global indices"); -} - -} // namespace MueLu -#endif // HAVE_MUELU_MATLAB error handler #endif // MUELU_MATLABUTILS_DEF_HPP guard diff --git a/packages/muelu/research/luc/region_algorithms/Driver_Structured_Regions.cpp b/packages/muelu/research/luc/region_algorithms/Driver_Structured_Regions.cpp index 4e894bd99068..e38b8582e37a 100644 --- a/packages/muelu/research/luc/region_algorithms/Driver_Structured_Regions.cpp +++ b/packages/muelu/research/luc/region_algorithms/Driver_Structured_Regions.cpp @@ -65,10 +65,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#endif - #include template diff --git a/packages/muelu/research/max/AdditiveMG/Test.cpp b/packages/muelu/research/max/AdditiveMG/Test.cpp deleted file mode 100644 index d8671754e0b6..000000000000 --- a/packages/muelu/research/max/AdditiveMG/Test.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include - -// Galeri -#include "Galeri_Maps.h" -#include "Galeri_CrsMatrices.h" -#include "Galeri_Utils.h" - -// MueLu -#include "MueLu.hpp" -#include -#include -#include -#include - -// Belos -#include -#include -#include -#include -#include - -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#include "mpi.h" -#else -#include "Epetra_SerialComm.h" -#endif -#include "Epetra_Map.h" -#include "Epetra_Vector.h" -#include "Epetra_CrsMatrix.h" -#include "Epetra_LinearProblem.h" -#include "Teuchos_ParameterList.hpp" - -using namespace Galeri; - -// =========== // -// main driver // -// =========== // - -int main(int argc, char* argv[]) { -#ifdef HAVE_MPI - MPI_Init(&argc, &argv); - Epetra_MpiComm Comm(MPI_COMM_WORLD); -#else - Epetra_SerialComm Comm; -#endif - - // Here we create the linear problem - // - // Matrix * LHS = RHS - // - // with Matrix arising from a 5-point formula discretization. - - Epetra_Map* Map = 0; - Epetra_RowMatrix* Matrix = 0; - - Teuchos::ParameterList GaleriList; - // dimension of the problem is nx x ny - GaleriList.set("nx", 10 * Comm.NumProc()); - GaleriList.set("ny", 10); - // total number of processors is mx x my - GaleriList.set("mx", Comm.NumProc()); - GaleriList.set("my", 1); - - try { - Map = CreateMap("Cartesian2D", Comm, GaleriList); - Matrix = CreateCrsMatrix("Laplace2D", Map, GaleriList); - Epetra_Vector ExactSolution(*Map); - ExactSolution.Random(); - Epetra_Vector LHS(*Map); - LHS.PutScalar(0.0); - Epetra_Vector RHS(*Map); - - Matrix->Multiply(false, ExactSolution, RHS); - - Epetra_LinearProblem Problem(Matrix, &LHS, &RHS); - - // at this point any object that understand Epetra_LinearProblem can be - // used, for example AztecOO, Amesos. IFPACK and ML can be used to define a - // preconditioner for Matrix. Here we use a simple solver, based on - // LAPACK, that is meant for simple testing only. - - Solve(Problem); - - // and we compute the norm of the true residual. - double ResidualNorm = ComputeNorm(Matrix, &LHS, &RHS); - - if (Comm.MyPID() == 0) - cout << ResidualNorm << endl; - - delete Map; - delete Matrix; - } catch (Galeri::Exception& rhs) { - if (Comm.MyPID() == 0) - rhs.Print(); - exit(EXIT_FAILURE); - } - -#ifdef HAVE_MPI - MPI_Finalize(); -#endif - - return (EXIT_SUCCESS); -} diff --git a/packages/muelu/research/max/XpetraSplitting/Test_muelu.cpp b/packages/muelu/research/max/XpetraSplitting/Test_muelu.cpp deleted file mode 100644 index 05dae657dde7..000000000000 --- a/packages/muelu/research/max/XpetraSplitting/Test_muelu.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include "Teuchos_Assert.hpp" -#include "Teuchos_LocalTestingHelpers.hpp" -#include -#include "Teuchos_ParameterList.hpp" - -// Xpetra -#include "Xpetra_Map.hpp" -#include "Xpetra_MapFactory.hpp" -#include "Xpetra_Matrix.hpp" -#include "Xpetra_CrsMatrixWrap.hpp" -#include "Xpetra_IO.hpp" -#include "Xpetra_MatrixSplitting.hpp" -#ifdef HAVE_XPETRA_TPETRA -#include "Xpetra_TpetraCrsMatrix.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif - -// Epetra -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#include "mpi.h" -#else -#include "Epetra_SerialComm.h" -#endif -#include "Epetra_Map.h" -#include "Epetra_Vector.h" -#include "Epetra_CrsMatrix.h" -#include "Epetra_LinearProblem.h" - -// MueLu -#include -#include -#include -#include - -// =========== // -// main driver // -// =========== // - -int main(int argc, char* argv[]) { - typedef double scalar_type; - typedef int local_ordinal_type; - typedef int global_ordinal_type; - typedef scalar_type Scalar; - typedef local_ordinal_type LocalOrdinal; - typedef global_ordinal_type GlobalOrdinal; - typedef Tpetra::KokkosClassic::DefaultNode::DefaultNodeType Node; - - typedef Xpetra::Matrix Matrix; - typedef Xpetra::MatrixSplitting MatrixSplitting; - typedef Xpetra::CrsMatrixWrap EpCrsMatrix; - - TEUCHOS_TEST_FOR_EXCEPT_MSG(argc < 2, "\nInvalid name for input matrix\n"); - - int numGlobalElements = 1; - - Teuchos::RCP > comm = Teuchos::DefaultComm::getComm(); - - // Create Xpetra map - Teuchos::RCP > xpetraMap; - xpetraMap = Xpetra::MapFactory::Build(Xpetra::UseEpetra, numGlobalElements, 0, comm); - - // Import matrix from an .mtx file into an Xpetra wrapper for an Epetra matrix - Teuchos::RCP > xpetraMatrix = Xpetra::IO::Read(argv[1], Xpetra::UseEpetra, comm); - // Export matrix from an Xpetra wrapper into an .mtx file - Xpetra::IO::Write("A_write.mtx", *xpetraMatrix); - - Teuchos::RCP xpetraMatrixSplitting; - - Teuchos::ParameterList xmlParams; - Teuchos::RCP > Hierarchy = MueLu::CreateXpetraPreconditioner((Teuchos::RCP)xpetraMatrixSplitting, xmlParams); - -#ifdef HAVE_MPI - MPI_Finalize(); -#endif - - return (EXIT_SUCCESS); -} diff --git a/packages/muelu/research/max/XpetraSplitting/Test_xpetra.cpp b/packages/muelu/research/max/XpetraSplitting/Test_xpetra.cpp deleted file mode 100644 index 5c604b0d5434..000000000000 --- a/packages/muelu/research/max/XpetraSplitting/Test_xpetra.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include "Teuchos_Assert.hpp" -#include "Teuchos_LocalTestingHelpers.hpp" -#include -#include "Teuchos_ParameterList.hpp" - -// Xpetra -#include "Xpetra_Map.hpp" -#include "Xpetra_MapFactory.hpp" -#include "Xpetra_Matrix.hpp" -#include "Xpetra_CrsMatrixWrap.hpp" -#include "Xpetra_IO.hpp" -#include "Xpetra_MatrixSplitting.hpp" -#include "Xpetra_RegionAMG_def.hpp" -#include "Xpetra_RegionHandler_def.hpp" -#ifdef HAVE_XPETRA_TPETRA -#include "Xpetra_TpetraCrsMatrix.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif - -// Epetra -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#include "mpi.h" -#else -#include "Epetra_SerialComm.h" -#endif -#include "Epetra_Map.h" -#include "Epetra_Vector.h" -#include "Epetra_CrsMatrix.h" -#include "Epetra_LinearProblem.h" - -// =========== // -// main driver // -// =========== // - -int main(int argc, char* argv[]) { - typedef double scalar_type; - typedef int local_ordinal_type; - typedef int global_ordinal_type; - typedef scalar_type Scalar; - typedef local_ordinal_type LocalOrdinal; - typedef global_ordinal_type GlobalOrdinal; - typedef Tpetra::KokkosClassic::DefaultNode::DefaultNodeType Node; - - typedef Xpetra::MultiVector multivector_type; - typedef Xpetra::MatrixSplitting tpetra_splitting; - -#ifdef HAVE_MPI - MPI_Init(&argc, &argv); - Epetra_MpiComm CommEpetra(MPI_COMM_WORLD); -#else - Epetra_SerialComm CommEpetra; -#endif - - // Here we create the linear problem - // - // Matrix * LHS = RHS - // - // with Matrix arising from a 5-point formula discretization. - - TEUCHOS_TEST_FOR_EXCEPT_MSG(argc < 4, "\nInvalid name for input matrix and output file\n"); - - Teuchos::RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - - // process command line arguments - const char* xmlFileName = argv[1]; - const char* matrixFileName = argv[2]; - const char* mappingFileName = argv[3]; - - Teuchos::ParameterList xmlParams; - Teuchos::ParameterList mueluParams; - Teuchos::updateParametersFromXmlFile(argv[1], Teuchos::inoutArg(mueluParams)); - - Teuchos::RCP > comm = Teuchos::DefaultComm::getComm(); - if (CommEpetra.MyPID() == 0) - std::cout << "Number of processors: " << CommEpetra.NumProc() << std::endl; - - // SplittingDriver - /*Xpetra::SplittingDriver driver("node.txt", comm); - Teuchos::Array elementlist = driver.GetGlobalRowMap(); - driver.printInactive(); - Xpetra::MatrixSplitting xpetraWrapper( argv[1], argv[2], comm ); - std::string output_file="A_write.mtx"; - xpetraWrapper.writeGlobalMatrix(); - xpetraWrapper.writeRegionMatrices();*/ - - // Teuchos::RCP > A; - // A = Xpetra::IO::Read(argv[2], Xpetra::UseTpetra, comm); - - // Create the RegionHandler to deal with mappings of nodes to regions etc. - Teuchos::RCP > regionHandler = Teuchos::rcp(new Xpetra::RegionHandler(mappingFileName, comm)); - Teuchos::Array elementlist = regionHandler->GetGlobalRowMap(); - std::size_t num_total_elements = regionHandler->GetNumGlobalElements(); - std::size_t num_total_regions = regionHandler->GetNumTotalRegions(); - - // Read and split the matrix - Teuchos::RCP matrixSplitting = Teuchos::rcp(new tpetra_splitting(matrixFileName, regionHandler, comm)); - - // Create region-wise AMG hierarchy - int max_num_levels = 4; - int coarsening_factor = 3; - Xpetra::RegionAMG preconditioner(matrixSplitting, regionHandler, comm, mueluParams, max_num_levels, coarsening_factor); - - // // Setup vectors for test problem - // Teuchos::RCP X = Xpetra::MultiVectorFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Build(preconditioner.getDomainMap(), 1) ; - // Teuchos::RCP Y = Xpetra::MultiVectorFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Build(preconditioner.getRangeMap(), 1) ; - // X->randomize(); - // Y->putScalar((scalar_type) 0.0); - // - // // Apply the preconditioner - // preconditioner.apply(*X,*Y); - // - // // Output result to screen - // Y->describe(*out, Teuchos::VERB_EXTREME); - -#ifdef HAVE_MPI - MPI_Finalize(); -#endif - - return (EXIT_SUCCESS); -} diff --git a/packages/muelu/research/q2q1/CMakeLists.txt b/packages/muelu/research/q2q1/CMakeLists.txt index 8e15e0f92382..cea536852fad 100644 --- a/packages/muelu/research/q2q1/CMakeLists.txt +++ b/packages/muelu/research/q2q1/CMakeLists.txt @@ -5,8 +5,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) IF ( NOT MueLu_ENABLE_EXPLICIT_INSTANTIATION OR (MueLu_ENABLE_EXPLICIT_INSTANTIATION AND MueLu_TPETRA_INST_INT_INT) ) IF (${PACKAGE_NAME}_ENABLE_ThyraTpetraAdapters AND ${PACKAGE_NAME}_ENABLE_Teko) - IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) + IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( Q2Q1 @@ -33,11 +32,6 @@ IF ( NOT MueLu_ENABLE_EXPLICIT_INSTANTIATION OR (MueLu_ENABLE_EXPLICIT_INSTANTIA # XPETRA_ADD_TEST_TPETRA(Q2Q1 1) # ENDIF() - # IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos AND ${PACKAGE_NAME}_ENABLE_ThyraTpetraAdapters AND ${PACKAGE_NAME}_ENABLE_Teko) - # # Disabling Epetra as Vanka is unavailable - # # XPETRA_ADD_TEST_EPETRA(Q2Q1 1) - # ENDIF() - ENDIF() ENDIF() diff --git a/packages/muelu/research/regionMG/src/SetupRegionHierarchy_def.hpp b/packages/muelu/research/regionMG/src/SetupRegionHierarchy_def.hpp index a4ed28627bd7..5c8beb322b05 100644 --- a/packages/muelu/research/regionMG/src/SetupRegionHierarchy_def.hpp +++ b/packages/muelu/research/regionMG/src/SetupRegionHierarchy_def.hpp @@ -38,10 +38,8 @@ #include "SetupRegionMatrix_def.hpp" #include "SetupRegionSmoothers_def.hpp" -#if defined(HAVE_MUELU_AMESOS2) #include #include -#endif using Teuchos::Array; using Teuchos::ArrayRCP; diff --git a/packages/muelu/research/regionMG/src/SolveRegionHierarchy_def.hpp b/packages/muelu/research/regionMG/src/SolveRegionHierarchy_def.hpp index db287cf2ebc7..47270af5087e 100644 --- a/packages/muelu/research/regionMG/src/SolveRegionHierarchy_def.hpp +++ b/packages/muelu/research/regionMG/src/SolveRegionHierarchy_def.hpp @@ -179,7 +179,6 @@ void MgCycle(const int levelID, ///< ID of current level } if (coarseSolverType == "direct") { -#if defined(HAVE_MUELU_AMESOS2) using DirectCoarseSolver = Amesos2::Solver, Tpetra::MultiVector>; RCP coarseSolver = coarseSolverData->get>("direct solver object"); @@ -216,13 +215,6 @@ void MgCycle(const int levelID, ///< ID of current level "but actually is missing. Anyway ... just do it right now." << std::endl; coarseSolver->solve(tX.ptr(), tB.ptr()); -#else - *fos << "+++++++++++++++++++++++++++ WARNING +++++++++++++++++++++++++\n" - << "+ Coarse level direct solver requires Tpetra and Amesos2. +\n" - << "+ Skipping the coarse level solve. +\n" - << "+++++++++++++++++++++++++++ WARNING +++++++++++++++++++++++++" - << std::endl; -#endif } else if (coarseSolverType == "amg") // use AMG as coarse level solver { const bool coarseSolverRebalance = coarseSolverData->get("coarse solver rebalance"); diff --git a/packages/muelu/research/regionMG/test/structured/Driver_Structured_Regions.cpp b/packages/muelu/research/regionMG/test/structured/Driver_Structured_Regions.cpp index 39303a4553ca..f5de2295303c 100644 --- a/packages/muelu/research/regionMG/test/structured/Driver_Structured_Regions.cpp +++ b/packages/muelu/research/regionMG/test/structured/Driver_Structured_Regions.cpp @@ -71,16 +71,11 @@ #include // Xpetra Epetra stack -#ifdef HAVE_MUELU_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#endif #include -#if defined(HAVE_MUELU_AMESOS2) #include #include -#endif // Region MG headers #include "SetupRegionUtilities.hpp" diff --git a/packages/muelu/research/semicoarsening/CMakeLists.txt b/packages/muelu/research/semicoarsening/CMakeLists.txt index ba8304f6107e..0fe1b80837ac 100644 --- a/packages/muelu/research/semicoarsening/CMakeLists.txt +++ b/packages/muelu/research/semicoarsening/CMakeLists.txt @@ -1,8 +1,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../test/unit_tests) -IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) +IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( SemiCoarsening @@ -14,4 +13,3 @@ IF((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR SOURCE_FILES driver1.xml ) ENDIF() - diff --git a/packages/muelu/research/tawiesn/aria/CMakeLists.txt b/packages/muelu/research/tawiesn/aria/CMakeLists.txt index 7a4541b6f53e..deae39c11ab8 100644 --- a/packages/muelu/research/tawiesn/aria/CMakeLists.txt +++ b/packages/muelu/research/tawiesn/aria/CMakeLists.txt @@ -3,8 +3,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) + IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( AriaDriver diff --git a/packages/muelu/research/tawiesn/aria/Driver.cpp b/packages/muelu/research/tawiesn/aria/Driver.cpp index 957e99b04642..fabc1dde5aa0 100644 --- a/packages/muelu/research/tawiesn/aria/Driver.cpp +++ b/packages/muelu/research/tawiesn/aria/Driver.cpp @@ -434,11 +434,7 @@ int main(int argc, char* argv[]) { Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - return main_(clp, lib, argc, argv); -#else throw MueLu::Exceptions::RuntimeError("Epetra is not available"); -#endif } if (lib == Xpetra::UseTpetra) { diff --git a/packages/muelu/research/tawiesn/crada/CMakeLists.txt b/packages/muelu/research/tawiesn/crada/CMakeLists.txt index 4c6782db0b87..b14f33b588b9 100644 --- a/packages/muelu/research/tawiesn/crada/CMakeLists.txt +++ b/packages/muelu/research/tawiesn/crada/CMakeLists.txt @@ -4,8 +4,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../test/unit_tests - IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) + IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( CradaDriver diff --git a/packages/muelu/src/CMakeLists.txt b/packages/muelu/src/CMakeLists.txt index 99b81b1109c6..c924bcd253f4 100644 --- a/packages/muelu/src/CMakeLists.txt +++ b/packages/muelu/src/CMakeLists.txt @@ -59,9 +59,6 @@ TRIBITS_INCLUDE_DIRECTORIES(${DIR}/Utils) TRIBITS_INCLUDE_DIRECTORIES(${DIR}/Utils/ForwardDeclaration) TRIBITS_INCLUDE_DIRECTORIES(${DIR}/../adapters/xpetra) TRIBITS_INCLUDE_DIRECTORIES(${DIR}/../adapters/tpetra) -IF (${PACKAGE_NAME}_ENABLE_Epetra) - TRIBITS_INCLUDE_DIRECTORIES(${DIR}/../adapters/epetra) -ENDIF() IF (${PACKAGE_NAME}_ENABLE_AmgX) TRIBITS_INCLUDE_DIRECTORIES(${DIR}/../adapters/amgx) ENDIF() @@ -92,7 +89,6 @@ FUNCTION(MUELU_PROCESS_ETI_TEMPLATE TEMPLATE_FILE_DIR ETI_CLASSES PROCESSED_FILE # Make sure that Tpetra actually defined these variables, even if they # are empty. - # TODO: workaround for Tpetra is disabled but Epetra is enabled? ASSERT_DEFINED(TpetraCore_ETI_SCALARS) ASSERT_DEFINED(TpetraCore_ETI_LORDS) ASSERT_DEFINED(TpetraCore_ETI_GORDS) @@ -122,15 +118,6 @@ FUNCTION(MUELU_PROCESS_ETI_TEMPLATE TEMPLATE_FILE_DIR ETI_CLASSES PROCESSED_FILE #MESSAGE("MueLu_ETI_GORDS = ${MueLu_ETI_GORDS}") #MESSAGE("MueLu_ETI_NODES = ${MueLu_ETI_NODES}") - # check whether both Epetra and Tpetra are enabled - SET(MueLu_ETI_EpetraGuards "") - SET(MueLu_ETI_EpetraGuards_END "") - IF (${PACKAGE_NAME}_ENABLE_Epetra) - # both Epetra and Tpetra are enabled. The Epetra instantiation needs to be guarded - SET(MueLu_ETI_EpetraGuards "#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))") - SET(MueLu_ETI_EpetraGuards_END "#endif") - ENDIF() - # loop over all ETI_CLASSES SET(SRCS "") FOREACH(CLASS ${ETI_CLASSES}) @@ -159,20 +146,6 @@ FUNCTION(MUELU_PROCESS_ETI_TEMPLATE TEMPLATE_FILE_DIR ETI_CLASSES PROCESSED_FILE string(TOUPPER "${CLASS_FILE_NAME}" UPPER_CASE_CLASS) string(REPLACE "CLASS_FILE_NAME" "${CLASS_FILE_NAME}" FINAL_FILE_NAME "${PROCESSED_FILE}") - # If Epetra is enabled, instantiate it on - # Note: no Epetra64 support in MueLu - # EpetraNode is defined in the template file depending on the enabled - # Kokkos nodes (either Serial or OpenMP) - IF (${PACKAGE_NAME}_ENABLE_Epetra) - IF(${SKIP_SCALAR_INSTANTIATION}) - CONFIGURE_FILE("${TEMPLATE_FILE_DIR}/MueLu_ETI_LO_GO_NO_Epetra.tmpl" ${FINAL_FILE_NAME}_Epetra.cpp) - SET(SRCS ${SRCS} ${FINAL_FILE_NAME}_Epetra.cpp) - ELSE() - CONFIGURE_FILE("${TEMPLATE_FILE_DIR}/MueLu_ETI_SC_LO_GO_NO_Epetra.tmpl" ${FINAL_FILE_NAME}_Epetra.cpp) - SET(SRCS ${SRCS} ${FINAL_FILE_NAME}_Epetra.cpp) - ENDIF() - ENDIF() - # Create the cpp file for all combinations of template parameters FOREACH(NT ${MueLu_ETI_NODES}) TPETRA_MANGLE_TEMPLATE_PARAMETER(NT_MANGLED "${NT}") diff --git a/packages/muelu/src/Graph/MatrixTransformation/MueLu_CoalesceDropFactory_def.hpp b/packages/muelu/src/Graph/MatrixTransformation/MueLu_CoalesceDropFactory_def.hpp index 0b7e1d89d800..81fad1c19645 100644 --- a/packages/muelu/src/Graph/MatrixTransformation/MueLu_CoalesceDropFactory_def.hpp +++ b/packages/muelu/src/Graph/MatrixTransformation/MueLu_CoalesceDropFactory_def.hpp @@ -39,9 +39,7 @@ #include "MueLu_PreDropFunctionConstVal.hpp" #include "MueLu_Utilities.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Tpetra_CrsGraphTransposer.hpp" -#endif #include #include @@ -1912,7 +1910,6 @@ void CoalesceDropFactory::BlockDiagon outputGraph->SetBoundaryNodeMap(inputGraph->GetBoundaryNodeMap()); } else { TEUCHOS_ASSERT(inputGraph->GetDomainMap()->lib() == Xpetra::UseTpetra); -#ifdef HAVE_XPETRA_TPETRA auto outputGraph2 = rcp(new LWGraph(rows_graph, Kokkos::subview(columns, Kokkos::make_pair(0, realnnz)), inputGraph->GetDomainMap(), inputGraph->GetImportMap(), "block-diagonalized graph of A")); auto tpGraph = Xpetra::toTpetra(rcp_const_cast(outputGraph2->GetCrsGraph())); @@ -1927,7 +1924,6 @@ void CoalesceDropFactory::BlockDiagon rows_graphSym(row) = rowsSym(row); outputGraph = rcp(new LWGraph(rows_graphSym, colIndsSym, inputGraph->GetDomainMap(), Xpetra::toXpetra(tpGraphSym->getColMap()), "block-diagonalized graph of A")); outputGraph->SetBoundaryNodeMap(inputGraph->GetBoundaryNodeMap()); -#endif } } diff --git a/packages/muelu/src/Interface/MueLu_AdaptiveSaMLParameterListInterpreter_def.hpp b/packages/muelu/src/Interface/MueLu_AdaptiveSaMLParameterListInterpreter_def.hpp index 123383c997e3..b094c52f72c8 100644 --- a/packages/muelu/src/Interface/MueLu_AdaptiveSaMLParameterListInterpreter_def.hpp +++ b/packages/muelu/src/Interface/MueLu_AdaptiveSaMLParameterListInterpreter_def.hpp @@ -20,9 +20,6 @@ #include #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) -#include -#endif #include #include diff --git a/packages/muelu/src/Interface/MueLu_FactoryFactory_def.hpp b/packages/muelu/src/Interface/MueLu_FactoryFactory_def.hpp index cc144b4366fe..e622ab51eb96 100644 --- a/packages/muelu/src/Interface/MueLu_FactoryFactory_def.hpp +++ b/packages/muelu/src/Interface/MueLu_FactoryFactory_def.hpp @@ -243,11 +243,7 @@ RCP FactoryFactory #endif // HAVE_MUELU_ZOLTAN2 && HAVE_MPI } if (factoryName == "IsorropiaInterface") { -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) - return Build2(paramList, factoryMapIn, factoryManagersIn); -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "MueLu::FactoryFactory:BuildFactory(): Cannot create a IsorropiaInterface object: Isorropia is disabled: HAVE_MUELU_ISORROPIA && HAVE_MPI == false."); -#endif // HAVE_MUELU_ZOLTAN2 && HAVE_MPI } if (factoryName == "NodePartitionInterface") { diff --git a/packages/muelu/src/Interface/MueLu_ML2MueLuParameterTranslator.cpp b/packages/muelu/src/Interface/MueLu_ML2MueLuParameterTranslator.cpp index 7589c6830464..ce091a712aee 100644 --- a/packages/muelu/src/Interface/MueLu_ML2MueLuParameterTranslator.cpp +++ b/packages/muelu/src/Interface/MueLu_ML2MueLuParameterTranslator.cpp @@ -8,14 +8,6 @@ // @HEADER #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_ML) -#include -#if defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) -#include -#include // for default values -#include -#endif -#endif #include @@ -313,29 +305,10 @@ std::string ML2MueLuParameterTranslator::SetParameterList(const Teuchos::Paramet RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); // TODO: use internal out (GetOStream()) -#if defined(HAVE_MUELU_ML) && defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) - - // TODO alternative with standard parameterlist from ML user guide? - - if (defaultVals != "") { - TEUCHOS_TEST_FOR_EXCEPTION(defaultVals != "SA" && defaultVals != "NSSA" && defaultVals != "refmaxwell" && defaultVals != "Maxwell", Exceptions::RuntimeError, - "MueLu::MLParameterListInterpreter: only \"SA\", \"NSSA\", \"refmaxwell\" and \"Maxwell\" allowed as options for ML default parameters."); - Teuchos::ParameterList ML_defaultlist; - if (defaultVals == "refmaxwell") - ML_Epetra::SetDefaultsRefMaxwell(ML_defaultlist); - else - ML_Epetra::SetDefaults(defaultVals, ML_defaultlist); - - // merge user parameters with default parameters - MueLu::MergeParameterList(paramList_in, ML_defaultlist, true); - paramList = ML_defaultlist; - } -#else if (defaultVals != "") { // If no validator available: issue a warning and set parameter value to false in the output list *out << "Warning: MueLu_ENABLE_ML=OFF, ML_ENABLE_Epetra=OFF or ML_ENABLE_TEUCHOS=OFF. No ML default values available." << std::endl; } -#endif // HAVE_MUELU_ML && HAVE_ML_EPETRA && HAVE_ML_TEUCHOS // // Move smoothers/aggregation/coarse parameters to sublists @@ -355,17 +328,10 @@ std::string ML2MueLuParameterTranslator::SetParameterList(const Teuchos::Paramet { bool validate = paramList.get("ML validate parameter list", true); /* true = default in ML */ if (validate && defaultVals != "refmaxwell") { -#if defined(HAVE_MUELU_ML) && defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) - // Validate parameter list using ML validator - int depth = paramList.get("ML validate depth", 5); /* 5 = default in ML */ - TEUCHOS_TEST_FOR_EXCEPTION(!ML_Epetra::ValidateMLPParameters(paramList, depth), Exceptions::RuntimeError, - "ERROR: ML's Teuchos::ParameterList contains incorrect parameter!"); -#else // If no validator available: issue a warning and set parameter value to false in the output list *out << "Warning: MueLu_ENABLE_ML=OFF, ML_ENABLE_Epetra=OFF or ML_ENABLE_TEUCHOS=OFF. The parameter list cannot be validated." << std::endl; paramList.set("ML validate parameter list", false); -#endif // HAVE_MUELU_ML && HAVE_ML_EPETRA && HAVE_ML_TEUCHOS } // if(validate) } // scope diff --git a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_decl.hpp b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_decl.hpp index b1cc80c1181d..96dc426f1a77 100644 --- a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_decl.hpp +++ b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_decl.hpp @@ -39,15 +39,6 @@ #include "MueLu_NullspaceFactory_fwd.hpp" #include "MueLu_FactoryBase_fwd.hpp" -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) -#include "MueLu_RepartitionHeuristicFactory_fwd.hpp" -#include "MueLu_RepartitionFactory_fwd.hpp" -#include "MueLu_RebalanceTransferFactory_fwd.hpp" -#include "MueLu_IsorropiaInterface_fwd.hpp" -#include "MueLu_RebalanceAcFactory_fwd.hpp" -#include "MueLu_RebalanceMapFactory_fwd.hpp" -#endif - #ifdef HAVE_MUELU_DEPRECATED_CODE #ifndef TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS #warning "The header file MueLu_MLParameterListInterpreter.hpp is deprecated" diff --git a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp index 09eb4bc28e60..053627c4b25a 100644 --- a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp +++ b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp @@ -13,9 +13,6 @@ #include #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_ML) -#include -#endif #include #include @@ -51,16 +48,6 @@ // #include "MueLu_CoordinatesTransferFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) -#include "MueLu_IsorropiaInterface.hpp" -#include "MueLu_RepartitionHeuristicFactory.hpp" -#include "MueLu_RepartitionFactory.hpp" -#include "MueLu_RebalanceTransferFactory.hpp" -#include "MueLu_RepartitionInterface.hpp" -#include "MueLu_RebalanceAcFactory.hpp" -//#include "MueLu_RebalanceMapFactory.hpp" -#endif - // Note: do not add options that are only recognized by MueLu. // TODO: this parameter list interpreter should force MueLu to use default ML parameters @@ -174,17 +161,10 @@ void MLParameterListInterpreter::SetP { bool validate = paramList.get("ML validate parameter list", true); /* true = default in ML */ if (validate) { -#if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) - // Validate parameter list using ML validator - int depth = paramList.get("ML validate depth", 5); /* 5 = default in ML */ - TEUCHOS_TEST_FOR_EXCEPTION(!ML_Epetra::ValidateMLPParameters(paramList, depth), Exceptions::RuntimeError, - "ERROR: ML's Teuchos::ParameterList contains incorrect parameter!"); -#else // If no validator available: issue a warning and set parameter value to false in the output list this->GetOStream(Warnings0) << "Warning: MueLu_ENABLE_ML=OFF. The parameter list cannot be validated." << std::endl; paramList.set("ML validate parameter list", false); -#endif // HAVE_MUELU_ML } // if(validate) } // scope @@ -272,79 +252,10 @@ void MLParameterListInterpreter::SetP // // introduce rebalancing // -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) - Teuchos::RCP RebalancedPFact = Teuchos::null; - Teuchos::RCP RebalancedRFact = Teuchos::null; - Teuchos::RCP RepartitionFact = Teuchos::null; - Teuchos::RCP RebalancedAFact = Teuchos::null; - - MUELU_READ_PARAM(paramList, "repartition: enable", int, 0, bDoRepartition); - if (bDoRepartition == 1) { - // The Factory Manager will be configured to return the rebalanced versions of P, R, A by default. - // Everytime we want to use the non-rebalanced versions, we need to explicitly define the generating factory. - RFact->SetFactory("P", PFact); - // - AcFact->SetFactory("P", PFact); - AcFact->SetFactory("R", RFact); - - // define rebalancing factory for coarse matrix - Teuchos::RCP > rebAmalgFact = Teuchos::rcp(new MueLu::AmalgamationFactory()); - rebAmalgFact->SetFactory("A", AcFact); - - MUELU_READ_PARAM(paramList, "repartition: max min ratio", double, 1.3, maxminratio); - MUELU_READ_PARAM(paramList, "repartition: min per proc", int, 512, minperproc); - - // Repartitioning heuristic - RCP RepartitionHeuristicFact = Teuchos::rcp(new RepartitionHeuristicFactory()); - { - Teuchos::ParameterList paramListRepFact; - paramListRepFact.set("repartition: min rows per proc", minperproc); - paramListRepFact.set("repartition: max imbalance", maxminratio); - RepartitionHeuristicFact->SetParameterList(paramListRepFact); - } - RepartitionHeuristicFact->SetFactory("A", AcFact); - - // create "Partition" - Teuchos::RCP > isoInterface = Teuchos::rcp(new MueLu::IsorropiaInterface()); - isoInterface->SetFactory("A", AcFact); - isoInterface->SetFactory("number of partitions", RepartitionHeuristicFact); - isoInterface->SetFactory("UnAmalgamationInfo", rebAmalgFact); - - // create "Partition" by unamalgamtion - Teuchos::RCP > repInterface = Teuchos::rcp(new MueLu::RepartitionInterface()); - repInterface->SetFactory("A", AcFact); - repInterface->SetFactory("number of partitions", RepartitionHeuristicFact); - repInterface->SetFactory("AmalgamatedPartition", isoInterface); - // repInterface->SetFactory("UnAmalgamationInfo", rebAmalgFact); // not necessary? - - // Repartitioning (creates "Importer" from "Partition") - RepartitionFact = Teuchos::rcp(new RepartitionFactory()); - RepartitionFact->SetFactory("A", AcFact); - RepartitionFact->SetFactory("number of partitions", RepartitionHeuristicFact); - RepartitionFact->SetFactory("Partition", repInterface); - - // Reordering of the transfer operators - RebalancedPFact = Teuchos::rcp(new RebalanceTransferFactory()); - RebalancedPFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Interpolation"))); - RebalancedPFact->SetFactory("P", PFact); - RebalancedPFact->SetFactory("Nullspace", PtentFact); - RebalancedPFact->SetFactory("Importer", RepartitionFact); - - RebalancedRFact = Teuchos::rcp(new RebalanceTransferFactory()); - RebalancedRFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Restriction"))); - RebalancedRFact->SetFactory("R", RFact); - RebalancedRFact->SetFactory("Importer", RepartitionFact); - - // Compute Ac from rebalanced P and R - RebalancedAFact = Teuchos::rcp(new RebalanceAcFactory()); - RebalancedAFact->SetFactory("A", AcFact); - } -#else // #ifdef HAVE_MUELU_ISORROPIA // Get rid of [-Wunused] warnings //(void) // // ^^^ FIXME (mfh 17 Nov 2013) That definitely doesn't compile. -#endif // // Nullspace factory @@ -433,22 +344,10 @@ void MLParameterListInterpreter::SetP manager->SetFactory("DofsPerNode", dropFact); manager->SetFactory("Ptent", PtentFact); -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) - if (bDoRepartition == 1) { - manager->SetFactory("A", RebalancedAFact); - manager->SetFactory("P", RebalancedPFact); - manager->SetFactory("R", RebalancedRFact); - manager->SetFactory("Nullspace", RebalancedPFact); - manager->SetFactory("Importer", RepartitionFact); - } else { -#endif // #ifdef HAVE_MUELU_ISORROPIA manager->SetFactory("Nullspace", nspFact); // use same nullspace factory throughout all multigrid levels manager->SetFactory("A", AcFact); // same RAP factory for all levels manager->SetFactory("P", PFact); // same prolongator and restrictor factories for all levels manager->SetFactory("R", RFact); // same prolongator and restrictor factories for all levels -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) - } -#endif this->AddFactoryManager(levelID, 1, manager); } // for (level loop) @@ -621,31 +520,7 @@ MLParameterListInterpreter:: } else if (type == "IFPACK") { // TODO: this option is not described in the ML Guide v5.0 -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - ifpackType = paramList.get("smoother: ifpack type"); - - if (ifpackType == "ILU") { - // TODO fix this (type mismatch double vs. int) - // MUELU_COPY_PARAM(paramList, "smoother: ifpack level-of-fill", double /*int*/, 0.0 /*2*/, smootherParamList, "fact: level-of-fill"); - if (paramList.isParameter("smoother: ifpack level-of-fill")) - smootherParamList.set("fact: level-of-fill", Teuchos::as(paramList.get("smoother: ifpack level-of-fill"))); - else - smootherParamList.set("fact: level-of-fill", as(0)); - - MUELU_COPY_PARAM(paramList, "smoother: ifpack overlap", int, 2, smootherParamList, "partitioner: overlap"); - - // TODO change to TrilinosSmoother as soon as Ifpack2 supports all preconditioners from Ifpack - smooProto = - MueLu::GetIfpackSmoother(ifpackType, - smootherParamList, - paramList.get("smoother: ifpack overlap")); - smooProto->SetFactory("A", AFact); - } else { - TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "MueLu::MLParameterListInterpreter: unknown ML smoother type " + type + " (IFPACK) not supported by MueLu. Only ILU is supported."); - } -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "MueLu::MLParameterListInterpreter: MueLu compiled without Ifpack support"); -#endif } else if (type.length() > strlen("Amesos") && type.substr(0, strlen("Amesos")) == "Amesos") { /* catch Amesos-* */ std::string solverType = type.substr(strlen("Amesos") + 1); /* ("Amesos-KLU" -> "KLU") */ diff --git a/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp b/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp index 54ba2b31c9d7..d39dc70e11ed 100644 --- a/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp +++ b/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp @@ -564,7 +564,6 @@ void RefMaxwell::compute(bool reuse) rcp_dynamic_cast(Dk_1_)->getCrsMatrix()->replaceDomainMapAndImporter(Importer22_->getTargetMap(), ImporterD); } -#ifdef HAVE_MUELU_TPETRA if ((!Dk_1_T_.is_null()) && (!R11_.is_null()) && (!rcp_dynamic_cast(Dk_1_T_)->getCrsMatrix()->getCrsGraph()->getImporter().is_null()) && @@ -573,7 +572,6 @@ void RefMaxwell::compute(bool reuse) (R11_->getColMap()->lib() == Xpetra::UseTpetra)) Dk_1_T_R11_colMapsMatch_ = Dk_1_T_->getColMap()->isSameAs(*R11_->getColMap()); else -#endif Dk_1_T_R11_colMapsMatch_ = false; if (Dk_1_T_R11_colMapsMatch_) GetOStream(Runtime0) << solverName_ + "::compute(): Dk_1_T and R11 have matching colMaps" << std::endl; diff --git a/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_decl.hpp b/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_decl.hpp index 81bd77212eb1..725dd32736b5 100644 --- a/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_decl.hpp +++ b/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_decl.hpp @@ -25,10 +25,6 @@ #include #include //TODO -#ifdef HAVE_MUELU_EPETRA -#include -#endif - #include "MueLu_SingleLevelFactoryBase.hpp" #include "MueLu_Level_fwd.hpp" diff --git a/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_def.hpp b/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_def.hpp index d1909c5eb8bb..d675b10eb7ea 100644 --- a/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_def.hpp +++ b/packages/muelu/src/Rebalancing/MueLu_IsorropiaInterface_def.hpp @@ -28,18 +28,6 @@ #include #include -#ifdef HAVE_MUELU_ISORROPIA -#include - -#ifdef HAVE_MUELU_EPETRA -#include -#include -#include -#endif - -#include -#endif // ENDIF HAVE_MUELU_ISORROPIA - #include "MueLu_Level.hpp" #include "MueLu_Exceptions.hpp" #include "MueLu_Monitor.hpp" @@ -177,53 +165,6 @@ void IsorropiaInterface::Build(Level& level) crsGraph->fillComplete(nodeMap, nodeMap); #ifdef HAVE_MPI -#ifdef HAVE_MUELU_ISORROPIA - - // prepare parameter list for Isorropia - Teuchos::ParameterList paramlist; - paramlist.set("NUM PARTS", toString(numParts)); - - /*STRUCTURALLY SYMMETRIC [NO/yes] (is symmetrization required?) - PARTITIONING METHOD [block/cyclic/random/rcb/rib/hsfc/graph/HYPERGRAPH] - NUM PARTS [int k] (global number of parts) - IMBALANCE TOL [float tol] (1.0 is perfect balance) - BALANCE OBJECTIVE [ROWS/nonzeros] - */ - Teuchos::ParameterList& sublist = paramlist.sublist("Zoltan"); - sublist.set("LB_APPROACH", "PARTITION"); - -#ifdef HAVE_MUELU_EPETRA - RCP > epCrsGraph = Teuchos::rcp_dynamic_cast >(crsGraph); - if (epCrsGraph != Teuchos::null) { - RCP epetraCrsGraph = epCrsGraph->getEpetra_CrsGraph(); - - RCP isoPart = Teuchos::rcp(new Isorropia::Epetra::Partitioner(epetraCrsGraph, paramlist)); - - int size = 0; - const int* array = NULL; - isoPart->extractPartsView(size, array); - - TEUCHOS_TEST_FOR_EXCEPTION(size != Teuchos::as(nodeMap->getLocalNumElements()), Exceptions::RuntimeError, "length of array returned from extractPartsView does not match local length of rowMap"); - - RCP > decomposition = Xpetra::VectorFactory::Build(nodeMap, false); - ArrayRCP decompEntries = decomposition->getDataNonConst(0); - - // fill vector with amalgamated information about partitioning - for (int i = 0; i < size; i++) { - decompEntries[i] = Teuchos::as(array[i]); - } - - Set(level, "AmalgamatedPartition", decomposition); - } -#endif // ENDIF HAVE_MUELU_EPETRA - -#ifdef HAVE_MUELU_INST_DOUBLE_INT_INT - RCP > tpCrsGraph = Teuchos::rcp_dynamic_cast >(crsGraph); - TEUCHOS_TEST_FOR_EXCEPTION(tpCrsGraph != Teuchos::null, Exceptions::RuntimeError, "Tpetra is not supported with Isorropia."); -#else - TEUCHOS_TEST_FOR_EXCEPTION(false, Exceptions::RuntimeError, "Isorropia is an interface to Zoltan which only has support for LO=GO=int and SC=double."); -#endif // ENDIF HAVE_MUELU_INST_DOUBLE_INT_INT -#endif // HAVE_MUELU_ISORROPIA #else // if we don't have MPI // Running on one processor, so decomposition is the trivial one, all zeros. diff --git a/packages/muelu/src/Rebalancing/MueLu_Zoltan2Interface_decl.hpp b/packages/muelu/src/Rebalancing/MueLu_Zoltan2Interface_decl.hpp index 9fe2b98468d7..9eee3b6ddb34 100644 --- a/packages/muelu/src/Rebalancing/MueLu_Zoltan2Interface_decl.hpp +++ b/packages/muelu/src/Rebalancing/MueLu_Zoltan2Interface_decl.hpp @@ -109,100 +109,6 @@ class Zoltan2Interface : public SingleLevelFactoryBase { }; // class Zoltan2Interface -#ifdef HAVE_MUELU_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -#if defined(HAVE_MUELU_ZOLTAN) -// Stub partial specialization of Zoltan2Interface for EpetraNode -// Use ZoltanInterface instead of Zoltan2Interface -template <> -class Zoltan2Interface : public SingleLevelFactoryBase { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; -#undef MUELU_ZOLTAN2INTERFACE_SHORT -#include "MueLu_UseShortNames.hpp" - public: - typedef typename Teuchos::ScalarTraits::magnitudeType real_type; - typedef Xpetra::MultiVector RealValuedMultiVector; - - Zoltan2Interface() { - level_ = rcp(new Level()); - zoltanInterface_ = rcp(new ZoltanInterface()); - - level_->SetLevelID(1); - } - virtual ~Zoltan2Interface() { - zoltanInterface_ = Teuchos::null; - level_ = Teuchos::null; - } - RCP GetValidParameterList() const { - RCP validParamList = rcp(new ParameterList()); - - validParamList->set >("A", Teuchos::null, "Factory of the matrix A"); - validParamList->set >("Coordinates", Teuchos::null, "Factory of the coordinates"); - validParamList->set >("number of partitions", Teuchos::null, "Instance of RepartitionHeuristicFactory."); - validParamList->set >("ParameterList", Teuchos::null, "Zoltan2 parameters"); - - return validParamList; - }; - void DeclareInput(Level& currentLevel) const { - Input(currentLevel, "A"); - Input(currentLevel, "number of partitions"); - const ParameterList& pL = GetParameterList(); - // We do this dance, because we don't want "ParameterList" to be marked as used. - // Is there a better way? - Teuchos::ParameterEntry entry = pL.getEntry("ParameterList"); - RCP providedList = Teuchos::any_cast >(entry.getAny(false)); - if (providedList != Teuchos::null && providedList->isType("algorithm")) { - const std::string algo = providedList->get("algorithm"); - if (algo == "multijagged" || algo == "rcb") - Input(currentLevel, "Coordinates"); - } else - Input(currentLevel, "Coordinates"); - }; - void Build(Level& currentLevel) const { - this->GetOStream(Warnings0) << "Tpetra does not support instantiation, " - "switching Zoltan2Interface to ZoltanInterface" - << std::endl; - - // Put the data into a fake level - level_->Set("A", Get >(currentLevel, "A")); - level_->Set("Coordinates", Get >(currentLevel, "Coordinates")); - level_->Set("number of partitions", currentLevel.Get("number of partitions")); - - level_->Request("Partition", zoltanInterface_.get()); - zoltanInterface_->Build(*level_); - - RCP > decomposition; - level_->Get("Partition", decomposition, zoltanInterface_.get()); - Set(currentLevel, "Partition", decomposition); - }; - - private: - RCP level_; // fake Level - RCP zoltanInterface_; -}; -#else -// Stub partial specialization of Zoltan2Interface for EpetraNode -template <> -class Zoltan2Interface : public SingleLevelFactoryBase { - public: - Zoltan2Interface() { throw Exceptions::RuntimeError("Tpetra does not support instantiation"); } - virtual ~Zoltan2Interface() {} - RCP GetValidParameterList() const { return Teuchos::null; }; - void DeclareInput(Level& level) const {}; - void Build(Level& level) const {}; -}; -#endif // HAVE_MUELU_ZOLTAN - -#endif - -#endif // HAVE_MUELU_EPETRA - } // namespace MueLu #define MUELU_ZOLTAN2INTERFACE_SHORT diff --git a/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_decl.hpp b/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_decl.hpp index a869c2207ce1..7a39587d8358 100644 --- a/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_decl.hpp +++ b/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_decl.hpp @@ -11,7 +11,6 @@ #define MUELU_AMESOS2SMOOTHER_DECL_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_AMESOS2) #include #include @@ -136,45 +135,7 @@ class Amesos2Smoother : public SmootherPrototype -class Amesos2Smoother : public SmootherPrototype { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; -#undef MUELU_AMESOS2SMOOTHER_SHORT -#include "MueLu_UseShortNames.hpp" - - public: - Amesos2Smoother(const std::string& type = "", const Teuchos::ParameterList& paramList = Teuchos::ParameterList()) { - MUELU_TPETRA_ETI_EXCEPTION("Amesos2Smoother", "Amesos2Smoother", "int"); - } - virtual ~Amesos2Smoother(){}; - void DeclareInput(Level& currentLevel) const {}; - void Setup(Level& currentLevel){}; - void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const {}; - - RCP Copy() const { return Teuchos::null; }; - - std::string description() const { return std::string(""); }; - void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const {}; - - //! Get a rough estimate of cost per iteration - size_t getNodeSmootherComplexity() const { - size_t cplx = 0; - return cplx; - }; -}; -#endif -#endif // HAVE_MUELU_EPETRA - } // namespace MueLu #define MUELU_AMESOS2SMOOTHER_SHORT -#endif // HAVE_MUELU_AMESOS2 #endif // MUELU_AMESOS2SMOOTHER_DECL_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_def.hpp index a78cc24697e5..3fab35464b23 100644 --- a/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_Amesos2Smoother_def.hpp @@ -13,7 +13,6 @@ #include #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_AMESOS2) #include #include @@ -413,5 +412,4 @@ size_t Amesos2Smoother::getNodeSmooth } } // namespace MueLu -#endif // HAVE_MUELU_AMESOS2 #endif // MUELU_AMESOS2SMOOTHER_DEF_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.cpp b/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.cpp index adc53c72c3d7..0b575e30b99a 100644 --- a/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.cpp +++ b/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.cpp @@ -11,180 +11,3 @@ #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - -#include - -#include -#include -#include - -#include "MueLu_AmesosSmoother.hpp" - -#include "MueLu_Level.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Monitor.hpp" - -namespace MueLu { - -template -AmesosSmoother::AmesosSmoother(const std::string& type, const Teuchos::ParameterList& paramList) - : type_(type) { - this->SetParameterList(paramList); - - if (!type_.empty()) { - // Transform string to "Abcde" notation - std::transform(type_.begin(), type_.end(), type_.begin(), ::tolower); - std::transform(type_.begin(), ++type_.begin(), type_.begin(), ::toupper); - } - if (type_ == "Amesos_klu") type_ = "Klu"; - if (type_ == "Klu2") type_ = "Klu"; - if (type_ == "Amesos_umfpack") type_ = "Umfpack"; - if (type_ == "Superlu_dist") type_ = "Superludist"; - if (type_ == "Amesos_mumps") type_ = "Mumps"; - - // Try to come up with something availble - // Order corresponds to our preference - // TODO: It would be great is Amesos provides directly this kind of logic for us - std::string oldtype = type_; - if (type_ == "" || Amesos().Query(type_) == false) { -#if defined(HAVE_AMESOS_SUPERLU) - type_ = "Superlu"; -#elif defined(HAVE_AMESOS_KLU) - type_ = "Klu"; -#elif defined(HAVE_AMESOS_SUPERLUDIST) - type_ = "Superludist"; -#elif defined(HAVE_AMESOS_UMFPACK) - type_ = "Umfpack"; -#else - this->declareConstructionOutcome(true, "Amesos has been compiled without SuperLU_DIST, SuperLU, Umfpack or Klu. By default, MueLu tries" + - "to use one of these libraries. Amesos must be compiled with one of these solvers, " + - "or a valid Amesos solver has to be specified explicitly."); - return; -#endif - if (oldtype != "") - this->GetOStream(Warnings0) << "MueLu::AmesosSmoother: \"" << oldtype << "\" is not available. Using \"" << type_ << "\" instead" << std::endl; - else - this->GetOStream(Runtime1) << "MueLu::AmesosSmoother: using \"" << type_ << "\"" << std::endl; - } - this->declareConstructionOutcome(false, ""); -} - -template -void AmesosSmoother::DeclareInput(Level& currentLevel) const { - this->Input(currentLevel, "A"); -} - -template -void AmesosSmoother::Setup(Level& currentLevel) { - FactoryMonitor m(*this, "Setup Smoother", currentLevel); - - if (SmootherPrototype::IsSetup() == true) - this->GetOStream(Warnings0) << "MueLu::AmesosSmoother::Setup(): Setup() has already been called" << std::endl; - - A_ = Factory::Get >(currentLevel, "A"); - - RCP epA = Utilities::Op2NonConstEpetraCrs(A_); - linearProblem_ = rcp(new Epetra_LinearProblem()); - linearProblem_->SetOperator(epA.get()); - - Amesos factory; - prec_ = rcp(factory.Create(type_, *linearProblem_)); - TEUCHOS_TEST_FOR_EXCEPTION(prec_ == Teuchos::null, Exceptions::RuntimeError, "MueLu::AmesosSmoother::Setup(): Solver '" + type_ + "' not supported by Amesos"); - - // set Reindex flag, if A is distributed with non-contiguous maps - // unfortunately there is no reindex for Amesos2, yet. So, this only works for Epetra based problems - if (A_->getRowMap()->isDistributed() == true && A_->getRowMap()->isContiguous() == false) - const_cast(this->GetParameterList()).set("Reindex", true); - - const ParameterList& paramList = this->GetParameterList(); - RCP precList = this->RemoveFactoriesFromList(paramList); - - prec_->SetParameters(*precList); - - const_cast(paramList).setParameters(*precList); - - int r = prec_->NumericFactorization(); - TEUCHOS_TEST_FOR_EXCEPTION(r != 0, Exceptions::RuntimeError, "MueLu::AmesosSmoother::Setup(): Amesos solver returns value of " + Teuchos::toString(r) + " during NumericFactorization()"); - - SmootherPrototype::IsSetup(true); -} - -template -void AmesosSmoother::Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero) const { - TEUCHOS_TEST_FOR_EXCEPTION(SmootherPrototype::IsSetup() == false, Exceptions::RuntimeError, "MueLu::AmesosSmoother::Apply(): Setup() has not been called"); - - Epetra_MultiVector& epX = Utilities::MV2NonConstEpetraMV(X); - Epetra_MultiVector const& epB = Utilities::MV2EpetraMV(B); - // Epetra_LinearProblem takes the right-hand side as a non-const pointer. - // I think this const_cast is safe because Amesos won't modify the rhs. - Epetra_MultiVector& nonconstB = const_cast(epB); - - linearProblem_->SetLHS(&epX); - linearProblem_->SetRHS(&nonconstB); - - prec_->Solve(); - - // Don't keep pointers to our vectors in the Epetra_LinearProblem. - linearProblem_->SetLHS(0); - linearProblem_->SetRHS(0); -} - -template -RCP > AmesosSmoother::Copy() const { - return rcp(new AmesosSmoother(*this)); -} - -template -std::string AmesosSmoother::description() const { - std::ostringstream out; - out << SmootherPrototype::description(); - out << "{type = " << type_ << "}"; - return out.str(); -} - -// using MueLu::Describable::describe; // overloading, not hiding -template -void AmesosSmoother::print(Teuchos::FancyOStream& out, const VerbLevel verbLevel) const { - MUELU_DESCRIBE; - - if (verbLevel & Parameters0) - out0 << "Prec. type: " << type_ << std::endl; - - if (verbLevel & Parameters1) { - out0 << "Parameter list: " << std::endl; - Teuchos::OSTab tab2(out); - out << this->GetParameterList(); - } - - if (verbLevel & External) - if (prec_ != Teuchos::null) { - prec_->PrintStatus(); - prec_->PrintTiming(); - } - - if (verbLevel & Debug) { - out0 << "IsSetup: " << Teuchos::toString(SmootherPrototype::IsSetup()) << std::endl - << "-" << std::endl - << "RCP: " << A_ << std::endl - << "RCP: " << linearProblem_ << std::endl - << "RCP: " << prec_ << std::endl; - } -} - -template -size_t AmesosSmoother::getNodeSmootherComplexity() const { - // FIXME: This is a placeholder - return Teuchos::OrdinalTraits::invalid(); -} - -} // namespace MueLu - -// The AmesosSmoother is only templated on the Node, since it is an Epetra only object -// Therefore we do not need the full ETI instantiations as we do for the other MueLu -// objects which are instantiated on all template parameters. -#if defined(HAVE_MUELU_EPETRA) -template class MueLu::AmesosSmoother; -#endif - -#endif // HAVE_MUELU_EPETRA && HAVE_MUELU_AMESOS diff --git a/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.hpp b/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.hpp index d673dce7b451..8bd758566e48 100644 --- a/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.hpp +++ b/packages/muelu/src/Smoothers/MueLu_AmesosSmoother.hpp @@ -11,168 +11,4 @@ #define MUELU_AMESOSSMOOTHER_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - -#include -#include - -class Epetra_LinearProblem; -class Amesos_BaseSolver; - -#include "MueLu_SmootherPrototype.hpp" -#include "MueLu_Exceptions.hpp" - -#include "MueLu_Level_fwd.hpp" -#include "MueLu_FactoryBase_fwd.hpp" -#include "MueLu_Utilities_fwd.hpp" - -namespace MueLu { - -/*! - @class AmesosSmoother - @ingroup MueLuSmootherClasses - @brief Class that encapsulates Amesos direct solvers. - - This class creates an Amesos preconditioner factory. The factory is capable of generating direct solvers - based on the type and ParameterList passed into the constructor. See the constructor for more information. -*/ -template ::node_type> -class AmesosSmoother : public SmootherPrototype { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - -#undef MUELU_AMESOSSMOOTHER_SHORT -#include "MueLu_UseShortNames.hpp" - - public: - //! @name Constructors / destructors - //@{ - - /*! @brief Constructor - - Creates a MueLu interface to the direct solvers in the Amesos package. The options are those specified in - the Amesos user's manual. - - @param type solver type - @param list options for the particular solver type - - Here is how to select the more commonly used direct solvers: - - - KLU (serial sparse direct solver) - - type = Amesos-KLU - - parameter list options - - none required - - - SuperLU (serial sparse super-nodal direct solver) - - type = Amesos-SuperLU - - parameter list options - - none required - - If you are using type=="", then either SuperLU or KLU are used by default. - - See also Amesos_Klu and Amesos_Superlu. - - */ - - AmesosSmoother(const std::string& type = "", const Teuchos::ParameterList& paramList = Teuchos::ParameterList()); - - //! Destructor - virtual ~AmesosSmoother(){}; - - //@} - - //! Input - //@{ - - void DeclareInput(Level& currentLevel) const; - - //@} - - //! @name Setup and Apply methods. - //@{ - - /*! @brief Set up the direct solver. - This creates the underlying Amesos solver object according to the parameter list options passed into the - AmesosSmoother constructor. This includes doing a numeric factorization of the matrix. - */ - void Setup(Level& currentLevel); - - /*! @brief Apply the direct solver. - - Solves the linear system AX=B using the constructed solver. - - @param X initial guess - @param B right-hand side - @param InitialGuessIsZero This option has no effect with this smoother - */ - void Apply(MultiVector& X, const MultiVector& B, bool /* InitialGuessIsZero */ = false) const; - - //@} - - RCP Copy() const; - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const; - - //! Print the object with some verbosity level to an FancyOStream object. - // using MueLu::Describable::describe; // overloading, not hiding - void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const; - - //! Get a rough estimate of cost per iteration - size_t getNodeSmootherComplexity() const; - - //@} - - private: - // Important note: - // linearProblem_ must be destroyed before A_, because destructor of linearProblem_ is using A_. - // In C++, destructor of member objects are called in the reverse order they appear within the declaration for the class. - // ==18029== Invalid read of size 8 - // ==18029== at 0xC0780A: Epetra_LinearProblem::GetMatrix() const (Epetra_LinearProblem.h:173) - // ==18029== by 0xC5EC27: Amesos_Superlu::PrintTiming() const (Amesos_Superlu.cpp:664) - // ==18029== by 0xC628C6: Amesos_Superlu::~Amesos_Superlu() (Amesos_Superlu.cpp:108) - - //! amesos-specific key phrase that denote smoother type - std::string type_; - - //! Matrix. Not used directly, but held inside of linearProblem_. So we have to keep an RCP pointer to it! - RCP A_; - - //! Problem that Amesos uses internally. - RCP linearProblem_; - - //! pointer to Amesos solver object - RCP prec_; - -}; // class AmesosSmoother - -//! Non-member templated function GetAmesosSmoother() returns a new AmesosSmoother object -// when == . Otherwise, an exception is thrown. -//! This function simplifies the usage of AmesosSmoother objects inside of templates as templates do not have to be specialized for (see DirectSolver for an example). -template -RCP > -GetAmesosSmoother(const std::string& /* type */ = "", const Teuchos::ParameterList& /* paramList */ = Teuchos::ParameterList()) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, - "AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -} - -// specialization for Epetra -#if defined(HAVE_MUELU_SERIAL) -template <> -inline RCP > -GetAmesosSmoother(const std::string& type, const Teuchos::ParameterList& paramList) { - return rcp(new MueLu::AmesosSmoother(type, paramList)); -} -#endif // HAVE_MUELU_SERIAL - -} // namespace MueLu - -#define MUELU_AMESOSSMOOTHER_SHORT - -#endif // HAVE_MUELU_AMESOS #endif // MUELU_AMESOSSMOOTHER_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_BelosSmoother_decl.hpp b/packages/muelu/src/Smoothers/MueLu_BelosSmoother_decl.hpp index 8d3b99b60a0d..e9dbe9ec10c9 100644 --- a/packages/muelu/src/Smoothers/MueLu_BelosSmoother_decl.hpp +++ b/packages/muelu/src/Smoothers/MueLu_BelosSmoother_decl.hpp @@ -21,11 +21,9 @@ #include "MueLu_BelosSmoother_fwd.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "BelosTpetraAdapter.hpp" #include #include -#endif #include "MueLu_Level_fwd.hpp" #include "MueLu_SmootherPrototype.hpp" @@ -152,52 +150,6 @@ class BelosSmoother : public SmootherPrototype -class BelosSmoother : public SmootherPrototype { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; -#undef MUELU_BELOSSMOOTHER_SHORT -#include "MueLu_UseShortNames.hpp" - - public: -#ifndef _MSC_VER - // Avoid error C3772: invalid friend template declaration - template - friend class BelosSmoother; -#endif - - BelosSmoother(const std::string& type, const Teuchos::ParameterList& paramList = Teuchos::ParameterList(), const LocalOrdinal& overlap = 0) { - MUELU_TPETRA_ETI_EXCEPTION("BelosSmoother", "BelosSmoother", "int"); - }; - - virtual ~BelosSmoother() {} - - void SetParameterList(const Teuchos::ParameterList& paramList) {} - void DeclareInput(Level& currentLevel) const {} - void Setup(Level& currentLevel) {} - void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const {} - RCP Copy() const { return Teuchos::null; } - - std::string description() const { return std::string(""); } - void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const {} - - //! Get a rough estimate of cost per iteration - size_t getNodeSmootherComplexity() const { - size_t cplx = 0; - return cplx; - }; -}; -#endif - -#endif // HAVE_MUELU_EPETRA - } // namespace MueLu #define MUELU_BELOSSMOOTHER_SHORT diff --git a/packages/muelu/src/Smoothers/MueLu_BelosSmoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_BelosSmoother_def.hpp index c3a2f7a85391..d7c120de97cf 100644 --- a/packages/muelu/src/Smoothers/MueLu_BelosSmoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_BelosSmoother_def.hpp @@ -19,9 +19,7 @@ #include #include #include -#ifdef HAVE_XPETRA_TPETRA #include -#endif #include "MueLu_BelosSmoother_decl.hpp" #include "MueLu_Level.hpp" diff --git a/packages/muelu/src/Smoothers/MueLu_DirectSolver_def.hpp b/packages/muelu/src/Smoothers/MueLu_DirectSolver_def.hpp index b1c4b30c8cbf..9a86b775ac55 100644 --- a/packages/muelu/src/Smoothers/MueLu_DirectSolver_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_DirectSolver_def.hpp @@ -45,7 +45,6 @@ DirectSolver::DirectSolver(const std: // We want DirectSolver to be able to work with both Epetra and Tpetra objects, therefore we try to construct both // Amesos and Amesos2 solver prototypes. The construction really depends on configuration options. triedEpetra_ = triedTpetra_ = false; -#if defined(HAVE_MUELU_AMESOS2) try { sTpetra_ = rcp(new Amesos2Smoother(type_, paramList)); if (sTpetra_.is_null()) @@ -62,23 +61,6 @@ DirectSolver::DirectSolver(const std: errorTpetra_ = e.what(); } triedTpetra_ = true; -#endif -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - try { - // GetAmesosSmoother masks the template argument matching, and simply throws if template arguments are incompatible with Epetra - sEpetra_ = GetAmesosSmoother(type_, paramList); - if (sEpetra_.is_null()) - errorEpetra_ = "Unable to construct Amesos direct solver"; - else if (!sEpetra_->constructionSuccessful()) { - errorEpetra_ = sEpetra_->constructionErrorMsg(); - sEpetra_ = Teuchos::null; - } - } catch (Exceptions::RuntimeError& e) { - // AmesosSmoother throws if Scalar != double, LocalOrdinal != int, GlobalOrdinal != int - errorEpetra_ = e.what(); - } - triedEpetra_ = true; -#endif #if defined(HAVE_MUELU_BELOS) try { sBelos_ = rcp(new BelosSmoother(type_, paramList)); diff --git a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_decl.hpp b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_decl.hpp index 0d9eabfaf644..4919171eb6ea 100644 --- a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_decl.hpp +++ b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_decl.hpp @@ -16,15 +16,11 @@ #include #include #include -#ifdef HAVE_XPETRA_TPETRA // needed for clone() #include -#endif #include "MueLu_ConfigDefs.hpp" #include "MueLu_Ifpack2Smoother_fwd.hpp" -#if defined(HAVE_MUELU_IFPACK2) - #include #include @@ -198,57 +194,7 @@ class Ifpack2Smoother : public SmootherPrototype -class Ifpack2Smoother : public SmootherPrototype { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; -#undef MUELU_AMESOS2SMOOTHER_SHORT -#include "MueLu_UseShortNames.hpp" - - public: -#ifndef _MSC_VER - // Avoid error C3772: invalid friend template declaration - template - friend class Ifpack2Smoother; -#endif - - Ifpack2Smoother(const std::string& type, const Teuchos::ParameterList& paramList = Teuchos::ParameterList(), const LocalOrdinal& overlap = 0) { - MUELU_TPETRA_ETI_EXCEPTION("Ifpack2Smoother", "Ifpack2Smoother", "int"); - }; - - virtual ~Ifpack2Smoother() {} - - void SetParameterList(const Teuchos::ParameterList& paramList) {} - void DeclareInput(Level& currentLevel) const {} - void Setup(Level& currentLevel) {} - void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const {} - RCP Copy() const { return Teuchos::null; } - - std::string description() const { return std::string(""); } - void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const {} - - //! Get a rough estimate of cost per iteration - size_t getNodeSmootherComplexity() const { - size_t cplx = 0; - return cplx; - }; - - private: - void SetPrecParameters(const Teuchos::ParameterList& list = Teuchos::ParameterList()) const {} -}; -#endif - -#endif // HAVE_MUELU_EPETRA - } // namespace MueLu #define MUELU_IFPACK2SMOOTHER_SHORT -#endif // HAVE_MUELU_IFPACK2 #endif // MUELU_IFPACK2SMOOTHER_DECL_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp index e8dca02fbfff..28434e2656d5 100644 --- a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp @@ -12,8 +12,6 @@ #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_IFPACK2) - #include #include @@ -1059,5 +1057,4 @@ size_t Ifpack2Smoother::getNodeSmooth } // namespace MueLu -#endif // HAVE_MUELU_IFPACK2 #endif // MUELU_IFPACK2SMOOTHER_DEF_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.cpp b/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.cpp index cb859d25a7cb..c22015c2ab46 100644 --- a/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.cpp +++ b/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.cpp @@ -9,388 +9,3 @@ #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) -#include -#include -#include "Xpetra_MultiVectorFactory.hpp" - -#include "MueLu_IfpackSmoother.hpp" - -#include "MueLu_Level.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Monitor.hpp" -#include "MueLu_Aggregates.hpp" - -namespace MueLu { - -template -IfpackSmoother::IfpackSmoother(std::string const& type, Teuchos::ParameterList const& paramList, LO const& overlap) - : type_(type) - , overlap_(overlap) { - this->declareConstructionOutcome(false, ""); - SetParameterList(paramList); -} - -template -void IfpackSmoother::SetParameterList(const Teuchos::ParameterList& paramList) { - Factory::SetParameterList(paramList); - - if (SmootherPrototype::IsSetup()) { - // It might be invalid to change parameters after the setup, but it depends entirely on Ifpack implementation. - // TODO: I don't know if Ifpack returns an error code or exception or ignore parameters modification in this case... - prec_->SetParameters(const_cast(this->GetParameterList())); - } -} - -template -void IfpackSmoother::SetPrecParameters(const Teuchos::ParameterList& list) const { - ParameterList& paramList = const_cast(this->GetParameterList()); - paramList.setParameters(list); - - RCP precList = this->RemoveFactoriesFromList(this->GetParameterList()); - - prec_->SetParameters(*precList); - - // We would like to have the following line here: - // paramList.setParameters(*precList); - // For instance, if Ifpack sets somem parameters internally, we would like to have - // them listed when we call this->GetParameterList() - // But because of the way Ifpack handles the list, we cannot do that. - // The bad scenario goes like this: - // * SmootherFactory calls Setup - // * Setup calls SetPrecParameters - // * We call prec_->SetParameters(*precList) - // This actually updates the internal parameter list with default prec_ parameters - // This means that we get a parameter ("chebyshev: max eigenvalue", -1) in the list - // * Setup calls prec_->Compute() - // Here we may compute the max eigenvalue, but we get no indication of this. If we - // do compute it, our parameter list becomes outdated - // * SmootherFactory calls Apply - // * Apply constructs a list with a list with an entry "chebyshev: zero starting solution" - // * We call prec_->SetParameters(*precList) - // The last call is the problem. At this point, we have a list with an outdated entry - // "chebyshev: max eigenvalue", but prec_ uses this entry and replaces the computed max - // eigenvalue with the one from the list, resulting in -1.0 eigenvalue. - // - // Ifpack2 does not have this problem, as it does not populate the list with new entries -} - -template -void IfpackSmoother::DeclareInput(Level& currentLevel) const { - this->Input(currentLevel, "A"); - - if (type_ == "LINESMOOTHING_BANDED_RELAXATION" || - type_ == "LINESMOOTHING_BANDED RELAXATION" || - type_ == "LINESMOOTHING_BANDEDRELAXATION" || - type_ == "LINESMOOTHING_BLOCK_RELAXATION" || - type_ == "LINESMOOTHING_BLOCK RELAXATION" || - type_ == "LINESMOOTHING_BLOCKRELAXATION") { - this->Input(currentLevel, "CoarseNumZLayers"); // necessary for fallback criterion - this->Input(currentLevel, "LineDetection_VertLineIds"); // necessary to feed block smoother - } // if (type_ == "LINESMOOTHING_BANDEDRELAXATION") - else if (type_ == "AGGREGATE") { - // Aggregate smoothing needs aggregates - this->Input(currentLevel, "Aggregates"); - } -} - -template -void IfpackSmoother::Setup(Level& currentLevel) { - FactoryMonitor m(*this, "Setup Smoother", currentLevel); - if (SmootherPrototype::IsSetup() == true) - this->GetOStream(Warnings0) << "MueLu::IfpackSmoother::Setup(): Setup() has already been called" << std::endl; - - A_ = Factory::Get >(currentLevel, "A"); - - double lambdaMax = -1.0; - if (type_ == "Chebyshev") { - std::string maxEigString = "chebyshev: max eigenvalue"; - std::string eigRatioString = "chebyshev: ratio eigenvalue"; - - try { - lambdaMax = Teuchos::getValue(this->GetParameter(maxEigString)); - this->GetOStream(Statistics1) << maxEigString << " (cached with smoother parameter list) = " << lambdaMax << std::endl; - - } catch (Teuchos::Exceptions::InvalidParameterName&) { - lambdaMax = A_->GetMaxEigenvalueEstimate(); - - if (lambdaMax != -1.0) { - this->GetOStream(Statistics1) << maxEigString << " (cached with matrix) = " << lambdaMax << std::endl; - this->SetParameter(maxEigString, ParameterEntry(lambdaMax)); - } - } - - // Calculate the eigenvalue ratio - const Scalar defaultEigRatio = 20; - - Scalar ratio = defaultEigRatio; - try { - ratio = Teuchos::getValue(this->GetParameter(eigRatioString)); - - } catch (Teuchos::Exceptions::InvalidParameterName&) { - this->SetParameter(eigRatioString, ParameterEntry(ratio)); - } - - if (currentLevel.GetLevelID()) { - // Update ratio to be - // ratio = max(number of fine DOFs / number of coarse DOFs, defaultValue) - // - // NOTE: We don't need to request previous level matrix as we know for sure it was constructed - RCP fineA = currentLevel.GetPreviousLevel()->Get >("A"); - size_t nRowsFine = fineA->getGlobalNumRows(); - size_t nRowsCoarse = A_->getGlobalNumRows(); - - ratio = std::max(ratio, as(nRowsFine) / nRowsCoarse); - - this->GetOStream(Statistics1) << eigRatioString << " (computed) = " << ratio << std::endl; - this->SetParameter(eigRatioString, ParameterEntry(ratio)); - } - } // if (type_ == "Chebyshev") - - if (type_ == "LINESMOOTHING_BANDED_RELAXATION" || - type_ == "LINESMOOTHING_BANDED RELAXATION" || - type_ == "LINESMOOTHING_BANDEDRELAXATION" || - type_ == "LINESMOOTHING_BLOCK_RELAXATION" || - type_ == "LINESMOOTHING_BLOCK RELAXATION" || - type_ == "LINESMOOTHING_BLOCKRELAXATION") { - ParameterList& myparamList = const_cast(this->GetParameterList()); - - LO CoarseNumZLayers = currentLevel.Get("CoarseNumZLayers", Factory::GetFactory("CoarseNumZLayers").get()); - if (CoarseNumZLayers > 0) { - Teuchos::ArrayRCP TVertLineIdSmoo = currentLevel.Get >("LineDetection_VertLineIds", Factory::GetFactory("LineDetection_VertLineIds").get()); - - // determine number of local parts - LO maxPart = 0; - for (size_t k = 0; k < Teuchos::as(TVertLineIdSmoo.size()); k++) { - if (maxPart < TVertLineIdSmoo[k]) maxPart = TVertLineIdSmoo[k]; - } - - size_t numLocalRows = A_->getLocalNumRows(); - TEUCHOS_TEST_FOR_EXCEPTION(numLocalRows % TVertLineIdSmoo.size() != 0, Exceptions::RuntimeError, "MueLu::Ifpack2Smoother::Setup(): the number of local nodes is incompatible with the TVertLineIdsSmoo."); - - if (numLocalRows == Teuchos::as(TVertLineIdSmoo.size())) { - myparamList.set("partitioner: type", "user"); - myparamList.set("partitioner: map", &(TVertLineIdSmoo[0])); - myparamList.set("partitioner: local parts", maxPart + 1); - } else { - // we assume a constant number of DOFs per node - size_t numDofsPerNode = numLocalRows / TVertLineIdSmoo.size(); - - // Create a new Teuchos::ArrayRCP of size numLocalRows and fill it with the corresponding information - Teuchos::ArrayRCP partitionerMap(numLocalRows, Teuchos::OrdinalTraits::invalid()); - for (size_t blockRow = 0; blockRow < Teuchos::as(TVertLineIdSmoo.size()); ++blockRow) - for (size_t dof = 0; dof < numDofsPerNode; dof++) - partitionerMap[blockRow * numDofsPerNode + dof] = TVertLineIdSmoo[blockRow]; - myparamList.set("partitioner: type", "user"); - myparamList.set("partitioner: map", &(partitionerMap[0])); - myparamList.set("partitioner: local parts", maxPart + 1); - } - - if (type_ == "LINESMOOTHING_BANDED_RELAXATION" || - type_ == "LINESMOOTHING_BANDED RELAXATION" || - type_ == "LINESMOOTHING_BANDEDRELAXATION") - type_ = "block relaxation"; - else - type_ = "block relaxation"; - } else { - // line detection failed -> fallback to point-wise relaxation - this->GetOStream(Runtime0) << "Line detection failed: fall back to point-wise relaxation" << std::endl; - myparamList.remove("partitioner: type", false); - myparamList.remove("partitioner: map", false); - myparamList.remove("partitioner: local parts", false); - type_ = "point relaxation stand-alone"; - } - - } // if (type_ == "LINESMOOTHING_BANDEDRELAXATION") - - if (type_ == "AGGREGATE") { - SetupAggregate(currentLevel); - } - - else { - // If we're using a linear partitioner and haven't set the # local parts, set it to match the operator's block size - ParameterList precList = this->GetParameterList(); - if (precList.isParameter("partitioner: type") && precList.get("partitioner: type") == "linear" && - !precList.isParameter("partitioner: local parts")) { - precList.set("partitioner: local parts", (int)A_->getLocalNumRows() / A_->GetFixedBlockSize()); - } - - RCP epA = Utilities::Op2NonConstEpetraCrs(A_); - - Ifpack factory; - prec_ = rcp(factory.Create(type_, &(*epA), overlap_)); - TEUCHOS_TEST_FOR_EXCEPTION(prec_.is_null(), Exceptions::RuntimeError, "Could not create an Ifpack preconditioner with type = \"" << type_ << "\""); - SetPrecParameters(); - prec_->Compute(); - } - - SmootherPrototype::IsSetup(true); - - if (type_ == "Chebyshev" && lambdaMax == -1.0) { - Teuchos::RCP chebyPrec = rcp_dynamic_cast(prec_); - if (chebyPrec != Teuchos::null) { - lambdaMax = chebyPrec->GetLambdaMax(); - A_->SetMaxEigenvalueEstimate(lambdaMax); - this->GetOStream(Statistics1) << "chebyshev: max eigenvalue (calculated by Ifpack)" - << " = " << lambdaMax << std::endl; - } - TEUCHOS_TEST_FOR_EXCEPTION(lambdaMax == -1.0, Exceptions::RuntimeError, "MueLu::IfpackSmoother::Setup(): no maximum eigenvalue estimate"); - } - - this->GetOStream(Statistics1) << description() << std::endl; -} - -template -void IfpackSmoother::SetupAggregate(Level& currentLevel) { - ParameterList& paramList = const_cast(this->GetParameterList()); - - if (this->IsSetup() == true) { - this->GetOStream(Warnings0) << "MueLu::Ifpack2moother::SetupAggregate(): Setup() has already been called" << std::endl; - this->GetOStream(Warnings0) << "MueLu::IfpackSmoother::SetupAggregate(): reuse of this type is not available, reverting to full construction" << std::endl; - } - - this->GetOStream(Statistics0) << "IfpackSmoother: Using Aggregate Smoothing" << std::endl; - - RCP aggregates = Factory::Get >(currentLevel, "Aggregates"); - RCP vertex2AggId = aggregates->GetVertex2AggId(); - ArrayRCP aggregate_ids = rcp_const_cast(vertex2AggId)->getDataNonConst(0); - ArrayRCP dof_ids; - - // We need to unamalgamate, if the FixedBlockSize > 1 - if (A_->GetFixedBlockSize() > 1) { - // NOTE: We're basically going to have to leave a deallocated pointer hanging out - // in the paramList object (and inside the partitioner). This never gets - // use again after Compute() gets called, so this is OK, but I'm still leaving - // this note here in case it bites us again later. - LO blocksize = (LO)A_->GetFixedBlockSize(); - dof_ids.resize(aggregate_ids.size() * blocksize); - for (LO i = 0; i < (LO)aggregate_ids.size(); i++) { - for (LO j = 0; j < (LO)blocksize; j++) - dof_ids[i * blocksize + j] = aggregate_ids[i]; - } - } else { - dof_ids = aggregate_ids; - } - - paramList.set("partitioner: map", dof_ids.getRawPtr()); - paramList.set("partitioner: type", "user"); - paramList.set("partitioner: overlap", 0); - paramList.set("partitioner: local parts", (int)aggregates->GetNumAggregates()); - // In case of Dirichlet nodes - paramList.set("partitioner: keep singletons", true); - - RCP A = Utilities::Op2NonConstEpetraCrs(A_); - type_ = "block relaxation stand-alone"; - - Ifpack factory; - prec_ = rcp(factory.Create(type_, &(*A), overlap_)); - TEUCHOS_TEST_FOR_EXCEPTION(prec_.is_null(), Exceptions::RuntimeError, "Could not create an Ifpack preconditioner with type = \"" << type_ << "\""); - SetPrecParameters(); - - int rv = prec_->Compute(); - TEUCHOS_TEST_FOR_EXCEPTION(rv, Exceptions::RuntimeError, "Ifpack preconditioner with type = \"" << type_ << "\" Compute() call failed."); -} - -template -void IfpackSmoother::Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero) const { - TEUCHOS_TEST_FOR_EXCEPTION(SmootherPrototype::IsSetup() == false, Exceptions::RuntimeError, "MueLu::IfpackSmoother::Apply(): Setup() has not been called"); - - // Forward the InitialGuessIsZero option to Ifpack - Teuchos::ParameterList paramList; - bool supportInitialGuess = false; - if (type_ == "Chebyshev") { - paramList.set("chebyshev: zero starting solution", InitialGuessIsZero); - supportInitialGuess = true; - - } else if (type_ == "point relaxation stand-alone") { - paramList.set("relaxation: zero starting solution", InitialGuessIsZero); - supportInitialGuess = true; - } - - SetPrecParameters(paramList); - - // Apply - if (InitialGuessIsZero || supportInitialGuess) { - Epetra_MultiVector& epX = Utilities::MV2NonConstEpetraMV(X); - const Epetra_MultiVector& epB = Utilities::MV2EpetraMV(B); - - prec_->ApplyInverse(epB, epX); - - } else { - RCP Residual = Utilities::Residual(*A_, X, B); - RCP Correction = MultiVectorFactory::Build(A_->getDomainMap(), X.getNumVectors()); - - Epetra_MultiVector& epX = Utilities::MV2NonConstEpetraMV(*Correction); - const Epetra_MultiVector& epB = Utilities::MV2EpetraMV(*Residual); - - prec_->ApplyInverse(epB, epX); - - X.update(1.0, *Correction, 1.0); - } -} - -template -RCP > IfpackSmoother::Copy() const { - RCP > smoother = rcp(new IfpackSmoother(*this)); - smoother->SetParameterList(this->GetParameterList()); - return Teuchos::rcp_dynamic_cast >(smoother); -} - -template -std::string IfpackSmoother::description() const { - std::ostringstream out; - // The check "GetVerbLevel() == Test" is to avoid - // failures in the EasyInterface test. - if (prec_ == Teuchos::null || this->GetVerbLevel() == InterfaceTest) { - out << SmootherPrototype::description(); - out << "{type = " << type_ << "}"; - } else { - out << prec_->Label(); - } - return out.str(); -} - -template -void IfpackSmoother::print(Teuchos::FancyOStream& out, const VerbLevel verbLevel) const { - MUELU_DESCRIBE; - - if (verbLevel & Parameters0) - out0 << "Prec. type: " << type_ << std::endl; - - if (verbLevel & Parameters1) { - out0 << "Parameter list: " << std::endl; - Teuchos::OSTab tab2(out); - out << this->GetParameterList(); - out0 << "Overlap: " << overlap_ << std::endl; - } - - if (verbLevel & External) - if (prec_ != Teuchos::null) { - Teuchos::OSTab tab2(out); - out << *prec_ << std::endl; - } - - if (verbLevel & Debug) { - out0 << "IsSetup: " << Teuchos::toString(SmootherPrototype::IsSetup()) << std::endl - << "-" << std::endl - << "RCP: " << A_ << std::endl - << "RCP: " << prec_ << std::endl; - } -} - -template -size_t IfpackSmoother::getNodeSmootherComplexity() const { - // FIXME: This is a placeholder - return Teuchos::OrdinalTraits::invalid(); -} - -} // namespace MueLu - -// The IfpackSmoother is only templated on the Node, since it is an Epetra only object -// Therefore we do not need the full ETI instantiations as we do for the other MueLu -// objects which are instantiated on all template parameters. -#if defined(HAVE_MUELU_EPETRA) -template class MueLu::IfpackSmoother; -#endif - -#endif diff --git a/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.hpp b/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.hpp index 52c988d7c960..c69bb6867e32 100644 --- a/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.hpp +++ b/packages/muelu/src/Smoothers/MueLu_IfpackSmoother.hpp @@ -11,182 +11,4 @@ #define MUELU_IFPACKSMOOTHER_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - -#include -#include -#include - -class Ifpack_Preconditioner; - -#include "MueLu_SmootherPrototype.hpp" -#include "MueLu_Exceptions.hpp" - -#include "MueLu_Level_fwd.hpp" -#include "MueLu_FactoryBase_fwd.hpp" -#include "MueLu_Utilities_fwd.hpp" -#include "MueLu_Aggregates_fwd.hpp" - -namespace MueLu { - -/*! - @class IfpackSmoother - @ingroup MueLuSmootherClasses - @brief Class that encapsulates Ifpack smoothers. - - This class creates an Ifpack preconditioner factory. The factory creates a smoother based on the - type and ParameterList passed into the constructor. See the constructor for more information. -*/ -template ::node_type> -class IfpackSmoother : public MueLu::SmootherPrototype { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; -#undef MUELU_IFPACKSMOOTHER_SHORT -#include "MueLu_UseShortNames.hpp" - - public: - //! @name Constructors / destructors - //@{ - - /*! @brief Constructor - - The options passed into IfpackSmoother are those given in the Ifpack user's manual. - - @param type smoother type - @param list options for the particular smoother (e.g., fill factor or damping parameter) - - Here is how to select some of the most common smoothers. - - - Gauss-Seidel - - type = point relaxation stand-alone - - parameter list options - - relaxation: type = Gauss-Seidel - - relaxation: damping factor - - symmetric Gauss-Seidel - - type = point relaxation stand-alone - - parameter list options - - relaxation: type = symmetric Gauss-Seidel - - relaxation: damping factor - - Chebyshev - - type = Chebyshev - - parameter list options - - chebyshev: ratio eigenvalue - - chebyshev: min eigenvalue - - chebyshev: max eigenvalue - - chebyshev: degree - - chebyshev: zero starting solution (defaults to true) - - ILU - - type = ILU - - parameter list options - - fact: level-of-fill - - See also Ifpack_PointRelaxation, Ifpack_Chebyshev, Ifpack_ILU. - */ - IfpackSmoother(std::string const& type, Teuchos::ParameterList const& paramList = Teuchos::ParameterList(), LO const& overlap = 0); // TODO: empty paramList valid for Ifpack?? - - //! Destructor - virtual ~IfpackSmoother() {} - - //@} - - void SetParameterList(const Teuchos::ParameterList& paramList); - - //! Input - //@{ - - void DeclareInput(Level& currentLevel) const; - - //@} - - //! @name Computational methods. - //@{ - - /*! @brief Set up the smoother. - - This creates the underlying Ifpack smoother object, copies any parameter list options - supplied to the constructor to the Ifpack object, and computes the preconditioner. - */ - void Setup(Level& currentLevel); - - /*! @brief Apply the preconditioner. - - Solves the linear system AX=B using the constructed smoother. - - @param X initial guess - @param B right-hand side - @param InitialGuessIsZero (optional) If false, some work can be avoided. Whether this actually saves any work depends on the underlying Ifpack implementation. - */ - void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const; - - //@} - - //! @name Utilities - //@{ - - RCP Copy() const; - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const; - - //! Print the object with some verbosity level to an FancyOStream object. - // using MueLu::Describable::describe; // overloading, not hiding - // void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel = Default) const - void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const; - - //! Get a rough estimate of cost per iteration - size_t getNodeSmootherComplexity() const; - - //@} - - private: - void SetPrecParameters(const Teuchos::ParameterList& list = Teuchos::ParameterList()) const; - - void SetupAggregate(Level& currentLevel); - - private: - //! ifpack-specific key phrase that denote smoother type - std::string type_; - - //! overlap when using the smoother in additive Schwarz mode - LO overlap_; - - //! Matrix. Not used directly, but held inside of prec_. So we have to keep an RCP pointer to it! - RCP A_; - - //! pointer to Ifpack solver object - // Note: prec_ must be destroyed before A_, so declaration of prec_ appears after declaration of A_ - RCP prec_; - -}; // class IfpackSmoother - -//! Non-member templated function GetIfpackSmoother() returns a new IfpackSmoother object when == . Otherwise, an exception is thrown. -//! This function simplifies the usage of IfpackSmoother objects inside of templates as templates do not have to be specialized for (see DirectSolver for an example). -template -RCP > -GetIfpackSmoother(const std::string& /* type */ = "", - const Teuchos::ParameterList& /* paramList */ = Teuchos::ParameterList(), - const LocalOrdinal& /* overlap */ = 0) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "IfpackSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -} - -// Specialization for serial node (used for Epetra) -#if defined(HAVE_MUELU_EPETRA) -template <> -inline RCP > -GetIfpackSmoother(const std::string& type, const Teuchos::ParameterList& paramList, const int& overlap) { - return rcp(new MueLu::IfpackSmoother(type, paramList, overlap)); -} -#endif - -} // namespace MueLu - -#define MUELU_IFPACKSMOOTHER_SHORT -#endif // HAVE_MUELU_EPETRA && HAVE_MUELU_IFPACK #endif // MUELU_IFPACKSMOOTHER_HPP diff --git a/packages/muelu/src/Smoothers/MueLu_PermutingSmoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_PermutingSmoother_def.hpp index c072d61cf7c7..0b6c380cbe87 100644 --- a/packages/muelu/src/Smoothers/MueLu_PermutingSmoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_PermutingSmoother_def.hpp @@ -53,11 +53,7 @@ PermutingSmoother::PermutingSmoother( // create internal smoother if (type_ == "ILU") { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - s_ = MueLu::GetIfpackSmoother(type_, this->GetParameterList(), overlap_); -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "MueLu::PermutingSmoother requires Epetra and Ifpack."); -#endif } else { s_ = Teuchos::rcp(new TrilinosSmoother(type_, this->GetParameterList(), overlap_)); } diff --git a/packages/muelu/src/Smoothers/MueLu_ProjectorSmoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_ProjectorSmoother_def.hpp index c93f43eb6a39..f9251ccf0807 100644 --- a/packages/muelu/src/Smoothers/MueLu_ProjectorSmoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_ProjectorSmoother_def.hpp @@ -67,7 +67,6 @@ void ProjectorSmoother::Setup(Level & } this->GetOStream(Runtime0) << "Coarse level orth indices: " << selectedIndices << std::endl; -#if defined(HAVE_XPETRA_TPETRA) #ifdef HAVE_MUELU_TPETRA_INST_INT_INT // Orthonormalize RCP > B_ = Utilities::MV2TpetraMV(B); @@ -93,7 +92,6 @@ void ProjectorSmoother::Setup(Level & Borth_ = rcp(static_cast(new TpetraMultiVector(Borth))); #else TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "Tpetra with GO=int not available. The code in ProjectorSmoother should be rewritten!"); -#endif #endif SmootherPrototype::IsSetup(true); diff --git a/packages/muelu/src/Smoothers/MueLu_SmootherCloner.hpp b/packages/muelu/src/Smoothers/MueLu_SmootherCloner.hpp index b4fe069dc67e..8ee374b6ddc8 100644 --- a/packages/muelu/src/Smoothers/MueLu_SmootherCloner.hpp +++ b/packages/muelu/src/Smoothers/MueLu_SmootherCloner.hpp @@ -16,9 +16,7 @@ #include "MueLu_BaseClass.hpp" #include "MueLu_SmootherBase.hpp" -#if defined(HAVE_MUELU_IFPACK2) #include "MueLu_Ifpack2Smoother.hpp" -#endif #include "MueLu_TrilinosSmoother.hpp" namespace MueLu { diff --git a/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_decl.hpp b/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_decl.hpp index 884e369c9e24..80df5b1b0aad 100644 --- a/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_decl.hpp +++ b/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_decl.hpp @@ -19,10 +19,8 @@ #include "MueLu_FactoryBase_fwd.hpp" #include "MueLu_IfpackSmoother_fwd.hpp" -#if defined(HAVE_MUELU_IFPACK2) #include "MueLu_Ifpack2Smoother_fwd.hpp" #include "MueLu_Ifpack2Smoother.hpp" -#endif #if defined(HAVE_MUELU_BELOS) #include "MueLu_BelosSmoother_fwd.hpp" diff --git a/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_def.hpp index 67d7672bc71b..46ac91643891 100644 --- a/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_TrilinosSmoother_def.hpp @@ -48,7 +48,6 @@ TrilinosSmoother::TrilinosSmoother(co // We want TrilinosSmoother to be able to work with both Epetra and Tpetra objects, therefore we try to construct both // Ifpack and Ifpack2 smoother prototypes. The construction really depends on configuration options. triedEpetra_ = triedTpetra_ = triedBelos_ = triedStratimikos_ = false; -#if defined(HAVE_MUELU_IFPACK2) try { sTpetra_ = rcp(new Ifpack2Smoother(type_, paramList, overlap_)); if (sTpetra_.is_null()) @@ -65,23 +64,6 @@ TrilinosSmoother::TrilinosSmoother(co errorTpetra_ = e.what(); } triedTpetra_ = true; -#endif -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - try { - // GetIfpackSmoother masks the template argument matching, and simply throws if template arguments are incompatible with Epetra - sEpetra_ = GetIfpackSmoother(TrilinosSmoother::Ifpack2ToIfpack1Type(type_), TrilinosSmoother::Ifpack2ToIfpack1Param(paramList), overlap_); - if (sEpetra_.is_null()) - errorEpetra_ = "Unable to construct Ifpack smoother"; - else if (!sEpetra_->constructionSuccessful()) { - errorEpetra_ = sEpetra_->constructionErrorMsg(); - sEpetra_ = Teuchos::null; - } - } catch (Exceptions::RuntimeError& e) { - // IfpackSmoother throws if Scalar != double, LocalOrdinal != int, GlobalOrdinal != int - errorEpetra_ = e.what(); - } - triedEpetra_ = true; -#endif #if defined(HAVE_MUELU_BELOS) try { sBelos_ = rcp(new BelosSmoother(type_, paramList)); diff --git a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Amesos2Smoother_fwd.hpp b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Amesos2Smoother_fwd.hpp index 3411a09775b3..0e5ebb011733 100644 --- a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Amesos2Smoother_fwd.hpp +++ b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Amesos2Smoother_fwd.hpp @@ -11,7 +11,6 @@ #define MUELU_AMESOS2SMOOTHER_FWD_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_AMESOS2) namespace MueLu { template @@ -22,6 +21,4 @@ class Amesos2Smoother; #define MUELU_AMESOS2SMOOTHER_SHORT #endif -#endif - #endif // MUELU_AMESOS2SMOOTHER_FWD_HPP diff --git a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Ifpack2Smoother_fwd.hpp b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Ifpack2Smoother_fwd.hpp index 20c45fcef0d8..98c481071fcb 100644 --- a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Ifpack2Smoother_fwd.hpp +++ b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_Ifpack2Smoother_fwd.hpp @@ -11,7 +11,6 @@ #define MUELU_IFPACK2SMOOTHER_FWD_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_IFPACK2) namespace MueLu { template @@ -22,6 +21,4 @@ class Ifpack2Smoother; #define MUELU_IFPACK2SMOOTHER_SHORT #endif -#endif - #endif // MUELU_IFPACK2SMOOTHER_FWD_HPP diff --git a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_IsorropiaInterface_fwd.hpp b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_IsorropiaInterface_fwd.hpp index d789ee1b242a..315b4a7a847d 100644 --- a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_IsorropiaInterface_fwd.hpp +++ b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_IsorropiaInterface_fwd.hpp @@ -11,17 +11,5 @@ #define MUELU_ISORROPIAINTERFACE_FWD_HPP #include "MueLu_ConfigDefs.hpp" -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) - -namespace MueLu { -template -class IsorropiaInterface; -} - -#ifndef MUELU_ISORROPIAINTERFACE_SHORT -#define MUELU_ISORROPIAINTERFACE_SHORT -#endif - -#endif #endif // MUELU_ISORROPIAINTERFACE_FWD_HPP diff --git a/packages/muelu/src/Utils/MueLu_ETI_3arg.hpp b/packages/muelu/src/Utils/MueLu_ETI_3arg.hpp index b265a998503d..b15793ff65e0 100644 --- a/packages/muelu/src/Utils/MueLu_ETI_3arg.hpp +++ b/packages/muelu/src/Utils/MueLu_ETI_3arg.hpp @@ -17,30 +17,10 @@ #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#if defined(HAVE_MUELU_EPETRA) -#include -#endif - -#if (defined(HAVE_MUELU_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_MUELU_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_MUELU_EPETRA) -TPETRA_INSTANTIATE_LGN(MUELU_ETI_GROUP) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -MUELU_ETI_GROUP(int, int, EpetraNode) -#endif -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_MUELU_EPETRA) TPETRA_INSTANTIATE_LGN(MUELU_ETI_GROUP) -#endif #endif // ifndef MUELU_ETI_3ARGUMENT_HPP diff --git a/packages/muelu/src/Utils/MueLu_ETI_4arg.hpp b/packages/muelu/src/Utils/MueLu_ETI_4arg.hpp index 719bc5382f3d..4fe82199f8a3 100644 --- a/packages/muelu/src/Utils/MueLu_ETI_4arg.hpp +++ b/packages/muelu/src/Utils/MueLu_ETI_4arg.hpp @@ -17,30 +17,10 @@ #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#if defined(HAVE_MUELU_EPETRA) -#include -#endif - -#if (defined(HAVE_MUELU_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_MUELU_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_MUELU_EPETRA) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(MUELU_ETI_GROUP) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -MUELU_ETI_GROUP(double, int, int, EpetraNode) -#endif -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_MUELU_EPETRA) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(MUELU_ETI_GROUP) -#endif #endif // ifndef MUELU_ETI_4ARGUMENT_HPP diff --git a/packages/muelu/src/Utils/MueLu_ETI_4arg_Xpetra.hpp b/packages/muelu/src/Utils/MueLu_ETI_4arg_Xpetra.hpp index d5f18c48dcad..af4f73da953a 100644 --- a/packages/muelu/src/Utils/MueLu_ETI_4arg_Xpetra.hpp +++ b/packages/muelu/src/Utils/MueLu_ETI_4arg_Xpetra.hpp @@ -17,30 +17,10 @@ #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#if defined(HAVE_MUELU_EPETRA) -#include -#endif - -#if (defined(HAVE_MUELU_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_MUELU_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_MUELU_EPETRA) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(MUELU_ETI_GROUP_TPETRA) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -MUELU_ETI_GROUP_EPETRA(double, int, int, EpetraNode) -#endif -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_MUELU_EPETRA) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(MUELU_ETI_GROUP_TPETRA) -#endif #endif // ifndef MUELU_ETI_4ARGUMENT_HPP diff --git a/packages/muelu/src/Utils/MueLu_Utilities.cpp b/packages/muelu/src/Utils/MueLu_Utilities.cpp index 3fdf13dd4560..50a75db182de 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities.cpp +++ b/packages/muelu/src/Utils/MueLu_Utilities.cpp @@ -12,10 +12,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRAEXT -#include "EpetraExt_Transpose_RowMatrix.h" -#endif - #ifdef HAVE_MPI #include #ifdef _WIN32 diff --git a/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp b/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp index 7f738cef23dc..041627eecf94 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp @@ -32,25 +32,8 @@ #include -#ifdef HAVE_MUELU_EPETRA -#include - -// needed because of inlined function -// TODO: remove inline function? -#include -#include - -#endif - #include "MueLu_Exceptions.hpp" -#ifdef HAVE_MUELU_EPETRAEXT -class Epetra_CrsMatrix; -class Epetra_MultiVector; -class Epetra_Vector; -#include "EpetraExt_Transpose_RowMatrix.h" -#endif - #include #include #include @@ -67,21 +50,6 @@ class Epetra_Vector; namespace MueLu { -#ifdef HAVE_MUELU_EPETRA -// defined after Utilities class -template -RCP> -Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(RCP& epAB); - -template -RCP> -EpetraCrs_To_XpetraMatrix(const Teuchos::RCP& A); - -template -RCP> -EpetraMultiVector_To_XpetraMultiVector(const Teuchos::RCP& V); -#endif - template RCP> TpetraCrs_To_XpetraMatrix(const Teuchos::RCP>& Atpetra); @@ -124,25 +92,6 @@ class Utilities : public UtilitiesBase::magnitudeType Magnitude; -#ifdef HAVE_MUELU_EPETRA - //! Helper utility to pull out the underlying Epetra objects from an Xpetra object - // @{ - static RCP MV2EpetraMV(RCP> const vec); - static RCP MV2NonConstEpetraMV(RCP> vec); - - static const Epetra_MultiVector& MV2EpetraMV(const Xpetra::MultiVector& vec); - static Epetra_MultiVector& MV2NonConstEpetraMV(Xpetra::MultiVector& vec); - - static RCP Op2EpetraCrs(RCP> Op); - static RCP Op2NonConstEpetraCrs(RCP> Op); - - static const Epetra_CrsMatrix& Op2EpetraCrs(const Xpetra::Matrix& Op); - static Epetra_CrsMatrix& Op2NonConstEpetraCrs(Xpetra::Matrix& Op); - - static const Epetra_Map& Map2EpetraMap(const Xpetra::Map& map); - // @} -#endif - //! Helper utility to pull out the underlying Tpetra objects from an Xpetra object static RCP> MV2TpetraMV(RCP> const vec); static RCP> MV2NonConstTpetraMV(RCP> vec); @@ -186,684 +135,6 @@ class Utilities : public UtilitiesBase -class Utilities : public UtilitiesBase { - public: - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef Xpetra::EpetraNode Node; - typedef Teuchos::ScalarTraits::magnitudeType Magnitude; -#undef MUELU_UTILITIES_SHORT -#include "MueLu_UseShortNames.hpp" - - private: - using EpetraMap = Xpetra::EpetraMapT; - using EpetraMultiVector = Xpetra::EpetraMultiVectorT; - // using EpetraCrsMatrix = Xpetra::EpetraCrsMatrixT; - public: - //! Helper utility to pull out the underlying Epetra objects from an Xpetra object - // @{ - static RCP MV2EpetraMV(RCP const vec) { - RCP tmpVec = rcp_dynamic_cast(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::EpetraMultiVector failed"); - return tmpVec->getEpetra_MultiVector(); - } - static RCP MV2NonConstEpetraMV(RCP vec) { - RCP tmpVec = rcp_dynamic_cast(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::EpetraMultiVector failed"); - return tmpVec->getEpetra_MultiVector(); - } - - static const Epetra_MultiVector& MV2EpetraMV(const MultiVector& vec) { - const EpetraMultiVector& tmpVec = dynamic_cast(vec); - return *(tmpVec.getEpetra_MultiVector()); - } - static Epetra_MultiVector& MV2NonConstEpetraMV(MultiVector& vec) { - const EpetraMultiVector& tmpVec = dynamic_cast(vec); - return *(tmpVec.getEpetra_MultiVector()); - } - - static RCP Op2EpetraCrs(RCP Op) { - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP& tmp_ECrsMtx = rcp_dynamic_cast(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrix(); - } - static RCP Op2NonConstEpetraCrs(RCP Op) { - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP& tmp_ECrsMtx = rcp_dynamic_cast(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst(); - } - - static const Epetra_CrsMatrix& Op2EpetraCrs(const Matrix& Op) { - try { - const CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - const EpetraCrsMatrix& tmp_ECrsMtx = dynamic_cast(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getEpetra_CrsMatrix(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } - } - static Epetra_CrsMatrix& Op2NonConstEpetraCrs(Matrix& Op) { - try { - CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - EpetraCrsMatrix& tmp_ECrsMtx = dynamic_cast(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getEpetra_CrsMatrixNonConst(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } - } - - static const Epetra_Map& Map2EpetraMap(const Map& map) { - RCP xeMap = rcp_dynamic_cast(rcpFromRef(map)); - if (xeMap == Teuchos::null) - throw Exceptions::BadCast("Utilities::Map2EpetraMap : Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - return xeMap->getEpetra_Map(); - } - // @} - - //! Helper utility to pull out the underlying Tpetra objects from an Xpetra object - static RCP> MV2TpetraMV(RCP const vec) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("MV2TpetraMV: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP> tmpVec = rcp_dynamic_cast>(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::TpetraMultiVector failed"); - return tmpVec->getTpetra_MultiVector(); -#endif - } - static RCP> MV2NonConstTpetraMV(RCP vec) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("MV2NonConstTpetraMV: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP> tmpVec = rcp_dynamic_cast>(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::TpetraMultiVector failed"); - return tmpVec->getTpetra_MultiVector(); -#endif - } - static RCP> MV2NonConstTpetraMV2(MultiVector& vec) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("MV2NonConstTpetraMV2: Tpetra has not been compiled with support for LO=GO=int."); -#else - const Xpetra::TpetraMultiVector& tmpVec = dynamic_cast&>(vec); - return tmpVec.getTpetra_MultiVector(); -#endif - } - - static const Tpetra::MultiVector& MV2TpetraMV(const MultiVector& vec) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("MV2TpetraMV: Tpetra has not been compiled with support for LO=GO=int."); -#else - const Xpetra::TpetraMultiVector& tmpVec = dynamic_cast&>(vec); - return *(tmpVec.getTpetra_MultiVector()); -#endif - } - static Tpetra::MultiVector& MV2NonConstTpetraMV(MultiVector& vec) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("MV2NonConstTpetraMV: Tpetra has not been compiled with support for LO=GO=int."); -#else - const Xpetra::TpetraMultiVector& tmpVec = dynamic_cast&>(vec); - return *(tmpVec.getTpetra_MultiVector()); -#endif - } - - static RCP> Op2TpetraCrs(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2TpetraCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - // Get the underlying Tpetra Mtx - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix failed"); - return tmp_ECrsMtx->getTpetra_CrsMatrix(); -#endif - } - static RCP> Op2NonConstTpetraCrs(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2NonConstTpetraCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix failed"); - return tmp_ECrsMtx->getTpetra_CrsMatrixNonConst(); -#endif - }; - - static const Tpetra::CrsMatrix& Op2TpetraCrs(const Matrix& Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2TpetraCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - try { - const CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - const Xpetra::TpetraCrsMatrix& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getTpetra_CrsMatrix(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -#endif - } - static Tpetra::CrsMatrix& Op2NonConstTpetraCrs(Matrix& Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2NonConstTpetraCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - try { - CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - Xpetra::TpetraCrsMatrix& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getTpetra_CrsMatrixNonConst(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -#endif - } - - static RCP> Op2TpetraBlockCrs(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2TpetraBlockCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - // Get the underlying Tpetra Mtx - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraBlockCrsMatrix failed"); - return tmp_ECrsMtx->getTpetra_BlockCrsMatrix(); -#endif - } - - static RCP> Op2NonConstTpetraBlockCrs(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2NonConstTpetraBlockCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP crsOp = rcp_dynamic_cast(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraBlockCrsMatrix failed"); - return tmp_ECrsMtx->getTpetra_BlockCrsMatrixNonConst(); -#endif - }; - - static const Tpetra::BlockCrsMatrix& Op2TpetraBlockCrs(const Matrix& Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2TpetraBlockCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - try { - const CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - const Xpetra::TpetraBlockCrsMatrix& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getTpetra_BlockCrsMatrix(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraBlockCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -#endif - } - static Tpetra::BlockCrsMatrix& Op2NonConstTpetraBlockCrs(Matrix& Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2NonConstTpetraCrs: Tpetra has not been compiled with support for LO=GO=int."); -#else - try { - CrsMatrixWrap& crsOp = dynamic_cast(Op); - try { - Xpetra::TpetraBlockCrsMatrix& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getTpetra_BlockCrsMatrixNonConst(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraBlockCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -#endif - } - - static RCP> Op2TpetraRow(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2TpetraRow: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP mat = rcp_dynamic_cast(Op); - RCP> rmat = rcp_dynamic_cast>(Op); - if (!mat.is_null()) { - RCP crsOp = rcp_dynamic_cast(mat); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - - RCP crsMat = crsOp->getCrsMatrix(); - const RCP> tmp_Crs = rcp_dynamic_cast>(crsMat); - RCP> tmp_BlockCrs; - if (!tmp_Crs.is_null()) { - return tmp_Crs->getTpetra_CrsMatrixNonConst(); - } else { - tmp_BlockCrs = rcp_dynamic_cast>(crsMat); - if (tmp_BlockCrs.is_null()) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix and Xpetra::TpetraBlockCrsMatrix failed"); - return tmp_BlockCrs->getTpetra_BlockCrsMatrixNonConst(); - } - } else if (!rmat.is_null()) { - return rmat->getTpetra_RowMatrix(); - } else { - RCP tpOp = rcp_dynamic_cast(Op, true); - RCP> tOp = tpOp->getOperatorConst(); - RCP> tRow = rcp_dynamic_cast>(tOp, true); - return tRow; - } -#endif - } - - static RCP> Op2NonConstTpetraRow(RCP Op) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Op2NonConstTpetraRow: Tpetra has not been compiled with support for LO=GO=int."); -#else - RCP mat = rcp_dynamic_cast(Op); - RCP> rmat = rcp_dynamic_cast>(Op); - if (!mat.is_null()) { - RCP crsOp = rcp_dynamic_cast(mat); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - - RCP crsMat = crsOp->getCrsMatrix(); - const RCP> tmp_Crs = rcp_dynamic_cast>(crsMat); - RCP> tmp_BlockCrs; - if (!tmp_Crs.is_null()) { - return tmp_Crs->getTpetra_CrsMatrixNonConst(); - } else { - tmp_BlockCrs = rcp_dynamic_cast>(crsMat); - if (tmp_BlockCrs.is_null()) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix and Xpetra::TpetraBlockCrsMatrix failed"); - return tmp_BlockCrs->getTpetra_BlockCrsMatrixNonConst(); - } - } else if (!rmat.is_null()) { - return rmat->getTpetra_RowMatrixNonConst(); - } else { - RCP tpOp = rcp_dynamic_cast(Op, true); - RCP> tOp = tpOp->getOperator(); - RCP> tRow = rcp_dynamic_cast>(tOp, true); - return tRow; - } -#endif - }; - - static const RCP> Map2TpetraMap(const Map& map) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Map2TpetraMap: Tpetra has not been compiled with support for LO=GO=int."); -#else - const RCP>& tmp_TMap = rcp_dynamic_cast>(rcpFromRef(map)); - if (tmp_TMap == Teuchos::null) - throw Exceptions::BadCast("Utilities::Map2TpetraMap : Cast from Xpetra::Map to Xpetra::TpetraMap failed"); - return tmp_TMap->getTpetra_Map(); -#endif - }; - - static void MyOldScaleMatrix(Matrix& Op, const Teuchos::ArrayRCP& scalingVector, bool doInverse = true, - bool doFillComplete = true, bool doOptimizeStorage = true) { - Scalar one = Teuchos::ScalarTraits::one(); - Teuchos::ArrayRCP sv(scalingVector.size()); - if (doInverse) { - for (int i = 0; i < scalingVector.size(); ++i) - sv[i] = one / scalingVector[i]; - } else { - for (int i = 0; i < scalingVector.size(); ++i) - sv[i] = scalingVector[i]; - } - - switch (Op.getRowMap()->lib()) { - case Xpetra::UseTpetra: - MyOldScaleMatrix_Tpetra(Op, sv, doFillComplete, doOptimizeStorage); - break; - - case Xpetra::UseEpetra: - MyOldScaleMatrix_Epetra(Op, sv, doFillComplete, doOptimizeStorage); - break; - - default: - throw Exceptions::RuntimeError("Only Epetra and Tpetra matrices can be scaled."); - } - } - - // TODO This is the specialization - static void MyOldScaleMatrix_Tpetra(Matrix& Op, const Teuchos::ArrayRCP& scalingVector, - bool doFillComplete, bool doOptimizeStorage) { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Matrix scaling is not possible because Tpetra has not been compiled with support for LO=GO=int."); -#else - try { - Tpetra::CrsMatrix& tpOp = Op2NonConstTpetraCrs(Op); - - const RCP> rowMap = tpOp.getRowMap(); - const RCP> domainMap = tpOp.getDomainMap(); - const RCP> rangeMap = tpOp.getRangeMap(); - - size_t maxRowSize = tpOp.getLocalMaxNumRowEntries(); - if (maxRowSize == Teuchos::as(-1)) // hasn't been determined yet - maxRowSize = 20; - - std::vector scaledVals(maxRowSize); - if (tpOp.isFillComplete()) - tpOp.resumeFill(); - - if (Op.isLocallyIndexed() == true) { - typename Tpetra::CrsMatrix::local_inds_host_view_type cols; - typename Tpetra::CrsMatrix::values_host_view_type vals; - for (size_t i = 0; i < rowMap->getLocalNumElements(); ++i) { - tpOp.getLocalRowView(i, cols, vals); - size_t nnz = tpOp.getNumEntriesInLocalRow(i); - if (nnz > maxRowSize) { - maxRowSize = nnz; - scaledVals.resize(maxRowSize); - } - for (size_t j = 0; j < nnz; ++j) - scaledVals[j] = vals[j] * scalingVector[i]; - - if (nnz > 0) { - Teuchos::ArrayView cols_view(cols.data(), nnz); - Teuchos::ArrayView valview(&scaledVals[0], nnz); - tpOp.replaceLocalValues(i, cols_view, valview); - } - } // for (size_t i=0; ... - - } else { - typename Tpetra::CrsMatrix::local_inds_host_view_type cols; - typename Tpetra::CrsMatrix::values_host_view_type vals; - - for (size_t i = 0; i < rowMap->getLocalNumElements(); ++i) { - GlobalOrdinal gid = rowMap->getGlobalElement(i); - tpOp.getGlobalRowView(gid, cols, vals); - size_t nnz = tpOp.getNumEntriesInGlobalRow(gid); - if (nnz > maxRowSize) { - maxRowSize = nnz; - scaledVals.resize(maxRowSize); - } - // FIXME FIXME FIXME FIXME FIXME FIXME - for (size_t j = 0; j < nnz; ++j) - scaledVals[j] = vals[j] * scalingVector[i]; // FIXME i or gid? - - if (nnz > 0) { - Teuchos::ArrayView cols_view(cols.data(), nnz); - Teuchos::ArrayView valview(&scaledVals[0], nnz); - tpOp.replaceGlobalValues(gid, cols_view, valview); - } - } // for (size_t i=0; ... - } - - if (doFillComplete) { - if (domainMap == Teuchos::null || rangeMap == Teuchos::null) - throw Exceptions::RuntimeError("In Utilities::Scaling: cannot fillComplete because the domain and/or range map hasn't been defined"); - - RCP params = rcp(new Teuchos::ParameterList()); - params->set("Optimize Storage", doOptimizeStorage); - params->set("No Nonlocal Changes", true); - Op.fillComplete(Op.getDomainMap(), Op.getRangeMap(), params); - } - } catch (...) { - throw Exceptions::RuntimeError("Only Tpetra::CrsMatrix types can be scaled (Err.1)"); - } -#endif - } - - static void MyOldScaleMatrix_Epetra(Matrix& Op, const Teuchos::ArrayRCP& scalingVector, bool /* doFillComplete */, bool /* doOptimizeStorage */) { -#ifdef HAVE_MUELU_EPETRA - try { - // const Epetra_CrsMatrix& epOp = Utilities::Op2NonConstEpetraCrs(Op); - const Epetra_CrsMatrix& epOp = Op2NonConstEpetraCrs(Op); - - Epetra_Map const& rowMap = epOp.RowMap(); - int nnz; - double* vals; - int* cols; - - for (int i = 0; i < rowMap.NumMyElements(); ++i) { - epOp.ExtractMyRowView(i, nnz, vals, cols); - for (int j = 0; j < nnz; ++j) - vals[j] *= scalingVector[i]; - } - - } catch (...) { - throw Exceptions::RuntimeError("Only Epetra_CrsMatrix types can be scaled"); - } -#else - throw Exceptions::RuntimeError("Matrix scaling is not possible because Epetra has not been enabled."); -#endif // HAVE_MUELU_EPETRA - } - - /*! @brief Transpose a Xpetra::Matrix - - Note: Currently, an error is thrown if the matrix isn't a Tpetra::CrsMatrix or Epetra_CrsMatrix. - In principle, however, we could allow any Epetra_RowMatrix because the Epetra transposer does. - */ - static RCP Transpose(Matrix& Op, bool /* optimizeTranspose */ = false, const std::string& label = std::string(), const Teuchos::RCP& params = Teuchos::null) { - switch (Op.getRowMap()->lib()) { - case Xpetra::UseTpetra: { -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Utilities::Transpose: Tpetra is not compiled with LO=GO=int. Add TPETRA_INST_INT_INT:BOOL=ON to your configuration!"); -#else - using Helpers = Xpetra::Helpers; - /***************************************************************/ - if (Helpers::isTpetraCrs(Op)) { - const Tpetra::CrsMatrix& tpetraOp = Utilities::Op2TpetraCrs(Op); - - // Compute the transpose A of the Tpetra matrix tpetraOp. - RCP> A; - Tpetra::RowMatrixTransposer transposer(rcpFromRef(tpetraOp), label); - - { - using Teuchos::ParameterList; - using Teuchos::rcp; - RCP transposeParams = params.is_null() ? rcp(new ParameterList) : rcp(new ParameterList(*params)); - transposeParams->set("sort", false); - A = transposer.createTranspose(transposeParams); - } - - RCP> AA = rcp(new Xpetra::TpetraCrsMatrix(A)); - RCP AAA = rcp_implicit_cast(AA); - RCP AAAA = rcp(new CrsMatrixWrap(AAA)); - - if (Op.IsView("stridedMaps")) - AAAA->CreateView("stridedMaps", Teuchos::rcpFromRef(Op), true /*doTranspose*/); - - return AAAA; - } - /***************************************************************/ - else if (Helpers::isTpetraBlockCrs(Op)) { - using BCRS = Tpetra::BlockCrsMatrix; - // using CRS = Tpetra::CrsMatrix; - const BCRS& tpetraOp = Utilities::Op2TpetraBlockCrs(Op); - RCP At; - { - Tpetra::BlockCrsMatrixTransposer transposer(rcpFromRef(tpetraOp), label); - - using Teuchos::ParameterList; - using Teuchos::rcp; - RCP transposeParams = params.is_null() ? rcp(new ParameterList) : rcp(new ParameterList(*params)); - transposeParams->set("sort", false); - At = transposer.createTranspose(transposeParams); - } - - RCP> AA = rcp(new Xpetra::TpetraBlockCrsMatrix(At)); - RCP AAA = rcp_implicit_cast(AA); - RCP AAAA = rcp(new CrsMatrixWrap(AAA)); - - if (Op.IsView("stridedMaps")) - AAAA->CreateView("stridedMaps", Teuchos::rcpFromRef(Op), true /*doTranspose*/); - - return AAAA; - - } - /***************************************************************/ - else { - throw Exceptions::RuntimeError("Utilities::Transpose failed, perhaps because matrix is not a Crs or BlockCrs matrix"); - } -#endif - } - case Xpetra::UseEpetra: { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - Teuchos::TimeMonitor tm(*Teuchos::TimeMonitor::getNewTimer("ZZ Entire Transpose")); - // Epetra case - Epetra_CrsMatrix& epetraOp = Utilities::Op2NonConstEpetraCrs(Op); - EpetraExt::RowMatrix_Transpose transposer; - Epetra_CrsMatrix* A = dynamic_cast(&transposer(epetraOp)); - transposer.ReleaseTranspose(); // So we can keep A in Muelu... - - RCP rcpA(A); - RCP AA = rcp(new EpetraCrsMatrix(rcpA)); - RCP AAA = rcp_implicit_cast(AA); - RCP AAAA = rcp(new CrsMatrixWrap(AAA)); - - if (Op.IsView("stridedMaps")) - AAAA->CreateView("stridedMaps", Teuchos::rcpFromRef(Op), true /*doTranspose*/); - - return AAAA; -#else - throw Exceptions::RuntimeError("Epetra (Err. 2)"); -#endif - } - default: - throw Exceptions::RuntimeError("Only Epetra and Tpetra matrices can be transposed."); - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static RCP::magnitudeType, LocalOrdinal, GlobalOrdinal, Node>> - RealValuedToScalarMultiVector(RCP::coordinateType, LocalOrdinal, GlobalOrdinal, Node>> X) { - RCP> Xscalar = rcp_dynamic_cast>(X, true); - return Xscalar; - } - - /*! @brief Extract coordinates from parameter list and return them in a Xpetra::MultiVector - */ - static RCP::magnitudeType, LocalOrdinal, GlobalOrdinal, Node>> ExtractCoordinatesFromParameterList(ParameterList& paramList) { - RCP::magnitudeType, LocalOrdinal, GlobalOrdinal, Node>> coordinates = Teuchos::null; - - // check whether coordinates are contained in parameter list - if (paramList.isParameter("Coordinates") == false) - return coordinates; - -#if (defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)) - - // define Tpetra::MultiVector type with Scalar=float only if - // * ETI is turned off, since then the compiler will instantiate it automatically OR - // * Tpetra is instantiated on Scalar=float -#if !defined(HAVE_TPETRA_EXPLICIT_INSTANTIATION) || defined(HAVE_TPETRA_INST_FLOAT) - typedef Tpetra::MultiVector tfMV; - RCP floatCoords = Teuchos::null; -#endif - - // define Tpetra::MultiVector type with Scalar=double only if - // * ETI is turned off, since then the compiler will instantiate it automatically OR - // * Tpetra is instantiated on Scalar=double - typedef Tpetra::MultiVector::magnitudeType, LocalOrdinal, GlobalOrdinal, Node> tdMV; - RCP doubleCoords = Teuchos::null; - if (paramList.isType>("Coordinates")) { - // Coordinates are stored as a double vector - doubleCoords = paramList.get>("Coordinates"); - paramList.remove("Coordinates"); - } -#if !defined(HAVE_TPETRA_EXPLICIT_INSTANTIATION) || defined(HAVE_TPETRA_INST_FLOAT) - else if (paramList.isType>("Coordinates")) { - // check if coordinates are stored as a float vector - floatCoords = paramList.get>("Coordinates"); - paramList.remove("Coordinates"); - doubleCoords = rcp(new tdMV(floatCoords->getMap(), floatCoords->getNumVectors())); - deep_copy(*doubleCoords, *floatCoords); - } -#endif - // We have the coordinates in a Tpetra double vector - if (doubleCoords != Teuchos::null) { - coordinates = Teuchos::rcp(new Xpetra::TpetraMultiVector::magnitudeType, LocalOrdinal, GlobalOrdinal, Node>(doubleCoords)); - TEUCHOS_TEST_FOR_EXCEPT(doubleCoords->getNumVectors() != coordinates->getNumVectors()); - } -#endif // Tpetra instantiated on GO=int and EpetraNode - -#if defined(HAVE_MUELU_EPETRA) - RCP doubleEpCoords; - if (paramList.isType>("Coordinates")) { - doubleEpCoords = paramList.get>("Coordinates"); - paramList.remove("Coordinates"); - RCP> epCoordinates = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(doubleEpCoords)); - coordinates = rcp_dynamic_cast::magnitudeType, LocalOrdinal, GlobalOrdinal, Node>>(epCoordinates); - TEUCHOS_TEST_FOR_EXCEPT(doubleEpCoords->NumVectors() != Teuchos::as(coordinates->getNumVectors())); - } -#endif - - // check for Xpetra coordinates vector - if (paramList.isType("Coordinates")) { - coordinates = paramList.get("Coordinates"); - } - - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(coordinates)); - return coordinates; - } - -}; // class Utilities (specialization SC=double LO=GO=int) - -#endif // HAVE_MUELU_EPETRA - /*! \brief Extract non-serializable data from level-specific sublists and move it to a separate parameter list @@ -908,33 +179,6 @@ bool IsParamMuemexVariable(const std::string& name); */ bool IsParamValidVariable(const std::string& name); -#ifdef HAVE_MUELU_EPETRA -/*! \fn EpetraCrs_To_XpetraMatrix - @brief Helper function to convert a Epetra::CrsMatrix to an Xpetra::Matrix - TODO move this function to an Xpetra utility file - */ -template -RCP> -EpetraCrs_To_XpetraMatrix(const Teuchos::RCP& A) { - typedef Xpetra::EpetraCrsMatrixT XECrsMatrix; - typedef Xpetra::CrsMatrix XCrsMatrix; - typedef Xpetra::CrsMatrixWrap XCrsMatrixWrap; - - RCP Atmp = rcp(new XECrsMatrix(A)); - return rcp(new XCrsMatrixWrap(Atmp)); -} - -/*! \fn EpetraMultiVector_To_XpetraMultiVector - @brief Helper function to convert a Epetra::MultiVector to an Xpetra::MultiVector - TODO move this function to an Xpetra utility file - */ -template -RCP> -EpetraMultiVector_To_XpetraMultiVector(const Teuchos::RCP& V) { - return rcp(new Xpetra::EpetraMultiVectorT(V)); -} -#endif - /*! \fn TpetraCrs_To_XpetraMatrix @brief Helper function to convert a Tpetra::CrsMatrix to an Xpetra::Matrix TODO move this function to an Xpetra utility file @@ -1105,24 +349,6 @@ std::string toString(const T& what) { return buf.str(); } -#ifdef HAVE_MUELU_EPETRA -/*! \fn EpetraCrs_To_XpetraMatrix - @brief Helper function to convert a Epetra::CrsMatrix to an Xpetra::Matrix - TODO move this function to an Xpetra utility file - */ -template -RCP> -EpetraCrs_To_XpetraMatrix(const Teuchos::RCP& A); - -/*! \fn EpetraMultiVector_To_XpetraMultiVector - @brief Helper function to convert a Epetra::MultiVector to an Xpetra::MultiVector - TODO move this function to an Xpetra utility file - */ -template -RCP> -EpetraMultiVector_To_XpetraMultiVector(const Teuchos::RCP& V); -#endif - /*! \fn TpetraCrs_To_XpetraMatrix @brief Helper function to convert a Tpetra::CrsMatrix to an Xpetra::Matrix TODO move this function to an Xpetra utility file diff --git a/packages/muelu/src/Utils/MueLu_Utilities_def.hpp b/packages/muelu/src/Utils/MueLu_Utilities_def.hpp index 5548cc4595a1..363e3eb82f56 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_def.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_def.hpp @@ -17,24 +17,6 @@ #include "MueLu_ConfigDefs.hpp" #include "Xpetra_TpetraRowMatrix.hpp" -#ifdef HAVE_MUELU_EPETRA -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#endif -#endif - -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - #include #include #include @@ -43,10 +25,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#endif - #include //#include #include @@ -63,115 +41,9 @@ #include #include -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_ML) -#include -#include -#endif namespace MueLu { -#ifdef HAVE_MUELU_EPETRA -// using Xpetra::EpetraCrsMatrix; // TODO: mv in Xpetra_UseShortNamesScalar -// using Xpetra::EpetraMultiVector; -#endif - -#ifdef HAVE_MUELU_EPETRA -template -RCP> Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(RCP& epAB) { - return Xpetra::Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(epAB); -} -#endif - -#ifdef HAVE_MUELU_EPETRA -template -RCP Utilities::MV2EpetraMV(const RCP> vec) { - RCP> tmpVec = rcp_dynamic_cast>(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::EpetraMultiVector failed"); - return tmpVec->getEpetra_MultiVector(); -} - -template -RCP Utilities::MV2NonConstEpetraMV(RCP> vec) { - RCP> tmpVec = rcp_dynamic_cast>(vec); - if (tmpVec == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::MultiVector to Xpetra::EpetraMultiVector failed"); - return tmpVec->getEpetra_MultiVector(); -} - -template -Epetra_MultiVector& Utilities::MV2NonConstEpetraMV(Xpetra::MultiVector& vec) { - const Xpetra::EpetraMultiVectorT& tmpVec = dynamic_cast&>(vec); - return *(tmpVec.getEpetra_MultiVector()); -} - -template -const Epetra_MultiVector& Utilities::MV2EpetraMV(const Xpetra::MultiVector& vec) { - const Xpetra::EpetraMultiVectorT& tmpVec = dynamic_cast&>(vec); - return *(tmpVec.getEpetra_MultiVector()); -} - -template -RCP Utilities::Op2EpetraCrs(RCP> Op) { - RCP> crsOp = rcp_dynamic_cast>(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrix(); -} - -template -RCP Utilities::Op2NonConstEpetraCrs(RCP> Op) { - RCP> crsOp = rcp_dynamic_cast>(Op); - if (crsOp == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - const RCP>& tmp_ECrsMtx = rcp_dynamic_cast>(crsOp->getCrsMatrix()); - if (tmp_ECrsMtx == Teuchos::null) - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst(); -} - -template -const Epetra_CrsMatrix& Utilities::Op2EpetraCrs(const Xpetra::Matrix& Op) { - try { - const Xpetra::CrsMatrixWrap& crsOp = dynamic_cast&>(Op); - try { - const Xpetra::EpetraCrsMatrixT& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getEpetra_CrsMatrix(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -} - -template -Epetra_CrsMatrix& Utilities::Op2NonConstEpetraCrs(Xpetra::Matrix& Op) { - try { - Xpetra::CrsMatrixWrap& crsOp = dynamic_cast&>(Op); - try { - Xpetra::EpetraCrsMatrixT& tmp_ECrsMtx = dynamic_cast&>(*crsOp.getCrsMatrix()); - return *tmp_ECrsMtx.getEpetra_CrsMatrixNonConst(); - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - } - } catch (std::bad_cast&) { - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - } -} - -template -const Epetra_Map& Utilities::Map2EpetraMap(const Xpetra::Map& map) { - RCP> xeMap = rcp_dynamic_cast>(rcpFromRef(map)); - if (xeMap == Teuchos::null) - throw Exceptions::BadCast("Utilities::Map2EpetraMap : Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - return xeMap->getEpetra_Map(); -} -#endif - template RCP> Utilities::MV2TpetraMV(RCP> const vec) { @@ -494,20 +366,7 @@ template RCP> Utilities:: Transpose(Xpetra::Matrix& Op, bool /* optimizeTranspose */, const std::string& label, const Teuchos::RCP& params) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - std::string TorE = "epetra"; -#else std::string TorE = "tpetra"; -#endif - -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - try { - const Epetra_CrsMatrix& epetraOp = Utilities::Op2NonConstEpetraCrs(Op); - (void)epetraOp; // silence "unused variable" compiler warning - } catch (...) { - TorE = "tpetra"; - } -#endif if (TorE == "tpetra") { using Helpers = Xpetra::Helpers; diff --git a/packages/muelu/test/CMakeLists.txt b/packages/muelu/test/CMakeLists.txt index 637815343d2a..3e5b3914bf8d 100644 --- a/packages/muelu/test/CMakeLists.txt +++ b/packages/muelu/test/CMakeLists.txt @@ -26,7 +26,6 @@ IF(Xpetra_INT_LONG_LONG AND HAVE_MUELU_INST_DOUBLE_INT_LONGLONGINT) ENDIF() TRIBITS_ADD_TEST_DIRECTORIES(factories) TRIBITS_ADD_TEST_DIRECTORIES(maxwell) -TRIBITS_ADD_TEST_DIRECTORIES(navierstokes) TRIBITS_ADD_TEST_DIRECTORIES(contact) TRIBITS_ADD_TEST_DIRECTORIES(meshtying) if (NOT MUELU_VALGRIND_TESTING) @@ -35,9 +34,7 @@ if (NOT MUELU_VALGRIND_TESTING) # memory testing. TRIBITS_ADD_TEST_DIRECTORIES(paramlist) ENDIF() -TRIBITS_ADD_TEST_DIRECTORIES(permutation) TRIBITS_ADD_TEST_DIRECTORIES(profiling) -TRIBITS_ADD_TEST_DIRECTORIES(simple1D) TRIBITS_ADD_TEST_DIRECTORIES(viz) TRIBITS_ADD_TEST_DIRECTORIES(toggletransfer) TRIBITS_ADD_TEST_DIRECTORIES(perf_tests) diff --git a/packages/muelu/test/blockedtransfer/CMakeLists.txt b/packages/muelu/test/blockedtransfer/CMakeLists.txt index b1ee6371b26d..493d3f4b7c15 100644 --- a/packages/muelu/test/blockedtransfer/CMakeLists.txt +++ b/packages/muelu/test/blockedtransfer/CMakeLists.txt @@ -13,17 +13,6 @@ TRIBITS_ADD_EXECUTABLE( COMM serial mpi ) -IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack) - - TRIBITS_ADD_TEST( - BlockedTransfer - NAME "BlockedTransfer_Epetra" - ARGS "--linAlgebra=Epetra" - COMM serial mpi - ) - -ENDIF() - IF (${PACKAGE_NAME}_ENABLE_Ifpack2) TRIBITS_ADD_TEST( @@ -34,27 +23,3 @@ IF (${PACKAGE_NAME}_ENABLE_Ifpack2) ) ENDIF() - -# first ensure that these cmake boolean variables are defined -#ASSERT_DEFINED( -# ${PACKAGE_NAME}_ENABLE_Epetra -# ${PACKAGE_NAME}_ENABLE_EpetraExt -# ${PACKAGE_NAME}_ENABLE_Amesos -# ) - -#IF (${PACKAGE_NAME}_ENABLE_Epetra AND -# ${PACKAGE_NAME}_ENABLE_EpetraExt AND -# ${PACKAGE_NAME}_ENABLE_Amesos) - -#TRIBITS_ADD_EXECUTABLE_AND_TEST( -# TSIExample -# SOURCES tsiexample.cpp -# ARGS "" -# COMM serial mpi -# ) - -#TRIBITS_COPY_FILES_TO_BINARY_DIR(TSIExample_test_cp -#SOURCE_FILES TSImatrix.out TSIbvector.out nspvector.out -#) - -#ENDIF() diff --git a/packages/muelu/test/convergence/CMakeLists.txt b/packages/muelu/test/convergence/CMakeLists.txt index 0e3a81e40caf..fafbb1bf9fee 100644 --- a/packages/muelu/test/convergence/CMakeLists.txt +++ b/packages/muelu/test/convergence/CMakeLists.txt @@ -1,9 +1,7 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 ${PACKAGE_NAME}_ENABLE_Belos - ${PACKAGE_NAME}_ENABLE_Epetra ) # @@ -34,28 +32,6 @@ TRIBITS_ADD_EXECUTABLE( IF (${PACKAGE_NAME}_ENABLE_Belos) - IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND - ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - - TRIBITS_ADD_TEST( - Convergence - NAME "ConvergenceEpetra" - ARGS "--linAlgebra=Epetra" - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 1 - COMM mpi serial - ) - TRIBITS_ADD_TEST( - Convergence - NAME "ConvergenceEpetra" - ARGS "--linAlgebra=Epetra" - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 4 - COMM mpi - ) - - ENDIF() - IF (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) TRIBITS_ADD_TEST( diff --git a/packages/muelu/test/helmholtz/CMakeLists.txt b/packages/muelu/test/helmholtz/CMakeLists.txt index f011c806f0a6..1edc728c86e3 100644 --- a/packages/muelu/test/helmholtz/CMakeLists.txt +++ b/packages/muelu/test/helmholtz/CMakeLists.txt @@ -1,9 +1,7 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 ${PACKAGE_NAME}_ENABLE_Belos - ${PACKAGE_NAME}_ENABLE_Epetra ${PACKAGE_NAME}_ENABLE_Zoltan2Core ) @@ -49,15 +47,6 @@ IF (${PACKAGE_NAME}_ENABLE_Zoltan2Core AND HAVE_MUELU_COMPLEX) COMM serial mpi ) - # TRIBITS_ADD_TEST( - # CreateOperator - # NAME "CreateOperatorEpetra" - # ARGS "--linAlgebra=Epetra" - # STANDARD_PASS_OUTPUT - # NUM_MPI_PROCS 1 - # COMM mpi serial - # ) - TRIBITS_ADD_TEST( Helmholtz1D NAME "Helmholtz1DSerial" diff --git a/packages/muelu/test/interface/CMakeLists.txt b/packages/muelu/test/interface/CMakeLists.txt index 79f27f1d2009..ab3861c9c789 100644 --- a/packages/muelu/test/interface/CMakeLists.txt +++ b/packages/muelu/test/interface/CMakeLists.txt @@ -1,9 +1,7 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 ${PACKAGE_NAME}_ENABLE_Belos - ${PACKAGE_NAME}_ENABLE_Epetra ${PACKAGE_NAME}_ENABLE_Zoltan2Core ) @@ -50,75 +48,6 @@ SET(${PACKAGE_NAME}_PARAMETERLISTINTERPRETERTEST_SINGLETHREAD " --kokkos-num-thr # results in not setting the value correctly. IF ( ( HAVE_GCC_ABI_DEMANGLE STREQUAL "1") OR ( HAVE_GCC_ABI_DEMANGLE STREQUAL "ON") ) - IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND - ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos AND - HAVE_MUELU_INST_DOUBLE_INT_INT) - - string(CONCAT TEST_ARGS "--linAlgebra=Epetra" "${${PACKAGE_NAME}_PARAMETERLISTINTERPRETERTEST_SINGLETHREAD}") - - TRIBITS_ADD_TEST( - CreateOperator - NAME "CreateOperatorEpetra" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 1 - COMM mpi serial - ) - TRIBITS_ADD_TEST( - CreateOperator - NAME "CreateOperatorEpetra" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 4 - COMM mpi - ) - - IF(${PACKAGE_NAME}_ENABLE_Zoltan2Core) - - TRIBITS_ADD_TEST( - ParameterListInterpreter - NAME "ParameterListInterpreterEpetra" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 1 - COMM mpi serial - ) - TRIBITS_ADD_TEST( - ParameterListInterpreter - NAME "ParameterListInterpreterEpetra" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 4 - COMM mpi - ) - - string(CONCAT TEST_ARGS "--linAlgebra=Epetra --heavytests" "${${PACKAGE_NAME}_PARAMETERLISTINTERPRETERTEST_SINGLETHREAD}") - - # This test only runs on the dashboard, not at checkin. - TRIBITS_ADD_TEST( - ParameterListInterpreter - NAME "ParameterListInterpreterEpetraHeavy" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 1 - COMM mpi serial - CATEGORIES CONTINUOUS - ) - - # This test only runs on the dashboard, not at checkin. - TRIBITS_ADD_TEST( - ParameterListInterpreter - NAME "ParameterListInterpreterEpetraHeavy" - ARGS ${TEST_ARGS} - STANDARD_PASS_OUTPUT - NUM_MPI_PROCS 4 - COMM mpi - CATEGORIES CONTINUOUS - ) - - ENDIF() - - ENDIF() IF(${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) diff --git a/packages/muelu/test/interface/CreateOperator.cpp b/packages/muelu/test/interface/CreateOperator.cpp index 00a4eaaea530..b8d15e45529b 100644 --- a/packages/muelu/test/interface/CreateOperator.cpp +++ b/packages/muelu/test/interface/CreateOperator.cpp @@ -29,11 +29,6 @@ #include #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#include -#include -#endif #include const std::string thickSeparator = "=========================================================================================================================="; @@ -74,24 +69,6 @@ void setup_system_list(Xpetra::UnderlyingLib& lib, Teuchos::RCP Ae = Xpetra::Helpers::Op2NonConstEpetraCrs(A); - RCP Me = MueLu::CreateEpetraPreconditioner(Ae, mueluList); - - if (myRank == 0) { - // Redirect output back - std::cout.rdbuf(oldbuffer); - buffer.close(); - } - } -#endif } // This routine generate's the user's original A matrix and nullspace diff --git a/packages/muelu/test/interface/ParameterListInterpreter.cpp b/packages/muelu/test/interface/ParameterListInterpreter.cpp index 5f5e00828f02..e94182c892c0 100644 --- a/packages/muelu/test/interface/ParameterListInterpreter.cpp +++ b/packages/muelu/test/interface/ParameterListInterpreter.cpp @@ -18,9 +18,7 @@ #include -#if defined(HAVE_MUELU_AMESOS2) #include // needed for check whether KLU2 is available -#endif #include #include @@ -108,14 +106,6 @@ int main_(Teuchos::CommandLineProcessor& clp, Xpetra::UnderlyingLib& lib, int ar dirList.push_back(prefix + "FactoryParameterListInterpreter/"); } } -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_AMESOS2_KLU2) - // The ML interpreter have internal ifdef, which means that the resulting - // output would depend on configuration (reguarl interpreter does not have - // that). Therefore, we need to stabilize the configuration here. - // In addition, we run ML parameter list tests only if KLU is available - dirList.push_back(prefix + "MLParameterListInterpreter/"); - dirList.push_back(prefix + "MLParameterListInterpreter2/"); -#endif int numLists = dirList.size(); bool failed = false; diff --git a/packages/muelu/test/longlong/CMakeLists.txt b/packages/muelu/test/longlong/CMakeLists.txt index fc1cb9b0d1b3..e751ae5a8f53 100644 --- a/packages/muelu/test/longlong/CMakeLists.txt +++ b/packages/muelu/test/longlong/CMakeLists.txt @@ -1,8 +1,6 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 - ${PACKAGE_NAME}_ENABLE_Epetra ${PACKAGE_NAME}_ENABLE_Zoltan2Core ) diff --git a/packages/muelu/test/maxwell/CMakeLists.txt b/packages/muelu/test/maxwell/CMakeLists.txt index 9e70bcd24624..6478f52f9d71 100644 --- a/packages/muelu/test/maxwell/CMakeLists.txt +++ b/packages/muelu/test/maxwell/CMakeLists.txt @@ -70,25 +70,6 @@ IF (${PACKAGE_NAME}_ENABLE_Belos) NUM_MPI_PROCS 2 ) - IF (${PACKAGE_NAME}_ENABLE_ML AND ${PACKAGE_NAME}_ENABLE_Epetra) - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-Tpetra-ML-RefMaxwell-list" - ARGS "--linAlgebra=Tpetra --xml=Maxwell_ML_MueLu.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-Tpetra-ML-Maxwell1-list" - ARGS "--linAlgebra=Tpetra --precType=MueLu-Maxwell1 --xml=Maxwell_ML1_MueLu.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - ENDIF() - IF (${PACKAGE_NAME}_INST_DOUBLE_INT_INT AND ${PACKAGE_NAME}_ENABLE_Stratimikos) TRIBITS_ADD_TEST( Maxwell3D @@ -102,56 +83,6 @@ IF (${PACKAGE_NAME}_ENABLE_Belos) ENDIF() ENDIF() - IF (${PACKAGE_NAME}_ENABLE_Epetra) - - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-Epetra" - ARGS "--linAlgebra=Epetra --reuse --xml=Maxwell.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - IF (${PACKAGE_NAME}_ENABLE_Stratimikos) - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-Epetra-Stratimikos" - ARGS "--linAlgebra=Epetra --solverName=Stratimikos --reuse --xml=Maxwell.xml" - ARGS "--linAlgebra=Epetra --solverName=Stratimikos --reuse --xml=Maxwell3.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - ENDIF() - - IF (${PACKAGE_NAME}_ENABLE_ML) - - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-ML-RefMaxwell" - ARGS "--linAlgebra=Epetra --precType=ML-RefMaxwell --xml=Maxwell_ML.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - TRIBITS_ADD_TEST( - Maxwell3D - NAME "Maxwell3D-ML-Maxwell1" - ARGS "--linAlgebra=Epetra --precType=ML-Maxwell --xml=Maxwell_ML1.xml" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - # Hiptmair not implemented for MueLu+Epetra - # TRIBITS_ADD_TEST( - # Maxwell3D - # NAME "Maxwell3D-ML-list" - # ARGS "--linAlgebra=Epetra --precType=MueLu-Maxwell1 --xml=Maxwell_ML1_muelu.xml" - # COMM serial mpi - # NUM_MPI_PROCS 4 - # ) - ENDIF() - ENDIF() - TRIBITS_COPY_FILES_TO_BINARY_DIR(Maxwell_cp SOURCE_FILES M0.mat M1.mat S.mat D0.mat coords.mat Belos.xml Stratimikos.xml Stratimikos_Maxwell1.xml Maxwell.xml Maxwell2.xml Maxwell3.xml Maxwell_ML.xml Maxwell_ML_MueLu.xml Maxwell_ML1.xml Maxwell_ML1_MueLu.xml Maxwell_Reitzinger.xml Maxwell_Reitzinger_repart.xml GMHD.dat GMHD_nodalCoords.dat GMHD_D0.dat GMHD_curlcurlBlk.dat gmhd.xml diff --git a/packages/muelu/test/maxwell/Maxwell3D.cpp b/packages/muelu/test/maxwell/Maxwell3D.cpp index e5929084cb25..0eb3cd3faf2e 100644 --- a/packages/muelu/test/maxwell/Maxwell3D.cpp +++ b/packages/muelu/test/maxwell/Maxwell3D.cpp @@ -94,123 +94,6 @@ struct EpetraSolvers_Wrapper { } }; -#if defined(HAVE_MUELU_EPETRA) -template -struct EpetraSolvers_Wrapper { - static void Generate_ML_MaxwellPreconditioner(Teuchos::RCP >& SM, - Teuchos::RCP >& D0, - Teuchos::RCP >& Kn, - Teuchos::RCP >& nullspace, - Teuchos::RCP::coordinateType, int, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode> >& coords, - Teuchos::ParameterList& mueluList, - Teuchos::RCP >& mlopX) { -#if defined(HAVE_MUELU_ML) - typedef double SC; - typedef int LO; - typedef GlobalOrdinal GO; - typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode NO; - typedef typename Teuchos::ScalarTraits::coordinateType coordinate_type; - typedef typename Xpetra::Matrix Matrix; - - RCP epetraSM = Xpetra::Helpers::Op2EpetraCrs(SM); - RCP epetraD0 = Xpetra::Helpers::Op2EpetraCrs(D0); - if (!coords.is_null()) { - RCP epetraCoord = MueLu::Utilities::MV2EpetraMV(coords); - if (epetraCoord->NumVectors() > 0) mueluList.set("x-coordinates", (*epetraCoord)[0]); - if (epetraCoord->NumVectors() > 1) mueluList.set("y-coordinates", (*epetraCoord)[1]); - if (epetraCoord->NumVectors() > 2) mueluList.set("z-coordinates", (*epetraCoord)[2]); - } - if (!nullspace.is_null()) { - RCP epetraNullspace = MueLu::Utilities::MV2EpetraMV(nullspace); - mueluList.set("null space: dimension", epetraNullspace->NumVectors()); - mueluList.set("null space: vectors", (*epetraNullspace)[0]); - mueluList.set("null space: type", "pre-computed"); - } - RCP epetraKn; - if (Kn.is_null()) { - RCP temp = Xpetra::MatrixFactory::Build(SM->getRangeMap()); - Xpetra::MatrixMatrix::Multiply(*SM, false, *D0, false, *temp, true, true); - RCP Kn2 = Xpetra::MatrixFactory::Build(D0->getDomainMap()); - Xpetra::MatrixMatrix::Multiply(*D0, true, *temp, false, *Kn2, true, true); - epetraKn = Xpetra::Helpers::Op2EpetraCrs(Kn2); - } else - epetraKn = Xpetra::Helpers::Op2EpetraCrs(Kn); - - RCP mlop = rcp(new ML_Epetra::MultiLevelPreconditioner(*epetraSM, *epetraD0, *epetraKn, mueluList, true)); -#if defined(HAVE_MUELU_BELOS) - // NOTE: Belos needs the Apply() and AppleInverse() routines of ML swapped. So... - mlop = rcp(new Belos::EpetraPrecOp(mlop)); -#endif - - mlopX = rcp(new Xpetra::EpetraOperator(mlop)); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, - "Need ML & Epetra support"); -#endif - } - - static void Generate_ML_RefMaxwellPreconditioner(Teuchos::RCP >& SM, - Teuchos::RCP >& D0, - Teuchos::RCP >& Ms, - Teuchos::RCP >& M0inv, - Teuchos::RCP >& M1, - Teuchos::RCP >& nullspace, - Teuchos::RCP >& node_material, - Teuchos::RCP::coordinateType, int, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode> >& coords, - Teuchos::ParameterList& mueluList, - Teuchos::RCP >& mlopX) { -#if defined(HAVE_MUELU_ML) - typedef double SC; - typedef int LO; - typedef GlobalOrdinal GO; - typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode NO; - typedef typename Teuchos::ScalarTraits::coordinateType coordinate_type; - - RCP epetraSM = Xpetra::Helpers::Op2EpetraCrs(SM); - RCP epetraD0 = Xpetra::Helpers::Op2EpetraCrs(D0); - RCP epetraM0inv = Xpetra::Helpers::Op2EpetraCrs(M0inv); - RCP epetraMs; - RCP epetraM1 = Xpetra::Helpers::Op2EpetraCrs(M1); - if (!Ms.is_null()) - epetraMs = Xpetra::Helpers::Op2EpetraCrs(Ms); - else - epetraMs = epetraM1; - mueluList.set("D0", epetraD0); - mueluList.set("Ms", epetraMs); - mueluList.set("M0inv", epetraM0inv); - mueluList.set("M1", epetraM1); - if (!coords.is_null()) { - RCP epetraCoord = MueLu::Utilities::MV2EpetraMV(coords); - if (epetraCoord->NumVectors() > 0) mueluList.sublist("refmaxwell: 11list").set("x-coordinates", (*epetraCoord)[0]); - if (epetraCoord->NumVectors() > 1) mueluList.sublist("refmaxwell: 11list").set("y-coordinates", (*epetraCoord)[1]); - if (epetraCoord->NumVectors() > 2) mueluList.sublist("refmaxwell: 11list").set("z-coordinates", (*epetraCoord)[2]); - } - if (!node_material.is_null()) { - RCP epetraMaterial = MueLu::Utilities::MV2EpetraMV(node_material); - mueluList.sublist("refmaxwell: 11list").set("material coordinates", (*epetraMaterial)[0]); - } - if (!nullspace.is_null()) { - RCP epetraNullspace = MueLu::Utilities::MV2EpetraMV(nullspace); - mueluList.sublist("refmaxwell: 11list").set("null space: dimension", epetraNullspace->NumVectors()); - mueluList.sublist("refmaxwell: 11list").set("null space: vectors", (*epetraNullspace)[0]); - mueluList.sublist("refmaxwell: 11list").set("null space: type", "pre-computed"); - } - - RCP mlop = rcp(new ML_Epetra::RefMaxwellPreconditioner(*epetraSM, mueluList, true)); -#if defined(HAVE_MUELU_BELOS) - // NOTE: Belos needs the Apply() and AppleInverse() routines of ML swapped. So... - mlop = rcp(new Belos::EpetraPrecOp(mlop)); -#endif - - mlopX = rcp(new Xpetra::EpetraOperator(mlop)); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, - "Need ML & Epetra support"); -#endif - } -}; -#endif // HAVE_MUELU_EPETRA - template bool SetupSolve(std::map inputs) { #include @@ -262,19 +145,6 @@ bool SetupSolve(std::map inputs) { preconditioner = rcp(new MueLu::Maxwell1(SM_Matrix, D0_Matrix, Kn_Matrix, nullspace, coords, params, GmhdA_Matrix)); } -#ifdef HAVE_MUELU_EPETRA - else if (precType == "ML-RefMaxwell") { - Xpetra::UnderlyingLib lib = *static_cast(inputs["lib"]); - TEUCHOS_ASSERT(lib == Xpetra::UseEpetra); - EpetraSolvers_Wrapper::Generate_ML_RefMaxwellPreconditioner(SM_Matrix, D0_Matrix, Ms_Matrix, M0inv_Matrix, - M1_Matrix, nullspace, material, coords, params, preconditioner); - } else if (precType == "ML-Maxwell") { - Xpetra::UnderlyingLib lib = *static_cast(inputs["lib"]); - TEUCHOS_ASSERT(lib == Xpetra::UseEpetra); - EpetraSolvers_Wrapper::Generate_ML_MaxwellPreconditioner(SM_Matrix, D0_Matrix, Kn_Matrix, - nullspace, coords, params, preconditioner); - } -#endif { // A test to make sure we can wrap this guy as a MueLu::TpetraOperator @@ -396,13 +266,6 @@ bool SetupSolve(std::map inputs) { sublist->set(*key_it, coords); // else if (*key_it == "Nullspace") // sublist->set(*key_it, Nullspace); -#ifdef HAVE_MUELU_EPETRA - else if (value == "eD0") { - auto eD0 = Teuchos::rcp_dynamic_cast(Teuchos::rcp_dynamic_cast(D0_Matrix, true)->getCrsMatrix(), true)->getEpetra_CrsMatrix(); - sublist->set(*key_it, eD0); - } else if (value == "eCoordinates") - sublist->set(*key_it, Teuchos::rcp_dynamic_cast >(coords, true)->getEpetra_MultiVector()); -#endif else if (value == "tD0") { auto tD0 = Teuchos::rcp_dynamic_cast(Teuchos::rcp_dynamic_cast(D0_Matrix, true)->getCrsMatrix(), true)->getTpetra_CrsMatrix(); sublist->set(*key_it, tD0); diff --git a/packages/muelu/test/mhdvanka/tomtest.cpp b/packages/muelu/test/mhdvanka/tomtest.cpp deleted file mode 100644 index ec03fc1eb62a..000000000000 --- a/packages/muelu/test/mhdvanka/tomtest.cpp +++ /dev/null @@ -1,330 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -// A very simple driver to test basic MueLu functionality, -// most specifically, a geometric linear interpolation routine. - -#include -#include -#include - -// MueLu main header: include most common header files in one line -#include - -// Teuchos -#include - -// Epetra -#include - -// EpetraExt -#include -#include -#include - -// Xpetra -#define XPETRA_ENABLED -#include -#include -#include - -#include "MueLu_Level.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -//#include "EditCopies/MueLu_MHDVankaSmoother_def.hpp" - -int main(int argc, char *argv[]) { -#include - - using Teuchos::RCP; // reference count pointers - - typedef MueLu::GeoInterpFactory GeoInterpFactory; - typedef MueLu::Q2Q1Q2CoarseGridFactory Q2Q1Q2CoarseGridFactory; - typedef MueLu::MHDRAPFactory MHDRAPFactory; - - // - // MPI initialization using Teuchos - // *Included because JHU indicated that it shouldn't cause problems - // if running in serial - // - - Teuchos::GlobalMPISession mpiSession(&argc, &argv, NULL); - - bool success = false; - bool verbose = true; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - - // Initialize a "FancyOStream" to output to standard out (cout) - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - - // First, we start with an Xpetra::Map - Xpetra::UnderlyingLib lib = Xpetra::UseTpetra; - - string fileNameA00 = "./Matrices/J_00_3.mm"; - string fileNameA01 = "./Matrices/J_01_3.mm"; - string fileNameA02 = "./Matrices/J_02_3.mm"; - string fileNameA10 = "./Matrices/J_10_3.mm"; - string fileNameA11 = "./Matrices/J_11_3.mm"; - string fileNameA12 = "./Matrices/J_12_3.mm"; - string fileNameA20 = "./Matrices/J_20_3.mm"; - string fileNameA21 = "./Matrices/J_21_3.mm"; - string fileNameA22 = "./Matrices/J_22_3.mm"; - - RCP A00 = Utils::Read(fileNameA00, lib, comm); - RCP A01 = Utils::Read(fileNameA01, lib, comm); - RCP A02 = Utils::Read(fileNameA02, lib, comm); - RCP A10 = Utils::Read(fileNameA10, lib, comm); - RCP A11 = Utils::Read(fileNameA11, lib, comm); - RCP A12 = Utils::Read(fileNameA12, lib, comm); - RCP A20 = Utils::Read(fileNameA20, lib, comm); - RCP A21 = Utils::Read(fileNameA21, lib, comm); - RCP A22 = Utils::Read(fileNameA22, lib, comm); - - std::cout << A00->isFillComplete() << std::endl; - - // Now we want to build A; - RCP VMap = A00->getRowMap(); - RCP PMap = A10->getRowMap(); - RCP MMap = A20->getRowMap(); - - size_t nv = VMap->getGlobalNumElements(); - size_t np = PMap->getGlobalNumElements(); - size_t nm = MMap->getGlobalNumElements(); - - RCP AMap = Xpetra::MapFactory::createUniformContigMap(Xpetra::UseTpetra, nv + np + nm, comm); - - size_t maxEntriesPerRow = 84; - RCP A = rcp(new CrsMatrixWrap(AMap, maxEntriesPerRow)); - - Teuchos::ArrayView colPtr; - Teuchos::ArrayView valPtr; - - A00->getLocalRowView(7, colPtr, valPtr); - - std::cout << "valPtr.size() = " << valPtr.size() << std::endl; - - A01->getLocalRowView(7, colPtr, valPtr); - - std::cout << "valPtr.size() = " << valPtr.size() << std::endl; - - // Loop over V rows - for (size_t VRow = 0; VRow < nv; VRow++) { - Teuchos::ArrayView colPtr; - Teuchos::ArrayView valPtr; - - A00->getLocalRowView(VRow, colPtr, valPtr); - - // Can be directly inserted! - A->insertGlobalValues(VRow, colPtr, valPtr); - - // Now do pressure column: - A01->getLocalRowView(VRow, colPtr, valPtr); - - Teuchos::ArrayRCP newColPtr(colPtr.size(), nv); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(VRow, newColPtr.view(0, colPtr.size()), valPtr); - - // Now do magnetics column: - A02->getLocalRowView(VRow, colPtr, valPtr); - - newColPtr.clear(); - newColPtr.resize(colPtr.size(), nv + np); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(VRow, newColPtr.view(0, colPtr.size()), valPtr); - } - - // Loop over P rows - for (size_t PRow = 0; PRow < np; PRow++) { - Teuchos::ArrayView colPtr; - Teuchos::ArrayView valPtr; - - A10->getLocalRowView(PRow, colPtr, valPtr); - - // Can be directly inserted! - A->insertGlobalValues(PRow + nv, colPtr, valPtr); - - // Now do pressure column: - A11->getLocalRowView(PRow, colPtr, valPtr); - - Teuchos::ArrayRCP newColPtr(colPtr.size(), nv); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(PRow + nv, newColPtr.view(0, colPtr.size()), valPtr); - - // Now do magnetics column: - A12->getLocalRowView(PRow, colPtr, valPtr); - - newColPtr.clear(); - newColPtr.resize(colPtr.size(), nv + np); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(PRow + nv, newColPtr.view(0, colPtr.size()), valPtr); - } - - // Loop over M rows - for (size_t MRow = 0; MRow < nm; MRow++) { - Teuchos::ArrayView colPtr; - Teuchos::ArrayView valPtr; - - A20->getLocalRowView(MRow, colPtr, valPtr); - - // Can be directly inserted! - A->insertGlobalValues(MRow + nv + np, colPtr, valPtr); - - // Now do pressure column: - A21->getLocalRowView(MRow, colPtr, valPtr); - - Teuchos::ArrayRCP newColPtr(colPtr.size(), nv); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(MRow + nv + np, newColPtr.view(0, colPtr.size()), valPtr); - - // Now do magnetics column: - A22->getLocalRowView(MRow, colPtr, valPtr); - - newColPtr.clear(); - newColPtr.resize(colPtr.size(), nv + np); - for (LO jj = 0; jj < colPtr.size(); jj++) { - newColPtr[jj] += colPtr[jj]; - } - - // Insert into A - A->insertGlobalValues(MRow + nv + np, newColPtr.view(0, colPtr.size()), valPtr); - } - - A->fillComplete(); - - // Let's read in the element connectivity info: - GO totalFineElements = 32 * 32; - - RCP > fineGridVElements = rcp(new Teuchos::SerialDenseMatrix(totalFineElements, 18)); - RCP > fineGridPElements = rcp(new Teuchos::SerialDenseMatrix(totalFineElements, 4)); - RCP > fineGridMElements = rcp(new Teuchos::SerialDenseMatrix(totalFineElements, 9)); - - std::ifstream VElementFile("./Matrices/elements_0_0"); - std::ifstream PElementFile("./Matrices/elements_1_1"); - std::ifstream MElementFile("./Matrices/elements_2_2"); - - for (GO ii = 0; ii < totalFineElements; ii++) { - for (LO jj = 0; jj < 9; jj++) { - VElementFile >> (*fineGridVElements)(ii, 2 * jj); - VElementFile >> (*fineGridVElements)(ii, 2 * jj + 1); - - MElementFile >> (*fineGridMElements)(ii, jj); - } - - for (LO kk = 0; kk < 4; kk++) { - PElementFile >> (*fineGridPElements)(ii, kk); - } - } - VElementFile.close(); - PElementFile.close(); - MElementFile.close(); - - Hierarchy H; - H.setDefaultVerbLevel(Teuchos::VERB_NONE); - - RCP finest = H.GetLevel(); - finest->setDefaultVerbLevel(Teuchos::VERB_NONE); - - finest->Set("A", A); - finest->Set("A00", A00); - finest->Set("A01", A01); - finest->Set("A02", A02); - finest->Set("A10", A10); - finest->Set("A11", A11); - finest->Set("A12", A12); - finest->Set("A20", A20); - finest->Set("A21", A21); - finest->Set("A22", A22); - - // Set finegrid elements - finest->Set("VElementList", fineGridVElements); - finest->Set("PElementList", fineGridPElements); - finest->Set("MElementList", fineGridMElements); - - // Set count stuff for Vanka Smoother - finest->Set("NV", A00->getGlobalNumRows()); - finest->Set("NP", A10->getGlobalNumRows()); - finest->Set("NM", A20->getGlobalNumRows()); - - // Create a GeoInterpFactory - RCP geoInterp = rcp(new GeoInterpFactory()); - RCP coarseElementFact = rcp(new Q2Q1Q2CoarseGridFactory()); - RCP > rapFact = rcp(new MueLu::MHDRAPFactory()); - - RCP M = rcp(new FactoryManager()); - M->SetFactory("A", rapFact); - M->SetFactory("A00", rapFact); - M->SetFactory("A01", rapFact); - M->SetFactory("A02", rapFact); - M->SetFactory("A10", rapFact); - M->SetFactory("A11", rapFact); - M->SetFactory("A12", rapFact); - M->SetFactory("A20", rapFact); - M->SetFactory("A21", rapFact); - M->SetFactory("A22", rapFact); - M->SetFactory("VElementList", coarseElementFact); - M->SetFactory("PElementList", coarseElementFact); - M->SetFactory("MElementList", coarseElementFact); - M->SetFactory("PV", geoInterp); - M->SetFactory("PP", geoInterp); - M->SetFactory("PM", geoInterp); - M->SetFactory("P", geoInterp); - - H.Setup(*M, 0, 3); - - // Utils::Write("./output/BigAMat.mm",*A); - std::cout << "Hello world!\n"; - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -} diff --git a/packages/muelu/test/navierstokes/A_re1000_5932.txt b/packages/muelu/test/navierstokes/A_re1000_5932.txt deleted file mode 100644 index dc58f9cf89b7..000000000000 --- a/packages/muelu/test/navierstokes/A_re1000_5932.txt +++ /dev/null @@ -1,27952 +0,0 @@ -%%MatrixMarket matrix coordinate real general -% Generated 15-Jul-2015 -1500 1500 27949 -1 1 1 -2 2 1 -3 1 -0.01203703703703703 -3 2 -0.01435185185185185 -3 3 0.3103566529492456 -3 4 0.01203703703703704 -3 5 -0.01342592592592591 -3 6 -0.05315500685871069 -3 7 0.01296296296296296 -3 8 0.01342592592592593 -3 9 -0.1551783264746228 -3 10 -0.01296296296296297 -3 11 0.01435185185185184 -3 12 -0.1020233196159122 -4 4 1 -5 5 1 -6 1 -0.01203703703703706 -6 2 -0.01342592592592593 -6 3 -0.0531550068587107 -6 4 3.122502256758253e-17 -6 5 -0.02870370370370368 -6 6 0.6207133058984913 -6 7 -1.561251128379126e-17 -6 8 0.02870370370370368 -6 9 -0.2040466392318239 -6 10 -0.01296296296296297 -6 11 0.01342592592592592 -6 12 -0.1551783264746227 -6 13 0.01203703703703703 -6 14 -0.01342592592592594 -6 15 -0.05315500685871073 -6 16 0.01296296296296299 -6 17 0.01342592592592596 -6 18 -0.1551783264746232 -7 1 -0.0009703703703703702 -7 2 -0.0005 -7 3 -0.008333333333333333 -7 4 -0.0002814814814814779 -7 5 4.336808689942018e-19 -7 6 -3.469446951953614e-18 -7 7 0.007762962962962963 -7 8 9.75781955236954e-19 -7 9 -6.938893903907228e-18 -7 10 -0.001659259259259262 -7 11 -6.505213034913027e-19 -7 12 -0.03333333333333333 -7 13 -0.0009703703703703688 -7 14 0.0004999999999999996 -7 15 0.008333333333333333 -7 16 -0.001659259259259257 -7 17 -2.168404344971009e-19 -7 18 0.03333333333333334 -7 817 -0.0002814814814814843 -7 819 -1.734723475976807e-18 -7 820 -0.0009703703703703719 -7 821 0.0005000000000000003 -7 822 -0.008333333333333333 -7 823 -0.0009703703703703715 -7 824 -0.0005000000000000003 -7 825 0.008333333333333335 -8 1 -0.0005 -8 2 -0.001040740740740741 -8 3 -0.00925925925925926 -8 4 3.252606517456513e-19 -8 5 -0.002362962962962959 -8 6 -0.03703703703703703 -8 7 8.673617379884035e-19 -8 8 0.008325925925925926 -8 10 -6.505213034913027e-19 -8 11 0.0002814814814814795 -8 12 -6.938893903907228e-18 -8 13 0.0004999999999999997 -8 14 -0.001040740740740739 -8 15 -0.009259259259259259 -8 16 -1.084202172485504e-19 -8 17 0.0002814814814814836 -8 18 1.387778780781446e-17 -8 817 1.084202172485504e-19 -8 818 -0.002362962962962967 -8 819 0.03703703703703703 -8 820 0.0005000000000000002 -8 821 -0.001040740740740742 -8 822 0.009259259259259252 -8 823 -0.0005000000000000003 -8 824 -0.001040740740740742 -8 825 0.009259259259259266 -9 1 -0.01296296296296295 -9 2 -0.01342592592592594 -9 3 -0.1551783264746228 -9 4 1.734723475976807e-18 -9 5 -0.02870370370370372 -9 6 -0.2040466392318239 -9 7 3.469446951953614e-18 -9 8 2.42861286636753e-17 -9 9 1.241426611796981 -9 10 -0.02407407407407408 -9 11 6.938893903907228e-18 -9 12 -0.1063100137174214 -9 13 0.01296296296296295 -9 14 -0.01342592592592591 -9 15 -0.1551783264746227 -9 16 0.02407407407407407 -9 17 -1.734723475976807e-18 -9 18 -0.1063100137174208 -9 817 -6.938893903907228e-18 -9 818 0.02870370370370368 -9 819 -0.2040466392318246 -9 820 -0.01296296296296297 -9 821 0.01342592592592592 -9 822 -0.1551783264746225 -9 823 0.01296296296296298 -9 824 0.01342592592592593 -9 825 -0.1551783264746228 -10 10 1 -11 11 1 -12 1 -0.01296296296296296 -12 2 -0.01435185185185184 -12 3 -0.1020233196159121 -12 4 0.01296296296296297 -12 5 -0.01342592592592592 -12 6 -0.1551783264746227 -12 7 0.02407407407407408 -12 8 1.734723475976807e-17 -12 9 -0.1063100137174213 -12 10 -0.02407407407407408 -12 11 -1.734723475976807e-17 -12 12 0.6207133058984903 -12 817 0.01296296296296293 -12 818 0.01342592592592591 -12 819 -0.1551783264746223 -12 820 -0.01296296296296295 -12 821 0.01435185185185185 -12 822 -0.1020233196159117 -13 13 1 -14 14 1 -15 4 -0.01203703703703705 -15 5 -0.01342592592592592 -15 6 -0.05315500685871072 -15 7 -0.01296296296296295 -15 8 0.01342592592592591 -15 9 -0.1551783264746227 -15 13 1.561251128379126e-17 -15 14 -0.02870370370370371 -15 15 0.6207133058984915 -15 16 -1.734723475976807e-17 -15 17 0.02870370370370371 -15 18 -0.2040466392318247 -15 19 0.01203703703703704 -15 20 -0.01342592592592592 -15 21 -0.05315500685871066 -15 22 0.01296296296296297 -15 23 0.01342592592592593 -15 24 -0.1551783264746228 -16 4 -0.0009703703703703721 -16 5 -0.0005000000000000004 -16 6 -0.008333333333333342 -16 7 -0.001659259259259257 -16 8 -1.084202172485504e-19 -16 9 -0.03333333333333333 -16 13 -0.0002814814814814825 -16 14 5.421010862427522e-19 -16 15 -1.734723475976807e-18 -16 16 0.007762962962962962 -16 17 8.673617379884035e-19 -16 18 3.469446951953614e-18 -16 19 -0.0009703703703703708 -16 20 0.0004999999999999999 -16 21 0.008333333333333344 -16 22 -0.00165925925925926 -16 23 -8.673617379884035e-19 -16 24 0.03333333333333334 -16 817 -0.0009703703703703691 -16 818 0.0004999999999999999 -16 819 -0.008333333333333325 -16 823 -0.0002814814814814806 -16 825 3.469446951953614e-18 -16 826 -0.0009703703703703693 -16 827 -0.0004999999999999998 -16 828 0.008333333333333326 -17 4 -0.0005000000000000003 -17 5 -0.001040740740740743 -17 6 -0.009259259259259269 -17 7 -2.168404344971009e-19 -17 8 0.0002814814814814836 -17 9 -1.561251128379126e-17 -17 13 3.252606517456513e-19 -17 14 -0.002362962962962964 -17 15 -0.03703703703703703 -17 16 8.673617379884035e-19 -17 17 0.008325925925925924 -17 18 -6.938893903907228e-18 -17 19 0.0004999999999999999 -17 20 -0.00104074074074074 -17 21 -0.009259259259259252 -17 22 -6.505213034913027e-19 -17 23 0.0002814814814814805 -17 24 1.387778780781446e-17 -17 817 0.0004999999999999999 -17 818 -0.001040740740740741 -17 819 0.009259259259259264 -17 823 2.168404344971009e-19 -17 824 -0.002362962962962963 -17 825 0.03703703703703705 -17 826 -0.0004999999999999998 -17 827 -0.00104074074074074 -17 828 0.00925925925925926 -18 4 -0.012962962962963 -18 5 -0.01342592592592595 -18 6 -0.1551783264746232 -18 7 -0.02407407407407407 -18 8 1.387778780781446e-17 -18 9 -0.1063100137174208 -18 13 2.081668171172169e-17 -18 14 -0.0287037037037037 -18 15 -0.2040466392318246 -18 16 -1.734723475976807e-17 -18 17 -5.204170427930421e-17 -18 18 1.241426611796982 -18 19 0.01296296296296297 -18 20 -0.01342592592592591 -18 21 -0.1551783264746227 -18 22 0.0240740740740741 -18 23 1.387778780781446e-17 -18 24 -0.1063100137174212 -18 817 -0.01296296296296294 -18 818 0.01342592592592591 -18 819 -0.1551783264746225 -18 823 -6.938893903907228e-18 -18 824 0.02870370370370375 -18 825 -0.2040466392318241 -18 826 0.01296296296296294 -18 827 0.01342592592592592 -18 828 -0.1551783264746225 -19 19 1 -20 20 1 -21 13 -0.01203703703703706 -21 14 -0.01342592592592593 -21 15 -0.05315500685871068 -21 16 -0.01296296296296296 -21 17 0.01342592592592591 -21 18 -0.1551783264746227 -21 19 2.42861286636753e-17 -21 20 -0.02870370370370369 -21 21 0.6207133058984914 -21 22 -1.908195823574488e-17 -21 23 0.0287037037037037 -21 24 -0.204046639231824 -21 25 0.01203703703703703 -21 26 -0.01342592592592595 -21 27 -0.05315500685871073 -21 28 0.01296296296296298 -21 29 0.01342592592592595 -21 30 -0.1551783264746232 -22 13 -0.0009703703703703701 -22 14 -0.0005 -22 15 -0.008333333333333333 -22 16 -0.00165925925925926 -22 17 -6.505213034913027e-19 -22 18 -0.03333333333333335 -22 19 -0.0002814814814814783 -22 20 2.168404344971009e-19 -22 22 0.007762962962962965 -22 23 6.505213034913027e-19 -22 24 -6.938893903907228e-18 -22 25 -0.0009703703703703693 -22 26 0.0004999999999999998 -22 27 0.008333333333333335 -22 28 -0.001659259259259258 -22 29 2.168404344971009e-19 -22 30 0.03333333333333334 -22 823 -0.0009703703703703717 -22 824 0.0005000000000000002 -22 825 -0.00833333333333334 -22 826 -0.0002814814814814854 -22 827 1.084202172485504e-19 -22 828 -1.734723475976807e-18 -22 829 -0.0009703703703703715 -22 830 -0.0005000000000000002 -22 831 0.008333333333333338 -23 13 -0.0005 -23 14 -0.001040740740740741 -23 15 -0.009259259259259264 -23 16 -9.75781955236954e-19 -23 17 0.0002814814814814804 -23 18 -1.214306433183765e-17 -23 19 4.336808689942018e-19 -23 20 -0.002362962962962959 -23 21 -0.03703703703703703 -23 22 3.252606517456513e-19 -23 23 0.008325925925925928 -23 25 0.0004999999999999998 -23 26 -0.00104074074074074 -23 27 -0.00925925925925926 -23 28 3.252606517456513e-19 -23 29 0.0002814814814814828 -23 30 1.734723475976807e-18 -23 823 0.0005000000000000002 -23 824 -0.001040740740740741 -23 825 0.00925925925925926 -23 827 -0.002362962962962968 -23 828 0.03703703703703706 -23 829 -0.0005000000000000003 -23 830 -0.001040740740740742 -23 831 0.009259259259259266 -24 13 -0.01296296296296296 -24 14 -0.01342592592592594 -24 15 -0.1551783264746228 -24 16 -0.02407407407407407 -24 17 -6.938893903907228e-18 -24 18 -0.1063100137174212 -24 19 1.734723475976807e-18 -24 20 -0.02870370370370371 -24 21 -0.204046639231824 -24 22 8.673617379884035e-18 -24 23 2.081668171172169e-17 -24 24 1.241426611796983 -24 25 0.01296296296296295 -24 26 -0.01342592592592592 -24 27 -0.1551783264746228 -24 28 0.02407407407407406 -24 29 -6.938893903907228e-18 -24 30 -0.106310013717421 -24 823 -0.01296296296296298 -24 824 0.01342592592592593 -24 825 -0.1551783264746227 -24 826 -6.938893903907228e-18 -24 827 0.0287037037037037 -24 828 -0.204046639231825 -24 829 0.01296296296296299 -24 830 0.01342592592592594 -24 831 -0.1551783264746229 -25 25 1 -26 26 1 -27 19 -0.01203703703703704 -27 20 -0.01342592592592593 -27 21 -0.05315500685871073 -27 22 -0.01296296296296296 -27 23 0.01342592592592592 -27 24 -0.1551783264746228 -27 25 3.469446951953614e-18 -27 26 -0.02870370370370372 -27 27 0.6207133058984919 -27 28 1.734723475976807e-18 -27 29 0.02870370370370372 -27 30 -0.2040466392318249 -27 31 0.01203703703703703 -27 32 -0.01342592592592593 -27 33 -0.05315500685871048 -27 34 0.01296296296296297 -27 35 0.01342592592592593 -27 36 -0.155178326474623 -28 19 -0.0009703703703703718 -28 20 -0.0005000000000000003 -28 21 -0.008333333333333342 -28 22 -0.001659259259259258 -28 23 3.252606517456513e-19 -28 24 -0.03333333333333333 -28 25 -0.0002814814814814829 -28 26 -2.168404344971009e-19 -28 27 -6.938893903907228e-18 -28 28 0.007762962962962963 -28 29 9.75781955236954e-19 -28 30 -1.387778780781446e-17 -28 31 -0.0009703703703703706 -28 32 0.0005 -28 33 0.008333333333333335 -28 34 -0.001659259259259258 -28 35 1.084202172485504e-19 -28 36 0.03333333333333334 -28 826 -0.0009703703703703689 -28 827 0.0004999999999999998 -28 828 -0.008333333333333325 -28 829 -0.0002814814814814819 -28 830 -3.252606517456513e-19 -28 831 3.469446951953614e-18 -28 832 -0.0009703703703703706 -28 833 -0.0005000000000000001 -28 834 0.008333333333333335 -29 19 -0.0005000000000000002 -29 20 -0.001040740740740742 -29 21 -0.009259259259259266 -29 22 2.168404344971009e-19 -29 23 0.0002814814814814827 -29 24 -5.204170427930421e-18 -29 25 -2.168404344971009e-19 -29 26 -0.002362962962962965 -29 27 -0.03703703703703705 -29 28 9.75781955236954e-19 -29 29 0.008325925925925928 -29 30 -6.938893903907228e-18 -29 31 0.0005000000000000001 -29 32 -0.001040740740740741 -29 33 -0.009259259259259266 -29 35 0.0002814814814814831 -29 826 0.0004999999999999999 -29 827 -0.001040740740740741 -29 828 0.009259259259259266 -29 829 -4.336808689942018e-19 -29 830 -0.002362962962962964 -29 831 0.03703703703703706 -29 832 -0.0005000000000000001 -29 833 -0.001040740740740741 -29 834 0.009259259259259266 -30 19 -0.01296296296296299 -30 20 -0.01342592592592594 -30 21 -0.1551783264746232 -30 22 -0.02407407407407408 -30 23 2.081668171172169e-17 -30 24 -0.106310013717421 -30 25 1.214306433183765e-17 -30 26 -0.0287037037037037 -30 27 -0.2040466392318249 -30 28 8.673617379884035e-18 -30 29 -2.42861286636753e-17 -30 30 1.241426611796983 -30 31 0.01296296296296297 -30 32 -0.01342592592592593 -30 33 -0.155178326474623 -30 34 0.02407407407407406 -30 35 3.469446951953614e-18 -30 36 -0.1063100137174209 -30 826 -0.01296296296296294 -30 827 0.01342592592592592 -30 828 -0.1551783264746226 -30 829 1.734723475976807e-18 -30 830 0.02870370370370373 -30 831 -0.2040466392318246 -30 832 0.01296296296296296 -30 833 0.01342592592592593 -30 834 -0.1551783264746228 -31 31 1 -32 32 1 -33 25 -0.01203703703703703 -33 26 -0.01342592592592593 -33 27 -0.05315500685871049 -33 28 -0.01296296296296297 -33 29 0.01342592592592593 -33 30 -0.155178326474623 -33 31 -6.938893903907228e-18 -33 32 -0.02870370370370372 -33 33 0.6207133058984915 -33 34 1.908195823574488e-17 -33 35 0.02870370370370373 -33 36 -0.2040466392318248 -33 37 0.01203703703703704 -33 38 -0.01342592592592593 -33 39 -0.05315500685871059 -33 40 0.01296296296296295 -33 41 0.01342592592592592 -33 42 -0.1551783264746227 -34 25 -0.0009703703703703706 -34 26 -0.0005000000000000001 -34 27 -0.008333333333333333 -34 28 -0.001659259259259258 -34 30 -0.03333333333333333 -34 31 -0.0002814814814814829 -34 32 -1.084202172485504e-19 -34 33 -3.469446951953614e-18 -34 34 0.007762962962962962 -34 35 -3.252606517456513e-19 -34 36 -1.387778780781446e-17 -34 37 -0.0009703703703703711 -34 38 0.0005000000000000002 -34 39 0.008333333333333333 -34 40 -0.001659259259259256 -34 41 3.252606517456513e-19 -34 42 0.03333333333333333 -34 829 -0.0009703703703703706 -34 830 0.0005000000000000001 -34 831 -0.008333333333333333 -34 832 -0.0002814814814814836 -34 834 -1.734723475976807e-18 -34 835 -0.0009703703703703706 -34 836 -0.0005000000000000001 -34 837 0.008333333333333333 -35 25 -0.0005000000000000001 -35 26 -0.001040740740740741 -35 27 -0.009259259259259266 -35 29 0.000281481481481483 -35 31 -2.168404344971009e-19 -35 32 -0.002362962962962965 -35 33 -0.03703703703703705 -35 34 -3.252606517456513e-19 -35 35 0.008325925925925929 -35 36 -3.469446951953614e-18 -35 37 0.0005000000000000003 -35 38 -0.001040740740740743 -35 39 -0.009259259259259273 -35 40 3.252606517456513e-19 -35 41 0.0002814814814814854 -35 42 -1.214306433183765e-17 -35 829 0.0005000000000000001 -35 830 -0.001040740740740741 -35 831 0.009259259259259266 -35 832 1.084202172485504e-19 -35 833 -0.002362962962962966 -35 834 0.03703703703703707 -35 835 -0.0005000000000000001 -35 836 -0.001040740740740742 -35 837 0.009259259259259273 -36 25 -0.01296296296296297 -36 26 -0.01342592592592593 -36 27 -0.155178326474623 -36 28 -0.02407407407407407 -36 29 3.469446951953614e-18 -36 30 -0.1063100137174209 -36 31 -5.204170427930421e-18 -36 32 -0.02870370370370372 -36 33 -0.2040466392318248 -36 34 1.908195823574488e-17 -36 35 1.734723475976807e-18 -36 36 1.241426611796983 -36 37 0.01296296296296298 -36 38 -0.01342592592592594 -36 39 -0.155178326474623 -36 40 0.02407407407407405 -36 41 -5.204170427930421e-18 -36 42 -0.1063100137174205 -36 829 -0.01296296296296297 -36 830 0.01342592592592593 -36 831 -0.1551783264746228 -36 832 -1.734723475976807e-18 -36 833 0.02870370370370374 -36 834 -0.2040466392318249 -36 835 0.01296296296296297 -36 836 0.01342592592592594 -36 837 -0.1551783264746229 -37 37 1 -38 38 1 -39 31 -0.01203703703703702 -39 32 -0.01342592592592593 -39 33 -0.05315500685871059 -39 34 -0.01296296296296297 -39 35 0.01342592592592596 -39 36 -0.155178326474623 -39 37 -2.775557561562891e-17 -39 38 -0.02870370370370369 -39 39 0.6207133058984909 -39 40 1.908195823574488e-17 -39 41 0.02870370370370368 -39 42 -0.2040466392318242 -39 43 0.01203703703703705 -39 44 -0.01342592592592591 -39 45 -0.05315500685871072 -39 46 0.01296296296296295 -39 47 0.01342592592592589 -39 48 -0.1551783264746224 -40 31 -0.0009703703703703695 -40 32 -0.0004999999999999998 -40 33 -0.008333333333333331 -40 34 -0.001659259259259256 -40 35 3.252606517456513e-19 -40 36 -0.03333333333333333 -40 37 -0.0002814814814814807 -40 38 -4.336808689942018e-19 -40 40 0.007762962962962963 -40 41 -5.421010862427522e-19 -40 42 -6.938893903907228e-18 -40 43 -0.0009703703703703717 -40 44 0.0005000000000000002 -40 45 0.008333333333333333 -40 46 -0.001659259259259264 -40 47 2.168404344971009e-19 -40 48 0.03333333333333334 -40 832 -0.0009703703703703701 -40 833 0.0004999999999999999 -40 834 -0.008333333333333333 -40 835 -0.0002814814814814801 -40 836 3.252606517456513e-19 -40 838 -0.0009703703703703714 -40 839 -0.0005000000000000002 -40 840 0.008333333333333335 -41 31 -0.0004999999999999999 -41 32 -0.001040740740740739 -41 33 -0.009259259259259259 -41 34 3.252606517456513e-19 -41 35 0.0002814814814814854 -41 36 6.938893903907228e-18 -41 37 -5.421010862427522e-19 -41 38 -0.002362962962962963 -41 39 -0.03703703703703701 -41 40 -5.421010862427522e-19 -41 41 0.008325925925925924 -41 42 -3.469446951953614e-18 -41 43 0.0005000000000000002 -41 44 -0.001040740740740742 -41 45 -0.009259259259259254 -41 46 4.336808689942018e-19 -41 47 0.0002814814814814773 -41 48 -1.040834085586084e-17 -41 832 0.0005 -41 833 -0.001040740740740741 -41 834 0.009259259259259269 -41 835 1.084202172485504e-19 -41 836 -0.002362962962962961 -41 837 0.03703703703703702 -41 838 -0.0005000000000000002 -41 839 -0.001040740740740741 -41 840 0.009259259259259241 -42 31 -0.01296296296296296 -42 32 -0.0134259259259259 -42 33 -0.1551783264746227 -42 34 -0.02407407407407409 -42 35 -6.938893903907228e-18 -42 36 -0.1063100137174205 -42 37 -1.214306433183765e-17 -42 38 -0.0287037037037037 -42 39 -0.2040466392318242 -42 40 2.949029909160572e-17 -42 41 1.734723475976807e-18 -42 42 1.241426611796981 -42 43 0.01296296296296297 -42 44 -0.01342592592592595 -42 45 -0.1551783264746228 -42 46 0.02407407407407406 -42 47 1.214306433183765e-17 -42 48 -0.1063100137174217 -42 832 -0.01296296296296296 -42 833 0.01342592592592592 -42 834 -0.1551783264746228 -42 835 1.734723475976807e-18 -42 836 0.0287037037037037 -42 837 -0.2040466392318241 -42 838 0.01296296296296296 -42 839 0.01342592592592591 -42 840 -0.1551783264746225 -43 43 1 -44 44 1 -45 37 -0.01203703703703703 -45 38 -0.01342592592592592 -45 39 -0.05315500685871072 -45 40 -0.01296296296296297 -45 41 0.01342592592592593 -45 42 -0.1551783264746228 -45 43 5.204170427930421e-18 -45 44 -0.02870370370370368 -45 45 0.6207133058984908 -45 46 -1.387778780781446e-17 -45 47 0.02870370370370365 -45 48 -0.2040466392318239 -45 49 0.01203703703703704 -45 50 -0.01342592592592591 -45 51 -0.0531550068587106 -45 52 0.01296296296296297 -45 53 0.01342592592592593 -45 54 -0.1551783264746228 -46 37 -0.00097037037037037 -46 38 -0.0004999999999999999 -46 39 -0.008333333333333333 -46 40 -0.001659259259259264 -46 41 4.336808689942018e-19 -46 42 -0.03333333333333333 -46 43 -0.0002814814814814792 -46 44 5.421010862427522e-19 -46 45 5.204170427930421e-18 -46 46 0.007762962962962965 -46 47 -1.192622389734055e-18 -46 48 -1.387778780781446e-17 -46 49 -0.0009703703703703707 -46 50 0.0004999999999999998 -46 51 0.008333333333333342 -46 52 -0.001659259259259264 -46 53 -3.252606517456513e-19 -46 54 0.03333333333333333 -46 835 -0.000970370370370371 -46 836 0.0005 -46 837 -0.008333333333333333 -46 838 -0.0002814814814814765 -46 839 1.084202172485504e-19 -46 840 -6.938893903907228e-18 -46 841 -0.0009703703703703687 -46 842 -0.0004999999999999996 -46 843 0.008333333333333325 -47 37 -0.0004999999999999998 -47 38 -0.001040740740740739 -47 39 -0.009259259259259241 -47 40 2.168404344971009e-19 -47 41 0.0002814814814814773 -47 42 8.673617379884035e-18 -47 43 5.421010862427522e-19 -47 44 -0.00236296296296296 -47 45 -0.03703703703703701 -47 46 -1.192622389734055e-18 -47 47 0.008325925925925917 -47 48 -2.081668171172169e-17 -47 49 0.0004999999999999998 -47 50 -0.001040740740740739 -47 51 -0.009259259259259241 -47 52 -3.252606517456513e-19 -47 53 0.0002814814814814773 -47 54 8.673617379884035e-18 -47 835 0.0005 -47 836 -0.00104074074074074 -47 837 0.009259259259259238 -47 838 2.168404344971009e-19 -47 839 -0.002362962962962957 -47 840 0.03703703703703696 -47 841 -0.0004999999999999996 -47 842 -0.001040740740740738 -47 843 0.009259259259259236 -48 37 -0.01296296296296295 -48 38 -0.0134259259259259 -48 39 -0.1551783264746224 -48 40 -0.0240740740740741 -48 41 8.673617379884035e-18 -48 42 -0.1063100137174217 -48 43 -1.734723475976807e-18 -48 44 -0.02870370370370368 -48 45 -0.2040466392318239 -48 46 1.734723475976807e-18 -48 47 -2.255140518769849e-17 -48 48 1.24142661179698 -48 49 0.01296296296296296 -48 50 -0.01342592592592591 -48 51 -0.1551783264746226 -48 52 0.02407407407407409 -48 53 2.255140518769849e-17 -48 54 -0.1063100137174216 -48 835 -0.01296296296296296 -48 836 0.0134259259259259 -48 837 -0.1551783264746224 -48 838 2.42861286636753e-17 -48 839 0.0287037037037037 -48 840 -0.2040466392318231 -48 841 0.01296296296296292 -48 842 0.01342592592592587 -48 843 -0.155178326474622 -49 49 1 -50 50 1 -51 43 -0.01203703703703707 -51 44 -0.01342592592592592 -51 45 -0.0531550068587106 -51 46 -0.01296296296296296 -51 47 0.01342592592592589 -51 48 -0.1551783264746226 -51 49 4.336808689942018e-17 -51 50 -0.02870370370370372 -51 51 0.6207133058984917 -51 52 -1.387778780781446e-17 -51 53 0.02870370370370376 -51 54 -0.2040466392318247 -51 55 0.01203703703703702 -51 56 -0.01342592592592597 -51 57 -0.05315500685871052 -51 58 0.01296296296296297 -51 59 0.01342592592592597 -51 60 -0.1551783264746234 -52 43 -0.0009703703703703709 -52 44 -0.0005000000000000001 -52 45 -0.008333333333333333 -52 46 -0.001659259259259264 -52 47 -3.252606517456513e-19 -52 48 -0.03333333333333333 -52 49 -0.0002814814814814813 -52 50 3.252606517456513e-19 -52 51 -1.734723475976807e-18 -52 52 0.007762962962962963 -52 53 -2.168404344971009e-19 -52 54 -6.938893903907228e-18 -52 55 -0.0009703703703703691 -52 56 0.0004999999999999999 -52 57 0.008333333333333333 -52 58 -0.001659259259259244 -52 59 5.421010862427522e-19 -52 60 0.03333333333333333 -52 838 -0.0009703703703703728 -52 839 0.0005000000000000006 -52 840 -0.008333333333333331 -52 841 -0.0002814814814814895 -52 842 -5.421010862427522e-19 -52 844 -0.0009703703703703696 -52 845 -0.0005 -52 846 0.008333333333333333 -53 43 -0.0005000000000000002 -53 44 -0.001040740740740742 -53 45 -0.00925925925925926 -53 46 -3.252606517456513e-19 -53 47 0.0002814814814814773 -53 48 8.673617379884035e-18 -53 49 2.168404344971009e-19 -53 50 -0.002362962962962963 -53 51 -0.03703703703703708 -53 52 -3.252606517456513e-19 -53 53 0.008325925925925936 -53 54 1.734723475976807e-17 -53 55 0.0004999999999999999 -53 56 -0.001040740740740742 -53 57 -0.009259259259259288 -53 58 7.589415207398531e-19 -53 59 0.0002814814814814944 -53 60 -1.561251128379126e-17 -53 838 0.0005000000000000007 -53 839 -0.001040740740740743 -53 840 0.009259259259259257 -53 841 -4.336808689942018e-19 -53 842 -0.002362962962962973 -53 843 0.0370370370370371 -53 844 -0.0005000000000000001 -53 845 -0.001040740740740743 -53 846 0.009259259259259297 -54 43 -0.01296296296296296 -54 44 -0.01342592592592596 -54 45 -0.1551783264746229 -54 46 -0.02407407407407405 -54 47 1.734723475976807e-18 -54 48 -0.1063100137174217 -54 49 -2.081668171172169e-17 -54 50 -0.02870370370370373 -54 51 -0.2040466392318247 -54 52 -1.734723475976807e-18 -54 53 1.734723475976807e-17 -54 54 1.241426611796984 -54 55 0.01296296296296297 -54 56 -0.01342592592592595 -54 57 -0.1551783264746233 -54 58 0.02407407407407405 -54 59 -2.255140518769849e-17 -54 60 -0.1063100137174193 -54 838 -0.01296296296296298 -54 839 0.01342592592592594 -54 840 -0.1551783264746228 -54 841 -5.204170427930421e-18 -54 842 0.02870370370370374 -54 843 -0.2040466392318258 -54 844 0.01296296296296299 -54 845 0.01342592592592597 -54 846 -0.1551783264746233 -55 55 1 -56 56 1 -57 49 -0.01203703703703702 -57 50 -0.01342592592592595 -57 51 -0.05315500685871052 -57 52 -0.01296296296296297 -57 53 0.01342592592592597 -57 54 -0.1551783264746233 -57 55 -4.683753385137379e-17 -57 56 -0.02870370370370373 -57 57 0.6207133058984922 -57 58 2.255140518769849e-17 -57 59 0.02870370370370375 -57 60 -0.2040466392318253 -57 61 0.01203703703703707 -57 62 -0.01342592592592591 -57 63 -0.05315500685871076 -57 64 0.01296296296296294 -57 65 0.01342592592592588 -57 66 -0.1551783264746223 -58 49 -0.0009703703703703706 -58 50 -0.0005000000000000001 -58 51 -0.00833333333333334 -58 52 -0.001659259259259244 -58 53 8.673617379884035e-19 -58 54 -0.03333333333333333 -58 55 -0.000281481481481485 -58 56 -5.421010862427522e-19 -58 58 0.007762962962962958 -58 59 -2.49366499671666e-18 -58 60 -1.040834085586084e-17 -58 61 -0.0009703703703703731 -58 62 0.0005000000000000006 -58 63 0.008333333333333342 -58 64 -0.001659259259259262 -58 65 1.626303258728257e-18 -58 66 0.03333333333333333 -58 841 -0.0009703703703703686 -58 842 0.0004999999999999999 -58 843 -0.008333333333333323 -58 844 -0.000281481481481487 -58 845 -5.421010862427522e-19 -58 847 -0.0009703703703703679 -58 848 -0.0004999999999999994 -58 849 0.008333333333333325 -59 49 -0.0005 -59 50 -0.001040740740740742 -59 51 -0.009259259259259283 -59 52 6.505213034913027e-19 -59 53 0.0002814814814814945 -59 54 6.938893903907228e-18 -59 55 -4.336808689942018e-19 -59 56 -0.002362962962962967 -59 57 -0.03703703703703707 -59 58 -2.38524477946811e-18 -59 59 0.008325925925925931 -59 61 0.0005000000000000007 -59 62 -0.001040740740740744 -59 63 -0.009259259259259269 -59 64 1.734723475976807e-18 -59 65 0.0002814814814814798 -59 66 -5.551115123125783e-17 -59 841 0.0005 -59 842 -0.001040740740740744 -59 843 0.009259259259259304 -59 844 -7.589415207398531e-19 -59 845 -0.002362962962962971 -59 846 0.03703703703703711 -59 847 -0.0004999999999999993 -59 848 -0.001040740740740737 -59 849 0.009259259259259245 -60 49 -0.01296296296296301 -60 50 -0.01342592592592594 -60 51 -0.1551783264746234 -60 52 -0.02407407407407406 -60 53 -6.938893903907228e-18 -60 54 -0.1063100137174193 -60 55 8.673617379884035e-18 -60 56 -0.02870370370370373 -60 57 -0.2040466392318253 -60 58 -1.561251128379126e-17 -60 59 -7.806255641895632e-17 -60 60 1.241426611796983 -60 61 0.012962962962963 -60 62 -0.01342592592592596 -60 63 -0.1551783264746232 -60 64 0.02407407407407407 -60 65 2.255140518769849e-17 -60 66 -0.1063100137174214 -60 841 -0.01296296296296296 -60 842 0.01342592592592598 -60 843 -0.1551783264746233 -60 844 5.551115123125783e-17 -60 845 0.02870370370370385 -60 846 -0.2040466392318255 -60 847 0.01296296296296291 -60 848 0.01342592592592585 -60 849 -0.155178326474622 -61 61 1 -62 62 1 -63 55 -0.01203703703703704 -63 56 -0.01342592592592593 -63 57 -0.05315500685871079 -63 58 -0.01296296296296299 -63 59 0.01342592592592597 -63 60 -0.1551783264746232 -63 61 -1.040834085586084e-17 -63 62 -0.02870370370370365 -63 63 0.6207133058984907 -63 64 2.255140518769849e-17 -63 65 0.02870370370370361 -63 66 -0.204046639231823 -63 67 0.01203703703703705 -63 68 -0.01342592592592592 -63 69 -0.05315500685871094 -63 70 0.01296296296296297 -63 71 0.0134259259259259 -63 72 -0.1551783264746227 -64 55 -0.0009703703703703684 -64 56 -0.0004999999999999994 -64 57 -0.008333333333333333 -64 58 -0.001659259259259262 -64 59 1.626303258728257e-18 -64 60 -0.03333333333333333 -64 61 -0.0002814814814814741 -64 62 -5.421010862427522e-19 -64 64 0.007762962962962966 -64 65 -3.469446951953614e-18 -64 67 -0.0009703703703703701 -64 68 0.0004999999999999999 -64 69 0.008333333333333335 -64 70 -0.001659259259259267 -64 71 1.843143693225358e-18 -64 72 0.03333333333333334 -64 844 -0.0009703703703703734 -64 845 0.0005000000000000009 -64 846 -0.008333333333333331 -64 847 -0.0002814814814814811 -64 848 -1.409462824231156e-18 -64 850 -0.0009703703703703696 -64 851 -0.0004999999999999994 -64 852 0.008333333333333335 -65 55 -0.0004999999999999995 -65 56 -0.001040740740740737 -65 57 -0.009259259259259247 -65 58 1.626303258728257e-18 -65 59 0.0002814814814814799 -65 60 5.724587470723463e-17 -65 61 -4.336808689942018e-19 -65 62 -0.002362962962962954 -65 63 -0.03703703703703698 -65 64 -3.577867169202165e-18 -65 65 0.008325925925925917 -65 66 6.938893903907228e-18 -65 67 0.0004999999999999999 -65 68 -0.001040740740740739 -65 69 -0.009259259259259234 -65 70 1.843143693225358e-18 -65 71 0.0002814814814814754 -65 72 -1.908195823574488e-17 -65 844 0.0005000000000000009 -65 845 -0.001040740740740745 -65 846 0.00925925925925928 -65 847 -1.409462824231156e-18 -65 848 -0.002362962962962963 -65 849 0.03703703703703698 -65 850 -0.0004999999999999996 -65 851 -0.001040740740740736 -65 852 0.009259259259259221 -66 55 -0.01296296296296292 -66 56 -0.01342592592592587 -66 57 -0.1551783264746223 -66 58 -0.02407407407407407 -66 59 -8.673617379884035e-18 -66 60 -0.1063100137174214 -66 61 -2.255140518769849e-17 -66 62 -0.02870370370370367 -66 63 -0.204046639231823 -66 64 -5.204170427930421e-17 -66 65 1.040834085586084e-17 -66 66 1.24142661179698 -66 67 0.01296296296296295 -66 68 -0.01342592592592593 -66 69 -0.1551783264746225 -66 70 0.02407407407407412 -66 71 8.673617379884035e-18 -66 72 -0.106310013717422 -66 844 -0.01296296296296299 -66 845 0.01342592592592596 -66 846 -0.1551783264746231 -66 847 5.898059818321144e-17 -66 848 0.02870370370370367 -66 849 -0.2040466392318238 -66 850 0.01296296296296293 -66 851 0.01342592592592583 -66 852 -0.1551783264746218 -67 67 1 -68 68 1 -69 61 -0.01203703703703705 -69 62 -0.0134259259259259 -69 63 -0.05315500685871093 -69 64 -0.01296296296296296 -69 65 0.01342592592592588 -69 66 -0.1551783264746225 -69 67 2.42861286636753e-17 -69 68 -0.02870370370370369 -69 69 0.6207133058984906 -69 70 -1.908195823574488e-17 -69 71 0.02870370370370368 -69 72 -0.2040466392318238 -69 73 0.01203703703703702 -69 74 -0.01342592592592592 -69 75 -0.05315500685871023 -69 76 0.01296296296296299 -69 77 0.01342592592592595 -69 78 -0.1551783264746231 -70 61 -0.0009703703703703722 -70 62 -0.0005000000000000003 -70 63 -0.008333333333333342 -70 64 -0.001659259259259267 -70 65 1.843143693225358e-18 -70 66 -0.03333333333333333 -70 67 -0.0002814814814814787 -70 68 2.168404344971009e-19 -70 69 -6.938893903907228e-18 -70 70 0.007762962962962968 -70 71 -6.505213034913027e-19 -70 73 -0.0009703703703703693 -70 74 0.0004999999999999996 -70 75 0.008333333333333335 -70 76 -0.001659259259259265 -70 77 -2.168404344971009e-19 -70 78 0.03333333333333334 -70 847 -0.0009703703703703723 -70 848 0.0005000000000000007 -70 849 -0.008333333333333325 -70 850 -0.0002814814814814738 -70 851 -1.301042606982605e-18 -70 852 1.040834085586084e-17 -70 853 -0.0009703703703703699 -70 854 -0.0004999999999999997 -70 855 0.008333333333333337 -71 61 -0.0005000000000000002 -71 62 -0.00104074074074074 -71 63 -0.009259259259259236 -71 64 1.843143693225358e-18 -71 65 0.0002814814814814753 -71 66 6.071532165918825e-17 -71 68 -0.002362962962962959 -71 69 -0.03703703703703701 -71 70 -6.505213034913027e-19 -71 71 0.008325925925925921 -71 72 -1.040834085586084e-17 -71 73 0.0004999999999999996 -71 74 -0.001040740740740738 -71 75 -0.009259259259259247 -71 76 -1.084202172485504e-19 -71 77 0.0002814814814814771 -71 78 1.908195823574488e-17 -71 847 0.0005000000000000007 -71 848 -0.001040740740740745 -71 849 0.009259259259259264 -71 850 -1.517883041479706e-18 -71 851 -0.002362962962962953 -71 852 0.03703703703703694 -71 853 -0.0004999999999999997 -71 854 -0.001040740740740737 -71 855 0.009259259259259228 -72 61 -0.01296296296296298 -72 62 -0.01342592592592593 -72 63 -0.1551783264746227 -72 64 -0.02407407407407406 -72 65 1.561251128379126e-17 -72 66 -0.1063100137174219 -72 67 2.42861286636753e-17 -72 68 -0.02870370370370362 -72 69 -0.2040466392318238 -72 70 -6.071532165918825e-17 -72 71 -3.469446951953614e-17 -72 72 1.24142661179698 -72 73 0.01296296296296294 -72 74 -0.0134259259259259 -72 75 -0.1551783264746224 -72 76 0.02407407407407414 -72 77 2.949029909160572e-17 -72 78 -0.1063100137174217 -72 847 -0.01296296296296296 -72 848 0.01342592592592595 -72 849 -0.1551783264746228 -72 850 2.949029909160572e-17 -72 851 0.02870370370370364 -72 852 -0.2040466392318225 -72 853 0.01296296296296294 -72 854 0.01342592592592586 -72 855 -0.155178326474622 -73 73 1 -74 74 1 -75 67 -0.01203703703703706 -75 68 -0.01342592592592592 -75 69 -0.05315500685871023 -75 70 -0.01296296296296295 -75 71 0.01342592592592587 -75 72 -0.1551783264746224 -75 73 5.204170427930421e-17 -75 74 -0.02870370370370372 -75 75 0.6207133058984915 -75 76 -2.602085213965211e-17 -75 77 0.02870370370370374 -75 78 -0.2040466392318248 -75 79 0.01203703703703701 -75 80 -0.01342592592592595 -75 81 -0.05315500685871064 -75 82 0.01296296296296298 -75 83 0.01342592592592598 -75 84 -0.1551783264746233 -76 67 -0.0009703703703703719 -76 68 -0.0005000000000000004 -76 69 -0.008333333333333333 -76 70 -0.001659259259259265 -76 71 -2.168404344971009e-19 -76 72 -0.03333333333333334 -76 73 -0.0002814814814814828 -76 74 8.673617379884035e-19 -76 75 -1.734723475976807e-18 -76 76 0.007762962962962965 -76 77 1.951563910473908e-18 -76 78 -3.469446951953614e-18 -76 79 -0.0009703703703703691 -76 80 0.0004999999999999996 -76 81 0.008333333333333333 -76 82 -0.001659259259259254 -76 83 -1.951563910473908e-18 -76 84 0.03333333333333334 -76 850 -0.0009703703703703727 -76 851 0.0005000000000000006 -76 852 -0.00833333333333334 -76 853 -0.000281481481481478 -76 854 3.252606517456513e-19 -76 855 3.469446951953614e-18 -76 856 -0.0009703703703703727 -76 857 -0.0005000000000000008 -76 858 0.008333333333333338 -77 67 -0.0005000000000000004 -77 68 -0.001040740740740744 -77 69 -0.009259259259259269 -77 70 -3.252606517456513e-19 -77 71 0.0002814814814814771 -77 72 1.214306433183765e-17 -77 73 7.589415207398531e-19 -77 74 -0.002362962962962964 -77 75 -0.03703703703703706 -77 76 1.843143693225358e-18 -77 77 0.008325925925925931 -77 78 1.040834085586084e-17 -77 79 0.0004999999999999997 -77 80 -0.001040740740740739 -77 81 -0.00925925925925926 -77 82 -1.951563910473908e-18 -77 83 0.000281481481481486 -77 84 3.989863994746656e-17 -77 850 0.0005000000000000006 -77 851 -0.001040740740740742 -77 852 0.009259259259259248 -77 853 6.505213034913027e-19 -77 854 -0.002362962962962958 -77 855 0.03703703703703702 -77 856 -0.0005000000000000007 -77 857 -0.001040740740740746 -77 858 0.009259259259259285 -78 67 -0.01296296296296297 -78 68 -0.01342592592592598 -78 69 -0.1551783264746231 -78 70 -0.02407407407407406 -78 71 2.602085213965211e-17 -78 72 -0.1063100137174217 -78 73 1.040834085586084e-17 -78 74 -0.02870370370370371 -78 75 -0.2040466392318248 -78 76 -1.734723475976807e-18 -78 77 1.387778780781446e-17 -78 78 1.241426611796983 -78 79 0.01296296296296296 -78 80 -0.0134259259259259 -78 81 -0.1551783264746228 -78 82 0.02407407407407407 -78 83 -1.734723475976807e-18 -78 84 -0.1063100137174205 -78 850 -0.01296296296296298 -78 851 0.01342592592592593 -78 852 -0.1551783264746226 -78 853 -3.816391647148976e-17 -78 854 0.02870370370370362 -78 855 -0.2040466392318237 -78 856 0.01296296296296301 -78 857 0.013425925925926 -78 858 -0.1551783264746235 -79 79 1 -80 80 1 -81 73 -0.01203703703703704 -81 74 -0.01342592592592594 -81 75 -0.05315500685871062 -81 76 -0.01296296296296295 -81 77 0.01342592592592592 -81 78 -0.1551783264746228 -81 79 -1.734723475976807e-18 -81 80 -0.0287037037037037 -81 81 0.6207133058984917 -81 82 5.204170427930421e-18 -81 83 0.02870370370370373 -81 84 -0.2040466392318249 -81 85 0.01203703703703704 -81 86 -0.01342592592592593 -81 87 -0.0531550068587107 -81 88 0.01296296296296295 -81 89 0.01342592592592591 -81 90 -0.1551783264746226 -82 73 -0.0009703703703703711 -82 74 -0.0005000000000000003 -82 75 -0.008333333333333333 -82 76 -0.001659259259259254 -82 77 -1.951563910473908e-18 -82 78 -0.03333333333333334 -82 79 -0.0002814814814814834 -82 80 1.084202172485504e-19 -82 82 0.007762962962962961 -82 83 3.035766082959412e-18 -82 84 -3.469446951953614e-18 -82 85 -0.0009703703703703713 -82 86 0.0005000000000000002 -82 87 0.008333333333333335 -82 88 -0.001659259259259256 -82 89 -1.084202172485504e-18 -82 90 0.03333333333333335 -82 853 -0.0009703703703703683 -82 854 0.0004999999999999994 -82 855 -0.008333333333333342 -82 856 -0.0002814814814814836 -82 857 1.517883041479706e-18 -82 858 3.469446951953614e-18 -82 859 -0.0009703703703703731 -82 860 -0.0005000000000000009 -82 861 0.008333333333333338 -83 73 -0.0005000000000000003 -83 74 -0.001040740740740744 -83 75 -0.00925925925925928 -83 76 -1.951563910473908e-18 -83 77 0.0002814814814814861 -83 78 -7.112366251504909e-17 -83 79 2.168404344971009e-19 -83 80 -0.002362962962962966 -83 81 -0.03703703703703705 -83 82 2.927345865710862e-18 -83 83 0.008325925925925931 -83 85 0.0005000000000000003 -83 86 -0.001040740740740743 -83 87 -0.009259259259259269 -83 88 -1.301042606982605e-18 -83 89 0.0002814814814814851 -83 90 4.336808689942018e-17 -83 853 0.0004999999999999993 -83 854 -0.001040740740740737 -83 855 0.009259259259259247 -83 856 1.517883041479706e-18 -83 857 -0.002362962962962966 -83 858 0.03703703703703709 -83 859 -0.0005000000000000009 -83 860 -0.001040740740740747 -83 861 0.009259259259259307 -84 73 -0.01296296296296299 -84 74 -0.01342592592592596 -84 75 -0.1551783264746233 -84 76 -0.02407407407407409 -84 77 1.387778780781446e-17 -84 78 -0.1063100137174205 -84 79 8.673617379884035e-18 -84 80 -0.02870370370370372 -84 81 -0.2040466392318249 -84 82 5.030698080332741e-17 -84 83 -1.214306433183765e-17 -84 84 1.241426611796984 -84 85 0.01296296296296298 -84 86 -0.01342592592592594 -84 87 -0.155178326474623 -84 88 0.02407407407407405 -84 89 -2.081668171172169e-17 -84 90 -0.1063100137174206 -84 853 -0.01296296296296295 -84 854 0.01342592592592588 -84 855 -0.1551783264746225 -84 856 -5.551115123125783e-17 -84 857 0.02870370370370375 -84 858 -0.204046639231825 -84 859 0.01296296296296301 -84 860 0.01342592592592601 -84 861 -0.1551783264746236 -85 85 1 -86 86 1 -87 79 -0.01203703703703702 -87 80 -0.01342592592592593 -87 81 -0.0531550068587107 -87 82 -0.01296296296296297 -87 83 0.01342592592592596 -87 84 -0.155178326474623 -87 85 -3.816391647148976e-17 -87 86 -0.02870370370370368 -87 87 0.6207133058984911 -87 88 3.295974604355933e-17 -87 89 0.02870370370370371 -87 90 -0.2040466392318243 -87 91 0.01203703703703706 -87 92 -0.01342592592592592 -87 93 -0.05315500685871079 -87 94 0.01296296296296294 -87 95 0.01342592592592587 -87 96 -0.1551783264746223 -88 79 -0.0009703703703703698 -88 80 -0.0004999999999999998 -88 81 -0.008333333333333333 -88 82 -0.001659259259259256 -88 83 -1.301042606982605e-18 -88 84 -0.03333333333333334 -88 85 -0.0002814814814814803 -88 86 -1.084202172485504e-18 -88 87 -1.734723475976807e-18 -88 88 0.007762962962962966 -88 89 1.626303258728257e-18 -88 90 -6.938893903907228e-18 -88 91 -0.0009703703703703732 -88 92 0.0005000000000000009 -88 93 0.008333333333333335 -88 94 -0.001659259259259263 -88 95 -3.252606517456513e-19 -88 96 0.03333333333333334 -88 856 -0.0009703703703703675 -88 857 0.0004999999999999991 -88 858 -0.008333333333333342 -88 859 -0.0002814814814814823 -88 860 1.951563910473908e-18 -88 861 3.469446951953614e-18 -88 862 -0.0009703703703703739 -88 863 -0.0005000000000000011 -88 864 0.008333333333333338 -89 79 -0.0004999999999999999 -89 80 -0.00104074074074074 -89 81 -0.009259259259259255 -89 82 -9.75781955236954e-19 -89 83 0.0002814814814814853 -89 84 -2.255140518769849e-17 -89 85 -1.084202172485504e-18 -89 86 -0.002362962962962962 -89 87 -0.03703703703703703 -89 88 1.734723475976807e-18 -89 89 0.008325925925925931 -89 90 3.469446951953614e-17 -89 91 0.0005000000000000009 -89 92 -0.001040740740740746 -89 93 -0.009259259259259276 -89 94 -4.336808689942018e-19 -89 95 0.0002814814814814783 -89 96 8.673617379884035e-18 -89 856 0.0004999999999999991 -89 857 -0.001040740740740736 -89 858 0.00925925925925926 -89 859 1.843143693225358e-18 -89 860 -0.002362962962962964 -89 861 0.03703703703703709 -89 862 -0.0005000000000000011 -89 863 -0.001040740740740747 -89 864 0.009259259259259285 -90 79 -0.01296296296296296 -90 80 -0.0134259259259259 -90 81 -0.1551783264746226 -90 82 -0.02407407407407414 -90 83 -1.214306433183765e-17 -90 84 -0.1063100137174206 -90 85 -4.163336342344337e-17 -90 86 -0.02870370370370365 -90 87 -0.2040466392318243 -90 88 1.266348137463069e-16 -90 89 -4.510281037539698e-17 -90 90 1.241426611796983 -90 91 0.012962962962963 -90 92 -0.01342592592592599 -90 93 -0.1551783264746235 -90 94 0.02407407407407401 -90 95 -1.040834085586084e-17 -90 96 -0.1063100137174218 -90 856 -0.01296296296296293 -90 857 0.01342592592592586 -90 858 -0.1551783264746223 -90 859 -7.632783294297951e-17 -90 860 0.02870370370370371 -90 861 -0.2040466392318247 -90 862 0.01296296296296301 -90 863 0.01342592592592604 -90 864 -0.1551783264746237 -91 91 1 -92 92 1 -93 85 -0.012037037037037 -93 86 -0.01342592592592593 -93 87 -0.05315500685871079 -93 88 -0.012962962962963 -93 89 0.013425925925926 -93 90 -0.1551783264746235 -93 91 -6.071532165918825e-17 -93 92 -0.0287037037037037 -93 93 0.6207133058984913 -93 94 5.551115123125783e-17 -93 95 0.02870370370370368 -93 96 -0.2040466392318243 -93 97 0.01203703703703706 -93 98 -0.01342592592592592 -93 99 -0.05315500685871037 -93 100 0.01296296296296294 -93 101 0.01342592592592588 -93 102 -0.1551783264746223 -94 85 -0.0009703703703703681 -94 86 -0.0004999999999999994 -94 87 -0.008333333333333333 -94 88 -0.001659259259259263 -94 89 -4.336808689942018e-19 -94 90 -0.03333333333333334 -94 91 -0.0002814814814814802 -94 92 -1.301042606982605e-18 -94 93 -1.734723475976807e-18 -94 94 0.007762962962962966 -94 95 3.252606517456513e-19 -94 96 -1.387778780781446e-17 -94 97 -0.0009703703703703726 -94 98 0.0005000000000000007 -94 99 0.008333333333333335 -94 100 -0.001659259259259262 -94 101 2.168404344971009e-19 -94 102 0.03333333333333334 -94 859 -0.0009703703703703672 -94 860 0.000499999999999999 -94 861 -0.008333333333333342 -94 862 -0.0002814814814814809 -94 863 1.409462824231156e-18 -94 864 -5.204170427930421e-18 -94 865 -0.0009703703703703725 -94 866 -0.0005000000000000007 -94 867 0.008333333333333335 -95 85 -0.0004999999999999993 -95 86 -0.001040740740740736 -95 87 -0.009259259259259234 -95 88 -4.336808689942018e-19 -95 89 0.0002814814814814783 -95 90 -1.734723475976807e-17 -95 91 -1.517883041479706e-18 -95 92 -0.002362962962962962 -95 93 -0.03703703703703703 -95 94 3.252606517456513e-19 -95 95 0.008325925925925926 -95 96 2.081668171172169e-17 -95 97 0.0005000000000000007 -95 98 -0.001040740740740745 -95 99 -0.00925925925925928 -95 100 2.168404344971009e-19 -95 101 0.0002814814814814797 -95 102 -1.734723475976807e-18 -95 859 0.000499999999999999 -95 860 -0.001040740740740734 -95 861 0.009259259259259229 -95 862 1.517883041479706e-18 -95 863 -0.002362962962962963 -95 864 0.03703703703703704 -95 865 -0.0005000000000000007 -95 866 -0.001040740740740744 -95 867 0.009259259259259273 -96 85 -0.01296296296296294 -96 86 -0.01342592592592585 -96 87 -0.1551783264746223 -96 88 -0.02407407407407415 -96 89 -3.469446951953614e-18 -96 90 -0.1063100137174218 -96 91 -4.510281037539698e-17 -96 92 -0.02870370370370368 -96 93 -0.2040466392318243 -96 94 1.301042606982605e-16 -96 95 -3.295974604355933e-17 -96 96 1.241426611796983 -96 97 0.01296296296296298 -96 98 -0.01342592592592598 -96 99 -0.1551783264746232 -96 100 0.024074074074074 -96 101 -6.938893903907228e-18 -96 102 -0.1063100137174214 -96 859 -0.01296296296296293 -96 860 0.01342592592592586 -96 861 -0.1551783264746222 -96 862 -4.510281037539698e-17 -96 863 0.02870370370370371 -96 864 -0.2040466392318244 -96 865 0.01296296296296299 -96 866 0.01342592592592598 -96 867 -0.1551783264746232 -97 97 1 -98 98 1 -99 91 -0.01203703703703702 -99 92 -0.01342592592592593 -99 93 -0.05315500685871037 -99 94 -0.01296296296296299 -99 95 0.01342592592592598 -99 96 -0.1551783264746232 -99 97 -8.673617379884035e-18 -99 98 -0.0287037037037037 -99 99 0.6207133058984916 -99 100 8.673617379884035e-18 -99 101 0.02870370370370359 -99 102 -0.2040466392318241 -99 103 0.01203703703703703 -99 104 -0.01342592592592592 -99 105 -0.05315500685871093 -99 106 0.01296296296296298 -99 107 0.01342592592592597 -99 108 -0.155178326474623 -100 91 -0.0009703703703703687 -100 92 -0.0004999999999999995 -100 93 -0.008333333333333333 -100 94 -0.001659259259259262 -100 95 2.168404344971009e-19 -100 96 -0.03333333333333333 -100 97 -0.0002814814814814796 -100 98 -2.168404344971009e-19 -100 99 -1.734723475976807e-18 -100 100 0.007762962962962959 -100 101 6.505213034913027e-19 -100 102 3.469446951953614e-18 -100 103 -0.0009703703703703697 -100 104 0.0004999999999999997 -100 105 0.008333333333333333 -100 106 -0.001659259259259263 -100 107 -7.589415207398531e-19 -100 108 0.03333333333333334 -100 862 -0.0009703703703703687 -100 863 0.0004999999999999996 -100 864 -0.008333333333333331 -100 865 -0.0002814814814814781 -100 866 5.421010862427522e-19 -100 867 5.204170427930421e-18 -100 868 -0.0009703703703703707 -100 869 -0.0005 -100 870 0.008333333333333337 -101 91 -0.0004999999999999994 -101 92 -0.001040740740740737 -101 93 -0.009259259259259247 -101 94 2.168404344971009e-19 -101 95 0.0002814814814814797 -101 96 6.938893903907228e-18 -101 97 -2.168404344971009e-19 -101 98 -0.002362962962962961 -101 99 -0.03703703703703699 -101 100 6.505213034913027e-19 -101 101 0.008325925925925914 -101 102 5.551115123125783e-17 -101 103 0.0004999999999999997 -101 104 -0.001040740740740738 -101 105 -0.009259259259259245 -101 106 -6.505213034913027e-19 -101 107 0.0002814814814814791 -101 108 1.040834085586084e-17 -101 862 0.0004999999999999994 -101 863 -0.001040740740740737 -101 864 0.009259259259259247 -101 865 4.336808689942018e-19 -101 866 -0.002362962962962959 -101 867 0.03703703703703701 -101 868 -0.0005000000000000001 -101 869 -0.00104074074074074 -101 870 0.009259259259259248 -102 91 -0.01296296296296293 -102 92 -0.01342592592592587 -102 93 -0.1551783264746223 -102 94 -0.02407407407407412 -102 95 -1.734723475976807e-18 -102 96 -0.1063100137174214 -102 97 -1.040834085586084e-17 -102 98 -0.02870370370370375 -102 99 -0.2040466392318241 -102 100 1.040834085586084e-17 -102 101 -3.469446951953614e-17 -102 102 1.24142661179698 -102 103 0.01296296296296295 -102 104 -0.01342592592592587 -102 105 -0.1551783264746225 -102 106 0.02407407407407411 -102 107 1.561251128379126e-17 -102 108 -0.1063100137174215 -102 862 -0.01296296296296293 -102 863 0.01342592592592588 -102 864 -0.1551783264746223 -102 865 -1.734723475976807e-17 -102 866 0.02870370370370372 -102 867 -0.2040466392318236 -102 868 0.01296296296296295 -102 869 0.01342592592592591 -102 870 -0.1551783264746224 -103 103 1 -104 104 1 -105 97 -0.01203703703703706 -105 98 -0.01342592592592591 -105 99 -0.05315500685871093 -105 100 -0.01296296296296295 -105 101 0.01342592592592591 -105 102 -0.1551783264746225 -105 103 2.775557561562891e-17 -105 104 -0.02870370370370372 -105 105 0.6207133058984913 -105 106 -1.734723475976807e-18 -105 107 0.02870370370370373 -105 108 -0.2040466392318247 -105 109 0.01203703703703701 -105 110 -0.01342592592592596 -105 111 -0.05315500685871005 -105 112 0.01296296296296297 -105 113 0.01342592592592595 -105 114 -0.1551783264746231 -106 97 -0.0009703703703703719 -106 98 -0.0005000000000000004 -106 99 -0.008333333333333333 -106 100 -0.001659259259259263 -106 101 -7.589415207398531e-19 -106 102 -0.03333333333333334 -106 103 -0.0002814814814814828 -106 105 -8.673617379884035e-18 -106 106 0.007762962962962965 -106 107 1.301042606982605e-18 -106 108 -6.938893903907228e-18 -106 109 -0.0009703703703703689 -106 110 0.0004999999999999998 -106 111 0.008333333333333323 -106 112 -0.001659259259259252 -106 113 7.589415207398531e-19 -106 114 0.03333333333333334 -106 865 -0.0009703703703703712 -106 866 0.0005000000000000001 -106 867 -0.008333333333333342 -106 868 -0.0002814814814814827 -106 869 -5.421010862427522e-19 -106 870 3.469446951953614e-18 -106 871 -0.0009703703703703711 -106 872 -0.0005000000000000001 -106 873 0.008333333333333347 -107 97 -0.0005000000000000004 -107 98 -0.001040740740740743 -107 99 -0.009259259259259264 -107 100 -7.589415207398531e-19 -107 101 0.0002814814814814792 -107 102 -2.602085213965211e-17 -107 103 -3.252606517456513e-19 -107 104 -0.002362962962962965 -107 105 -0.03703703703703706 -107 106 1.084202172485504e-18 -107 107 0.008325925925925929 -107 108 -1.387778780781446e-17 -107 109 0.0004999999999999999 -107 110 -0.001040740740740742 -107 111 -0.009259259259259281 -107 112 7.589415207398531e-19 -107 113 0.0002814814814814875 -107 114 -1.734723475976807e-17 -107 865 0.0005000000000000001 -107 866 -0.00104074074074074 -107 867 0.009259259259259248 -107 868 -2.168404344971009e-19 -107 869 -0.002362962962962964 -107 870 0.03703703703703706 -107 871 -0.0005000000000000002 -107 872 -0.001040740740740742 -107 873 0.00925925925925928 -108 97 -0.01296296296296297 -108 98 -0.01342592592592593 -108 99 -0.155178326474623 -108 100 -0.02407407407407407 -108 101 1.040834085586084e-17 -108 102 -0.1063100137174215 -108 103 -1.734723475976807e-18 -108 104 -0.02870370370370372 -108 105 -0.2040466392318247 -108 106 2.255140518769849e-17 -108 107 2.775557561562891e-17 -108 108 1.241426611796983 -108 109 0.01296296296296296 -108 110 -0.01342592592592594 -108 111 -0.1551783264746229 -108 112 0.02407407407407405 -108 113 -3.816391647148976e-17 -108 114 -0.1063100137174205 -108 865 -0.01296296296296296 -108 866 0.01342592592592592 -108 867 -0.1551783264746225 -108 868 -2.949029909160572e-17 -108 869 0.02870370370370371 -108 870 -0.2040466392318249 -108 871 0.01296296296296301 -108 872 0.01342592592592596 -108 873 -0.1551783264746237 -109 109 1 -110 110 1 -111 103 -0.01203703703703702 -111 104 -0.01342592592592594 -111 105 -0.05315500685871008 -111 106 -0.01296296296296295 -111 107 0.01342592592592594 -111 108 -0.1551783264746229 -111 109 -1.908195823574488e-17 -111 110 -0.0287037037037038 -111 111 0.6207133058984919 -111 112 4.163336342344337e-17 -111 113 0.02870370370370384 -111 114 -0.2040466392318265 -111 115 0.01203703703703702 -111 116 -0.01342592592592596 -111 117 -0.05315500685870996 -111 118 0.01296296296296293 -111 119 0.01342592592592592 -111 120 -0.1551783264746225 -112 103 -0.0009703703703703708 -112 104 -0.0005000000000000002 -112 105 -0.008333333333333335 -112 106 -0.001659259259259252 -112 107 7.589415207398531e-19 -112 108 -0.03333333333333333 -112 109 -0.0002814814814814924 -112 110 -1.192622389734055e-18 -112 111 -1.214306433183765e-17 -112 112 0.007762962962962958 -112 113 1.084202172485504e-19 -112 114 -6.938893903907228e-18 -112 115 -0.0009703703703703717 -112 116 0.0005000000000000008 -112 117 0.008333333333333323 -112 118 -0.001659259259259245 -112 119 5.421010862427522e-19 -112 120 0.03333333333333333 -112 868 -0.0009703703703703691 -112 869 0.0004999999999999998 -112 870 -0.008333333333333333 -112 871 -0.0002814814814814848 -112 872 -1.084202172485504e-19 -112 873 3.469446951953614e-18 -112 874 -0.0009703703703703714 -112 875 -0.0005000000000000004 -112 876 0.008333333333333344 -113 103 -0.0005000000000000001 -113 104 -0.001040740740740742 -113 105 -0.009259259259259278 -113 106 7.589415207398531e-19 -113 107 0.0002814814814814874 -113 109 -1.192622389734055e-18 -113 110 -0.002362962962962977 -113 111 -0.03703703703703713 -113 113 0.008325925925925938 -113 114 -1.734723475976807e-17 -113 115 0.0005000000000000007 -113 116 -0.001040740740740747 -113 117 -0.009259259259259316 -113 118 7.589415207398531e-19 -113 119 0.0002814814814814953 -113 120 -3.642919299551295e-17 -113 868 0.0004999999999999998 -113 869 -0.001040740740740741 -113 870 0.009259259259259285 -113 871 -2.168404344971009e-19 -113 872 -0.002362962962962968 -113 873 0.03703703703703714 -113 874 -0.0005000000000000004 -113 875 -0.001040740740740744 -113 876 0.0092592592592593 -114 103 -0.01296296296296299 -114 104 -0.01342592592592594 -114 105 -0.1551783264746231 -114 106 -0.02407407407407406 -114 107 -5.204170427930421e-18 -114 108 -0.1063100137174205 -114 109 -3.642919299551295e-17 -114 110 -0.02870370370370381 -114 111 -0.2040466392318265 -114 112 2.949029909160572e-17 -114 113 4.163336342344337e-17 -114 114 1.241426611796986 -114 115 0.012962962962963 -114 116 -0.01342592592592598 -114 117 -0.1551783264746235 -114 118 0.02407407407407403 -114 119 -3.469446951953614e-18 -114 120 -0.1063100137174192 -114 868 -0.01296296296296297 -114 869 0.01342592592592596 -114 870 -0.1551783264746235 -114 871 -1.214306433183765e-17 -114 872 0.02870370370370377 -114 873 -0.2040466392318259 -114 874 0.01296296296296301 -114 875 0.01342592592592598 -114 876 -0.1551783264746236 -115 115 1 -116 116 1 -117 109 -0.01203703703703697 -117 110 -0.01342592592592597 -117 111 -0.05315500685870997 -117 112 -0.01296296296296298 -117 113 0.01342592592592604 -117 114 -0.1551783264746235 -117 115 -9.020562075079397e-17 -117 116 -0.02870370370370373 -117 117 0.6207133058984908 -117 118 5.551115123125783e-17 -117 119 0.0287037037037037 -117 120 -0.2040466392318251 -117 121 0.01203703703703706 -117 122 -0.01342592592592589 -117 123 -0.05315500685871052 -117 124 0.01296296296296293 -117 125 0.01342592592592585 -117 126 -0.1551783264746218 -118 109 -0.0009703703703703673 -118 110 -0.0004999999999999994 -118 111 -0.008333333333333323 -118 112 -0.001659259259259245 -118 113 7.589415207398531e-19 -118 114 -0.03333333333333333 -118 115 -0.0002814814814814864 -118 116 -1.301042606982605e-18 -118 117 1.734723475976807e-18 -118 118 0.00776296296296296 -118 119 -6.505213034913027e-19 -118 121 -0.0009703703703703728 -118 122 0.0005000000000000007 -118 123 0.008333333333333323 -118 124 -0.001659259259259265 -118 125 5.421010862427522e-19 -118 126 0.03333333333333332 -118 871 -0.0009703703703703692 -118 872 0.0004999999999999997 -118 873 -0.008333333333333342 -118 874 -0.0002814814814814797 -118 875 5.421010862427522e-19 -118 876 1.214306433183765e-17 -118 877 -0.000970370370370374 -118 878 -0.0005000000000000009 -118 879 0.008333333333333345 -119 109 -0.0004999999999999994 -119 110 -0.001040740740740739 -119 111 -0.00925925925925928 -119 112 5.421010862427522e-19 -119 113 0.0002814814814814953 -119 115 -1.409462824231156e-18 -119 116 -0.00236296296296297 -119 117 -0.03703703703703705 -119 118 -5.421010862427522e-19 -119 119 0.008325925925925924 -119 120 3.469446951953614e-18 -119 121 0.0005000000000000007 -119 122 -0.001040740740740745 -119 123 -0.009259259259259262 -119 124 6.505213034913027e-19 -119 125 0.000281481481481478 -119 126 1.387778780781446e-17 -119 871 0.0004999999999999998 -119 872 -0.00104074074074074 -119 873 0.00925925925925928 -119 874 4.336808689942018e-19 -119 875 -0.002362962962962961 -119 876 0.03703703703703705 -119 877 -0.0005000000000000009 -119 878 -0.001040740740740744 -119 879 0.009259259259259266 -120 109 -0.01296296296296295 -120 110 -0.01342592592592587 -120 111 -0.1551783264746225 -120 112 -0.02407407407407411 -120 113 -6.938893903907228e-18 -120 114 -0.1063100137174192 -120 115 -1.734723475976807e-17 -120 116 -0.02870370370370377 -120 117 -0.2040466392318251 -120 118 9.194034422677078e-17 -120 119 2.602085213965211e-17 -120 120 1.241426611796981 -120 121 0.01296296296296296 -120 122 -0.01342592592592595 -120 123 -0.1551783264746228 -120 124 0.024074074074074 -120 125 -2.081668171172169e-17 -120 126 -0.1063100137174216 -120 871 -0.01296296296296298 -120 872 0.01342592592592592 -120 873 -0.1551783264746231 -120 874 1.387778780781446e-17 -120 875 0.02870370370370374 -120 876 -0.2040466392318243 -120 877 0.01296296296296298 -120 878 0.01342592592592593 -120 879 -0.155178326474623 -121 121 1 -122 122 1 -123 115 -0.01203703703703701 -123 116 -0.0134259259259259 -123 117 -0.05315500685871052 -123 118 -0.01296296296296298 -123 119 0.01342592592592597 -123 120 -0.1551783264746228 -123 121 -2.081668171172169e-17 -123 122 -0.02870370370370362 -123 123 0.6207133058984889 -123 124 3.642919299551295e-17 -123 125 0.02870370370370359 -123 126 -0.2040466392318229 -123 127 0.01203703703703704 -123 128 -0.01342592592592588 -123 129 -0.05315500685871069 -123 130 0.01296296296296293 -123 131 0.01342592592592584 -123 132 -0.155178326474622 -124 115 -0.0009703703703703684 -124 116 -0.0004999999999999994 -124 117 -0.008333333333333325 -124 118 -0.001659259259259265 -124 119 6.505213034913027e-19 -124 120 -0.03333333333333332 -124 121 -0.0002814814814814772 -124 122 -2.168404344971009e-19 -124 123 8.673617379884035e-18 -124 124 0.007762962962962961 -124 125 -1.517883041479706e-18 -124 126 -3.469446951953614e-18 -124 127 -0.0009703703703703721 -124 128 0.0005000000000000002 -124 129 0.008333333333333333 -124 130 -0.001659259259259268 -124 131 -4.336808689942018e-19 -124 132 0.03333333333333331 -124 874 -0.0009703703703703683 -124 875 0.0004999999999999994 -124 876 -0.008333333333333331 -124 877 -0.0002814814814814742 -124 878 5.421010862427522e-19 -124 879 -1.040834085586084e-17 -124 880 -0.0009703703703703684 -124 881 -0.0004999999999999995 -124 882 0.008333333333333321 -125 115 -0.0004999999999999993 -125 116 -0.001040740740740736 -125 117 -0.009259259259259224 -125 118 5.421010862427522e-19 -125 119 0.0002814814814814782 -125 120 3.122502256758253e-17 -125 121 -2.168404344971009e-19 -125 122 -0.002362962962962957 -125 123 -0.03703703703703692 -125 124 -1.301042606982605e-18 -125 125 0.008325925925925907 -125 126 -3.469446951953614e-17 -125 127 0.0005 -125 128 -0.00104074074074074 -125 129 -0.009259259259259215 -125 130 -7.589415207398531e-19 -125 131 0.0002814814814814733 -125 132 3.989863994746656e-17 -125 874 0.0004999999999999993 -125 875 -0.001040740740740736 -125 876 0.00925925925925924 -125 877 1.084202172485504e-18 -125 878 -0.002362962962962953 -125 879 0.03703703703703691 -125 880 -0.0004999999999999995 -125 881 -0.001040740740740738 -125 882 0.009259259259259236 -126 115 -0.01296296296296291 -126 116 -0.01342592592592583 -126 117 -0.1551783264746218 -126 118 -0.02407407407407411 -126 120 -0.1063100137174216 -126 121 -3.642919299551295e-17 -126 122 -0.0287037037037036 -126 123 -0.2040466392318229 -126 124 2.081668171172169e-17 -126 125 -4.683753385137379e-17 -126 126 1.241426611796977 -126 127 0.01296296296296296 -126 128 -0.01342592592592593 -126 129 -0.1551783264746223 -126 130 0.02407407407407409 -126 131 2.602085213965211e-17 -126 132 -0.1063100137174221 -126 874 -0.01296296296296291 -126 875 0.01342592592592582 -126 876 -0.1551783264746219 -126 877 -1.561251128379126e-17 -126 878 0.02870370370370372 -126 879 -0.2040466392318225 -126 880 0.01296296296296292 -126 881 0.01342592592592584 -126 882 -0.1551783264746219 -127 127 1 -128 128 1 -129 121 -0.01203703703703703 -129 122 -0.0134259259259259 -129 123 -0.05315500685871068 -129 124 -0.01296296296296296 -129 125 0.01342592592592587 -129 126 -0.1551783264746223 -129 127 2.775557561562891e-17 -129 128 -0.02870370370370361 -129 129 0.6207133058984895 -129 130 -5.898059818321144e-17 -129 131 0.02870370370370357 -129 132 -0.2040466392318225 -129 133 0.01203703703703703 -129 134 -0.0134259259259259 -129 135 -0.05315500685871103 -129 136 0.01296296296296299 -129 137 0.01342592592592597 -129 138 -0.155178326474623 -130 121 -0.0009703703703703696 -130 122 -0.0004999999999999997 -130 123 -0.008333333333333321 -130 124 -0.001659259259259268 -130 125 -7.589415207398531e-19 -130 126 -0.03333333333333331 -130 127 -0.0002814814814814737 -130 128 1.409462824231156e-18 -130 129 1.734723475976807e-17 -130 130 0.007762962962962963 -130 131 -1.192622389734055e-18 -130 132 3.469446951953614e-18 -130 133 -0.00097037037037037 -130 134 0.0004999999999999996 -130 135 0.008333333333333344 -130 136 -0.001659259259259265 -130 137 -2.168404344971009e-19 -130 138 0.03333333333333333 -130 877 -0.0009703703703703731 -130 878 0.0005000000000000002 -130 879 -0.00833333333333334 -130 880 -0.0002814814814814745 -130 881 2.168404344971009e-19 -130 882 -1.040834085586084e-17 -130 883 -0.0009703703703703685 -130 884 -0.0004999999999999994 -130 885 0.008333333333333325 -131 121 -0.0004999999999999997 -131 122 -0.001040740740740739 -131 123 -0.009259259259259215 -131 124 -5.421010862427522e-19 -131 125 0.0002814814814814733 -131 126 3.989863994746656e-17 -131 127 1.626303258728257e-18 -131 128 -0.002362962962962953 -131 129 -0.03703703703703692 -131 130 -1.409462824231156e-18 -131 131 0.008325925925925905 -131 132 -4.85722573273506e-17 -131 133 0.0004999999999999996 -131 134 -0.001040740740740736 -131 135 -0.009259259259259224 -131 136 -3.252606517456513e-19 -131 137 0.0002814814814814783 -131 138 3.122502256758253e-17 -131 877 0.0005000000000000002 -131 878 -0.00104074074074074 -131 879 0.009259259259259238 -131 880 -2.168404344971009e-19 -131 881 -0.002362962962962953 -131 882 0.0370370370370369 -131 883 -0.0004999999999999993 -131 884 -0.001040740740740736 -131 885 0.009259259259259236 -132 121 -0.01296296296296292 -132 122 -0.01342592592592592 -132 123 -0.155178326474622 -132 124 -0.02407407407407408 -132 125 -1.734723475976807e-17 -132 126 -0.1063100137174221 -132 127 1.908195823574488e-17 -132 128 -0.0287037037037036 -132 129 -0.2040466392318225 -132 130 -2.602085213965211e-17 -132 131 -2.949029909160572e-17 -132 132 1.241426611796977 -132 133 0.01296296296296294 -132 134 -0.01342592592592585 -132 135 -0.1551783264746222 -132 136 0.02407407407407411 -132 137 5.204170427930421e-18 -132 138 -0.1063100137174216 -132 877 -0.01296296296296298 -132 878 0.01342592592592587 -132 879 -0.1551783264746225 -132 880 3.989863994746656e-17 -132 881 0.02870370370370372 -132 882 -0.2040466392318225 -132 883 0.0129629629629629 -132 884 0.01342592592592581 -132 885 -0.1551783264746217 -133 133 1 -134 134 1 -135 127 -0.01203703703703709 -135 128 -0.01342592592592591 -135 129 -0.05315500685871102 -135 130 -0.01296296296296295 -135 131 0.01342592592592587 -135 132 -0.1551783264746222 -135 133 1.07552855510562e-16 -135 134 -0.02870370370370366 -135 135 0.6207133058984919 -135 136 -6.418476861114186e-17 -135 137 0.02870370370370361 -135 138 -0.2040466392318238 -135 139 0.01203703703703698 -135 140 -0.01342592592592597 -135 141 -0.05315500685871077 -135 142 0.01296296296296302 -135 143 0.01342592592592606 -135 144 -0.1551783264746242 -136 127 -0.0009703703703703723 -136 128 -0.0005000000000000006 -136 129 -0.008333333333333333 -136 130 -0.001659259259259265 -136 131 -3.252606517456513e-19 -136 132 -0.03333333333333333 -136 133 -0.000281481481481477 -136 134 1.734723475976807e-18 -136 135 -1.734723475976807e-18 -136 136 0.007762962962962958 -136 137 4.336808689942018e-19 -136 138 -1.387778780781446e-17 -136 139 -0.000970370370370366 -136 140 0.0004999999999999988 -136 141 0.008333333333333335 -136 142 -0.001659259259259252 -136 143 -2.168404344971009e-19 -136 144 0.03333333333333332 -136 880 -0.0009703703703703724 -136 881 0.0005000000000000006 -136 882 -0.008333333333333323 -136 883 -0.0002814814814814865 -136 884 -1.192622389734055e-18 -136 885 -1.734723475976807e-18 -136 886 -0.0009703703703703666 -136 887 -0.0004999999999999991 -136 888 0.008333333333333323 -137 127 -0.0005000000000000004 -137 128 -0.001040740740740744 -137 129 -0.009259259259259262 -137 130 -3.252606517456513e-19 -137 131 0.0002814814814814783 -137 132 2.775557561562891e-17 -137 133 1.626303258728257e-18 -137 134 -0.002362962962962958 -137 135 -0.03703703703703701 -137 136 3.252606517456513e-19 -137 137 0.008325925925925921 -137 138 -3.469446951953614e-18 -137 139 0.0004999999999999988 -137 140 -0.001040740740740734 -137 141 -0.009259259259259247 -137 142 -3.252606517456513e-19 -137 143 0.0002814814814814875 -137 144 -1.387778780781446e-17 -137 880 0.0005000000000000007 -137 881 -0.001040740740740745 -137 882 0.009259259259259273 -137 883 -1.517883041479706e-18 -137 884 -0.002362962962962969 -137 885 0.03703703703703701 -137 886 -0.0004999999999999991 -137 887 -0.001040740740740736 -137 888 0.009259259259259241 -138 127 -0.01296296296296296 -138 128 -0.01342592592592596 -138 129 -0.155178326474623 -138 130 -0.02407407407407402 -138 131 8.673617379884035e-18 -138 132 -0.1063100137174216 -138 133 3.122502256758253e-17 -138 134 -0.02870370370370373 -138 135 -0.2040466392318238 -138 136 -1.110223024625157e-16 -138 137 1.387778780781446e-17 -138 138 1.241426611796981 -138 139 0.01296296296296293 -138 140 -0.01342592592592584 -138 141 -0.1551783264746224 -138 142 0.02407407407407414 -138 143 1.734723475976807e-17 -138 144 -0.1063100137174203 -138 880 -0.01296296296296296 -138 881 0.01342592592592591 -138 882 -0.1551783264746227 -138 883 1.734723475976807e-17 -138 884 0.02870370370370372 -138 885 -0.204046639231825 -138 886 0.01296296296296294 -138 887 0.01342592592592587 -138 888 -0.1551783264746223 -139 139 1 -140 140 1 -141 133 -0.01203703703703707 -141 134 -0.01342592592592594 -141 135 -0.05315500685871077 -141 136 -0.01296296296296292 -141 137 0.01342592592592586 -141 138 -0.1551783264746224 -141 139 1.214306433183765e-17 -141 140 -0.02870370370370379 -141 141 0.6207133058984922 -141 142 -2.081668171172169e-17 -141 143 0.02870370370370388 -141 144 -0.2040466392318262 -141 145 0.01203703703703704 -141 146 -0.01342592592592595 -141 147 -0.05315500685870993 -141 148 0.01296296296296295 -141 149 0.01342592592592594 -141 150 -0.1551783264746227 -142 133 -0.0009703703703703747 -142 134 -0.0005000000000000013 -142 135 -0.008333333333333342 -142 136 -0.001659259259259252 -142 137 -3.252606517456513e-19 -142 138 -0.03333333333333332 -142 139 -0.0002814814814814892 -142 140 3.252606517456513e-19 -142 141 -8.673617379884035e-18 -142 142 0.007762962962962963 -142 143 -6.505213034913027e-19 -142 144 6.938893903907228e-18 -142 145 -0.0009703703703703708 -142 146 0.0005000000000000004 -142 147 0.008333333333333335 -142 148 -0.001659259259259247 -142 149 1.301042606982605e-18 -142 150 0.03333333333333334 -142 883 -0.0009703703703703734 -142 884 0.000500000000000001 -142 885 -0.008333333333333325 -142 886 -0.0002814814814814873 -142 887 -1.084202172485504e-18 -142 889 -0.0009703703703703686 -142 890 -0.0004999999999999997 -142 891 0.008333333333333337 -143 133 -0.0005000000000000012 -143 134 -0.001040740740740749 -143 135 -0.009259259259259302 -143 136 -2.168404344971009e-19 -143 137 0.0002814814814814877 -143 138 -3.295974604355933e-17 -143 139 2.168404344971009e-19 -143 140 -0.002362962962962973 -143 141 -0.03703703703703715 -143 142 -7.589415207398531e-19 -143 143 0.008325925925925947 -143 144 -3.469446951953614e-17 -143 145 0.0005000000000000003 -143 146 -0.001040740740740745 -143 147 -0.009259259259259311 -143 148 1.409462824231156e-18 -143 149 0.0002814814814814918 -143 150 -6.418476861114186e-17 -143 883 0.000500000000000001 -143 884 -0.001040740740740748 -143 885 0.009259259259259287 -143 886 -9.75781955236954e-19 -143 887 -0.002362962962962971 -143 888 0.03703703703703715 -143 889 -0.0004999999999999996 -143 890 -0.00104074074074074 -143 891 0.009259259259259283 -144 133 -0.01296296296296305 -144 134 -0.01342592592592604 -144 135 -0.1551783264746242 -144 136 -0.02407407407407397 -144 137 8.673617379884035e-18 -144 138 -0.1063100137174203 -144 139 5.030698080332741e-17 -144 140 -0.02870370370370373 -144 141 -0.2040466392318262 -144 142 -8.153200337090993e-17 -144 143 6.938893903907228e-18 -144 144 1.241426611796986 -144 145 0.01296296296296298 -144 146 -0.01342592592592597 -144 147 -0.1551783264746232 -144 148 0.02407407407407408 -144 149 8.673617379884035e-18 -144 150 -0.1063100137174195 -144 883 -0.01296296296296301 -144 884 0.01342592592592604 -144 885 -0.1551783264746237 -144 886 4.163336342344337e-17 -144 887 0.02870370370370374 -144 888 -0.2040466392318257 -144 889 0.01296296296296296 -144 890 0.01342592592592593 -144 891 -0.1551783264746227 -145 145 1 -146 146 1 -147 139 -0.01203703703703702 -147 140 -0.01342592592592596 -147 141 -0.05315500685870993 -147 142 -0.01296296296296298 -147 143 0.013425925925926 -147 144 -0.1551783264746233 -147 145 -1.561251128379126e-17 -147 146 -0.02870370370370377 -147 147 0.6207133058984923 -147 148 2.081668171172169e-17 -147 149 0.02870370370370374 -147 150 -0.2040466392318256 -147 151 0.01203703703703704 -147 152 -0.01342592592592593 -147 153 -0.05315500685871073 -147 154 0.01296296296296296 -147 155 0.01342592592592592 -147 156 -0.1551783264746228 -148 139 -0.0009703703703703685 -148 140 -0.0004999999999999998 -148 141 -0.008333333333333331 -148 142 -0.001659259259259247 -148 143 1.409462824231156e-18 -148 144 -0.03333333333333334 -148 145 -0.0002814814814814868 -148 146 -4.336808689942018e-19 -148 147 -1.734723475976807e-18 -148 148 0.007762962962962961 -148 149 -1.951563910473908e-18 -148 150 -3.469446951953614e-18 -148 151 -0.0009703703703703711 -148 152 0.0005000000000000002 -148 153 0.008333333333333335 -148 154 -0.001659259259259259 -148 155 7.589415207398531e-19 -148 156 0.03333333333333334 -148 886 -0.0009703703703703708 -148 887 0.0005000000000000002 -148 888 -0.00833333333333334 -148 889 -0.0002814814814814862 -148 890 -4.336808689942018e-19 -148 891 -3.469446951953614e-18 -148 892 -0.0009703703703703704 -148 893 -0.0004999999999999999 -148 894 0.008333333333333335 -149 139 -0.0004999999999999996 -149 140 -0.001040740740740741 -149 141 -0.00925925925925929 -149 142 1.301042606982605e-18 -149 143 0.0002814814814814918 -149 144 8.673617379884035e-18 -149 145 -4.336808689942018e-19 -149 146 -0.00236296296296297 -149 147 -0.03703703703703709 -149 148 -2.059984127722458e-18 -149 149 0.008325925925925935 -149 150 3.469446951953614e-17 -149 151 0.0005000000000000002 -149 152 -0.001040740740740742 -149 153 -0.009259259259259266 -149 154 6.505213034913027e-19 -149 155 0.0002814814814814816 -149 156 -3.469446951953614e-17 -149 886 0.0005000000000000003 -149 887 -0.001040740740740744 -149 888 0.009259259259259302 -149 889 -6.505213034913027e-19 -149 890 -0.002362962962962969 -149 891 0.03703703703703713 -149 892 -0.0004999999999999999 -149 893 -0.00104074074074074 -149 894 0.009259259259259255 -150 139 -0.01296296296296295 -150 140 -0.0134259259259259 -150 141 -0.1551783264746227 -150 142 -0.02407407407407407 -150 143 -3.469446951953614e-18 -150 144 -0.1063100137174195 -150 145 -2.081668171172169e-17 -150 146 -0.02870370370370384 -150 147 -0.2040466392318256 -150 148 1.040834085586084e-17 -150 149 3.122502256758253e-17 -150 150 1.241426611796983 -150 151 0.01296296296296297 -150 152 -0.01342592592592594 -150 153 -0.1551783264746231 -150 154 0.02407407407407405 -150 155 -1.734723475976807e-18 -150 156 -0.1063100137174212 -150 886 -0.01296296296296298 -150 887 0.01342592592592599 -150 888 -0.1551783264746232 -150 889 2.42861286636753e-17 -150 890 0.02870370370370373 -150 891 -0.2040466392318254 -150 892 0.01296296296296297 -150 893 0.01342592592592593 -150 894 -0.1551783264746228 -151 151 1 -152 152 1 -153 145 -0.01203703703703703 -153 146 -0.01342592592592593 -153 147 -0.05315500685871073 -153 148 -0.01296296296296298 -153 149 0.01342592592592595 -153 150 -0.1551783264746231 -153 151 -6.938893903907228e-18 -153 152 -0.02870370370370368 -153 153 0.6207133058984917 -153 154 1.908195823574488e-17 -153 155 0.02870370370370366 -153 156 -0.2040466392318245 -153 157 0.01203703703703702 -153 158 -0.01342592592592594 -153 159 -0.05315500685871044 -153 160 0.01296296296296297 -153 161 0.01342592592592594 -153 162 -0.1551783264746229 -154 145 -0.00097037037037037 -154 146 -0.0004999999999999999 -154 147 -0.008333333333333333 -154 148 -0.001659259259259259 -154 149 6.505213034913027e-19 -154 150 -0.03333333333333333 -154 151 -0.0002814814814814816 -154 152 -6.505213034913027e-19 -154 153 -1.040834085586084e-17 -154 154 0.007762962962962963 -154 155 3.252606517456513e-19 -154 156 -6.938893903907228e-18 -154 157 -0.0009703703703703694 -154 158 0.0004999999999999998 -154 159 0.008333333333333325 -154 160 -0.001659259259259259 -154 161 4.336808689942018e-19 -154 162 0.03333333333333334 -154 889 -0.0009703703703703709 -154 890 0.0005000000000000002 -154 891 -0.008333333333333331 -154 892 -0.0002814814814814812 -154 893 -6.505213034913027e-19 -154 894 3.469446951953614e-18 -154 895 -0.0009703703703703717 -154 896 -0.0005000000000000003 -154 897 0.008333333333333344 -155 145 -0.0004999999999999999 -155 146 -0.00104074074074074 -155 147 -0.009259259259259257 -155 148 8.673617379884035e-19 -155 149 0.0002814814814814817 -155 150 3.469446951953614e-18 -155 151 -6.505213034913027e-19 -155 152 -0.002362962962962963 -155 153 -0.03703703703703702 -155 154 2.168404344971009e-19 -155 155 0.008325925925925926 -155 156 6.938893903907228e-18 -155 157 0.0004999999999999999 -155 158 -0.001040740740740741 -155 159 -0.009259259259259259 -155 160 3.252606517456513e-19 -155 161 0.0002814814814814817 -155 162 -5.204170427930421e-18 -155 889 0.0005000000000000001 -155 890 -0.001040740740740742 -155 891 0.009259259259259266 -155 892 -5.421010862427522e-19 -155 893 -0.002362962962962963 -155 894 0.03703703703703706 -155 895 -0.0005000000000000002 -155 896 -0.001040740740740741 -155 897 0.009259259259259264 -156 145 -0.01296296296296296 -156 146 -0.01342592592592591 -156 147 -0.1551783264746228 -156 148 -0.02407407407407408 -156 149 3.469446951953614e-18 -156 150 -0.1063100137174212 -156 151 1.734723475976807e-18 -156 152 -0.02870370370370375 -156 153 -0.2040466392318245 -156 154 5.204170427930421e-18 -156 155 5.898059818321144e-17 -156 156 1.241426611796983 -156 157 0.01296296296296294 -156 158 -0.01342592592592592 -156 159 -0.1551783264746227 -156 160 0.02407407407407407 -156 161 -1.387778780781446e-17 -156 162 -0.1063100137174211 -156 889 -0.01296296296296297 -156 890 0.01342592592592595 -156 891 -0.155178326474623 -156 892 8.673617379884035e-18 -156 893 0.02870370370370365 -156 894 -0.2040466392318246 -156 895 0.01296296296296299 -156 896 0.01342592592592594 -156 897 -0.1551783264746231 -157 157 1 -158 158 1 -159 151 -0.01203703703703703 -159 152 -0.01342592592592591 -159 153 -0.05315500685871044 -159 154 -0.01296296296296295 -159 155 0.01342592592592591 -159 156 -0.1551783264746227 -159 157 8.673617379884035e-18 -159 158 -0.0287037037037037 -159 159 0.6207133058984911 -159 160 3.469446951953614e-18 -159 161 0.0287037037037037 -159 162 -0.2040466392318249 -159 163 0.01203703703703701 -159 164 -0.01342592592592592 -159 165 -0.05315500685871019 -159 166 0.01296296296296296 -159 167 0.01342592592592593 -159 168 -0.1551783264746228 -160 151 -0.0009703703703703718 -160 152 -0.0005000000000000003 -160 153 -0.008333333333333335 -160 154 -0.001659259259259259 -160 155 3.252606517456513e-19 -160 156 -0.03333333333333333 -160 157 -0.0002814814814814848 -160 158 -2.168404344971009e-19 -160 159 -1.387778780781446e-17 -160 160 0.007762962962962964 -160 161 2.059984127722458e-18 -160 162 -3.469446951953614e-18 -160 163 -0.0009703703703703698 -160 164 0.0004999999999999999 -160 165 0.008333333333333323 -160 166 -0.001659259259259258 -160 167 -3.252606517456513e-19 -160 168 0.03333333333333333 -160 892 -0.0009703703703703698 -160 893 0.0004999999999999999 -160 894 -0.008333333333333333 -160 895 -0.0002814814814814782 -160 896 -7.589415207398531e-19 -160 897 1.908195823574488e-17 -160 898 -0.0009703703703703725 -160 899 -0.0005000000000000004 -160 900 0.008333333333333345 -161 151 -0.0005000000000000003 -161 152 -0.001040740740740742 -161 153 -0.009259259259259259 -161 154 5.421010862427522e-19 -161 155 0.0002814814814814818 -161 156 -5.204170427930421e-18 -161 157 -1.084202172485504e-19 -161 158 -0.002362962962962968 -161 159 -0.03703703703703703 -161 160 1.843143693225358e-18 -161 161 0.008325925925925926 -161 162 -2.081668171172169e-17 -161 163 0.0004999999999999999 -161 164 -0.001040740740740741 -161 165 -0.009259259259259252 -161 166 -4.336808689942018e-19 -161 167 0.0002814814814814829 -161 168 2.42861286636753e-17 -161 892 0.0004999999999999998 -161 893 -0.00104074074074074 -161 894 0.009259259259259262 -161 895 -6.505213034913027e-19 -161 896 -0.002362962962962959 -161 897 0.03703703703703705 -161 898 -0.0005000000000000004 -161 899 -0.001040740740740742 -161 900 0.009259259259259269 -162 151 -0.01296296296296298 -162 152 -0.01342592592592593 -162 153 -0.1551783264746229 -162 154 -0.02407407407407407 -162 155 8.673617379884035e-18 -162 156 -0.1063100137174212 -162 157 1.214306433183765e-17 -162 158 -0.02870370370370372 -162 159 -0.2040466392318249 -162 160 -3.469446951953614e-18 -162 161 2.775557561562891e-17 -162 162 1.241426611796982 -162 163 0.01296296296296295 -162 164 -0.01342592592592592 -162 165 -0.1551783264746225 -162 166 0.02407407407407406 -162 167 -1.387778780781446e-17 -162 168 -0.1063100137174209 -162 892 -0.01296296296296295 -162 893 0.01342592592592593 -162 894 -0.1551783264746229 -162 896 0.02870370370370368 -162 897 -0.204046639231824 -162 898 0.01296296296296299 -162 899 0.01342592592592594 -162 900 -0.1551783264746231 -163 163 1 -164 164 1 -165 157 -0.01203703703703702 -165 158 -0.01342592592592592 -165 159 -0.05315500685871019 -165 160 -0.01296296296296295 -165 161 0.0134259259259259 -165 162 -0.1551783264746225 -165 163 5.204170427930421e-18 -165 164 -0.02870370370370369 -165 165 0.6207133058984896 -165 166 -1.908195823574488e-17 -165 167 0.0287037037037037 -165 168 -0.204046639231824 -165 169 0.01203703703703704 -165 170 -0.01342592592592588 -165 171 -0.05315500685871059 -165 172 0.01296296296296294 -165 173 0.01342592592592589 -165 174 -0.1551783264746222 -166 157 -0.000970370370370371 -166 158 -0.0005000000000000002 -166 159 -0.008333333333333323 -166 160 -0.001659259259259258 -166 161 -4.336808689942018e-19 -166 162 -0.03333333333333333 -166 163 -0.0002814814814814818 -166 164 1.301042606982605e-18 -166 165 1.561251128379126e-17 -166 166 0.007762962962962964 -166 167 4.336808689942018e-19 -166 168 -6.938893903907228e-18 -166 169 -0.0009703703703703722 -166 170 0.0005000000000000001 -166 171 0.008333333333333344 -166 172 -0.001659259259259265 -166 173 -2.38524477946811e-18 -166 174 0.03333333333333333 -166 895 -0.0009703703703703687 -166 896 0.0004999999999999998 -166 897 -0.008333333333333333 -166 898 -0.0002814814814814782 -166 899 1.084202172485504e-18 -166 900 -1.387778780781446e-17 -166 901 -0.0009703703703703688 -166 902 -0.0004999999999999997 -166 903 0.008333333333333312 -167 157 -0.0005000000000000003 -167 158 -0.001040740740740743 -167 159 -0.00925925925925926 -167 160 -3.252606517456513e-19 -167 161 0.0002814814814814829 -167 162 -1.387778780781446e-17 -167 163 1.301042606982605e-18 -167 164 -0.002362962962962963 -167 165 -0.03703703703703701 -167 166 4.336808689942018e-19 -167 167 0.008325925925925924 -167 168 -3.469446951953614e-18 -167 169 0.0005000000000000001 -167 170 -0.001040740740740739 -167 171 -0.009259259259259228 -167 172 -2.38524477946811e-18 -167 173 0.0002814814814814764 -167 174 6.938893903907228e-17 -167 895 0.0004999999999999996 -167 896 -0.001040740740740739 -167 897 0.009259259259259262 -167 898 1.301042606982605e-18 -167 899 -0.002362962962962959 -167 900 0.03703703703703698 -167 901 -0.0004999999999999998 -167 902 -0.001040740740740741 -167 903 0.009259259259259245 -168 157 -0.01296296296296296 -168 158 -0.01342592592592595 -168 159 -0.1551783264746228 -168 160 -0.02407407407407407 -168 161 1.214306433183765e-17 -168 162 -0.1063100137174209 -168 163 3.122502256758253e-17 -168 164 -0.02870370370370363 -168 165 -0.204046639231824 -168 166 -2.602085213965211e-17 -168 167 -6.938893903907228e-17 -168 168 1.241426611796979 -168 169 0.01296296296296297 -168 170 -0.01342592592592589 -168 171 -0.1551783264746222 -168 172 0.02407407407407409 -168 173 2.775557561562891e-17 -168 174 -0.1063100137174215 -168 895 -0.01296296296296295 -168 896 0.01342592592592589 -168 897 -0.1551783264746225 -168 898 6.938893903907228e-18 -168 899 0.02870370370370371 -168 900 -0.2040466392318234 -168 901 0.01296296296296291 -168 902 0.01342592592592589 -168 903 -0.155178326474622 -169 169 1 -170 170 1 -171 163 -0.01203703703703706 -171 164 -0.01342592592592592 -171 165 -0.05315500685871062 -171 166 -0.01296296296296295 -171 167 0.01342592592592588 -171 168 -0.1551783264746222 -171 169 4.336808689942018e-17 -171 170 -0.02870370370370364 -171 171 0.6207133058984891 -171 172 -7.28583859910259e-17 -171 173 0.02870370370370364 -171 174 -0.2040466392318223 -171 175 0.01203703703703704 -171 176 -0.01342592592592591 -171 177 -0.05315500685871088 -171 178 0.012962962962963 -171 179 0.01342592592592595 -171 180 -0.1551783264746231 -172 163 -0.0009703703703703698 -172 164 -0.0005000000000000001 -172 165 -0.008333333333333321 -172 166 -0.001659259259259265 -172 167 -2.49366499671666e-18 -172 168 -0.03333333333333331 -172 169 -0.000281481481481472 -172 170 1.843143693225358e-18 -172 171 1.561251128379126e-17 -172 172 0.00776296296296297 -172 173 6.505213034913027e-19 -172 174 6.938893903907228e-18 -172 175 -0.0009703703703703692 -172 176 0.0004999999999999995 -172 177 0.008333333333333345 -172 178 -0.001659259259259273 -172 179 -1.301042606982605e-18 -172 180 0.03333333333333334 -172 898 -0.000970370370370373 -172 899 0.0005000000000000001 -172 900 -0.00833333333333334 -172 901 -0.0002814814814814759 -172 902 1.626303258728257e-18 -172 903 -2.42861286636753e-17 -172 904 -0.0009703703703703711 -172 905 -0.0005 -172 906 0.008333333333333325 -173 163 -0.0005 -173 164 -0.001040740740740741 -173 165 -0.009259259259259247 -173 166 -2.276824562219559e-18 -173 167 0.0002814814814814763 -173 168 -5.204170427930421e-18 -173 169 1.843143693225358e-18 -173 170 -0.002362962962962951 -173 171 -0.03703703703703698 -173 172 6.505213034913027e-19 -173 173 0.008325925925925915 -173 174 -5.898059818321144e-17 -173 175 0.0004999999999999996 -173 176 -0.001040740740740735 -173 177 -0.009259259259259214 -173 178 -1.517883041479706e-18 -173 179 0.0002814814814814686 -173 180 3.989863994746656e-17 -173 898 0.0005000000000000003 -173 899 -0.001040740740740739 -173 900 0.009259259259259228 -173 901 1.517883041479706e-18 -173 902 -0.002362962962962955 -173 903 0.03703703703703689 -173 904 -0.0005 -173 905 -0.001040740740740739 -173 906 0.009259259259259222 -174 163 -0.01296296296296292 -174 164 -0.01342592592592593 -174 165 -0.1551783264746222 -174 166 -0.02407407407407409 -174 167 -2.602085213965211e-17 -174 168 -0.1063100137174216 -174 169 3.469446951953614e-17 -174 170 -0.02870370370370359 -174 171 -0.2040466392318223 -174 172 -1.387778780781446e-17 -174 173 2.602085213965211e-17 -174 174 1.241426611796978 -174 175 0.01296296296296293 -174 176 -0.01342592592592588 -174 177 -0.1551783264746221 -174 178 0.02407407407407412 -174 179 4.163336342344337e-17 -174 180 -0.1063100137174229 -174 898 -0.01296296296296298 -174 899 0.01342592592592587 -174 900 -0.1551783264746222 -174 901 -8.673617379884035e-18 -174 902 0.02870370370370361 -174 903 -0.2040466392318224 -174 904 0.01296296296296293 -174 905 0.01342592592592588 -174 906 -0.1551783264746219 -175 175 1 -176 176 1 -177 169 -0.0120370370370371 -177 170 -0.0134259259259259 -177 171 -0.05315500685871088 -177 172 -0.01296296296296295 -177 173 0.01342592592592583 -177 174 -0.1551783264746221 -177 175 1.058181320345852e-16 -177 176 -0.02870370370370367 -177 177 0.6207133058984917 -177 178 -5.377642775528102e-17 -177 179 0.02870370370370366 -177 180 -0.204046639231824 -177 181 0.01203703703703697 -177 182 -0.01342592592592599 -177 183 -0.05315500685871054 -177 184 0.01296296296296303 -177 185 0.01342592592592607 -177 186 -0.1551783264746242 -178 169 -0.0009703703703703736 -178 170 -0.0005000000000000008 -178 171 -0.008333333333333342 -178 172 -0.001659259259259273 -178 173 -1.517883041479706e-18 -178 174 -0.03333333333333333 -178 175 -0.0002814814814814783 -178 176 9.75781955236954e-19 -178 177 -1.908195823574488e-17 -178 178 0.007762962962962958 -178 179 3.035766082959412e-18 -178 180 -1.387778780781446e-17 -178 181 -0.0009703703703703644 -178 182 0.0004999999999999985 -178 183 0.008333333333333325 -178 184 -0.001659259259259244 -178 185 7.589415207398531e-19 -178 186 0.03333333333333333 -178 901 -0.0009703703703703711 -178 902 0.0005 -178 903 -0.008333333333333323 -178 904 -0.000281481481481485 -178 905 -1.734723475976807e-18 -178 906 1.040834085586084e-17 -178 907 -0.0009703703703703678 -178 908 -0.0004999999999999994 -178 909 0.008333333333333342 -179 169 -0.0005000000000000008 -179 170 -0.001040740740740744 -179 171 -0.00925925925925925 -179 172 -1.301042606982605e-18 -179 173 0.0002814814814814687 -179 174 -3.642919299551295e-17 -179 175 6.505213034913027e-19 -179 176 -0.00236296296296296 -179 177 -0.03703703703703702 -179 178 3.035766082959412e-18 -179 179 0.008325925925925919 -179 180 -7.979727989493313e-17 -179 181 0.0004999999999999986 -179 182 -0.001040740740740734 -179 183 -0.00925925925925925 -179 184 6.505213034913027e-19 -179 185 0.0002814814814814948 -179 186 8.673617379884035e-18 -179 901 0.0005 -179 902 -0.001040740740740739 -179 903 0.009259259259259222 -179 904 -1.734723475976807e-18 -179 905 -0.002362962962962967 -179 906 0.03703703703703701 -179 907 -0.0004999999999999994 -179 908 -0.001040740740740737 -179 909 0.00925925925925928 -180 169 -0.01296296296296298 -180 170 -0.013425925925926 -180 171 -0.1551783264746231 -180 172 -0.02407407407407407 -180 173 4.85722573273506e-17 -180 174 -0.1063100137174229 -180 175 4.336808689942018e-17 -180 176 -0.02870370370370374 -180 177 -0.204046639231824 -180 178 -6.071532165918825e-17 -180 179 3.989863994746656e-17 -180 180 1.241426611796981 -180 181 0.01296296296296291 -180 182 -0.01342592592592584 -180 183 -0.1551783264746222 -180 184 0.02407407407407413 -180 185 -4.510281037539698e-17 -180 186 -0.1063100137174193 -180 901 -0.01296296296296293 -180 902 0.01342592592592588 -180 903 -0.1551783264746219 -180 904 -6.938893903907228e-18 -180 905 0.02870370370370379 -180 906 -0.2040466392318249 -180 907 0.01296296296296297 -180 908 0.01342592592592587 -180 909 -0.1551783264746229 -181 181 1 -182 182 1 -183 175 -0.01203703703703707 -183 176 -0.01342592592592593 -183 177 -0.05315500685871052 -183 178 -0.0129629629629629 -183 179 0.01342592592592585 -183 180 -0.1551783264746222 -183 181 1.387778780781446e-17 -183 182 -0.02870370370370382 -183 183 0.6207133058984917 -183 184 -1.908195823574488e-17 -183 185 0.02870370370370392 -183 186 -0.2040466392318268 -183 187 0.01203703703703704 -183 188 -0.01342592592592593 -183 189 -0.05315500685870971 -183 190 0.01296296296296293 -183 191 0.01342592592592592 -183 192 -0.1551783264746225 -184 175 -0.0009703703703703754 -184 176 -0.0005000000000000015 -184 177 -0.008333333333333344 -184 178 -0.001659259259259245 -184 179 6.505213034913027e-19 -184 180 -0.03333333333333333 -184 181 -0.0002814814814814937 -184 182 2.168404344971009e-19 -184 183 -8.673617379884035e-18 -184 184 0.007762962962962959 -184 185 8.673617379884035e-19 -184 186 -1.040834085586084e-17 -184 187 -0.0009703703703703717 -184 188 0.0005000000000000007 -184 189 0.008333333333333333 -184 190 -0.001659259259259247 -184 191 -5.421010862427522e-19 -184 192 0.03333333333333333 -184 904 -0.0009703703703703706 -184 905 0.0005000000000000006 -184 906 -0.008333333333333323 -184 907 -0.0002814814814814857 -184 908 -8.673617379884035e-19 -184 909 5.204170427930421e-18 -184 910 -0.00097037037037037 -184 911 -0.0005000000000000001 -184 912 0.008333333333333333 -185 175 -0.0005000000000000014 -185 176 -0.00104074074074075 -185 177 -0.009259259259259306 -185 178 7.589415207398531e-19 -185 179 0.000281481481481495 -185 180 8.673617379884035e-18 -185 181 4.336808689942018e-19 -185 182 -0.002362962962962979 -185 183 -0.03703703703703716 -185 184 7.589415207398531e-19 -185 185 0.008325925925925948 -185 186 -1.734723475976807e-17 -185 187 0.0005000000000000006 -185 188 -0.001040740740740746 -185 189 -0.009259259259259309 -185 190 -4.336808689942018e-19 -185 191 0.0002814814814814928 -185 192 -2.081668171172169e-17 -185 904 0.0005000000000000006 -185 905 -0.001040740740740748 -185 906 0.009259259259259333 -185 907 -1.192622389734055e-18 -185 908 -0.002362962962962969 -185 909 0.03703703703703716 -185 910 -0.0005000000000000001 -185 911 -0.001040740740740743 -185 912 0.009259259259259283 -186 175 -0.01296296296296306 -186 176 -0.01342592592592604 -186 177 -0.1551783264746242 -186 178 -0.02407407407407397 -186 180 -0.1063100137174193 -186 181 5.377642775528102e-17 -186 182 -0.02870370370370375 -186 183 -0.2040466392318268 -186 184 -7.28583859910259e-17 -186 185 -2.081668171172169e-17 -186 186 1.241426611796986 -186 187 0.012962962962963 -186 188 -0.01342592592592597 -186 189 -0.1551783264746233 -186 190 0.02407407407407405 -186 191 3.469446951953614e-17 -186 192 -0.1063100137174193 -186 904 -0.01296296296296299 -186 905 0.01342592592592603 -186 906 -0.155178326474624 -186 907 2.949029909160572e-17 -186 908 0.02870370370370377 -186 909 -0.2040466392318257 -186 910 0.01296296296296297 -186 911 0.01342592592592595 -186 912 -0.155178326474623 -187 187 1 -188 188 1 -189 181 -0.012037037037037 -189 182 -0.01342592592592596 -189 183 -0.05315500685870971 -189 184 -0.01296296296296299 -189 185 0.013425925925926 -189 186 -0.1551783264746233 -189 187 -1.040834085586084e-17 -189 188 -0.02870370370370375 -189 189 0.6207133058984915 -189 190 -1.908195823574488e-17 -189 191 0.02870370370370368 -189 192 -0.2040466392318248 -189 193 0.01203703703703704 -189 194 -0.01342592592592589 -189 195 -0.05315500685871081 -189 196 0.01296296296296298 -189 197 0.01342592592592593 -189 198 -0.1551783264746229 -190 181 -0.0009703703703703671 -190 182 -0.0004999999999999996 -190 183 -0.008333333333333321 -190 184 -0.001659259259259247 -190 185 -3.252606517456513e-19 -190 186 -0.03333333333333333 -190 187 -0.000281481481481484 -190 188 1.084202172485504e-18 -190 189 1.561251128379126e-17 -190 190 0.007762962962962964 -190 191 -7.589415207398531e-19 -190 193 -0.0009703703703703706 -190 194 0.0004999999999999998 -190 195 0.008333333333333344 -190 196 -0.001659259259259271 -190 197 -1.192622389734055e-18 -190 198 0.03333333333333334 -190 907 -0.0009703703703703705 -190 908 0.0005 -190 909 -0.008333333333333342 -190 910 -0.0002814814814814844 -190 911 9.75781955236954e-19 -190 912 -1.214306433183765e-17 -190 913 -0.0009703703703703694 -190 914 -0.0004999999999999998 -190 915 0.008333333333333328 -191 181 -0.0004999999999999996 -191 182 -0.00104074074074074 -191 183 -0.00925925925925929 -191 184 -4.336808689942018e-19 -191 185 0.0002814814814814929 -191 186 -1.908195823574488e-17 -191 187 9.75781955236954e-19 -191 188 -0.002362962962962967 -191 189 -0.03703703703703705 -191 190 -7.589415207398531e-19 -191 191 0.008325925925925928 -191 192 3.122502256758253e-17 -191 193 0.0004999999999999998 -191 194 -0.001040740740740737 -191 195 -0.009259259259259221 -191 196 -1.517883041479706e-18 -191 197 0.0002814814814814693 -191 198 1.040834085586084e-17 -191 907 0.0004999999999999999 -191 908 -0.00104074074074074 -191 909 0.009259259259259266 -191 910 1.192622389734055e-18 -191 911 -0.002362962962962966 -191 912 0.03703703703703712 -191 913 -0.0004999999999999998 -191 914 -0.001040740740740741 -191 915 0.009259259259259266 -192 181 -0.01296296296296293 -192 182 -0.01342592592592589 -192 183 -0.1551783264746225 -192 184 -0.02407407407407409 -192 185 5.204170427930421e-18 -192 186 -0.1063100137174193 -192 187 1.734723475976807e-17 -192 188 -0.02870370370370381 -192 189 -0.2040466392318248 -192 190 3.642919299551295e-17 -192 191 3.122502256758253e-17 -192 192 1.241426611796982 -192 193 0.01296296296296295 -192 194 -0.01342592592592589 -192 195 -0.1551783264746223 -192 196 0.02407407407407406 -192 197 -1.908195823574488e-17 -192 198 -0.1063100137174229 -192 907 -0.01296296296296299 -192 908 0.01342592592592591 -192 909 -0.1551783264746228 -192 910 2.255140518769849e-17 -192 911 0.02870370370370369 -192 912 -0.2040466392318249 -192 913 0.01296296296296293 -192 914 0.01342592592592597 -192 915 -0.1551783264746227 -193 193 1 -194 194 1 -195 187 -0.01203703703703708 -195 188 -0.01342592592592591 -195 189 -0.05315500685871081 -195 190 -0.01296296296296296 -195 191 0.01342592592592586 -195 192 -0.1551783264746223 -195 193 9.020562075079397e-17 -195 194 -0.02870370370370366 -195 195 0.6207133058984918 -195 196 -4.510281037539698e-17 -195 197 0.02870370370370364 -195 198 -0.204046639231824 -195 199 0.01203703703703697 -195 200 -0.01342592592592598 -195 201 -0.05315500685871061 -195 202 0.01296296296296302 -195 203 0.01342592592592606 -195 204 -0.1551783264746241 -196 187 -0.0009703703703703717 -196 188 -0.0005000000000000003 -196 189 -0.008333333333333333 -196 190 -0.001659259259259271 -196 191 -1.517883041479706e-18 -196 192 -0.03333333333333333 -196 193 -0.0002814814814814782 -196 194 8.673617379884035e-19 -196 195 -1.214306433183765e-17 -196 196 0.007762962962962961 -196 197 2.602085213965211e-18 -196 198 -1.040834085586084e-17 -196 199 -0.0009703703703703649 -196 200 0.0004999999999999987 -196 201 0.008333333333333325 -196 202 -0.001659259259259246 -196 203 4.336808689942018e-19 -196 204 0.03333333333333333 -196 910 -0.0009703703703703709 -196 911 0.0005000000000000002 -196 912 -0.008333333333333333 -196 913 -0.0002814814814814879 -196 914 -1.084202172485504e-18 -196 915 3.469446951953614e-18 -196 916 -0.0009703703703703699 -196 917 -0.0004999999999999998 -196 918 0.008333333333333344 -197 187 -0.0005000000000000003 -197 188 -0.001040740740740742 -197 189 -0.009259259259259248 -197 190 -1.192622389734055e-18 -197 191 0.0002814814814814693 -197 192 -4.336808689942018e-17 -197 193 8.673617379884035e-19 -197 194 -0.002362962962962959 -197 195 -0.03703703703703702 -197 196 2.49366499671666e-18 -197 197 0.008325925925925924 -197 198 3.469446951953614e-18 -197 199 0.0004999999999999988 -197 200 -0.001040740740740735 -197 201 -0.009259259259259257 -197 202 4.336808689942018e-19 -197 203 0.0002814814814814941 -197 204 8.673617379884035e-18 -197 910 0.0005 -197 911 -0.001040740740740741 -197 912 0.009259259259259266 -197 913 -1.301042606982605e-18 -197 914 -0.002362962962962971 -197 915 0.0370370370370371 -197 916 -0.0004999999999999998 -197 917 -0.001040740740740738 -197 918 0.009259259259259262 -198 187 -0.01296296296296295 -198 188 -0.01342592592592597 -198 189 -0.1551783264746228 -198 190 -0.02407407407407404 -198 191 -2.255140518769849e-17 -198 192 -0.1063100137174229 -198 193 2.42861286636753e-17 -198 194 -0.02870370370370377 -198 195 -0.204046639231824 -198 196 -9.540979117872439e-17 -198 197 6.418476861114186e-17 -198 198 1.241426611796983 -198 199 0.01296296296296291 -198 200 -0.01342592592592585 -198 201 -0.1551783264746223 -198 202 0.02407407407407413 -198 203 -1.908195823574488e-17 -198 204 -0.1063100137174194 -198 910 -0.01296296296296295 -198 911 0.01342592592592597 -198 912 -0.1551783264746228 -198 913 -1.387778780781446e-17 -198 914 0.02870370370370372 -198 915 -0.2040466392318258 -198 916 0.01296296296296299 -198 917 0.01342592592592587 -198 918 -0.155178326474623 -199 199 1 -200 200 1 -201 193 -0.01203703703703706 -201 194 -0.01342592592592593 -201 195 -0.05315500685871059 -201 196 -0.01296296296296291 -201 197 0.01342592592592587 -201 198 -0.1551783264746223 -201 199 5.204170427930421e-17 -201 200 -0.02870370370370372 -201 201 0.6207133058984926 -201 202 -5.030698080332741e-17 -201 203 0.02870370370370368 -201 204 -0.2040466392318258 -201 205 0.01203703703703698 -201 206 -0.01342592592592593 -201 207 -0.0531550068587105 -201 208 0.01296296296296299 -201 209 0.01342592592592602 -201 210 -0.1551783264746233 -202 193 -0.000970370370370375 -202 194 -0.0005000000000000013 -202 195 -0.008333333333333344 -202 196 -0.001659259259259246 -202 197 4.336808689942018e-19 -202 198 -0.03333333333333333 -202 199 -0.0002814814814814882 -202 200 8.673617379884035e-19 -202 201 -1.734723475976807e-17 -202 202 0.00776296296296296 -202 203 4.98732999343332e-18 -202 204 -6.938893903907228e-18 -202 205 -0.0009703703703703675 -202 206 0.0004999999999999993 -202 207 0.008333333333333323 -202 208 -0.001659259259259259 -202 209 -3.144186300207963e-18 -202 210 0.03333333333333333 -202 913 -0.0009703703703703704 -202 914 0.0005000000000000003 -202 915 -0.008333333333333325 -202 916 -0.000281481481481481 -202 917 -6.505213034913027e-19 -202 918 8.673617379884035e-18 -202 919 -0.0009703703703703736 -202 920 -0.0005000000000000009 -202 921 0.008333333333333344 -203 193 -0.0005000000000000012 -203 194 -0.001040740740740749 -203 195 -0.009259259259259302 -203 196 3.252606517456513e-19 -203 197 0.0002814814814814941 -203 198 -1.040834085586084e-17 -203 199 9.75781955236954e-19 -203 200 -0.002362962962962972 -203 201 -0.03703703703703704 -203 202 5.095750210681871e-18 -203 203 0.008325925925925935 -203 204 8.326672684688674e-17 -203 205 0.0004999999999999993 -203 206 -0.001040740740740736 -203 207 -0.009259259259259243 -203 208 -3.469446951953614e-18 -203 209 0.0002814814814814819 -203 210 5.204170427930421e-17 -203 913 0.0005000000000000004 -203 914 -0.001040740740740745 -203 915 0.0092592592592593 -203 916 -5.421010862427522e-19 -203 917 -0.002362962962962963 -203 918 0.0370370370370371 -203 919 -0.0005000000000000008 -203 920 -0.001040740740740746 -203 921 0.009259259259259278 -204 193 -0.01296296296296306 -204 194 -0.01342592592592602 -204 195 -0.1551783264746241 -204 196 -0.024074074074074 -204 197 2.255140518769849e-17 -204 198 -0.1063100137174194 -204 199 1.006139616066548e-16 -204 200 -0.02870370370370381 -204 201 -0.2040466392318258 -204 202 -5.724587470723463e-17 -204 203 1.387778780781446e-17 -204 204 1.241426611796984 -204 205 0.01296296296296292 -204 206 -0.01342592592592582 -204 207 -0.155178326474622 -204 208 0.02407407407407407 -204 209 -2.255140518769849e-17 -204 210 -0.1063100137174211 -204 913 -0.01296296296296298 -204 914 0.01342592592592597 -204 915 -0.1551783264746235 -204 916 5.204170427930421e-18 -204 917 0.02870370370370363 -204 918 -0.2040466392318247 -204 919 0.01296296296296301 -204 920 0.01342592592592603 -204 921 -0.1551783264746236 -205 205 1 -206 206 1 -207 199 -0.01203703703703705 -207 200 -0.01342592592592592 -207 201 -0.0531550068587105 -207 202 -0.01296296296296292 -207 203 0.01342592592592587 -207 204 -0.155178326474622 -207 205 3.122502256758253e-17 -207 206 -0.02870370370370378 -207 207 0.6207133058984901 -207 208 -6.418476861114186e-17 -207 209 0.0287037037037038 -207 210 -0.2040466392318251 -207 211 0.01203703703703704 -207 212 -0.0134259259259259 -207 213 -0.05315500685870983 -207 214 0.01296296296296296 -207 215 0.01342592592592593 -207 216 -0.1551783264746225 -208 199 -0.0009703703703703732 -208 200 -0.0005000000000000009 -208 201 -0.008333333333333323 -208 202 -0.001659259259259259 -208 203 -3.577867169202165e-18 -208 204 -0.03333333333333333 -208 205 -0.0002814814814814872 -208 206 1.951563910473908e-18 -208 207 1.561251128379126e-17 -208 208 0.007762962962962965 -208 209 3.361026734705064e-18 -208 210 -3.469446951953614e-18 -208 211 -0.0009703703703703715 -208 212 0.0005000000000000002 -208 213 0.008333333333333345 -208 214 -0.00165925925925926 -208 215 -2.168404344971009e-18 -208 216 0.03333333333333333 -208 916 -0.000970370370370368 -208 917 0.0004999999999999993 -208 918 -0.008333333333333342 -208 919 -0.0002814814814814771 -208 920 1.951563910473908e-18 -208 921 -1.387778780781446e-17 -208 922 -0.0009703703703703697 -208 923 -0.0005 -208 924 0.008333333333333325 -209 199 -0.000500000000000001 -209 200 -0.001040740740740747 -209 201 -0.00925925925925929 -209 202 -3.252606517456513e-18 -209 203 0.0002814814814814819 -209 204 -1.301042606982605e-16 -209 205 2.059984127722458e-18 -209 206 -0.00236296296296297 -209 207 -0.03703703703703708 -209 208 3.252606517456513e-18 -209 209 0.008325925925925929 -209 210 -1.006139616066548e-16 -209 211 0.0005000000000000001 -209 212 -0.001040740740740741 -209 213 -0.009259259259259264 -209 214 -2.276824562219559e-18 -209 215 0.0002814814814814822 -209 216 3.989863994746656e-17 -209 916 0.0004999999999999991 -209 917 -0.001040740740740735 -209 918 0.009259259259259231 -209 919 1.843143693225358e-18 -209 920 -0.002362962962962958 -209 921 0.03703703703703703 -209 922 -0.0005 -209 923 -0.001040740740740742 -209 924 0.009259259259259276 -210 199 -0.01296296296296299 -210 200 -0.01342592592592597 -210 201 -0.1551783264746233 -210 202 -0.02407407407407407 -210 203 1.734723475976807e-18 -210 204 -0.1063100137174211 -210 205 5.898059818321144e-17 -210 206 -0.02870370370370369 -210 207 -0.2040466392318251 -210 208 -1.908195823574488e-17 -210 209 8.673617379884035e-18 -210 210 1.241426611796981 -210 211 0.01296296296296297 -210 212 -0.01342592592592592 -210 213 -0.1551783264746225 -210 214 0.02407407407407409 -210 215 5.551115123125783e-17 -210 216 -0.1063100137174208 -210 916 -0.01296296296296294 -210 917 0.01342592592592588 -210 918 -0.1551783264746223 -210 919 -2.081668171172169e-17 -210 920 0.02870370370370374 -210 921 -0.2040466392318235 -210 922 0.01296296296296292 -210 923 0.01342592592592591 -210 924 -0.1551783264746222 -211 211 1 -212 212 1 -213 205 -0.01203703703703706 -213 206 -0.01342592592592593 -213 207 -0.05315500685870983 -213 208 -0.01296296296296297 -213 209 0.01342592592592591 -213 210 -0.1551783264746225 -213 211 9.020562075079397e-17 -213 212 -0.02870370370370373 -213 213 0.6207133058984915 -213 214 -8.500145032286355e-17 -213 215 0.02870370370370365 -213 216 -0.2040466392318242 -213 217 0.012037037037037 -213 218 -0.01342592592592594 -213 219 -0.05315500685871093 -213 220 0.01296296296296303 -213 221 0.01342592592592605 -213 222 -0.155178326474624 -214 205 -0.0009703703703703692 -214 206 -0.0005 -214 207 -0.008333333333333321 -214 208 -0.00165925925925926 -214 209 -2.276824562219559e-18 -214 210 -0.03333333333333333 -214 211 -0.0002814814814814805 -214 212 2.602085213965211e-18 -214 213 1.561251128379126e-17 -214 214 0.007762962962962962 -214 215 1.084202172485504e-18 -214 217 -0.0009703703703703663 -214 218 0.0004999999999999987 -214 219 0.008333333333333344 -214 220 -0.001659259259259259 -214 221 -1.301042606982605e-18 -214 222 0.03333333333333335 -214 919 -0.0009703703703703719 -214 920 0.0005000000000000001 -214 921 -0.008333333333333342 -214 922 -0.0002814814814814876 -214 923 4.336808689942018e-19 -214 924 -1.040834085586084e-17 -214 925 -0.0009703703703703676 -214 926 -0.0004999999999999994 -214 927 0.008333333333333328 -215 205 -0.0005 -215 206 -0.001040740740740743 -215 207 -0.009259259259259283 -215 208 -2.168404344971009e-18 -215 209 0.0002814814814814822 -215 210 -3.469446951953614e-17 -215 211 2.602085213965211e-18 -215 212 -0.002362962962962963 -215 213 -0.03703703703703705 -215 214 1.084202172485504e-18 -215 215 0.008325925925925921 -215 216 -1.734723475976807e-17 -215 217 0.0004999999999999987 -215 218 -0.001040740740740731 -215 219 -0.009259259259259221 -215 220 -1.301042606982605e-18 -215 221 0.0002814814814814813 -215 222 2.42861286636753e-17 -215 919 0.0005000000000000002 -215 920 -0.001040740740740739 -215 921 0.009259259259259257 -215 922 5.421010862427522e-19 -215 923 -0.002362962962962971 -215 924 0.03703703703703709 -215 925 -0.0004999999999999995 -215 926 -0.001040740740740738 -215 927 0.009259259259259266 -216 205 -0.01296296296296293 -216 206 -0.01342592592592596 -216 207 -0.1551783264746225 -216 208 -0.02407407407407408 -216 209 1.214306433183765e-17 -216 210 -0.1063100137174208 -216 211 3.989863994746656e-17 -216 212 -0.02870370370370383 -216 213 -0.2040466392318242 -216 214 -5.204170427930421e-17 -216 215 4.336808689942018e-17 -216 216 1.24142661179698 -216 217 0.01296296296296292 -216 218 -0.01342592592592582 -216 219 -0.155178326474622 -216 220 0.02407407407407413 -216 221 -2.255140518769849e-17 -216 222 -0.1063100137174212 -216 919 -0.01296296296296298 -216 920 0.01342592592592587 -216 921 -0.1551783264746222 -216 922 1.561251128379126e-17 -216 923 0.02870370370370379 -216 924 -0.2040466392318251 -216 925 0.01296296296296293 -216 926 0.01342592592592591 -216 927 -0.1551783264746223 -217 217 1 -218 218 1 -219 211 -0.01203703703703711 -219 212 -0.01342592592592592 -219 213 -0.05315500685871093 -219 214 -0.01296296296296292 -219 215 0.01342592592592581 -219 216 -0.1551783264746219 -219 217 6.418476861114186e-17 -219 218 -0.02870370370370361 -219 219 0.6207133058984911 -219 220 -3.989863994746656e-17 -219 221 0.02870370370370367 -219 222 -0.2040466392318234 -219 223 0.01203703703703705 -219 224 -0.01342592592592592 -219 225 -0.05315500685871204 -219 226 0.01296296296296296 -219 227 0.01342592592592597 -219 228 -0.1551783264746227 -220 211 -0.0009703703703703751 -220 212 -0.0005000000000000013 -220 213 -0.008333333333333342 -220 214 -0.001659259259259259 -220 215 -1.301042606982605e-18 -220 216 -0.03333333333333333 -220 217 -0.0002814814814814757 -220 218 1.517883041479706e-18 -220 219 -1.734723475976807e-18 -220 220 0.007762962962962961 -220 221 -3.469446951953614e-18 -220 222 -6.938893903907228e-18 -220 223 -0.0009703703703703707 -220 224 0.0004999999999999998 -220 225 0.008333333333333345 -220 226 -0.001659259259259259 -220 227 4.87890977618477e-18 -220 228 0.03333333333333334 -220 922 -0.0009703703703703715 -220 923 0.0005000000000000007 -220 924 -0.008333333333333325 -220 925 -0.0002814814814814908 -220 926 -3.577867169202165e-18 -220 927 -3.469446951953614e-18 -220 928 -0.0009703703703703606 -220 929 -0.0004999999999999973 -220 930 0.008333333333333325 -221 211 -0.0005000000000000014 -221 212 -0.001040740740740749 -221 213 -0.009259259259259293 -221 214 -1.301042606982605e-18 -221 215 0.0002814814814814814 -221 216 -4.683753385137379e-17 -221 217 1.517883041479706e-18 -221 218 -0.002362962962962956 -221 219 -0.03703703703703698 -221 220 -3.469446951953614e-18 -221 221 0.008325925925925928 -221 222 -2.081668171172169e-17 -221 223 0.0004999999999999999 -221 224 -0.001040740740740739 -221 225 -0.009259259259259241 -221 226 4.98732999343332e-18 -221 227 0.0002814814814814819 -221 228 -2.012279232133096e-16 -221 922 0.0005000000000000007 -221 923 -0.001040740740740747 -221 924 0.009259259259259302 -221 925 -3.469446951953614e-18 -221 926 -0.002362962962962975 -221 927 0.03703703703703715 -221 928 -0.0004999999999999974 -221 929 -0.001040740740740725 -221 930 0.009259259259259196 -222 211 -0.01296296296296303 -222 212 -0.01342592592592605 -222 213 -0.155178326474624 -222 214 -0.024074074074074 -222 215 -1.734723475976807e-18 -222 216 -0.1063100137174211 -222 217 6.245004513516506e-17 -222 218 -0.02870370370370364 -222 219 -0.2040466392318234 -222 220 -1.942890293094024e-16 -222 221 -4.683753385137379e-17 -222 222 1.241426611796983 -222 223 0.01296296296296297 -222 224 -0.01342592592592585 -222 225 -0.1551783264746225 -222 226 0.02407407407407419 -222 227 -3.295974604355933e-17 -222 228 -0.1063100137174211 -222 922 -0.01296296296296297 -222 923 0.01342592592592602 -222 924 -0.1551783264746233 -222 925 1.179611963664229e-16 -222 926 0.02870370370370384 -222 927 -0.2040466392318264 -222 928 0.01296296296296286 -222 929 0.01342592592592578 -222 930 -0.1551783264746213 -223 223 1 -224 224 1 -225 217 -0.01203703703703707 -225 218 -0.01342592592592592 -225 219 -0.05315500685871204 -225 220 -0.01296296296296295 -225 221 0.01342592592592594 -225 222 -0.1551783264746225 -225 223 2.081668171172169e-17 -225 224 -0.02870370370370379 -225 225 0.6207133058984925 -225 226 -2.949029909160572e-17 -225 227 0.02870370370370385 -225 228 -0.2040466392318259 -225 229 0.01203703703703705 -225 230 -0.01342592592592599 -225 231 -0.0531550068587087 -225 232 0.01296296296296298 -225 233 0.01342592592592591 -225 234 -0.1551783264746234 -226 217 -0.0009703703703703718 -226 218 -0.0005000000000000003 -226 219 -0.008333333333333342 -226 220 -0.001659259259259259 -226 221 4.98732999343332e-18 -226 222 -0.03333333333333333 -226 223 -0.0002814814814814873 -226 224 1.084202172485504e-19 -226 225 -3.469446951953614e-18 -226 226 0.007762962962962956 -226 227 -9.540979117872439e-18 -226 228 -6.938893903907228e-18 -226 229 -0.0009703703703703697 -226 230 0.0005000000000000002 -226 231 0.008333333333333342 -226 232 -0.001659259259259235 -226 233 4.553649124439119e-18 -226 234 0.03333333333333333 -226 925 -0.0009703703703703785 -226 926 0.0005000000000000027 -226 927 -0.008333333333333323 -226 928 -0.0002814814814814926 -226 929 -4.553649124439119e-18 -226 931 -0.0009703703703703628 -226 932 -0.0004999999999999982 -226 933 0.008333333333333325 -227 217 -0.0005000000000000002 -227 218 -0.001040740740740741 -227 219 -0.009259259259259252 -227 220 4.87890977618477e-18 -227 221 0.0002814814814814819 -227 222 7.806255641895632e-17 -227 223 -3.252606517456513e-19 -227 224 -0.00236296296296297 -227 225 -0.03703703703703715 -227 226 -9.432558900623889e-18 -227 227 0.00832592592592594 -227 228 -3.469446951953614e-17 -227 229 0.0005000000000000002 -227 230 -0.001040740740740746 -227 231 -0.009259259259259332 -227 232 4.77048955893622e-18 -227 233 0.0002814814814815032 -227 234 -6.245004513516506e-17 -227 925 0.0005000000000000028 -227 926 -0.00104074074074076 -227 927 0.009259259259259345 -227 928 -4.662069341687669e-18 -227 929 -0.002362962962962978 -227 930 0.03703703703703715 -227 931 -0.0004999999999999981 -227 932 -0.00104074074074073 -227 933 0.009259259259259252 -228 217 -0.01296296296296298 -228 218 -0.01342592592592588 -228 219 -0.1551783264746228 -228 220 -0.02407407407407396 -228 221 -6.245004513516506e-17 -228 222 -0.1063100137174211 -228 223 -2.602085213965211e-17 -228 224 -0.02870370370370382 -228 225 -0.2040466392318259 -228 226 -1.717376241217039e-16 -228 227 1.214306433183765e-17 -228 228 1.241426611796985 -228 229 0.01296296296296301 -228 230 -0.01342592592592607 -228 231 -0.1551783264746239 -228 232 0.02407407407407414 -228 233 8.500145032286355e-17 -228 234 -0.1063100137174178 -228 925 -0.01296296296296309 -228 926 0.01342592592592626 -228 927 -0.1551783264746254 -228 928 1.942890293094024e-16 -228 929 0.02870370370370381 -228 930 -0.2040466392318266 -228 931 0.01296296296296289 -228 932 0.01342592592592568 -228 933 -0.1551783264746212 -229 229 1 -230 230 1 -231 223 -0.01203703703703702 -231 224 -0.01342592592592599 -231 225 -0.0531550068587087 -231 226 -0.01296296296296301 -231 227 0.01342592592592597 -231 228 -0.1551783264746239 -231 229 -6.245004513516506e-17 -231 230 -0.02870370370370376 -231 231 0.6207133058984908 -231 232 6.418476861114186e-17 -231 233 0.02870370370370385 -231 234 -0.2040466392318246 -231 235 0.01203703703703708 -231 236 -0.01342592592592588 -231 237 -0.05315500685871156 -231 238 0.01296296296296294 -231 239 0.0134259259259258 -231 240 -0.155178326474622 -232 223 -0.0009703703703703675 -232 224 -0.0004999999999999997 -232 225 -0.008333333333333342 -232 226 -0.001659259259259235 -232 227 4.77048955893622e-18 -232 228 -0.03333333333333333 -232 229 -0.0002814814814814812 -232 230 -6.505213034913027e-19 -232 232 0.007762962962962961 -232 233 -8.239936510889834e-18 -232 234 3.469446951953614e-18 -232 235 -0.0009703703703703734 -232 236 0.0005000000000000003 -232 237 0.008333333333333344 -232 238 -0.001659259259259276 -232 239 4.119968255444917e-18 -232 240 0.03333333333333333 -232 928 -0.0009703703703703762 -232 929 0.0005000000000000021 -232 930 -0.008333333333333325 -232 931 -0.0002814814814814871 -232 932 -4.119968255444917e-18 -232 933 1.387778780781446e-17 -232 934 -0.0009703703703703661 -232 935 -0.0004999999999999986 -232 936 0.008333333333333326 -233 223 -0.0004999999999999996 -233 224 -0.001040740740740742 -233 225 -0.009259259259259313 -233 226 4.445228907190568e-18 -233 227 0.0002814814814815032 -233 228 1.97758476261356e-16 -233 229 -5.421010862427522e-19 -233 230 -0.002362962962962963 -233 231 -0.03703703703703711 -233 232 -8.239936510889834e-18 -233 233 0.008325925925925935 -233 234 -7.28583859910259e-17 -233 235 0.0005000000000000002 -233 236 -0.00104074074074074 -233 237 -0.009259259259259198 -233 238 4.228388472693467e-18 -233 239 0.0002814814814814651 -233 240 -4.85722573273506e-17 -233 928 0.0005000000000000021 -233 929 -0.001040740740740756 -233 930 0.009259259259259365 -233 931 -4.119968255444917e-18 -233 932 -0.002362962962962971 -233 933 0.03703703703703705 -233 934 -0.0004999999999999986 -233 935 -0.001040740740740731 -233 936 0.009259259259259205 -234 223 -0.01296296296296297 -234 224 -0.01342592592592601 -234 225 -0.1551783264746234 -234 226 -0.024074074074074 -234 227 5.898059818321144e-17 -234 228 -0.1063100137174178 -234 229 6.938893903907228e-18 -234 230 -0.02870370370370362 -234 231 -0.2040466392318246 -234 232 -1.214306433183765e-16 -234 233 -5.030698080332741e-17 -234 234 1.241426611796983 -234 235 0.01296296296296297 -234 236 -0.01342592592592596 -234 237 -0.1551783264746225 -234 238 0.02407407407407411 -234 239 -4.336808689942018e-17 -234 240 -0.1063100137174235 -234 928 -0.01296296296296306 -234 929 0.01342592592592604 -234 930 -0.1551783264746243 -234 931 1.960237527853792e-16 -234 932 0.02870370370370382 -234 933 -0.2040466392318252 -234 934 0.01296296296296288 -234 935 0.01342592592592578 -234 936 -0.1551783264746214 -235 235 1 -236 236 1 -237 229 -0.01203703703703706 -237 230 -0.01342592592592588 -237 231 -0.05315500685871156 -237 232 -0.01296296296296297 -237 233 0.01342592592592587 -237 234 -0.1551783264746225 -237 235 -2.775557561562891e-17 -237 236 -0.02870370370370366 -237 237 0.6207133058984901 -237 238 4.510281037539698e-17 -237 239 0.02870370370370379 -237 240 -0.2040466392318235 -237 241 0.01203703703703706 -237 242 -0.01342592592592598 -237 243 -0.05315500685870976 -237 244 0.01296296296296295 -237 245 0.01342592592592587 -237 246 -0.1551783264746227 -238 229 -0.0009703703703703711 -238 230 -0.0004999999999999997 -238 231 -0.008333333333333342 -238 232 -0.001659259259259276 -238 233 4.119968255444917e-18 -238 234 -0.03333333333333332 -238 235 -0.0002814814814814754 -238 236 -2.49366499671666e-18 -238 237 -1.734723475976807e-17 -238 238 0.007762962962962961 -238 239 -1.040834085586084e-17 -238 240 -3.469446951953614e-18 -238 241 -0.0009703703703703717 -238 242 0.0005000000000000009 -238 243 0.008333333333333323 -238 244 -0.001659259259259246 -238 245 9.324138683375338e-18 -238 246 0.03333333333333331 -238 931 -0.0009703703703703748 -238 932 0.0005000000000000015 -238 933 -0.008333333333333314 -238 934 -0.0002814814814814853 -238 935 -5.854691731421724e-18 -238 936 2.255140518769849e-17 -238 937 -0.0009703703703703623 -238 938 -0.0004999999999999974 -238 939 0.008333333333333331 -239 229 -0.0004999999999999997 -239 230 -0.001040740740740735 -239 231 -0.009259259259259181 -239 232 4.228388472693467e-18 -239 233 0.0002814814814814651 -239 234 1.752070710736575e-16 -239 235 -2.49366499671666e-18 -239 236 -0.002362962962962956 -239 237 -0.03703703703703706 -239 238 -1.051676107310939e-17 -239 239 0.008325925925925922 -239 240 -1.665334536937735e-16 -239 241 0.000500000000000001 -239 242 -0.001040740740740751 -239 243 -0.009259259259259339 -239 244 9.324138683375338e-18 -239 245 0.0002814814814814941 -239 246 -2.359223927328458e-16 -239 931 0.0005000000000000015 -239 932 -0.001040740740740751 -239 933 0.009259259259259299 -239 934 -6.071532165918825e-18 -239 935 -0.002362962962962967 -239 936 0.03703703703703694 -239 937 -0.0004999999999999974 -239 938 -0.001040740740740722 -239 939 0.00925925925925917 -240 229 -0.01296296296296294 -240 230 -0.0134259259259259 -240 231 -0.155178326474622 -240 232 -0.02407407407407401 -240 233 -4.85722573273506e-17 -240 234 -0.1063100137174235 -240 235 -9.71445146547012e-17 -240 236 -0.02870370370370352 -240 237 -0.2040466392318235 -240 238 -1.179611963664229e-16 -240 239 -2.775557561562891e-17 -240 240 1.241426611796982 -240 241 0.012962962962963 -240 242 -0.01342592592592608 -240 243 -0.1551783264746243 -240 244 0.02407407407407412 -240 245 6.938893903907228e-17 -240 246 -0.1063100137174193 -240 931 -0.01296296296296299 -240 932 0.01342592592592605 -240 933 -0.1551783264746237 -240 934 1.543903893619358e-16 -240 935 0.02870370370370382 -240 936 -0.2040466392318248 -240 937 0.01296296296296288 -240 938 0.01342592592592563 -240 939 -0.1551783264746206 -241 241 1 -242 242 1 -243 235 -0.01203703703703697 -243 236 -0.01342592592592596 -243 237 -0.05315500685870976 -243 238 -0.01296296296296301 -243 239 0.01342592592592607 -243 240 -0.1551783264746243 -243 241 -1.474514954580286e-16 -243 242 -0.02870370370370368 -243 243 0.6207133058984906 -243 244 1.613292832658431e-16 -243 245 0.02870370370370369 -243 246 -0.2040466392318244 -243 247 0.01203703703703709 -243 248 -0.01342592592592586 -243 249 -0.05315500685871137 -243 250 0.01296296296296288 -243 251 0.01342592592592575 -243 252 -0.1551783264746209 -244 235 -0.0009703703703703672 -244 236 -0.0004999999999999991 -244 237 -0.008333333333333342 -244 238 -0.001659259259259246 -244 239 9.324138683375338e-18 -244 240 -0.03333333333333331 -244 241 -0.0002814814814814821 -244 242 -3.469446951953614e-18 -244 243 -1.734723475976807e-17 -244 244 0.007762962962962967 -244 245 -1.22514845490862e-17 -244 246 -6.938893903907228e-18 -244 247 -0.000970370370370376 -244 248 0.0005000000000000013 -244 249 0.008333333333333323 -244 250 -0.001659259259259278 -244 251 5.312590645178972e-18 -244 252 0.03333333333333331 -244 934 -0.0009703703703703782 -244 935 0.0005000000000000025 -244 936 -0.008333333333333314 -244 937 -0.0002814814814814718 -244 938 -5.095750210681871e-18 -244 939 1.040834085586084e-17 -244 940 -0.0009703703703703674 -244 941 -0.0004999999999999986 -244 942 0.008333333333333331 -245 235 -0.000499999999999999 -245 236 -0.001040740740740735 -245 237 -0.009259259259259264 -245 238 9.324138683375338e-18 -245 239 0.0002814814814814941 -245 240 2.42861286636753e-16 -245 241 -3.469446951953614e-18 -245 242 -0.002362962962962963 -245 243 -0.03703703703703701 -245 244 -1.214306433183765e-17 -245 245 0.008325925925925924 -245 246 3.122502256758253e-17 -245 247 0.0005000000000000013 -245 248 -0.001040740740740747 -245 249 -0.009259259259259241 -245 250 5.204170427930421e-18 -245 251 0.000281481481481466 -245 252 -1.387778780781446e-16 -245 934 0.0005000000000000027 -245 935 -0.00104074074074076 -245 936 0.009259259259259339 -245 937 -5.095750210681871e-18 -245 938 -0.002362962962962951 -245 939 0.03703703703703689 -245 940 -0.0004999999999999987 -245 941 -0.001040740740740729 -245 942 0.009259259259259156 -246 235 -0.01296296296296296 -246 236 -0.01342592592592586 -246 237 -0.1551783264746227 -246 238 -0.02407407407407398 -246 239 5.377642775528102e-17 -246 240 -0.1063100137174193 -246 241 -6.071532165918825e-17 -246 242 -0.02870370370370362 -246 243 -0.2040466392318244 -246 244 -1.006139616066548e-16 -246 245 -2.775557561562891e-17 -246 246 1.24142661179698 -246 247 0.01296296296296299 -246 248 -0.01342592592592599 -246 249 -0.1551783264746229 -246 250 0.02407407407407409 -246 251 8.673617379884035e-18 -246 252 -0.1063100137174232 -246 934 -0.01296296296296306 -246 935 0.01342592592592615 -246 936 -0.1551783264746247 -246 937 2.099015405931937e-16 -246 938 0.02870370370370353 -246 939 -0.2040466392318222 -246 940 0.01296296296296289 -246 941 0.01342592592592576 -246 942 -0.155178326474621 -247 247 1 -248 248 1 -249 241 -0.01203703703703698 -249 242 -0.01342592592592588 -249 243 -0.05315500685871137 -249 244 -0.01296296296296299 -249 245 0.01342592592592599 -249 246 -0.1551783264746229 -249 247 -3.295974604355933e-17 -249 248 -0.02870370370370356 -249 249 0.6207133058984891 -249 250 2.775557561562891e-17 -249 251 0.02870370370370344 -249 252 -0.204046639231822 -249 253 0.01203703703703703 -249 254 -0.01342592592592589 -249 255 -0.05315500685871047 -249 256 0.01296296296296295 -249 257 0.0134259259259259 -249 258 -0.1551783264746223 -250 241 -0.0009703703703703672 -250 242 -0.0004999999999999987 -250 243 -0.008333333333333323 -250 244 -0.001659259259259278 -250 245 5.204170427930421e-18 -250 246 -0.03333333333333331 -250 247 -0.0002814814814814729 -250 248 -4.336808689942018e-19 -250 249 8.673617379884035e-18 -250 250 0.00776296296296297 -250 251 -5.095750210681871e-18 -250 252 -6.938893903907228e-18 -250 253 -0.0009703703703703709 -250 254 0.0004999999999999999 -250 255 0.008333333333333335 -250 256 -0.001659259259259265 -250 257 -1.951563910473908e-18 -250 258 0.03333333333333331 -250 937 -0.0009703703703703762 -250 938 0.0005000000000000013 -250 939 -0.008333333333333331 -250 940 -0.0002814814814814697 -250 941 -2.168404344971009e-19 -250 942 -2.081668171172169e-17 -250 943 -0.0009703703703703695 -250 944 -0.0004999999999999999 -250 945 0.008333333333333321 -251 241 -0.0004999999999999987 -251 242 -0.00104074074074073 -251 243 -0.009259259259259167 -251 244 5.204170427930421e-18 -251 245 0.000281481481481466 -251 246 1.595945597898663e-16 -251 247 -5.421010862427522e-19 -251 248 -0.002362962962962951 -251 249 -0.03703703703703685 -251 250 -5.204170427930421e-18 -251 251 0.008325925925925912 -251 252 2.012279232133096e-16 -251 253 0.0004999999999999998 -251 254 -0.001040740740740739 -251 255 -0.009259259259259228 -251 256 -1.843143693225358e-18 -251 257 0.0002814814814814764 -251 258 6.938893903907228e-17 -251 937 0.0005000000000000013 -251 938 -0.001040740740740747 -251 939 0.009259259259259231 -251 940 -1.084202172485504e-19 -251 941 -0.002362962962962947 -251 942 0.03703703703703688 -251 943 -0.0004999999999999999 -251 944 -0.001040740740740741 -251 945 0.009259259259259245 -252 241 -0.01296296296296288 -252 242 -0.01342592592592575 -252 243 -0.1551783264746209 -252 244 -0.02407407407407408 -252 245 -2.775557561562891e-17 -252 246 -0.1063100137174232 -252 247 -5.030698080332741e-17 -252 248 -0.02870370370370363 -252 249 -0.204046639231822 -252 250 1.214306433183765e-17 -252 251 -5.551115123125783e-17 -252 252 1.241426611796976 -252 253 0.01296296296296295 -252 254 -0.01342592592592589 -252 255 -0.155178326474622 -252 256 0.02407407407407409 -252 257 1.387778780781446e-17 -252 258 -0.1063100137174216 -252 937 -0.012962962962963 -252 938 0.013425925925926 -252 939 -0.155178326474623 -252 940 3.642919299551295e-17 -252 941 0.02870370370370344 -252 942 -0.2040466392318215 -252 943 0.01296296296296293 -252 944 0.0134259259259259 -252 945 -0.1551783264746222 -253 253 1 -254 254 1 -255 247 -0.01203703703703704 -255 248 -0.01342592592592591 -255 249 -0.05315500685871048 -255 250 -0.01296296296296294 -255 251 0.01342592592592586 -255 252 -0.155178326474622 -255 253 1.040834085586084e-16 -255 254 -0.02870370370370375 -255 255 0.6207133058984919 -255 256 -1.127570259384925e-16 -255 257 0.02870370370370368 -255 258 -0.2040466392318251 -255 259 0.01203703703703696 -255 260 -0.01342592592592598 -255 261 -0.05315500685870976 -255 262 0.01296296296296304 -255 263 0.01342592592592609 -255 264 -0.1551783264746246 -256 247 -0.0009703703703703706 -256 248 -0.0005000000000000001 -256 249 -0.008333333333333321 -256 250 -0.001659259259259265 -256 251 -1.951563910473908e-18 -256 252 -0.03333333333333331 -256 253 -0.0002814814814814845 -256 254 2.276824562219559e-18 -256 255 8.673617379884035e-18 -256 256 0.007762962962962959 -256 257 5.312590645178972e-18 -256 259 -0.0009703703703703649 -256 260 0.0004999999999999986 -256 261 0.008333333333333333 -256 262 -0.001659259259259244 -256 263 -5.312590645178972e-18 -256 264 0.03333333333333333 -256 940 -0.0009703703703703719 -256 941 0.0005 -256 942 -0.00833333333333334 -256 943 -0.0002814814814814847 -256 944 2.49366499671666e-18 -256 945 -1.734723475976807e-17 -256 946 -0.0009703703703703738 -256 947 -0.0005000000000000013 -256 948 0.008333333333333333 -257 247 -0.0005000000000000001 -257 248 -0.001040740740740742 -257 249 -0.009259259259259247 -257 250 -1.951563910473908e-18 -257 251 0.0002814814814814763 -257 252 -5.204170427930421e-18 -257 253 2.168404344971009e-18 -257 254 -0.002362962962962967 -257 255 -0.03703703703703706 -257 256 5.312590645178972e-18 -257 257 0.008325925925925929 -257 258 1.110223024625157e-16 -257 259 0.0004999999999999986 -257 260 -0.001040740740740734 -257 261 -0.009259259259259264 -257 262 -5.312590645178972e-18 -257 263 0.000281481481481494 -257 264 1.474514954580286e-16 -257 940 0.0005000000000000001 -257 941 -0.001040740740740739 -257 942 0.009259259259259228 -257 943 2.602085213965211e-18 -257 944 -0.002362962962962967 -257 945 0.03703703703703708 -257 946 -0.0005000000000000013 -257 947 -0.001040740740740752 -257 948 0.009259259259259337 -258 247 -0.01296296296296294 -258 248 -0.01342592592592593 -258 249 -0.1551783264746223 -258 250 -0.02407407407407408 -258 251 -2.602085213965211e-17 -258 252 -0.1063100137174216 -258 253 2.949029909160572e-17 -258 254 -0.02870370370370382 -258 255 -0.204046639231825 -258 256 6.938893903907228e-17 -258 257 1.561251128379126e-17 -258 258 1.241426611796983 -258 259 0.01296296296296293 -258 260 -0.01342592592592585 -258 261 -0.1551783264746225 -258 262 0.02407407407407403 -258 263 -1.908195823574488e-17 -258 264 -0.1063100137174195 -258 940 -0.01296296296296297 -258 941 0.01342592592592587 -258 942 -0.1551783264746222 -258 943 -1.07552855510562e-16 -258 944 0.02870370370370367 -258 945 -0.2040466392318251 -258 946 0.01296296296296304 -258 947 0.01342592592592609 -258 948 -0.1551783264746245 -259 259 1 -260 260 1 -261 253 -0.01203703703703707 -261 254 -0.01342592592592596 -261 255 -0.05315500685870976 -261 256 -0.01296296296296293 -261 257 0.01342592592592585 -261 258 -0.1551783264746225 -261 259 1.734723475976807e-17 -261 260 -0.02870370370370368 -261 261 0.6207133058984897 -261 262 -2.255140518769849e-17 -261 263 0.02870370370370386 -261 264 -0.2040466392318241 -261 265 0.01203703703703706 -261 266 -0.01342592592592587 -261 267 -0.05315500685871127 -261 268 0.01296296296296294 -261 269 0.0134259259259258 -261 270 -0.155178326474622 -262 253 -0.0009703703703703738 -262 254 -0.0005000000000000013 -262 255 -0.008333333333333331 -262 256 -0.001659259259259244 -262 257 -5.312590645178972e-18 -262 258 -0.03333333333333333 -262 259 -0.0002814814814814791 -262 260 1.734723475976807e-18 -262 261 5.204170427930421e-18 -262 262 0.007762962962962963 -262 263 4.553649124439119e-18 -262 264 1.040834085586084e-17 -262 265 -0.0009703703703703731 -262 266 0.0005000000000000002 -262 267 0.008333333333333342 -262 268 -0.00165925925925928 -262 269 -4.336808689942018e-19 -262 270 0.03333333333333334 -262 943 -0.0009703703703703649 -262 944 0.0004999999999999986 -262 945 -0.008333333333333331 -262 946 -0.0002814814814814774 -262 947 1.843143693225358e-18 -262 949 -0.0009703703703703706 -262 950 -0.0004999999999999998 -262 951 0.008333333333333326 -263 253 -0.0005000000000000013 -263 254 -0.001040740740740752 -263 255 -0.009259259259259339 -263 256 -5.312590645178972e-18 -263 257 0.0002814814814814939 -263 258 -1.474514954580286e-16 -263 259 1.734723475976807e-18 -263 260 -0.00236296296296296 -263 261 -0.03703703703703707 -263 262 4.553649124439119e-18 -263 263 0.008325925925925921 -263 264 -2.046973701652632e-16 -263 265 0.0005 -263 266 -0.001040740740740738 -263 267 -0.009259259259259184 -263 268 -3.252606517456513e-19 -263 269 0.0002814814814814635 -263 270 9.71445146547012e-17 -263 943 0.0004999999999999986 -263 944 -0.001040740740740734 -263 945 0.009259259259259266 -263 946 1.734723475976807e-18 -263 947 -0.002362962962962958 -263 948 0.03703703703703692 -263 949 -0.0004999999999999998 -263 950 -0.001040740740740737 -263 951 0.009259259259259215 -264 253 -0.01296296296296304 -264 254 -0.01342592592592609 -264 255 -0.1551783264746246 -264 256 -0.02407407407407403 -264 257 1.734723475976807e-17 -264 258 -0.1063100137174195 -264 259 9.194034422677078e-17 -264 260 -0.02870370370370344 -264 261 -0.2040466392318241 -264 262 -8.500145032286355e-17 -264 263 -7.979727989493313e-17 -264 264 1.241426611796982 -264 265 0.01296296296296297 -264 266 -0.01342592592592595 -264 267 -0.1551783264746223 -264 268 0.02407407407407413 -264 269 2.255140518769849e-17 -264 270 -0.1063100137174237 -264 943 -0.01296296296296293 -264 944 0.01342592592592585 -264 945 -0.1551783264746225 -264 946 -1.908195823574488e-17 -264 947 0.02870370370370387 -264 948 -0.2040466392318237 -264 949 0.01296296296296292 -264 950 0.0134259259259258 -264 951 -0.1551783264746219 -265 265 1 -266 266 1 -267 259 -0.01203703703703706 -267 260 -0.01342592592592588 -267 261 -0.05315500685871127 -267 262 -0.01296296296296296 -267 263 0.01342592592592582 -267 264 -0.1551783264746223 -267 265 5.377642775528102e-17 -267 266 -0.02870370370370375 -267 267 0.6207133058984909 -267 268 -5.551115123125783e-17 -267 269 0.0287037037037038 -267 270 -0.2040466392318245 -267 271 0.01203703703703702 -267 272 -0.01342592592592599 -267 273 -0.05315500685870901 -267 274 0.012962962962963 -267 275 0.013425925925926 -267 276 -0.1551783264746239 -268 259 -0.000970370370370371 -268 260 -0.0004999999999999998 -268 261 -0.008333333333333333 -268 262 -0.00165925925925928 -268 263 -3.252606517456513e-19 -268 264 -0.03333333333333334 -268 265 -0.000281481481481481 -268 266 7.589415207398531e-19 -268 267 3.469446951953614e-18 -268 268 0.007762962962962961 -268 269 4.336808689942018e-19 -268 270 -6.938893903907228e-18 -268 271 -0.0009703703703703675 -268 272 0.0004999999999999996 -268 273 0.008333333333333342 -268 274 -0.001659259259259232 -268 275 -1.192622389734055e-18 -268 276 0.03333333333333334 -268 946 -0.000970370370370373 -268 947 0.0005000000000000001 -268 948 -0.00833333333333334 -268 949 -0.000281481481481487 -268 950 7.589415207398531e-19 -268 951 -8.673617379884035e-18 -268 952 -0.0009703703703703697 -268 953 -0.0005000000000000003 -268 954 0.008333333333333326 -269 259 -0.0004999999999999998 -269 260 -0.001040740740740737 -269 261 -0.009259259259259184 -269 262 -4.336808689942018e-19 -269 263 0.0002814814814814634 -269 264 9.71445146547012e-17 -269 265 7.589415207398531e-19 -269 266 -0.002362962962962963 -269 267 -0.0370370370370371 -269 268 5.421010862427522e-19 -269 269 0.008325925925925928 -269 270 -4.163336342344337e-17 -269 271 0.0004999999999999996 -269 272 -0.001040740740740742 -269 273 -0.009259259259259323 -269 274 -1.192622389734055e-18 -269 275 0.0002814814814815043 -269 276 5.724587470723463e-17 -269 946 0.0005000000000000002 -269 947 -0.001040740740740739 -269 948 0.009259259259259215 -269 949 7.589415207398531e-19 -269 950 -0.00236296296296297 -269 951 0.03703703703703703 -269 952 -0.0005000000000000003 -269 953 -0.001040740740740747 -269 954 0.009259259259259352 -270 259 -0.01296296296296293 -270 260 -0.01342592592592594 -270 261 -0.155178326474622 -270 262 -0.02407407407407411 -270 263 -6.938893903907228e-18 -270 264 -0.1063100137174237 -270 265 -2.775557561562891e-17 -270 266 -0.02870370370370368 -270 267 -0.2040466392318245 -270 268 8.847089727481716e-17 -270 269 -2.42861286636753e-17 -270 270 1.241426611796983 -270 271 0.01296296296296298 -270 272 -0.01342592592592597 -270 273 -0.1551783264746234 -270 274 0.02407407407407402 -270 275 -1.734723475976807e-18 -270 276 -0.1063100137174178 -270 946 -0.01296296296296297 -270 947 0.01342592592592582 -270 948 -0.1551783264746222 -270 949 -4.683753385137379e-17 -270 950 0.02870370370370381 -270 951 -0.2040466392318253 -270 952 0.01296296296296299 -270 953 0.013425925925926 -270 954 -0.1551783264746238 -271 271 1 -272 272 1 -273 265 -0.01203703703703705 -273 266 -0.01342592592592599 -273 267 -0.05315500685870901 -273 268 -0.01296296296296298 -273 269 0.01342592592592594 -273 270 -0.1551783264746234 -273 271 -1.040834085586084e-17 -273 272 -0.02870370370370365 -273 273 0.6207133058984917 -273 274 6.938893903907228e-18 -273 275 0.02870370370370362 -273 276 -0.2040466392318236 -273 277 0.01203703703703706 -273 278 -0.01342592592592587 -273 279 -0.05315500685871333 -273 280 0.01296296296296297 -273 281 0.01342592592592595 -273 282 -0.1551783264746224 -274 265 -0.0009703703703703698 -274 266 -0.0005000000000000003 -274 267 -0.008333333333333342 -274 268 -0.001659259259259232 -274 269 -1.192622389734055e-18 -274 270 -0.03333333333333333 -274 271 -0.0002814814814814758 -274 272 5.421010862427522e-19 -274 274 0.007762962962962964 -274 275 2.710505431213761e-18 -274 276 -3.469446951953614e-18 -274 277 -0.0009703703703703721 -274 278 0.0004999999999999998 -274 279 0.008333333333333344 -274 280 -0.001659259259259292 -274 281 -1.301042606982605e-18 -274 282 0.03333333333333334 -274 949 -0.0009703703703703668 -274 950 0.0004999999999999996 -274 951 -0.008333333333333323 -274 952 -0.0002814814814814814 -274 953 7.589415207398531e-19 -274 954 -1.734723475976807e-18 -274 955 -0.0009703703703703737 -274 956 -0.0005000000000000004 -274 957 0.008333333333333325 -275 265 -0.0005000000000000002 -275 266 -0.001040740740740746 -275 267 -0.009259259259259342 -275 268 -1.301042606982605e-18 -275 269 0.0002814814814815042 -275 270 -1.387778780781446e-17 -275 271 8.673617379884035e-19 -275 272 -0.002362962962962955 -275 273 -0.03703703703703699 -275 274 2.710505431213761e-18 -275 275 0.008325925925925922 -275 276 6.591949208711867e-17 -275 277 0.0004999999999999997 -275 278 -0.001040740740740733 -275 279 -0.009259259259259175 -275 280 -1.301042606982605e-18 -275 281 0.0002814814814814537 -275 282 -1.561251128379126e-17 -275 949 0.0004999999999999996 -275 950 -0.001040740740740742 -275 951 0.009259259259259333 -275 952 6.505213034913027e-19 -275 953 -0.002362962962962963 -275 954 0.037037037037037 -275 955 -0.0005000000000000003 -275 956 -0.001040740740740739 -275 957 0.009259259259259149 -276 265 -0.012962962962963 -276 266 -0.01342592592592604 -276 267 -0.1551783264746239 -276 268 -0.02407407407407405 -276 269 1.561251128379126e-17 -276 270 -0.1063100137174177 -276 271 6.245004513516506e-17 -276 272 -0.02870370370370367 -276 273 -0.2040466392318236 -276 274 -6.591949208711867e-17 -276 275 -4.163336342344337e-17 -276 276 1.241426611796982 -276 277 0.01296296296296294 -276 278 -0.01342592592592578 -276 279 -0.1551783264746219 -276 280 0.0240740740740741 -276 281 -6.938893903907228e-18 -276 282 -0.1063100137174254 -276 949 -0.01296296296296295 -276 950 0.01342592592592593 -276 951 -0.1551783264746232 -276 952 1.734723475976807e-17 -276 953 0.02870370370370364 -276 954 -0.2040466392318243 -276 955 0.01296296296296295 -276 956 0.01342592592592594 -276 957 -0.1551783264746221 -277 277 1 -278 278 1 -279 271 -0.01203703703703709 -279 272 -0.01342592592592587 -279 273 -0.05315500685871333 -279 274 -0.01296296296296294 -279 275 0.01342592592592589 -279 276 -0.1551783264746219 -279 277 7.979727989493313e-17 -279 278 -0.02870370370370363 -279 279 0.6207133058984913 -279 280 -6.418476861114186e-17 -279 281 0.02870370370370359 -279 282 -0.2040466392318231 -279 283 0.01203703703703698 -279 284 -0.01342592592592601 -279 285 -0.05315500685870875 -279 286 0.01296296296296303 -279 287 0.01342592592592603 -279 288 -0.1551783264746243 -280 271 -0.0009703703703703743 -280 272 -0.0005000000000000003 -280 273 -0.008333333333333342 -280 274 -0.001659259259259292 -280 275 -1.301042606982605e-18 -280 276 -0.03333333333333333 -280 277 -0.0002814814814814729 -280 278 2.168404344971009e-19 -280 279 -1.734723475976807e-17 -280 280 0.007762962962962966 -280 281 5.529431079676073e-18 -280 282 -1.040834085586084e-17 -280 283 -0.0009703703703703645 -280 284 0.0004999999999999989 -280 285 0.008333333333333323 -280 286 -0.001659259259259238 -280 287 -1.734723475976807e-18 -280 288 0.03333333333333333 -280 952 -0.0009703703703703718 -280 953 0.0004999999999999997 -280 954 -0.008333333333333325 -280 955 -0.0002814814814814797 -280 956 2.168404344971009e-19 -280 957 1.040834085586084e-17 -280 958 -0.000970370370370373 -280 959 -0.000500000000000001 -280 960 0.008333333333333342 -281 271 -0.0005000000000000004 -281 272 -0.001040740740740738 -281 273 -0.009259259259259193 -281 274 -1.301042606982605e-18 -281 275 0.0002814814814814538 -281 276 -9.020562075079397e-17 -281 277 1.084202172485504e-19 -281 278 -0.002362962962962952 -281 279 -0.03703703703703698 -281 280 5.529431079676073e-18 -281 281 0.008325925925925919 -281 282 1.318389841742373e-16 -281 283 0.0004999999999999989 -281 284 -0.001040740740740738 -281 285 -0.009259259259259302 -281 286 -1.951563910473908e-18 -281 287 0.0002814814814814992 -281 288 1.370431546021678e-16 -281 952 0.0004999999999999996 -281 953 -0.001040740740740735 -281 954 0.009259259259259134 -281 955 3.252606517456513e-19 -281 956 -0.002362962962962961 -281 957 0.03703703703703694 -281 958 -0.000500000000000001 -281 959 -0.001040740740740749 -281 960 0.009259259259259337 -282 271 -0.01296296296296297 -282 272 -0.01342592592592584 -282 273 -0.1551783264746224 -282 274 -0.02407407407407412 -282 275 1.734723475976807e-18 -282 276 -0.1063100137174254 -282 277 1.561251128379126e-17 -282 278 -0.02870370370370363 -282 279 -0.2040466392318231 -282 280 8.847089727481716e-17 -282 281 -5.030698080332741e-17 -282 282 1.241426611796982 -282 283 0.01296296296296292 -282 284 -0.01342592592592594 -282 285 -0.1551783264746228 -282 286 0.02407407407407403 -282 287 -3.469446951953614e-17 -282 288 -0.1063100137174186 -282 952 -0.01296296296296292 -282 953 0.01342592592592588 -282 954 -0.1551783264746216 -282 955 -8.847089727481716e-17 -282 956 0.02870370370370359 -282 957 -0.2040466392318239 -282 958 0.01296296296296305 -282 959 0.01342592592592602 -282 960 -0.1551783264746243 -283 283 1 -284 284 1 -285 277 -0.01203703703703705 -285 278 -0.01342592592592596 -285 279 -0.05315500685870875 -285 280 -0.01296296296296293 -285 281 0.01342592592592587 -285 282 -0.1551783264746227 -285 283 -1.040834085586084e-17 -285 284 -0.02870370370370386 -285 285 0.6207133058984897 -285 286 2.602085213965211e-17 -285 287 0.02870370370370395 -285 288 -0.2040466392318259 -285 289 0.01203703703703703 -285 290 -0.0134259259259259 -285 291 -0.0531550068587104 -285 292 0.01296296296296293 -285 293 0.0134259259259259 -285 294 -0.155178326474622 -286 277 -0.0009703703703703734 -286 278 -0.0005000000000000011 -286 279 -0.008333333333333344 -286 280 -0.001659259259259239 -286 281 -1.951563910473908e-18 -286 282 -0.03333333333333333 -286 283 -0.0002814814814814904 -286 284 -2.168404344971009e-19 -286 285 -1.561251128379126e-17 -286 286 0.007762962962962958 -286 287 4.87890977618477e-18 -286 289 -0.0009703703703703705 -286 290 0.0005 -286 291 0.008333333333333323 -286 292 -0.001659259259259266 -286 293 2.168404344971009e-19 -286 294 0.03333333333333332 -286 955 -0.0009703703703703644 -286 956 0.0004999999999999989 -286 957 -0.008333333333333323 -286 958 -0.0002814814814814834 -286 959 -3.252606517456513e-19 -286 960 2.42861286636753e-17 -286 961 -0.0009703703703703726 -286 962 -0.0005000000000000003 -286 963 0.008333333333333345 -287 277 -0.000500000000000001 -287 278 -0.001040740740740749 -287 279 -0.009259259259259339 -287 280 -1.843143693225358e-18 -287 281 0.0002814814814814992 -287 282 -1.040834085586084e-17 -287 283 -1.084202172485504e-19 -287 284 -0.002362962962962975 -287 285 -0.03703703703703717 -287 286 4.87890977618477e-18 -287 287 0.008325925925925935 -287 288 -4.85722573273506e-17 -287 289 0.0004999999999999999 -287 290 -0.00104074074074074 -287 291 -0.009259259259259243 -287 292 4.336808689942018e-19 -287 293 0.0002814814814814762 -287 294 1.214306433183765e-17 -287 955 0.0004999999999999989 -287 956 -0.001040740740740738 -287 957 0.0092592592592593 -287 958 -7.589415207398531e-19 -287 959 -0.002362962962962966 -287 960 0.03703703703703705 -287 961 -0.0005000000000000003 -287 962 -0.00104074074074074 -287 963 0.009259259259259231 -288 277 -0.01296296296296305 -288 278 -0.01342592592592608 -288 279 -0.1551783264746243 -288 280 -0.02407407407407403 -288 281 2.255140518769849e-17 -288 282 -0.1063100137174186 -288 283 7.979727989493313e-17 -288 284 -0.02870370370370364 -288 285 -0.2040466392318259 -288 286 -7.112366251504909e-17 -288 287 -1.162264728904461e-16 -288 288 1.241426611796982 -288 289 0.01296296296296293 -288 290 -0.01342592592592589 -288 291 -0.155178326474622 -288 292 0.02407407407407409 -288 293 -2.602085213965211e-17 -288 294 -0.1063100137174216 -288 955 -0.01296296296296292 -288 956 0.01342592592592588 -288 957 -0.1551783264746228 -288 958 8.673617379884035e-18 -288 959 0.02870370370370393 -288 960 -0.2040466392318249 -288 961 0.01296296296296296 -288 962 0.01342592592592592 -288 963 -0.1551783264746223 -289 289 1 -290 290 1 -291 283 -0.01203703703703703 -291 284 -0.0134259259259259 -291 285 -0.0531550068587104 -291 286 -0.01296296296296293 -291 287 0.0134259259259259 -291 288 -0.155178326474622 -291 289 -5.204170427930421e-18 -291 290 -0.02870370370370348 -291 291 0.6207133058984875 -291 292 1.734723475976807e-18 -291 293 0.02870370370370349 -291 294 -0.204046639231821 -291 295 0.01203703703703706 -291 296 -0.01342592592592585 -291 297 -0.05315500685871254 -291 298 0.01296296296296292 -291 299 0.01342592592592584 -291 300 -0.1551783264746217 -292 283 -0.0009703703703703705 -292 284 -0.0005 -292 285 -0.008333333333333325 -292 286 -0.001659259259259266 -292 287 3.252606517456513e-19 -292 288 -0.03333333333333332 -292 289 -0.0002814814814814676 -292 290 2.168404344971009e-19 -292 291 8.673617379884035e-18 -292 292 0.007762962962962973 -292 293 -2.168404344971009e-18 -292 295 -0.0009703703703703749 -292 296 0.0005000000000000006 -292 297 0.008333333333333333 -292 298 -0.00165925925925929 -292 299 6.505213034913027e-19 -292 300 0.03333333333333332 -292 958 -0.0009703703703703701 -292 959 0.0004999999999999999 -292 960 -0.008333333333333333 -292 961 -0.0002814814814814642 -292 962 -1.084202172485504e-19 -292 963 -8.673617379884035e-18 -292 964 -0.0009703703703703696 -292 965 -0.0004999999999999994 -292 966 0.008333333333333323 -293 283 -0.0005 -293 284 -0.00104074074074074 -293 285 -0.009259259259259243 -293 286 2.168404344971009e-19 -293 287 0.0002814814814814762 -293 288 1.214306433183765e-17 -293 289 2.168404344971009e-19 -293 290 -0.002362962962962944 -293 291 -0.03703703703703683 -293 292 -2.38524477946811e-18 -293 293 0.008325925925925907 -293 294 2.775557561562891e-17 -293 295 0.0005000000000000007 -293 296 -0.001040740740740739 -293 297 -0.009259259259259182 -293 298 6.505213034913027e-19 -293 299 0.0002814814814814547 -293 300 -4.683753385137379e-17 -293 958 0.0004999999999999998 -293 959 -0.001040740740740739 -293 960 0.009259259259259231 -293 961 2.168404344971009e-19 -293 962 -0.00236296296296294 -293 963 0.03703703703703677 -293 964 -0.0004999999999999991 -293 965 -0.001040740740740733 -293 966 0.009259259259259144 -294 283 -0.01296296296296293 -294 284 -0.01342592592592589 -294 285 -0.155178326474622 -294 286 -0.0240740740740741 -294 287 -3.469446951953614e-18 -294 288 -0.1063100137174215 -294 289 -2.255140518769849e-17 -294 290 -0.0287037037037034 -294 291 -0.204046639231821 -294 292 1.214306433183765e-17 -294 293 -7.632783294297951e-17 -294 294 1.241426611796976 -294 295 0.01296296296296298 -294 296 -0.01342592592592588 -294 297 -0.1551783264746225 -294 298 0.02407407407407409 -294 299 1.908195823574488e-17 -294 300 -0.1063100137174253 -294 958 -0.01296296296296294 -294 959 0.01342592592592589 -294 960 -0.155178326474622 -294 961 1.387778780781446e-17 -294 962 0.0287037037037035 -294 963 -0.2040466392318206 -294 964 0.0129629629629629 -294 965 0.01342592592592584 -294 966 -0.1551783264746216 -295 295 1 -296 296 1 -297 289 -0.01203703703703701 -297 290 -0.01342592592592587 -297 291 -0.05315500685871254 -297 292 -0.01296296296296297 -297 293 0.01342592592592592 -297 294 -0.1551783264746225 -297 295 1.040834085586084e-17 -297 296 -0.02870370370370361 -297 297 0.6207133058984897 -297 298 -6.418476861114186e-17 -297 299 0.0287037037037035 -297 300 -0.204046639231822 -297 301 0.01203703703703703 -297 302 -0.01342592592592592 -297 303 -0.0531550068587095 -297 304 0.01296296296296301 -297 305 0.01342592592592598 -297 306 -0.1551783264746233 -298 289 -0.0009703703703703701 -298 290 -0.0004999999999999994 -298 291 -0.008333333333333321 -298 292 -0.00165925925925929 -298 293 6.505213034913027e-19 -298 294 -0.03333333333333331 -298 295 -0.0002814814814814697 -298 296 1.192622389734055e-18 -298 297 1.561251128379126e-17 -298 298 0.007762962962962977 -298 299 -3.035766082959412e-18 -298 300 -3.469446951953614e-18 -298 301 -0.0009703703703703692 -298 302 0.0004999999999999995 -298 303 0.008333333333333344 -298 304 -0.001659259259259263 -298 305 -5.421010862427522e-19 -298 306 0.03333333333333334 -298 961 -0.000970370370370376 -298 962 0.0005000000000000008 -298 963 -0.008333333333333342 -298 964 -0.0002814814814814711 -298 965 1.084202172485504e-19 -298 966 -2.42861286636753e-17 -298 967 -0.0009703703703703665 -298 968 -0.0004999999999999991 -298 969 0.008333333333333325 -299 289 -0.0004999999999999995 -299 290 -0.001040740740740734 -299 291 -0.009259259259259165 -299 292 7.589415207398531e-19 -299 293 0.0002814814814814548 -299 294 2.42861286636753e-17 -299 295 1.084202172485504e-18 -299 296 -0.002362962962962947 -299 297 -0.03703703703703691 -299 298 -3.035766082959412e-18 -299 299 0.008325925925925912 -299 300 1.35308431126191e-16 -299 301 0.0004999999999999996 -299 302 -0.001040740740740737 -299 303 -0.009259259259259273 -299 304 -3.252606517456513e-19 -299 305 0.000281481481481478 -299 306 2.602085213965211e-17 -299 961 0.0005000000000000007 -299 962 -0.00104074074074074 -299 963 0.009259259259259163 -299 965 -0.00236296296296295 -299 966 0.03703703703703691 -299 967 -0.0004999999999999991 -299 968 -0.001040740740740737 -299 969 0.009259259259259264 -300 289 -0.01296296296296291 -300 290 -0.0134259259259258 -300 291 -0.1551783264746217 -300 292 -0.02407407407407408 -300 293 -3.816391647148976e-17 -300 294 -0.1063100137174253 -300 295 6.938893903907228e-18 -300 296 -0.02870370370370352 -300 297 -0.204046639231822 -300 298 1.214306433183765e-17 -300 299 -7.632783294297951e-17 -300 300 1.24142661179698 -300 301 0.01296296296296294 -300 302 -0.01342592592592589 -300 303 -0.1551783264746225 -300 304 0.02407407407407409 -300 305 3.469446951953614e-18 -300 306 -0.1063100137174217 -300 961 -0.01296296296296299 -300 962 0.01342592592592593 -300 963 -0.1551783264746226 -300 964 5.204170427930421e-17 -300 965 0.02870370370370351 -300 966 -0.2040466392318221 -300 967 0.01296296296296289 -300 968 0.01342592592592589 -300 969 -0.155178326474622 -301 301 1 -302 302 1 -303 295 -0.01203703703703709 -303 296 -0.01342592592592593 -303 297 -0.05315500685870949 -303 298 -0.01296296296296297 -303 299 0.01342592592592588 -303 300 -0.1551783264746225 -303 301 1.405126015541214e-16 -303 302 -0.02870370370370381 -303 303 0.6207133058984924 -303 304 -5.724587470723463e-17 -303 305 0.02870370370370371 -303 306 -0.2040466392318251 -303 307 0.01203703703703695 -303 308 -0.01342592592592599 -303 309 -0.05315500685871088 -303 310 0.01296296296296303 -303 311 0.01342592592592614 -303 312 -0.1551783264746244 -304 295 -0.0009703703703703717 -304 296 -0.0005000000000000006 -304 297 -0.008333333333333333 -304 298 -0.001659259259259263 -304 299 -3.252606517456513e-19 -304 300 -0.03333333333333333 -304 301 -0.0002814814814814836 -304 302 2.49366499671666e-18 -304 303 -3.469446951953614e-18 -304 304 0.007762962962962945 -304 305 -4.011548038196366e-18 -304 306 -1.040834085586084e-17 -304 307 -0.0009703703703703634 -304 308 0.0004999999999999982 -304 309 0.008333333333333335 -304 310 -0.001659259259259233 -304 311 5.204170427930421e-18 -304 312 0.03333333333333333 -304 964 -0.0009703703703703731 -304 965 0.0005000000000000009 -304 966 -0.008333333333333333 -304 967 -0.0002814814814815022 -304 968 -5.095750210681871e-18 -304 969 1.040834085586084e-17 -304 970 -0.0009703703703703565 -304 971 -0.0004999999999999964 -304 972 0.008333333333333335 -305 295 -0.0005000000000000004 -305 296 -0.001040740740740745 -305 297 -0.009259259259259309 -305 298 -5.421010862427522e-19 -305 299 0.0002814814814814782 -305 300 2.602085213965211e-17 -305 301 2.276824562219559e-18 -305 302 -0.002362962962962966 -305 303 -0.03703703703703712 -305 304 -4.228388472693467e-18 -305 305 0.008325925925925912 -305 306 2.081668171172169e-17 -305 307 0.0004999999999999981 -305 308 -0.00104074074074073 -305 309 -0.009259259259259241 -305 310 5.312590645178972e-18 -305 311 0.0002814814814815089 -305 312 -6.765421556309548e-17 -305 964 0.000500000000000001 -305 965 -0.001040740740740747 -305 966 0.009259259259259302 -305 967 -4.98732999343332e-18 -305 968 -0.00236296296296299 -305 969 0.03703703703703722 -305 970 -0.0004999999999999964 -305 971 -0.00104074074074072 -305 972 0.009259259259259278 -306 295 -0.01296296296296296 -306 296 -0.013425925925926 -306 297 -0.1551783264746233 -306 298 -0.02407407407407398 -306 299 -1.908195823574488e-17 -306 300 -0.1063100137174217 -306 301 5.898059818321144e-17 -306 302 -0.02870370370370387 -306 303 -0.2040466392318251 -306 304 -3.191891195797325e-16 -306 305 -1.422473250300982e-16 -306 306 1.241426611796981 -306 307 0.0129629629629629 -306 308 -0.01342592592592576 -306 309 -0.1551783264746216 -306 310 0.02407407407407428 -306 311 -6.418476861114186e-17 -306 312 -0.1063100137174172 -306 964 -0.01296296296296299 -306 965 0.01342592592592602 -306 966 -0.1551783264746233 -306 967 1.665334536937735e-16 -306 968 0.02870370370370425 -306 969 -0.2040466392318283 -306 970 0.01296296296296283 -306 971 0.01342592592592558 -306 972 -0.1551783264746205 -307 307 1 -308 308 1 -309 301 -0.0120370370370371 -309 302 -0.01342592592592595 -309 303 -0.05315500685871087 -309 304 -0.01296296296296287 -309 305 0.01342592592592582 -309 306 -0.1551783264746216 -309 307 5.724587470723463e-17 -309 308 -0.02870370370370373 -309 309 0.6207133058984928 -309 310 -8.326672684688674e-17 -309 311 0.02870370370370387 -309 312 -0.2040466392318263 -309 313 0.01203703703703703 -309 314 -0.01342592592592595 -309 315 -0.05315500685871064 -309 316 0.01296296296296297 -309 317 0.01342592592592594 -309 318 -0.1551783264746233 -310 301 -0.0009703703703703766 -310 302 -0.000500000000000002 -310 303 -0.008333333333333342 -310 304 -0.001659259259259233 -310 305 5.312590645178972e-18 -310 306 -0.03333333333333332 -310 307 -0.0002814814814814883 -310 308 9.75781955236954e-19 -310 309 -8.673617379884035e-18 -310 310 0.007762962962962959 -310 311 -8.456776945386935e-18 -310 312 -3.469446951953614e-18 -310 313 -0.000970370370370371 -310 314 0.0005000000000000004 -310 315 0.008333333333333335 -310 316 -0.001659259259259253 -310 317 4.336808689942018e-18 -310 318 0.03333333333333331 -310 967 -0.0009703703703703788 -310 968 0.0005000000000000037 -310 969 -0.008333333333333314 -310 970 -0.0002814814814814955 -310 971 -6.396792817664476e-18 -310 972 3.469446951953614e-18 -310 973 -0.0009703703703703629 -310 974 -0.0004999999999999978 -310 975 0.008333333333333321 -311 301 -0.0005000000000000019 -311 302 -0.001040740740740753 -311 303 -0.009259259259259335 -311 304 5.312590645178972e-18 -311 305 0.0002814814814815091 -311 306 1.925543058334256e-16 -311 307 9.75781955236954e-19 -311 308 -0.002362962962962972 -311 309 -0.03703703703703713 -311 310 -8.565197162635485e-18 -311 311 0.00832592592592595 -311 312 -2.081668171172169e-17 -311 313 0.0005000000000000003 -311 314 -0.001040740740740744 -311 315 -0.009259259259259288 -311 316 4.553649124439119e-18 -311 317 0.0002814814814814884 -311 318 -1.700029006457271e-16 -311 967 0.0005000000000000035 -311 968 -0.001040740740740772 -311 969 0.009259259259259502 -311 970 -6.396792817664476e-18 -311 971 -0.002362962962962982 -311 972 0.03703703703703722 -311 973 -0.0004999999999999978 -311 974 -0.001040740740740726 -311 975 0.009259259259259186 -312 301 -0.01296296296296308 -312 302 -0.01342592592592606 -312 303 -0.1551783264746244 -312 304 -0.02407407407407383 -312 305 -5.030698080332741e-17 -312 306 -0.1063100137174172 -312 307 6.418476861114186e-17 -312 308 -0.02870370370370371 -312 309 -0.2040466392318263 -312 310 -2.983724378680108e-16 -312 311 -5.030698080332741e-17 -312 312 1.241426611796986 -312 313 0.012962962962963 -312 314 -0.01342592592592598 -312 315 -0.1551783264746238 -312 316 0.02407407407407413 -312 317 9.540979117872439e-17 -312 318 -0.1063100137174203 -312 967 -0.01296296296296311 -312 968 0.01342592592592626 -312 969 -0.1551783264746262 -312 970 2.42861286636753e-16 -312 971 0.0287037037037038 -312 972 -0.2040466392318271 -312 973 0.01296296296296288 -312 974 0.0134259259259257 -312 975 -0.155178326474621 -313 313 1 -314 314 1 -315 307 -0.012037037037037 -315 308 -0.01342592592592596 -315 309 -0.05315500685871064 -315 310 -0.012962962962963 -315 311 0.013425925925926 -315 312 -0.1551783264746238 -315 313 -2.949029909160572e-17 -315 314 -0.02870370370370368 -315 315 0.6207133058984922 -315 316 3.816391647148976e-17 -315 317 0.02870370370370363 -315 318 -0.2040466392318246 -315 319 0.01203703703703703 -315 320 -0.01342592592592591 -315 321 -0.05315500685871064 -315 322 0.01296296296296296 -315 323 0.01342592592592592 -315 324 -0.1551783264746225 -316 307 -0.0009703703703703688 -316 308 -0.0004999999999999998 -316 309 -0.008333333333333331 -316 310 -0.001659259259259253 -316 311 4.553649124439119e-18 -316 312 -0.03333333333333331 -316 313 -0.0002814814814814814 -316 314 1.084202172485504e-19 -316 315 -1.734723475976807e-18 -316 316 0.007762962962962965 -316 317 -3.903127820947816e-18 -316 319 -0.0009703703703703699 -316 320 0.0004999999999999997 -316 321 0.008333333333333335 -316 322 -0.001659259259259267 -316 323 -1.301042606982605e-18 -316 324 0.03333333333333334 -316 970 -0.0009703703703703788 -316 971 0.0005000000000000022 -316 972 -0.008333333333333331 -316 973 -0.000281481481481475 -316 974 -1.192622389734055e-18 -316 975 -1.214306433183765e-17 -316 976 -0.0009703703703703721 -316 977 -0.0005000000000000003 -316 978 0.008333333333333333 -317 307 -0.0004999999999999996 -317 308 -0.00104074074074074 -317 309 -0.009259259259259269 -317 310 4.336808689942018e-18 -317 311 0.0002814814814814885 -317 312 8.847089727481716e-17 -317 314 -0.002362962962962963 -317 315 -0.03703703703703701 -317 316 -3.903127820947816e-18 -317 317 0.008325925925925928 -317 318 5.204170427930421e-17 -317 319 0.0004999999999999997 -317 320 -0.001040740740740737 -317 321 -0.009259259259259228 -317 322 -1.409462824231156e-18 -317 323 0.0002814814814814751 -317 324 6.938893903907228e-17 -317 970 0.0005000000000000023 -317 971 -0.001040740740740754 -317 972 0.009259259259259297 -317 973 -1.192622389734055e-18 -317 974 -0.002362962962962955 -317 975 0.03703703703703697 -317 976 -0.0005000000000000004 -317 977 -0.001040740740740742 -317 978 0.009259259259259245 -318 307 -0.01296296296296297 -318 308 -0.01342592592592592 -318 309 -0.1551783264746233 -318 310 -0.02407407407407398 -318 311 4.683753385137379e-17 -318 312 -0.1063100137174204 -318 313 3.816391647148976e-17 -318 314 -0.02870370370370377 -318 315 -0.2040466392318246 -318 316 -1.006139616066548e-16 -318 317 7.632783294297951e-17 -318 318 1.241426611796982 -318 319 0.01296296296296293 -318 320 -0.01342592592592588 -318 321 -0.155178326474622 -318 322 0.02407407407407409 -318 323 -6.938893903907228e-18 -318 324 -0.1063100137174219 -318 970 -0.01296296296296307 -318 971 0.01342592592592608 -318 972 -0.1551783264746244 -318 973 9.540979117872439e-17 -318 974 0.02870370370370346 -318 975 -0.2040466392318229 -318 976 0.01296296296296296 -318 977 0.01342592592592592 -318 978 -0.1551783264746224 -319 319 1 -320 320 1 -321 313 -0.01203703703703707 -321 314 -0.0134259259259259 -321 315 -0.05315500685871065 -321 316 -0.01296296296296294 -321 317 0.01342592592592586 -321 318 -0.155178326474622 -321 319 2.081668171172169e-17 -321 320 -0.02870370370370369 -321 321 0.6207133058984902 -321 322 -4.85722573273506e-17 -321 323 0.0287037037037037 -321 324 -0.204046639231824 -321 325 0.01203703703703705 -321 326 -0.01342592592592591 -321 327 -0.0531550068587106 -321 328 0.01296296296296299 -321 329 0.01342592592592594 -321 330 -0.1551783264746229 -322 313 -0.0009703703703703721 -322 314 -0.0005000000000000004 -322 315 -0.008333333333333333 -322 316 -0.001659259259259267 -322 317 -1.409462824231156e-18 -322 318 -0.03333333333333333 -322 319 -0.0002814814814814804 -322 320 4.336808689942018e-19 -322 321 -3.469446951953614e-18 -322 322 0.007762962962962961 -322 323 1.409462824231156e-18 -322 324 3.469446951953614e-18 -322 325 -0.0009703703703703699 -322 326 0.0005 -322 327 0.008333333333333335 -322 328 -0.001659259259259257 -322 329 -2.168404344971009e-19 -322 330 0.03333333333333333 -322 973 -0.0009703703703703699 -322 974 0.0004999999999999997 -322 975 -0.008333333333333331 -322 976 -0.0002814814814814737 -322 977 5.421010862427522e-19 -322 978 6.938893903907228e-18 -322 979 -0.0009703703703703711 -322 980 -0.0005 -322 981 0.008333333333333337 -323 313 -0.0005000000000000003 -323 314 -0.001040740740740742 -323 315 -0.009259259259259247 -323 316 -1.301042606982605e-18 -323 317 0.0002814814814814751 -323 318 -5.204170427930421e-18 -323 319 2.168404344971009e-19 -323 320 -0.002362962962962962 -323 321 -0.03703703703703701 -323 322 1.517883041479706e-18 -323 323 0.008325925925925919 -323 324 -1.387778780781446e-16 -323 325 0.0004999999999999999 -323 326 -0.001040740740740742 -323 327 -0.009259259259259259 -323 328 1.084202172485504e-19 -323 329 0.000281481481481482 -323 330 -4.683753385137379e-17 -323 973 0.0004999999999999997 -323 974 -0.001040740740740737 -323 975 0.009259259259259228 -323 976 4.336808689942018e-19 -323 977 -0.002362962962962953 -323 978 0.03703703703703691 -323 979 -0.0005 -323 980 -0.001040740740740739 -323 981 0.009259259259259231 -324 313 -0.01296296296296296 -324 314 -0.01342592592592595 -324 315 -0.1551783264746225 -324 316 -0.02407407407407411 -324 318 -0.1063100137174219 -324 319 1.214306433183765e-17 -324 320 -0.02870370370370368 -324 321 -0.204046639231824 -324 322 3.642919299551295e-17 -324 323 4.510281037539698e-17 -324 324 1.241426611796978 -324 325 0.01296296296296295 -324 326 -0.01342592592592593 -324 327 -0.1551783264746229 -324 328 0.02407407407407409 -324 329 6.765421556309548e-17 -324 330 -0.1063100137174208 -324 973 -0.01296296296296293 -324 974 0.01342592592592586 -324 975 -0.1551783264746219 -324 976 -2.081668171172169e-17 -324 977 0.02870370370370369 -324 978 -0.2040466392318223 -324 979 0.01296296296296294 -324 980 0.0134259259259259 -324 981 -0.1551783264746222 -325 325 1 -326 326 1 -327 319 -0.01203703703703705 -327 320 -0.01342592592592591 -327 321 -0.05315500685871061 -327 322 -0.01296296296296299 -327 323 0.01342592592592594 -327 324 -0.1551783264746229 -327 325 2.602085213965211e-17 -327 326 -0.02870370370370369 -327 327 0.6207133058984916 -327 328 5.030698080332741e-17 -327 329 0.0287037037037037 -327 330 -0.2040466392318246 -327 331 0.01203703703703703 -327 332 -0.01342592592592595 -327 333 -0.05315500685871086 -327 334 0.01296296296296293 -327 335 0.01342592592592591 -327 336 -0.1551783264746226 -328 319 -0.0009703703703703699 -328 320 -0.0005 -328 321 -0.008333333333333331 -328 322 -0.001659259259259257 -328 323 1.084202172485504e-19 -328 324 -0.03333333333333335 -328 325 -0.0002814814814814814 -328 326 -4.336808689942018e-19 -328 327 -1.734723475976807e-18 -328 328 0.007762962962962963 -328 329 -1.084202172485504e-18 -328 330 -3.469446951953614e-18 -328 331 -0.000970370370370372 -328 332 0.0005000000000000004 -328 333 0.008333333333333335 -328 334 -0.001659259259259264 -328 335 1.517883041479706e-18 -328 336 0.03333333333333333 -328 976 -0.0009703703703703717 -328 977 0.0005000000000000002 -328 978 -0.00833333333333334 -328 979 -0.0002814814814814758 -328 980 -1.084202172485504e-18 -328 981 8.673617379884035e-18 -328 982 -0.000970370370370371 -328 983 -0.0004999999999999999 -328 984 0.008333333333333337 -329 319 -0.0004999999999999999 -329 320 -0.001040740740740741 -329 321 -0.009259259259259259 -329 322 -3.252606517456513e-19 -329 323 0.000281481481481482 -329 324 -4.683753385137379e-17 -329 325 -2.168404344971009e-19 -329 326 -0.002362962962962963 -329 327 -0.03703703703703703 -329 328 -9.75781955236954e-19 -329 329 0.008325925925925922 -329 330 -6.591949208711867e-17 -329 331 0.0005000000000000004 -329 332 -0.001040740740740742 -329 333 -0.009259259259259273 -329 334 1.517883041479706e-18 -329 335 0.0002814814814814779 -329 336 -3.642919299551295e-17 -329 976 0.0005000000000000002 -329 977 -0.00104074074074074 -329 978 0.009259259259259231 -329 979 -6.505213034913027e-19 -329 980 -0.002362962962962956 -329 981 0.03703703703703692 -329 982 -0.0004999999999999999 -329 983 -0.001040740740740739 -329 984 0.009259259259259219 -330 319 -0.01296296296296295 -330 320 -0.01342592592592593 -330 321 -0.1551783264746229 -330 322 -0.02407407407407407 -330 323 6.071532165918825e-17 -330 324 -0.1063100137174208 -330 325 -5.030698080332741e-17 -330 326 -0.02870370370370369 -330 327 -0.2040466392318246 -330 328 8.673617379884035e-18 -330 329 5.724587470723463e-17 -330 330 1.241426611796982 -330 331 0.012962962962963 -330 332 -0.01342592592592594 -330 333 -0.1551783264746232 -330 334 0.02407407407407404 -330 335 -6.071532165918825e-17 -330 336 -0.106310013717422 -330 976 -0.01296296296296296 -330 977 0.01342592592592591 -330 978 -0.1551783264746222 -330 979 -1.387778780781446e-17 -330 980 0.02870370370370366 -330 981 -0.2040466392318235 -330 982 0.01296296296296299 -330 983 0.01342592592592594 -330 984 -0.1551783264746233 -331 331 1 -332 332 1 -333 325 -0.012037037037037 -333 326 -0.01342592592592595 -333 327 -0.05315500685871086 -333 328 -0.01296296296296296 -333 329 0.01342592592592596 -333 330 -0.1551783264746231 -333 331 -2.949029909160572e-17 -333 332 -0.02870370370370364 -333 333 0.6207133058984904 -333 335 0.02870370370370361 -333 336 -0.2040466392318232 -333 337 0.01203703703703703 -333 338 -0.01342592592592591 -333 339 -0.05315500685871064 -333 340 0.01296296296296296 -333 341 0.01342592592592592 -333 342 -0.1551783264746225 -334 325 -0.0009703703703703698 -334 326 -0.0004999999999999998 -334 327 -0.008333333333333333 -334 328 -0.001659259259259264 -334 329 1.626303258728257e-18 -334 330 -0.03333333333333332 -334 331 -0.0002814814814814761 -334 332 1.084202172485504e-19 -334 333 -1.734723475976807e-18 -334 334 0.007762962962962965 -334 336 -1.387778780781446e-17 -334 337 -0.0009703703703703699 -334 338 0.0004999999999999997 -334 339 0.008333333333333335 -334 340 -0.001659259259259266 -334 341 -1.517883041479706e-18 -334 342 0.03333333333333333 -334 979 -0.0009703703703703702 -334 980 0.0005000000000000001 -334 981 -0.008333333333333323 -334 982 -0.000281481481481479 -334 983 -1.084202172485504e-19 -334 984 -3.469446951953614e-18 -334 985 -0.0009703703703703706 -334 986 -0.0005000000000000001 -334 987 0.008333333333333321 -335 325 -0.0004999999999999997 -335 326 -0.001040740740740738 -335 327 -0.009259259259259254 -335 328 1.517883041479706e-18 -335 329 0.0002814814814814779 -335 330 3.642919299551295e-17 -335 331 -1.084202172485504e-19 -335 332 -0.002362962962962956 -335 333 -0.03703703703703698 -335 334 2.168404344971009e-19 -335 335 0.008325925925925921 -335 336 1.387778780781446e-16 -335 337 0.0004999999999999997 -335 338 -0.001040740740740737 -335 339 -0.009259259259259228 -335 340 -1.626303258728257e-18 -335 341 0.000281481481481476 -335 342 6.938893903907228e-17 -335 979 0.0005000000000000001 -335 980 -0.001040740740740742 -335 981 0.00925925925925924 -335 982 -1.084202172485504e-19 -335 983 -0.002362962962962959 -335 984 0.03703703703703694 -335 985 -0.0005000000000000001 -335 986 -0.001040740740740742 -335 987 0.009259259259259245 -336 325 -0.01296296296296297 -336 326 -0.01342592592592588 -336 327 -0.1551783264746227 -336 328 -0.02407407407407408 -336 329 -3.816391647148976e-17 -336 330 -0.106310013717422 -336 331 3.816391647148976e-17 -336 332 -0.02870370370370363 -336 333 -0.2040466392318233 -336 334 -2.081668171172169e-17 -336 335 -5.724587470723463e-17 -336 336 1.241426611796981 -336 337 0.01296296296296293 -336 338 -0.01342592592592588 -336 339 -0.155178326474622 -336 340 0.02407407407407409 -336 341 6.938893903907228e-18 -336 342 -0.1063100137174217 -336 979 -0.01296296296296297 -336 980 0.01342592592592597 -336 981 -0.1551783264746235 -336 982 4.336808689942018e-17 -336 983 0.02870370370370361 -336 984 -0.204046639231824 -336 985 0.01296296296296295 -336 986 0.0134259259259259 -336 987 -0.1551783264746222 -337 337 1 -338 338 1 -339 331 -0.01203703703703707 -339 332 -0.0134259259259259 -339 333 -0.05315500685871065 -339 334 -0.01296296296296294 -339 335 0.01342592592592586 -339 336 -0.155178326474622 -339 337 7.459310946700271e-17 -339 338 -0.02870370370370365 -339 339 0.6207133058984912 -339 340 -1.110223024625157e-16 -339 341 0.02870370370370348 -339 342 -0.204046639231823 -339 343 0.012037037037037 -339 344 -0.0134259259259259 -339 345 -0.05315500685871172 -339 346 0.01296296296296303 -339 347 0.01342592592592611 -339 348 -0.1551783264746238 -340 331 -0.0009703703703703721 -340 332 -0.0005000000000000004 -340 333 -0.008333333333333333 -340 334 -0.001659259259259266 -340 335 -1.626303258728257e-18 -340 336 -0.03333333333333331 -340 337 -0.0002814814814814752 -340 338 2.168404344971009e-18 -340 339 3.469446951953614e-18 -340 340 0.007762962962962959 -340 341 3.035766082959412e-18 -340 342 -6.938893903907228e-18 -340 343 -0.0009703703703703676 -340 344 0.0004999999999999989 -340 345 0.008333333333333344 -340 346 -0.001659259259259262 -340 347 -3.144186300207963e-18 -340 348 0.03333333333333334 -340 982 -0.0009703703703703708 -340 983 0.0004999999999999998 -340 984 -0.008333333333333331 -340 985 -0.000281481481481476 -340 986 1.084202172485504e-18 -340 987 -1.734723475976807e-17 -340 988 -0.0009703703703703696 -340 989 -0.0004999999999999998 -340 990 0.008333333333333325 -341 331 -0.0005000000000000003 -341 332 -0.001040740740740742 -341 333 -0.009259259259259247 -341 334 -1.626303258728257e-18 -341 335 0.000281481481481476 -341 336 -5.204170427930421e-18 -341 337 1.951563910473908e-18 -341 338 -0.002362962962962954 -341 339 -0.03703703703703692 -341 340 3.035766082959412e-18 -341 341 0.008325925925925903 -341 342 1.249000902703301e-16 -341 343 0.0004999999999999989 -341 344 -0.001040740740740731 -341 345 -0.009259259259259228 -341 346 -3.035766082959412e-18 -341 347 0.0002814814814814818 -341 348 5.724587470723463e-17 -341 982 0.0005 -341 983 -0.001040740740740738 -341 984 0.009259259259259228 -341 985 1.192622389734055e-18 -341 986 -0.002362962962962956 -341 987 0.03703703703703691 -341 988 -0.0004999999999999999 -341 989 -0.00104074074074074 -341 990 0.009259259259259236 -342 331 -0.01296296296296296 -342 332 -0.01342592592592595 -342 333 -0.1551783264746225 -342 334 -0.02407407407407409 -342 335 -6.938893903907228e-18 -342 336 -0.1063100137174217 -342 337 6.591949208711867e-17 -342 338 -0.02870370370370372 -342 339 -0.204046639231823 -342 340 2.255140518769849e-17 -342 341 -1.092875789865388e-16 -342 342 1.241426611796978 -342 343 0.01296296296296291 -342 344 -0.01342592592592572 -342 345 -0.155178326474622 -342 346 0.02407407407407409 -342 347 -8.673617379884035e-18 -342 348 -0.1063100137174213 -342 982 -0.01296296296296294 -342 983 0.01342592592592586 -342 984 -0.155178326474622 -342 985 -1.214306433183765e-17 -342 986 0.02870370370370374 -342 987 -0.204046639231823 -342 988 0.01296296296296292 -342 989 0.01342592592592591 -342 990 -0.1551783264746225 -343 343 1 -344 344 1 -345 337 -0.01203703703703712 -345 338 -0.01342592592592591 -345 339 -0.05315500685871172 -345 340 -0.01296296296296294 -345 341 0.01342592592592589 -345 342 -0.1551783264746219 -345 343 1.387778780781446e-16 -345 344 -0.02870370370370363 -345 345 0.6207133058984911 -345 346 -6.071532165918825e-17 -345 347 0.02870370370370365 -345 348 -0.2040466392318231 -345 349 0.01203703703703698 -345 350 -0.01342592592592597 -345 351 -0.05315500685871041 -345 352 0.012962962962963 -345 353 0.01342592592592597 -345 354 -0.1551783264746238 -346 337 -0.0009703703703703746 -346 338 -0.0005000000000000012 -346 339 -0.008333333333333333 -346 340 -0.001659259259259262 -346 341 -3.035766082959412e-18 -346 342 -0.03333333333333333 -346 343 -0.0002814814814814728 -346 344 2.38524477946811e-18 -346 345 -1.734723475976807e-18 -346 346 0.007762962962962966 -346 347 1.084202172485504e-18 -346 348 -3.469446951953614e-18 -346 349 -0.000970370370370367 -346 350 0.0004999999999999988 -346 351 0.008333333333333335 -346 352 -0.001659259259259267 -346 353 2.602085213965211e-18 -346 354 0.03333333333333333 -346 985 -0.0009703703703703717 -346 986 0.0005000000000000001 -346 987 -0.008333333333333331 -346 988 -0.0002814814814814862 -346 989 -2.38524477946811e-18 -346 990 1.040834085586084e-17 -346 991 -0.0009703703703703653 -346 992 -0.0004999999999999984 -346 993 0.008333333333333337 -347 337 -0.0005000000000000011 -347 338 -0.001040740740740748 -347 339 -0.0092592592592593 -347 340 -3.144186300207963e-18 -347 341 0.0002814814814814818 -347 342 -9.194034422677078e-17 -347 343 2.276824562219559e-18 -347 344 -0.002362962962962953 -347 345 -0.037037037037037 -347 346 1.192622389734055e-18 -347 347 0.008325925925925921 -347 348 6.938893903907228e-17 -347 349 0.0004999999999999989 -347 350 -0.001040740740740733 -347 351 -0.009259259259259214 -347 352 2.602085213965211e-18 -347 353 0.0002814814814814701 -347 354 -5.204170427930421e-17 -347 985 0.0005000000000000002 -347 986 -0.001040740740740741 -347 987 0.009259259259259236 -347 988 -2.38524477946811e-18 -347 989 -0.002362962962962969 -347 990 0.03703703703703703 -347 991 -0.0004999999999999985 -347 992 -0.00104074074074073 -347 993 0.009259259259259207 -348 337 -0.01296296296296299 -348 338 -0.01342592592592595 -348 339 -0.1551783264746238 -348 340 -0.02407407407407398 -348 341 -1.387778780781446e-17 -348 342 -0.1063100137174213 -348 343 5.898059818321144e-17 -348 344 -0.02870370370370357 -348 345 -0.2040466392318231 -348 346 -2.099015405931937e-16 -348 347 -9.194034422677078e-17 -348 348 1.241426611796983 -348 349 0.01296296296296293 -348 350 -0.01342592592592589 -348 351 -0.1551783264746221 -348 352 0.02407407407407418 -348 353 -6.245004513516506e-17 -348 354 -0.1063100137174229 -348 985 -0.01296296296296296 -348 986 0.01342592592592592 -348 987 -0.1551783264746227 -348 988 5.551115123125783e-17 -348 989 0.02870370370370378 -348 990 -0.2040466392318254 -348 991 0.01296296296296292 -348 992 0.01342592592592588 -348 993 -0.155178326474622 -349 349 1 -350 350 1 -351 343 -0.01203703703703707 -351 344 -0.01342592592592593 -351 345 -0.05315500685871041 -351 346 -0.01296296296296291 -351 347 0.01342592592592577 -351 348 -0.1551783264746221 -351 349 7.806255641895632e-17 -351 350 -0.02870370370370379 -351 351 0.6207133058984902 -351 352 -1.405126015541214e-16 -351 353 0.02870370370370387 -351 354 -0.2040466392318246 -351 355 0.01203703703703698 -351 356 -0.01342592592592594 -351 357 -0.05315500685870891 -351 358 0.01296296296296305 -351 359 0.01342592592592603 -351 360 -0.1551783264746242 -352 343 -0.0009703703703703756 -352 344 -0.0005000000000000012 -352 345 -0.008333333333333342 -352 346 -0.001659259259259267 -352 347 2.49366499671666e-18 -352 348 -0.03333333333333333 -352 349 -0.0002814814814814815 -352 350 2.38524477946811e-18 -352 351 -8.673617379884035e-18 -352 352 0.007762962962962975 -352 353 -3.144186300207963e-18 -352 354 -1.040834085586084e-17 -352 355 -0.0009703703703703647 -352 356 0.0004999999999999983 -352 357 0.008333333333333333 -352 358 -0.001659259259259267 -352 359 1.626303258728257e-18 -352 360 0.03333333333333333 -352 988 -0.0009703703703703743 -352 989 0.0005000000000000016 -352 990 -0.008333333333333314 -352 991 -0.0002814814814814845 -352 992 -5.095750210681871e-18 -352 993 1.734723475976807e-18 -352 994 -0.0009703703703703606 -352 995 -0.0004999999999999972 -352 996 0.008333333333333321 -353 343 -0.0005000000000000012 -353 344 -0.001040740740740747 -353 345 -0.009259259259259269 -353 346 2.49366499671666e-18 -353 347 0.00028148148148147 -353 348 5.898059818321144e-17 -353 349 2.168404344971009e-18 -353 350 -0.002362962962962963 -353 351 -0.03703703703703713 -353 352 -3.144186300207963e-18 -353 353 0.008325925925925941 -353 354 4.510281037539698e-17 -353 355 0.0004999999999999984 -353 356 -0.001040740740740731 -353 357 -0.009259259259259228 -353 358 1.734723475976807e-18 -353 359 0.0002814814814814729 -353 360 -6.938893903907228e-18 -353 988 0.0005000000000000017 -353 989 -0.001040740740740755 -353 990 0.009259259259259318 -353 991 -4.98732999343332e-18 -353 992 -0.002362962962962967 -353 993 0.03703703703703706 -353 994 -0.0004999999999999972 -353 995 -0.001040740740740722 -353 996 0.009259259259259156 -354 343 -0.01296296296296305 -354 344 -0.01342592592592608 -354 345 -0.1551783264746238 -354 346 -0.02407407407407395 -354 347 -3.469446951953614e-17 -354 348 -0.1063100137174228 -354 349 1.561251128379126e-16 -354 350 -0.02870370370370352 -354 351 -0.2040466392318246 -354 352 -2.862293735361732e-16 -354 353 -1.301042606982605e-16 -354 354 1.241426611796984 -354 355 0.01296296296296288 -354 356 -0.01342592592592585 -354 357 -0.1551783264746216 -354 358 0.02407407407407423 -354 359 6.591949208711867e-17 -354 360 -0.1063100137174222 -354 988 -0.01296296296296302 -354 989 0.01342592592592621 -354 990 -0.1551783264746245 -354 991 2.255140518769849e-16 -354 992 0.02870370370370368 -354 993 -0.2040466392318248 -354 994 0.01296296296296282 -354 995 0.01342592592592565 -354 996 -0.1551783264746199 -355 355 1 -356 356 1 -357 349 -0.01203703703703712 -357 350 -0.01342592592592591 -357 351 -0.05315500685870891 -357 352 -0.01296296296296292 -357 353 0.01342592592592573 -357 354 -0.1551783264746216 -357 355 1.613292832658431e-16 -357 356 -0.02870370370370365 -357 357 0.6207133058984907 -357 358 -8.847089727481716e-17 -357 359 0.0287037037037037 -357 360 -0.2040466392318236 -357 361 0.01203703703703696 -357 362 -0.01342592592592593 -357 363 -0.05315500685871269 -357 364 0.012962962962963 -357 365 0.01342592592592607 -357 366 -0.1551783264746238 -358 349 -0.0009703703703703758 -358 350 -0.0005000000000000017 -358 351 -0.008333333333333333 -358 352 -0.001659259259259267 -358 353 1.734723475976807e-18 -358 354 -0.03333333333333331 -358 355 -0.0002814814814814761 -358 356 3.035766082959412e-18 -358 358 0.007762962962962965 -358 359 -5.637851296924623e-18 -358 360 6.938893903907228e-18 -358 361 -0.0009703703703703671 -358 362 0.0004999999999999987 -358 363 0.008333333333333333 -358 364 -0.001659259259259263 -358 365 3.144186300207963e-18 -358 366 0.03333333333333334 -358 991 -0.0009703703703703809 -358 992 0.0005000000000000027 -358 993 -0.008333333333333331 -358 994 -0.0002814814814814738 -358 995 -4.98732999343332e-18 -358 996 -3.469446951953614e-18 -358 997 -0.0009703703703703611 -358 998 -0.0004999999999999971 -358 999 0.008333333333333337 -359 349 -0.0005000000000000016 -359 350 -0.001040740740740753 -359 351 -0.009259259259259321 -359 352 1.626303258728257e-18 -359 353 0.0002814814814814727 -359 354 1.040834085586084e-16 -359 355 2.927345865710862e-18 -359 356 -0.002362962962962956 -359 357 -0.03703703703703701 -359 358 -5.637851296924623e-18 -359 359 0.00832592592592591 -359 360 -7.632783294297951e-17 -359 361 0.0004999999999999988 -359 362 -0.001040740740740729 -359 363 -0.009259259259259182 -359 364 3.144186300207963e-18 -359 365 0.0002814814814814858 -359 366 -3.642919299551295e-17 -359 991 0.0005000000000000029 -359 992 -0.001040740740740758 -359 993 0.009259259259259304 -359 994 -5.204170427930421e-18 -359 995 -0.002362962962962953 -359 996 0.03703703703703688 -359 997 -0.000499999999999997 -359 998 -0.00104074074074072 -359 999 0.009259259259259186 -360 349 -0.01296296296296302 -360 350 -0.01342592592592615 -360 351 -0.1551783264746242 -360 352 -0.02407407407407387 -360 353 3.295974604355933e-17 -360 354 -0.1063100137174222 -360 355 9.194034422677078e-17 -360 356 -0.02870370370370352 -360 357 -0.2040466392318236 -360 358 -4.093947403305265e-16 -360 359 -9.8879238130678e-17 -360 360 1.24142661179698 -360 361 0.01296296296296293 -360 362 -0.01342592592592573 -360 363 -0.1551783264746218 -360 364 0.02407407407407431 -360 365 6.938893903907228e-18 -360 366 -0.1063100137174211 -360 991 -0.01296296296296307 -360 992 0.01342592592592615 -360 993 -0.1551783264746243 -360 994 1.838806884535416e-16 -360 995 0.02870370370370377 -360 996 -0.2040466392318226 -360 997 0.01296296296296286 -360 998 0.01342592592592554 -360 999 -0.1551783264746204 -361 361 1 -362 362 1 -363 355 -0.01203703703703707 -363 356 -0.01342592592592591 -363 357 -0.05315500685871268 -363 358 -0.01296296296296289 -363 359 0.01342592592592583 -363 360 -0.1551783264746218 -363 361 1.058181320345852e-16 -363 362 -0.02870370370370364 -363 363 0.6207133058984913 -363 364 -1.734723475976807e-16 -363 365 0.02870370370370362 -363 366 -0.2040466392318236 -363 367 0.01203703703703697 -363 368 -0.01342592592592594 -363 369 -0.05315500685870876 -363 370 0.01296296296296307 -363 371 0.01342592592592604 -363 372 -0.1551783264746245 -364 355 -0.0009703703703703761 -364 356 -0.0005000000000000013 -364 357 -0.008333333333333333 -364 358 -0.001659259259259263 -364 359 3.144186300207963e-18 -364 360 -0.03333333333333335 -364 361 -0.0002814814814814759 -364 362 3.361026734705064e-18 -364 364 0.007762962962962973 -364 365 -5.421010862427522e-19 -364 367 -0.0009703703703703635 -364 368 0.000499999999999998 -364 369 0.008333333333333333 -364 370 -0.001659259259259272 -364 371 -2.818925648462312e-18 -364 372 0.03333333333333335 -364 994 -0.0009703703703703816 -364 995 0.0005000000000000032 -364 996 -0.00833333333333334 -364 997 -0.0002814814814814734 -364 998 -3.686287386450715e-18 -364 999 3.469446951953614e-18 -364 1000 -0.0009703703703703691 -364 1001 -0.0004999999999999994 -364 1002 0.008333333333333338 -365 355 -0.0005000000000000013 -365 356 -0.001040740740740747 -365 357 -0.009259259259259255 -365 358 3.144186300207963e-18 -365 359 0.0002814814814814857 -365 360 1.474514954580286e-16 -365 361 3.144186300207963e-18 -365 362 -0.002362962962962956 -365 363 -0.03703703703703699 -365 364 -6.505213034913027e-19 -365 365 0.008325925925925926 -365 366 1.387778780781446e-16 -365 367 0.0004999999999999981 -365 368 -0.001040740740740728 -365 369 -0.009259259259259214 -365 370 -2.710505431213761e-18 -365 371 0.000281481481481467 -365 372 1.127570259384925e-16 -365 994 0.0005000000000000033 -365 995 -0.00104074074074076 -365 996 0.009259259259259352 -365 997 -3.577867169202165e-18 -365 998 -0.002362962962962953 -365 999 0.03703703703703697 -365 1000 -0.0004999999999999994 -365 1001 -0.001040740740740735 -365 1002 0.009259259259259203 -366 355 -0.01296296296296304 -366 356 -0.01342592592592597 -366 357 -0.1551783264746238 -366 358 -0.02407407407407393 -366 359 -2.255140518769849e-17 -366 360 -0.1063100137174211 -366 361 1.769417945496343e-16 -366 362 -0.02870370370370359 -366 363 -0.2040466392318236 -366 364 -2.51534904016637e-16 -366 365 -7.459310946700271e-17 -366 366 1.241426611796983 -366 367 0.01296296296296286 -366 368 -0.01342592592592583 -366 369 -0.1551783264746214 -366 370 0.02407407407407419 -366 371 3.642919299551295e-17 -366 372 -0.106310013717423 -366 994 -0.01296296296296312 -366 995 0.01342592592592608 -366 996 -0.1551783264746251 -366 997 1.804112415015879e-16 -366 998 0.0287037037037035 -366 999 -0.2040466392318227 -366 1000 0.01296296296296292 -366 1001 0.01342592592592588 -366 1002 -0.1551783264746217 -367 367 1 -368 368 1 -369 361 -0.01203703703703713 -369 362 -0.01342592592592591 -369 363 -0.05315500685870875 -369 364 -0.0129629629629629 -369 365 0.01342592592592568 -369 366 -0.1551783264746214 -369 367 1.908195823574488e-16 -369 368 -0.02870370370370384 -369 369 0.6207133058984908 -369 370 -1.162264728904461e-16 -369 371 0.02870370370370391 -369 372 -0.2040466392318256 -369 373 0.01203703703703694 -369 374 -0.01342592592592597 -369 375 -0.05315500685871075 -369 376 0.01296296296296302 -369 377 0.01342592592592613 -369 378 -0.1551783264746242 -370 361 -0.0009703703703703769 -370 362 -0.0005000000000000021 -370 363 -0.008333333333333333 -370 364 -0.001659259259259272 -370 365 -2.710505431213761e-18 -370 366 -0.03333333333333335 -370 367 -0.000281481481481487 -370 368 3.577867169202165e-18 -370 369 -1.734723475976807e-18 -370 370 0.007762962962962967 -370 371 6.722053469410127e-18 -370 372 -1.734723475976807e-17 -370 373 -0.0009703703703703644 -370 374 0.0004999999999999985 -370 375 0.008333333333333335 -370 376 -0.001659259259259238 -370 377 -3.794707603699266e-18 -370 378 0.03333333333333334 -370 997 -0.0009703703703703736 -370 998 0.0005000000000000009 -370 999 -0.008333333333333342 -370 1000 -0.0002814814814814863 -370 1001 -6.505213034913027e-19 -370 1002 -5.204170427930421e-18 -370 1003 -0.0009703703703703701 -370 1004 -0.0005000000000000003 -370 1005 0.008333333333333337 -371 361 -0.000500000000000002 -371 362 -0.001040740740740755 -371 363 -0.009259259259259325 -371 364 -2.710505431213761e-18 -371 365 0.000281481481481467 -371 366 -3.642919299551295e-17 -371 367 3.577867169202165e-18 -371 368 -0.002362962962962971 -371 369 -0.03703703703703717 -371 370 6.722053469410127e-18 -371 371 0.008325925925925948 -371 372 7.632783294297951e-17 -371 373 0.0004999999999999983 -371 374 -0.001040740740740731 -371 375 -0.009259259259259243 -371 376 -3.903127820947816e-18 -371 377 0.0002814814814815009 -371 378 1.249000902703301e-16 -371 997 0.0005000000000000008 -371 998 -0.001040740740740744 -371 999 0.009259259259259241 -371 1000 -2.168404344971009e-19 -371 1001 -0.002362962962962969 -371 1002 0.03703703703703712 -371 1003 -0.0005000000000000003 -371 1004 -0.001040740740740746 -371 1005 0.009259259259259323 -372 361 -0.01296296296296303 -372 362 -0.01342592592592619 -372 363 -0.1551783264746245 -372 364 -0.02407407407407397 -372 365 5.030698080332741e-17 -372 366 -0.106310013717423 -372 367 1.179611963664229e-16 -372 368 -0.02870370370370367 -372 369 -0.2040466392318256 -372 370 -1.491862189340054e-16 -372 371 -6.938893903907228e-17 -372 372 1.241426611796985 -372 373 0.01296296296296292 -372 374 -0.01342592592592576 -372 375 -0.1551783264746217 -372 376 0.02407407407407411 -372 377 -7.806255641895632e-17 -372 378 -0.1063100137174183 -372 997 -0.01296296296296298 -372 998 0.013425925925926 -372 999 -0.1551783264746228 -372 1000 -1.387778780781446e-17 -372 1001 0.02870370370370371 -372 1002 -0.2040466392318254 -372 1003 0.012962962962963 -372 1004 0.013425925925926 -372 1005 -0.1551783264746239 -373 373 1 -374 374 1 -375 367 -0.01203703703703709 -375 368 -0.01342592592592595 -375 369 -0.05315500685871073 -375 370 -0.01296296296296288 -375 371 0.01342592592592583 -375 372 -0.1551783264746217 -375 373 1.370431546021678e-16 -375 374 -0.02870370370370364 -375 375 0.6207133058984924 -375 376 -2.046973701652632e-16 -375 377 0.02870370370370352 -375 378 -0.2040466392318236 -375 379 0.01203703703703695 -375 380 -0.01342592592592591 -375 381 -0.05315500685871156 -375 382 0.01296296296296309 -375 383 0.01342592592592615 -375 384 -0.1551783264746247 -376 367 -0.0009703703703703756 -376 368 -0.0005000000000000017 -376 369 -0.008333333333333331 -376 370 -0.001659259259259238 -376 371 -4.119968255444917e-18 -376 372 -0.03333333333333333 -376 373 -0.0002814814814814763 -376 374 4.011548038196366e-18 -376 375 -1.734723475976807e-18 -376 376 0.007762962962962952 -376 377 3.144186300207963e-18 -376 378 6.938893903907228e-18 -376 379 -0.0009703703703703642 -376 380 0.0004999999999999977 -376 381 0.008333333333333335 -376 382 -0.001659259259259284 -376 383 1.734723475976807e-18 -376 384 0.03333333333333333 -376 1000 -0.0009703703703703673 -376 1001 0.0004999999999999996 -376 1002 -0.008333333333333331 -376 1003 -0.0002814814814814823 -376 1004 -3.252606517456513e-18 -376 1005 1.040834085586084e-17 -376 1006 -0.0009703703703703628 -376 1007 -0.0004999999999999972 -376 1008 0.008333333333333335 -377 367 -0.0005000000000000016 -377 368 -0.001040740740740753 -377 369 -0.009259259259259335 -377 370 -3.794707603699266e-18 -377 371 0.0002814814814815009 -377 372 -9.540979117872439e-17 -377 373 4.119968255444917e-18 -377 374 -0.002362962962962956 -377 375 -0.03703703703703696 -377 376 3.035766082959412e-18 -377 377 0.008325925925925891 -377 378 1.387778780781446e-17 -377 379 0.0004999999999999977 -377 380 -0.001040740740740723 -377 381 -0.009259259259259169 -377 382 1.409462824231156e-18 -377 383 0.0002814814814814626 -377 384 -3.469446951953614e-17 -377 1000 0.0004999999999999996 -377 1001 -0.001040740740740741 -377 1002 0.009259259259259306 -377 1003 -3.252606517456513e-18 -377 1004 -0.002362962962962964 -377 1005 0.03703703703703696 -377 1006 -0.0004999999999999972 -377 1007 -0.001040740740740719 -377 1008 0.00925925925925913 -378 367 -0.01296296296296305 -378 368 -0.01342592592592606 -378 369 -0.1551783264746242 -378 370 -0.02407407407407403 -378 371 -4.336808689942018e-17 -378 372 -0.1063100137174183 -378 373 2.046973701652632e-16 -378 374 -0.0287037037037037 -378 375 -0.2040466392318237 -378 376 -2.411265631607762e-16 -378 377 -1.231653667943533e-16 -378 378 1.241426611796981 -378 379 0.01296296296296285 -378 380 -0.01342592592592565 -378 381 -0.155178326474621 -378 382 0.02407407407407424 -378 383 -1.561251128379126e-17 -378 384 -0.1063100137174246 -378 1000 -0.01296296296296297 -378 1001 0.01342592592592593 -378 1002 -0.1551783264746233 -378 1003 1.613292832658431e-16 -378 1004 0.02870370370370401 -378 1005 -0.204046639231825 -378 1006 0.01296296296296283 -378 1007 0.01342592592592564 -378 1008 -0.1551783264746205 -379 379 1 -380 380 1 -381 373 -0.01203703703703715 -381 374 -0.01342592592592588 -381 375 -0.05315500685871156 -381 376 -0.01296296296296289 -381 377 0.01342592592592573 -381 378 -0.155178326474621 -381 379 2.411265631607762e-16 -381 380 -0.02870370370370361 -381 381 0.6207133058984899 -381 382 -2.012279232133096e-16 -381 383 0.02870370370370351 -381 384 -0.2040466392318221 -381 385 0.01203703703703692 -381 386 -0.01342592592592591 -381 387 -0.05315500685871063 -381 388 0.01296296296296308 -381 389 0.01342592592592616 -381 390 -0.1551783264746247 -382 373 -0.0009703703703703797 -382 374 -0.0005000000000000024 -382 375 -0.008333333333333333 -382 376 -0.001659259259259284 -382 377 1.409462824231156e-18 -382 378 -0.03333333333333333 -382 379 -0.0002814814814814697 -382 380 6.071532165918825e-18 -382 381 3.469446951953614e-18 -382 382 0.007762962962962977 -382 383 2.168404344971009e-19 -382 384 -1.040834085586084e-17 -382 385 -0.0009703703703703611 -382 386 0.000499999999999997 -382 387 0.008333333333333344 -382 388 -0.001659259259259266 -382 389 -2.710505431213761e-18 -382 390 0.03333333333333333 -382 1003 -0.0009703703703703801 -382 1004 0.0005000000000000027 -382 1005 -0.008333333333333321 -382 1006 -0.000281481481481474 -382 1007 -4.87890977618477e-18 -382 1008 -8.673617379884035e-18 -382 1009 -0.0009703703703703608 -382 1010 -0.0004999999999999974 -382 1011 0.008333333333333312 -383 373 -0.0005000000000000024 -383 374 -0.001040740740740754 -383 375 -0.009259259259259297 -383 376 1.734723475976807e-18 -383 377 0.0002814814814814628 -383 378 3.989863994746656e-17 -383 379 5.963111948670274e-18 -383 380 -0.002362962962962947 -383 381 -0.03703703703703692 -383 382 3.252606517456513e-19 -383 383 0.008325925925925917 -383 384 1.595945597898663e-16 -383 385 0.0004999999999999969 -383 386 -0.001040740740740718 -383 387 -0.009259259259259139 -383 388 -2.602085213965211e-18 -383 389 0.0002814814814814747 -383 390 9.8879238130678e-17 -383 1003 0.0005000000000000027 -383 1004 -0.001040740740740758 -383 1005 0.009259259259259297 -383 1006 -4.98732999343332e-18 -383 1007 -0.002362962962962953 -383 1008 0.03703703703703692 -383 1009 -0.0004999999999999973 -383 1010 -0.001040740740740724 -383 1011 0.009259259259259172 -384 373 -0.01296296296296305 -384 374 -0.01342592592592606 -384 375 -0.1551783264746247 -384 376 -0.02407407407407381 -384 377 -3.469446951953614e-18 -384 378 -0.1063100137174246 -384 379 2.34187669256869e-16 -384 380 -0.02870370370370351 -384 381 -0.2040466392318221 -384 382 -5.256212132209725e-16 -384 383 -1.283695372222837e-16 -384 384 1.24142661179698 -384 385 0.01296296296296283 -384 386 -0.01342592592592564 -384 387 -0.1551783264746198 -384 388 0.02407407407407433 -384 389 2.081668171172169e-17 -384 390 -0.1063100137174217 -384 1003 -0.01296296296296305 -384 1004 0.01342592592592615 -384 1005 -0.1551783264746248 -384 1006 2.289834988289385e-16 -384 1007 0.02870370370370351 -384 1008 -0.2040466392318225 -384 1009 0.01296296296296281 -384 1010 0.01342592592592565 -384 1011 -0.1551783264746199 -385 385 1 -386 386 1 -387 379 -0.0120370370370372 -387 380 -0.01342592592592589 -387 381 -0.05315500685871061 -387 382 -0.01296296296296282 -387 383 0.01342592592592558 -387 384 -0.1551783264746198 -387 385 2.51534904016637e-16 -387 386 -0.02870370370370368 -387 387 0.6207133058984893 -387 388 -2.081668171172169e-16 -387 389 0.02870370370370384 -387 390 -0.2040466392318237 -387 391 0.01203703703703695 -387 392 -0.01342592592592599 -387 393 -0.05315500685871088 -387 394 0.01296296296296303 -387 395 0.01342592592592614 -387 396 -0.1551783264746244 -388 379 -0.0009703703703703812 -388 380 -0.0005000000000000032 -388 381 -0.008333333333333333 -388 382 -0.001659259259259266 -388 383 -2.602085213965211e-18 -388 384 -0.03333333333333332 -388 385 -0.0002814814814814782 -388 386 4.98732999343332e-18 -388 387 -3.469446951953614e-18 -388 388 0.00776296296296296 -388 389 1.084202172485504e-19 -388 390 -6.938893903907228e-18 -388 391 -0.0009703703703703634 -388 392 0.0004999999999999982 -388 393 0.008333333333333335 -388 394 -0.001659259259259238 -388 395 2.49366499671666e-18 -388 396 0.03333333333333333 -388 1006 -0.0009703703703703807 -388 1007 0.0005000000000000027 -388 1008 -0.008333333333333331 -388 1009 -0.0002814814814814905 -388 1010 -4.98732999343332e-18 -388 1012 -0.0009703703703703619 -388 1013 -0.0004999999999999977 -388 1014 0.008333333333333335 -389 379 -0.000500000000000003 -389 380 -0.001040740740740761 -389 381 -0.009259259259259325 -389 382 -2.710505431213761e-18 -389 383 0.0002814814814814749 -389 384 -1.040834085586084e-17 -389 385 4.98732999343332e-18 -389 386 -0.002362962962962959 -389 387 -0.03703703703703706 -389 389 0.008325925925925935 -389 390 -2.081668171172169e-17 -389 391 0.0004999999999999981 -389 392 -0.00104074074074073 -389 393 -0.009259259259259241 -389 394 2.602085213965211e-18 -389 395 0.0002814814814815005 -389 396 -5.204170427930421e-17 -389 1006 0.0005000000000000028 -389 1007 -0.001040740740740757 -389 1008 0.0092592592592593 -389 1009 -4.98732999343332e-18 -389 1010 -0.002362962962962975 -389 1011 0.03703703703703706 -389 1012 -0.0004999999999999978 -389 1013 -0.001040740740740728 -389 1014 0.009259259259259234 -390 379 -0.01296296296296307 -390 380 -0.01342592592592622 -390 381 -0.1551783264746247 -390 382 -0.02407407407407386 -390 383 -1.040834085586084e-17 -390 384 -0.1063100137174217 -390 385 1.717376241217039e-16 -390 386 -0.0287037037037036 -390 387 -0.2040466392318236 -390 388 -3.747002708109903e-16 -390 389 -6.071532165918825e-17 -390 390 1.241426611796981 -390 391 0.0129629629629629 -390 392 -0.01342592592592576 -390 393 -0.1551783264746216 -390 394 0.02407407407407423 -390 395 -6.591949208711867e-17 -390 396 -0.1063100137174182 -390 1006 -0.01296296296296306 -390 1007 0.0134259259259261 -390 1008 -0.155178326474624 -390 1009 1.717376241217039e-16 -390 1010 0.02870370370370386 -390 1011 -0.2040466392318258 -390 1012 0.01296296296296289 -390 1013 0.01342592592592575 -390 1014 -0.1551783264746215 -391 391 1 -392 392 1 -393 385 -0.0120370370370371 -393 386 -0.01342592592592595 -393 387 -0.05315500685871087 -393 388 -0.01296296296296287 -393 389 0.01342592592592582 -393 390 -0.1551783264746216 -393 391 7.806255641895632e-17 -393 392 -0.02870370370370369 -393 393 0.6207133058984914 -393 394 -1.43982048506075e-16 -393 395 0.02870370370370375 -393 396 -0.2040466392318246 -393 397 0.01203703703703702 -393 398 -0.01342592592592589 -393 399 -0.05315500685871068 -393 400 0.01296296296296302 -393 401 0.01342592592592596 -393 402 -0.1551783264746235 -394 385 -0.0009703703703703766 -394 386 -0.000500000000000002 -394 387 -0.008333333333333342 -394 388 -0.001659259259259238 -394 389 2.602085213965211e-18 -394 390 -0.03333333333333332 -394 391 -0.0002814814814814818 -394 392 2.710505431213761e-18 -394 393 -1.734723475976807e-18 -394 394 0.007762962962962959 -394 395 -6.505213034913027e-18 -394 396 -1.040834085586084e-17 -394 397 -0.0009703703703703688 -394 398 0.0004999999999999993 -394 399 0.008333333333333344 -394 400 -0.001659259259259281 -394 401 4.011548038196366e-18 -394 402 0.03333333333333333 -394 1009 -0.0009703703703703754 -394 1010 0.0005000000000000023 -394 1011 -0.008333333333333314 -394 1012 -0.000281481481481479 -394 1013 -5.963111948670274e-18 -394 1014 -1.734723475976807e-18 -394 1015 -0.0009703703703703593 -394 1016 -0.0004999999999999962 -394 1017 0.008333333333333312 -395 385 -0.0005000000000000019 -395 386 -0.001040740740740753 -395 387 -0.009259259259259335 -395 388 2.710505431213761e-18 -395 389 0.0002814814814815006 -395 390 5.898059818321144e-17 -395 391 2.710505431213761e-18 -395 392 -0.002362962962962963 -395 393 -0.03703703703703705 -395 394 -6.505213034913027e-18 -395 395 0.008325925925925924 -395 396 -9.71445146547012e-17 -395 397 0.0004999999999999991 -395 398 -0.001040740740740734 -395 399 -0.009259259259259198 -395 400 4.011548038196366e-18 -395 401 0.0002814814814814592 -395 402 -1.821459649775647e-16 -395 1009 0.0005000000000000022 -395 1010 -0.001040740740740761 -395 1011 0.009259259259259384 -395 1012 -6.071532165918825e-18 -395 1013 -0.00236296296296296 -395 1014 0.03703703703703692 -395 1015 -0.0004999999999999963 -395 1016 -0.001040740740740713 -395 1017 0.009259259259259054 -396 385 -0.01296296296296308 -396 386 -0.01342592592592606 -396 387 -0.1551783264746244 -396 388 -0.02407407407407389 -396 389 -3.816391647148976e-17 -396 390 -0.1063100137174182 -396 391 1.52655665885959e-16 -396 392 -0.02870370370370363 -396 393 -0.2040466392318247 -396 394 -3.521488656232918e-16 -396 395 -1.040834085586084e-17 -396 396 1.241426611796982 -396 397 0.01296296296296293 -396 398 -0.01342592592592587 -396 399 -0.1551783264746222 -396 400 0.02407407407407424 -396 401 1.144917494144693e-16 -396 402 -0.1063100137174243 -396 1009 -0.01296296296296305 -396 1010 0.0134259259259262 -396 1011 -0.1551783264746251 -396 1012 2.896988204881268e-16 -396 1013 0.02870370370370372 -396 1014 -0.2040466392318238 -396 1015 0.01296296296296276 -396 1016 0.01342592592592558 -396 1017 -0.155178326474619 -397 397 1 -398 398 1 -399 391 -0.0120370370370371 -399 392 -0.0134259259259259 -399 393 -0.05315500685871069 -399 394 -0.01296296296296296 -399 395 0.0134259259259258 -399 396 -0.1551783264746222 -399 397 1.647987302177967e-16 -399 398 -0.02870370370370367 -399 399 0.6207133058984924 -399 400 -9.020562075079397e-17 -399 401 0.0287037037037036 -399 402 -0.2040466392318241 -399 403 0.01203703703703694 -399 404 -0.01342592592592599 -399 405 -0.05315500685871074 -399 406 0.01296296296296304 -399 407 0.01342592592592615 -399 408 -0.1551783264746247 -400 391 -0.0009703703703703733 -400 392 -0.0005000000000000008 -400 393 -0.008333333333333333 -400 394 -0.001659259259259281 -400 395 4.011548038196366e-18 -400 396 -0.03333333333333332 -400 397 -0.0002814814814814783 -400 398 3.035766082959412e-18 -400 399 -3.469446951953614e-18 -400 400 0.007762962962962965 -400 401 -3.144186300207963e-18 -400 402 -1.040834085586084e-17 -400 403 -0.0009703703703703623 -400 404 0.0004999999999999978 -400 405 0.008333333333333335 -400 406 -0.001659259259259239 -400 407 -1.734723475976807e-18 -400 408 0.03333333333333333 -400 1012 -0.0009703703703703862 -400 1013 0.0005000000000000038 -400 1014 -0.008333333333333333 -400 1015 -0.0002814814814814784 -400 1016 -3.794707603699266e-18 -400 1017 -1.387778780781446e-17 -400 1018 -0.0009703703703703665 -400 1019 -0.0004999999999999991 -400 1020 0.008333333333333333 -401 391 -0.0005000000000000008 -401 392 -0.001040740740740746 -401 393 -0.009259259259259254 -401 394 4.011548038196366e-18 -401 395 0.000281481481481459 -401 396 7.632783294297951e-17 -401 397 3.035766082959412e-18 -401 398 -0.002362962962962959 -401 399 -0.03703703703703701 -401 400 -3.144186300207963e-18 -401 401 0.008325925925925928 -401 402 5.898059818321144e-17 -401 403 0.0004999999999999978 -401 404 -0.001040740740740728 -401 405 -0.009259259259259228 -401 406 -1.626303258728257e-18 -401 407 0.0002814814814815031 -401 408 1.110223024625157e-16 -401 1012 0.0005000000000000037 -401 1013 -0.00104074074074076 -401 1014 0.00925925925925924 -401 1015 -3.794707603699266e-18 -401 1016 -0.002362962962962959 -401 1017 0.03703703703703697 -401 1018 -0.0004999999999999991 -401 1019 -0.001040740740740737 -401 1020 0.009259259259259304 -402 391 -0.01296296296296297 -402 392 -0.01342592592592604 -402 393 -0.1551783264746235 -402 394 -0.02407407407407387 -402 395 4.510281037539698e-17 -402 396 -0.1063100137174244 -402 397 8.673617379884035e-17 -402 398 -0.0287037037037038 -402 399 -0.2040466392318241 -402 400 -3.365363543395006e-16 -402 401 1.058181320345852e-16 -402 402 1.241426611796981 -402 403 0.01296296296296289 -402 404 -0.01342592592592574 -402 405 -0.1551783264746214 -402 406 0.02407407407407423 -402 407 -1.214306433183765e-17 -402 408 -0.106310013717418 -402 1012 -0.0129629629629631 -402 1013 0.0134259259259262 -402 1014 -0.1551783264746247 -402 1015 1.318389841742373e-16 -402 1016 0.02870370370370344 -402 1017 -0.2040466392318233 -402 1018 0.01296296296296295 -402 1019 0.01342592592592579 -402 1020 -0.1551783264746222 -403 403 1 -404 404 1 -405 397 -0.01203703703703711 -405 398 -0.01342592592592594 -405 399 -0.05315500685871073 -405 400 -0.01296296296296286 -405 401 0.01342592592592578 -405 402 -0.1551783264746213 -405 403 5.204170427930421e-17 -405 404 -0.0287037037037037 -405 405 0.6207133058984906 -405 406 -1.162264728904461e-16 -405 407 0.02870370370370384 -405 408 -0.2040466392318247 -405 409 0.01203703703703706 -405 410 -0.01342592592592589 -405 411 -0.05315500685871113 -405 412 0.01296296296296298 -405 413 0.01342592592592592 -405 414 -0.1551783264746227 -406 397 -0.0009703703703703777 -406 398 -0.0005000000000000023 -406 399 -0.008333333333333342 -406 400 -0.001659259259259239 -406 401 -1.626303258728257e-18 -406 402 -0.03333333333333333 -406 403 -0.0002814814814814819 -406 404 2.059984127722458e-18 -406 405 -1.734723475976807e-18 -406 406 0.007762962962962963 -406 407 2.059984127722458e-18 -406 408 -3.469446951953614e-18 -406 409 -0.0009703703703703721 -406 410 0.0005000000000000002 -406 411 0.008333333333333344 -406 412 -0.001659259259259265 -406 413 -4.336808689942018e-19 -406 414 0.03333333333333334 -406 1015 -0.0009703703703703714 -406 1016 0.0005000000000000008 -406 1017 -0.008333333333333323 -406 1018 -0.0002814814814814866 -406 1019 -9.75781955236954e-19 -406 1021 -0.0009703703703703699 -406 1022 -0.0004999999999999998 -406 1023 0.008333333333333328 -407 397 -0.0005000000000000022 -407 398 -0.001040740740740755 -407 399 -0.009259259259259339 -407 400 -1.626303258728257e-18 -407 401 0.000281481481481503 -407 403 1.951563910473908e-18 -407 404 -0.002362962962962963 -407 405 -0.03703703703703708 -407 406 2.059984127722458e-18 -407 407 0.00832592592592594 -407 408 1.387778780781446e-17 -407 409 0.0005000000000000002 -407 410 -0.00104074074074074 -407 411 -0.009259259259259243 -407 412 -3.252606517456513e-19 -407 413 0.0002814814814814764 -407 414 2.602085213965211e-17 -407 1015 0.0005000000000000009 -407 1016 -0.00104074074074075 -407 1017 0.009259259259259359 -407 1018 -1.084202172485504e-18 -407 1019 -0.00236296296296297 -407 1020 0.03703703703703708 -407 1021 -0.0004999999999999999 -407 1022 -0.00104074074074074 -407 1023 0.009259259259259234 -408 397 -0.01296296296296309 -408 398 -0.01342592592592611 -408 399 -0.1551783264746247 -408 400 -0.02407407407407397 -408 401 8.673617379884035e-18 -408 402 -0.1063100137174179 -408 403 1.231653667943533e-16 -408 404 -0.02870370370370354 -408 405 -0.2040466392318246 -408 406 -5.551115123125783e-17 -408 407 -1.804112415015879e-16 -408 408 1.241426611796984 -408 409 0.01296296296296297 -408 410 -0.01342592592592591 -408 411 -0.155178326474623 -408 412 0.02407407407407403 -408 413 -3.469446951953614e-18 -408 414 -0.106310013717422 -408 1015 -0.01296296296296301 -408 1016 0.01342592592592597 -408 1017 -0.1551783264746235 -408 1018 7.979727989493313e-17 -408 1019 0.02870370370370385 -408 1020 -0.2040466392318253 -408 1021 0.01296296296296293 -408 1022 0.01342592592592591 -408 1023 -0.1551783264746226 -409 409 1 -410 410 1 -411 403 -0.01203703703703706 -411 404 -0.01342592592592591 -411 405 -0.05315500685871113 -411 406 -0.012962962962963 -411 407 0.01342592592592594 -411 408 -0.155178326474623 -411 409 2.602085213965211e-17 -411 410 -0.02870370370370364 -411 411 0.6207133058984911 -411 412 4.85722573273506e-17 -411 413 0.02870370370370364 -411 414 -0.2040466392318231 -411 415 0.01203703703703704 -411 416 -0.01342592592592596 -411 417 -0.053155006858711 -411 418 0.01296296296296295 -411 419 0.01342592592592591 -411 420 -0.1551783264746228 -412 403 -0.00097037037037037 -412 404 -0.0004999999999999999 -412 405 -0.008333333333333333 -412 406 -0.001659259259259265 -412 407 -3.252606517456513e-19 -412 408 -0.03333333333333333 -412 409 -0.0002814814814814728 -412 410 -2.168404344971009e-19 -412 411 -1.734723475976807e-18 -412 412 0.007762962962962966 -412 413 -4.228388472693467e-18 -412 414 -3.469446951953614e-18 -412 415 -0.0009703703703703713 -412 416 0.0005000000000000002 -412 417 0.008333333333333335 -412 418 -0.001659259259259264 -412 419 5.312590645178972e-18 -412 420 0.03333333333333333 -412 1018 -0.0009703703703703714 -412 1019 0.0005000000000000001 -412 1020 -0.008333333333333331 -412 1021 -0.0002814814814814857 -412 1022 -2.49366499671666e-18 -412 1023 8.673617379884035e-18 -412 1024 -0.0009703703703703653 -412 1025 -0.0004999999999999984 -412 1026 0.008333333333333337 -413 403 -0.0004999999999999998 -413 404 -0.001040740740740739 -413 405 -0.009259259259259241 -413 406 -4.336808689942018e-19 -413 407 0.0002814814814814765 -413 408 2.602085213965211e-17 -413 409 -3.252606517456513e-19 -413 410 -0.002362962962962952 -413 411 -0.037037037037037 -413 412 -4.119968255444917e-18 -413 413 0.008325925925925921 -413 414 6.938893903907228e-17 -413 415 0.0005000000000000003 -413 416 -0.001040740740740742 -413 417 -0.009259259259259273 -413 418 5.312590645178972e-18 -413 419 0.0002814814814814752 -413 420 -1.682681771697503e-16 -413 1018 0.0005000000000000002 -413 1019 -0.001040740740740741 -413 1020 0.009259259259259236 -413 1021 -2.49366499671666e-18 -413 1022 -0.002362962962962968 -413 1023 0.03703703703703703 -413 1024 -0.0004999999999999985 -413 1025 -0.00104074074074073 -413 1026 0.009259259259259207 -414 403 -0.01296296296296293 -414 404 -0.0134259259259259 -414 405 -0.1551783264746227 -414 406 -0.02407407407407405 -414 407 -1.561251128379126e-17 -414 408 -0.106310013717422 -414 409 -5.204170427930421e-17 -414 410 -0.02870370370370356 -414 411 -0.2040466392318231 -414 412 -9.71445146547012e-17 -414 413 -9.540979117872439e-17 -414 414 1.241426611796983 -414 415 0.01296296296296299 -414 416 -0.01342592592592594 -414 417 -0.1551783264746231 -414 418 0.02407407407407412 -414 419 -5.898059818321144e-17 -414 420 -0.1063100137174222 -414 1018 -0.01296296296296295 -414 1019 0.01342592592592591 -414 1020 -0.1551783264746228 -414 1021 6.071532165918825e-17 -414 1022 0.02870370370370378 -414 1023 -0.2040466392318254 -414 1024 0.01296296296296292 -414 1025 0.01342592592592588 -414 1026 -0.155178326474622 -415 415 1 -416 416 1 -417 409 -0.01203703703703701 -417 410 -0.01342592592592595 -417 411 -0.053155006858711 -417 412 -0.01296296296296296 -417 413 0.01342592592592596 -417 414 -0.1551783264746231 -417 415 1.734723475976807e-18 -417 416 -0.02870370370370386 -417 417 0.6207133058984935 -417 418 -1.908195823574488e-17 -417 419 0.02870370370370384 -417 420 -0.2040466392318271 -417 421 0.01203703703703699 -417 422 -0.013425925925926 -417 423 -0.05315500685870832 -417 424 0.012962962962963 -417 425 0.01342592592592601 -417 426 -0.1551783264746239 -418 409 -0.0009703703703703711 -418 410 -0.0005 -418 411 -0.008333333333333342 -418 412 -0.001659259259259264 -418 413 5.204170427930421e-18 -418 414 -0.03333333333333333 -418 415 -0.0002814814814814938 -418 416 -5.421010862427522e-19 -418 417 -1.908195823574488e-17 -418 418 0.007762962962962957 -418 419 -4.662069341687669e-18 -418 420 -6.938893903907228e-18 -418 421 -0.0009703703703703656 -418 422 0.0004999999999999994 -418 423 0.008333333333333323 -418 424 -0.001659259259259227 -418 425 2.38524477946811e-18 -418 426 0.03333333333333331 -418 1021 -0.0009703703703703743 -418 1022 0.0005000000000000016 -418 1023 -0.008333333333333314 -418 1024 -0.0002814814814814954 -418 1025 -4.662069341687669e-18 -418 1026 2.081668171172169e-17 -418 1027 -0.0009703703703703655 -418 1028 -0.0004999999999999988 -418 1029 0.008333333333333331 -419 409 -0.0004999999999999999 -419 410 -0.001040740740740738 -419 411 -0.009259259259259254 -419 412 5.204170427930421e-18 -419 413 0.0002814814814814751 -419 414 9.194034422677078e-17 -419 415 -8.673617379884035e-19 -419 416 -0.002362962962962979 -419 417 -0.03703703703703719 -419 418 -4.662069341687669e-18 -419 419 0.008325925925925947 -419 420 6.245004513516506e-17 -419 421 0.0004999999999999995 -419 422 -0.001040740740740743 -419 423 -0.009259259259259332 -419 424 2.276824562219559e-18 -419 425 0.0002814814814815102 -419 426 -5.377642775528102e-17 -419 1021 0.0005000000000000017 -419 1022 -0.001040740740740755 -419 1023 0.009259259259259318 -419 1024 -4.445228907190568e-18 -419 1025 -0.002362962962962982 -419 1026 0.03703703703703722 -419 1027 -0.0004999999999999988 -419 1028 -0.001040740740740735 -419 1029 0.00925925925925929 -420 409 -0.012962962962963 -420 410 -0.01342592592592589 -420 411 -0.1551783264746228 -420 412 -0.024074074074074 -420 413 -4.510281037539698e-17 -420 414 -0.1063100137174222 -420 415 1.561251128379126e-17 -420 416 -0.02870370370370394 -420 417 -0.2040466392318271 -420 418 -1.266348137463069e-16 -420 419 3.469446951953614e-17 -420 420 1.241426611796985 -420 421 0.01296296296296294 -420 422 -0.01342592592592598 -420 423 -0.1551783264746231 -420 424 0.02407407407407412 -420 425 6.418476861114186e-17 -420 426 -0.1063100137174166 -420 1021 -0.01296296296296302 -420 1022 0.01342592592592621 -420 1023 -0.1551783264746245 -420 1024 1.318389841742373e-16 -420 1025 0.02870370370370376 -420 1026 -0.2040466392318271 -420 1027 0.01296296296296294 -420 1028 0.01342592592592579 -420 1029 -0.1551783264746219 -421 421 1 -422 422 1 -423 415 -0.01203703703703703 -423 416 -0.01342592592592597 -423 417 -0.05315500685870834 -423 418 -0.01296296296296295 -423 419 0.01342592592592593 -423 420 -0.1551783264746231 -423 421 -2.949029909160572e-17 -423 422 -0.02870370370370371 -423 423 0.6207133058984906 -423 424 3.642919299551295e-17 -423 425 0.02870370370370377 -423 426 -0.204046639231825 -423 427 0.01203703703703706 -423 428 -0.01342592592592585 -423 429 -0.05315500685871254 -423 430 0.01296296296296292 -423 431 0.01342592592592584 -423 432 -0.1551783264746217 -424 415 -0.0009703703703703701 -424 416 -0.0005000000000000006 -424 417 -0.008333333333333335 -424 418 -0.001659259259259227 -424 419 2.276824562219559e-18 -424 420 -0.03333333333333331 -424 421 -0.0002814814814814849 -424 423 -3.469446951953614e-18 -424 424 0.007762962962962958 -424 425 -8.456776945386935e-18 -424 427 -0.0009703703703703749 -424 428 0.0005000000000000006 -424 429 0.008333333333333333 -424 430 -0.001659259259259285 -424 431 6.288372600415926e-18 -424 432 0.03333333333333331 -424 1024 -0.0009703703703703724 -424 1025 0.0005000000000000012 -424 1026 -0.008333333333333323 -424 1027 -0.0002814814814814814 -424 1028 -4.445228907190568e-18 -424 1029 -1.734723475976807e-18 -424 1030 -0.0009703703703703605 -424 1031 -0.0004999999999999968 -424 1032 0.008333333333333323 -425 415 -0.0005000000000000007 -425 416 -0.001040740740740749 -425 417 -0.009259259259259351 -425 418 2.38524477946811e-18 -425 419 0.0002814814814815102 -425 420 5.724587470723463e-17 -425 422 -0.002362962962962967 -425 423 -0.03703703703703705 -425 424 -8.565197162635485e-18 -425 425 0.008325925925925919 -425 426 -1.873501354054952e-16 -425 427 0.0005000000000000007 -425 428 -0.001040740740740739 -425 429 -0.009259259259259182 -425 430 6.288372600415926e-18 -425 431 0.0002814814814814605 -425 432 -1.647987302177967e-16 -425 1024 0.0005000000000000012 -425 1025 -0.001040740740740752 -425 1026 0.009259259259259365 -425 1027 -4.336808689942018e-18 -425 1028 -0.002362962962962963 -425 1029 0.03703703703703699 -425 1030 -0.0004999999999999969 -425 1031 -0.001040740740740718 -425 1032 0.00925925925925913 -426 415 -0.01296296296296301 -426 416 -0.01342592592592606 -426 417 -0.1551783264746239 -426 418 -0.02407407407407398 -426 419 7.979727989493313e-17 -426 420 -0.1063100137174166 -426 421 3.469446951953614e-17 -426 422 -0.02870370370370363 -426 423 -0.204046639231825 -426 424 -1.734723475976807e-16 -426 425 -3.469446951953614e-17 -426 426 1.241426611796981 -426 427 0.01296296296296298 -426 428 -0.01342592592592588 -426 429 -0.1551783264746225 -426 430 0.02407407407407415 -426 431 -2.602085213965211e-17 -426 432 -0.1063100137174245 -426 1024 -0.01296296296296301 -426 1025 0.01342592592592601 -426 1026 -0.1551783264746238 -426 1027 2.203098814490545e-16 -426 1028 0.02870370370370391 -426 1029 -0.2040466392318244 -426 1030 0.0129629629629628 -426 1031 0.01342592592592562 -426 1032 -0.1551783264746202 -427 427 1 -428 428 1 -429 421 -0.01203703703703701 -429 422 -0.01342592592592587 -429 423 -0.05315500685871254 -429 424 -0.01296296296296297 -429 425 0.01342592592592592 -429 426 -0.1551783264746225 -429 427 1.214306433183765e-17 -429 428 -0.0287037037037036 -429 429 0.6207133058984897 -429 430 -5.898059818321144e-17 -429 431 0.0287037037037035 -429 432 -0.204046639231822 -429 433 0.01203703703703702 -429 434 -0.01342592592592593 -429 435 -0.05315500685870936 -429 436 0.01296296296296301 -429 437 0.01342592592592599 -429 438 -0.1551783264746234 -430 421 -0.0009703703703703701 -430 422 -0.0004999999999999994 -430 423 -0.008333333333333321 -430 424 -0.001659259259259285 -430 425 6.288372600415926e-18 -430 426 -0.03333333333333331 -430 427 -0.0002814814814814696 -430 428 7.589415207398531e-19 -430 429 1.040834085586084e-17 -430 430 0.007762962962962976 -430 431 -1.11672823766007e-17 -430 432 -3.469446951953614e-18 -430 433 -0.000970370370370368 -430 434 0.0004999999999999994 -430 435 0.008333333333333333 -430 436 -0.001659259259259265 -430 437 2.927345865710862e-18 -430 438 0.03333333333333333 -430 1027 -0.0009703703703703823 -430 1028 0.0005000000000000032 -430 1029 -0.008333333333333331 -430 1030 -0.0002814814814814746 -430 1031 -4.445228907190568e-18 -430 1032 -1.908195823574488e-17 -430 1033 -0.0009703703703703618 -430 1034 -0.0004999999999999975 -430 1035 0.008333333333333321 -431 421 -0.0004999999999999995 -431 422 -0.001040740740740734 -431 423 -0.009259259259259165 -431 424 6.288372600415926e-18 -431 425 0.0002814814814814605 -431 426 2.029626466892864e-16 -431 427 7.589415207398531e-19 -431 428 -0.002362962962962947 -431 429 -0.03703703703703691 -431 430 -1.11672823766007e-17 -431 431 0.008325925925925915 -431 432 1.595945597898663e-16 -431 433 0.0004999999999999994 -431 434 -0.001040740740740737 -431 435 -0.009259259259259273 -431 436 3.035766082959412e-18 -431 437 0.0002814814814814779 -431 438 -6.418476861114186e-17 -431 1027 0.0005000000000000032 -431 1028 -0.001040740740740759 -431 1029 0.009259259259259297 -431 1030 -4.553649124439119e-18 -431 1031 -0.002362962962962954 -431 1032 0.03703703703703692 -431 1033 -0.0004999999999999974 -431 1034 -0.001040740740740724 -431 1035 0.00925925925925917 -432 421 -0.01296296296296291 -432 422 -0.0134259259259258 -432 423 -0.1551783264746217 -432 424 -0.02407407407407393 -432 425 -9.367506770274758e-17 -432 426 -0.1063100137174245 -432 427 1.214306433183765e-17 -432 428 -0.02870370370370353 -432 429 -0.204046639231822 -432 430 -2.324529457808922e-16 -432 431 -7.28583859910259e-17 -432 432 1.24142661179698 -432 433 0.01296296296296292 -432 434 -0.01342592592592588 -432 435 -0.1551783264746224 -432 436 0.02407407407407418 -432 437 6.938893903907228e-17 -432 438 -0.1063100137174216 -432 1027 -0.01296296296296309 -432 1028 0.01342592592592617 -432 1029 -0.1551783264746251 -432 1030 2.203098814490545e-16 -432 1031 0.02870370370370347 -432 1032 -0.2040466392318226 -432 1033 0.01296296296296283 -432 1034 0.01342592592592566 -432 1035 -0.1551783264746202 -433 433 1 -434 434 1 -435 427 -0.01203703703703708 -435 428 -0.01342592592592592 -435 429 -0.05315500685870935 -435 430 -0.01296296296296296 -435 431 0.01342592592592587 -435 432 -0.1551783264746224 -435 433 1.335737076502141e-16 -435 434 -0.02870370370370381 -435 435 0.6207133058984935 -435 436 -6.071532165918825e-17 -435 437 0.02870370370370359 -435 438 -0.2040466392318256 -435 439 0.01203703703703694 -435 440 -0.01342592592592598 -435 441 -0.05315500685871193 -435 442 0.01296296296296302 -435 443 0.01342592592592627 -435 444 -0.1551783264746243 -436 427 -0.0009703703703703724 -436 428 -0.0005000000000000008 -436 429 -0.008333333333333333 -436 430 -0.001659259259259265 -436 431 3.035766082959412e-18 -436 432 -0.03333333333333331 -436 433 -0.000281481481481487 -436 434 2.276824562219559e-18 -436 435 -1.734723475976807e-18 -436 436 0.007762962962962947 -436 437 -5.637851296924623e-18 -436 438 -6.938893903907228e-18 -436 439 -0.0009703703703703645 -436 440 0.0004999999999999985 -436 441 0.008333333333333335 -436 442 -0.001659259259259238 -436 443 1.951563910473908e-18 -436 444 0.03333333333333333 -436 1030 -0.0009703703703703799 -436 1031 0.0005000000000000024 -436 1032 -0.008333333333333331 -436 1033 -0.0002814814814814803 -436 1034 -4.553649124439119e-18 -436 1035 -1.214306433183765e-17 -436 1036 -0.0009703703703703614 -436 1037 -0.0004999999999999972 -436 1038 0.008333333333333335 -437 427 -0.0005000000000000007 -437 428 -0.001040740740740746 -437 429 -0.009259259259259309 -437 430 2.927345865710862e-18 -437 431 0.000281481481481478 -437 432 1.214306433183765e-16 -437 433 2.276824562219559e-18 -437 434 -0.00236296296296297 -437 435 -0.03703703703703708 -437 436 -5.746271514173174e-18 -437 437 0.008325925925925905 -437 438 1.283695372222837e-16 -437 439 0.0004999999999999983 -437 440 -0.001040740740740731 -437 441 -0.009259259259259285 -437 442 2.168404344971009e-18 -437 443 0.000281481481481505 -437 444 -1.647987302177967e-16 -437 1030 0.0005000000000000026 -437 1031 -0.001040740740740756 -437 1032 0.0092592592592593 -437 1033 -4.445228907190568e-18 -437 1034 -0.002362962962962962 -437 1035 0.03703703703703694 -437 1036 -0.0004999999999999974 -437 1037 -0.001040740740740724 -437 1038 0.009259259259259172 -438 427 -0.01296296296296298 -438 428 -0.01342592592592601 -438 429 -0.1551783264746234 -438 430 -0.02407407407407393 -438 431 2.602085213965211e-17 -438 432 -0.1063100137174216 -438 433 6.245004513516506e-17 -438 434 -0.02870370370370399 -438 435 -0.2040466392318256 -438 436 -3.538835890992686e-16 -438 437 -4.336808689942018e-17 -438 438 1.241426611796978 -438 439 0.01296296296296292 -438 440 -0.01342592592592562 -438 441 -0.1551783264746217 -438 442 0.0240740740740743 -438 443 8.673617379884035e-18 -438 444 -0.1063100137174175 -438 1030 -0.01296296296296305 -438 1031 0.0134259259259261 -438 1032 -0.155178326474624 -438 1033 1.821459649775647e-16 -438 1034 0.02870370370370382 -438 1035 -0.2040466392318234 -438 1036 0.01296296296296285 -438 1037 0.01342592592592571 -438 1038 -0.1551783264746202 -439 439 1 -440 440 1 -441 433 -0.01203703703703709 -441 434 -0.01342592592592596 -441 435 -0.05315500685871193 -441 436 -0.01296296296296288 -441 437 0.01342592592592597 -441 438 -0.1551783264746217 -441 439 8.500145032286355e-17 -441 440 -0.02870370370370348 -441 441 0.6207133058984922 -441 442 -1.092875789865388e-16 -441 443 0.02870370370370331 -441 444 -0.2040466392318223 -441 445 0.012037037037037 -441 446 -0.01342592592592587 -441 447 -0.05315500685871331 -441 448 0.01296296296296299 -441 449 0.01342592592592604 -441 450 -0.1551783264746229 -442 433 -0.0009703703703703754 -442 434 -0.0005000000000000017 -442 435 -0.008333333333333331 -442 436 -0.001659259259259238 -442 437 2.059984127722458e-18 -442 438 -0.03333333333333333 -442 439 -0.0002814814814814709 -442 440 2.818925648462312e-18 -442 441 -1.734723475976807e-18 -442 442 0.007762962962962971 -442 443 1.843143693225358e-18 -442 445 -0.0009703703703703695 -442 446 0.0004999999999999989 -442 447 0.008333333333333333 -442 448 -0.001659259259259292 -442 449 -3.903127820947816e-18 -442 450 0.03333333333333334 -442 1033 -0.000970370370370379 -442 1034 0.0005000000000000027 -442 1035 -0.008333333333333331 -442 1036 -0.0002814814814814696 -442 1037 -1.626303258728257e-18 -442 1038 -3.469446951953614e-18 -442 1039 -0.0009703703703703761 -442 1040 -0.0005000000000000011 -442 1041 0.008333333333333333 -443 433 -0.0005000000000000016 -443 434 -0.001040740740740753 -443 435 -0.009259259259259378 -443 436 2.059984127722458e-18 -443 437 0.0002814814814815049 -443 438 -5.551115123125783e-17 -443 439 2.818925648462312e-18 -443 440 -0.002362962962962949 -443 441 -0.03703703703703681 -443 442 1.734723475976807e-18 -443 443 0.008325925925925922 -443 444 4.163336342344337e-16 -443 445 0.000499999999999999 -443 446 -0.00104074074074073 -443 447 -0.009259259259259167 -443 448 -4.011548038196366e-18 -443 449 0.0002814814814814538 -443 450 1.387778780781446e-17 -443 1033 0.0005000000000000026 -443 1034 -0.001040740740740759 -443 1035 0.009259259259259319 -443 1036 -1.517883041479706e-18 -443 1037 -0.002362962962962947 -443 1038 0.03703703703703694 -443 1039 -0.000500000000000001 -443 1040 -0.001040740740740743 -443 1041 0.009259259259259158 -444 433 -0.01296296296296306 -444 434 -0.01342592592592592 -444 435 -0.1551783264746243 -444 436 -0.02407407407407394 -444 437 -5.204170427930421e-18 -444 438 -0.1063100137174175 -444 439 1.509209424099822e-16 -444 440 -0.02870370370370375 -444 441 -0.2040466392318223 -444 442 -1.630640067418199e-16 -444 443 -2.775557561562891e-17 -444 444 1.241426611796979 -444 445 0.01296296296296291 -444 446 -0.01342592592592569 -444 447 -0.1551783264746213 -444 448 0.0240740740740741 -444 449 -2.081668171172169e-17 -444 450 -0.1063100137174254 -444 1033 -0.01296296296296308 -444 1034 0.01342592592592618 -444 1035 -0.1551783264746243 -444 1036 8.500145032286355e-17 -444 1037 0.02870370370370318 -444 1038 -0.2040466392318215 -444 1039 0.01296296296296299 -444 1040 0.01342592592592603 -444 1041 -0.1551783264746228 -445 445 1 -446 446 1 -447 439 -0.01203703703703709 -447 440 -0.01342592592592586 -447 441 -0.05315500685871332 -447 442 -0.01296296296296291 -447 443 0.01342592592592586 -447 444 -0.1551783264746213 -447 445 -3.989863994746656e-17 -447 446 -0.02870370370370348 -447 447 0.6207133058984866 -447 448 4.336808689942018e-17 -447 449 0.02870370370370368 -447 450 -0.2040466392318206 -447 451 0.01203703703703713 -447 452 -0.01342592592592589 -447 453 -0.0531550068587105 -447 454 0.01296296296296286 -447 455 0.01342592592592569 -447 456 -0.1551783264746207 -448 439 -0.0009703703703703761 -448 440 -0.000500000000000001 -448 441 -0.008333333333333333 -448 442 -0.001659259259259292 -448 443 -4.011548038196366e-18 -448 444 -0.03333333333333333 -448 445 -0.0002814814814814641 -448 446 -9.75781955236954e-19 -448 448 0.007762962962962975 -448 449 -3.903127820947816e-18 -448 450 -1.040834085586084e-17 -448 451 -0.0009703703703703777 -448 452 0.000500000000000002 -448 453 0.008333333333333335 -448 454 -0.001659259259259267 -448 455 7.914675859144182e-18 -448 456 0.03333333333333334 -448 1036 -0.0009703703703703695 -448 1037 0.0004999999999999991 -448 1038 -0.008333333333333331 -448 1039 -0.0002814814814814643 -448 1040 -1.192622389734055e-18 -448 1041 -1.734723475976807e-18 -448 1042 -0.0009703703703703643 -448 1043 -0.000499999999999998 -448 1044 0.008333333333333333 -449 439 -0.0005000000000000011 -449 440 -0.001040740740740743 -449 441 -0.009259259259259222 -449 442 -3.903127820947816e-18 -449 443 0.0002814814814814537 -449 444 -2.0643209364124e-16 -449 445 -1.084202172485504e-18 -449 446 -0.002362962962962941 -449 447 -0.03703703703703688 -449 448 -3.903127820947816e-18 -449 449 0.008325925925925903 -449 450 -2.255140518769849e-16 -449 451 0.0005000000000000022 -449 452 -0.001040740740740753 -449 453 -0.009259259259259287 -449 454 7.914675859144182e-18 -449 455 0.0002814814814814751 -449 456 -1.682681771697503e-16 -449 1036 0.0004999999999999989 -449 1037 -0.00104074074074073 -449 1038 0.009259259259259103 -449 1039 -9.75781955236954e-19 -449 1040 -0.002362962962962941 -449 1041 0.0370370370370367 -449 1042 -0.0004999999999999981 -449 1043 -0.001040740740740726 -449 1044 0.009259259259259186 -450 439 -0.01296296296296299 -450 440 -0.01342592592592586 -450 441 -0.1551783264746229 -450 442 -0.02407407407407411 -450 443 1.734723475976807e-18 -450 444 -0.1063100137174254 -450 445 -3.989863994746656e-17 -450 446 -0.02870370370370319 -450 447 -0.2040466392318207 -450 448 8.673617379884035e-18 -450 449 -9.020562075079397e-17 -450 450 1.241426611796977 -450 451 0.01296296296296303 -450 452 -0.01342592592592611 -450 453 -0.1551783264746238 -450 454 0.02407407407407409 -450 455 2.255140518769849e-17 -450 456 -0.1063100137174219 -450 1036 -0.01296296296296291 -450 1037 0.01342592592592586 -450 1038 -0.1551783264746213 -450 1039 4.336808689942018e-17 -450 1040 0.02870370370370369 -450 1041 -0.2040466392318206 -450 1042 0.01296296296296286 -450 1043 0.01342592592592569 -450 1044 -0.1551783264746206 -451 451 1 -452 452 1 -453 445 -0.01203703703703697 -453 446 -0.01342592592592591 -453 447 -0.0531550068587105 -453 448 -0.01296296296296303 -453 449 0.01342592592592605 -453 450 -0.1551783264746238 -453 451 -4.510281037539698e-17 -453 452 -0.02870370370370404 -453 453 0.6207133058984955 -453 454 5.204170427930421e-17 -453 455 0.02870370370370394 -453 456 -0.2040466392318295 -453 457 0.01203703703703701 -453 458 -0.01342592592592607 -453 459 -0.05315500685870744 -453 460 0.01296296296296298 -453 461 0.01342592592592604 -453 462 -0.1551783264746243 -454 445 -0.0009703703703703643 -454 446 -0.0004999999999999981 -454 447 -0.008333333333333333 -454 448 -0.001659259259259267 -454 449 8.023096076392733e-18 -454 450 -0.03333333333333333 -454 451 -0.0002814814814815044 -454 452 -3.035766082959412e-18 -454 453 -1.734723475976807e-18 -454 454 0.007762962962962947 -454 455 -1.1817803680092e-17 -454 456 -1.040834085586084e-17 -454 457 -0.0009703703703703693 -454 458 0.0005000000000000011 -454 459 0.008333333333333335 -454 460 -0.001659259259259198 -454 461 3.794707603699266e-18 -454 462 0.03333333333333333 -454 1039 -0.0009703703703703777 -454 1040 0.0005000000000000022 -454 1041 -0.008333333333333331 -454 1042 -0.0002814814814815045 -454 1043 -3.252606517456513e-18 -454 1045 -0.000970370370370363 -454 1046 -0.0004999999999999989 -454 1047 0.008333333333333333 -455 445 -0.000499999999999998 -455 446 -0.001040740740740726 -455 447 -0.009259259259259177 -455 448 7.914675859144182e-18 -455 449 0.0002814814814814751 -455 450 2.775557561562891e-16 -455 451 -3.252606517456513e-18 -455 452 -0.002362962962962994 -455 453 -0.03703703703703732 -455 454 -1.170938346284345e-17 -455 455 0.008325925925925955 -455 456 1.318389841742373e-16 -455 457 0.0005000000000000009 -455 458 -0.001040740740740756 -455 459 -0.009259259259259479 -455 460 4.119968255444917e-18 -455 461 0.000281481481481534 -455 462 -1.821459649775647e-16 -455 1039 0.000500000000000002 -455 1040 -0.001040740740740753 -455 1041 0.009259259259259297 -455 1042 -3.035766082959412e-18 -455 1043 -0.002362962962962994 -455 1044 0.03703703703703739 -455 1045 -0.0004999999999999991 -455 1046 -0.001040740740740743 -455 1047 0.009259259259259401 -456 445 -0.01296296296296287 -456 446 -0.01342592592592575 -456 447 -0.1551783264746207 -456 448 -0.02407407407407411 -456 449 -2.42861286636753e-17 -456 450 -0.1063100137174219 -456 451 -1.994931997373328e-16 -456 452 -0.02870370370370415 -456 453 -0.2040466392318295 -456 454 1.613292832658431e-16 -456 455 1.040834085586084e-17 -456 456 1.241426611796989 -456 457 0.01296296296296306 -456 458 -0.01342592592592612 -456 459 -0.1551783264746259 -456 460 0.02407407407407395 -456 461 1.734723475976807e-17 -456 462 -0.1063100137174137 -456 1039 -0.01296296296296303 -456 1040 0.01342592592592605 -456 1041 -0.1551783264746237 -456 1042 5.204170427930421e-17 -456 1043 0.02870370370370394 -456 1044 -0.2040466392318294 -456 1045 0.01296296296296298 -456 1046 0.01342592592592604 -456 1047 -0.1551783264746242 -457 457 1 -458 458 1 -459 451 -0.01203703703703693 -459 452 -0.01342592592592609 -459 453 -0.05315500685870744 -459 454 -0.01296296296296307 -459 455 0.01342592592592622 -459 456 -0.1551783264746259 -459 457 -1.405126015541214e-16 -459 458 -0.02870370370370386 -459 459 0.6207133058984953 -459 460 1.43982048506075e-16 -459 461 0.02870370370370375 -459 462 -0.2040466392318276 -459 463 0.01203703703703708 -459 464 -0.01342592592592586 -459 465 -0.05315500685871287 -459 466 0.01296296296296292 -459 467 0.01342592592592584 -459 468 -0.1551783264746216 -460 451 -0.0009703703703703627 -460 452 -0.000499999999999999 -460 453 -0.008333333333333333 -460 454 -0.001659259259259198 -460 455 4.011548038196366e-18 -460 456 -0.03333333333333333 -460 457 -0.0002814814814814935 -460 458 -1.626303258728257e-18 -460 459 -1.734723475976807e-18 -460 460 0.007762962962962955 -460 461 -6.722053469410127e-18 -460 462 -3.469446951953614e-18 -460 463 -0.000970370370370375 -460 464 0.0005000000000000007 -460 465 0.008333333333333333 -460 466 -0.001659259259259292 -460 467 2.710505431213761e-18 -460 468 0.03333333333333334 -460 1042 -0.0009703703703703694 -460 1043 0.0005000000000000009 -460 1044 -0.008333333333333333 -460 1045 -0.0002814814814814936 -460 1046 -1.517883041479706e-18 -460 1047 -1.734723475976807e-18 -460 1048 -0.0009703703703703707 -460 1049 -0.0004999999999999994 -460 1050 0.008333333333333333 -461 451 -0.0004999999999999989 -461 452 -0.001040740740740743 -461 453 -0.009259259259259424 -461 454 3.794707603699266e-18 -461 455 0.000281481481481534 -461 456 3.642919299551295e-17 -461 457 -1.409462824231156e-18 -461 458 -0.002362962962962979 -461 459 -0.03703703703703717 -461 460 -6.938893903907228e-18 -461 461 0.008325925925925941 -461 462 1.422473250300982e-16 -461 463 0.0005000000000000008 -461 464 -0.001040740740740741 -461 465 -0.009259259259259198 -461 466 2.602085213965211e-18 -461 467 0.0002814814814814539 -461 468 -1.058181320345852e-16 -461 1042 0.0005000000000000011 -461 1043 -0.001040740740740756 -461 1044 0.009259259259259457 -461 1045 -1.517883041479706e-18 -461 1046 -0.002362962962962979 -461 1047 0.03703703703703724 -461 1048 -0.0004999999999999994 -461 1049 -0.001040740740740732 -461 1050 0.009259259259259129 -462 451 -0.01296296296296298 -462 452 -0.01342592592592594 -462 453 -0.1551783264746243 -462 454 -0.02407407407407396 -462 455 -1.214306433183765e-17 -462 456 -0.1063100137174137 -462 457 3.469446951953614e-18 -462 458 -0.02870370370370398 -462 459 -0.2040466392318276 -462 460 -1.405126015541214e-16 -462 461 1.214306433183765e-17 -462 462 1.241426611796988 -462 463 0.01296296296296298 -462 464 -0.01342592592592588 -462 465 -0.1551783264746227 -462 466 0.0240740740740741 -462 467 1.734723475976807e-18 -462 468 -0.1063100137174254 -462 1042 -0.01296296296296306 -462 1043 0.01342592592592622 -462 1044 -0.1551783264746258 -462 1045 1.43982048506075e-16 -462 1046 0.02870370370370376 -462 1047 -0.2040466392318275 -462 1048 0.01296296296296292 -462 1049 0.01342592592592583 -462 1050 -0.1551783264746215 -463 463 1 -464 464 1 -465 457 -0.01203703703703702 -465 458 -0.01342592592592587 -465 459 -0.05315500685871287 -465 460 -0.01296296296296297 -465 461 0.01342592592592596 -465 462 -0.1551783264746226 -465 463 -1.214306433183765e-16 -465 464 -0.02870370370370347 -465 465 0.6207133058984873 -465 466 1.249000902703301e-16 -465 467 0.02870370370370359 -465 468 -0.2040466392318206 -465 469 0.01203703703703714 -465 470 -0.01342592592592589 -465 471 -0.05315500685871064 -465 472 0.01296296296296285 -465 473 0.01342592592592568 -465 474 -0.1551783264746204 -466 457 -0.0009703703703703707 -466 458 -0.0004999999999999994 -466 459 -0.008333333333333333 -466 460 -0.001659259259259292 -466 461 2.602085213965211e-18 -466 462 -0.03333333333333333 -466 463 -0.0002814814814814642 -466 464 -3.035766082959412e-18 -466 466 0.007762962962962976 -466 467 -1.1817803680092e-17 -466 468 -1.040834085586084e-17 -466 469 -0.0009703703703703787 -466 470 0.0005000000000000024 -466 471 0.008333333333333335 -466 472 -0.001659259259259267 -466 473 9.215718466126788e-18 -466 474 0.03333333333333334 -466 1045 -0.000970370370370375 -466 1046 0.0005000000000000008 -466 1047 -0.008333333333333331 -466 1048 -0.0002814814814814643 -466 1049 -3.144186300207963e-18 -466 1050 -1.734723475976807e-18 -466 1051 -0.0009703703703703633 -466 1052 -0.0004999999999999976 -466 1053 0.008333333333333333 -467 457 -0.0004999999999999995 -467 458 -0.001040740740740732 -467 459 -0.009259259259259162 -467 460 2.818925648462312e-18 -467 461 0.0002814814814814539 -467 462 4.163336342344337e-17 -467 463 -3.144186300207963e-18 -467 464 -0.00236296296296294 -467 465 -0.03703703703703686 -467 466 -1.1817803680092e-17 -467 467 0.008325925925925903 -467 468 -1.179611963664229e-16 -467 469 0.0005000000000000025 -467 470 -0.001040740740740755 -467 471 -0.009259259259259304 -467 472 9.324138683375338e-18 -467 473 0.0002814814814814751 -467 474 -2.272487753529617e-16 -467 1045 0.0005000000000000007 -467 1046 -0.001040740740740741 -467 1047 0.009259259259259167 -467 1048 -3.035766082959412e-18 -467 1049 -0.00236296296296294 -467 1050 0.03703703703703673 -467 1051 -0.0004999999999999977 -467 1052 -0.001040740740740724 -467 1053 0.00925925925925917 -468 457 -0.01296296296296292 -468 458 -0.01342592592592576 -468 459 -0.1551783264746216 -468 460 -0.02407407407407411 -468 461 -1.561251128379126e-17 -468 462 -0.1063100137174254 -468 463 -1.231653667943533e-16 -468 464 -0.02870370370370328 -468 465 -0.2040466392318207 -468 466 1.387778780781446e-17 -468 467 -7.632783294297951e-17 -468 468 1.241426611796977 -468 469 0.01296296296296305 -468 470 -0.01342592592592612 -468 471 -0.155178326474624 -468 472 0.02407407407407409 -468 473 2.602085213965211e-17 -468 474 -0.1063100137174218 -468 1045 -0.01296296296296297 -468 1046 0.01342592592592595 -468 1047 -0.1551783264746225 -468 1048 1.249000902703301e-16 -468 1049 0.0287037037037036 -468 1050 -0.2040466392318206 -468 1051 0.01296296296296285 -468 1052 0.01342592592592568 -468 1053 -0.1551783264746204 -469 469 1 -470 470 1 -471 463 -0.01203703703703695 -471 464 -0.01342592592592592 -471 465 -0.05315500685871065 -471 466 -0.01296296296296305 -471 467 0.01342592592592609 -471 468 -0.155178326474624 -471 469 1.734723475976807e-17 -471 470 -0.02870370370370361 -471 471 0.6207133058984924 -471 472 -1.214306433183765e-17 -471 473 0.02870370370370322 -471 474 -0.2040466392318226 -471 475 0.01203703703703694 -471 476 -0.01342592592592592 -471 477 -0.05315500685871079 -471 478 0.01296296296296306 -471 479 0.01342592592592614 -471 480 -0.1551783264746243 -472 463 -0.0009703703703703633 -472 464 -0.0004999999999999977 -472 465 -0.008333333333333333 -472 466 -0.001659259259259267 -472 467 9.324138683375338e-18 -472 468 -0.03333333333333333 -472 469 -0.0002814814814814748 -472 470 3.252606517456513e-19 -472 471 -1.734723475976807e-18 -472 472 0.007762962962962968 -472 473 1.409462824231156e-18 -472 474 -1.040834085586084e-17 -472 475 -0.0009703703703703621 -472 476 0.0004999999999999974 -472 477 0.008333333333333335 -472 478 -0.001659259259259267 -472 479 -1.073360150760649e-17 -472 480 0.03333333333333334 -472 1048 -0.0009703703703703787 -472 1049 0.0005000000000000025 -472 1050 -0.008333333333333331 -472 1051 -0.0002814814814814748 -472 1052 1.084202172485504e-19 -472 1053 -1.734723475976807e-18 -472 1054 -0.0009703703703703798 -472 1055 -0.0005000000000000026 -472 1056 0.008333333333333333 -473 463 -0.0004999999999999976 -473 464 -0.001040740740740724 -473 465 -0.009259259259259172 -473 466 9.215718466126788e-18 -473 467 0.0002814814814814751 -473 468 2.931682674400804e-16 -473 469 1.084202172485504e-19 -473 470 -0.002362962962962955 -473 471 -0.03703703703703684 -473 472 1.301042606982605e-18 -473 473 0.008325925925925917 -473 474 5.759281940243e-16 -473 475 0.0004999999999999974 -473 476 -0.001040740740740722 -473 477 -0.009259259259259169 -473 478 -1.073360150760649e-17 -473 479 0.0002814814814814751 -473 480 3.070460552478949e-16 -473 1048 0.0005000000000000024 -473 1049 -0.001040740740740755 -473 1050 0.0092592592592593 -473 1051 3.252606517456513e-19 -473 1052 -0.002362962962962955 -473 1053 0.03703703703703706 -473 1054 -0.0005000000000000027 -473 1055 -0.001040740740740757 -473 1056 0.009259259259259304 -474 463 -0.01296296296296285 -474 464 -0.01342592592592571 -474 465 -0.1551783264746205 -474 466 -0.02407407407407411 -474 467 -3.122502256758253e-17 -474 468 -0.1063100137174219 -474 469 1.561251128379126e-17 -474 470 -0.02870370370370402 -474 471 -0.2040466392318226 -474 472 1.387778780781446e-17 -474 473 1.734723475976807e-18 -474 474 1.241426611796978 -474 475 0.01296296296296284 -474 476 -0.01342592592592566 -474 477 -0.1551783264746202 -474 478 0.0240740740740741 -474 479 -3.642919299551295e-17 -474 480 -0.1063100137174218 -474 1048 -0.01296296296296305 -474 1049 0.01342592592592609 -474 1050 -0.155178326474624 -474 1051 -1.040834085586084e-17 -474 1052 0.02870370370370322 -474 1053 -0.2040466392318225 -474 1054 0.01296296296296306 -474 1055 0.01342592592592614 -474 1056 -0.1551783264746242 -475 475 1 -476 476 1 -477 469 -0.01203703703703716 -477 470 -0.01342592592592589 -477 471 -0.05315500685871079 -477 472 -0.01296296296296284 -477 473 0.01342592592592567 -477 474 -0.1551783264746202 -477 475 1.769417945496343e-16 -477 476 -0.02870370370370389 -477 477 0.6207133058984922 -477 478 -1.734723475976807e-16 -477 479 0.02870370370370412 -477 480 -0.2040466392318276 -477 481 0.01203703703703699 -477 482 -0.01342592592592603 -477 483 -0.05315500685870887 -477 484 0.01296296296296301 -477 485 0.01342592592592602 -477 486 -0.1551783264746247 -478 469 -0.0009703703703703799 -478 470 -0.0005000000000000027 -478 471 -0.008333333333333333 -478 472 -0.001659259259259267 -478 473 -1.073360150760649e-17 -478 474 -0.03333333333333333 -478 475 -0.0002814814814814937 -478 476 2.38524477946811e-18 -478 477 -1.734723475976807e-18 -478 478 0.007762962962962956 -478 479 9.324138683375338e-18 -478 480 -1.040834085586084e-17 -478 481 -0.0009703703703703689 -478 482 0.0005000000000000003 -478 483 0.008333333333333333 -478 484 -0.001659259259259223 -478 485 1.409462824231156e-18 -478 486 0.03333333333333333 -478 1051 -0.0009703703703703621 -478 1052 0.0004999999999999974 -478 1053 -0.008333333333333331 -478 1054 -0.0002814814814814938 -478 1055 2.276824562219559e-18 -478 1057 -0.0009703703703703668 -478 1058 -0.0004999999999999997 -478 1059 0.008333333333333333 -479 469 -0.0005000000000000026 -479 470 -0.001040740740740757 -479 471 -0.009259259259259316 -479 472 -1.062518129035794e-17 -479 473 0.0002814814814814751 -479 474 -2.844946500601964e-16 -479 475 2.38524477946811e-18 -479 476 -0.00236296296296298 -479 477 -0.03703703703703728 -479 478 9.324138683375338e-18 -479 479 0.008325925925925941 -479 480 -3.191891195797325e-16 -479 481 0.0005000000000000003 -479 482 -0.001040740740740748 -479 483 -0.009259259259259377 -479 484 1.301042606982605e-18 -479 485 0.0002814814814815128 -479 486 -6.765421556309548e-17 -479 1051 0.0004999999999999974 -479 1052 -0.001040740740740722 -479 1053 0.009259259259259156 -479 1054 2.38524477946811e-18 -479 1055 -0.00236296296296298 -479 1056 0.03703703703703713 -479 1057 -0.0004999999999999997 -479 1058 -0.001040740740740744 -479 1059 0.009259259259259358 -480 469 -0.01296296296296306 -480 470 -0.01342592592592613 -480 471 -0.1551783264746243 -480 472 -0.02407407407407411 -480 473 2.775557561562891e-17 -480 474 -0.1063100137174218 -480 475 2.42861286636753e-17 -480 476 -0.02870370370370362 -480 477 -0.2040466392318276 -480 478 1.578598363138894e-16 -480 479 -3.122502256758253e-17 -480 480 1.241426611796988 -480 481 0.01296296296296304 -480 482 -0.01342592592592605 -480 483 -0.1551783264746252 -480 484 0.02407407407407395 -480 485 1.040834085586084e-17 -480 486 -0.1063100137174172 -480 1051 -0.01296296296296284 -480 1052 0.01342592592592566 -480 1053 -0.1551783264746201 -480 1054 -1.700029006457271e-16 -480 1055 0.02870370370370412 -480 1056 -0.2040466392318275 -480 1057 0.01296296296296301 -480 1058 0.01342592592592602 -480 1059 -0.1551783264746246 -481 481 1 -482 482 1 -483 475 -0.01203703703703696 -483 476 -0.01342592592592604 -483 477 -0.05315500685870887 -483 478 -0.01296296296296304 -483 479 0.01342592592592608 -483 480 -0.1551783264746252 -483 481 -8.500145032286355e-17 -483 482 -0.02870370370370386 -483 483 0.6207133058984959 -483 484 9.194034422677078e-17 -483 485 0.02870370370370369 -483 486 -0.2040466392318276 -483 487 0.01203703703703705 -483 488 -0.01342592592592591 -483 489 -0.05315500685871197 -483 490 0.01296296296296295 -483 491 0.01342592592592604 -483 492 -0.1551783264746222 -484 475 -0.0009703703703703668 -484 476 -0.0004999999999999998 -484 477 -0.008333333333333333 -484 478 -0.001659259259259223 -484 479 1.409462824231156e-18 -484 480 -0.03333333333333333 -484 481 -0.0002814814814814937 -484 482 -2.168404344971009e-19 -484 484 0.007762962962962956 -484 485 -1.409462824231156e-18 -484 486 -6.938893903907228e-18 -484 487 -0.000970370370370371 -484 488 0.0005 -484 489 0.008333333333333335 -484 490 -0.001659259259259267 -484 492 0.03333333333333334 -484 1054 -0.0009703703703703689 -484 1055 0.0005000000000000003 -484 1056 -0.008333333333333333 -484 1057 -0.0002814814814814937 -484 1058 -3.252606517456513e-19 -484 1059 -1.734723475976807e-18 -484 1060 -0.000970370370370371 -484 1061 -0.0005 -484 1062 0.008333333333333333 -485 475 -0.0004999999999999998 -485 476 -0.001040740740740744 -485 477 -0.009259259259259358 -485 478 1.409462824231156e-18 -485 479 0.0002814814814815129 -485 480 5.204170427930421e-18 -485 481 -3.252606517456513e-19 -485 482 -0.002362962962962979 -485 483 -0.03703703703703715 -485 484 -1.301042606982605e-18 -485 485 0.008325925925925941 -485 486 2.289834988289385e-16 -485 487 0.0005000000000000001 -485 488 -0.00104074074074074 -485 489 -0.009259259259259287 -485 491 0.0002814814814814751 -485 492 -1.595945597898663e-16 -485 1054 0.0005000000000000003 -485 1055 -0.001040740740740748 -485 1056 0.009259259259259377 -485 1057 -3.252606517456513e-19 -485 1058 -0.002362962962962979 -485 1059 0.03703703703703727 -485 1060 -0.0005 -485 1061 -0.00104074074074074 -485 1062 0.009259259259259189 -486 475 -0.01296296296296301 -486 476 -0.013425925925926 -486 477 -0.1551783264746247 -486 478 -0.02407407407407396 -486 479 3.469446951953614e-18 -486 480 -0.1063100137174172 -486 481 6.071532165918825e-17 -486 482 -0.02870370370370405 -486 483 -0.2040466392318276 -486 484 -1.370431546021678e-16 -486 485 1.561251128379126e-17 -486 486 1.241426611796988 -486 487 0.01296296296296295 -486 488 -0.01342592592592576 -486 489 -0.1551783264746222 -486 490 0.02407407407407409 -486 491 -2.255140518769849e-17 -486 492 -0.1063100137174218 -486 1054 -0.01296296296296304 -486 1055 0.01342592592592608 -486 1056 -0.1551783264746252 -486 1057 8.847089727481716e-17 -486 1058 0.02870370370370369 -486 1059 -0.2040466392318275 -486 1060 0.01296296296296295 -486 1061 0.01342592592592604 -486 1062 -0.1551783264746222 -487 487 1 -488 488 1 -489 481 -0.01203703703703705 -489 482 -0.01342592592592591 -489 483 -0.05315500685871197 -489 484 -0.01296296296296295 -489 485 0.01342592592592604 -489 486 -0.1551783264746222 -489 487 -6.938893903907228e-18 -489 488 -0.02870370370370346 -489 489 0.6207133058984895 -489 490 1.561251128379126e-17 -489 491 0.02870370370370334 -489 492 -0.2040466392318207 -489 493 0.01203703703703706 -489 494 -0.01342592592592586 -489 495 -0.05315500685871273 -489 496 0.01296296296296294 -489 497 0.01342592592592585 -489 498 -0.1551783264746219 -490 481 -0.000970370370370371 -490 482 -0.0005000000000000001 -490 483 -0.008333333333333333 -490 484 -0.001659259259259267 -490 486 -0.03333333333333333 -490 487 -0.0002814814814814643 -490 488 -2.168404344971009e-19 -490 489 -1.734723475976807e-18 -490 490 0.007762962962962976 -490 491 -1.409462824231156e-18 -490 492 -6.938893903907228e-18 -490 493 -0.0009703703703703739 -490 494 0.0005000000000000003 -490 495 0.008333333333333333 -490 496 -0.001659259259259292 -490 497 1.409462824231156e-18 -490 498 0.03333333333333334 -490 1057 -0.000970370370370371 -490 1058 0.0005 -490 1059 -0.008333333333333331 -490 1060 -0.0002814814814814642 -490 1061 -2.168404344971009e-19 -490 1062 -1.734723475976807e-18 -490 1063 -0.0009703703703703715 -490 1064 -0.0004999999999999998 -490 1065 0.008333333333333333 -491 481 -0.0005 -491 482 -0.00104074074074074 -491 483 -0.009259259259259285 -491 485 0.0002814814814814751 -491 486 -1.595945597898663e-16 -491 487 -3.252606517456513e-19 -491 488 -0.002362962962962941 -491 489 -0.03703703703703678 -491 490 -1.409462824231156e-18 -491 491 0.008325925925925903 -491 492 1.942890293094024e-16 -491 493 0.0005000000000000004 -491 494 -0.001040740740740739 -491 495 -0.009259259259259182 -491 496 1.409462824231156e-18 -491 497 0.0002814814814814538 -491 498 -4.683753385137379e-17 -491 1057 0.0005 -491 1058 -0.00104074074074074 -491 1059 0.009259259259259188 -491 1060 -3.252606517456513e-19 -491 1061 -0.00236296296296294 -491 1062 0.03703703703703681 -491 1063 -0.0004999999999999997 -491 1064 -0.001040740740740734 -491 1065 0.009259259259259143 -492 481 -0.01296296296296295 -492 482 -0.01342592592592576 -492 483 -0.1551783264746223 -492 484 -0.02407407407407411 -492 485 -2.255140518769849e-17 -492 486 -0.1063100137174218 -492 487 -1.214306433183765e-17 -492 488 -0.02870370370370354 -492 489 -0.2040466392318207 -492 490 1.387778780781446e-17 -492 491 -4.336808689942018e-17 -492 492 1.241426611796977 -492 493 0.01296296296296296 -492 494 -0.01342592592592587 -492 495 -0.1551783264746224 -492 496 0.0240740740740741 -492 497 1.734723475976807e-18 -492 498 -0.1063100137174254 -492 1057 -0.01296296296296295 -492 1058 0.01342592592592604 -492 1059 -0.1551783264746222 -492 1060 1.214306433183765e-17 -492 1061 0.02870370370370334 -492 1062 -0.2040466392318206 -492 1063 0.01296296296296293 -492 1064 0.01342592592592585 -492 1065 -0.1551783264746218 -493 493 1 -494 494 1 -495 487 -0.01203703703703704 -495 488 -0.01342592592592587 -495 489 -0.05315500685871273 -495 490 -0.01296296296296296 -495 491 0.01342592592592591 -495 492 -0.1551783264746224 -495 493 -9.71445146547012e-17 -495 494 -0.02870370370370351 -495 495 0.6207133058984868 -495 496 9.8879238130678e-17 -495 497 0.02870370370370367 -495 498 -0.2040466392318209 -495 499 0.01203703703703713 -495 500 -0.0134259259259259 -495 501 -0.05315500685871019 -495 502 0.01296296296296286 -495 503 0.0134259259259257 -495 504 -0.1551783264746207 -496 487 -0.0009703703703703718 -496 488 -0.0004999999999999997 -496 489 -0.008333333333333333 -496 490 -0.001659259259259292 -496 491 1.409462824231156e-18 -496 492 -0.03333333333333333 -496 493 -0.0002814814814814654 -496 494 -2.38524477946811e-18 -496 496 0.007762962962962975 -496 497 -9.215718466126788e-18 -496 498 -1.040834085586084e-17 -496 499 -0.0009703703703703775 -496 500 0.0005000000000000021 -496 501 0.008333333333333335 -496 502 -0.001659259259259264 -496 503 7.806255641895632e-18 -496 504 0.03333333333333334 -496 1060 -0.0009703703703703739 -496 1061 0.0005000000000000004 -496 1062 -0.008333333333333331 -496 1063 -0.0002814814814814656 -496 1064 -2.49366499671666e-18 -496 1065 -1.734723475976807e-18 -496 1066 -0.0009703703703703643 -496 1067 -0.000499999999999998 -496 1068 0.008333333333333335 -497 487 -0.0004999999999999998 -497 488 -0.001040740740740734 -497 489 -0.009259259259259165 -497 490 1.409462824231156e-18 -497 491 0.0002814814814814537 -497 492 2.602085213965211e-17 -497 493 -2.49366499671666e-18 -497 494 -0.002362962962962942 -497 495 -0.0370370370370369 -497 496 -9.215718466126788e-18 -497 497 0.008325925925925907 -497 498 -1.387778780781446e-16 -497 499 0.0005000000000000022 -497 500 -0.001040740740740754 -497 501 -0.009259259259259302 -497 502 8.023096076392733e-18 -497 503 0.0002814814814814777 -497 504 -1.578598363138894e-16 -497 1060 0.0005000000000000003 -497 1061 -0.001040740740740739 -497 1062 0.009259259259259162 -497 1063 -2.38524477946811e-18 -497 1064 -0.002362962962962942 -497 1065 0.03703703703703673 -497 1066 -0.0004999999999999982 -497 1067 -0.001040740740740727 -497 1068 0.009259259259259189 -498 487 -0.01296296296296293 -498 488 -0.01342592592592581 -498 489 -0.1551783264746219 -498 490 -0.02407407407407411 -498 491 -6.938893903907228e-18 -498 492 -0.1063100137174254 -498 493 -9.71445146547012e-17 -498 494 -0.02870370370370325 -498 495 -0.2040466392318209 -498 496 8.673617379884035e-18 -498 497 -1.110223024625157e-16 -498 498 1.241426611796977 -498 499 0.01296296296296303 -498 500 -0.01342592592592611 -498 501 -0.1551783264746238 -498 502 0.0240740740740741 -498 503 1.387778780781446e-17 -498 504 -0.1063100137174215 -498 1060 -0.01296296296296296 -498 1061 0.01342592592592591 -498 1062 -0.1551783264746223 -498 1063 9.71445146547012e-17 -498 1064 0.02870370370370367 -498 1065 -0.2040466392318208 -498 1066 0.01296296296296286 -498 1067 0.0134259259259257 -498 1068 -0.1551783264746207 -499 499 1 -500 500 1 -501 493 -0.01203703703703697 -501 494 -0.01342592592592592 -501 495 -0.05315500685871019 -501 496 -0.01296296296296303 -501 497 0.01342592592592606 -501 498 -0.1551783264746238 -501 499 -6.245004513516506e-17 -501 500 -0.02870370370370366 -501 501 0.6207133058984913 -501 502 7.112366251504909e-17 -501 503 0.02870370370370338 -501 504 -0.2040466392318228 -501 505 0.01203703703703703 -501 506 -0.01342592592592591 -501 507 -0.05315500685871182 -501 508 0.01296296296296296 -501 509 0.01342592592592605 -501 510 -0.1551783264746225 -502 493 -0.0009703703703703642 -502 494 -0.0004999999999999981 -502 495 -0.008333333333333333 -502 496 -0.001659259259259264 -502 497 8.023096076392733e-18 -502 498 -0.03333333333333333 -502 499 -0.0002814814814814761 -502 500 -1.734723475976807e-18 -502 501 -1.734723475976807e-18 -502 502 0.007762962962962968 -502 503 -6.613633252161577e-18 -502 504 -1.387778780781446e-17 -502 505 -0.0009703703703703698 -502 506 0.0004999999999999998 -502 507 0.008333333333333335 -502 508 -0.001659259259259267 -502 509 -1.409462824231156e-18 -502 510 0.03333333333333334 -502 1063 -0.0009703703703703776 -502 1064 0.0005000000000000022 -502 1065 -0.008333333333333331 -502 1066 -0.0002814814814814761 -502 1067 -1.951563910473908e-18 -502 1068 -3.469446951953614e-18 -502 1069 -0.0009703703703703721 -502 1070 -0.0005000000000000002 -502 1071 0.008333333333333333 -503 493 -0.000499999999999998 -503 494 -0.001040740740740727 -503 495 -0.009259259259259191 -503 496 7.806255641895632e-18 -503 497 0.0002814814814814777 -503 498 2.8796409701215e-16 -503 499 -1.843143693225358e-18 -503 500 -0.002362962962962956 -503 501 -0.03703703703703691 -503 502 -6.613633252161577e-18 -503 503 0.008325925925925919 -503 504 4.371503159461554e-16 -503 505 0.0004999999999999998 -503 506 -0.001040740740740737 -503 507 -0.009259259259259273 -503 508 -1.409462824231156e-18 -503 509 0.0002814814814814751 -503 510 -1.006139616066548e-16 -503 1063 0.0005000000000000021 -503 1064 -0.001040740740740754 -503 1065 0.009259259259259302 -503 1066 -1.517883041479706e-18 -503 1067 -0.002362962962962956 -503 1068 0.03703703703703702 -503 1069 -0.0005000000000000004 -503 1070 -0.001040740740740742 -503 1071 0.009259259259259203 -504 493 -0.01296296296296287 -504 494 -0.01342592592592575 -504 495 -0.1551783264746207 -504 496 -0.02407407407407411 -504 497 -3.122502256758253e-17 -504 498 -0.1063100137174214 -504 499 -6.938893903907228e-17 -504 500 -0.0287037037037039 -504 501 -0.2040466392318228 -504 502 1.387778780781446e-17 -504 503 -3.989863994746656e-17 -504 504 1.241426611796978 -504 505 0.01296296296296293 -504 506 -0.01342592592592575 -504 507 -0.155178326474622 -504 508 0.0240740740740741 -504 509 -2.081668171172169e-17 -504 510 -0.1063100137174218 -504 1063 -0.01296296296296303 -504 1064 0.01342592592592606 -504 1065 -0.1551783264746237 -504 1066 6.938893903907228e-17 -504 1067 0.02870370370370339 -504 1068 -0.2040466392318227 -504 1069 0.01296296296296296 -504 1070 0.01342592592592605 -504 1071 -0.1551783264746224 -505 505 1 -506 506 1 -507 499 -0.01203703703703706 -507 500 -0.01342592592592591 -507 501 -0.05315500685871184 -507 502 -0.01296296296296294 -507 503 0.01342592592592599 -507 504 -0.155178326474622 -507 505 9.194034422677078e-17 -507 506 -0.0287037037037039 -507 507 0.620713305898495 -507 508 -8.500145032286355e-17 -507 509 0.02870370370370382 -507 510 -0.2040466392318279 -507 511 0.01203703703703697 -507 512 -0.01342592592592604 -507 513 -0.05315500685870837 -507 514 0.01296296296296302 -507 515 0.01342592592592604 -507 516 -0.155178326474625 -508 499 -0.0009703703703703722 -508 500 -0.0005000000000000004 -508 501 -0.008333333333333333 -508 502 -0.001659259259259267 -508 503 -1.409462824231156e-18 -508 504 -0.03333333333333333 -508 505 -0.0002814814814814952 -508 506 4.336808689942018e-19 -508 507 -1.734723475976807e-18 -508 508 0.007762962962962955 -508 509 1.409462824231156e-18 -508 510 -1.040834085586084e-17 -508 511 -0.0009703703703703678 -508 512 0.0005 -508 513 0.008333333333333335 -508 514 -0.001659259259259219 -508 516 0.03333333333333333 -508 1066 -0.0009703703703703698 -508 1067 0.0004999999999999998 -508 1068 -0.008333333333333331 -508 1069 -0.0002814814814814952 -508 1070 2.168404344971009e-19 -508 1072 -0.0009703703703703678 -508 1073 -0.0005 -508 1074 0.008333333333333335 -509 499 -0.0005000000000000003 -509 500 -0.001040740740740742 -509 501 -0.00925925925925929 -509 502 -1.409462824231156e-18 -509 503 0.0002814814814814751 -509 504 -1.752070710736575e-16 -509 505 3.252606517456513e-19 -509 506 -0.002362962962962982 -509 507 -0.03703703703703721 -509 508 1.409462824231156e-18 -509 509 0.008325925925925947 -509 510 1.318389841742373e-16 -509 511 0.0005 -509 512 -0.001040740740740747 -509 513 -0.009259259259259377 -509 514 1.084202172485504e-19 -509 515 0.0002814814814815158 -509 1066 0.0004999999999999997 -509 1067 -0.001040740740740737 -509 1068 0.009259259259259184 -509 1069 3.252606517456513e-19 -509 1070 -0.002362962962962982 -509 1071 0.03703703703703724 -509 1072 -0.0005000000000000001 -509 1073 -0.001040740740740747 -509 1074 0.009259259259259377 -510 499 -0.01296296296296297 -510 500 -0.01342592592592581 -510 501 -0.1551783264746225 -510 502 -0.02407407407407411 -510 503 -1.734723475976807e-17 -510 504 -0.1063100137174218 -510 505 -5.724587470723463e-17 -510 506 -0.02870370370370397 -510 507 -0.2040466392318279 -510 508 1.595945597898663e-16 -510 509 -1.734723475976807e-17 -510 510 1.241426611796989 -510 511 0.01296296296296302 -510 512 -0.01342592592592605 -510 513 -0.155178326474625 -510 514 0.02407407407407395 -510 515 3.469446951953614e-18 -510 516 -0.1063100137174167 -510 1066 -0.01296296296296293 -510 1067 0.01342592592592599 -510 1068 -0.1551783264746219 -510 1069 -8.673617379884035e-17 -510 1070 0.02870370370370382 -510 1071 -0.2040466392318278 -510 1072 0.01296296296296302 -510 1073 0.01342592592592604 -510 1074 -0.1551783264746249 -511 511 1 -512 512 1 -513 505 -0.01203703703703698 -513 506 -0.01342592592592604 -513 507 -0.05315500685870837 -513 508 -0.01296296296296303 -513 509 0.01342592592592604 -513 510 -0.155178326474625 -513 511 -1.682681771697503e-16 -513 512 -0.02870370370370393 -513 513 0.6207133058984924 -513 514 1.752070710736575e-16 -513 515 0.02870370370370413 -513 516 -0.2040466392318279 -513 517 0.01203703703703714 -513 518 -0.01342592592592589 -513 519 -0.05315500685871064 -513 520 0.01296296296296285 -513 521 0.01342592592592568 -513 522 -0.1551783264746204 -514 505 -0.0009703703703703678 -514 506 -0.0005000000000000001 -514 507 -0.008333333333333333 -514 508 -0.001659259259259219 -514 509 1.084202172485504e-19 -514 510 -0.03333333333333333 -514 511 -0.000281481481481495 -514 512 -2.276824562219559e-18 -514 513 -1.734723475976807e-18 -514 514 0.007762962962962954 -514 515 -9.324138683375338e-18 -514 516 -6.938893903907228e-18 -514 517 -0.0009703703703703787 -514 518 0.0005000000000000024 -514 519 0.008333333333333335 -514 520 -0.001659259259259267 -514 521 9.215718466126788e-18 -514 522 0.03333333333333334 -514 1069 -0.0009703703703703678 -514 1070 0.0005 -514 1071 -0.008333333333333333 -514 1072 -0.0002814814814814951 -514 1073 -2.38524477946811e-18 -514 1074 -3.469446951953614e-18 -514 1075 -0.0009703703703703633 -514 1076 -0.0004999999999999976 -514 1077 0.008333333333333333 -515 505 -0.0005000000000000001 -515 506 -0.001040740740740747 -515 507 -0.009259259259259377 -515 509 0.0002814814814815158 -515 511 -2.38524477946811e-18 -515 512 -0.002362962962962981 -515 513 -0.03703703703703731 -515 514 -9.324138683375338e-18 -515 515 0.008325925925925945 -515 516 -2.567390744445674e-16 -515 517 0.0005000000000000025 -515 518 -0.001040740740740755 -515 519 -0.009259259259259304 -515 520 9.324138683375338e-18 -515 521 0.0002814814814814751 -515 522 -2.272487753529617e-16 -515 1069 0.0005000000000000001 -515 1070 -0.001040740740740747 -515 1071 0.009259259259259377 -515 1072 -2.276824562219559e-18 -515 1073 -0.002362962962962982 -515 1074 0.03703703703703715 -515 1075 -0.0004999999999999977 -515 1076 -0.001040740740740724 -515 1077 0.00925925925925917 -516 505 -0.01296296296296303 -516 506 -0.01342592592592605 -516 507 -0.155178326474625 -516 508 -0.02407407407407396 -516 509 3.469446951953614e-18 -516 510 -0.1063100137174167 -516 511 -2.081668171172169e-17 -516 512 -0.02870370370370365 -516 513 -0.2040466392318279 -516 514 -1.35308431126191e-16 -516 515 -6.418476861114186e-17 -516 516 1.241426611796989 -516 517 0.01296296296296305 -516 518 -0.01342592592592612 -516 519 -0.155178326474624 -516 520 0.02407407407407409 -516 521 2.602085213965211e-17 -516 522 -0.1063100137174218 -516 1069 -0.01296296296296302 -516 1070 0.01342592592592604 -516 1071 -0.1551783264746249 -516 1072 1.734723475976807e-16 -516 1073 0.02870370370370413 -516 1074 -0.2040466392318278 -516 1075 0.01296296296296285 -516 1076 0.01342592592592568 -516 1077 -0.1551783264746204 -517 517 1 -518 518 1 -519 511 -0.01203703703703695 -519 512 -0.01342592592592592 -519 513 -0.05315500685871065 -519 514 -0.01296296296296305 -519 515 0.01342592592592609 -519 516 -0.155178326474624 -519 517 1.561251128379126e-17 -519 518 -0.02870370370370369 -519 519 0.6207133058984931 -519 520 -1.214306433183765e-17 -519 521 0.02870370370370329 -519 522 -0.2040466392318238 -519 523 0.01203703703703694 -519 524 -0.01342592592592594 -519 525 -0.05315500685871005 -519 526 0.01296296296296306 -519 527 0.01342592592592616 -519 528 -0.1551783264746244 -520 511 -0.0009703703703703633 -520 512 -0.0004999999999999977 -520 513 -0.008333333333333333 -520 514 -0.001659259259259267 -520 515 9.324138683375338e-18 -520 516 -0.03333333333333333 -520 517 -0.0002814814814814817 -520 518 3.252606517456513e-19 -520 519 -3.469446951953614e-18 -520 520 0.007762962962962964 -520 521 1.409462824231156e-18 -520 522 -1.040834085586084e-17 -520 523 -0.000970370370370361 -520 524 0.0004999999999999974 -520 525 0.008333333333333335 -520 526 -0.001659259259259251 -520 527 -1.073360150760649e-17 -520 528 0.03333333333333333 -520 1072 -0.0009703703703703787 -520 1073 0.0005000000000000025 -520 1074 -0.008333333333333331 -520 1075 -0.0002814814814814817 -520 1076 1.084202172485504e-19 -520 1078 -0.0009703703703703788 -520 1079 -0.0005000000000000026 -520 1080 0.008333333333333335 -521 511 -0.0004999999999999976 -521 512 -0.001040740740740724 -521 513 -0.009259259259259172 -521 514 9.215718466126788e-18 -521 515 0.0002814814814814751 -521 516 2.931682674400804e-16 -521 517 1.084202172485504e-19 -521 518 -0.002362962962962964 -521 519 -0.0370370370370369 -521 520 1.517883041479706e-18 -521 521 0.008325925925925928 -521 522 5.100087019371813e-16 -521 523 0.0004999999999999973 -521 524 -0.001040740740740724 -521 525 -0.0092592592592592 -521 526 -1.051676107310939e-17 -521 527 0.0002814814814814885 -521 528 2.775557561562891e-16 -521 1072 0.0005000000000000024 -521 1073 -0.001040740740740755 -521 1074 0.0092592592592593 -521 1075 3.252606517456513e-19 -521 1076 -0.002362962962962964 -521 1077 0.03703703703703718 -521 1078 -0.0005000000000000027 -521 1079 -0.00104074074074076 -521 1080 0.009259259259259368 -522 511 -0.01296296296296285 -522 512 -0.01342592592592571 -522 513 -0.1551783264746205 -522 514 -0.02407407407407411 -522 515 -3.122502256758253e-17 -522 516 -0.1063100137174219 -522 517 1.387778780781446e-17 -522 518 -0.02870370370370418 -522 519 -0.2040466392318238 -522 520 1.214306433183765e-17 -522 521 7.806255641895632e-17 -522 522 1.241426611796978 -522 523 0.01296296296296284 -522 524 -0.01342592592592569 -522 525 -0.1551783264746203 -522 526 0.0240740740740741 -522 527 -2.081668171172169e-17 -522 528 -0.1063100137174196 -522 1072 -0.01296296296296305 -522 1073 0.01342592592592609 -522 1074 -0.155178326474624 -522 1075 -1.040834085586084e-17 -522 1076 0.02870370370370329 -522 1077 -0.2040466392318237 -522 1078 0.01296296296296306 -522 1079 0.01342592592592616 -522 1080 -0.1551783264746243 -523 523 1 -524 524 1 -525 517 -0.01203703703703717 -525 518 -0.01342592592592591 -525 519 -0.05315500685871007 -525 520 -0.01296296296296284 -525 521 0.01342592592592569 -525 522 -0.1551783264746203 -525 523 8.847089727481716e-17 -525 524 -0.02870370370370352 -525 525 0.6207133058984868 -525 526 -8.500145032286355e-17 -525 527 0.02870370370370377 -525 528 -0.2040466392318216 -525 529 0.01203703703703708 -525 530 -0.01342592592592585 -525 531 -0.05315500685871326 -525 532 0.01296296296296292 -525 533 0.01342592592592583 -525 534 -0.1551783264746216 -526 517 -0.0009703703703703788 -526 518 -0.0005000000000000027 -526 519 -0.008333333333333331 -526 520 -0.001659259259259251 -526 521 -1.062518129035794e-17 -526 522 -0.03333333333333333 -526 523 -0.0002814814814814694 -526 524 2.059984127722458e-18 -526 525 -1.734723475976807e-18 -526 526 0.007762962962962972 -526 527 7.914675859144182e-18 -526 529 -0.0009703703703703753 -526 530 0.0005000000000000007 -526 531 0.008333333333333335 -526 532 -0.001659259259259295 -526 533 2.710505431213761e-18 -526 534 0.03333333333333334 -526 1075 -0.000970370370370361 -526 1076 0.0004999999999999973 -526 1077 -0.008333333333333333 -526 1078 -0.0002814814814814694 -526 1079 2.059984127722458e-18 -526 1080 -1.734723475976807e-18 -526 1081 -0.0009703703703703709 -526 1082 -0.0004999999999999994 -526 1083 0.008333333333333335 -527 517 -0.0005000000000000026 -527 518 -0.00104074074074076 -527 519 -0.009259259259259347 -527 520 -1.084202172485504e-17 -527 521 0.0002814814814814885 -527 522 -3.157196726277789e-16 -527 523 2.168404344971009e-18 -527 524 -0.002362962962962947 -527 525 -0.03703703703703694 -527 526 7.914675859144182e-18 -527 527 0.008325925925925912 -527 528 -3.677613769070831e-16 -527 529 0.0005000000000000008 -527 530 -0.00104074074074074 -527 531 -0.009259259259259184 -527 532 2.602085213965211e-18 -527 533 0.0002814814814814509 -527 534 -1.162264728904461e-16 -527 1075 0.0004999999999999974 -527 1076 -0.001040740740740724 -527 1077 0.009259259259259221 -527 1078 1.951563910473908e-18 -527 1079 -0.002362962962962947 -527 1080 0.03703703703703681 -527 1081 -0.0004999999999999995 -527 1082 -0.001040740740740731 -527 1083 0.009259259259259125 -528 517 -0.01296296296296306 -528 518 -0.01342592592592617 -528 519 -0.1551783264746244 -528 520 -0.0240740740740741 -528 521 4.510281037539698e-17 -528 522 -0.1063100137174196 -528 523 8.673617379884035e-17 -528 524 -0.02870370370370329 -528 525 -0.2040466392318216 -528 526 1.734723475976807e-18 -528 527 1.387778780781446e-17 -528 528 1.241426611796977 -528 529 0.01296296296296298 -528 530 -0.01342592592592588 -528 531 -0.1551783264746226 -528 532 0.0240740740740741 -528 533 5.204170427930421e-18 -528 534 -0.1063100137174259 -528 1075 -0.01296296296296283 -528 1076 0.01342592592592568 -528 1077 -0.1551783264746202 -528 1078 -8.500145032286355e-17 -528 1079 0.02870370370370377 -528 1080 -0.2040466392318215 -528 1081 0.01296296296296292 -528 1082 0.01342592592592583 -528 1083 -0.1551783264746215 -529 529 1 -530 530 1 -531 523 -0.01203703703703703 -531 524 -0.01342592592592586 -531 525 -0.05315500685871324 -531 526 -0.01296296296296298 -531 527 0.01342592592592595 -531 528 -0.1551783264746226 -531 529 -1.07552855510562e-16 -531 530 -0.02870370370370346 -531 531 0.6207133058984874 -531 532 1.144917494144693e-16 -531 533 0.02870370370370358 -531 534 -0.2040466392318206 -531 535 0.01203703703703713 -531 536 -0.0134259259259259 -531 537 -0.05315500685871019 -531 538 0.01296296296296286 -531 539 0.0134259259259257 -531 540 -0.1551783264746207 -532 523 -0.000970370370370371 -532 524 -0.0004999999999999995 -532 525 -0.008333333333333333 -532 526 -0.001659259259259295 -532 527 2.602085213965211e-18 -532 528 -0.03333333333333333 -532 529 -0.0002814814814814639 -532 530 -2.602085213965211e-18 -532 531 -1.734723475976807e-18 -532 532 0.007762962962962976 -532 533 -1.040834085586084e-17 -532 534 -1.387778780781446e-17 -532 535 -0.0009703703703703775 -532 536 0.0005000000000000021 -532 537 0.008333333333333335 -532 538 -0.001659259259259264 -532 539 7.806255641895632e-18 -532 540 0.03333333333333334 -532 1078 -0.0009703703703703753 -532 1079 0.0005000000000000008 -532 1080 -0.008333333333333333 -532 1081 -0.0002814814814814641 -532 1082 -2.818925648462312e-18 -532 1083 -3.469446951953614e-18 -532 1084 -0.0009703703703703643 -532 1085 -0.000499999999999998 -532 1086 0.008333333333333335 -533 523 -0.0004999999999999995 -533 524 -0.001040740740740731 -533 525 -0.009259259259259146 -533 526 2.602085213965211e-18 -533 527 0.0002814814814814509 -533 528 3.122502256758253e-17 -533 529 -2.818925648462312e-18 -533 530 -0.00236296296296294 -533 531 -0.03703703703703685 -533 532 -1.040834085586084e-17 -533 533 0.008325925925925903 -533 534 -1.110223024625157e-16 -533 535 0.0005000000000000022 -533 536 -0.001040740740740754 -533 537 -0.009259259259259302 -533 538 8.023096076392733e-18 -533 539 0.0002814814814814777 -533 540 -1.578598363138894e-16 -533 1078 0.0005000000000000008 -533 1079 -0.00104074074074074 -533 1080 0.009259259259259163 -533 1081 -2.602085213965211e-18 -533 1082 -0.00236296296296294 -533 1083 0.03703703703703674 -533 1084 -0.0004999999999999982 -533 1085 -0.001040740740740727 -533 1086 0.009259259259259189 -534 523 -0.01296296296296292 -534 524 -0.01342592592592576 -534 525 -0.1551783264746216 -534 526 -0.02407407407407411 -534 527 -1.214306433183765e-17 -534 528 -0.1063100137174259 -534 529 -1.092875789865388e-16 -534 530 -0.02870370370370329 -534 531 -0.2040466392318206 -534 532 1.387778780781446e-17 -534 533 -6.418476861114186e-17 -534 534 1.241426611796977 -534 535 0.01296296296296303 -534 536 -0.01342592592592611 -534 537 -0.1551783264746238 -534 538 0.0240740740740741 -534 539 1.387778780781446e-17 -534 540 -0.1063100137174215 -534 1078 -0.01296296296296297 -534 1079 0.01342592592592595 -534 1080 -0.1551783264746226 -534 1081 1.127570259384925e-16 -534 1082 0.02870370370370359 -534 1083 -0.2040466392318205 -534 1084 0.01296296296296286 -534 1085 0.0134259259259257 -534 1086 -0.1551783264746207 -535 535 1 -536 536 1 -537 529 -0.01203703703703697 -537 530 -0.01342592592592592 -537 531 -0.05315500685871019 -537 532 -0.01296296296296303 -537 533 0.01342592592592606 -537 534 -0.1551783264746238 -537 535 -3.469446951953614e-18 -537 536 -0.02870370370370403 -537 537 0.620713305898497 -537 538 1.214306433183765e-17 -537 539 0.02870370370370377 -537 540 -0.2040466392318295 -537 541 0.01203703703703697 -537 542 -0.01342592592592608 -537 543 -0.05315500685870849 -537 544 0.01296296296296302 -537 545 0.01342592592592621 -537 546 -0.155178326474625 -538 529 -0.0009703703703703642 -538 530 -0.0004999999999999981 -538 531 -0.008333333333333333 -538 532 -0.001659259259259264 -538 533 8.023096076392733e-18 -538 534 -0.03333333333333333 -538 535 -0.0002814814814815043 -538 536 -1.951563910473908e-18 -538 537 -1.734723475976807e-18 -538 538 0.007762962962962947 -538 539 -7.914675859144182e-18 -538 540 -1.387778780781446e-17 -538 541 -0.0009703703703703661 -538 542 0.0005 -538 543 0.008333333333333333 -538 544 -0.001659259259259201 -538 545 -1.084202172485504e-19 -538 546 0.03333333333333333 -538 1081 -0.0009703703703703776 -538 1082 0.0005000000000000022 -538 1083 -0.008333333333333331 -538 1084 -0.0002814814814815043 -538 1085 -2.168404344971009e-18 -538 1086 -1.734723475976807e-18 -538 1087 -0.0009703703703703661 -538 1088 -0.0005 -538 1089 0.008333333333333333 -539 529 -0.000499999999999998 -539 530 -0.001040740740740727 -539 531 -0.009259259259259191 -539 532 7.806255641895632e-18 -539 533 0.0002814814814814777 -539 534 2.8796409701215e-16 -539 535 -2.168404344971009e-18 -539 536 -0.002362962962962994 -539 537 -0.03703703703703726 -539 538 -7.914675859144182e-18 -539 539 0.008325925925925955 -539 540 3.538835890992686e-16 -539 541 0.0005 -539 542 -0.001040740740740749 -539 543 -0.009259259259259463 -539 544 2.168404344971009e-19 -539 545 0.0002814814814815314 -539 546 -1.908195823574488e-16 -539 1081 0.0005000000000000021 -539 1082 -0.001040740740740754 -539 1083 0.009259259259259302 -539 1084 -1.843143693225358e-18 -539 1085 -0.002362962962962994 -539 1086 0.03703703703703744 -539 1087 -0.0005 -539 1088 -0.001040740740740749 -539 1089 0.009259259259259398 -540 529 -0.01296296296296287 -540 530 -0.01342592592592575 -540 531 -0.1551783264746207 -540 532 -0.02407407407407411 -540 533 -3.122502256758253e-17 -540 534 -0.1063100137174214 -540 535 -1.543903893619358e-16 -540 536 -0.02870370370370433 -540 537 -0.2040466392318295 -540 538 1.630640067418199e-16 -540 539 3.642919299551295e-17 -540 540 1.241426611796989 -540 541 0.01296296296296302 -540 542 -0.01342592592592594 -540 543 -0.155178326474625 -540 544 0.02407407407407395 -540 545 -3.469446951953614e-18 -540 546 -0.1063100137174141 -540 1081 -0.01296296296296303 -540 1082 0.01342592592592606 -540 1083 -0.1551783264746237 -540 1084 1.040834085586084e-17 -540 1085 0.02870370370370377 -540 1086 -0.2040466392318294 -540 1087 0.01296296296296302 -540 1088 0.0134259259259262 -540 1089 -0.155178326474625 -541 541 1 -542 542 1 -543 535 -0.01203703703703698 -543 536 -0.01342592592592608 -543 537 -0.05315500685870849 -543 538 -0.01296296296296302 -543 539 0.0134259259259262 -543 540 -0.155178326474625 -543 541 -9.8879238130678e-17 -543 542 -0.02870370370370389 -543 543 0.6207133058984958 -543 544 1.023486850826316e-16 -543 545 0.02870370370370379 -543 546 -0.2040466392318285 -543 547 0.01203703703703708 -543 548 -0.01342592592592588 -543 549 -0.05315500685871216 -543 550 0.01296296296296292 -543 551 0.01342592592592585 -543 552 -0.1551783264746217 -544 535 -0.0009703703703703661 -544 536 -0.0005 -544 537 -0.008333333333333333 -544 538 -0.001659259259259201 -544 539 1.084202172485504e-19 -544 540 -0.03333333333333333 -544 541 -0.0002814814814814988 -544 542 -6.505213034913027e-19 -544 544 0.00776296296296295 -544 545 -2.818925648462312e-18 -544 546 -6.938893903907228e-18 -544 547 -0.0009703703703703737 -544 548 0.0005000000000000007 -544 549 0.008333333333333333 -544 550 -0.001659259259259277 -544 551 2.710505431213761e-18 -544 552 0.03333333333333334 -544 1084 -0.000970370370370366 -544 1085 0.0005 -544 1086 -0.008333333333333333 -544 1087 -0.0002814814814814988 -544 1088 -6.505213034913027e-19 -544 1089 -1.734723475976807e-18 -544 1090 -0.0009703703703703695 -544 1091 -0.0004999999999999994 -544 1092 0.008333333333333335 -545 535 -0.0005 -545 536 -0.001040740740740749 -545 537 -0.009259259259259463 -545 538 -1.084202172485504e-19 -545 539 0.0002814814814815313 -545 540 -1.908195823574488e-16 -545 541 -6.505213034913027e-19 -545 542 -0.002362962962962986 -545 543 -0.03703703703703719 -545 544 -2.818925648462312e-18 -545 545 0.008325925925925948 -545 546 5.204170427930421e-17 -545 547 0.0005000000000000008 -545 548 -0.001040740740740743 -545 549 -0.009259259259259228 -545 550 2.710505431213761e-18 -545 551 0.0002814814814814667 -545 552 -1.370431546021678e-16 -545 1084 0.0005 -545 1085 -0.001040740740740749 -545 1086 0.009259259259259399 -545 1087 -6.505213034913027e-19 -545 1088 -0.002362962962962986 -545 1089 0.03703703703703735 -545 1090 -0.0004999999999999994 -545 1091 -0.001040740740740734 -545 1092 0.009259259259259189 -546 535 -0.01296296296296302 -546 536 -0.01342592592592594 -546 537 -0.155178326474625 -546 538 -0.02407407407407396 -546 539 -5.204170427930421e-18 -546 540 -0.1063100137174141 -546 541 4.510281037539698e-17 -546 542 -0.02870370370370412 -546 543 -0.2040466392318285 -546 544 -1.387778780781446e-16 -546 545 1.144917494144693e-16 -546 546 1.241426611796988 -546 547 0.01296296296296298 -546 548 -0.01342592592592591 -546 549 -0.1551783264746227 -546 550 0.0240740740740741 -546 551 1.561251128379126e-17 -546 552 -0.1063100137174232 -546 1084 -0.01296296296296302 -546 1085 0.0134259259259262 -546 1086 -0.155178326474625 -546 1087 1.023486850826316e-16 -546 1088 0.02870370370370379 -546 1089 -0.2040466392318284 -546 1090 0.01296296296296292 -546 1091 0.01342592592592585 -546 1092 -0.1551783264746216 -547 547 1 -548 548 1 -549 541 -0.01203703703703703 -549 542 -0.01342592592592588 -549 543 -0.05315500685871215 -549 544 -0.01296296296296297 -549 545 0.01342592592592597 -549 546 -0.1551783264746227 -549 547 3.122502256758253e-17 -549 548 -0.02870370370370326 -549 549 0.6207133058984906 -549 550 -3.122502256758253e-17 -549 551 0.028703703703703 -549 552 -0.2040466392318187 -549 553 0.012037037037037 -549 554 -0.01342592592592586 -549 555 -0.05315500685871398 -549 556 0.012962962962963 -549 557 0.01342592592592604 -549 558 -0.1551783264746231 -550 541 -0.0009703703703703694 -550 542 -0.0004999999999999994 -550 543 -0.008333333333333333 -550 544 -0.001659259259259277 -550 545 2.710505431213761e-18 -550 546 -0.03333333333333333 -550 547 -0.0002814814814814534 -550 548 6.505213034913027e-19 -550 550 0.007762962962962983 -550 551 2.710505431213761e-18 -550 552 -6.938893903907228e-18 -550 553 -0.0009703703703703695 -550 554 0.0004999999999999987 -550 555 0.008333333333333335 -550 556 -0.001659259259259308 -550 557 -5.421010862427522e-18 -550 558 0.03333333333333334 -550 1087 -0.0009703703703703738 -550 1088 0.0005000000000000008 -550 1089 -0.008333333333333331 -550 1090 -0.0002814814814814533 -550 1091 5.421010862427522e-19 -550 1092 -1.734723475976807e-18 -550 1093 -0.0009703703703703783 -550 1094 -0.0005000000000000013 -550 1095 0.008333333333333335 -551 541 -0.0004999999999999994 -551 542 -0.001040740740740734 -551 543 -0.009259259259259189 -551 544 2.602085213965211e-18 -551 545 0.0002814814814814666 -551 546 1.040834085586084e-17 -551 547 5.421010862427522e-19 -551 548 -0.002362962962962926 -551 549 -0.03703703703703658 -551 550 2.710505431213761e-18 -551 551 0.008325925925925889 -551 552 3.920475055707584e-16 -551 553 0.0004999999999999986 -551 554 -0.001040740740740725 -551 555 -0.009259259259259123 -551 556 -5.204170427930421e-18 -551 557 0.00028148148148144 -551 558 1.040834085586084e-16 -551 1087 0.0005000000000000007 -551 1088 -0.001040740740740743 -551 1089 0.009259259259259226 -551 1090 6.505213034913027e-19 -551 1091 -0.002362962962962926 -551 1092 0.03703703703703672 -551 1093 -0.0005000000000000014 -551 1094 -0.001040740740740743 -551 1095 0.00925925925925911 -552 541 -0.01296296296296292 -552 542 -0.0134259259259258 -552 543 -0.1551783264746217 -552 544 -0.02407407407407412 -552 545 -3.469446951953614e-18 -552 546 -0.1063100137174232 -552 547 2.602085213965211e-17 -552 548 -0.02870370370370351 -552 549 -0.2040466392318187 -552 550 1.040834085586084e-17 -552 551 -1.561251128379126e-17 -552 552 1.241426611796977 -552 553 0.01296296296296289 -552 554 -0.01342592592592563 -552 555 -0.155178326474621 -552 556 0.0240740740740741 -552 557 -4.510281037539698e-17 -552 558 -0.1063100137174277 -552 1087 -0.01296296296296297 -552 1088 0.01342592592592597 -552 1089 -0.1551783264746226 -552 1090 -2.949029909160572e-17 -552 1091 0.028703703703703 -552 1092 -0.2040466392318186 -552 1093 0.012962962962963 -552 1094 0.01342592592592603 -552 1095 -0.155178326474623 -553 553 1 -554 554 1 -555 547 -0.01203703703703711 -555 548 -0.01342592592592584 -555 549 -0.05315500685871398 -555 550 -0.01296296296296289 -555 551 0.0134259259259258 -555 552 -0.155178326474621 -555 553 5.204170427930421e-18 -555 554 -0.02870370370370365 -555 555 0.6207133058984877 -555 556 3.469446951953614e-18 -555 557 0.02870370370370375 -555 558 -0.2040466392318225 -555 559 0.0120370370370371 -555 560 -0.01342592592592596 -555 561 -0.05315500685870884 -555 562 0.01296296296296289 -555 563 0.01342592592592591 -555 564 -0.1551783264746214 -556 547 -0.0009703703703703783 -556 548 -0.0005000000000000014 -556 549 -0.008333333333333333 -556 550 -0.001659259259259308 -556 551 -5.204170427930421e-18 -556 552 -0.03333333333333333 -556 553 -0.0002814814814814748 -556 554 1.084202172485504e-19 -556 555 -3.469446951953614e-18 -556 556 0.007762962962962967 -556 557 -2.168404344971009e-19 -556 558 -1.387778780781446e-17 -556 559 -0.0009703703703703723 -556 560 0.0005000000000000013 -556 561 0.008333333333333333 -556 562 -0.001659259259259226 -556 563 5.421010862427522e-18 -556 564 0.03333333333333333 -556 1090 -0.0009703703703703695 -556 1091 0.0004999999999999986 -556 1092 -0.008333333333333333 -556 1093 -0.0002814814814814747 -556 1094 1.084202172485504e-19 -556 1095 -3.469446951953614e-18 -556 1096 -0.0009703703703703634 -556 1097 -0.0004999999999999987 -556 1098 0.008333333333333333 -557 547 -0.0005000000000000013 -557 548 -0.001040740740740743 -557 549 -0.009259259259259196 -557 550 -5.421010862427522e-18 -557 551 0.0002814814814814402 -557 552 -1.89084858881472e-16 -557 553 1.084202172485504e-19 -557 554 -0.002362962962962954 -557 555 -0.03703703703703699 -557 556 -2.168404344971009e-19 -557 557 0.008325925925925917 -557 558 -7.979727989493313e-17 -557 559 0.0005000000000000013 -557 560 -0.001040740740740754 -557 561 -0.009259259259259404 -557 562 5.204170427930421e-18 -557 563 0.00028148148148151 -557 564 -2.584737979205443e-16 -557 1090 0.0004999999999999987 -557 1091 -0.001040740740740725 -557 1092 0.009259259259259035 -557 1093 1.084202172485504e-19 -557 1094 -0.002362962962962954 -557 1095 0.0370370370370369 -557 1096 -0.0004999999999999986 -557 1097 -0.001040740740740737 -557 1098 0.009259259259259309 -558 547 -0.01296296296296301 -558 548 -0.01342592592592587 -558 549 -0.1551783264746231 -558 550 -0.02407407407407411 -558 551 -1.561251128379126e-17 -558 552 -0.1063100137174277 -558 553 3.469446951953614e-18 -558 554 -0.0287037037037035 -558 555 -0.2040466392318225 -558 556 1.040834085586084e-17 -558 557 -6.938893903907228e-17 -558 558 1.241426611796977 -558 559 0.012962962962963 -558 560 -0.01342592592592602 -558 561 -0.1551783264746235 -558 562 0.0240740740740741 -558 563 2.081668171172169e-17 -558 564 -0.106310013717416 -558 1090 -0.01296296296296289 -558 1091 0.0134259259259258 -558 1092 -0.1551783264746209 -558 1093 3.469446951953614e-18 -558 1094 0.02870370370370375 -558 1095 -0.2040466392318225 -558 1096 0.01296296296296289 -558 1097 0.01342592592592591 -558 1098 -0.1551783264746213 -559 559 1 -560 560 1 -561 553 -0.012037037037037 -561 554 -0.01342592592592597 -561 555 -0.05315500685870884 -561 556 -0.012962962962963 -561 557 0.01342592592592615 -561 558 -0.1551783264746235 -561 559 -5.204170427930421e-18 -561 560 -0.02870370370370408 -561 561 0.6207133058984966 -561 562 5.204170427930421e-18 -561 563 0.02870370370370393 -561 564 -0.2040466392318305 -561 565 0.012037037037037 -561 566 -0.01342592592592603 -561 567 -0.05315500685870939 -561 568 0.012962962962963 -561 569 0.013425925925926 -561 570 -0.1551783264746244 -562 553 -0.0009703703703703634 -562 554 -0.0004999999999999986 -562 555 -0.008333333333333331 -562 556 -0.001659259259259226 -562 557 5.204170427930421e-18 -562 558 -0.03333333333333333 -562 559 -0.0002814814814815097 -562 560 -2.059984127722458e-18 -562 561 -1.734723475976807e-18 -562 562 0.007762962962962942 -562 563 -7.914675859144182e-18 -562 564 -6.938893903907228e-18 -562 565 -0.0009703703703703701 -562 566 0.0005000000000000007 -562 567 0.008333333333333333 -562 568 -0.001659259259259226 -562 569 2.710505431213761e-18 -562 570 0.03333333333333333 -562 1093 -0.0009703703703703723 -562 1094 0.0005000000000000013 -562 1095 -0.008333333333333331 -562 1096 -0.0002814814814815097 -562 1097 -1.951563910473908e-18 -562 1098 -1.734723475976807e-18 -562 1099 -0.0009703703703703656 -562 1100 -0.0004999999999999994 -562 1101 0.008333333333333333 -563 553 -0.0004999999999999987 -563 554 -0.001040740740740736 -563 555 -0.00925925925925933 -563 556 5.421010862427522e-18 -563 557 0.00028148148148151 -563 558 3.989863994746656e-17 -563 559 -1.843143693225358e-18 -563 560 -0.002362962962963001 -563 561 -0.03703703703703733 -563 562 -8.023096076392733e-18 -563 563 0.008325925925925962 -563 564 1.179611963664229e-16 -563 565 0.0005000000000000007 -563 566 -0.00104074074074075 -563 567 -0.009259259259259373 -563 568 2.602085213965211e-18 -563 569 0.00028148148148151 -563 570 -1.405126015541214e-16 -563 1093 0.0005000000000000013 -563 1094 -0.001040740740740754 -563 1095 0.009259259259259384 -563 1096 -2.059984127722458e-18 -563 1097 -0.002362962962963001 -563 1098 0.03703703703703752 -563 1099 -0.0004999999999999994 -563 1100 -0.001040740740740741 -563 1101 0.009259259259259339 -564 553 -0.01296296296296289 -564 554 -0.01342592592592578 -564 555 -0.1551783264746214 -564 556 -0.02407407407407411 -564 557 -8.673617379884035e-18 -564 558 -0.106310013717416 -564 559 -1.613292832658431e-16 -564 560 -0.02870370370370436 -564 561 -0.2040466392318304 -564 562 1.613292832658431e-16 -564 563 1.318389841742373e-16 -564 564 1.241426611796989 -564 565 0.01296296296296305 -564 566 -0.01342592592592606 -564 567 -0.1551783264746255 -564 568 0.02407407407407395 -564 569 1.561251128379126e-17 -564 570 -0.1063100137174176 -564 1093 -0.012962962962963 -564 1094 0.01342592592592614 -564 1095 -0.1551783264746234 -564 1096 8.673617379884035e-18 -564 1097 0.02870370370370393 -564 1098 -0.2040466392318304 -564 1099 0.01296296296296299 -564 1100 0.013425925925926 -564 1101 -0.1551783264746243 -565 565 1 -566 566 1 -567 559 -0.01203703703703695 -567 560 -0.01342592592592603 -567 561 -0.05315500685870939 -567 562 -0.01296296296296305 -567 563 0.01342592592592612 -567 564 -0.1551783264746255 -567 565 -1.006139616066548e-16 -567 566 -0.02870370370370371 -567 567 0.6207133058984955 -567 568 1.006139616066548e-16 -567 569 0.02870370370370363 -567 570 -0.2040466392318266 -567 571 0.01203703703703705 -567 572 -0.01342592592592588 -567 573 -0.05315500685871186 -567 574 0.01296296296296295 -567 575 0.01342592592592588 -567 576 -0.1551783264746222 -568 559 -0.0009703703703703656 -568 560 -0.0004999999999999994 -568 561 -0.008333333333333331 -568 562 -0.001659259259259226 -568 563 2.49366499671666e-18 -568 564 -0.03333333333333333 -568 565 -0.0002814814814814881 -568 566 -6.505213034913027e-19 -568 568 0.007762962962962958 -568 569 -2.49366499671666e-18 -568 570 -6.938893903907228e-18 -568 571 -0.0009703703703703715 -568 572 0.0005 -568 573 0.008333333333333333 -568 574 -0.001659259259259277 -568 576 0.03333333333333334 -568 1096 -0.0009703703703703701 -568 1097 0.0005000000000000007 -568 1098 -0.008333333333333331 -568 1099 -0.000281481481481488 -568 1100 -6.505213034913027e-19 -568 1101 -1.734723475976807e-18 -568 1102 -0.0009703703703703715 -568 1103 -0.0005 -568 1104 0.008333333333333335 -569 559 -0.0004999999999999995 -569 560 -0.001040740740740741 -569 561 -0.009259259259259339 -569 562 2.818925648462312e-18 -569 563 0.00028148148148151 -569 564 6.938893903907228e-18 -569 565 -6.505213034913027e-19 -569 566 -0.002362962962962972 -569 567 -0.03703703703703705 -569 568 -2.602085213965211e-18 -569 569 0.008325925925925935 -569 570 3.122502256758253e-17 -569 571 0.0005000000000000001 -569 572 -0.001040740740740738 -569 573 -0.009259259259259196 -569 574 -1.084202172485504e-19 -569 575 0.0002814814814814667 -569 576 -2.255140518769849e-17 -569 1096 0.0005000000000000007 -569 1097 -0.00104074074074075 -569 1098 0.009259259259259377 -569 1099 -6.505213034913027e-19 -569 1100 -0.002362962962962972 -569 1101 0.0370370370370372 -569 1102 -0.0005 -569 1103 -0.001040740740740738 -569 1104 0.009259259259259219 -570 559 -0.012962962962963 -570 560 -0.01342592592592594 -570 561 -0.1551783264746244 -570 562 -0.02407407407407396 -570 563 -1.734723475976807e-18 -570 564 -0.1063100137174177 -570 565 4.683753385137379e-17 -570 566 -0.02870370370370393 -570 567 -0.2040466392318266 -570 568 -1.457167719820518e-16 -570 569 1.283695372222837e-16 -570 570 1.241426611796988 -570 571 0.01296296296296295 -570 572 -0.01342592592592589 -570 573 -0.1551783264746222 -570 574 0.0240740740740741 -570 575 1.040834085586084e-17 -570 576 -0.1063100137174232 -570 1096 -0.01296296296296305 -570 1097 0.01342592592592612 -570 1098 -0.1551783264746254 -570 1099 1.040834085586084e-16 -570 1100 0.02870370370370363 -570 1101 -0.2040466392318265 -570 1102 0.01296296296296295 -570 1103 0.01342592592592588 -570 1104 -0.1551783264746221 -571 571 1 -572 572 1 -573 565 -0.01203703703703705 -573 566 -0.01342592592592588 -573 567 -0.05315500685871185 -573 568 -0.01296296296296295 -573 569 0.01342592592592588 -573 570 -0.1551783264746222 -573 571 3.469446951953614e-17 -573 572 -0.02870370370370372 -573 573 0.6207133058984902 -573 574 -2.949029909160572e-17 -573 575 0.0287037037037037 -573 576 -0.2040466392318245 -573 577 0.01203703703703702 -573 578 -0.01342592592592595 -573 579 -0.05315500685870862 -573 580 0.01296296296296298 -573 581 0.01342592592592597 -573 582 -0.1551783264746229 -574 565 -0.0009703703703703715 -574 566 -0.0005 -574 567 -0.008333333333333333 -574 568 -0.001659259259259277 -574 569 -1.084202172485504e-19 -574 570 -0.03333333333333333 -574 571 -0.0002814814814814856 -574 572 6.505213034913027e-19 -574 574 0.007762962962962959 -574 575 2.710505431213761e-18 -574 576 -1.040834085586084e-17 -574 577 -0.0009703703703703662 -574 578 0.0004999999999999994 -574 579 0.008333333333333333 -574 580 -0.001659259259259232 -574 581 -2.602085213965211e-18 -574 582 0.03333333333333333 -574 1099 -0.0009703703703703715 -574 1100 0.0005000000000000001 -574 1101 -0.008333333333333331 -574 1102 -0.0002814814814814856 -574 1103 6.505213034913027e-19 -574 1104 -3.469446951953614e-18 -574 1105 -0.0009703703703703707 -574 1106 -0.0005000000000000008 -574 1107 0.008333333333333333 -575 565 -0.0005 -575 566 -0.001040740740740738 -575 567 -0.009259259259259198 -575 569 0.0002814814814814667 -575 570 -2.081668171172169e-17 -575 571 6.505213034913027e-19 -575 572 -0.002362962962962969 -575 573 -0.03703703703703702 -575 574 2.710505431213761e-18 -575 575 0.008325925925925933 -575 576 -1.040834085586084e-16 -575 577 0.0004999999999999994 -575 578 -0.00104074074074074 -575 579 -0.009259259259259287 -575 580 -2.602085213965211e-18 -575 581 0.0002814814814815048 -575 582 7.28583859910259e-17 -575 1099 0.0005 -575 1100 -0.001040740740740738 -575 1101 0.009259259259259219 -575 1102 7.589415207398531e-19 -575 1103 -0.002362962962962969 -575 1104 0.03703703703703717 -575 1105 -0.0005000000000000007 -575 1106 -0.001040740740740749 -575 1107 0.009259259259259391 -576 565 -0.01296296296296295 -576 566 -0.01342592592592589 -576 567 -0.1551783264746222 -576 568 -0.02407407407407412 -576 569 1.040834085586084e-17 -576 570 -0.1063100137174232 -576 571 2.949029909160572e-17 -576 572 -0.0287037037037039 -576 573 -0.2040466392318245 -576 574 1.561251128379126e-17 -576 575 1.630640067418199e-16 -576 576 1.241426611796978 -576 577 0.01296296296296292 -576 578 -0.01342592592592594 -576 579 -0.1551783264746219 -576 580 0.0240740740740741 -576 581 2.081668171172169e-17 -576 582 -0.1063100137174169 -576 1099 -0.01296296296296295 -576 1100 0.01342592592592588 -576 1101 -0.1551783264746221 -576 1102 -2.949029909160572e-17 -576 1103 0.0287037037037037 -576 1104 -0.2040466392318244 -576 1105 0.01296296296296297 -576 1106 0.01342592592592597 -576 1107 -0.1551783264746228 -577 577 1 -578 578 1 -579 571 -0.01203703703703708 -579 572 -0.01342592592592594 -579 573 -0.05315500685870862 -579 574 -0.01296296296296292 -579 575 0.01342592592592585 -579 576 -0.1551783264746219 -579 577 1.734723475976807e-18 -579 578 -0.02870370370370372 -579 579 0.6207133058984888 -579 580 1.734723475976807e-18 -579 581 0.02870370370370384 -579 582 -0.2040466392318245 -579 583 0.01203703703703708 -579 584 -0.01342592592592588 -579 585 -0.05315500685871216 -579 586 0.01296296296296292 -579 587 0.01342592592592585 -579 588 -0.1551783264746217 -580 571 -0.0009703703703703707 -580 572 -0.0005000000000000007 -580 573 -0.008333333333333333 -580 574 -0.001659259259259232 -580 575 -2.710505431213761e-18 -580 576 -0.03333333333333333 -580 577 -0.0002814814814814855 -580 580 0.007762962962962959 -580 582 -6.938893903907228e-18 -580 583 -0.0009703703703703737 -580 584 0.0005000000000000007 -580 585 0.008333333333333333 -580 586 -0.001659259259259277 -580 587 2.710505431213761e-18 -580 588 0.03333333333333334 -580 1102 -0.0009703703703703662 -580 1103 0.0004999999999999994 -580 1104 -0.008333333333333331 -580 1105 -0.0002814814814814855 -580 1107 -1.734723475976807e-18 -580 1108 -0.0009703703703703695 -580 1109 -0.0004999999999999994 -580 1110 0.008333333333333335 -581 571 -0.0005000000000000008 -581 572 -0.001040740740740749 -581 573 -0.009259259259259325 -581 574 -2.602085213965211e-18 -581 575 0.0002814814814815048 -581 576 -7.459310946700271e-17 -581 578 -0.002362962962962969 -581 579 -0.03703703703703706 -581 581 0.008325925925925929 -581 582 -2.775557561562891e-16 -581 583 0.0005000000000000008 -581 584 -0.001040740740740743 -581 585 -0.009259259259259228 -581 586 2.710505431213761e-18 -581 587 0.0002814814814814667 -581 588 -1.370431546021678e-16 -581 1102 0.0004999999999999993 -581 1103 -0.00104074074074074 -581 1104 0.009259259259259354 -581 1106 -0.002362962962962969 -581 1107 0.03703703703703712 -581 1108 -0.0004999999999999994 -581 1109 -0.001040740740740734 -581 1110 0.009259259259259189 -582 571 -0.01296296296296297 -582 572 -0.01342592592592606 -582 573 -0.1551783264746229 -582 574 -0.02407407407407411 -582 575 4.163336342344337e-17 -582 576 -0.1063100137174169 -582 577 -1.734723475976807e-18 -582 578 -0.02870370370370376 -582 579 -0.2040466392318245 -582 580 5.204170427930421e-18 -582 581 1.387778780781446e-16 -582 582 1.241426611796978 -582 583 0.01296296296296298 -582 584 -0.01342592592592591 -582 585 -0.1551783264746227 -582 586 0.0240740740740741 -582 587 1.561251128379126e-17 -582 588 -0.1063100137174232 -582 1102 -0.01296296296296292 -582 1103 0.01342592592592585 -582 1104 -0.1551783264746218 -582 1105 1.734723475976807e-18 -582 1106 0.02870370370370384 -582 1107 -0.2040466392318244 -582 1108 0.01296296296296292 -582 1109 0.01342592592592585 -582 1110 -0.1551783264746216 -583 583 1 -584 584 1 -585 577 -0.01203703703703703 -585 578 -0.01342592592592588 -585 579 -0.05315500685871215 -585 580 -0.01296296296296297 -585 581 0.01342592592592597 -585 582 -0.1551783264746227 -585 583 -2.42861286636753e-17 -585 584 -0.02870370370370335 -585 585 0.6207133058984902 -585 586 2.42861286636753e-17 -585 587 0.02870370370370326 -585 588 -0.2040466392318206 -585 589 0.01203703703703705 -585 590 -0.01342592592592586 -585 591 -0.05315500685871255 -585 592 0.01296296296296295 -585 593 0.01342592592592586 -585 594 -0.1551783264746222 -586 577 -0.0009703703703703694 -586 578 -0.0004999999999999994 -586 579 -0.008333333333333333 -586 580 -0.001659259259259277 -586 581 2.710505431213761e-18 -586 582 -0.03333333333333333 -586 583 -0.0002814814814814639 -586 584 -6.505213034913027e-19 -586 586 0.007762962962962975 -586 587 -2.710505431213761e-18 -586 588 -6.938893903907228e-18 -586 589 -0.0009703703703703721 -586 590 0.0005 -586 591 0.008333333333333335 -586 592 -0.001659259259259283 -586 594 0.03333333333333334 -586 1105 -0.0009703703703703738 -586 1106 0.0005000000000000008 -586 1107 -0.008333333333333331 -586 1108 -0.0002814814814814639 -586 1109 -7.589415207398531e-19 -586 1110 -3.469446951953614e-18 -586 1111 -0.0009703703703703721 -586 1112 -0.0005 -586 1113 0.008333333333333335 -587 577 -0.0004999999999999994 -587 578 -0.001040740740740734 -587 579 -0.009259259259259189 -587 580 2.602085213965211e-18 -587 581 0.0002814814814814666 -587 582 1.040834085586084e-17 -587 583 -7.589415207398531e-19 -587 584 -0.00236296296296294 -587 585 -0.0370370370370367 -587 586 -2.602085213965211e-18 -587 587 0.008325925925925903 -587 588 -1.040834085586084e-17 -587 589 0.0005000000000000001 -587 590 -0.001040740740740737 -587 591 -0.009259259259259169 -587 593 0.0002814814814814615 -587 594 -4.336808689942018e-17 -587 1105 0.0005000000000000007 -587 1106 -0.001040740740740743 -587 1107 0.009259259259259226 -587 1108 -7.589415207398531e-19 -587 1109 -0.00236296296296294 -587 1110 0.03703703703703689 -587 1111 -0.0005000000000000001 -587 1112 -0.001040740740740737 -587 1113 0.009259259259259212 -588 577 -0.01296296296296292 -588 578 -0.0134259259259258 -588 579 -0.1551783264746217 -588 580 -0.02407407407407412 -588 581 -3.469446951953614e-18 -588 582 -0.1063100137174232 -588 583 -2.949029909160572e-17 -588 584 -0.02870370370370361 -588 585 -0.2040466392318206 -588 586 1.040834085586084e-17 -588 587 1.734723475976807e-16 -588 588 1.241426611796977 -588 589 0.01296296296296295 -588 590 -0.01342592592592588 -588 591 -0.1551783264746222 -588 592 0.0240740740740741 -588 593 2.255140518769849e-17 -588 594 -0.1063100137174241 -588 1105 -0.01296296296296297 -588 1106 0.01342592592592597 -588 1107 -0.1551783264746226 -588 1108 2.602085213965211e-17 -588 1109 0.02870370370370326 -588 1110 -0.2040466392318205 -588 1111 0.01296296296296295 -588 1112 0.01342592592592586 -588 1113 -0.1551783264746221 -589 589 1 -590 590 1 -591 583 -0.01203703703703705 -591 584 -0.01342592592592586 -591 585 -0.05315500685871255 -591 586 -0.01296296296296295 -591 587 0.01342592592592586 -591 588 -0.1551783264746222 -591 589 2.602085213965211e-17 -591 590 -0.02870370370370409 -591 591 0.6207133058984948 -591 592 -1.561251128379126e-17 -591 593 0.02870370370370414 -591 594 -0.2040466392318305 -591 595 0.01203703703703703 -591 596 -0.01342592592592612 -591 597 -0.0531550068587054 -591 598 0.01296296296296297 -591 599 0.01342592592592608 -591 600 -0.1551783264746242 -592 583 -0.0009703703703703722 -592 584 -0.0005000000000000001 -592 585 -0.008333333333333333 -592 586 -0.001659259259259283 -592 588 -0.03333333333333333 -592 589 -0.0002814814814815099 -592 590 -1.301042606982605e-18 -592 591 -1.734723475976807e-18 -592 592 0.007762962962962945 -592 593 -5.312590645178972e-18 -592 594 -1.387778780781446e-17 -592 595 -0.0009703703703703684 -592 596 0.0005000000000000014 -592 597 0.008333333333333335 -592 598 -0.001659259259259169 -592 599 5.312590645178972e-18 -592 600 0.03333333333333334 -592 1108 -0.0009703703703703722 -592 1109 0.0005000000000000001 -592 1110 -0.008333333333333331 -592 1111 -0.0002814814814815099 -592 1112 -1.409462824231156e-18 -592 1113 -1.734723475976807e-18 -592 1114 -0.0009703703703703595 -592 1115 -0.0004999999999999987 -592 1116 0.008333333333333335 -593 583 -0.0005 -593 584 -0.001040740740740737 -593 585 -0.00925925925925917 -593 586 -1.084202172485504e-19 -593 587 0.0002814814814814615 -593 588 -4.163336342344337e-17 -593 589 -1.409462824231156e-18 -593 590 -0.002362962962963002 -593 591 -0.0370370370370374 -593 592 -5.312590645178972e-18 -593 593 0.008325925925925964 -593 594 -1.52655665885959e-16 -593 595 0.0005000000000000013 -593 596 -0.001040740740740762 -593 597 -0.009259259259259583 -593 598 5.421010862427522e-18 -593 599 0.0002814814814815584 -593 600 -2.324529457808922e-16 -593 1108 0.0005000000000000001 -593 1109 -0.001040740740740737 -593 1110 0.009259259259259212 -593 1111 -1.192622389734055e-18 -593 1112 -0.002362962962963002 -593 1113 0.03703703703703745 -593 1114 -0.0004999999999999987 -593 1115 -0.001040740740740745 -593 1116 0.009259259259259467 -594 583 -0.01296296296296295 -594 584 -0.01342592592592588 -594 585 -0.1551783264746222 -594 586 -0.02407407407407411 -594 587 2.255140518769849e-17 -594 588 -0.1063100137174241 -594 589 -1.301042606982605e-16 -594 590 -0.02870370370370415 -594 591 -0.2040466392318305 -594 592 1.630640067418199e-16 -594 593 1.023486850826316e-16 -594 594 1.241426611796989 -594 595 0.01296296296296308 -594 596 -0.01342592592592617 -594 597 -0.1551783264746263 -594 598 0.02407407407407395 -594 599 8.673617379884035e-18 -594 600 -0.1063100137174096 -594 1108 -0.01296296296296295 -594 1109 0.01342592592592586 -594 1110 -0.1551783264746221 -594 1111 -1.734723475976807e-17 -594 1112 0.02870370370370414 -594 1113 -0.2040466392318304 -594 1114 0.01296296296296296 -594 1115 0.01342592592592607 -594 1116 -0.1551783264746242 -595 595 1 -596 596 1 -597 589 -0.01203703703703692 -597 590 -0.01342592592592614 -597 591 -0.05315500685870542 -597 592 -0.01296296296296308 -597 593 0.01342592592592631 -597 594 -0.1551783264746263 -597 595 -1.838806884535416e-16 -597 596 -0.02870370370370408 -597 597 0.6207133058984964 -597 598 1.873501354054952e-16 -597 599 0.02870370370370395 -597 600 -0.2040466392318305 -597 601 0.01203703703703711 -597 602 -0.01342592592592586 -597 603 -0.05315500685871315 -597 604 0.01296296296296289 -597 605 0.01342592592592581 -597 606 -0.1551783264746211 -598 589 -0.0009703703703703595 -598 590 -0.0004999999999999987 -598 591 -0.008333333333333333 -598 592 -0.001659259259259169 -598 593 5.312590645178972e-18 -598 594 -0.03333333333333333 -598 595 -0.0002814814814815097 -598 596 -2.602085213965211e-18 -598 597 -1.734723475976807e-18 -598 598 0.007762962962962944 -598 599 -1.051676107310939e-17 -598 600 -1.040834085586084e-17 -598 601 -0.0009703703703703766 -598 602 0.0005000000000000013 -598 603 0.008333333333333335 -598 604 -0.001659259259259283 -598 605 5.204170427930421e-18 -598 606 0.03333333333333334 -598 1111 -0.0009703703703703684 -598 1112 0.0005000000000000014 -598 1113 -0.008333333333333333 -598 1114 -0.0002814814814815095 -598 1115 -2.818925648462312e-18 -598 1116 -3.469446951953614e-18 -598 1117 -0.0009703703703703678 -598 1118 -0.0004999999999999986 -598 1119 0.008333333333333335 -599 589 -0.0004999999999999987 -599 590 -0.001040740740740745 -599 591 -0.009259259259259509 -599 592 5.312590645178972e-18 -599 593 0.0002814814814815584 -599 594 6.071532165918825e-17 -599 595 -2.602085213965211e-18 -599 596 -0.002362962962963001 -599 597 -0.03703703703703734 -599 598 -1.062518129035794e-17 -599 599 0.008325925925925964 -599 600 9.020562075079397e-17 -599 601 0.0005000000000000014 -599 602 -0.001040740740740746 -599 603 -0.009259259259259228 -599 604 5.421010862427522e-18 -599 605 0.0002814814814814616 -599 606 -2.758210326803123e-16 -599 1111 0.0005000000000000013 -599 1112 -0.001040740740740762 -599 1113 0.00925925925925954 -599 1114 -2.710505431213761e-18 -599 1115 -0.002362962962963001 -599 1116 0.03703703703703751 -599 1117 -0.0004999999999999988 -599 1118 -0.001040740740740729 -599 1119 0.009259259259259153 -600 589 -0.01296296296296297 -600 590 -0.01342592592592594 -600 591 -0.1551783264746242 -600 592 -0.02407407407407396 -600 593 -2.42861286636753e-17 -600 594 -0.1063100137174096 -600 595 -3.642919299551295e-17 -600 596 -0.02870370370370433 -600 597 -0.2040466392318305 -600 598 -1.387778780781446e-16 -600 599 1.196959198423997e-16 -600 600 1.241426611796989 -600 601 0.012962962962963 -600 602 -0.01342592592592593 -600 603 -0.1551783264746232 -600 604 0.0240740740740741 -600 605 2.949029909160572e-17 -600 606 -0.1063100137174241 -600 1111 -0.01296296296296308 -600 1112 0.01342592592592631 -600 1113 -0.1551783264746262 -600 1114 1.856154119295184e-16 -600 1115 0.02870370370370395 -600 1116 -0.2040466392318304 -600 1117 0.01296296296296289 -600 1118 0.01342592592592581 -600 1119 -0.1551783264746211 -601 601 1 -602 602 1 -603 595 -0.012037037037037 -603 596 -0.01342592592592588 -603 597 -0.05315500685871315 -603 598 -0.01296296296296301 -603 599 0.01342592592592605 -603 600 -0.1551783264746232 -603 601 -5.030698080332741e-17 -603 602 -0.02870370370370334 -603 603 0.6207133058984911 -603 604 5.724587470723463e-17 -603 605 0.02870370370370317 -603 606 -0.2040466392318206 -603 607 0.01203703703703705 -603 608 -0.01342592592592588 -603 609 -0.05315500685871186 -603 610 0.01296296296296295 -603 611 0.01342592592592588 -603 612 -0.1551783264746222 -604 595 -0.0009703703703703678 -604 596 -0.0004999999999999988 -604 597 -0.008333333333333333 -604 598 -0.001659259259259283 -604 599 5.312590645178972e-18 -604 600 -0.03333333333333333 -604 601 -0.0002814814814814639 -604 602 -1.192622389734055e-18 -604 603 -1.734723475976807e-18 -604 604 0.007762962962962976 -604 605 -5.312590645178972e-18 -604 606 -1.387778780781446e-17 -604 607 -0.0009703703703703715 -604 608 0.0005 -604 609 0.008333333333333333 -604 610 -0.001659259259259277 -604 612 0.03333333333333334 -604 1114 -0.0009703703703703766 -604 1115 0.0005000000000000014 -604 1116 -0.008333333333333331 -604 1117 -0.0002814814814814639 -604 1118 -1.409462824231156e-18 -604 1119 -3.469446951953614e-18 -604 1120 -0.0009703703703703715 -604 1121 -0.0005 -604 1122 0.008333333333333335 -605 595 -0.0004999999999999987 -605 596 -0.001040740740740729 -605 597 -0.009259259259259155 -605 598 5.204170427930421e-18 -605 599 0.0002814814814814615 -605 600 2.081668171172169e-17 -605 601 -1.409462824231156e-18 -605 602 -0.00236296296296294 -605 603 -0.03703703703703667 -605 604 -5.421010862427522e-18 -605 605 0.008325925925925903 -605 606 1.040834085586084e-16 -605 607 0.0005000000000000001 -605 608 -0.001040740740740738 -605 609 -0.009259259259259196 -605 610 -1.084202172485504e-19 -605 611 0.0002814814814814667 -605 612 -2.255140518769849e-17 -605 1114 0.0005000000000000014 -605 1115 -0.001040740740740746 -605 1116 0.009259259259259226 -605 1117 -1.192622389734055e-18 -605 1118 -0.00236296296296294 -605 1119 0.03703703703703692 -605 1120 -0.0005 -605 1121 -0.001040740740740738 -605 1122 0.009259259259259219 -606 595 -0.01296296296296289 -606 596 -0.0134259259259257 -606 597 -0.1551783264746211 -606 598 -0.02407407407407412 -606 600 -0.1063100137174241 -606 601 -5.724587470723463e-17 -606 602 -0.0287037037037037 -606 603 -0.2040466392318206 -606 604 1.734723475976807e-17 -606 605 1.804112415015879e-16 -606 606 1.241426611796977 -606 607 0.01296296296296295 -606 608 -0.01342592592592589 -606 609 -0.1551783264746222 -606 610 0.0240740740740741 -606 611 1.040834085586084e-17 -606 612 -0.1063100137174232 -606 1114 -0.012962962962963 -606 1115 0.01342592592592605 -606 1116 -0.1551783264746231 -606 1117 5.898059818321144e-17 -606 1118 0.02870370370370317 -606 1119 -0.2040466392318205 -606 1120 0.01296296296296295 -606 1121 0.01342592592592588 -606 1122 -0.1551783264746221 -607 607 1 -608 608 1 -609 601 -0.01203703703703705 -609 602 -0.01342592592592588 -609 603 -0.05315500685871185 -609 604 -0.01296296296296295 -609 605 0.01342592592592588 -609 606 -0.1551783264746222 -609 607 3.469446951953614e-17 -609 608 -0.02870370370370364 -609 609 0.6207133058984888 -609 610 -2.949029909160572e-17 -609 611 0.02870370370370361 -609 612 -0.2040466392318226 -609 613 0.01203703703703702 -609 614 -0.01342592592592593 -609 615 -0.05315500685870947 -609 616 0.01296296296296298 -609 617 0.01342592592592595 -609 618 -0.1551783264746228 -610 601 -0.0009703703703703715 -610 602 -0.0005 -610 603 -0.008333333333333333 -610 604 -0.001659259259259277 -610 605 -1.084202172485504e-19 -610 606 -0.03333333333333333 -610 607 -0.0002814814814814747 -610 608 6.505213034913027e-19 -610 610 0.007762962962962967 -610 611 2.818925648462312e-18 -610 612 -1.040834085586084e-17 -610 613 -0.000970370370370368 -610 614 0.0004999999999999994 -610 615 0.008333333333333333 -610 616 -0.001659259259259257 -610 617 -2.710505431213761e-18 -610 618 0.03333333333333334 -610 1117 -0.0009703703703703715 -610 1118 0.0005000000000000001 -610 1119 -0.008333333333333331 -610 1120 -0.0002814814814814747 -610 1121 5.421010862427522e-19 -610 1122 -3.469446951953614e-18 -610 1123 -0.0009703703703703724 -610 1124 -0.0005000000000000007 -610 1125 0.008333333333333333 -611 601 -0.0005 -611 602 -0.001040740740740738 -611 603 -0.009259259259259198 -611 605 0.0002814814814814667 -611 606 -2.081668171172169e-17 -611 607 5.421010862427522e-19 -611 608 -0.002362962962962954 -611 609 -0.03703703703703695 -611 610 2.710505431213761e-18 -611 611 0.008325925925925917 -611 612 6.938893903907228e-17 -611 613 0.0004999999999999994 -611 614 -0.001040740740740737 -611 615 -0.009259259259259255 -611 616 -2.710505431213761e-18 -611 617 0.0002814814814814829 -611 618 1.595945597898663e-16 -611 1117 0.0005 -611 1118 -0.001040740740740738 -611 1119 0.009259259259259219 -611 1120 7.589415207398531e-19 -611 1121 -0.002362962962962954 -611 1122 0.03703703703703692 -611 1123 -0.0005000000000000007 -611 1124 -0.001040740740740746 -611 1125 0.009259259259259271 -612 601 -0.01296296296296295 -612 602 -0.01342592592592589 -612 603 -0.1551783264746222 -612 604 -0.02407407407407412 -612 605 1.040834085586084e-17 -612 606 -0.1063100137174232 -612 607 2.949029909160572e-17 -612 608 -0.02870370370370361 -612 609 -0.2040466392318225 -612 610 1.387778780781446e-17 -612 611 -4.85722573273506e-17 -612 612 1.241426611796977 -612 613 0.01296296296296292 -612 614 -0.01342592592592588 -612 615 -0.1551783264746218 -612 616 0.0240740740740741 -612 617 -2.775557561562891e-17 -612 618 -0.1063100137174205 -612 1117 -0.01296296296296295 -612 1118 0.01342592592592588 -612 1119 -0.1551783264746221 -612 1120 -2.775557561562891e-17 -612 1121 0.02870370370370362 -612 1122 -0.2040466392318224 -612 1123 0.01296296296296297 -612 1124 0.01342592592592595 -612 1125 -0.1551783264746227 -613 613 1 -614 614 1 -615 607 -0.01203703703703708 -615 608 -0.01342592592592592 -615 609 -0.05315500685870948 -615 610 -0.01296296296296292 -615 611 0.01342592592592583 -615 612 -0.1551783264746218 -615 613 7.806255641895632e-17 -615 614 -0.02870370370370395 -615 615 0.6207133058984931 -615 616 -7.632783294297951e-17 -615 617 0.02870370370370406 -615 618 -0.2040466392318281 -615 619 0.012037037037037 -615 620 -0.01342592592592603 -615 621 -0.05315500685870939 -615 622 0.012962962962963 -615 623 0.013425925925926 -615 624 -0.1551783264746244 -616 607 -0.0009703703703703725 -616 608 -0.0005000000000000007 -616 609 -0.008333333333333333 -616 610 -0.001659259259259257 -616 611 -2.710505431213761e-18 -616 612 -0.03333333333333333 -616 613 -0.0002814814814814964 -616 615 -1.734723475976807e-18 -616 616 0.007762962962962952 -616 618 -1.040834085586084e-17 -616 619 -0.0009703703703703701 -616 620 0.0005000000000000007 -616 621 0.008333333333333333 -616 622 -0.001659259259259226 -616 623 2.710505431213761e-18 -616 624 0.03333333333333333 -616 1120 -0.0009703703703703681 -616 1121 0.0004999999999999994 -616 1122 -0.008333333333333331 -616 1123 -0.0002814814814814964 -616 1125 -1.734723475976807e-18 -616 1126 -0.0009703703703703656 -616 1127 -0.0004999999999999994 -616 1128 0.008333333333333333 -617 607 -0.0005000000000000007 -617 608 -0.001040740740740746 -617 609 -0.009259259259259293 -617 610 -2.602085213965211e-18 -617 611 0.000281481481481483 -617 612 1.214306433183765e-17 -617 613 1.084202172485504e-19 -617 614 -0.002362962962962983 -617 615 -0.0370370370370373 -617 616 -1.084202172485504e-19 -617 617 0.008325925925925943 -617 618 -1.040834085586084e-16 -617 619 0.0005000000000000007 -617 620 -0.00104074074074075 -617 621 -0.009259259259259373 -617 622 2.602085213965211e-18 -617 623 0.00028148148148151 -617 624 -1.405126015541214e-16 -617 1120 0.0004999999999999993 -617 1121 -0.001040740740740736 -617 1122 0.009259259259259234 -617 1124 -0.002362962962962983 -617 1125 0.03703703703703719 -617 1126 -0.0004999999999999994 -617 1127 -0.001040740740740741 -617 1128 0.009259259259259339 -618 607 -0.01296296296296297 -618 608 -0.013425925925926 -618 609 -0.1551783264746228 -618 610 -0.02407407407407411 -618 611 -5.204170427930421e-18 -618 612 -0.1063100137174205 -618 613 -7.806255641895632e-17 -618 614 -0.02870370370370377 -618 615 -0.2040466392318281 -618 616 1.595945597898663e-16 -618 617 -6.591949208711867e-17 -618 618 1.241426611796988 -618 619 0.01296296296296305 -618 620 -0.01342592592592606 -618 621 -0.1551783264746255 -618 622 0.02407407407407395 -618 623 1.561251128379126e-17 -618 624 -0.1063100137174176 -618 1120 -0.01296296296296292 -618 1121 0.01342592592592583 -618 1122 -0.1551783264746217 -618 1123 -7.28583859910259e-17 -618 1124 0.02870370370370406 -618 1125 -0.204046639231828 -618 1126 0.01296296296296299 -618 1127 0.013425925925926 -618 1128 -0.1551783264746243 -619 619 1 -620 620 1 -621 613 -0.01203703703703695 -621 614 -0.01342592592592603 -621 615 -0.05315500685870939 -621 616 -0.01296296296296305 -621 617 0.01342592592592612 -621 618 -0.1551783264746255 -621 619 -1.006139616066548e-16 -621 620 -0.02870370370370371 -621 621 0.6207133058984955 -621 622 1.006139616066548e-16 -621 623 0.02870370370370363 -621 624 -0.2040466392318266 -621 625 0.01203703703703705 -621 626 -0.01342592592592588 -621 627 -0.05315500685871186 -621 628 0.01296296296296295 -621 629 0.01342592592592588 -621 630 -0.1551783264746222 -622 613 -0.0009703703703703656 -622 614 -0.0004999999999999994 -622 615 -0.008333333333333331 -622 616 -0.001659259259259226 -622 617 2.49366499671666e-18 -622 618 -0.03333333333333333 -622 619 -0.0002814814814814881 -622 620 -6.505213034913027e-19 -622 622 0.007762962962962958 -622 623 -2.49366499671666e-18 -622 624 -6.938893903907228e-18 -622 625 -0.0009703703703703715 -622 626 0.0005 -622 627 0.008333333333333333 -622 628 -0.001659259259259277 -622 630 0.03333333333333334 -622 1123 -0.0009703703703703701 -622 1124 0.0005000000000000007 -622 1125 -0.008333333333333331 -622 1126 -0.000281481481481488 -622 1127 -6.505213034913027e-19 -622 1128 -1.734723475976807e-18 -622 1129 -0.0009703703703703715 -622 1130 -0.0005 -622 1131 0.008333333333333335 -623 613 -0.0004999999999999995 -623 614 -0.001040740740740741 -623 615 -0.009259259259259339 -623 616 2.818925648462312e-18 -623 617 0.00028148148148151 -623 618 6.938893903907228e-18 -623 619 -6.505213034913027e-19 -623 620 -0.002362962962962972 -623 621 -0.03703703703703705 -623 622 -2.602085213965211e-18 -623 623 0.008325925925925935 -623 624 3.122502256758253e-17 -623 625 0.0005000000000000001 -623 626 -0.001040740740740738 -623 627 -0.009259259259259196 -623 628 -1.084202172485504e-19 -623 629 0.0002814814814814667 -623 630 -2.255140518769849e-17 -623 1123 0.0005000000000000007 -623 1124 -0.00104074074074075 -623 1125 0.009259259259259377 -623 1126 -6.505213034913027e-19 -623 1127 -0.002362962962962972 -623 1128 0.0370370370370372 -623 1129 -0.0005 -623 1130 -0.001040740740740738 -623 1131 0.009259259259259219 -624 613 -0.012962962962963 -624 614 -0.01342592592592594 -624 615 -0.1551783264746244 -624 616 -0.02407407407407396 -624 617 -1.734723475976807e-18 -624 618 -0.1063100137174177 -624 619 4.683753385137379e-17 -624 620 -0.02870370370370393 -624 621 -0.2040466392318266 -624 622 -1.457167719820518e-16 -624 623 1.283695372222837e-16 -624 624 1.241426611796988 -624 625 0.01296296296296295 -624 626 -0.01342592592592589 -624 627 -0.1551783264746222 -624 628 0.0240740740740741 -624 629 1.040834085586084e-17 -624 630 -0.1063100137174232 -624 1123 -0.01296296296296305 -624 1124 0.01342592592592612 -624 1125 -0.1551783264746254 -624 1126 1.040834085586084e-16 -624 1127 0.02870370370370363 -624 1128 -0.2040466392318265 -624 1129 0.01296296296296295 -624 1130 0.01342592592592588 -624 1131 -0.1551783264746221 -625 625 1 -626 626 1 -627 619 -0.01203703703703705 -627 620 -0.01342592592592588 -627 621 -0.05315500685871185 -627 622 -0.01296296296296295 -627 623 0.01342592592592588 -627 624 -0.1551783264746222 -627 625 3.469446951953614e-17 -627 626 -0.02870370370370379 -627 627 0.6207133058984899 -627 628 -2.775557561562891e-17 -627 629 0.02870370370370377 -627 630 -0.204046639231825 -627 631 0.01203703703703702 -627 632 -0.01342592592592596 -627 633 -0.05315500685870794 -627 634 0.01296296296296297 -627 635 0.01342592592592599 -627 636 -0.1551783264746229 -628 619 -0.0009703703703703715 -628 620 -0.0005 -628 621 -0.008333333333333333 -628 622 -0.001659259259259277 -628 623 -1.084202172485504e-19 -628 624 -0.03333333333333333 -628 625 -0.0002814814814814882 -628 626 7.589415207398531e-19 -628 627 -1.734723475976807e-18 -628 628 0.007762962962962959 -628 629 2.710505431213761e-18 -628 630 -1.040834085586084e-17 -628 631 -0.0009703703703703656 -628 632 0.0004999999999999993 -628 633 0.008333333333333333 -628 634 -0.001659259259259226 -628 635 -2.602085213965211e-18 -628 636 0.03333333333333333 -628 1126 -0.0009703703703703715 -628 1127 0.0005000000000000001 -628 1128 -0.008333333333333331 -628 1129 -0.0002814814814814882 -628 1130 5.421010862427522e-19 -628 1131 -3.469446951953614e-18 -628 1132 -0.0009703703703703701 -628 1133 -0.0005000000000000007 -628 1134 0.008333333333333333 -629 619 -0.0005 -629 620 -0.001040740740740738 -629 621 -0.009259259259259198 -629 623 0.0002814814814814667 -629 624 -2.081668171172169e-17 -629 625 6.505213034913027e-19 -629 626 -0.002362962962962972 -629 627 -0.03703703703703708 -629 628 2.710505431213761e-18 -629 629 0.008325925925925935 -629 630 -6.245004513516506e-17 -629 631 0.0004999999999999994 -629 632 -0.001040740740740741 -629 633 -0.009259259259259316 -629 634 -2.602085213965211e-18 -629 635 0.00028148148148151 -629 636 9.540979117872439e-17 -629 1126 0.0005 -629 1127 -0.001040740740740738 -629 1128 0.009259259259259219 -629 1129 7.589415207398531e-19 -629 1130 -0.002362962962962972 -629 1131 0.03703703703703718 -629 1132 -0.0005000000000000007 -629 1133 -0.00104074074074075 -629 1134 0.009259259259259398 -630 619 -0.01296296296296295 -630 620 -0.01342592592592589 -630 621 -0.1551783264746222 -630 622 -0.02407407407407412 -630 623 1.040834085586084e-17 -630 624 -0.1063100137174232 -630 625 2.949029909160572e-17 -630 626 -0.02870370370370393 -630 627 -0.204046639231825 -630 628 1.561251128379126e-17 -630 629 1.144917494144693e-16 -630 630 1.241426611796978 -630 631 0.01296296296296292 -630 632 -0.01342592592592595 -630 633 -0.1551783264746219 -630 634 0.0240740740740741 -630 635 1.214306433183765e-17 -630 636 -0.106310013717416 -630 1126 -0.01296296296296295 -630 1127 0.01342592592592588 -630 1128 -0.1551783264746221 -630 1129 -2.775557561562891e-17 -630 1130 0.02870370370370377 -630 1131 -0.2040466392318249 -630 1132 0.01296296296296297 -630 1133 0.01342592592592598 -630 1134 -0.1551783264746229 -631 631 1 -632 632 1 -633 625 -0.01203703703703708 -633 626 -0.01342592592592595 -633 627 -0.05315500685870794 -633 628 -0.01296296296296292 -633 629 0.01342592592592586 -633 630 -0.1551783264746219 -633 631 8.326672684688674e-17 -633 632 -0.02870370370370365 -633 633 0.6207133058984883 -633 634 -8.326672684688674e-17 -633 635 0.02870370370370369 -633 636 -0.2040466392318226 -633 637 0.012037037037037 -633 638 -0.01342592592592585 -633 639 -0.05315500685871279 -633 640 0.012962962962963 -633 641 0.0134259259259259 -633 642 -0.155178326474623 -634 625 -0.0009703703703703701 -634 626 -0.0005000000000000007 -634 627 -0.008333333333333331 -634 628 -0.001659259259259226 -634 629 -2.818925648462312e-18 -634 630 -0.03333333333333333 -634 631 -0.0002814814814814749 -634 632 1.951563910473908e-18 -634 634 0.007762962962962967 -634 635 8.239936510889834e-18 -634 636 -3.469446951953614e-18 -634 637 -0.0009703703703703695 -634 638 0.0004999999999999987 -634 639 0.008333333333333335 -634 640 -0.001659259259259308 -634 641 -5.421010862427522e-18 -634 642 0.03333333333333334 -634 1129 -0.0009703703703703656 -634 1130 0.0004999999999999994 -634 1131 -0.008333333333333331 -634 1132 -0.0002814814814814748 -634 1133 1.951563910473908e-18 -634 1135 -0.0009703703703703784 -634 1136 -0.0005000000000000013 -634 1137 0.008333333333333335 -635 625 -0.0005000000000000008 -635 626 -0.00104074074074075 -635 627 -0.009259259259259354 -635 628 -2.602085213965211e-18 -635 629 0.00028148148148151 -635 630 -5.204170427930421e-17 -635 631 1.951563910473908e-18 -635 632 -0.002362962962962954 -635 633 -0.03703703703703698 -635 634 8.131516293641283e-18 -635 635 0.008325925925925917 -635 636 -1.040834085586084e-17 -635 637 0.0004999999999999986 -635 638 -0.001040740740740725 -635 639 -0.00925925925925908 -635 640 -5.204170427930421e-18 -635 641 0.0002814814814814399 -635 642 2.775557561562891e-16 -635 1129 0.0004999999999999993 -635 1130 -0.001040740740740741 -635 1131 0.009259259259259361 -635 1132 1.951563910473908e-18 -635 1133 -0.002362962962962954 -635 1134 0.03703703703703691 -635 1135 -0.0005000000000000014 -635 1136 -0.001040740740740743 -635 1137 0.009259259259259153 -636 625 -0.01296296296296297 -636 626 -0.01342592592592607 -636 627 -0.1551783264746229 -636 628 -0.02407407407407411 -636 629 2.949029909160572e-17 -636 630 -0.106310013717416 -636 631 8.153200337090993e-17 -636 632 -0.02870370370370355 -636 633 -0.2040466392318226 -636 634 1.040834085586084e-17 -636 635 -5.898059818321144e-17 -636 636 1.241426611796977 -636 637 0.01296296296296289 -636 638 -0.01342592592592577 -636 639 -0.155178326474621 -636 640 0.0240740740740741 -636 641 -2.949029909160572e-17 -636 642 -0.1063100137174277 -636 1129 -0.01296296296296292 -636 1130 0.01342592592592586 -636 1131 -0.1551783264746218 -636 1132 -8.326672684688674e-17 -636 1133 0.02870370370370369 -636 1134 -0.2040466392318225 -636 1135 0.012962962962963 -636 1136 0.0134259259259259 -636 1137 -0.155178326474623 -637 637 1 -638 638 1 -639 631 -0.01203703703703711 -639 632 -0.01342592592592583 -639 633 -0.05315500685871279 -639 634 -0.01296296296296289 -639 635 0.01342592592592566 -639 636 -0.155178326474621 -639 637 6.245004513516506e-17 -639 638 -0.02870370370370329 -639 639 0.6207133058984865 -639 640 -5.551115123125783e-17 -639 641 0.02870370370370347 -639 642 -0.2040466392318186 -639 643 0.01203703703703705 -639 644 -0.01342592592592588 -639 645 -0.05315500685871186 -639 646 0.01296296296296295 -639 647 0.01342592592592588 -639 648 -0.1551783264746222 -640 631 -0.0009703703703703784 -640 632 -0.0005000000000000013 -640 633 -0.008333333333333333 -640 634 -0.001659259259259308 -640 635 -5.204170427930421e-18 -640 636 -0.03333333333333333 -640 637 -0.0002814814814814531 -640 638 1.301042606982605e-18 -640 639 -1.734723475976807e-18 -640 640 0.007762962962962983 -640 641 5.204170427930421e-18 -640 642 -1.387778780781446e-17 -640 643 -0.0009703703703703715 -640 644 0.0005 -640 645 0.008333333333333333 -640 646 -0.001659259259259277 -640 648 0.03333333333333334 -640 1132 -0.0009703703703703695 -640 1133 0.0004999999999999987 -640 1134 -0.008333333333333333 -640 1135 -0.0002814814814814532 -640 1136 1.301042606982605e-18 -640 1137 -3.469446951953614e-18 -640 1138 -0.0009703703703703715 -640 1139 -0.0005 -640 1140 0.008333333333333335 -641 631 -0.0005000000000000013 -641 632 -0.001040740740740743 -641 633 -0.009259259259259155 -641 634 -5.529431079676073e-18 -641 635 0.0002814814814814401 -641 636 -1.734723475976807e-17 -641 637 1.409462824231156e-18 -641 638 -0.002362962962962925 -641 639 -0.03703703703703673 -641 640 5.204170427930421e-18 -641 641 0.008325925925925888 -641 642 -1.942890293094024e-16 -641 643 0.0005000000000000001 -641 644 -0.001040740740740738 -641 645 -0.009259259259259196 -641 646 -1.084202172485504e-19 -641 647 0.0002814814814814667 -641 648 -2.255140518769849e-17 -641 1132 0.0004999999999999987 -641 1133 -0.001040740740740725 -641 1134 0.009259259259259078 -641 1135 1.409462824231156e-18 -641 1136 -0.002362962962962925 -641 1137 0.03703703703703656 -641 1138 -0.0005 -641 1139 -0.001040740740740738 -641 1140 0.009259259259259219 -642 631 -0.01296296296296301 -642 632 -0.01342592592592601 -642 633 -0.155178326474623 -642 634 -0.02407407407407411 -642 635 3.469446951953614e-18 -642 636 -0.1063100137174277 -642 637 5.724587470723463e-17 -642 638 -0.02870370370370304 -642 639 -0.2040466392318186 -642 640 1.040834085586084e-17 -642 641 -8.326672684688674e-17 -642 642 1.241426611796976 -642 643 0.01296296296296295 -642 644 -0.01342592592592589 -642 645 -0.1551783264746222 -642 646 0.0240740740740741 -642 647 1.040834085586084e-17 -642 648 -0.1063100137174232 -642 1132 -0.01296296296296289 -642 1133 0.01342592592592566 -642 1134 -0.1551783264746209 -642 1135 -5.377642775528102e-17 -642 1136 0.02870370370370347 -642 1137 -0.2040466392318186 -642 1138 0.01296296296296295 -642 1139 0.01342592592592588 -642 1140 -0.1551783264746221 -643 643 1 -644 644 1 -645 637 -0.01203703703703705 -645 638 -0.01342592592592588 -645 639 -0.05315500685871185 -645 640 -0.01296296296296295 -645 641 0.01342592592592588 -645 642 -0.1551783264746222 -645 643 -3.469446951953614e-18 -645 644 -0.02870370370370375 -645 645 0.6207133058984917 -645 646 6.938893903907228e-18 -645 647 0.02870370370370407 -645 648 -0.2040466392318266 -645 649 0.01203703703703706 -645 650 -0.013425925925926 -645 651 -0.05315500685870761 -645 652 0.01296296296296294 -645 653 0.01342592592592567 -645 654 -0.1551783264746234 -646 637 -0.0009703703703703715 -646 638 -0.0005 -646 639 -0.008333333333333333 -646 640 -0.001659259259259277 -646 641 -1.084202172485504e-19 -646 642 -0.03333333333333333 -646 643 -0.0002814814814814882 -646 644 -1.951563910473908e-18 -646 645 -1.734723475976807e-18 -646 646 0.007762962962962959 -646 647 -7.914675859144182e-18 -646 648 -1.040834085586084e-17 -646 649 -0.0009703703703703745 -646 650 0.000500000000000002 -646 651 0.008333333333333333 -646 652 -0.001659259259259226 -646 653 8.023096076392733e-18 -646 654 0.03333333333333333 -646 1135 -0.0009703703703703715 -646 1136 0.0005000000000000001 -646 1137 -0.008333333333333331 -646 1138 -0.0002814814814814882 -646 1139 -2.059984127722458e-18 -646 1140 -3.469446951953614e-18 -646 1141 -0.0009703703703703612 -646 1142 -0.0004999999999999981 -646 1143 0.008333333333333333 -647 637 -0.0005 -647 638 -0.001040740740740738 -647 639 -0.009259259259259198 -647 641 0.0002814814814814667 -647 642 -2.081668171172169e-17 -647 643 -2.059984127722458e-18 -647 644 -0.002362962962962972 -647 645 -0.03703703703703719 -647 646 -7.914675859144182e-18 -647 647 0.008325925925925935 -647 648 -5.30825383648903e-16 -647 649 0.000500000000000002 -647 650 -0.001040740740740759 -647 651 -0.009259259259259347 -647 652 7.914675859144182e-18 -647 653 0.00028148148148151 -647 654 -3.122502256758253e-17 -647 1135 0.0005 -647 1136 -0.001040740740740738 -647 1137 0.009259259259259219 -647 1138 -1.951563910473908e-18 -647 1139 -0.002362962962962972 -647 1140 0.03703703703703706 -647 1141 -0.000499999999999998 -647 1142 -0.001040740740740732 -647 1143 0.009259259259259366 -648 637 -0.01296296296296295 -648 638 -0.01342592592592589 -648 639 -0.1551783264746222 -648 640 -0.02407407407407412 -648 641 1.040834085586084e-17 -648 642 -0.1063100137174232 -648 643 -1.543903893619358e-16 -648 644 -0.02870370370370348 -648 645 -0.2040466392318266 -648 646 1.665334536937735e-16 -648 647 6.418476861114186e-17 -648 648 1.241426611796988 -648 649 0.0129629629629631 -648 650 -0.01342592592592639 -648 651 -0.1551783264746265 -648 652 0.02407407407407395 -648 653 6.418476861114186e-17 -648 654 -0.1063100137174177 -648 1135 -0.01296296296296295 -648 1136 0.01342592592592588 -648 1137 -0.1551783264746221 -648 1138 1.040834085586084e-17 -648 1139 0.02870370370370408 -648 1140 -0.2040466392318265 -648 1141 0.01296296296296293 -648 1142 0.01342592592592567 -648 1143 -0.1551783264746233 -649 649 1 -650 650 1 -651 643 -0.01203703703703689 -651 644 -0.01342592592592603 -651 645 -0.05315500685870761 -651 646 -0.01296296296296311 -651 647 0.01342592592592603 -651 648 -0.1551783264746265 -651 649 -2.116362640691705e-16 -651 650 -0.02870370370370409 -651 651 0.6207133058984948 -651 652 2.151057110211241e-16 -651 653 0.02870370370370413 -651 654 -0.2040466392318305 -651 655 0.0120370370370371 -651 656 -0.01342592592592596 -651 657 -0.05315500685870884 -651 658 0.01296296296296289 -651 659 0.01342592592592591 -651 660 -0.1551783264746214 -652 643 -0.0009703703703703612 -652 644 -0.000499999999999998 -652 645 -0.008333333333333331 -652 646 -0.001659259259259226 -652 647 7.806255641895632e-18 -652 648 -0.03333333333333333 -652 649 -0.0002814814814815097 -652 650 -3.361026734705064e-18 -652 651 -1.734723475976807e-18 -652 652 0.007762962962962943 -652 653 -1.322726650432315e-17 -652 654 -6.938893903907228e-18 -652 655 -0.0009703703703703723 -652 656 0.0005000000000000013 -652 657 0.008333333333333333 -652 658 -0.001659259259259226 -652 659 5.421010862427522e-18 -652 660 0.03333333333333333 -652 1138 -0.0009703703703703745 -652 1139 0.0005000000000000021 -652 1140 -0.008333333333333331 -652 1141 -0.0002814814814815097 -652 1142 -3.361026734705064e-18 -652 1143 -1.734723475976807e-18 -652 1144 -0.0009703703703703634 -652 1145 -0.0004999999999999987 -652 1146 0.008333333333333333 -653 643 -0.0004999999999999981 -653 644 -0.001040740740740732 -653 645 -0.009259259259259236 -653 646 8.023096076392733e-18 -653 647 0.00028148148148151 -653 648 4.128641872824801e-16 -653 649 -3.252606517456513e-18 -653 650 -0.002362962962963001 -653 651 -0.0370370370370374 -653 652 -1.33356867215717e-17 -653 653 0.008325925925925962 -653 654 -1.422473250300982e-16 -653 655 0.0005000000000000013 -653 656 -0.001040740740740754 -653 657 -0.009259259259259404 -653 658 5.204170427930421e-18 -653 659 0.00028148148148151 -653 660 -2.584737979205443e-16 -653 1138 0.000500000000000002 -653 1139 -0.001040740740740759 -653 1140 0.009259259259259477 -653 1141 -3.361026734705064e-18 -653 1142 -0.002362962962963 -653 1143 0.03703703703703746 -653 1144 -0.0004999999999999986 -653 1145 -0.001040740740740737 -653 1146 0.009259259259259309 -654 643 -0.01296296296296294 -654 644 -0.01342592592592603 -654 645 -0.1551783264746234 -654 646 -0.02407407407407396 -654 647 1.214306433183765e-17 -654 648 -0.1063100137174176 -654 649 -6.418476861114186e-17 -654 650 -0.02870370370370415 -654 651 -0.2040466392318305 -654 652 -1.387778780781446e-16 -654 653 9.71445146547012e-17 -654 654 1.241426611796989 -654 655 0.012962962962963 -654 656 -0.01342592592592602 -654 657 -0.1551783264746235 -654 658 0.0240740740740741 -654 659 2.081668171172169e-17 -654 660 -0.106310013717416 -654 1138 -0.0129629629629631 -654 1139 0.01342592592592603 -654 1140 -0.1551783264746264 -654 1141 2.151057110211241e-16 -654 1142 0.02870370370370413 -654 1143 -0.2040466392318304 -654 1144 0.01296296296296289 -654 1145 0.01342592592592591 -654 1146 -0.1551783264746213 -655 655 1 -656 656 1 -657 649 -0.012037037037037 -657 650 -0.01342592592592597 -657 651 -0.05315500685870884 -657 652 -0.012962962962963 -657 653 0.01342592592592615 -657 654 -0.1551783264746235 -657 655 -8.326672684688674e-17 -657 656 -0.02870370370370363 -657 657 0.6207133058984901 -657 658 8.153200337090993e-17 -657 659 0.02870370370370348 -657 660 -0.2040466392318226 -657 661 0.01203703703703708 -657 662 -0.01342592592592584 -657 663 -0.05315500685871369 -657 664 0.01296296296296292 -657 665 0.01342592592592582 -657 666 -0.1551783264746215 -658 649 -0.0009703703703703634 -658 650 -0.0004999999999999986 -658 651 -0.008333333333333331 -658 652 -0.001659259259259226 -658 653 5.204170427930421e-18 -658 654 -0.03333333333333333 -658 655 -0.0002814814814814748 -658 656 -2.059984127722458e-18 -658 658 0.007762962962962967 -658 659 -7.806255641895632e-18 -658 660 -3.469446951953614e-18 -658 661 -0.0009703703703703761 -658 662 0.0005000000000000007 -658 663 0.008333333333333335 -658 664 -0.001659259259259308 -658 665 2.602085213965211e-18 -658 666 0.03333333333333334 -658 1141 -0.0009703703703703723 -658 1142 0.0005000000000000013 -658 1143 -0.008333333333333331 -658 1144 -0.0002814814814814748 -658 1145 -1.951563910473908e-18 -658 1147 -0.0009703703703703718 -658 1148 -0.0004999999999999994 -658 1149 0.008333333333333335 -659 649 -0.0004999999999999987 -659 650 -0.001040740740740736 -659 651 -0.00925925925925933 -659 652 5.421010862427522e-18 -659 653 0.00028148148148151 -659 654 3.989863994746656e-17 -659 655 -1.951563910473908e-18 -659 656 -0.002362962962962954 -659 657 -0.03703703703703692 -659 658 -7.806255641895632e-18 -659 659 0.008325925925925917 -659 660 2.42861286636753e-16 -659 661 0.0005000000000000007 -659 662 -0.001040740740740738 -659 663 -0.009259259259259167 -659 664 2.818925648462312e-18 -659 665 0.0002814814814814399 -659 666 -7.28583859910259e-17 -659 1141 0.0005000000000000013 -659 1142 -0.001040740740740754 -659 1143 0.009259259259259384 -659 1144 -2.168404344971009e-18 -659 1145 -0.002362962962962954 -659 1146 0.03703703703703698 -659 1147 -0.0004999999999999994 -659 1148 -0.00104074074074073 -659 1149 0.009259259259259064 -660 649 -0.01296296296296289 -660 650 -0.01342592592592578 -660 651 -0.1551783264746214 -660 652 -0.02407407407407411 -660 653 -8.673617379884035e-18 -660 654 -0.106310013717416 -660 655 -8.500145032286355e-17 -660 656 -0.02870370370370376 -660 657 -0.2040466392318225 -660 658 1.040834085586084e-17 -660 659 -3.469446951953614e-17 -660 660 1.241426611796977 -660 661 0.01296296296296298 -660 662 -0.01342592592592585 -660 663 -0.1551783264746225 -660 664 0.0240740740740741 -660 665 -1.734723475976807e-17 -660 666 -0.1063100137174277 -660 1141 -0.012962962962963 -660 1142 0.01342592592592614 -660 1143 -0.1551783264746234 -660 1144 8.153200337090993e-17 -660 1145 0.02870370370370348 -660 1146 -0.2040466392318225 -660 1147 0.01296296296296292 -660 1148 0.01342592592592582 -660 1149 -0.1551783264746214 -661 661 1 -662 662 1 -663 655 -0.01203703703703703 -663 656 -0.01342592592592585 -663 657 -0.05315500685871369 -663 658 -0.01296296296296298 -663 659 0.01342592592592594 -663 660 -0.1551783264746225 -663 661 1.179611963664229e-16 -663 662 -0.02870370370370361 -663 663 0.6207133058984929 -663 664 -1.092875789865388e-16 -663 665 0.02870370370370314 -663 666 -0.2040466392318226 -663 667 0.01203703703703691 -663 668 -0.01342592592592599 -663 669 -0.05315500685870914 -663 670 0.01296296296296309 -663 671 0.01342592592592636 -663 672 -0.155178326474625 -664 655 -0.0009703703703703718 -664 656 -0.0004999999999999994 -664 657 -0.008333333333333333 -664 658 -0.001659259259259308 -664 659 2.818925648462312e-18 -664 660 -0.03333333333333333 -664 661 -0.0002814814814814748 -664 662 2.710505431213761e-18 -664 663 -3.469446951953614e-18 -664 664 0.007762962962962968 -664 665 1.040834085586084e-17 -664 666 -1.387778780781446e-17 -664 667 -0.0009703703703703568 -664 668 0.0004999999999999966 -664 669 0.008333333333333333 -664 670 -0.001659259259259226 -664 671 -1.322726650432315e-17 -664 672 0.03333333333333333 -664 1144 -0.0009703703703703761 -664 1145 0.0005000000000000007 -664 1146 -0.008333333333333333 -664 1147 -0.0002814814814814749 -664 1148 2.710505431213761e-18 -664 1149 -3.469446951953614e-18 -664 1150 -0.000970370370370379 -664 1151 -0.0005000000000000034 -664 1152 0.008333333333333333 -665 655 -0.0004999999999999994 -665 656 -0.00104074074074073 -665 657 -0.00925925925925913 -665 658 2.602085213965211e-18 -665 659 0.0002814814814814401 -665 660 7.632783294297951e-17 -665 661 2.710505431213761e-18 -665 662 -0.002362962962962954 -665 663 -0.03703703703703681 -665 664 1.040834085586084e-17 -665 665 0.008325925925925917 -665 666 6.557254739192331e-16 -665 667 0.0004999999999999966 -665 668 -0.001040740740740723 -665 669 -0.009259259259259285 -665 670 -1.33356867215717e-17 -665 671 0.00028148148148151 -665 672 2.168404344971009e-16 -665 1144 0.0005000000000000008 -665 1145 -0.001040740740740738 -665 1146 0.009259259259259103 -665 1147 2.710505431213761e-18 -665 1148 -0.002362962962962954 -665 1149 0.03703703703703708 -665 1150 -0.0005000000000000033 -665 1151 -0.001040740740740768 -665 1152 0.009259259259259429 -666 655 -0.01296296296296292 -666 656 -0.01342592592592573 -666 657 -0.1551783264746215 -666 658 -0.02407407407407411 -666 659 -3.642919299551295e-17 -666 660 -0.1063100137174277 -666 661 1.110223024625157e-16 -666 662 -0.02870370370370409 -666 663 -0.2040466392318226 -666 664 1.387778780781446e-17 -666 665 1.561251128379126e-17 -666 666 1.241426611796977 -666 667 0.01296296296296281 -666 668 -0.01342592592592557 -666 669 -0.1551783264746199 -666 670 0.0240740740740741 -666 671 -4.163336342344337e-17 -666 672 -0.106310013717416 -666 1144 -0.01296296296296297 -666 1145 0.01342592592592594 -666 1146 -0.1551783264746225 -666 1147 -1.110223024625157e-16 -666 1148 0.02870370370370315 -666 1149 -0.2040466392318225 -666 1150 0.01296296296296309 -666 1151 0.01342592592592636 -666 1152 -0.155178326474625 -667 667 1 -668 668 1 -669 661 -0.01203703703703719 -669 662 -0.01342592592592595 -669 663 -0.05315500685870912 -669 664 -0.01296296296296281 -669 665 0.01342592592592576 -669 666 -0.1551783264746199 -669 667 7.979727989493313e-17 -669 668 -0.02870370370370374 -669 669 0.6207133058984877 -669 670 -8.500145032286355e-17 -669 671 0.02870370370370397 -669 672 -0.2040466392318245 -669 673 0.01203703703703711 -669 674 -0.01342592592592586 -669 675 -0.05315500685871315 -669 676 0.01296296296296289 -669 677 0.01342592592592581 -669 678 -0.1551783264746211 -670 661 -0.000970370370370379 -670 662 -0.0005000000000000033 -670 663 -0.008333333333333331 -670 664 -0.001659259259259226 -670 665 -1.344410693882025e-17 -670 666 -0.03333333333333333 -670 667 -0.0002814814814814854 -670 668 1.951563910473908e-18 -670 670 0.007762962962962959 -670 671 8.239936510889834e-18 -670 672 -3.469446951953614e-18 -670 673 -0.0009703703703703766 -670 674 0.0005000000000000013 -670 675 0.008333333333333335 -670 676 -0.001659259259259283 -670 677 5.204170427930421e-18 -670 678 0.03333333333333334 -670 1147 -0.0009703703703703568 -670 1148 0.0004999999999999968 -670 1149 -0.008333333333333331 -670 1150 -0.0002814814814814854 -670 1151 1.843143693225358e-18 -670 1152 -1.734723475976807e-18 -670 1153 -0.0009703703703703678 -670 1154 -0.0004999999999999986 -670 1155 0.008333333333333335 -671 661 -0.0005000000000000034 -671 662 -0.001040740740740768 -671 663 -0.00925925925925947 -671 664 -1.322726650432315e-17 -671 665 0.00028148148148151 -671 666 -5.204170427930421e-16 -671 667 2.059984127722458e-18 -671 668 -0.002362962962962969 -671 669 -0.0370370370370371 -671 670 8.131516293641283e-18 -671 671 0.008325925925925931 -671 672 -4.336808689942018e-16 -671 673 0.0005000000000000014 -671 674 -0.001040740740740746 -671 675 -0.009259259259259228 -671 676 5.421010862427522e-18 -671 677 0.0002814814814814616 -671 678 -2.758210326803123e-16 -671 1147 0.0004999999999999966 -671 1148 -0.001040740740740723 -671 1149 0.009259259259259245 -671 1150 1.843143693225358e-18 -671 1151 -0.002362962962962968 -671 1152 0.03703703703703708 -671 1153 -0.0004999999999999988 -671 1154 -0.001040740740740729 -671 1155 0.009259259259259153 -672 661 -0.01296296296296309 -672 662 -0.01342592592592617 -672 663 -0.155178326474625 -672 664 -0.02407407407407411 -672 665 4.510281037539698e-17 -672 666 -0.106310013717416 -672 667 8.153200337090993e-17 -672 668 -0.02870370370370363 -672 669 -0.2040466392318245 -672 670 5.204170427930421e-18 -672 671 1.214306433183765e-16 -672 672 1.241426611796978 -672 673 0.012962962962963 -672 674 -0.01342592592592593 -672 675 -0.1551783264746232 -672 676 0.0240740740740741 -672 677 2.949029909160572e-17 -672 678 -0.1063100137174241 -672 1147 -0.01296296296296281 -672 1148 0.01342592592592576 -672 1149 -0.1551783264746198 -672 1150 -8.500145032286355e-17 -672 1151 0.02870370370370397 -672 1152 -0.2040466392318244 -672 1153 0.01296296296296289 -672 1154 0.01342592592592581 -672 1155 -0.1551783264746211 -673 673 1 -674 674 1 -675 667 -0.012037037037037 -675 668 -0.01342592592592588 -675 669 -0.05315500685871315 -675 670 -0.01296296296296301 -675 671 0.01342592592592605 -675 672 -0.1551783264746232 -675 673 2.602085213965211e-17 -675 674 -0.02870370370370371 -675 675 0.6207133058984964 -675 676 -1.734723475976807e-17 -675 677 0.02870370370370354 -675 678 -0.2040466392318267 -675 679 0.01203703703703697 -675 680 -0.01342592592592604 -675 681 -0.05315500685870837 -675 682 0.01296296296296302 -675 683 0.01342592592592604 -675 684 -0.155178326474625 -676 667 -0.0009703703703703678 -676 668 -0.0004999999999999988 -676 669 -0.008333333333333333 -676 670 -0.001659259259259283 -676 671 5.312590645178972e-18 -676 672 -0.03333333333333333 -676 673 -0.0002814814814814885 -676 674 -1.192622389734055e-18 -676 675 -1.734723475976807e-18 -676 676 0.007762962962962959 -676 677 -5.312590645178972e-18 -676 678 -1.387778780781446e-17 -676 679 -0.0009703703703703678 -676 680 0.0005 -676 681 0.008333333333333335 -676 682 -0.001659259259259219 -676 684 0.03333333333333333 -676 1150 -0.0009703703703703766 -676 1151 0.0005000000000000014 -676 1152 -0.008333333333333331 -676 1153 -0.0002814814814814884 -676 1154 -1.409462824231156e-18 -676 1155 -1.734723475976807e-18 -676 1156 -0.0009703703703703678 -676 1157 -0.0005 -676 1158 0.008333333333333335 -677 667 -0.0004999999999999987 -677 668 -0.001040740740740729 -677 669 -0.009259259259259155 -677 670 5.204170427930421e-18 -677 671 0.0002814814814814615 -677 672 2.081668171172169e-17 -677 673 -1.301042606982605e-18 -677 674 -0.002362962962962973 -677 675 -0.03703703703703703 -677 676 -5.421010862427522e-18 -677 677 0.008325925925925936 -677 678 1.457167719820518e-16 -677 679 0.0005 -677 680 -0.001040740740740747 -677 681 -0.009259259259259377 -677 682 1.084202172485504e-19 -677 683 0.0002814814814815158 -677 1150 0.0005000000000000014 -677 1151 -0.001040740740740746 -677 1152 0.009259259259259226 -677 1153 -1.301042606982605e-18 -677 1154 -0.002362962962962973 -677 1155 0.03703703703703724 -677 1156 -0.0005000000000000001 -677 1157 -0.001040740740740747 -677 1158 0.009259259259259377 -678 667 -0.01296296296296289 -678 668 -0.0134259259259257 -678 669 -0.1551783264746211 -678 670 -0.02407407407407412 -678 672 -0.1063100137174241 -678 673 -1.318389841742373e-16 -678 674 -0.02870370370370402 -678 675 -0.2040466392318267 -678 676 1.682681771697503e-16 -678 677 1.249000902703301e-16 -678 678 1.241426611796988 -678 679 0.01296296296296302 -678 680 -0.01342592592592605 -678 681 -0.155178326474625 -678 682 0.02407407407407395 -678 683 3.469446951953614e-18 -678 684 -0.1063100137174167 -678 1150 -0.012962962962963 -678 1151 0.01342592592592605 -678 1152 -0.1551783264746231 -678 1153 -1.734723475976807e-17 -678 1154 0.02870370370370354 -678 1155 -0.2040466392318266 -678 1156 0.01296296296296302 -678 1157 0.01342592592592604 -678 1158 -0.1551783264746249 -679 679 1 -680 680 1 -681 673 -0.01203703703703698 -681 674 -0.01342592592592604 -681 675 -0.05315500685870837 -681 676 -0.01296296296296303 -681 677 0.01342592592592604 -681 678 -0.155178326474625 -681 679 -1.856154119295184e-16 -681 680 -0.02870370370370368 -681 681 0.6207133058984903 -681 682 1.873501354054952e-16 -681 683 0.02870370370370403 -681 684 -0.2040466392318247 -681 685 0.01203703703703716 -681 686 -0.01342592592592582 -681 687 -0.0531550068587122 -681 688 0.01296296296296284 -681 689 0.01342592592592547 -681 690 -0.15517832647462 -682 673 -0.0009703703703703678 -682 674 -0.0005000000000000001 -682 675 -0.008333333333333333 -682 676 -0.001659259259259219 -682 677 1.084202172485504e-19 -682 678 -0.03333333333333333 -682 679 -0.0002814814814814777 -682 680 -2.602085213965211e-18 -682 681 -1.734723475976807e-18 -682 682 0.007762962962962966 -682 683 -1.062518129035794e-17 -682 684 -3.469446951953614e-18 -682 685 -0.0009703703703703827 -682 686 0.0005000000000000027 -682 687 0.008333333333333335 -682 688 -0.001659259259259308 -682 689 1.051676107310939e-17 -682 690 0.03333333333333334 -682 1153 -0.0009703703703703678 -682 1154 0.0005 -682 1155 -0.008333333333333333 -682 1156 -0.0002814814814814777 -682 1157 -2.710505431213761e-18 -682 1158 -1.734723475976807e-18 -682 1159 -0.0009703703703703649 -682 1160 -0.0004999999999999973 -682 1161 0.008333333333333335 -683 673 -0.0005000000000000001 -683 674 -0.001040740740740747 -683 675 -0.009259259259259377 -683 677 0.0002814814814815158 -683 679 -2.602085213965211e-18 -683 680 -0.002362962962962958 -683 681 -0.03703703703703715 -683 682 -1.062518129035794e-17 -683 683 0.008325925925925922 -683 684 -3.781697177629439e-16 -683 685 0.0005000000000000026 -683 686 -0.001040740740740752 -683 687 -0.009259259259259169 -683 688 1.073360150760649e-17 -683 689 0.00028148148148144 -683 690 -8.153200337090993e-17 -683 1153 0.0005000000000000001 -683 1154 -0.001040740740740747 -683 1155 0.009259259259259377 -683 1156 -2.602085213965211e-18 -683 1157 -0.002362962962962958 -683 1158 0.03703703703703683 -683 1159 -0.0004999999999999974 -683 1160 -0.001040740740740716 -683 1161 0.009259259259259063 -684 673 -0.01296296296296303 -684 674 -0.01342592592592605 -684 675 -0.155178326474625 -684 676 -0.02407407407407396 -684 677 3.469446951953614e-18 -684 678 -0.1063100137174167 -684 679 -3.295974604355933e-17 -684 680 -0.02870370370370317 -684 681 -0.2040466392318247 -684 682 -1.43982048506075e-16 -684 683 -1.613292832658431e-16 -684 684 1.241426611796988 -684 685 0.01296296296296306 -684 686 -0.0134259259259262 -684 687 -0.1551783264746241 -684 688 0.0240740740740741 -684 689 2.775557561562891e-17 -684 690 -0.1063100137174277 -684 1153 -0.01296296296296302 -684 1154 0.01342592592592604 -684 1155 -0.1551783264746249 -684 1156 1.856154119295184e-16 -684 1157 0.02870370370370403 -684 1158 -0.2040466392318246 -684 1159 0.01296296296296284 -684 1160 0.01342592592592547 -684 1161 -0.1551783264746199 -685 685 1 -686 686 1 -687 679 -0.01203703703703694 -687 680 -0.01342592592592586 -687 681 -0.0531550068587122 -687 682 -0.01296296296296306 -687 683 0.01342592592592595 -687 684 -0.1551783264746241 -687 685 -5.030698080332741e-17 -687 686 -0.02870370370370363 -687 687 0.6207133058984899 -687 688 5.551115123125783e-17 -687 689 0.02870370370370349 -687 690 -0.2040466392318226 -687 691 0.01203703703703699 -687 692 -0.01342592592592596 -687 693 -0.05315500685870765 -687 694 0.01296296296296301 -687 695 0.01342592592592601 -687 696 -0.1551783264746235 -688 679 -0.0009703703703703649 -688 680 -0.0004999999999999974 -688 681 -0.008333333333333333 -688 682 -0.001659259259259308 -688 683 1.073360150760649e-17 -688 684 -0.03333333333333333 -688 685 -0.0002814814814814748 -688 686 -1.192622389734055e-18 -688 687 -3.469446951953614e-18 -688 688 0.007762962962962968 -688 689 -5.421010862427522e-18 -688 690 -1.387778780781446e-17 -688 691 -0.0009703703703703634 -688 692 0.0004999999999999986 -688 693 0.008333333333333333 -688 694 -0.001659259259259226 -688 695 -5.312590645178972e-18 -688 696 0.03333333333333333 -688 1156 -0.0009703703703703827 -688 1157 0.0005000000000000027 -688 1158 -0.008333333333333333 -688 1159 -0.0002814814814814747 -688 1160 -1.409462824231156e-18 -688 1161 -3.469446951953614e-18 -688 1162 -0.0009703703703703723 -688 1163 -0.0005000000000000013 -688 1164 0.008333333333333333 -689 679 -0.0004999999999999974 -689 680 -0.001040740740740716 -689 681 -0.009259259259259023 -689 682 1.051676107310939e-17 -689 683 0.0002814814814814402 -689 684 5.100087019371813e-16 -689 685 -1.192622389734055e-18 -689 686 -0.002362962962962954 -689 687 -0.03703703703703692 -689 688 -5.529431079676073e-18 -689 689 0.008325925925925917 -689 690 2.324529457808922e-16 -689 691 0.0004999999999999987 -689 692 -0.001040740740740736 -689 693 -0.009259259259259287 -689 694 -5.421010862427522e-18 -689 695 0.00028148148148151 -689 696 2.116362640691705e-16 -689 1156 0.0005000000000000027 -689 1157 -0.001040740740740752 -689 1158 0.009259259259259212 -689 1159 -1.192622389734055e-18 -689 1160 -0.002362962962962954 -689 1161 0.03703703703703697 -689 1162 -0.0005000000000000013 -689 1163 -0.001040740740740754 -689 1164 0.009259259259259427 -690 679 -0.01296296296296284 -690 680 -0.01342592592592572 -690 681 -0.15517832647462 -690 682 -0.02407407407407411 -690 683 -3.816391647148976e-17 -690 684 -0.1063100137174277 -690 685 -5.377642775528102e-17 -690 686 -0.02870370370370375 -690 687 -0.2040466392318226 -690 688 1.040834085586084e-17 -690 689 -3.122502256758253e-17 -690 690 1.241426611796977 -690 691 0.01296296296296289 -690 692 -0.01342592592592592 -690 693 -0.1551783264746214 -690 694 0.0240740740740741 -690 695 5.204170427930421e-18 -690 696 -0.106310013717416 -690 1156 -0.01296296296296306 -690 1157 0.01342592592592595 -690 1158 -0.155178326474624 -690 1159 5.898059818321144e-17 -690 1160 0.02870370370370349 -690 1161 -0.2040466392318225 -690 1162 0.012962962962963 -690 1163 0.01342592592592601 -690 1164 -0.1551783264746234 -691 691 1 -692 692 1 -693 685 -0.01203703703703711 -693 686 -0.01342592592592595 -693 687 -0.05315500685870765 -693 688 -0.01296296296296289 -693 689 0.01342592592592577 -693 690 -0.1551783264746214 -693 691 2.775557561562891e-17 -693 692 -0.02870370370370374 -693 693 0.6207133058984879 -693 694 -2.949029909160572e-17 -693 695 0.02870370370370394 -693 696 -0.2040466392318245 -693 697 0.01203703703703708 -693 698 -0.01342592592592586 -693 699 -0.05315500685871284 -693 700 0.01296296296296292 -693 701 0.01342592592592584 -693 702 -0.1551783264746216 -694 685 -0.0009703703703703723 -694 686 -0.0005000000000000013 -694 687 -0.008333333333333331 -694 688 -0.001659259259259226 -694 689 -5.421010862427522e-18 -694 690 -0.03333333333333333 -694 691 -0.0002814814814814855 -694 692 6.505213034913027e-19 -694 694 0.007762962962962959 -694 695 2.818925648462312e-18 -694 696 -3.469446951953614e-18 -694 697 -0.0009703703703703744 -694 698 0.0005000000000000007 -694 699 0.008333333333333335 -694 700 -0.001659259259259283 -694 701 2.602085213965211e-18 -694 702 0.03333333333333334 -694 1159 -0.0009703703703703634 -694 1160 0.0004999999999999987 -694 1161 -0.008333333333333331 -694 1162 -0.0002814814814814853 -694 1163 6.505213034913027e-19 -694 1164 -1.734723475976807e-18 -694 1165 -0.00097037037037037 -694 1166 -0.0004999999999999994 -694 1167 0.008333333333333335 -695 685 -0.0005000000000000014 -695 686 -0.001040740740740754 -695 687 -0.009259259259259361 -695 688 -5.204170427930421e-18 -695 689 0.00028148148148151 -695 690 -8.326672684688674e-17 -695 691 6.505213034913027e-19 -695 692 -0.002362962962962968 -695 693 -0.0370370370370371 -695 694 2.818925648462312e-18 -695 695 0.008325925925925933 -695 696 -3.885780586188048e-16 -695 697 0.0005000000000000008 -695 698 -0.001040740740740742 -695 699 -0.0092592592592592 -695 700 2.602085213965211e-18 -695 701 0.0002814814814814616 -695 702 -1.578598363138894e-16 -695 1159 0.0004999999999999986 -695 1160 -0.001040740740740736 -695 1161 0.009259259259259352 -695 1162 5.421010862427522e-19 -695 1163 -0.002362962962962968 -695 1164 0.03703703703703709 -695 1165 -0.0004999999999999995 -695 1166 -0.001040740740740733 -695 1167 0.009259259259259182 -696 685 -0.012962962962963 -696 686 -0.01342592592592616 -696 687 -0.1551783264746235 -696 688 -0.02407407407407411 -696 689 3.989863994746656e-17 -696 690 -0.106310013717416 -696 691 2.602085213965211e-17 -696 692 -0.02870370370370367 -696 693 -0.2040466392318245 -696 694 5.204170427930421e-18 -696 695 1.283695372222837e-16 -696 696 1.241426611796978 -696 697 0.01296296296296298 -696 698 -0.01342592592592591 -696 699 -0.1551783264746227 -696 700 0.0240740740740741 -696 701 2.775557561562891e-17 -696 702 -0.1063100137174241 -696 1159 -0.01296296296296289 -696 1160 0.01342592592592577 -696 1161 -0.1551783264746213 -696 1162 -2.949029909160572e-17 -696 1163 0.02870370370370394 -696 1164 -0.2040466392318244 -696 1165 0.01296296296296292 -696 1166 0.01342592592592584 -696 1167 -0.1551783264746216 -697 697 1 -698 698 1 -699 691 -0.01203703703703703 -699 692 -0.01342592592592587 -699 693 -0.05315500685871284 -699 694 -0.01296296296296298 -699 695 0.01342592592592596 -699 696 -0.1551783264746227 -699 697 8.153200337090993e-17 -699 698 -0.02870370370370364 -699 699 0.6207133058984959 -699 700 -7.28583859910259e-17 -699 701 0.02870370370370353 -699 702 -0.2040466392318261 -699 703 0.01203703703703695 -699 704 -0.01342592592592603 -699 705 -0.05315500685870879 -699 706 0.01296296296296305 -699 707 0.01342592592592605 -699 708 -0.1551783264746255 -700 691 -0.00097037037037037 -700 692 -0.0004999999999999995 -700 693 -0.008333333333333333 -700 694 -0.001659259259259283 -700 695 2.602085213965211e-18 -700 696 -0.03333333333333333 -700 697 -0.0002814814814814856 -700 698 2.168404344971009e-19 -700 699 -3.469446951953614e-18 -700 700 0.007762962962962961 -700 702 -1.387778780781446e-17 -700 703 -0.0009703703703703656 -700 704 0.0004999999999999993 -700 705 0.008333333333333333 -700 706 -0.001659259259259226 -700 707 -2.602085213965211e-18 -700 708 0.03333333333333333 -700 1162 -0.0009703703703703744 -700 1163 0.0005000000000000008 -700 1164 -0.008333333333333331 -700 1165 -0.0002814814814814856 -700 1166 -1.084202172485504e-19 -700 1167 -3.469446951953614e-18 -700 1168 -0.0009703703703703701 -700 1169 -0.0005000000000000007 -700 1170 0.008333333333333333 -701 691 -0.0004999999999999994 -701 692 -0.001040740740740733 -701 693 -0.009259259259259162 -701 694 2.602085213965211e-18 -701 695 0.0002814814814814613 -701 696 -1.040834085586084e-17 -701 698 -0.002362962962962969 -701 699 -0.03703703703703699 -701 701 0.008325925925925931 -701 702 1.734723475976807e-17 -701 703 0.0004999999999999994 -701 704 -0.001040740740740741 -701 705 -0.009259259259259316 -701 706 -2.602085213965211e-18 -701 707 0.00028148148148151 -701 708 9.540979117872439e-17 -701 1162 0.0005000000000000008 -701 1163 -0.001040740740740742 -701 1164 0.009259259259259219 -701 1165 2.168404344971009e-19 -701 1166 -0.002362962962962969 -701 1167 0.03703703703703719 -701 1168 -0.0005000000000000007 -701 1169 -0.00104074074074075 -701 1170 0.009259259259259398 -702 691 -0.01296296296296292 -702 692 -0.01342592592592579 -702 693 -0.1551783264746216 -702 694 -0.02407407407407412 -702 695 8.673617379884035e-18 -702 696 -0.1063100137174241 -702 697 -7.459310946700271e-17 -702 698 -0.02870370370370393 -702 699 -0.2040466392318261 -702 700 1.682681771697503e-16 -702 701 1.769417945496343e-16 -702 702 1.241426611796988 -702 703 0.01296296296296299 -702 704 -0.01342592592592601 -702 705 -0.1551783264746244 -702 706 0.02407407407407395 -702 707 1.040834085586084e-17 -702 708 -0.1063100137174176 -702 1162 -0.01296296296296297 -702 1163 0.01342592592592596 -702 1164 -0.1551783264746226 -702 1165 -7.28583859910259e-17 -702 1166 0.02870370370370353 -702 1167 -0.2040466392318261 -702 1168 0.01296296296296305 -702 1169 0.01342592592592605 -702 1170 -0.1551783264746254 -703 703 1 -704 704 1 -705 697 -0.012037037037037 -705 698 -0.01342592592592602 -705 699 -0.05315500685870879 -705 700 -0.012962962962963 -705 701 0.01342592592592593 -705 702 -0.1551783264746244 -705 703 -9.8879238130678e-17 -705 704 -0.02870370370370409 -705 705 0.6207133058984939 -705 706 1.040834085586084e-16 -705 707 0.02870370370370423 -705 708 -0.2040466392318305 -705 709 0.0120370370370371 -705 710 -0.01342592592592596 -705 711 -0.05315500685870884 -705 712 0.01296296296296289 -705 713 0.01342592592592591 -705 714 -0.1551783264746214 -706 697 -0.0009703703703703701 -706 698 -0.0005000000000000007 -706 699 -0.008333333333333331 -706 700 -0.001659259259259226 -706 701 -2.818925648462312e-18 -706 702 -0.03333333333333333 -706 703 -0.0002814814814815097 -706 704 -6.505213034913027e-19 -706 705 -1.734723475976807e-18 -706 706 0.007762962962962943 -706 707 -2.602085213965211e-18 -706 708 -6.938893903907228e-18 -706 709 -0.0009703703703703723 -706 710 0.0005000000000000013 -706 711 0.008333333333333333 -706 712 -0.001659259259259226 -706 713 5.421010862427522e-18 -706 714 0.03333333333333333 -706 1165 -0.0009703703703703656 -706 1166 0.0004999999999999994 -706 1167 -0.008333333333333331 -706 1168 -0.0002814814814815097 -706 1169 -6.505213034913027e-19 -706 1170 -1.734723475976807e-18 -706 1171 -0.0009703703703703634 -706 1172 -0.0004999999999999987 -706 1173 0.008333333333333333 -707 697 -0.0005000000000000008 -707 698 -0.00104074074074075 -707 699 -0.009259259259259354 -707 700 -2.602085213965211e-18 -707 701 0.00028148148148151 -707 702 -5.204170427930421e-17 -707 703 -6.505213034913027e-19 -707 704 -0.002362962962963001 -707 705 -0.03703703703703742 -707 706 -2.818925648462312e-18 -707 707 0.008325925925925962 -707 708 -2.706168622523819e-16 -707 709 0.0005000000000000013 -707 710 -0.001040740740740754 -707 711 -0.009259259259259404 -707 712 5.204170427930421e-18 -707 713 0.00028148148148151 -707 714 -2.584737979205443e-16 -707 1165 0.0004999999999999993 -707 1166 -0.001040740740740741 -707 1167 0.009259259259259361 -707 1168 -6.505213034913027e-19 -707 1169 -0.002362962962963 -707 1170 0.03703703703703742 -707 1171 -0.0004999999999999986 -707 1172 -0.001040740740740737 -707 1173 0.009259259259259309 -708 697 -0.01296296296296305 -708 698 -0.01342592592592613 -708 699 -0.1551783264746255 -708 700 -0.02407407407407396 -708 701 2.602085213965211e-17 -708 702 -0.1063100137174176 -708 703 4.683753385137379e-17 -708 704 -0.02870370370370405 -708 705 -0.2040466392318305 -708 706 -1.422473250300982e-16 -708 707 9.020562075079397e-17 -708 708 1.241426611796989 -708 709 0.012962962962963 -708 710 -0.01342592592592602 -708 711 -0.1551783264746235 -708 712 0.0240740740740741 -708 713 2.081668171172169e-17 -708 714 -0.106310013717416 -708 1165 -0.01296296296296299 -708 1166 0.01342592592592593 -708 1167 -0.1551783264746243 -708 1168 1.023486850826316e-16 -708 1169 0.02870370370370423 -708 1170 -0.2040466392318304 -708 1171 0.01296296296296289 -708 1172 0.01342592592592591 -708 1173 -0.1551783264746213 -709 709 1 -710 710 1 -711 703 -0.012037037037037 -711 704 -0.01342592592592597 -711 705 -0.05315500685870884 -711 706 -0.012962962962963 -711 707 0.01342592592592615 -711 708 -0.1551783264746235 -711 709 -8.153200337090993e-17 -711 710 -0.02870370370370378 -711 711 0.6207133058984911 -711 712 8.326672684688674e-17 -711 713 0.02870370370370363 -711 714 -0.204046639231825 -711 715 0.01203703703703708 -711 716 -0.01342592592592588 -711 717 -0.05315500685871216 -711 718 0.01296296296296292 -711 719 0.01342592592592585 -711 720 -0.1551783264746217 -712 703 -0.0009703703703703634 -712 704 -0.0004999999999999986 -712 705 -0.008333333333333331 -712 706 -0.001659259259259226 -712 707 5.204170427930421e-18 -712 708 -0.03333333333333333 -712 709 -0.000281481481481488 -712 710 -2.059984127722458e-18 -712 712 0.007762962962962958 -712 713 -7.914675859144182e-18 -712 714 -6.938893903907228e-18 -712 715 -0.0009703703703703737 -712 716 0.0005000000000000007 -712 717 0.008333333333333333 -712 718 -0.001659259259259277 -712 719 2.710505431213761e-18 -712 720 0.03333333333333334 -712 1168 -0.0009703703703703723 -712 1169 0.0005000000000000013 -712 1170 -0.008333333333333331 -712 1171 -0.0002814814814814881 -712 1172 -1.951563910473908e-18 -712 1173 -1.734723475976807e-18 -712 1174 -0.0009703703703703695 -712 1175 -0.0004999999999999994 -712 1176 0.008333333333333335 -713 703 -0.0004999999999999987 -713 704 -0.001040740740740736 -713 705 -0.00925925925925933 -713 706 5.421010862427522e-18 -713 707 0.00028148148148151 -713 708 3.989863994746656e-17 -713 709 -1.951563910473908e-18 -713 710 -0.002362962962962972 -713 711 -0.03703703703703703 -713 712 -7.806255641895632e-18 -713 713 0.008325925925925935 -713 714 1.179611963664229e-16 -713 715 0.0005000000000000008 -713 716 -0.001040740740740743 -713 717 -0.009259259259259228 -713 718 2.710505431213761e-18 -713 719 0.0002814814814814667 -713 720 -1.370431546021678e-16 -713 1168 0.0005000000000000013 -713 1169 -0.001040740740740754 -713 1170 0.009259259259259384 -713 1171 -2.059984127722458e-18 -713 1172 -0.002362962962962971 -713 1173 0.03703703703703722 -713 1174 -0.0004999999999999994 -713 1175 -0.001040740740740734 -713 1176 0.009259259259259189 -714 703 -0.01296296296296289 -714 704 -0.01342592592592578 -714 705 -0.1551783264746214 -714 706 -0.02407407407407411 -714 707 -8.673617379884035e-18 -714 708 -0.106310013717416 -714 709 -8.500145032286355e-17 -714 710 -0.02870370370370406 -714 711 -0.2040466392318249 -714 712 1.040834085586084e-17 -714 713 1.249000902703301e-16 -714 714 1.241426611796978 -714 715 0.01296296296296298 -714 716 -0.01342592592592591 -714 717 -0.1551783264746227 -714 718 0.0240740740740741 -714 719 1.561251128379126e-17 -714 720 -0.1063100137174232 -714 1168 -0.012962962962963 -714 1169 0.01342592592592614 -714 1170 -0.1551783264746234 -714 1171 8.326672684688674e-17 -714 1172 0.02870370370370363 -714 1173 -0.2040466392318248 -714 1174 0.01296296296296292 -714 1175 0.01342592592592585 -714 1176 -0.1551783264746216 -715 715 1 -716 716 1 -717 709 -0.01203703703703703 -717 710 -0.01342592592592588 -717 711 -0.05315500685871215 -717 712 -0.01296296296296297 -717 713 0.01342592592592597 -717 714 -0.1551783264746227 -717 715 -2.42861286636753e-17 -717 716 -0.02870370370370335 -717 717 0.6207133058984902 -717 718 2.42861286636753e-17 -717 719 0.02870370370370326 -717 720 -0.2040466392318206 -717 721 0.01203703703703705 -717 722 -0.01342592592592586 -717 723 -0.05315500685871255 -717 724 0.01296296296296295 -717 725 0.01342592592592586 -717 726 -0.1551783264746222 -718 709 -0.0009703703703703694 -718 710 -0.0004999999999999994 -718 711 -0.008333333333333333 -718 712 -0.001659259259259277 -718 713 2.710505431213761e-18 -718 714 -0.03333333333333333 -718 715 -0.0002814814814814639 -718 716 -6.505213034913027e-19 -718 718 0.007762962962962975 -718 719 -2.710505431213761e-18 -718 720 -6.938893903907228e-18 -718 721 -0.0009703703703703721 -718 722 0.0005 -718 723 0.008333333333333335 -718 724 -0.001659259259259283 -718 726 0.03333333333333334 -718 1171 -0.0009703703703703738 -718 1172 0.0005000000000000008 -718 1173 -0.008333333333333331 -718 1174 -0.0002814814814814639 -718 1175 -7.589415207398531e-19 -718 1176 -3.469446951953614e-18 -718 1177 -0.0009703703703703721 -718 1178 -0.0005 -718 1179 0.008333333333333335 -719 709 -0.0004999999999999994 -719 710 -0.001040740740740734 -719 711 -0.009259259259259189 -719 712 2.602085213965211e-18 -719 713 0.0002814814814814666 -719 714 1.040834085586084e-17 -719 715 -7.589415207398531e-19 -719 716 -0.00236296296296294 -719 717 -0.0370370370370367 -719 718 -2.602085213965211e-18 -719 719 0.008325925925925903 -719 720 -1.040834085586084e-17 -719 721 0.0005000000000000001 -719 722 -0.001040740740740737 -719 723 -0.009259259259259169 -719 725 0.0002814814814814615 -719 726 -4.336808689942018e-17 -719 1171 0.0005000000000000007 -719 1172 -0.001040740740740743 -719 1173 0.009259259259259226 -719 1174 -7.589415207398531e-19 -719 1175 -0.00236296296296294 -719 1176 0.03703703703703689 -719 1177 -0.0005000000000000001 -719 1178 -0.001040740740740737 -719 1179 0.009259259259259212 -720 709 -0.01296296296296292 -720 710 -0.0134259259259258 -720 711 -0.1551783264746217 -720 712 -0.02407407407407412 -720 713 -3.469446951953614e-18 -720 714 -0.1063100137174232 -720 715 -2.949029909160572e-17 -720 716 -0.02870370370370361 -720 717 -0.2040466392318206 -720 718 1.040834085586084e-17 -720 719 1.734723475976807e-16 -720 720 1.241426611796977 -720 721 0.01296296296296295 -720 722 -0.01342592592592588 -720 723 -0.1551783264746222 -720 724 0.0240740740740741 -720 725 2.255140518769849e-17 -720 726 -0.1063100137174241 -720 1171 -0.01296296296296297 -720 1172 0.01342592592592597 -720 1173 -0.1551783264746226 -720 1174 2.602085213965211e-17 -720 1175 0.02870370370370326 -720 1176 -0.2040466392318205 -720 1177 0.01296296296296295 -720 1178 0.01342592592592586 -720 1179 -0.1551783264746221 -721 721 1 -722 722 1 -723 715 -0.01203703703703705 -723 716 -0.01342592592592586 -723 717 -0.05315500685871255 -723 718 -0.01296296296296295 -723 719 0.01342592592592586 -723 720 -0.1551783264746222 -723 721 -4.85722573273506e-17 -723 722 -0.02870370370370372 -723 723 0.6207133058984895 -723 724 6.071532165918825e-17 -723 725 0.02870370370370377 -723 726 -0.2040466392318245 -723 727 0.0120370370370371 -723 728 -0.01342592592592596 -723 729 -0.05315500685870884 -723 730 0.01296296296296289 -723 731 0.01342592592592591 -723 732 -0.1551783264746214 -724 715 -0.0009703703703703722 -724 716 -0.0005000000000000001 -724 717 -0.008333333333333333 -724 718 -0.001659259259259283 -724 720 -0.03333333333333333 -724 721 -0.0002814814814814856 -724 722 -1.192622389734055e-18 -724 723 -3.469446951953614e-18 -724 724 0.007762962962962959 -724 725 -5.421010862427522e-18 -724 726 -1.387778780781446e-17 -724 727 -0.0009703703703703723 -724 728 0.0005000000000000013 -724 729 0.008333333333333333 -724 730 -0.001659259259259226 -724 731 5.421010862427522e-18 -724 732 0.03333333333333333 -724 1174 -0.0009703703703703722 -724 1175 0.0005000000000000001 -724 1176 -0.008333333333333331 -724 1177 -0.0002814814814814856 -724 1178 -1.409462824231156e-18 -724 1179 -3.469446951953614e-18 -724 1180 -0.0009703703703703634 -724 1181 -0.0004999999999999987 -724 1182 0.008333333333333333 -725 715 -0.0005 -725 716 -0.001040740740740737 -725 717 -0.00925925925925917 -725 718 -1.084202172485504e-19 -725 719 0.0002814814814814615 -725 720 -4.163336342344337e-17 -725 721 -1.409462824231156e-18 -725 722 -0.002362962962962969 -725 723 -0.03703703703703704 -725 724 -5.421010862427522e-18 -725 725 0.008325925925925931 -725 726 -1.908195823574488e-16 -725 727 0.0005000000000000013 -725 728 -0.001040740740740754 -725 729 -0.009259259259259404 -725 730 5.204170427930421e-18 -725 731 0.00028148148148151 -725 732 -2.584737979205443e-16 -725 1174 0.0005000000000000001 -725 1175 -0.001040740740740737 -725 1176 0.009259259259259212 -725 1177 -1.192622389734055e-18 -725 1178 -0.002362962962962969 -725 1179 0.03703703703703715 -725 1180 -0.0004999999999999986 -725 1181 -0.001040740740740737 -725 1182 0.009259259259259309 -726 715 -0.01296296296296295 -726 716 -0.01342592592592588 -726 717 -0.1551783264746222 -726 718 -0.02407407407407411 -726 719 2.255140518769849e-17 -726 720 -0.1063100137174241 -726 721 -5.204170427930421e-17 -726 722 -0.02870370370370384 -726 723 -0.2040466392318245 -726 724 1.387778780781446e-17 -726 725 1.491862189340054e-16 -726 726 1.241426611796978 -726 727 0.012962962962963 -726 728 -0.01342592592592602 -726 729 -0.1551783264746235 -726 730 0.0240740740740741 -726 731 2.081668171172169e-17 -726 732 -0.106310013717416 -726 1174 -0.01296296296296295 -726 1175 0.01342592592592586 -726 1176 -0.1551783264746221 -726 1177 5.724587470723463e-17 -726 1178 0.02870370370370377 -726 1179 -0.2040466392318244 -726 1180 0.01296296296296289 -726 1181 0.01342592592592591 -726 1182 -0.1551783264746213 -727 727 1 -728 728 1 -729 721 -0.012037037037037 -729 722 -0.01342592592592597 -729 723 -0.05315500685870884 -729 724 -0.012962962962963 -729 725 0.01342592592592615 -729 726 -0.1551783264746235 -729 727 -5.204170427930421e-18 -729 728 -0.02870370370370408 -729 729 0.6207133058984966 -729 730 5.204170427930421e-18 -729 731 0.02870370370370393 -729 732 -0.2040466392318305 -729 733 0.012037037037037 -729 734 -0.01342592592592603 -729 735 -0.05315500685870939 -729 736 0.012962962962963 -729 737 0.013425925925926 -729 738 -0.1551783264746244 -730 721 -0.0009703703703703634 -730 722 -0.0004999999999999986 -730 723 -0.008333333333333331 -730 724 -0.001659259259259226 -730 725 5.204170427930421e-18 -730 726 -0.03333333333333333 -730 727 -0.0002814814814815097 -730 728 -2.059984127722458e-18 -730 729 -1.734723475976807e-18 -730 730 0.007762962962962942 -730 731 -7.914675859144182e-18 -730 732 -6.938893903907228e-18 -730 733 -0.0009703703703703701 -730 734 0.0005000000000000007 -730 735 0.008333333333333333 -730 736 -0.001659259259259226 -730 737 2.710505431213761e-18 -730 738 0.03333333333333333 -730 1177 -0.0009703703703703723 -730 1178 0.0005000000000000013 -730 1179 -0.008333333333333331 -730 1180 -0.0002814814814815097 -730 1181 -1.951563910473908e-18 -730 1182 -1.734723475976807e-18 -730 1183 -0.0009703703703703656 -730 1184 -0.0004999999999999994 -730 1185 0.008333333333333333 -731 721 -0.0004999999999999987 -731 722 -0.001040740740740736 -731 723 -0.00925925925925933 -731 724 5.421010862427522e-18 -731 725 0.00028148148148151 -731 726 3.989863994746656e-17 -731 727 -1.843143693225358e-18 -731 728 -0.002362962962963001 -731 729 -0.03703703703703733 -731 730 -8.023096076392733e-18 -731 731 0.008325925925925962 -731 732 1.179611963664229e-16 -731 733 0.0005000000000000007 -731 734 -0.00104074074074075 -731 735 -0.009259259259259373 -731 736 2.602085213965211e-18 -731 737 0.00028148148148151 -731 738 -1.405126015541214e-16 -731 1177 0.0005000000000000013 -731 1178 -0.001040740740740754 -731 1179 0.009259259259259384 -731 1180 -2.059984127722458e-18 -731 1181 -0.002362962962963001 -731 1182 0.03703703703703752 -731 1183 -0.0004999999999999994 -731 1184 -0.001040740740740741 -731 1185 0.009259259259259339 -732 721 -0.01296296296296289 -732 722 -0.01342592592592578 -732 723 -0.1551783264746214 -732 724 -0.02407407407407411 -732 725 -8.673617379884035e-18 -732 726 -0.106310013717416 -732 727 -1.613292832658431e-16 -732 728 -0.02870370370370436 -732 729 -0.2040466392318304 -732 730 1.613292832658431e-16 -732 731 1.318389841742373e-16 -732 732 1.241426611796989 -732 733 0.01296296296296305 -732 734 -0.01342592592592606 -732 735 -0.1551783264746255 -732 736 0.02407407407407395 -732 737 1.561251128379126e-17 -732 738 -0.1063100137174176 -732 1177 -0.012962962962963 -732 1178 0.01342592592592614 -732 1179 -0.1551783264746234 -732 1180 8.673617379884035e-18 -732 1181 0.02870370370370393 -732 1182 -0.2040466392318304 -732 1183 0.01296296296296299 -732 1184 0.013425925925926 -732 1185 -0.1551783264746243 -733 733 1 -734 734 1 -735 727 -0.01203703703703695 -735 728 -0.01342592592592603 -735 729 -0.05315500685870939 -735 730 -0.01296296296296305 -735 731 0.01342592592592612 -735 732 -0.1551783264746255 -735 733 -1.006139616066548e-16 -735 734 -0.02870370370370371 -735 735 0.6207133058984955 -735 736 1.006139616066548e-16 -735 737 0.02870370370370363 -735 738 -0.2040466392318266 -735 739 0.01203703703703705 -735 740 -0.01342592592592588 -735 741 -0.05315500685871186 -735 742 0.01296296296296295 -735 743 0.01342592592592588 -735 744 -0.1551783264746222 -736 727 -0.0009703703703703656 -736 728 -0.0004999999999999994 -736 729 -0.008333333333333331 -736 730 -0.001659259259259226 -736 731 2.49366499671666e-18 -736 732 -0.03333333333333333 -736 733 -0.0002814814814814881 -736 734 -6.505213034913027e-19 -736 736 0.007762962962962958 -736 737 -2.49366499671666e-18 -736 738 -6.938893903907228e-18 -736 739 -0.0009703703703703715 -736 740 0.0005 -736 741 0.008333333333333333 -736 742 -0.001659259259259277 -736 744 0.03333333333333334 -736 1180 -0.0009703703703703701 -736 1181 0.0005000000000000007 -736 1182 -0.008333333333333331 -736 1183 -0.000281481481481488 -736 1184 -6.505213034913027e-19 -736 1185 -1.734723475976807e-18 -736 1186 -0.0009703703703703715 -736 1187 -0.0005 -736 1188 0.008333333333333335 -737 727 -0.0004999999999999995 -737 728 -0.001040740740740741 -737 729 -0.009259259259259339 -737 730 2.818925648462312e-18 -737 731 0.00028148148148151 -737 732 6.938893903907228e-18 -737 733 -6.505213034913027e-19 -737 734 -0.002362962962962972 -737 735 -0.03703703703703705 -737 736 -2.602085213965211e-18 -737 737 0.008325925925925935 -737 738 3.122502256758253e-17 -737 739 0.0005000000000000001 -737 740 -0.001040740740740738 -737 741 -0.009259259259259196 -737 742 -1.084202172485504e-19 -737 743 0.0002814814814814667 -737 744 -2.255140518769849e-17 -737 1180 0.0005000000000000007 -737 1181 -0.00104074074074075 -737 1182 0.009259259259259377 -737 1183 -6.505213034913027e-19 -737 1184 -0.002362962962962972 -737 1185 0.0370370370370372 -737 1186 -0.0005 -737 1187 -0.001040740740740738 -737 1188 0.009259259259259219 -738 727 -0.012962962962963 -738 728 -0.01342592592592594 -738 729 -0.1551783264746244 -738 730 -0.02407407407407396 -738 731 -1.734723475976807e-18 -738 732 -0.1063100137174177 -738 733 4.683753385137379e-17 -738 734 -0.02870370370370393 -738 735 -0.2040466392318266 -738 736 -1.457167719820518e-16 -738 737 1.283695372222837e-16 -738 738 1.241426611796988 -738 739 0.01296296296296295 -738 740 -0.01342592592592589 -738 741 -0.1551783264746222 -738 742 0.0240740740740741 -738 743 1.040834085586084e-17 -738 744 -0.1063100137174232 -738 1180 -0.01296296296296305 -738 1181 0.01342592592592612 -738 1182 -0.1551783264746254 -738 1183 1.040834085586084e-16 -738 1184 0.02870370370370363 -738 1185 -0.2040466392318265 -738 1186 0.01296296296296295 -738 1187 0.01342592592592588 -738 1188 -0.1551783264746221 -739 739 1 -740 740 1 -741 733 -0.01203703703703705 -741 734 -0.01342592592592588 -741 735 -0.05315500685871185 -741 736 -0.01296296296296295 -741 737 0.01342592592592588 -741 738 -0.1551783264746222 -741 739 3.469446951953614e-17 -741 740 -0.02870370370370364 -741 741 0.6207133058984888 -741 742 -2.949029909160572e-17 -741 743 0.02870370370370361 -741 744 -0.2040466392318226 -741 745 0.01203703703703702 -741 746 -0.01342592592592593 -741 747 -0.05315500685870947 -741 748 0.01296296296296298 -741 749 0.01342592592592595 -741 750 -0.1551783264746228 -742 733 -0.0009703703703703715 -742 734 -0.0005 -742 735 -0.008333333333333333 -742 736 -0.001659259259259277 -742 737 -1.084202172485504e-19 -742 738 -0.03333333333333333 -742 739 -0.0002814814814814747 -742 740 6.505213034913027e-19 -742 742 0.007762962962962967 -742 743 2.818925648462312e-18 -742 744 -1.040834085586084e-17 -742 745 -0.000970370370370368 -742 746 0.0004999999999999994 -742 747 0.008333333333333333 -742 748 -0.001659259259259257 -742 749 -2.710505431213761e-18 -742 750 0.03333333333333334 -742 1183 -0.0009703703703703715 -742 1184 0.0005000000000000001 -742 1185 -0.008333333333333331 -742 1186 -0.0002814814814814747 -742 1187 5.421010862427522e-19 -742 1188 -3.469446951953614e-18 -742 1189 -0.0009703703703703724 -742 1190 -0.0005000000000000007 -742 1191 0.008333333333333333 -743 733 -0.0005 -743 734 -0.001040740740740738 -743 735 -0.009259259259259198 -743 737 0.0002814814814814667 -743 738 -2.081668171172169e-17 -743 739 5.421010862427522e-19 -743 740 -0.002362962962962954 -743 741 -0.03703703703703695 -743 742 2.710505431213761e-18 -743 743 0.008325925925925917 -743 744 6.938893903907228e-17 -743 745 0.0004999999999999994 -743 746 -0.001040740740740737 -743 747 -0.009259259259259255 -743 748 -2.710505431213761e-18 -743 749 0.0002814814814814829 -743 750 1.595945597898663e-16 -743 1183 0.0005 -743 1184 -0.001040740740740738 -743 1185 0.009259259259259219 -743 1186 7.589415207398531e-19 -743 1187 -0.002362962962962954 -743 1188 0.03703703703703692 -743 1189 -0.0005000000000000007 -743 1190 -0.001040740740740746 -743 1191 0.009259259259259271 -744 733 -0.01296296296296295 -744 734 -0.01342592592592589 -744 735 -0.1551783264746222 -744 736 -0.02407407407407412 -744 737 1.040834085586084e-17 -744 738 -0.1063100137174232 -744 739 2.949029909160572e-17 -744 740 -0.02870370370370361 -744 741 -0.2040466392318225 -744 742 1.387778780781446e-17 -744 743 -4.85722573273506e-17 -744 744 1.241426611796977 -744 745 0.01296296296296292 -744 746 -0.01342592592592588 -744 747 -0.1551783264746218 -744 748 0.0240740740740741 -744 749 -2.775557561562891e-17 -744 750 -0.1063100137174205 -744 1183 -0.01296296296296295 -744 1184 0.01342592592592588 -744 1185 -0.1551783264746221 -744 1186 -2.775557561562891e-17 -744 1187 0.02870370370370362 -744 1188 -0.2040466392318224 -744 1189 0.01296296296296297 -744 1190 0.01342592592592595 -744 1191 -0.1551783264746227 -745 745 1 -746 746 1 -747 739 -0.01203703703703708 -747 740 -0.01342592592592592 -747 741 -0.05315500685870948 -747 742 -0.01296296296296292 -747 743 0.01342592592592583 -747 744 -0.1551783264746218 -747 745 1.734723475976807e-18 -747 746 -0.02870370370370365 -747 747 0.6207133058984875 -747 748 1.734723475976807e-18 -747 749 0.02870370370370376 -747 750 -0.2040466392318225 -747 751 0.01203703703703708 -747 752 -0.01342592592592588 -747 753 -0.05315500685871216 -747 754 0.01296296296296292 -747 755 0.01342592592592585 -747 756 -0.1551783264746217 -748 739 -0.0009703703703703725 -748 740 -0.0005000000000000007 -748 741 -0.008333333333333333 -748 742 -0.001659259259259257 -748 743 -2.710505431213761e-18 -748 744 -0.03333333333333333 -748 745 -0.0002814814814814747 -748 748 0.007762962962962967 -748 750 -1.040834085586084e-17 -748 751 -0.0009703703703703737 -748 752 0.0005000000000000007 -748 753 0.008333333333333333 -748 754 -0.001659259259259277 -748 755 2.710505431213761e-18 -748 756 0.03333333333333334 -748 1186 -0.0009703703703703681 -748 1187 0.0004999999999999994 -748 1188 -0.008333333333333331 -748 1189 -0.0002814814814814747 -748 1191 -1.734723475976807e-18 -748 1192 -0.0009703703703703695 -748 1193 -0.0004999999999999994 -748 1194 0.008333333333333335 -749 739 -0.0005000000000000007 -749 740 -0.001040740740740746 -749 741 -0.009259259259259293 -749 742 -2.602085213965211e-18 -749 743 0.000281481481481483 -749 744 1.214306433183765e-17 -749 746 -0.002362962962962954 -749 747 -0.037037037037037 -749 748 1.084202172485504e-19 -749 749 0.008325925925925915 -749 750 -1.040834085586084e-16 -749 751 0.0005000000000000008 -749 752 -0.001040740740740743 -749 753 -0.009259259259259228 -749 754 2.710505431213761e-18 -749 755 0.0002814814814814667 -749 756 -1.370431546021678e-16 -749 1186 0.0004999999999999993 -749 1187 -0.001040740740740736 -749 1188 0.009259259259259234 -749 1190 -0.002362962962962954 -749 1191 0.03703703703703688 -749 1192 -0.0004999999999999994 -749 1193 -0.001040740740740734 -749 1194 0.009259259259259189 -750 739 -0.01296296296296297 -750 740 -0.013425925925926 -750 741 -0.1551783264746228 -750 742 -0.02407407407407411 -750 743 -5.204170427930421e-18 -750 744 -0.1063100137174205 -750 745 -1.734723475976807e-18 -750 746 -0.02870370370370347 -750 747 -0.2040466392318225 -750 748 8.673617379884035e-18 -750 749 -7.632783294297951e-17 -750 750 1.241426611796977 -750 751 0.01296296296296298 -750 752 -0.01342592592592591 -750 753 -0.1551783264746227 -750 754 0.0240740740740741 -750 755 1.561251128379126e-17 -750 756 -0.1063100137174232 -750 1186 -0.01296296296296292 -750 1187 0.01342592592592583 -750 1188 -0.1551783264746217 -750 1189 1.734723475976807e-18 -750 1190 0.02870370370370376 -750 1191 -0.2040466392318224 -750 1192 0.01296296296296292 -750 1193 0.01342592592592585 -750 1194 -0.1551783264746216 -751 751 1 -752 752 1 -753 745 -0.01203703703703703 -753 746 -0.01342592592592588 -753 747 -0.05315500685871215 -753 748 -0.01296296296296297 -753 749 0.01342592592592597 -753 750 -0.1551783264746227 -753 751 5.377642775528102e-17 -753 752 -0.02870370370370372 -753 753 0.6207133058984955 -753 754 -4.85722573273506e-17 -753 755 0.02870370370370363 -753 756 -0.2040466392318266 -753 757 0.01203703703703697 -753 758 -0.01342592592592603 -753 759 -0.05315500685870909 -753 760 0.01296296296296302 -753 761 0.01342592592592603 -753 762 -0.1551783264746249 -754 745 -0.0009703703703703694 -754 746 -0.0004999999999999994 -754 747 -0.008333333333333333 -754 748 -0.001659259259259277 -754 749 2.710505431213761e-18 -754 750 -0.03333333333333333 -754 751 -0.0002814814814814882 -754 752 -5.421010862427522e-19 -754 753 -1.734723475976807e-18 -754 754 0.007762962962962958 -754 755 -2.818925648462312e-18 -754 756 -1.040834085586084e-17 -754 757 -0.000970370370370368 -754 758 0.0004999999999999999 -754 759 0.008333333333333333 -754 760 -0.001659259259259226 -754 761 1.084202172485504e-19 -754 762 0.03333333333333333 -754 1189 -0.0009703703703703738 -754 1190 0.0005000000000000008 -754 1191 -0.008333333333333331 -754 1192 -0.0002814814814814882 -754 1193 -7.589415207398531e-19 -754 1194 -3.469446951953614e-18 -754 1195 -0.000970370370370368 -754 1196 -0.0005 -754 1197 0.008333333333333333 -755 745 -0.0004999999999999994 -755 746 -0.001040740740740734 -755 747 -0.009259259259259189 -755 748 2.602085213965211e-18 -755 749 0.0002814814814814666 -755 750 1.040834085586084e-17 -755 751 -6.505213034913027e-19 -755 752 -0.002362962962962972 -755 753 -0.03703703703703705 -755 754 -2.927345865710862e-18 -755 755 0.008325925925925935 -755 756 2.42861286636753e-17 -755 757 0.0005 -755 758 -0.001040740740740745 -755 759 -0.009259259259259345 -755 761 0.00028148148148151 -755 762 -2.255140518769849e-17 -755 1189 0.0005000000000000007 -755 1190 -0.001040740740740743 -755 1191 0.009259259259259226 -755 1192 -5.421010862427522e-19 -755 1193 -0.002362962962962972 -755 1194 0.0370370370370372 -755 1195 -0.0005 -755 1196 -0.001040740740740745 -755 1197 0.009259259259259368 -756 745 -0.01296296296296292 -756 746 -0.0134259259259258 -756 747 -0.1551783264746217 -756 748 -0.02407407407407412 -756 749 -3.469446951953614e-18 -756 750 -0.1063100137174232 -756 751 -1.023486850826316e-16 -756 752 -0.02870370370370393 -756 753 -0.2040466392318266 -756 754 1.647987302177967e-16 -756 755 1.214306433183765e-16 -756 756 1.241426611796988 -756 757 0.01296296296296302 -756 758 -0.01342592592592604 -756 759 -0.155178326474625 -756 760 0.02407407407407395 -756 761 1.387778780781446e-17 -756 762 -0.1063100137174177 -756 1189 -0.01296296296296297 -756 1190 0.01342592592592597 -756 1191 -0.1551783264746226 -756 1192 -4.683753385137379e-17 -756 1193 0.02870370370370363 -756 1194 -0.2040466392318265 -756 1195 0.01296296296296302 -756 1196 0.01342592592592603 -756 1197 -0.1551783264746249 -757 757 1 -758 758 1 -759 751 -0.01203703703703698 -759 752 -0.01342592592592603 -759 753 -0.05315500685870909 -759 754 -0.01296296296296302 -759 755 0.01342592592592603 -759 756 -0.1551783264746249 -759 757 -4.336808689942018e-17 -759 758 -0.02870370370370409 -759 759 0.6207133058984954 -759 760 4.683753385137379e-17 -759 761 0.02870370370370406 -759 762 -0.2040466392318305 -759 763 0.01203703703703702 -759 764 -0.01342592592592596 -759 765 -0.05315500685870794 -759 766 0.01296296296296297 -759 767 0.01342592592592599 -759 768 -0.1551783264746229 -760 751 -0.000970370370370368 -760 752 -0.0005 -760 753 -0.008333333333333331 -760 754 -0.001659259259259226 -760 756 -0.03333333333333333 -760 757 -0.0002814814814815097 -760 758 7.589415207398531e-19 -760 759 -1.734723475976807e-18 -760 760 0.007762962962962944 -760 761 2.602085213965211e-18 -760 762 -6.938893903907228e-18 -760 763 -0.0009703703703703656 -760 764 0.0004999999999999993 -760 765 0.008333333333333333 -760 766 -0.001659259259259226 -760 767 -2.602085213965211e-18 -760 768 0.03333333333333333 -760 1192 -0.000970370370370368 -760 1193 0.0005 -760 1194 -0.008333333333333331 -760 1195 -0.0002814814814815097 -760 1196 6.505213034913027e-19 -760 1197 -1.734723475976807e-18 -760 1198 -0.0009703703703703701 -760 1199 -0.0005000000000000007 -760 1200 0.008333333333333333 -761 751 -0.0005000000000000001 -761 752 -0.001040740740740745 -761 753 -0.009259259259259345 -761 754 2.168404344971009e-19 -761 755 0.00028148148148151 -761 756 -2.255140518769849e-17 -761 757 7.589415207398531e-19 -761 758 -0.002362962962963001 -761 759 -0.03703703703703737 -761 760 2.602085213965211e-18 -761 761 0.008325925925925962 -761 762 -5.551115123125783e-17 -761 763 0.0004999999999999994 -761 764 -0.001040740740740741 -761 765 -0.009259259259259316 -761 766 -2.602085213965211e-18 -761 767 0.00028148148148151 -761 768 9.540979117872439e-17 -761 1192 0.0004999999999999999 -761 1193 -0.001040740740740745 -761 1194 0.009259259259259368 -761 1195 7.589415207398531e-19 -761 1196 -0.002362962962963001 -761 1197 0.03703703703703748 -761 1198 -0.0005000000000000007 -761 1199 -0.00104074074074075 -761 1200 0.009259259259259398 -762 751 -0.01296296296296302 -762 752 -0.01342592592592604 -762 753 -0.155178326474625 -762 754 -0.02407407407407396 -762 755 1.387778780781446e-17 -762 756 -0.1063100137174177 -762 757 1.040834085586084e-16 -762 758 -0.02870370370370423 -762 759 -0.2040466392318304 -762 760 -1.387778780781446e-16 -762 761 1.144917494144693e-16 -762 762 1.241426611796989 -762 763 0.01296296296296292 -762 764 -0.01342592592592595 -762 765 -0.1551783264746219 -762 766 0.0240740740740741 -762 767 1.214306433183765e-17 -762 768 -0.106310013717416 -762 1192 -0.01296296296296302 -762 1193 0.01342592592592603 -762 1194 -0.1551783264746249 -762 1195 4.85722573273506e-17 -762 1196 0.02870370370370406 -762 1197 -0.2040466392318304 -762 1198 0.01296296296296297 -762 1199 0.01342592592592598 -762 1200 -0.1551783264746229 -763 763 1 -764 764 1 -765 757 -0.01203703703703708 -765 758 -0.01342592592592595 -765 759 -0.05315500685870794 -765 760 -0.01296296296296292 -765 761 0.01342592592592586 -765 762 -0.1551783264746219 -765 763 -2.775557561562891e-17 -765 764 -0.02870370370370365 -765 765 0.6207133058984874 -765 766 2.775557561562891e-17 -765 767 0.02870370370370379 -765 768 -0.2040466392318226 -765 769 0.01203703703703711 -765 770 -0.01342592592592584 -765 771 -0.05315500685871398 -765 772 0.01296296296296289 -765 773 0.0134259259259258 -765 774 -0.155178326474621 -766 757 -0.0009703703703703701 -766 758 -0.0005000000000000007 -766 759 -0.008333333333333331 -766 760 -0.001659259259259226 -766 761 -2.818925648462312e-18 -766 762 -0.03333333333333333 -766 763 -0.0002814814814814749 -766 764 -6.505213034913027e-19 -766 766 0.007762962962962967 -766 767 -2.38524477946811e-18 -766 768 -3.469446951953614e-18 -766 769 -0.0009703703703703784 -766 770 0.0005000000000000013 -766 771 0.008333333333333335 -766 772 -0.001659259259259308 -766 773 5.204170427930421e-18 -766 774 0.03333333333333334 -766 1195 -0.0009703703703703656 -766 1196 0.0004999999999999994 -766 1197 -0.008333333333333331 -766 1198 -0.0002814814814814748 -766 1199 -6.505213034913027e-19 -766 1201 -0.0009703703703703695 -766 1202 -0.0004999999999999987 -766 1203 0.008333333333333335 -767 757 -0.0005000000000000008 -767 758 -0.00104074074074075 -767 759 -0.009259259259259354 -767 760 -2.602085213965211e-18 -767 761 0.00028148148148151 -767 762 -5.204170427930421e-17 -767 763 -6.505213034913027e-19 -767 764 -0.002362962962962954 -767 765 -0.03703703703703701 -767 766 -2.602085213965211e-18 -767 767 0.008325925925925917 -767 768 -1.283695372222837e-16 -767 769 0.0005000000000000013 -767 770 -0.001040740740740743 -767 771 -0.009259259259259196 -767 772 5.529431079676073e-18 -767 773 0.0002814814814814401 -767 774 -1.89084858881472e-16 -767 1195 0.0004999999999999993 -767 1196 -0.001040740740740741 -767 1197 0.009259259259259361 -767 1198 -7.589415207398531e-19 -767 1199 -0.002362962962962954 -767 1200 0.03703703703703688 -767 1201 -0.0004999999999999987 -767 1202 -0.001040740740740725 -767 1203 0.009259259259259037 -768 757 -0.01296296296296297 -768 758 -0.01342592592592607 -768 759 -0.1551783264746229 -768 760 -0.02407407407407411 -768 761 2.949029909160572e-17 -768 762 -0.106310013717416 -768 763 -3.122502256758253e-17 -768 764 -0.02870370370370345 -768 765 -0.2040466392318226 -768 766 1.214306433183765e-17 -768 767 -7.28583859910259e-17 -768 768 1.241426611796977 -768 769 0.01296296296296301 -768 770 -0.01342592592592587 -768 771 -0.1551783264746231 -768 772 0.0240740740740741 -768 773 -1.561251128379126e-17 -768 774 -0.1063100137174277 -768 1195 -0.01296296296296292 -768 1196 0.01342592592592586 -768 1197 -0.1551783264746218 -768 1198 2.775557561562891e-17 -768 1199 0.02870370370370379 -768 1200 -0.2040466392318225 -768 1201 0.01296296296296289 -768 1202 0.0134259259259258 -768 1203 -0.1551783264746209 -769 769 1 -770 770 1 -771 763 -0.012037037037037 -771 764 -0.01342592592592586 -771 765 -0.05315500685871398 -771 766 -0.01296296296296301 -771 767 0.01342592592592603 -771 768 -0.155178326474623 -771 769 -5.030698080332741e-17 -771 770 -0.02870370370370327 -771 771 0.6207133058984897 -771 772 5.724587470723463e-17 -771 773 0.02870370370370309 -771 774 -0.2040466392318186 -771 775 0.01203703703703705 -771 776 -0.01342592592592588 -771 777 -0.05315500685871186 -771 778 0.01296296296296295 -771 779 0.01342592592592588 -771 780 -0.1551783264746222 -772 763 -0.0009703703703703695 -772 764 -0.0004999999999999987 -772 765 -0.008333333333333333 -772 766 -0.001659259259259308 -772 767 5.421010862427522e-18 -772 768 -0.03333333333333333 -772 769 -0.0002814814814814531 -772 770 -1.301042606982605e-18 -772 771 -1.734723475976807e-18 -772 772 0.007762962962962983 -772 773 -5.421010862427522e-18 -772 774 -1.387778780781446e-17 -772 775 -0.0009703703703703715 -772 776 0.0005 -772 777 0.008333333333333333 -772 778 -0.001659259259259277 -772 780 0.03333333333333334 -772 1198 -0.0009703703703703784 -772 1199 0.0005000000000000013 -772 1200 -0.008333333333333333 -772 1201 -0.0002814814814814531 -772 1202 -1.301042606982605e-18 -772 1203 -3.469446951953614e-18 -772 1204 -0.0009703703703703715 -772 1205 -0.0005 -772 1206 0.008333333333333335 -773 763 -0.0004999999999999987 -773 764 -0.001040740740740725 -773 765 -0.009259259259259123 -773 766 5.204170427930421e-18 -773 767 0.00028148148148144 -773 768 1.07552855510562e-16 -773 769 -1.301042606982605e-18 -773 770 -0.002362962962962925 -773 771 -0.0370370370370366 -773 772 -5.529431079676073e-18 -773 773 0.008325925925925888 -773 774 2.775557561562891e-16 -773 775 0.0005000000000000001 -773 776 -0.001040740740740738 -773 777 -0.009259259259259196 -773 778 -1.084202172485504e-19 -773 779 0.0002814814814814667 -773 780 -2.255140518769849e-17 -773 1198 0.0005000000000000014 -773 1199 -0.001040740740740743 -773 1200 0.00925925925925911 -773 1201 -1.301042606982605e-18 -773 1202 -0.002362962962962925 -773 1203 0.03703703703703668 -773 1204 -0.0005 -773 1205 -0.001040740740740738 -773 1206 0.009259259259259219 -774 763 -0.01296296296296289 -774 764 -0.01342592592592563 -774 765 -0.155178326474621 -774 766 -0.02407407407407412 -774 767 -4.683753385137379e-17 -774 768 -0.1063100137174277 -774 769 -5.724587470723463e-17 -774 770 -0.02870370370370341 -774 771 -0.2040466392318187 -774 772 1.561251128379126e-17 -774 773 -3.122502256758253e-17 -774 774 1.241426611796976 -774 775 0.01296296296296295 -774 776 -0.01342592592592589 -774 777 -0.1551783264746222 -774 778 0.0240740740740741 -774 779 1.040834085586084e-17 -774 780 -0.1063100137174232 -774 1198 -0.012962962962963 -774 1199 0.01342592592592603 -774 1200 -0.155178326474623 -774 1201 5.898059818321144e-17 -774 1202 0.02870370370370309 -774 1203 -0.2040466392318186 -774 1204 0.01296296296296295 -774 1205 0.01342592592592588 -774 1206 -0.1551783264746221 -775 775 1 -776 776 1 -777 769 -0.01203703703703705 -777 770 -0.01342592592592588 -777 771 -0.05315500685871185 -777 772 -0.01296296296296295 -777 773 0.01342592592592588 -777 774 -0.1551783264746222 -777 775 3.469446951953614e-17 -777 776 -0.02870370370370372 -777 777 0.6207133058984902 -777 778 -2.949029909160572e-17 -777 779 0.0287037037037037 -777 780 -0.2040466392318245 -777 781 0.01203703703703702 -777 782 -0.01342592592592595 -777 783 -0.05315500685870862 -777 784 0.01296296296296298 -777 785 0.01342592592592597 -777 786 -0.1551783264746229 -778 769 -0.0009703703703703715 -778 770 -0.0005 -778 771 -0.008333333333333333 -778 772 -0.001659259259259277 -778 773 -1.084202172485504e-19 -778 774 -0.03333333333333333 -778 775 -0.0002814814814814856 -778 776 6.505213034913027e-19 -778 778 0.007762962962962959 -778 779 2.710505431213761e-18 -778 780 -1.040834085586084e-17 -778 781 -0.0009703703703703662 -778 782 0.0004999999999999994 -778 783 0.008333333333333333 -778 784 -0.001659259259259232 -778 785 -2.602085213965211e-18 -778 786 0.03333333333333333 -778 1201 -0.0009703703703703715 -778 1202 0.0005000000000000001 -778 1203 -0.008333333333333331 -778 1204 -0.0002814814814814856 -778 1205 6.505213034913027e-19 -778 1206 -3.469446951953614e-18 -778 1207 -0.0009703703703703707 -778 1208 -0.0005000000000000008 -778 1209 0.008333333333333333 -779 769 -0.0005 -779 770 -0.001040740740740738 -779 771 -0.009259259259259198 -779 773 0.0002814814814814667 -779 774 -2.081668171172169e-17 -779 775 6.505213034913027e-19 -779 776 -0.002362962962962969 -779 777 -0.03703703703703702 -779 778 2.710505431213761e-18 -779 779 0.008325925925925933 -779 780 -1.040834085586084e-16 -779 781 0.0004999999999999994 -779 782 -0.00104074074074074 -779 783 -0.009259259259259287 -779 784 -2.602085213965211e-18 -779 785 0.0002814814814815048 -779 786 7.28583859910259e-17 -779 1201 0.0005 -779 1202 -0.001040740740740738 -779 1203 0.009259259259259219 -779 1204 7.589415207398531e-19 -779 1205 -0.002362962962962969 -779 1206 0.03703703703703717 -779 1207 -0.0005000000000000007 -779 1208 -0.001040740740740749 -779 1209 0.009259259259259391 -780 769 -0.01296296296296295 -780 770 -0.01342592592592589 -780 771 -0.1551783264746222 -780 772 -0.02407407407407412 -780 773 1.040834085586084e-17 -780 774 -0.1063100137174232 -780 775 2.949029909160572e-17 -780 776 -0.0287037037037039 -780 777 -0.2040466392318245 -780 778 1.561251128379126e-17 -780 779 1.630640067418199e-16 -780 780 1.241426611796978 -780 781 0.01296296296296292 -780 782 -0.01342592592592594 -780 783 -0.1551783264746219 -780 784 0.0240740740740741 -780 785 2.081668171172169e-17 -780 786 -0.1063100137174169 -780 1201 -0.01296296296296295 -780 1202 0.01342592592592588 -780 1203 -0.1551783264746221 -780 1204 -2.949029909160572e-17 -780 1205 0.0287037037037037 -780 1206 -0.2040466392318244 -780 1207 0.01296296296296297 -780 1208 0.01342592592592597 -780 1209 -0.1551783264746228 -781 781 1 -782 782 1 -783 775 -0.01203703703703708 -783 776 -0.01342592592592594 -783 777 -0.05315500685870862 -783 778 -0.01296296296296292 -783 779 0.01342592592592585 -783 780 -0.1551783264746219 -783 781 7.806255641895632e-17 -783 782 -0.0287037037037041 -783 783 0.6207133058984942 -783 784 -7.632783294297951e-17 -783 785 0.02870370370370421 -783 786 -0.2040466392318305 -783 787 0.012037037037037 -783 788 -0.01342592592592604 -783 789 -0.05315500685870866 -783 790 0.012962962962963 -783 791 0.01342592592592602 -783 792 -0.1551783264746245 -784 775 -0.0009703703703703707 -784 776 -0.0005000000000000007 -784 777 -0.008333333333333333 -784 778 -0.001659259259259232 -784 779 -2.710505431213761e-18 -784 780 -0.03333333333333333 -784 781 -0.00028148148148151 -784 784 0.007762962962962944 -784 786 -6.938893903907228e-18 -784 787 -0.0009703703703703699 -784 788 0.0005000000000000007 -784 789 0.008333333333333335 -784 790 -0.001659259259259219 -784 791 2.710505431213761e-18 -784 792 0.03333333333333333 -784 1204 -0.0009703703703703662 -784 1205 0.0004999999999999994 -784 1206 -0.008333333333333331 -784 1207 -0.0002814814814815099 -784 1210 -0.0009703703703703656 -784 1211 -0.0004999999999999994 -784 1212 0.008333333333333335 -785 775 -0.0005000000000000008 -785 776 -0.001040740740740749 -785 777 -0.009259259259259325 -785 778 -2.602085213965211e-18 -785 779 0.0002814814814815048 -785 780 -7.459310946700271e-17 -785 781 1.084202172485504e-19 -785 782 -0.002362962962963002 -785 783 -0.03703703703703742 -785 785 0.008325925925925964 -785 786 -2.393918396847994e-16 -785 787 0.0005000000000000007 -785 788 -0.001040740740740751 -785 789 -0.009259259259259406 -785 790 2.602085213965211e-18 -785 791 0.0002814814814815158 -785 792 -1.179611963664229e-16 -785 1204 0.0004999999999999993 -785 1205 -0.00104074074074074 -785 1206 0.009259259259259354 -785 1207 -1.084202172485504e-19 -785 1208 -0.002362962962963002 -785 1209 0.03703703703703744 -785 1210 -0.0004999999999999994 -785 1211 -0.001040740740740742 -785 1212 0.009259259259259349 -786 775 -0.01296296296296297 -786 776 -0.01342592592592606 -786 777 -0.1551783264746229 -786 778 -0.02407407407407411 -786 779 4.163336342344337e-17 -786 780 -0.1063100137174169 -786 781 -7.806255641895632e-17 -786 782 -0.02870370370370408 -786 783 -0.2040466392318305 -786 784 1.561251128379126e-16 -786 785 8.673617379884035e-17 -786 786 1.241426611796989 -786 787 0.01296296296296305 -786 788 -0.01342592592592607 -786 789 -0.1551783264746255 -786 790 0.02407407407407395 -786 791 3.469446951953614e-18 -786 792 -0.1063100137174167 -786 1204 -0.01296296296296292 -786 1205 0.01342592592592585 -786 1206 -0.1551783264746218 -786 1207 -7.28583859910259e-17 -786 1208 0.02870370370370421 -786 1209 -0.2040466392318304 -786 1210 0.01296296296296299 -786 1211 0.01342592592592602 -786 1212 -0.1551783264746244 -787 787 1 -788 788 1 -789 781 -0.01203703703703695 -789 782 -0.01342592592592605 -789 783 -0.05315500685870866 -789 784 -0.01296296296296305 -789 785 0.01342592592592614 -789 786 -0.1551783264746255 -789 787 -1.283695372222837e-16 -789 788 -0.02870370370370365 -789 789 0.6207133058984942 -789 790 1.301042606982605e-16 -789 791 0.02870370370370359 -789 792 -0.2040466392318247 -789 793 0.01203703703703708 -789 794 -0.01342592592592584 -789 795 -0.05315500685871369 -789 796 0.01296296296296292 -789 797 0.01342592592592582 -789 798 -0.1551783264746215 -790 781 -0.0009703703703703656 -790 782 -0.0004999999999999995 -790 783 -0.008333333333333333 -790 784 -0.00165925925925922 -790 785 2.602085213965211e-18 -790 786 -0.03333333333333333 -790 787 -0.0002814814814814777 -790 788 -1.192622389734055e-18 -790 789 -1.734723475976807e-18 -790 790 0.007762962962962966 -790 791 -5.204170427930421e-18 -790 792 -3.469446951953614e-18 -790 793 -0.0009703703703703761 -790 794 0.0005000000000000007 -790 795 0.008333333333333335 -790 796 -0.001659259259259308 -790 797 2.602085213965211e-18 -790 798 0.03333333333333334 -790 1207 -0.0009703703703703699 -790 1208 0.0005000000000000008 -790 1209 -0.008333333333333333 -790 1210 -0.0002814814814814777 -790 1211 -1.409462824231156e-18 -790 1212 -1.734723475976807e-18 -790 1213 -0.0009703703703703718 -790 1214 -0.0004999999999999994 -790 1215 0.008333333333333335 -791 781 -0.0004999999999999995 -791 782 -0.001040740740740742 -791 783 -0.00925925925925937 -791 784 2.602085213965211e-18 -791 785 0.0002814814814815157 -791 786 3.122502256758253e-17 -791 787 -1.301042606982605e-18 -791 788 -0.002362962962962958 -791 789 -0.03703703703703701 -791 790 -5.204170427930421e-18 -791 791 0.008325925925925921 -791 792 1.700029006457271e-16 -791 793 0.0005000000000000007 -791 794 -0.001040740740740738 -791 795 -0.009259259259259167 -791 796 2.818925648462312e-18 -791 797 0.0002814814814814399 -791 798 -7.28583859910259e-17 -791 1207 0.0005000000000000008 -791 1208 -0.001040740740740751 -791 1209 0.009259259259259385 -791 1210 -1.409462824231156e-18 -791 1211 -0.002362962962962958 -791 1212 0.03703703703703697 -791 1213 -0.0004999999999999994 -791 1214 -0.00104074074074073 -791 1215 0.009259259259259064 -792 781 -0.012962962962963 -792 782 -0.01342592592592595 -792 783 -0.1551783264746245 -792 784 -0.02407407407407396 -792 785 -1.387778780781446e-17 -792 786 -0.1063100137174167 -792 787 1.908195823574488e-17 -792 788 -0.02870370370370362 -792 789 -0.2040466392318247 -792 790 -1.422473250300982e-16 -792 791 -9.71445146547012e-17 -792 792 1.241426611796988 -792 793 0.01296296296296298 -792 794 -0.01342592592592585 -792 795 -0.1551783264746225 -792 796 0.0240740740740741 -792 797 -1.734723475976807e-17 -792 798 -0.1063100137174277 -792 1207 -0.01296296296296305 -792 1208 0.01342592592592614 -792 1209 -0.1551783264746254 -792 1210 1.301042606982605e-16 -792 1211 0.02870370370370359 -792 1212 -0.2040466392318246 -792 1213 0.01296296296296292 -792 1214 0.01342592592592582 -792 1215 -0.1551783264746214 -793 793 1 -794 794 1 -795 787 -0.01203703703703703 -795 788 -0.01342592592592585 -795 789 -0.05315500685871369 -795 790 -0.01296296296296298 -795 791 0.01342592592592594 -795 792 -0.1551783264746225 -795 793 -1.058181320345852e-16 -795 794 -0.02870370370370366 -795 795 0.6207133058984864 -795 796 1.110223024625157e-16 -795 797 0.0287037037037039 -795 798 -0.2040466392318226 -795 799 0.01203703703703713 -795 800 -0.01342592592592593 -795 801 -0.05315500685870676 -795 802 0.01296296296296287 -795 803 0.01342592592592561 -795 804 -0.1551783264746209 -796 787 -0.0009703703703703718 -796 788 -0.0004999999999999994 -796 789 -0.008333333333333333 -796 790 -0.001659259259259308 -796 791 2.818925648462312e-18 -796 792 -0.03333333333333333 -796 793 -0.0002814814814814748 -796 794 -2.602085213965211e-18 -796 795 -3.469446951953614e-18 -796 796 0.007762962962962968 -796 797 -1.084202172485504e-17 -796 798 -1.387778780781446e-17 -796 799 -0.0009703703703703745 -796 800 0.000500000000000002 -796 801 0.008333333333333333 -796 802 -0.001659259259259226 -796 803 8.023096076392733e-18 -796 804 0.03333333333333333 -796 1210 -0.0009703703703703761 -796 1211 0.0005000000000000007 -796 1212 -0.008333333333333333 -796 1213 -0.0002814814814814749 -796 1214 -2.602085213965211e-18 -796 1215 -3.469446951953614e-18 -796 1216 -0.0009703703703703612 -796 1217 -0.0004999999999999981 -796 1218 0.008333333333333333 -797 787 -0.0004999999999999994 -797 788 -0.00104074074074073 -797 789 -0.00925925925925913 -797 790 2.602085213965211e-18 -797 791 0.0002814814814814401 -797 792 7.632783294297951e-17 -797 793 -2.602085213965211e-18 -797 794 -0.002362962962962954 -797 795 -0.03703703703703705 -797 796 -1.084202172485504e-17 -797 797 0.008325925925925917 -797 798 -2.775557561562891e-16 -797 799 0.000500000000000002 -797 800 -0.001040740740740759 -797 801 -0.009259259259259347 -797 802 7.914675859144182e-18 -797 803 0.00028148148148151 -797 804 -3.122502256758253e-17 -797 1210 0.0005000000000000008 -797 1211 -0.001040740740740738 -797 1212 0.009259259259259103 -797 1213 -2.602085213965211e-18 -797 1214 -0.002362962962962954 -797 1215 0.03703703703703684 -797 1216 -0.000499999999999998 -797 1217 -0.001040740740740732 -797 1218 0.009259259259259366 -798 787 -0.01296296296296292 -798 788 -0.01342592592592573 -798 789 -0.1551783264746215 -798 790 -0.02407407407407411 -798 791 -3.642919299551295e-17 -798 792 -0.1063100137174277 -798 793 -1.092875789865388e-16 -798 794 -0.02870370370370334 -798 795 -0.2040466392318226 -798 796 1.387778780781446e-17 -798 797 -8.500145032286355e-17 -798 798 1.241426611796977 -798 799 0.01296296296296303 -798 800 -0.01342592592592633 -798 801 -0.155178326474624 -798 802 0.0240740740740741 -798 803 6.418476861114186e-17 -798 804 -0.106310013717416 -798 1210 -0.01296296296296297 -798 1211 0.01342592592592594 -798 1212 -0.1551783264746225 -798 1213 1.144917494144693e-16 -798 1214 0.0287037037037039 -798 1215 -0.2040466392318225 -798 1216 0.01296296296296286 -798 1217 0.01342592592592561 -798 1218 -0.1551783264746208 -799 799 1 -800 800 1 -801 793 -0.01203703703703697 -801 794 -0.01342592592592596 -801 795 -0.05315500685870676 -801 796 -0.01296296296296303 -801 797 0.01342592592592596 -801 798 -0.155178326474624 -801 799 -2.949029909160572e-17 -801 800 -0.02870370370370372 -801 801 0.6207133058984904 -801 802 2.949029909160572e-17 -801 803 0.02870370370370366 -801 804 -0.2040466392318245 -801 805 0.012037037037037 -801 806 -0.01342592592592587 -801 807 -0.05315500685871195 -801 808 0.012962962962963 -801 809 0.01342592592592591 -801 810 -0.1551783264746232 -802 793 -0.0009703703703703612 -802 794 -0.000499999999999998 -802 795 -0.008333333333333331 -802 796 -0.001659259259259226 -802 797 7.806255641895632e-18 -802 798 -0.03333333333333333 -802 799 -0.0002814814814814854 -802 800 -7.589415207398531e-19 -802 802 0.007762962962962959 -802 803 -2.38524477946811e-18 -802 804 -3.469446951953614e-18 -802 805 -0.0009703703703703678 -802 806 0.0004999999999999987 -802 807 0.008333333333333335 -802 808 -0.001659259259259283 -802 809 -5.421010862427522e-18 -802 810 0.03333333333333334 -802 1213 -0.0009703703703703745 -802 1214 0.0005000000000000021 -802 1215 -0.008333333333333331 -802 1216 -0.0002814814814814853 -802 1217 -7.589415207398531e-19 -802 1218 -1.734723475976807e-18 -802 1219 -0.0009703703703703766 -802 1220 -0.0005000000000000013 -802 1221 0.008333333333333335 -803 793 -0.0004999999999999981 -803 794 -0.001040740740740732 -803 795 -0.009259259259259236 -803 796 8.023096076392733e-18 -803 797 0.00028148148148151 -803 798 4.128641872824801e-16 -803 799 -6.505213034913027e-19 -803 800 -0.002362962962962969 -803 801 -0.03703703703703701 -803 802 -2.38524477946811e-18 -803 803 0.008325925925925931 -803 804 -5.551115123125783e-17 -803 805 0.0004999999999999987 -803 806 -0.001040740740740729 -803 807 -0.009259259259259111 -803 808 -5.204170427930421e-18 -803 809 0.0002814814814814616 -803 810 1.925543058334256e-16 -803 1213 0.000500000000000002 -803 1214 -0.001040740740740759 -803 1215 0.009259259259259477 -803 1216 -7.589415207398531e-19 -803 1217 -0.002362962962962968 -803 1218 0.03703703703703717 -803 1219 -0.0005000000000000014 -803 1220 -0.001040740740740747 -803 1221 0.009259259259259271 -804 793 -0.01296296296296286 -804 794 -0.01342592592592596 -804 795 -0.1551783264746209 -804 796 -0.02407407407407411 -804 797 1.561251128379126e-17 -804 798 -0.106310013717416 -804 799 -2.775557561562891e-17 -804 800 -0.02870370370370393 -804 801 -0.2040466392318245 -804 802 3.469446951953614e-18 -804 803 1.595945597898663e-16 -804 804 1.241426611796978 -804 805 0.01296296296296289 -804 806 -0.01342592592592583 -804 807 -0.1551783264746211 -804 808 0.0240740740740741 -804 809 1.561251128379126e-17 -804 810 -0.1063100137174241 -804 1213 -0.01296296296296303 -804 1214 0.01342592592592596 -804 1215 -0.1551783264746239 -804 1216 2.602085213965211e-17 -804 1217 0.02870370370370367 -804 1218 -0.2040466392318244 -804 1219 0.012962962962963 -804 1220 0.01342592592592591 -804 1221 -0.1551783264746231 -805 805 1 -806 806 1 -807 799 -0.01203703703703711 -807 800 -0.01342592592592585 -807 801 -0.05315500685871195 -807 802 -0.01296296296296289 -807 803 0.01342592592592568 -807 804 -0.1551783264746211 -807 805 1.335737076502141e-16 -807 806 -0.02870370370370374 -807 807 0.6207133058984927 -807 808 -1.196959198423997e-16 -807 809 0.02870370370370391 -807 810 -0.2040466392318265 -807 811 0.01203703703703696 -807 812 -0.01342592592592605 -807 813 -0.05315500685870821 -807 814 0.01296296296296303 -807 815 0.01342592592592605 -807 816 -0.1551783264746249 -808 799 -0.0009703703703703766 -808 800 -0.0005000000000000014 -808 801 -0.008333333333333333 -808 802 -0.001659259259259283 -808 803 -5.204170427930421e-18 -808 804 -0.03333333333333333 -808 805 -0.0002814814814814883 -808 806 9.75781955236954e-19 -808 807 -1.214306433183765e-17 -808 808 0.007762962962962959 -808 809 6.071532165918825e-18 -808 810 -1.040834085586084e-17 -808 811 -0.0009703703703703663 -808 812 0.0004999999999999998 -808 813 0.008333333333333323 -808 814 -0.00165925925925922 -808 815 4.336808689942018e-19 -808 816 0.03333333333333333 -808 1216 -0.0009703703703703678 -808 1217 0.0004999999999999987 -808 1218 -0.008333333333333331 -808 1219 -0.0002814814814814887 -808 1220 9.75781955236954e-19 -808 1221 3.469446951953614e-18 -808 1222 -0.0009703703703703686 -808 1223 -0.0005000000000000002 -808 1224 0.008333333333333342 -809 799 -0.0005000000000000013 -809 800 -0.001040740740740747 -809 801 -0.009259259259259186 -809 802 -5.529431079676073e-18 -809 803 0.0002814814814814613 -809 804 -1.040834085586084e-16 -809 805 8.673617379884035e-19 -809 806 -0.002362962962962973 -809 807 -0.03703703703703715 -809 808 6.071532165918825e-18 -809 809 0.008325925925925935 -809 810 -3.261280134836397e-16 -809 811 0.0004999999999999999 -809 812 -0.001040740740740746 -809 813 -0.009259259259259377 -809 814 3.252606517456513e-19 -809 815 0.0002814814814815157 -809 1216 0.0004999999999999987 -809 1217 -0.001040740740740729 -809 1218 0.009259259259259195 -809 1219 9.75781955236954e-19 -809 1220 -0.002362962962962973 -809 1221 0.03703703703703712 -809 1222 -0.0005000000000000002 -809 1223 -0.001040740740740747 -809 1224 0.009259259259259377 -810 799 -0.01296296296296301 -810 800 -0.01342592592592607 -810 801 -0.1551783264746232 -810 802 -0.02407407407407411 -810 803 4.85722573273506e-17 -810 804 -0.1063100137174241 -810 805 -6.938893903907228e-18 -810 806 -0.02870370370370366 -810 807 -0.2040466392318265 -810 808 1.647987302177967e-16 -810 809 1.058181320345852e-16 -810 810 1.241426611796988 -810 811 0.012962962962963 -810 812 -0.01342592592592603 -810 813 -0.1551783264746246 -810 814 0.02407407407407395 -810 815 -2.081668171172169e-17 -810 816 -0.1063100137174167 -810 1216 -0.01296296296296289 -810 1217 0.01342592592592567 -810 1218 -0.155178326474621 -810 1219 -1.370431546021678e-16 -810 1220 0.0287037037037039 -810 1221 -0.2040466392318267 -810 1222 0.01296296296296305 -810 1223 0.01342592592592605 -810 1224 -0.1551783264746252 -811 811 1 -812 812 1 -813 805 -0.01203703703703698 -813 806 -0.01342592592592603 -813 807 -0.05315500685870818 -813 808 -0.012962962962963 -813 809 0.01342592592592603 -813 810 -0.1551783264746247 -813 811 0.01203703703703696 -813 812 -0.01435185185185209 -813 813 0.3103566529492495 -813 814 0.01296296296296302 -813 815 0.01435185185185209 -813 816 -0.1020233196159167 -814 805 -0.0009703703703703688 -814 806 -0.0005000000000000003 -814 807 -0.008333333333333335 -814 808 -0.00165925925925922 -814 809 4.336808689942018e-19 -814 810 -0.03333333333333333 -814 811 -0.0001407407407407591 -814 812 0.0004999999999999996 -814 813 -0.008333333333333335 -814 814 0.003881481481481471 -814 815 7.589415207398531e-19 -814 816 -0.03333333333333333 -814 1219 -0.0009703703703703667 -814 1220 0.0004999999999999999 -814 1221 -0.008333333333333333 -814 1222 -0.000140740740740756 -814 1223 -0.0005000000000000004 -814 1224 -0.008333333333333337 -815 815 1 -816 805 -0.01296296296296304 -816 806 -0.01342592592592605 -816 807 -0.1551783264746249 -816 808 -0.02407407407407396 -816 809 1.734723475976807e-18 -816 810 -0.1063100137174168 -816 811 0.01296296296296302 -816 812 -0.01435185185185207 -816 813 -0.1020233196159166 -816 814 0.02407407407407396 -816 815 -1.387778780781446e-17 -816 816 0.6207133058984996 -816 1219 -0.01296296296296301 -816 1220 0.01342592592592604 -816 1221 -0.155178326474625 -816 1222 0.01296296296296303 -816 1223 0.01435185185185209 -816 1224 -0.1020233196159163 -817 7 -0.0002814814814814842 -817 10 -0.0009703703703703697 -817 11 -0.0005 -817 12 -0.008333333333333325 -817 16 -0.0009703703703703691 -817 17 0.0004999999999999999 -817 18 0.008333333333333326 -817 817 0.007762962962962965 -817 818 1.084202172485504e-19 -817 819 -1.734723475976807e-17 -817 820 -0.001659259259259261 -817 821 -2.168404344971009e-19 -817 822 -0.03333333333333333 -817 823 -0.001659259259259257 -817 824 1.084202172485504e-19 -817 825 0.03333333333333334 -817 1225 -0.0002814814814814805 -817 1226 -1.084202172485504e-19 -817 1227 -3.469446951953614e-18 -817 1228 -0.0009703703703703708 -817 1229 0.0005000000000000001 -817 1230 -0.008333333333333333 -817 1231 -0.0009703703703703706 -817 1232 -0.0005 -817 1233 0.008333333333333335 -818 8 -0.002362962962962967 -818 9 -0.03703703703703703 -818 10 -0.0004999999999999998 -818 11 -0.001040740740740741 -818 12 -0.009259259259259252 -818 16 0.0004999999999999999 -818 17 -0.001040740740740741 -818 18 -0.009259259259259262 -818 817 1.084202172485504e-19 -818 818 0.008325925925925929 -818 819 -6.938893903907228e-18 -818 820 -2.168404344971009e-19 -818 821 0.0002814814814814797 -818 822 -1.734723475976807e-18 -818 823 -2.168404344971009e-19 -818 824 0.0002814814814814831 -818 825 5.204170427930421e-18 -818 1226 -0.002362962962962962 -818 1227 0.03703703703703703 -818 1228 0.0005 -818 1229 -0.00104074074074074 -818 1230 0.009259259259259252 -818 1231 -0.0005 -818 1232 -0.001040740740740741 -818 1233 0.009259259259259264 -819 7 -3.469446951953614e-18 -819 8 -0.02870370370370372 -819 9 -0.2040466392318246 -819 10 -0.01296296296296295 -819 11 -0.0134259259259259 -819 12 -0.1551783264746223 -819 16 0.01296296296296295 -819 17 -0.01342592592592591 -819 18 -0.1551783264746225 -819 817 2.42861286636753e-17 -819 818 2.081668171172169e-17 -819 819 1.241426611796981 -819 820 -0.02407407407407408 -819 821 -1.387778780781446e-17 -819 822 -0.1063100137174212 -819 823 0.02407407407407406 -819 824 -1.214306433183765e-17 -819 825 -0.1063100137174208 -819 1225 -3.469446951953614e-18 -819 1226 0.02870370370370369 -819 1227 -0.2040466392318242 -819 1228 -0.01296296296296296 -819 1229 0.01342592592592592 -819 1230 -0.1551783264746226 -819 1231 0.01296296296296296 -819 1232 0.01342592592592593 -819 1233 -0.1551783264746228 -820 820 1 -821 821 1 -822 7 0.01296296296296296 -822 8 -0.01342592592592592 -822 9 -0.1551783264746225 -822 10 -0.01296296296296295 -822 11 -0.01435185185185183 -822 12 -0.1020233196159117 -822 817 0.02407407407407407 -822 818 6.938893903907228e-18 -822 819 -0.1063100137174212 -822 820 -0.02407407407407408 -822 821 1.734723475976807e-18 -822 822 0.6207133058984899 -822 1225 0.01296296296296296 -822 1226 0.01342592592592592 -822 1227 -0.1551783264746226 -822 1228 -0.01296296296296296 -822 1229 0.01435185185185183 -822 1230 -0.1020233196159119 -823 7 -0.0009703703703703717 -823 8 -0.0005000000000000003 -823 9 -0.008333333333333333 -823 16 -0.0002814814814814806 -823 17 2.168404344971009e-19 -823 18 8.673617379884035e-18 -823 22 -0.0009703703703703718 -823 23 0.0005000000000000002 -823 24 0.008333333333333338 -823 817 -0.001659259259259257 -823 819 -0.03333333333333331 -823 823 0.007762962962962962 -823 825 1.734723475976807e-17 -823 826 -0.00165925925925926 -823 827 -2.168404344971009e-19 -823 828 0.03333333333333333 -823 1225 -0.0009703703703703704 -823 1226 0.0005 -823 1227 -0.008333333333333333 -823 1231 -0.0002814814814814804 -823 1233 5.204170427930421e-18 -823 1234 -0.0009703703703703704 -823 1235 -0.0004999999999999999 -823 1236 0.008333333333333338 -824 7 -0.0005000000000000003 -824 8 -0.001040740740740742 -824 9 -0.009259259259259266 -824 17 -0.002362962962962963 -824 18 -0.03703703703703705 -824 22 0.0005000000000000002 -824 23 -0.001040740740740741 -824 24 -0.009259259259259259 -824 817 1.084202172485504e-19 -824 818 0.0002814814814814831 -824 819 -3.469446951953614e-18 -824 823 2.168404344971009e-19 -824 824 0.008325925925925924 -824 825 -1.387778780781446e-17 -824 826 -3.252606517456513e-19 -824 827 0.0002814814814814813 -824 828 -1.734723475976807e-18 -824 1225 0.0005000000000000001 -824 1226 -0.001040740740740741 -824 1227 0.009259259259259264 -824 1232 -0.002362962962962962 -824 1233 0.03703703703703705 -824 1234 -0.0005 -824 1235 -0.00104074074074074 -824 1236 0.009259259259259259 -825 7 -0.01296296296296297 -825 8 -0.01342592592592594 -825 9 -0.1551783264746228 -825 16 -1.734723475976807e-18 -825 17 -0.02870370370370371 -825 18 -0.2040466392318241 -825 22 0.01296296296296297 -825 23 -0.01342592592592593 -825 24 -0.1551783264746227 -825 817 -0.02407407407407407 -825 818 8.673617379884035e-18 -825 819 -0.1063100137174208 -825 823 -2.949029909160572e-17 -825 824 5.204170427930421e-18 -825 825 1.241426611796981 -825 826 0.02407407407407411 -825 827 3.469446951953614e-18 -825 828 -0.1063100137174211 -825 1225 -0.01296296296296296 -825 1226 0.01342592592592593 -825 1227 -0.1551783264746228 -825 1231 -5.204170427930421e-18 -825 1232 0.02870370370370372 -825 1233 -0.2040466392318243 -825 1234 0.01296296296296296 -825 1235 0.01342592592592593 -825 1236 -0.1551783264746228 -826 16 -0.0009703703703703693 -826 17 -0.0004999999999999998 -826 18 -0.00833333333333333 -826 22 -0.0002814814814814854 -826 24 -1.734723475976807e-18 -826 28 -0.0009703703703703689 -826 29 0.0004999999999999998 -826 30 0.008333333333333326 -826 823 -0.00165925925925926 -826 824 -2.168404344971009e-19 -826 825 -0.03333333333333335 -826 826 0.007762962962962964 -826 827 -1.084202172485504e-19 -826 828 -3.469446951953614e-18 -826 829 -0.001659259259259258 -826 830 2.168404344971009e-19 -826 831 0.03333333333333335 -826 1231 -0.000970370370370371 -826 1232 0.0005 -826 1233 -0.008333333333333342 -826 1234 -0.0002814814814814804 -826 1235 2.168404344971009e-19 -826 1236 1.734723475976807e-18 -826 1237 -0.0009703703703703706 -826 1238 -0.0005 -826 1239 0.00833333333333334 -827 16 -0.0004999999999999998 -827 17 -0.001040740740740741 -827 18 -0.00925925925925926 -827 22 1.084202172485504e-19 -827 23 -0.002362962962962968 -827 24 -0.03703703703703705 -827 28 0.0004999999999999998 -827 29 -0.001040740740740741 -827 30 -0.009259259259259264 -827 823 -2.168404344971009e-19 -827 824 0.0002814814814814812 -827 825 -1.734723475976807e-18 -827 826 -2.168404344971009e-19 -827 827 0.008325925925925928 -827 829 1.084202172485504e-19 -827 830 0.0002814814814814824 -827 1231 0.0005000000000000001 -827 1232 -0.001040740740740741 -827 1233 0.009259259259259262 -827 1234 1.084202172485504e-19 -827 1235 -0.002362962962962962 -827 1236 0.03703703703703705 -827 1237 -0.0004999999999999999 -827 1238 -0.001040740740740741 -827 1239 0.009259259259259266 -828 16 -0.01296296296296295 -828 17 -0.01342592592592591 -828 18 -0.1551783264746225 -828 23 -0.02870370370370374 -828 24 -0.204046639231825 -828 28 0.01296296296296295 -828 29 -0.01342592592592592 -828 30 -0.1551783264746226 -828 823 -0.02407407407407407 -828 824 -1.214306433183765e-17 -828 825 -0.1063100137174211 -828 826 5.204170427930421e-18 -828 827 3.122502256758253e-17 -828 828 1.241426611796983 -828 829 0.02407407407407408 -828 830 -1.040834085586084e-17 -828 831 -0.1063100137174211 -828 1231 -0.01296296296296297 -828 1232 0.01342592592592593 -828 1233 -0.1551783264746228 -828 1234 -1.040834085586084e-17 -828 1235 0.02870370370370371 -828 1236 -0.2040466392318244 -828 1237 0.01296296296296297 -828 1238 0.01342592592592593 -828 1239 -0.155178326474623 -829 22 -0.0009703703703703715 -829 23 -0.0005000000000000003 -829 24 -0.008333333333333335 -829 28 -0.0002814814814814819 -829 29 -4.336808689942018e-19 -829 30 -2.081668171172169e-17 -829 34 -0.0009703703703703706 -829 35 0.0005 -829 36 0.008333333333333335 -829 826 -0.001659259259259258 -829 827 1.084202172485504e-19 -829 828 -0.03333333333333333 -829 829 0.007762962962962963 -829 830 6.505213034913027e-19 -829 831 -1.734723475976807e-17 -829 832 -0.001659259259259258 -829 833 1.084202172485504e-19 -829 834 0.03333333333333335 -829 1234 -0.0009703703703703706 -829 1235 0.0004999999999999999 -829 1236 -0.008333333333333342 -829 1237 -0.0002814814814814819 -829 1238 1.084202172485504e-19 -829 1239 -5.204170427930421e-18 -829 1240 -0.0009703703703703706 -829 1241 -0.0005 -829 1242 0.008333333333333338 -830 22 -0.0005000000000000003 -830 23 -0.001040740740740742 -830 24 -0.009259259259259266 -830 28 -4.336808689942018e-19 -830 29 -0.002362962962962964 -830 30 -0.03703703703703706 -830 34 0.0005000000000000001 -830 35 -0.001040740740740741 -830 36 -0.009259259259259266 -830 826 3.252606517456513e-19 -830 827 0.0002814814814814823 -830 828 -1.734723475976807e-18 -830 829 7.589415207398531e-19 -830 830 0.008325925925925928 -830 831 -6.938893903907228e-18 -830 832 -1.084202172485504e-19 -830 833 0.0002814814814814827 -830 1234 0.0005 -830 1235 -0.001040740740740741 -830 1236 0.009259259259259266 -830 1237 -3.252606517456513e-19 -830 1238 -0.002362962962962963 -830 1239 0.03703703703703706 -830 1240 -0.0005 -830 1241 -0.001040740740740741 -830 1242 0.009259259259259266 -831 22 -0.01296296296296297 -831 23 -0.01342592592592594 -831 24 -0.1551783264746229 -831 28 -1.734723475976807e-18 -831 29 -0.02870370370370372 -831 30 -0.2040466392318245 -831 34 0.01296296296296296 -831 35 -0.01342592592592593 -831 36 -0.1551783264746228 -831 826 -0.02407407407407408 -831 827 -1.734723475976807e-18 -831 828 -0.106310013717421 -831 829 1.908195823574488e-17 -831 831 1.241426611796983 -831 832 0.02407407407407406 -831 833 -5.204170427930421e-18 -831 834 -0.1063100137174209 -831 1234 -0.01296296296296297 -831 1235 0.01342592592592594 -831 1236 -0.155178326474623 -831 1237 3.469446951953614e-18 -831 1238 0.02870370370370372 -831 1239 -0.2040466392318247 -831 1240 0.01296296296296297 -831 1241 0.01342592592592594 -831 1242 -0.155178326474623 -832 28 -0.0009703703703703706 -832 29 -0.0005000000000000001 -832 30 -0.008333333333333333 -832 34 -0.0002814814814814836 -832 35 1.084202172485504e-19 -832 36 -3.469446951953614e-18 -832 40 -0.0009703703703703699 -832 41 0.0005 -832 42 0.008333333333333335 -832 829 -0.001659259259259258 -832 830 -1.084202172485504e-19 -832 831 -0.03333333333333333 -832 832 0.007762962962962963 -832 833 5.421010862427522e-19 -832 834 -1.040834085586084e-17 -832 835 -0.001659259259259256 -832 836 -3.252606517456513e-19 -832 837 0.03333333333333334 -832 1237 -0.0009703703703703701 -832 1238 0.0004999999999999999 -832 1239 -0.008333333333333333 -832 1240 -0.0002814814814814827 -832 1242 -1.734723475976807e-18 -832 1243 -0.0009703703703703706 -832 1244 -0.0005000000000000001 -832 1245 0.008333333333333337 -833 28 -0.0005000000000000001 -833 29 -0.001040740740740741 -833 30 -0.009259259259259266 -833 34 1.084202172485504e-19 -833 35 -0.002362962962962966 -833 36 -0.03703703703703706 -833 40 0.0005 -833 41 -0.001040740740740741 -833 42 -0.009259259259259266 -833 829 1.084202172485504e-19 -833 830 0.0002814814814814828 -833 831 -1.734723475976807e-18 -833 832 6.505213034913027e-19 -833 833 0.008325925925925929 -833 834 -6.938893903907228e-18 -833 835 -4.336808689942018e-19 -833 836 0.0002814814814814841 -833 837 1.387778780781446e-17 -833 1237 0.0005 -833 1238 -0.001040740740740741 -833 1239 0.009259259259259266 -833 1240 -2.168404344971009e-19 -833 1241 -0.002362962962962964 -833 1242 0.03703703703703706 -833 1243 -0.0005000000000000001 -833 1244 -0.001040740740740742 -833 1245 0.009259259259259273 -834 28 -0.01296296296296297 -834 29 -0.01342592592592593 -834 30 -0.1551783264746228 -834 34 5.204170427930421e-18 -834 35 -0.02870370370370375 -834 36 -0.2040466392318249 -834 40 0.01296296296296296 -834 41 -0.01342592592592593 -834 42 -0.1551783264746228 -834 829 -0.02407407407407409 -834 830 3.469446951953614e-18 -834 831 -0.106310013717421 -834 832 1.214306433183765e-17 -834 833 1.040834085586084e-17 -834 834 1.241426611796983 -834 835 0.02407407407407407 -834 836 -1.734723475976807e-18 -834 837 -0.1063100137174207 -834 1237 -0.01296296296296296 -834 1238 0.01342592592592593 -834 1239 -0.1551783264746229 -834 1240 5.204170427930421e-18 -834 1241 0.02870370370370373 -834 1242 -0.2040466392318248 -834 1243 0.01296296296296297 -834 1244 0.01342592592592593 -834 1245 -0.1551783264746229 -835 34 -0.0009703703703703706 -835 35 -0.0005000000000000001 -835 36 -0.008333333333333331 -835 40 -0.00028148148148148 -835 41 1.084202172485504e-19 -835 42 -1.734723475976807e-18 -835 46 -0.000970370370370371 -835 47 0.0005 -835 48 0.008333333333333337 -835 832 -0.001659259259259256 -835 833 -4.336808689942018e-19 -835 834 -0.03333333333333333 -835 835 0.007762962962962965 -835 836 6.505213034913027e-19 -835 837 -6.938893903907228e-18 -835 838 -0.001659259259259266 -835 839 -2.168404344971009e-19 -835 840 0.03333333333333334 -835 1240 -0.0009703703703703701 -835 1241 0.0004999999999999999 -835 1242 -0.008333333333333335 -835 1243 -0.0002814814814814795 -835 1244 3.252606517456513e-19 -835 1245 -1.734723475976807e-18 -835 1246 -0.0009703703703703714 -835 1247 -0.0005000000000000002 -835 1248 0.008333333333333335 -836 34 -0.0005000000000000002 -836 35 -0.001040740740740742 -836 36 -0.009259259259259271 -836 40 2.168404344971009e-19 -836 41 -0.002362962962962961 -836 42 -0.03703703703703703 -836 46 0.0005 -836 47 -0.00104074074074074 -836 48 -0.009259259259259238 -836 832 -3.252606517456513e-19 -836 833 0.0002814814814814843 -836 834 -3.469446951953614e-18 -836 835 6.505213034913027e-19 -836 836 0.008325925925925924 -836 837 -6.938893903907228e-18 -836 838 -4.336808689942018e-19 -836 839 0.0002814814814814758 -836 840 1.734723475976807e-17 -836 1240 0.0005 -836 1241 -0.001040740740740741 -836 1242 0.009259259259259269 -836 1243 1.084202172485504e-19 -836 1244 -0.00236296296296296 -836 1245 0.03703703703703701 -836 1246 -0.0005000000000000001 -836 1247 -0.001040740740740741 -836 1248 0.009259259259259241 -837 34 -0.01296296296296297 -837 35 -0.01342592592592594 -837 36 -0.1551783264746229 -837 40 1.214306433183765e-17 -837 41 -0.02870370370370368 -837 42 -0.204046639231824 -837 46 0.01296296296296295 -837 47 -0.0134259259259259 -837 48 -0.1551783264746224 -837 832 -0.02407407407407408 -837 833 1.734723475976807e-18 -837 834 -0.1063100137174207 -837 835 -5.204170427930421e-18 -837 836 -5.204170427930421e-18 -837 837 1.241426611796981 -837 838 0.02407407407407409 -837 839 -3.469446951953614e-18 -837 840 -0.1063100137174219 -837 1240 -0.01296296296296296 -837 1241 0.01342592592592592 -837 1242 -0.1551783264746228 -837 1243 1.734723475976807e-18 -837 1244 0.0287037037037037 -837 1245 -0.2040466392318239 -837 1246 0.01296296296296296 -837 1247 0.01342592592592591 -837 1248 -0.1551783264746225 -838 40 -0.0009703703703703714 -838 41 -0.0005000000000000002 -838 42 -0.008333333333333333 -838 46 -0.0002814814814814765 -838 47 2.168404344971009e-19 -838 48 8.673617379884035e-18 -838 52 -0.0009703703703703728 -838 53 0.0005000000000000006 -838 54 0.008333333333333335 -838 835 -0.001659259259259266 -838 836 -3.252606517456513e-19 -838 837 -0.03333333333333333 -838 838 0.007762962962962968 -838 839 -4.336808689942018e-19 -838 840 -1.387778780781446e-17 -838 841 -0.001659259259259262 -838 842 2.168404344971009e-19 -838 843 0.03333333333333333 -838 1243 -0.000970370370370371 -838 1244 0.0005 -838 1245 -0.008333333333333335 -838 1246 -0.0002814814814814765 -838 1247 2.168404344971009e-19 -838 1248 -1.734723475976807e-18 -838 1249 -0.0009703703703703714 -838 1250 -0.0005000000000000002 -838 1251 0.008333333333333337 -839 40 -0.0005000000000000002 -839 41 -0.001040740740740741 -839 42 -0.009259259259259243 -839 46 1.084202172485504e-19 -839 47 -0.002362962962962957 -839 48 -0.03703703703703699 -839 52 0.0005000000000000006 -839 53 -0.001040740740740743 -839 54 -0.009259259259259255 -839 835 -2.168404344971009e-19 -839 836 0.0002814814814814758 -839 838 -3.252606517456513e-19 -839 839 0.008325925925925924 -839 840 -1.387778780781446e-17 -839 841 2.168404344971009e-19 -839 842 0.0002814814814814796 -839 843 -1.734723475976807e-18 -839 1243 0.0005 -839 1244 -0.001040740740740739 -839 1245 0.009259259259259236 -839 1246 3.252606517456513e-19 -839 1247 -0.002362962962962956 -839 1248 0.03703703703703697 -839 1249 -0.0005000000000000002 -839 1250 -0.001040740740740742 -839 1251 0.009259259259259255 -840 40 -0.01296296296296296 -840 41 -0.01342592592592592 -840 42 -0.1551783264746225 -840 46 -6.938893903907228e-18 -840 47 -0.02870370370370359 -840 48 -0.2040466392318231 -840 52 0.01296296296296297 -840 53 -0.01342592592592595 -840 54 -0.1551783264746228 -840 835 -0.0240740740740741 -840 836 -3.469446951953614e-18 -840 837 -0.1063100137174219 -840 838 3.295974604355933e-17 -840 839 -1.908195823574488e-17 -840 840 1.24142661179698 -840 841 0.02407407407407405 -840 842 5.204170427930421e-18 -840 843 -0.1063100137174213 -840 1243 -0.01296296296296296 -840 1244 0.0134259259259259 -840 1245 -0.1551783264746224 -840 1246 -1.387778780781446e-17 -840 1247 0.02870370370370365 -840 1248 -0.2040466392318232 -840 1249 0.01296296296296297 -840 1250 0.01342592592592592 -840 1251 -0.1551783264746227 -841 46 -0.0009703703703703687 -841 47 -0.0004999999999999996 -841 48 -0.008333333333333325 -841 52 -0.0002814814814814895 -841 53 -5.421010862427522e-19 -841 54 -1.734723475976807e-18 -841 58 -0.0009703703703703686 -841 59 0.0005 -841 60 0.008333333333333325 -841 838 -0.001659259259259262 -841 839 2.168404344971009e-19 -841 840 -0.03333333333333333 -841 841 0.007762962962962959 -841 842 -2.168404344971009e-19 -841 843 -1.040834085586084e-17 -841 844 -0.001659259259259243 -841 846 0.03333333333333333 -841 1246 -0.0009703703703703702 -841 1247 0.0004999999999999999 -841 1248 -0.008333333333333333 -841 1249 -0.0002814814814814862 -841 1250 3.252606517456513e-19 -841 1251 -5.204170427930421e-18 -841 1252 -0.00097037037037037 -841 1253 -0.0005000000000000002 -841 1254 0.008333333333333335 -842 46 -0.0004999999999999996 -842 47 -0.001040740740740738 -842 48 -0.009259259259259238 -842 52 -5.421010862427522e-19 -842 53 -0.002362962962962973 -842 54 -0.0370370370370371 -842 58 0.0004999999999999999 -842 59 -0.001040740740740744 -842 60 -0.009259259259259313 -842 838 2.168404344971009e-19 -842 839 0.0002814814814814796 -842 840 1.908195823574488e-17 -842 841 -2.168404344971009e-19 -842 842 0.008325925925925933 -842 843 3.122502256758253e-17 -842 844 -1.084202172485504e-19 -842 845 0.0002814814814814953 -842 846 1.734723475976807e-18 -842 1246 0.0004999999999999998 -842 1247 -0.001040740740740739 -842 1248 0.009259259259259245 -842 1249 5.421010862427522e-19 -842 1250 -0.002362962962962969 -842 1251 0.0370370370370371 -842 1252 -0.0005000000000000002 -842 1253 -0.001040740740740744 -842 1254 0.009259259259259313 -843 46 -0.01296296296296293 -843 47 -0.01342592592592587 -843 48 -0.155178326474622 -843 52 -3.642919299551295e-17 -843 53 -0.02870370370370381 -843 54 -0.2040466392318258 -843 58 0.01296296296296297 -843 59 -0.01342592592592595 -843 60 -0.1551783264746233 -843 838 -0.02407407407407411 -843 839 -1.734723475976807e-17 -843 840 -0.1063100137174213 -843 841 9.71445146547012e-17 -843 842 1.040834085586084e-17 -843 843 1.241426611796983 -843 844 0.02407407407407401 -843 845 -1.734723475976807e-17 -843 846 -0.1063100137174192 -843 1246 -0.01296296296296296 -843 1247 0.01342592592592589 -843 1248 -0.1551783264746225 -843 1249 -2.775557561562891e-17 -843 1250 0.02870370370370377 -843 1251 -0.2040466392318255 -843 1252 0.01296296296296299 -843 1253 0.01342592592592599 -843 1254 -0.1551783264746235 -844 52 -0.0009703703703703697 -844 53 -0.0005000000000000001 -844 54 -0.008333333333333331 -844 58 -0.000281481481481487 -844 59 -6.505213034913027e-19 -844 64 -0.0009703703703703734 -844 65 0.0005000000000000009 -844 66 0.008333333333333335 -844 841 -0.001659259259259243 -844 843 -0.03333333333333331 -844 844 0.007762962962962959 -844 845 -8.673617379884035e-19 -844 846 -6.938893903907228e-18 -844 847 -0.001659259259259258 -844 848 8.673617379884035e-19 -844 849 0.03333333333333333 -844 1249 -0.0009703703703703684 -844 1250 0.0004999999999999998 -844 1251 -0.008333333333333331 -844 1252 -0.0002814814814814884 -844 1253 3.252606517456513e-19 -844 1254 -1.734723475976807e-18 -844 1255 -0.0009703703703703708 -844 1256 -0.0005000000000000001 -844 1257 0.008333333333333338 -845 52 -0.0005 -845 53 -0.001040740740740743 -845 54 -0.009259259259259306 -845 58 -5.421010862427522e-19 -845 59 -0.002362962962962971 -845 60 -0.03703703703703713 -845 64 0.0005000000000000009 -845 65 -0.001040740740740745 -845 66 -0.009259259259259266 -845 842 0.0002814814814814954 -845 843 -1.214306433183765e-17 -845 844 -8.673617379884035e-19 -845 845 0.008325925925925938 -845 846 -2.42861286636753e-17 -845 847 7.589415207398531e-19 -845 848 0.0002814814814814826 -845 849 -2.081668171172169e-17 -845 1249 0.0004999999999999997 -845 1250 -0.001040740740740741 -845 1251 0.009259259259259299 -845 1252 2.168404344971009e-19 -845 1253 -0.002362962962962972 -845 1254 0.03703703703703715 -845 1255 -0.0005000000000000001 -845 1256 -0.001040740740740742 -845 1257 0.009259259259259269 -846 52 -0.01296296296296297 -846 53 -0.01342592592592595 -846 54 -0.1551783264746233 -846 58 -1.734723475976807e-17 -846 59 -0.02870370370370376 -846 60 -0.2040466392318255 -846 64 0.01296296296296299 -846 65 -0.01342592592592599 -846 66 -0.1551783264746231 -846 841 -0.02407407407407405 -846 842 5.204170427930421e-18 -846 843 -0.1063100137174191 -846 844 1.214306433183765e-17 -846 845 -1.734723475976807e-18 -846 846 1.241426611796984 -846 847 0.02407407407407404 -846 848 -3.469446951953614e-18 -846 849 -0.1063100137174208 -846 1249 -0.01296296296296297 -846 1250 0.01342592592592595 -846 1251 -0.1551783264746231 -846 1252 -1.734723475976807e-18 -846 1253 0.02870370370370382 -846 1254 -0.204046639231826 -846 1255 0.01296296296296297 -846 1256 0.01342592592592593 -846 1257 -0.1551783264746229 -847 58 -0.0009703703703703679 -847 59 -0.0004999999999999993 -847 60 -0.008333333333333325 -847 64 -0.0002814814814814809 -847 65 -1.301042606982605e-18 -847 66 -3.469446951953614e-18 -847 70 -0.0009703703703703723 -847 71 0.0005000000000000007 -847 72 0.008333333333333325 -847 844 -0.001659259259259258 -847 845 8.673617379884035e-19 -847 846 -0.03333333333333333 -847 847 0.007762962962962965 -847 848 -2.059984127722458e-18 -847 849 -3.469446951953614e-18 -847 850 -0.001659259259259267 -847 851 1.084202172485504e-18 -847 852 0.03333333333333334 -847 1252 -0.0009703703703703701 -847 1253 0.0005 -847 1254 -0.008333333333333333 -847 1255 -0.0002814814814814757 -847 1256 2.168404344971009e-19 -847 1258 -0.0009703703703703719 -847 1259 -0.0005000000000000001 -847 1260 0.008333333333333337 -848 58 -0.0004999999999999994 -848 59 -0.001040740740740737 -848 60 -0.009259259259259231 -848 64 -1.409462824231156e-18 -848 65 -0.002362962962962962 -848 66 -0.03703703703703699 -848 70 0.0005000000000000007 -848 71 -0.001040740740740745 -848 72 -0.009259259259259259 -848 844 8.673617379884035e-19 -848 845 0.0002814814814814827 -848 846 3.642919299551295e-17 -848 847 -1.951563910473908e-18 -848 848 0.008325925925925922 -848 849 -3.469446951953614e-17 -848 850 1.084202172485504e-18 -848 851 0.0002814814814814755 -848 852 -6.938893903907228e-18 -848 1252 0.0005 -848 1253 -0.001040740740740741 -848 1254 0.009259259259259264 -848 1255 4.336808689942018e-19 -848 1256 -0.002362962962962955 -848 1257 0.03703703703703697 -848 1258 -0.0005000000000000002 -848 1259 -0.00104074074074074 -848 1260 0.009259259259259236 -849 58 -0.01296296296296292 -849 59 -0.01342592592592586 -849 60 -0.155178326474622 -849 64 -4.683753385137379e-17 -849 65 -0.02870370370370365 -849 66 -0.2040466392318238 -849 70 0.01296296296296297 -849 71 -0.01342592592592597 -849 72 -0.1551783264746228 -849 844 -0.02407407407407411 -849 845 -2.602085213965211e-17 -849 846 -0.1063100137174208 -849 847 5.551115123125783e-17 -849 848 3.295974604355933e-17 -849 849 1.241426611796979 -849 850 0.02407407407407407 -849 851 5.204170427930421e-18 -849 852 -0.1063100137174219 -849 1252 -0.01296296296296296 -849 1253 0.01342592592592592 -849 1254 -0.1551783264746228 -849 1255 -1.387778780781446e-17 -849 1256 0.02870370370370367 -849 1257 -0.2040466392318232 -849 1258 0.01296296296296296 -849 1259 0.01342592592592589 -849 1260 -0.1551783264746225 -850 64 -0.0009703703703703696 -850 65 -0.0004999999999999996 -850 66 -0.008333333333333333 -850 70 -0.0002814814814814739 -850 71 -1.517883041479706e-18 -850 72 -1.734723475976807e-18 -850 76 -0.0009703703703703727 -850 77 0.0005000000000000006 -850 78 0.008333333333333338 -850 847 -0.001659259259259267 -850 848 9.75781955236954e-19 -850 849 -0.03333333333333333 -850 850 0.00776296296296297 -850 851 -6.505213034913027e-19 -850 852 2.081668171172169e-17 -850 853 -0.001659259259259272 -850 854 -1.084202172485504e-19 -850 855 0.03333333333333335 -850 1255 -0.0009703703703703708 -850 1256 0.0004999999999999997 -850 1257 -0.008333333333333342 -850 1258 -0.000281481481481472 -850 1259 1.084202172485504e-18 -850 1260 3.469446951953614e-18 -850 1261 -0.0009703703703703727 -850 1262 -0.0005000000000000007 -850 1263 0.008333333333333342 -851 64 -0.0004999999999999994 -851 65 -0.001040740740740736 -851 66 -0.009259259259259217 -851 70 -1.301042606982605e-18 -851 71 -0.002362962962962953 -851 72 -0.03703703703703697 -851 76 0.0005000000000000006 -851 77 -0.001040740740740742 -851 78 -0.009259259259259247 -851 847 9.75781955236954e-19 -851 848 0.0002814814814814755 -851 849 4.85722573273506e-17 -851 850 -6.505213034913027e-19 -851 851 0.008325925925925915 -851 852 6.938893903907228e-18 -851 853 -2.168404344971009e-19 -851 854 0.0002814814814814703 -851 855 8.673617379884035e-18 -851 1255 0.0004999999999999998 -851 1256 -0.001040740740740737 -851 1257 0.009259259259259222 -851 1258 6.505213034913027e-19 -851 1259 -0.00236296296296295 -851 1260 0.03703703703703693 -851 1261 -0.0005000000000000004 -851 1262 -0.001040740740740742 -851 1263 0.009259259259259252 -852 64 -0.01296296296296292 -852 65 -0.01342592592592586 -852 66 -0.1551783264746218 -852 70 -5.377642775528102e-17 -852 71 -0.0287037037037036 -852 72 -0.2040466392318225 -852 76 0.01296296296296296 -852 77 -0.01342592592592594 -852 78 -0.1551783264746226 -852 847 -0.02407407407407414 -852 848 8.673617379884035e-18 -852 849 -0.1063100137174219 -852 850 6.591949208711867e-17 -852 851 -5.204170427930421e-18 -852 852 1.241426611796979 -852 853 0.02407407407407409 -852 854 -1.214306433183765e-17 -852 855 -0.1063100137174227 -852 1255 -0.01296296296296296 -852 1256 0.01342592592592586 -852 1257 -0.1551783264746222 -852 1258 -2.602085213965211e-17 -852 1259 0.0287037037037036 -852 1260 -0.2040466392318223 -852 1261 0.01296296296296297 -852 1262 0.01342592592592596 -852 1263 -0.1551783264746228 -853 70 -0.0009703703703703701 -853 71 -0.0004999999999999997 -853 72 -0.008333333333333338 -853 76 -0.0002814814814814781 -853 77 4.336808689942018e-19 -853 78 8.673617379884035e-18 -853 82 -0.0009703703703703683 -853 83 0.0004999999999999994 -853 84 0.008333333333333338 -853 850 -0.001659259259259272 -853 851 -2.168404344971009e-19 -853 852 -0.03333333333333336 -853 853 0.007762962962962967 -853 854 6.505213034913027e-19 -853 855 3.469446951953614e-18 -853 856 -0.00165925925925926 -853 857 -5.421010862427522e-19 -853 858 0.03333333333333335 -853 1258 -0.00097037037037037 -853 1259 0.0004999999999999997 -853 1260 -0.008333333333333342 -853 1261 -0.000281481481481479 -853 1262 -1.084202172485504e-19 -853 1263 -6.938893903907228e-18 -853 1264 -0.0009703703703703694 -853 1265 -0.0004999999999999997 -853 1266 0.00833333333333334 -854 70 -0.0004999999999999997 -854 71 -0.001040740740740737 -854 72 -0.009259259259259229 -854 76 3.252606517456513e-19 -854 77 -0.002362962962962959 -854 78 -0.03703703703703701 -854 82 0.0004999999999999994 -854 83 -0.001040740740740737 -854 84 -0.009259259259259252 -854 850 -1.084202172485504e-19 -854 851 0.0002814814814814703 -854 852 1.734723475976807e-18 -854 853 7.589415207398531e-19 -854 854 0.008325925925925917 -854 855 3.816391647148976e-17 -854 856 -6.505213034913027e-19 -854 857 0.000281481481481481 -854 858 6.938893903907228e-18 -854 1258 0.0004999999999999997 -854 1259 -0.001040740740740737 -854 1260 0.009259259259259229 -854 1262 -0.00236296296296296 -854 1263 0.03703703703703703 -854 1264 -0.0004999999999999998 -854 1265 -0.001040740740740739 -854 1266 0.009259259259259262 -855 70 -0.01296296296296294 -855 71 -0.01342592592592588 -855 72 -0.155178326474622 -855 76 -1.040834085586084e-17 -855 77 -0.02870370370370374 -855 78 -0.2040466392318237 -855 82 0.01296296296296294 -855 83 -0.01342592592592587 -855 84 -0.1551783264746225 -855 850 -0.02407407407407414 -855 851 -5.204170427930421e-18 -855 852 -0.1063100137174228 -855 853 1.734723475976807e-17 -855 854 5.204170427930421e-18 -855 855 1.241426611796981 -855 856 0.0240740740740741 -855 857 -3.469446951953614e-18 -855 858 -0.1063100137174213 -855 1258 -0.01296296296296294 -855 1259 0.01342592592592588 -855 1260 -0.1551783264746222 -855 1261 -5.204170427930421e-18 -855 1262 0.0287037037037037 -855 1263 -0.2040466392318239 -855 1264 0.01296296296296296 -855 1265 0.01342592592592592 -855 1266 -0.1551783264746227 -856 76 -0.0009703703703703726 -856 77 -0.0005000000000000007 -856 78 -0.008333333333333342 -856 82 -0.0002814814814814836 -856 83 1.517883041479706e-18 -856 84 1.734723475976807e-18 -856 88 -0.0009703703703703674 -856 89 0.0004999999999999991 -856 90 0.008333333333333338 -856 853 -0.00165925925925926 -856 854 -4.336808689942018e-19 -856 855 -0.03333333333333335 -856 856 0.007762962962962961 -856 857 3.252606517456513e-19 -856 858 -3.469446951953614e-18 -856 859 -0.001659259259259256 -856 860 2.168404344971009e-19 -856 861 0.03333333333333335 -856 1261 -0.0009703703703703711 -856 1262 0.0005000000000000003 -856 1263 -0.008333333333333335 -856 1264 -0.0002814814814814838 -856 1265 -1.301042606982605e-18 -856 1266 -3.469446951953614e-18 -856 1267 -0.0009703703703703672 -856 1268 -0.0004999999999999991 -856 1269 0.008333333333333337 -857 76 -0.0005000000000000008 -857 77 -0.001040740740740746 -857 78 -0.009259259259259292 -857 82 1.517883041479706e-18 -857 83 -0.002362962962962966 -857 84 -0.03703703703703709 -857 88 0.0004999999999999991 -857 89 -0.001040740740740736 -857 90 -0.00925925925925925 -857 853 -5.421010862427522e-19 -857 854 0.000281481481481481 -857 855 -3.122502256758253e-17 -857 856 4.336808689942018e-19 -857 857 0.008325925925925928 -857 858 -3.469446951953614e-17 -857 859 2.168404344971009e-19 -857 860 0.0002814814814814836 -857 861 -1.561251128379126e-17 -857 1261 0.0005000000000000002 -857 1262 -0.001040740740740743 -857 1263 0.009259259259259283 -857 1264 -1.192622389734055e-18 -857 1265 -0.002362962962962966 -857 1266 0.03703703703703708 -857 1267 -0.0004999999999999991 -857 1268 -0.001040740740740735 -857 1269 0.009259259259259236 -858 76 -0.012962962962963 -858 77 -0.013425925925926 -858 78 -0.1551783264746235 -858 82 5.898059818321144e-17 -858 83 -0.02870370370370377 -858 84 -0.204046639231825 -858 88 0.01296296296296294 -858 89 -0.01342592592592588 -858 90 -0.1551783264746223 -858 853 -0.02407407407407404 -858 854 8.673617379884035e-18 -858 855 -0.1063100137174213 -858 856 -1.283695372222837e-16 -858 857 1.214306433183765e-17 -858 858 1.241426611796983 -858 859 0.02407407407407416 -858 860 1.387778780781446e-17 -858 861 -0.1063100137174206 -858 1261 -0.01296296296296297 -858 1262 0.01342592592592597 -858 1263 -0.1551783264746232 -858 1264 6.071532165918825e-17 -858 1265 0.02870370370370377 -858 1266 -0.2040466392318249 -858 1267 0.01296296296296292 -858 1268 0.01342592592592586 -858 1269 -0.1551783264746219 -859 82 -0.0009703703703703731 -859 83 -0.0005000000000000008 -859 84 -0.00833333333333334 -859 88 -0.0002814814814814823 -859 89 1.734723475976807e-18 -859 90 3.469446951953614e-18 -859 94 -0.0009703703703703672 -859 95 0.000499999999999999 -859 96 0.00833333333333334 -859 856 -0.001659259259259256 -859 858 -0.03333333333333335 -859 859 0.007762962962962961 -859 860 4.336808689942018e-19 -859 862 -0.001659259259259261 -859 863 -4.336808689942018e-19 -859 864 0.03333333333333335 -859 1264 -0.0009703703703703734 -859 1265 0.000500000000000001 -859 1266 -0.008333333333333333 -859 1267 -0.0002814814814814811 -859 1268 -1.626303258728257e-18 -859 1269 -3.469446951953614e-18 -859 1270 -0.0009703703703703681 -859 1271 -0.0004999999999999994 -859 1272 0.008333333333333335 -860 82 -0.0005000000000000009 -860 83 -0.001040740740740747 -860 84 -0.009259259259259297 -860 88 1.951563910473908e-18 -860 89 -0.002362962962962964 -860 90 -0.03703703703703706 -860 94 0.000499999999999999 -860 95 -0.001040740740740734 -860 96 -0.009259259259259236 -860 856 3.252606517456513e-19 -860 857 0.0002814814814814835 -860 858 -6.938893903907228e-18 -860 859 2.168404344971009e-19 -860 860 0.008325925925925928 -860 861 -1.040834085586084e-17 -860 862 -5.421010862427522e-19 -860 863 0.0002814814814814808 -860 864 -6.938893903907228e-18 -860 1264 0.0005000000000000009 -860 1265 -0.001040740740740747 -860 1266 0.00925925925925929 -860 1267 -1.734723475976807e-18 -860 1268 -0.002362962962962963 -860 1269 0.03703703703703703 -860 1270 -0.0004999999999999993 -860 1271 -0.001040740740740735 -860 1272 0.009259259259259226 -861 82 -0.012962962962963 -861 83 -0.01342592592592603 -861 84 -0.1551783264746236 -861 88 7.28583859910259e-17 -861 89 -0.02870370370370378 -861 90 -0.2040466392318247 -861 94 0.01296296296296293 -861 95 -0.01342592592592582 -861 96 -0.1551783264746222 -861 856 -0.02407407407407402 -861 857 1.214306433183765e-17 -861 858 -0.1063100137174207 -861 859 -1.370431546021678e-16 -861 860 3.816391647148976e-17 -861 861 1.241426611796982 -861 862 0.02407407407407416 -861 863 8.673617379884035e-18 -861 864 -0.1063100137174213 -861 1264 -0.012962962962963 -861 1265 0.01342592592592602 -861 1266 -0.1551783264746233 -861 1267 6.765421556309548e-17 -861 1268 0.02870370370370369 -861 1269 -0.2040466392318241 -861 1270 0.01296296296296293 -861 1271 0.01342592592592586 -861 1272 -0.155178326474622 -862 88 -0.0009703703703703739 -862 89 -0.0005000000000000011 -862 90 -0.008333333333333342 -862 94 -0.0002814814814814808 -862 95 1.517883041479706e-18 -862 96 -1.040834085586084e-17 -862 100 -0.0009703703703703687 -862 101 0.0004999999999999994 -862 102 0.008333333333333335 -862 859 -0.001659259259259261 -862 860 -4.336808689942018e-19 -862 861 -0.03333333333333335 -862 862 0.007762962962962964 -862 863 4.336808689942018e-19 -862 864 -1.734723475976807e-17 -862 865 -0.001659259259259258 -862 866 2.168404344971009e-19 -862 867 0.03333333333333334 -862 1267 -0.0009703703703703732 -862 1268 0.0005000000000000008 -862 1269 -0.008333333333333333 -862 1270 -0.0002814814814814796 -862 1271 -1.301042606982605e-18 -862 1272 -1.734723475976807e-18 -862 1273 -0.0009703703703703687 -862 1274 -0.0004999999999999995 -862 1275 0.008333333333333337 -863 88 -0.0005000000000000011 -863 89 -0.001040740740740747 -863 90 -0.00925925925925929 -863 94 1.409462824231156e-18 -863 95 -0.002362962962962962 -863 96 -0.03703703703703703 -863 100 0.0004999999999999996 -863 101 -0.001040740740740737 -863 102 -0.009259259259259245 -863 859 -4.336808689942018e-19 -863 860 0.0002814814814814807 -863 861 -3.469446951953614e-17 -863 862 5.421010862427522e-19 -863 863 0.008325925925925928 -863 864 -2.081668171172169e-17 -863 866 0.0002814814814814828 -863 867 -6.938893903907228e-18 -863 1267 0.0005000000000000009 -863 1268 -0.001040740740740746 -863 1269 0.009259259259259267 -863 1270 -1.409462824231156e-18 -863 1271 -0.002362962962962961 -863 1272 0.037037037037037 -863 1273 -0.0004999999999999994 -863 1274 -0.001040740740740737 -863 1275 0.009259259259259236 -864 88 -0.01296296296296301 -864 89 -0.01342592592592601 -864 90 -0.1551783264746237 -864 94 6.765421556309548e-17 -864 95 -0.0287037037037037 -864 96 -0.2040466392318244 -864 100 0.01296296296296295 -864 101 -0.01342592592592588 -864 102 -0.1551783264746223 -864 859 -0.02407407407407403 -864 860 1.040834085586084e-17 -864 861 -0.1063100137174213 -864 862 -1.058181320345852e-16 -864 863 1.387778780781446e-17 -864 864 1.241426611796982 -864 865 0.02407407407407413 -864 866 1.734723475976807e-18 -864 867 -0.1063100137174209 -864 1267 -0.01296296296296299 -864 1268 0.01342592592592599 -864 1269 -0.1551783264746232 -864 1270 4.510281037539698e-17 -864 1271 0.02870370370370369 -864 1272 -0.2040466392318239 -864 1273 0.01296296296296294 -864 1274 0.01342592592592587 -864 1275 -0.1551783264746222 -865 94 -0.0009703703703703725 -865 95 -0.0005000000000000007 -865 96 -0.008333333333333335 -865 100 -0.0002814814814814782 -865 101 4.336808689942018e-19 -865 102 1.734723475976807e-18 -865 106 -0.0009703703703703711 -865 107 0.0005000000000000001 -865 108 0.008333333333333338 -865 862 -0.001659259259259258 -865 864 -0.03333333333333333 -865 865 0.007762962962962967 -865 866 -1.084202172485504e-19 -865 867 3.469446951953614e-18 -865 868 -0.001659259259259264 -865 870 0.03333333333333334 -865 1270 -0.0009703703703703726 -865 1271 0.0005000000000000007 -865 1272 -0.008333333333333333 -865 1273 -0.000281481481481479 -865 1274 -6.505213034913027e-19 -865 1275 -3.469446951953614e-18 -865 1276 -0.0009703703703703708 -865 1277 -0.0005 -865 1278 0.008333333333333337 -866 94 -0.0005000000000000007 -866 95 -0.001040740740740744 -866 96 -0.009259259259259274 -866 100 5.421010862427522e-19 -866 101 -0.002362962962962959 -866 102 -0.03703703703703703 -866 106 0.0005000000000000001 -866 107 -0.00104074074074074 -866 108 -0.00925925925925925 -866 862 2.168404344971009e-19 -866 863 0.0002814814814814827 -866 864 3.469446951953614e-18 -866 865 -1.084202172485504e-19 -866 866 0.008325925925925928 -866 867 1.734723475976807e-17 -866 869 0.0002814814814814776 -866 870 1.734723475976807e-18 -866 1270 0.0005000000000000007 -866 1271 -0.001040740740740745 -866 1272 0.009259259259259269 -866 1273 -6.505213034913027e-19 -866 1274 -0.00236296296296296 -866 1275 0.03703703703703701 -866 1276 -0.0005000000000000001 -866 1277 -0.00104074074074074 -866 1278 0.009259259259259247 -867 94 -0.01296296296296299 -867 95 -0.01342592592592597 -867 96 -0.1551783264746232 -867 100 2.775557561562891e-17 -867 101 -0.02870370370370363 -867 102 -0.2040466392318236 -867 106 0.01296296296296296 -867 107 -0.01342592592592591 -867 108 -0.1551783264746225 -867 862 -0.02407407407407406 -867 863 -3.469446951953614e-18 -867 864 -0.1063100137174209 -867 865 -5.030698080332741e-17 -867 866 -2.42861286636753e-17 -867 867 1.241426611796981 -867 868 0.02407407407407411 -867 869 -1.734723475976807e-18 -867 870 -0.1063100137174216 -867 1270 -0.01296296296296299 -867 1271 0.01342592592592598 -867 1272 -0.1551783264746231 -867 1273 3.122502256758253e-17 -867 1274 0.02870370370370365 -867 1275 -0.2040466392318237 -867 1276 0.01296296296296296 -867 1277 0.01342592592592592 -867 1278 -0.1551783264746225 -868 100 -0.0009703703703703707 -868 101 -0.0005 -868 102 -0.008333333333333338 -868 106 -0.0002814814814814827 -868 107 -4.336808689942018e-19 -868 108 -1.387778780781446e-17 -868 112 -0.0009703703703703692 -868 113 0.0004999999999999998 -868 114 0.008333333333333333 -868 865 -0.001659259259259264 -868 867 -0.03333333333333334 -868 868 0.007762962962962964 -868 869 4.336808689942018e-19 -868 870 -6.938893903907228e-18 -868 871 -0.001659259259259252 -868 872 7.589415207398531e-19 -868 873 0.03333333333333334 -868 1273 -0.0009703703703703709 -868 1274 0.0005 -868 1275 -0.008333333333333333 -868 1276 -0.0002814814814814824 -868 1277 -5.421010862427522e-19 -868 1278 1.040834085586084e-17 -868 1279 -0.0009703703703703708 -868 1280 -0.0005000000000000001 -868 1281 0.008333333333333338 -869 100 -0.0005 -869 101 -0.00104074074074074 -869 102 -0.00925925925925925 -869 106 -5.421010862427522e-19 -869 107 -0.002362962962962964 -869 108 -0.03703703703703706 -869 112 0.0004999999999999998 -869 113 -0.001040740740740741 -869 114 -0.009259259259259281 -869 866 0.0002814814814814776 -869 867 1.734723475976807e-18 -869 868 4.336808689942018e-19 -869 869 0.008325925925925928 -869 870 -6.938893903907228e-18 -869 871 7.589415207398531e-19 -869 872 0.0002814814814814874 -869 873 -1.734723475976807e-17 -869 1273 0.0005 -869 1274 -0.00104074074074074 -869 1275 0.009259259259259247 -869 1276 -3.252606517456513e-19 -869 1277 -0.002362962962962964 -869 1278 0.03703703703703706 -869 1279 -0.0005000000000000002 -869 1280 -0.001040740740740742 -869 1281 0.00925925925925928 -870 100 -0.01296296296296296 -870 101 -0.01342592592592591 -870 102 -0.1551783264746224 -870 106 -3.642919299551295e-17 -870 107 -0.02870370370370372 -870 108 -0.2040466392318249 -870 112 0.01296296296296298 -870 113 -0.01342592592592596 -870 114 -0.1551783264746235 -870 865 -0.0240740740740741 -870 866 3.469446951953614e-18 -870 867 -0.1063100137174216 -870 868 6.418476861114186e-17 -870 869 8.673617379884035e-18 -870 870 1.241426611796983 -870 871 0.02407407407407403 -870 872 -6.938893903907228e-18 -870 873 -0.1063100137174206 -870 1273 -0.01296296296296295 -870 1274 0.01342592592592591 -870 1275 -0.1551783264746225 -870 1276 -1.214306433183765e-17 -870 1277 0.02870370370370372 -870 1278 -0.2040466392318246 -870 1279 0.01296296296296298 -870 1280 0.01342592592592596 -870 1281 -0.1551783264746233 -871 106 -0.0009703703703703711 -871 107 -0.0005000000000000003 -871 108 -0.008333333333333345 -871 112 -0.0002814814814814848 -871 113 -2.168404344971009e-19 -871 114 -1.908195823574488e-17 -871 118 -0.0009703703703703693 -871 119 0.0004999999999999998 -871 120 0.008333333333333345 -871 868 -0.001659259259259252 -871 869 7.589415207398531e-19 -871 870 -0.03333333333333333 -871 871 0.007762962962962959 -871 872 2.168404344971009e-19 -871 873 -6.938893903907228e-18 -871 874 -0.001659259259259255 -871 875 -3.252606517456513e-19 -871 876 0.03333333333333335 -871 1276 -0.0009703703703703688 -871 1277 0.0004999999999999999 -871 1278 -0.008333333333333325 -871 1279 -0.0002814814814814887 -871 1280 -3.252606517456513e-19 -871 1281 -1.734723475976807e-18 -871 1282 -0.0009703703703703678 -871 1283 -0.0004999999999999995 -871 1284 0.008333333333333325 -872 106 -0.0005000000000000001 -872 107 -0.001040740740740742 -872 108 -0.009259259259259278 -872 112 -1.084202172485504e-19 -872 113 -0.002362962962962968 -872 114 -0.03703703703703713 -872 118 0.0004999999999999997 -872 119 -0.00104074074074074 -872 120 -0.009259259259259276 -872 868 7.589415207398531e-19 -872 869 0.0002814814814814875 -872 871 3.252606517456513e-19 -872 872 0.008325925925925931 -872 873 -2.081668171172169e-17 -872 874 -1.084202172485504e-19 -872 875 0.0002814814814814836 -872 876 -1.214306433183765e-17 -872 1276 0.0004999999999999998 -872 1277 -0.001040740740740742 -872 1278 0.009259259259259283 -872 1279 -5.421010862427522e-19 -872 1280 -0.002362962962962972 -872 1281 0.03703703703703709 -872 1282 -0.0004999999999999995 -872 1283 -0.001040740740740739 -872 1284 0.009259259259259252 -873 106 -0.012962962962963 -873 107 -0.01342592592592596 -873 108 -0.1551783264746237 -873 112 2.949029909160572e-17 -873 113 -0.02870370370370381 -873 114 -0.2040466392318259 -873 118 0.01296296296296296 -873 119 -0.01342592592592593 -873 120 -0.1551783264746231 -873 868 -0.02407407407407405 -873 869 2.602085213965211e-17 -873 870 -0.1063100137174206 -873 871 -2.602085213965211e-17 -873 872 -1.734723475976807e-17 -873 873 1.241426611796986 -873 874 0.02407407407407409 -873 875 4.163336342344337e-17 -873 876 -0.1063100137174208 -873 1276 -0.01296296296296297 -873 1277 0.01342592592592595 -873 1278 -0.1551783264746232 -873 1279 2.775557561562891e-17 -873 1280 0.02870370370370379 -873 1281 -0.2040466392318259 -873 1282 0.01296296296296293 -873 1283 0.01342592592592591 -873 1284 -0.1551783264746224 -874 112 -0.0009703703703703713 -874 113 -0.0005000000000000004 -874 114 -0.008333333333333342 -874 118 -0.0002814814814814798 -874 119 4.336808689942018e-19 -874 120 -1.214306433183765e-17 -874 124 -0.0009703703703703684 -874 125 0.0004999999999999994 -874 126 0.008333333333333331 -874 871 -0.001659259259259255 -874 872 -1.084202172485504e-19 -874 873 -0.03333333333333334 -874 874 0.007762962962962966 -874 875 1.192622389734055e-18 -874 876 -6.938893903907228e-18 -874 877 -0.001659259259259265 -874 878 1.084202172485504e-19 -874 879 0.03333333333333334 -874 1279 -0.0009703703703703726 -874 1280 0.0005000000000000007 -874 1281 -0.008333333333333335 -874 1282 -0.0002814814814814815 -874 1283 -8.673617379884035e-19 -874 1284 3.469446951953614e-18 -874 1285 -0.0009703703703703724 -874 1286 -0.0005000000000000002 -874 1287 0.008333333333333345 -875 112 -0.0005000000000000004 -875 113 -0.001040740740740744 -875 114 -0.009259259259259293 -875 118 4.336808689942018e-19 -875 119 -0.002362962962962961 -875 120 -0.03703703703703706 -875 124 0.0004999999999999995 -875 125 -0.001040740740740736 -875 126 -0.009259259259259217 -875 871 -3.252606517456513e-19 -875 872 0.0002814814814814837 -875 873 -1.214306433183765e-17 -875 874 1.192622389734055e-18 -875 875 0.008325925925925931 -875 877 -2.168404344971009e-19 -875 878 0.0002814814814814749 -875 879 3.989863994746656e-17 -875 1279 0.0005000000000000007 -875 1280 -0.001040740740740745 -875 1281 0.009259259259259271 -875 1282 -8.673617379884035e-19 -875 1283 -0.002362962962962963 -875 1284 0.03703703703703704 -875 1285 -0.0005000000000000003 -875 1286 -0.00104074074074074 -875 1287 0.00925925925925924 -876 112 -0.01296296296296299 -876 113 -0.01342592592592599 -876 114 -0.1551783264746236 -876 118 4.510281037539698e-17 -876 119 -0.0287037037037037 -876 120 -0.2040466392318243 -876 124 0.01296296296296293 -876 125 -0.01342592592592589 -876 126 -0.1551783264746219 -876 871 -0.02407407407407403 -876 872 1.908195823574488e-17 -876 873 -0.1063100137174208 -876 874 -9.020562075079397e-17 -876 875 3.642919299551295e-17 -876 876 1.241426611796983 -876 877 0.02407407407407413 -876 878 -4.510281037539698e-17 -876 879 -0.106310013717422 -876 1279 -0.01296296296296299 -876 1280 0.01342592592592599 -876 1281 -0.1551783264746232 -876 1282 2.081668171172169e-17 -876 1283 0.02870370370370365 -876 1284 -0.2040466392318244 -876 1285 0.01296296296296299 -876 1286 0.01342592592592593 -876 1287 -0.1551783264746229 -877 118 -0.000970370370370374 -877 119 -0.0005000000000000009 -877 120 -0.008333333333333344 -877 124 -0.0002814814814814742 -877 125 1.192622389734055e-18 -877 126 8.673617379884035e-18 -877 130 -0.0009703703703703731 -877 131 0.0005000000000000002 -877 132 0.008333333333333342 -877 874 -0.001659259259259265 -877 875 -1.084202172485504e-19 -877 876 -0.03333333333333335 -877 877 0.00776296296296297 -877 878 6.505213034913027e-19 -877 879 3.469446951953614e-18 -877 880 -0.001659259259259271 -877 881 -9.75781955236954e-19 -877 882 0.03333333333333333 -877 1282 -0.0009703703703703691 -877 1283 0.0004999999999999998 -877 1284 -0.008333333333333323 -877 1285 -0.0002814814814814738 -877 1286 -1.084202172485504e-19 -877 1287 5.204170427930421e-18 -877 1288 -0.0009703703703703695 -877 1289 -0.0004999999999999997 -877 1290 0.008333333333333328 -878 118 -0.0005000000000000009 -878 119 -0.001040740740740744 -878 120 -0.009259259259259247 -878 124 5.421010862427522e-19 -878 125 -0.002362962962962953 -878 126 -0.03703703703703696 -878 130 0.0005000000000000002 -878 131 -0.00104074074074074 -878 132 -0.009259259259259215 -878 874 1.084202172485504e-19 -878 875 0.0002814814814814749 -878 877 7.589415207398531e-19 -878 878 0.008325925925925922 -878 879 -5.204170427930421e-17 -878 880 -4.336808689942018e-19 -878 881 0.0002814814814814716 -878 882 4.336808689942018e-17 -878 1282 0.0004999999999999998 -878 1283 -0.001040740740740741 -878 1284 0.00925925925925925 -878 1285 -3.252606517456513e-19 -878 1286 -0.002362962962962953 -878 1287 0.03703703703703695 -878 1288 -0.0004999999999999998 -878 1289 -0.001040740740740738 -878 1290 0.009259259259259238 -879 118 -0.01296296296296301 -879 119 -0.01342592592592599 -879 120 -0.155178326474623 -879 124 4.683753385137379e-17 -879 125 -0.02870370370370347 -879 126 -0.2040466392318226 -879 130 0.01296296296296297 -879 131 -0.01342592592592594 -879 132 -0.1551783264746225 -879 874 -0.02407407407407409 -879 875 3.469446951953614e-18 -879 876 -0.106310013717422 -879 877 -5.030698080332741e-17 -879 878 -7.459310946700271e-17 -879 879 1.241426611796979 -879 880 0.02407407407407413 -879 881 3.816391647148976e-17 -879 882 -0.1063100137174224 -879 1282 -0.01296296296296294 -879 1283 0.01342592592592593 -879 1284 -0.1551783264746226 -879 1285 2.081668171172169e-17 -879 1286 0.02870370370370368 -879 1287 -0.2040466392318226 -879 1288 0.01296296296296292 -879 1289 0.01342592592592584 -879 1290 -0.1551783264746218 -880 124 -0.0009703703703703684 -880 125 -0.0004999999999999994 -880 126 -0.008333333333333321 -880 130 -0.0002814814814814745 -880 131 -2.168404344971009e-19 -880 132 2.602085213965211e-17 -880 136 -0.0009703703703703724 -880 137 0.0005000000000000007 -880 138 0.008333333333333323 -880 877 -0.00165925925925927 -880 878 -5.421010862427522e-19 -880 879 -0.03333333333333335 -880 880 0.007762962962962972 -880 881 -1.517883041479706e-18 -880 882 -1.040834085586084e-17 -880 883 -0.001659259259259265 -880 884 2.168404344971009e-19 -880 885 0.03333333333333332 -880 1285 -0.0009703703703703738 -880 1286 0.0005000000000000007 -880 1287 -0.008333333333333351 -880 1288 -0.0002814814814814732 -880 1289 8.673617379884035e-19 -880 1290 -1.734723475976807e-17 -880 1291 -0.0009703703703703744 -880 1292 -0.0005000000000000009 -880 1293 0.008333333333333345 -881 124 -0.0004999999999999994 -881 125 -0.001040740740740738 -881 126 -0.009259259259259215 -881 130 2.168404344971009e-19 -881 131 -0.002362962962962953 -881 132 -0.03703703703703697 -881 136 0.0005000000000000006 -881 137 -0.001040740740740745 -881 138 -0.009259259259259247 -881 877 -9.75781955236954e-19 -881 878 0.0002814814814814716 -881 879 4.336808689942018e-17 -881 880 -1.517883041479706e-18 -881 881 0.008325925925925928 -881 882 -6.591949208711867e-17 -881 883 3.252606517456513e-19 -881 884 0.0002814814814814745 -881 885 1.734723475976807e-17 -881 1285 0.0005000000000000006 -881 1286 -0.00104074074074074 -881 1287 0.00925925925925924 -881 1288 1.409462824231156e-18 -881 1289 -0.002362962962962952 -881 1290 0.03703703703703692 -881 1291 -0.0005000000000000009 -881 1292 -0.001040740740740744 -881 1293 0.00925925925925925 -882 124 -0.01296296296296292 -882 125 -0.01342592592592591 -882 126 -0.1551783264746219 -882 130 -2.775557561562891e-17 -882 131 -0.0287037037037035 -882 132 -0.2040466392318225 -882 136 0.01296296296296297 -882 137 -0.013425925925926 -882 138 -0.1551783264746227 -882 877 -0.02407407407407411 -882 878 -2.42861286636753e-17 -882 879 -0.1063100137174224 -882 880 6.071532165918825e-17 -882 881 4.336808689942018e-17 -882 882 1.241426611796979 -882 883 0.02407407407407404 -882 884 -3.469446951953614e-18 -882 885 -0.1063100137174218 -882 1285 -0.01296296296296298 -882 1286 0.01342592592592587 -882 1287 -0.1551783264746223 -882 1288 -4.85722573273506e-17 -882 1289 0.02870370370370355 -882 1290 -0.2040466392318223 -882 1291 0.01296296296296301 -882 1292 0.01342592592592598 -882 1293 -0.155178326474623 -883 130 -0.0009703703703703685 -883 131 -0.0004999999999999993 -883 132 -0.008333333333333325 -883 136 -0.0002814814814814866 -883 137 -1.517883041479706e-18 -883 138 1.734723475976807e-18 -883 142 -0.0009703703703703733 -883 143 0.0005000000000000011 -883 144 0.008333333333333326 -883 880 -0.001659259259259265 -883 881 2.168404344971009e-19 -883 882 -0.03333333333333333 -883 883 0.007762962962962967 -883 884 -4.336808689942018e-19 -883 885 -2.081668171172169e-17 -883 886 -0.001659259259259256 -883 887 -6.505213034913027e-19 -883 888 0.03333333333333333 -883 1288 -0.000970370370370368 -883 1289 0.0004999999999999993 -883 1290 -0.008333333333333333 -883 1291 -0.0002814814814814782 -883 1292 1.951563910473908e-18 -883 1293 -2.255140518769849e-17 -883 1294 -0.0009703703703703714 -883 1295 -0.0005000000000000007 -883 1296 0.008333333333333328 -884 130 -0.0004999999999999994 -884 131 -0.001040740740740736 -884 132 -0.00925925925925921 -884 136 -1.192622389734055e-18 -884 137 -0.002362962962962969 -884 138 -0.03703703703703703 -884 142 0.0005000000000000011 -884 143 -0.001040740740740748 -884 144 -0.009259259259259297 -884 880 2.168404344971009e-19 -884 881 0.0002814814814814745 -884 882 2.081668171172169e-17 -884 883 -5.421010862427522e-19 -884 884 0.008325925925925936 -884 885 3.469446951953614e-18 -884 886 -8.673617379884035e-19 -884 887 0.0002814814814814851 -884 888 -3.469446951953614e-18 -884 1288 0.0004999999999999991 -884 1289 -0.001040740740740734 -884 1290 0.00925925925925921 -884 1291 2.059984127722458e-18 -884 1292 -0.002362962962962959 -884 1293 0.03703703703703703 -884 1294 -0.0005000000000000007 -884 1295 -0.001040740740740747 -884 1296 0.009259259259259302 -885 130 -0.01296296296296293 -885 131 -0.01342592592592588 -885 132 -0.1551783264746217 -885 136 -6.765421556309548e-17 -885 137 -0.02870370370370363 -885 138 -0.204046639231825 -885 142 0.012962962962963 -885 143 -0.01342592592592599 -885 144 -0.1551783264746237 -885 880 -0.02407407407407416 -885 881 -1.734723475976807e-18 -885 882 -0.1063100137174218 -885 883 2.393918396847994e-16 -885 884 -2.775557561562891e-17 -885 885 1.241426611796982 -885 886 0.02407407407407393 -885 887 -5.204170427930421e-18 -885 888 -0.1063100137174208 -885 1288 -0.01296296296296292 -885 1289 0.01342592592592585 -885 1290 -0.1551783264746218 -885 1291 -6.245004513516506e-17 -885 1292 0.02870370370370365 -885 1293 -0.2040466392318239 -885 1294 0.01296296296296299 -885 1295 0.01342592592592604 -885 1296 -0.1551783264746237 -886 136 -0.0009703703703703666 -886 137 -0.0004999999999999991 -886 138 -0.008333333333333321 -886 142 -0.0002814814814814873 -886 143 -1.084202172485504e-18 -886 144 8.673617379884035e-18 -886 148 -0.0009703703703703708 -886 149 0.0005000000000000004 -886 150 0.008333333333333338 -886 883 -0.001659259259259256 -886 884 -8.673617379884035e-19 -886 885 -0.03333333333333331 -886 886 0.007762962962962953 -886 887 -1.843143693225358e-18 -886 888 2.081668171172169e-17 -886 889 -0.001659259259259248 -886 890 1.192622389734055e-18 -886 891 0.03333333333333334 -886 1291 -0.0009703703703703688 -886 1292 0.0004999999999999994 -886 1293 -0.008333333333333344 -886 1294 -0.0002814814814814872 -886 1295 1.517883041479706e-18 -886 1296 -1.734723475976807e-17 -886 1297 -0.0009703703703703682 -886 1298 -0.0004999999999999996 -886 1299 0.008333333333333337 -887 136 -0.0004999999999999991 -887 137 -0.001040740740740736 -887 138 -0.009259259259259252 -887 142 -1.192622389734055e-18 -887 143 -0.002362962962962971 -887 144 -0.0370370370370371 -887 148 0.0005000000000000002 -887 149 -0.001040740740740744 -887 150 -0.009259259259259309 -887 883 -6.505213034913027e-19 -887 884 0.0002814814814814849 -887 885 -2.255140518769849e-17 -887 886 -2.059984127722458e-18 -887 887 0.008325925925925922 -887 888 -2.081668171172169e-17 -887 889 1.409462824231156e-18 -887 890 0.0002814814814814906 -887 891 -6.418476861114186e-17 -887 1291 0.0004999999999999995 -887 1292 -0.001040740740740736 -887 1293 0.009259259259259245 -887 1294 1.517883041479706e-18 -887 1295 -0.00236296296296297 -887 1296 0.03703703703703713 -887 1297 -0.0004999999999999996 -887 1298 -0.00104074074074074 -887 1299 0.009259259259259283 -888 136 -0.01296296296296291 -888 137 -0.01342592592592585 -888 138 -0.1551783264746223 -888 142 -7.112366251504909e-17 -888 143 -0.02870370370370389 -888 144 -0.2040466392318257 -888 148 0.01296296296296298 -888 149 -0.01342592592592596 -888 150 -0.1551783264746232 -888 883 -0.02407407407407409 -888 884 -1.040834085586084e-17 -888 885 -0.1063100137174208 -888 886 1.387778780781446e-17 -888 887 3.816391647148976e-17 -888 888 1.241426611796982 -888 889 0.02407407407407411 -888 890 1.734723475976807e-17 -888 891 -0.1063100137174196 -888 1291 -0.01296296296296295 -888 1292 0.01342592592592587 -888 1293 -0.1551783264746227 -888 1294 -2.42861286636753e-17 -888 1295 0.02870370370370387 -888 1296 -0.2040466392318257 -888 1297 0.01296296296296294 -888 1298 0.01342592592592593 -888 1299 -0.1551783264746225 -889 142 -0.0009703703703703686 -889 143 -0.0004999999999999996 -889 144 -0.00833333333333334 -889 148 -0.0002814814814814861 -889 149 -6.505213034913027e-19 -889 150 -8.673617379884035e-18 -889 154 -0.0009703703703703709 -889 155 0.0005000000000000001 -889 156 0.008333333333333335 -889 886 -0.001659259259259248 -889 887 1.301042606982605e-18 -889 888 -0.03333333333333337 -889 889 0.007762962962962963 -889 890 -1.843143693225358e-18 -889 891 -1.734723475976807e-17 -889 892 -0.00165925925925926 -889 893 8.673617379884035e-19 -889 894 0.03333333333333335 -889 1294 -0.0009703703703703708 -889 1295 0.0005000000000000003 -889 1296 -0.00833333333333334 -889 1297 -0.0002814814814814862 -889 1298 -5.421010862427522e-19 -889 1299 -3.469446951953614e-18 -889 1300 -0.0009703703703703702 -889 1301 -0.0004999999999999999 -889 1302 0.008333333333333338 -890 142 -0.0004999999999999996 -890 143 -0.00104074074074074 -890 144 -0.00925925925925929 -890 148 -4.336808689942018e-19 -890 149 -0.002362962962962969 -890 150 -0.03703703703703709 -890 154 0.0005000000000000002 -890 155 -0.001040740740740742 -890 156 -0.009259259259259266 -890 886 1.301042606982605e-18 -890 887 0.0002814814814814906 -890 888 1.214306433183765e-17 -890 889 -2.168404344971009e-18 -890 890 0.008325925925925935 -890 891 3.469446951953614e-17 -890 892 6.505213034913027e-19 -890 893 0.0002814814814814811 -890 894 -3.469446951953614e-17 -890 1294 0.0005000000000000004 -890 1295 -0.001040740740740744 -890 1296 0.009259259259259302 -890 1297 -5.421010862427522e-19 -890 1298 -0.002362962962962969 -890 1299 0.03703703703703713 -890 1300 -0.0004999999999999999 -890 1301 -0.00104074074074074 -890 1302 0.009259259259259255 -891 142 -0.01296296296296295 -891 143 -0.01342592592592591 -891 144 -0.1551783264746227 -891 148 -1.734723475976807e-17 -891 149 -0.02870370370370384 -891 150 -0.2040466392318254 -891 154 0.01296296296296297 -891 155 -0.01342592592592594 -891 156 -0.155178326474623 -891 886 -0.02407407407407409 -891 887 -1.734723475976807e-18 -891 888 -0.1063100137174197 -891 889 2.949029909160572e-17 -891 890 3.122502256758253e-17 -891 891 1.241426611796983 -891 892 0.02407407407407406 -891 893 3.469446951953614e-18 -891 894 -0.1063100137174213 -891 1294 -0.01296296296296299 -891 1295 0.013425925925926 -891 1296 -0.1551783264746231 -891 1297 1.387778780781446e-17 -891 1298 0.02870370370370373 -891 1299 -0.2040466392318253 -891 1300 0.01296296296296297 -891 1301 0.01342592592592593 -891 1302 -0.1551783264746228 -892 148 -0.0009703703703703704 -892 149 -0.0004999999999999999 -892 150 -0.008333333333333335 -892 154 -0.0002814814814814812 -892 155 -6.505213034913027e-19 -892 156 -2.081668171172169e-17 -892 160 -0.0009703703703703698 -892 161 0.0004999999999999998 -892 162 0.008333333333333333 -892 889 -0.00165925925925926 -892 890 6.505213034913027e-19 -892 891 -0.03333333333333333 -892 892 0.007762962962962964 -892 893 1.192622389734055e-18 -892 894 -1.734723475976807e-17 -892 895 -0.001659259259259261 -892 896 -9.75781955236954e-19 -892 897 0.03333333333333335 -892 1297 -0.0009703703703703709 -892 1298 0.0005000000000000001 -892 1299 -0.008333333333333331 -892 1300 -0.0002814814814814774 -892 1301 4.336808689942018e-19 -892 1302 -5.204170427930421e-18 -892 1303 -0.0009703703703703732 -892 1304 -0.0005000000000000007 -892 1305 0.008333333333333335 -893 148 -0.0005 -893 149 -0.00104074074074074 -893 150 -0.009259259259259255 -893 154 -5.421010862427522e-19 -893 155 -0.002362962962962963 -893 156 -0.03703703703703702 -893 160 0.0004999999999999999 -893 161 -0.00104074074074074 -893 162 -0.009259259259259257 -893 889 9.75781955236954e-19 -893 890 0.0002814814814814812 -893 891 3.469446951953614e-18 -893 892 1.084202172485504e-18 -893 893 0.008325925925925924 -893 894 -1.040834085586084e-17 -893 895 -1.192622389734055e-18 -893 896 0.0002814814814814809 -893 897 3.642919299551295e-17 -893 1297 0.0005000000000000001 -893 1298 -0.001040740740740742 -893 1299 0.009259259259259264 -893 1300 4.336808689942018e-19 -893 1301 -0.002362962962962957 -893 1302 0.037037037037037 -893 1303 -0.0005000000000000007 -893 1304 -0.001040740740740744 -893 1305 0.009259259259259259 -894 148 -0.01296296296296296 -894 149 -0.01342592592592591 -894 150 -0.1551783264746228 -894 154 -8.673617379884035e-18 -894 155 -0.02870370370370373 -894 156 -0.2040466392318246 -894 160 0.01296296296296296 -894 161 -0.01342592592592592 -894 162 -0.1551783264746229 -894 889 -0.02407407407407409 -894 890 3.469446951953614e-18 -894 891 -0.1063100137174213 -894 892 2.775557561562891e-17 -894 893 4.163336342344337e-17 -894 894 1.241426611796983 -894 895 0.02407407407407406 -894 896 2.42861286636753e-17 -894 897 -0.1063100137174213 -894 1297 -0.01296296296296297 -894 1298 0.01342592592592595 -894 1299 -0.155178326474623 -894 1300 -1.734723475976807e-17 -894 1301 0.02870370370370361 -894 1302 -0.2040466392318236 -894 1303 0.01296296296296299 -894 1304 0.01342592592592594 -894 1305 -0.155178326474623 -895 154 -0.0009703703703703715 -895 155 -0.0005000000000000002 -895 156 -0.008333333333333342 -895 160 -0.0002814814814814781 -895 161 -7.589415207398531e-19 -895 162 -2.255140518769849e-17 -895 166 -0.0009703703703703687 -895 167 0.0004999999999999996 -895 168 0.008333333333333333 -895 892 -0.001659259259259261 -895 893 -1.192622389734055e-18 -895 894 -0.03333333333333333 -895 895 0.007762962962962965 -895 896 5.312590645178972e-18 -895 897 -6.938893903907228e-18 -895 898 -0.001659259259259259 -895 899 -1.734723475976807e-18 -895 900 0.03333333333333335 -895 1300 -0.0009703703703703688 -895 1301 0.0004999999999999994 -895 1302 -0.008333333333333331 -895 1303 -0.0002814814814814814 -895 1304 8.673617379884035e-19 -895 1305 1.734723475976807e-17 -895 1306 -0.0009703703703703757 -895 1307 -0.0005000000000000014 -895 1308 0.008333333333333347 -896 154 -0.0005000000000000003 -896 155 -0.001040740740740741 -896 156 -0.009259259259259257 -896 160 -7.589415207398531e-19 -896 161 -0.002362962962962959 -896 162 -0.03703703703703702 -896 166 0.0004999999999999997 -896 167 -0.001040740740740739 -896 168 -0.00925925925925925 -896 892 -9.75781955236954e-19 -896 893 0.0002814814814814809 -896 894 -3.469446951953614e-17 -896 895 5.421010862427522e-18 -896 896 0.008325925925925924 -896 897 -1.734723475976807e-17 -896 898 -1.734723475976807e-18 -896 899 0.0002814814814814813 -896 900 6.938893903907228e-17 -896 1300 0.0004999999999999994 -896 1301 -0.001040740740740735 -896 1302 0.009259259259259224 -896 1303 7.589415207398531e-19 -896 1304 -0.002362962962962963 -896 1305 0.03703703703703706 -896 1306 -0.0005000000000000015 -896 1307 -0.00104074074074075 -896 1308 0.009259259259259316 -897 154 -0.01296296296296298 -897 155 -0.01342592592592595 -897 156 -0.1551783264746231 -897 160 1.387778780781446e-17 -897 161 -0.02870370370370372 -897 162 -0.204046639231824 -897 166 0.01296296296296294 -897 167 -0.01342592592592592 -897 168 -0.1551783264746225 -897 892 -0.02407407407407413 -897 893 5.377642775528102e-17 -897 894 -0.1063100137174213 -897 895 1.006139616066548e-16 -897 896 4.163336342344337e-17 -897 897 1.241426611796983 -897 898 0.02407407407407403 -897 899 -5.377642775528102e-17 -897 900 -0.1063100137174212 -897 1300 -0.01296296296296294 -897 1301 0.01342592592592582 -897 1302 -0.1551783264746219 -897 1303 -6.245004513516506e-17 -897 1304 0.02870370370370366 -897 1305 -0.2040466392318244 -897 1306 0.01296296296296303 -897 1307 0.01342592592592606 -897 1308 -0.1551783264746241 -898 160 -0.0009703703703703725 -898 161 -0.0005000000000000006 -898 162 -0.008333333333333344 -898 166 -0.0002814814814814782 -898 167 1.301042606982605e-18 -898 168 2.081668171172169e-17 -898 172 -0.000970370370370373 -898 173 0.0005000000000000003 -898 174 0.008333333333333344 -898 895 -0.001659259259259259 -898 896 -1.734723475976807e-18 -898 897 -0.03333333333333335 -898 898 0.007762962962962963 -898 899 1.626303258728257e-18 -898 901 -0.001659259259259264 -898 902 -1.084202172485504e-18 -898 903 0.03333333333333332 -898 1303 -0.0009703703703703643 -898 1304 0.0004999999999999986 -898 1305 -0.008333333333333323 -898 1306 -0.0002814814814814857 -898 1307 6.505213034913027e-19 -898 1308 3.469446951953614e-18 -898 1309 -0.0009703703703703667 -898 1310 -0.0004999999999999993 -898 1311 0.008333333333333326 -899 160 -0.0005000000000000004 -899 161 -0.001040740740740742 -899 162 -0.00925925925925926 -899 166 1.192622389734055e-18 -899 167 -0.002362962962962959 -899 168 -0.037037037037037 -899 172 0.0005000000000000001 -899 173 -0.001040740740740739 -899 174 -0.009259259259259228 -899 895 -1.734723475976807e-18 -899 896 0.0002814814814814812 -899 897 -5.898059818321144e-17 -899 898 1.626303258728257e-18 -899 899 0.008325925925925922 -899 900 2.42861286636753e-17 -899 901 -8.673617379884035e-19 -899 902 0.0002814814814814771 -899 903 3.295974604355933e-17 -899 1303 0.0004999999999999986 -899 1304 -0.001040740740740734 -899 1305 0.009259259259259259 -899 1306 6.505213034913027e-19 -899 1307 -0.002362962962962969 -899 1308 0.03703703703703715 -899 1309 -0.0004999999999999993 -899 1310 -0.001040740740740738 -899 1311 0.009259259259259276 -900 160 -0.012962962962963 -900 161 -0.01342592592592596 -900 162 -0.1551783264746231 -900 166 5.551115123125783e-17 -900 167 -0.02870370370370361 -900 168 -0.2040466392318234 -900 172 0.01296296296296296 -900 173 -0.0134259259259259 -900 174 -0.1551783264746222 -900 895 -0.02407407407407412 -900 896 6.938893903907228e-18 -900 897 -0.1063100137174213 -900 898 -3.295974604355933e-17 -900 899 -1.370431546021678e-16 -900 900 1.24142661179698 -900 901 0.02407407407407413 -900 902 1.734723475976807e-18 -900 903 -0.1063100137174215 -900 1303 -0.01296296296296289 -900 1304 0.01342592592592585 -900 1305 -0.155178326474622 -900 1306 -1.214306433183765e-17 -900 1307 0.02870370370370388 -900 1308 -0.2040466392318251 -900 1309 0.0129629629629629 -900 1310 0.01342592592592588 -900 1311 -0.1551783264746219 -901 166 -0.0009703703703703688 -901 167 -0.0004999999999999998 -901 168 -0.008333333333333312 -901 172 -0.0002814814814814759 -901 173 1.517883041479706e-18 -901 174 3.469446951953614e-17 -901 178 -0.0009703703703703711 -901 179 0.0005 -901 180 0.008333333333333325 -901 898 -0.001659259259259264 -901 899 -8.673617379884035e-19 -901 900 -0.03333333333333334 -901 901 0.00776296296296297 -901 902 -3.794707603699266e-18 -901 903 -1.387778780781446e-17 -901 904 -0.001659259259259273 -901 905 1.734723475976807e-18 -901 906 0.03333333333333332 -901 1306 -0.0009703703703703734 -901 1307 0.0005000000000000007 -901 1308 -0.008333333333333351 -901 1309 -0.0002814814814814745 -901 1310 -4.336808689942018e-19 -901 1311 -2.42861286636753e-17 -901 1312 -0.0009703703703703692 -901 1313 -0.000499999999999999 -901 1314 0.008333333333333337 -902 166 -0.0004999999999999997 -902 167 -0.001040740740740741 -902 168 -0.009259259259259247 -902 172 1.626303258728257e-18 -902 173 -0.002362962962962955 -902 174 -0.03703703703703692 -902 178 0.0004999999999999999 -902 179 -0.001040740740740739 -902 180 -0.009259259259259212 -902 898 -1.084202172485504e-18 -902 899 0.0002814814814814771 -902 900 3.469446951953614e-17 -902 901 -3.903127820947816e-18 -902 902 0.008325925925925919 -902 903 -4.85722573273506e-17 -902 904 1.734723475976807e-18 -902 905 0.0002814814814814703 -902 906 -5.724587470723463e-17 -902 1306 0.0005000000000000008 -902 1307 -0.001040740740740745 -902 1308 0.009259259259259295 -902 1309 -2.168404344971009e-19 -902 1310 -0.002362962962962954 -902 1311 0.03703703703703695 -902 1312 -0.0004999999999999991 -902 1313 -0.001040740740740732 -902 1314 0.009259259259259175 -903 166 -0.01296296296296292 -903 167 -0.01342592592592591 -903 168 -0.155178326474622 -903 172 2.602085213965211e-17 -903 173 -0.02870370370370356 -903 174 -0.2040466392318224 -903 178 0.01296296296296293 -903 179 -0.01342592592592588 -903 180 -0.1551783264746219 -903 898 -0.02407407407407405 -903 899 -7.806255641895632e-17 -903 900 -0.1063100137174215 -903 901 -9.194034422677078e-17 -903 902 1.387778780781446e-17 -903 903 1.241426611796977 -903 904 0.02407407407407414 -903 905 3.295974604355933e-17 -903 906 -0.1063100137174225 -903 1306 -0.01296296296296299 -903 1307 0.01342592592592598 -903 1308 -0.1551783264746229 -903 1309 4.336808689942018e-17 -903 1310 0.02870370370370363 -903 1311 -0.2040466392318223 -903 1312 0.01296296296296291 -903 1313 0.01342592592592577 -903 1314 -0.1551783264746211 -904 172 -0.0009703703703703711 -904 173 -0.0005 -904 174 -0.008333333333333323 -904 178 -0.000281481481481485 -904 179 -1.734723475976807e-18 -904 180 -2.775557561562891e-17 -904 184 -0.0009703703703703706 -904 185 0.0005000000000000007 -904 186 0.008333333333333325 -904 901 -0.001659259259259273 -904 902 1.626303258728257e-18 -904 903 -0.03333333333333331 -904 904 0.007762962962962967 -904 905 -3.469446951953614e-18 -904 906 -1.040834085586084e-17 -904 907 -0.001659259259259247 -904 908 2.927345865710862e-18 -904 909 0.03333333333333334 -904 1309 -0.0009703703703703746 -904 1310 0.0005000000000000008 -904 1311 -0.008333333333333331 -904 1312 -0.0002814814814814771 -904 1313 -1.084202172485504e-18 -904 1314 -3.469446951953614e-18 -904 1315 -0.0009703703703703685 -904 1316 -0.0004999999999999997 -904 1317 0.008333333333333335 -905 172 -0.0005 -905 173 -0.001040740740740739 -905 174 -0.009259259259259212 -905 178 -1.734723475976807e-18 -905 179 -0.002362962962962967 -905 180 -0.03703703703703706 -905 184 0.0005000000000000006 -905 185 -0.001040740740740748 -905 186 -0.009259259259259325 -905 901 1.734723475976807e-18 -905 902 0.0002814814814814702 -905 903 3.642919299551295e-17 -905 904 -3.577867169202165e-18 -905 905 0.008325925925925935 -905 906 -1.07552855510562e-16 -905 907 3.144186300207963e-18 -905 908 0.0002814814814814902 -905 909 -7.979727989493313e-17 -905 1309 0.0005000000000000008 -905 1310 -0.001040740740740743 -905 1311 0.009259259259259222 -905 1312 -1.301042606982605e-18 -905 1313 -0.002362962962962957 -905 1314 0.03703703703703699 -905 1315 -0.0004999999999999996 -905 1316 -0.00104074074074074 -905 1317 0.009259259259259283 -906 172 -0.01296296296296294 -906 173 -0.01342592592592588 -906 174 -0.1551783264746219 -906 178 -9.194034422677078e-17 -906 179 -0.02870370370370363 -906 180 -0.2040466392318249 -906 184 0.01296296296296301 -906 185 -0.01342592592592605 -906 186 -0.155178326474624 -906 901 -0.02407407407407408 -906 902 2.255140518769849e-17 -906 903 -0.1063100137174225 -906 904 8.673617379884035e-17 -906 905 5.724587470723463e-17 -906 906 1.241426611796982 -906 907 0.02407407407407402 -906 908 1.214306433183765e-17 -906 909 -0.1063100137174199 -906 1309 -0.01296296296296298 -906 1310 0.01342592592592592 -906 1311 -0.1551783264746224 -906 1312 6.938893903907228e-18 -906 1313 0.0287037037037036 -906 1314 -0.2040466392318233 -906 1315 0.01296296296296297 -906 1316 0.01342592592592595 -906 1317 -0.155178326474623 -907 178 -0.0009703703703703678 -907 179 -0.0004999999999999993 -907 180 -0.008333333333333342 -907 184 -0.0002814814814814858 -907 185 -1.084202172485504e-18 -907 186 -8.673617379884035e-18 -907 190 -0.0009703703703703705 -907 191 0.0005 -907 192 0.008333333333333345 -907 904 -0.001659259259259247 -907 905 3.144186300207963e-18 -907 906 -0.03333333333333333 -907 907 0.007762962962962959 -907 908 -8.673617379884035e-19 -907 909 6.938893903907228e-18 -907 910 -0.001659259259259261 -907 911 -1.951563910473908e-18 -907 912 0.03333333333333335 -907 1312 -0.0009703703703703707 -907 1313 0.0005000000000000002 -907 1314 -0.008333333333333333 -907 1315 -0.0002814814814814825 -907 1316 4.336808689942018e-19 -907 1317 5.204170427930421e-18 -907 1318 -0.0009703703703703726 -907 1319 -0.0005000000000000004 -907 1320 0.008333333333333337 -908 178 -0.0004999999999999993 -908 179 -0.001040740740740737 -908 180 -0.009259259259259267 -908 184 -8.673617379884035e-19 -908 185 -0.002362962962962969 -908 186 -0.03703703703703713 -908 190 0.0005 -908 191 -0.00104074074074074 -908 192 -0.009259259259259264 -908 904 2.927345865710862e-18 -908 905 0.0002814814814814902 -908 906 6.591949208711867e-17 -908 907 -9.75781955236954e-19 -908 908 0.008325925925925928 -908 909 4.163336342344337e-17 -908 910 -1.951563910473908e-18 -908 911 0.0002814814814814803 -908 912 5.204170427930421e-17 -908 1312 0.0005000000000000004 -908 1313 -0.001040740740740745 -908 1314 0.009259259259259304 -908 1315 1.084202172485504e-19 -908 1316 -0.002362962962962964 -908 1317 0.03703703703703708 -908 1318 -0.0005000000000000006 -908 1319 -0.001040740740740743 -908 1320 0.009259259259259255 -909 178 -0.01296296296296296 -909 179 -0.01342592592592591 -909 180 -0.155178326474623 -909 184 -1.040834085586084e-17 -909 185 -0.02870370370370388 -909 186 -0.2040466392318257 -909 190 0.01296296296296295 -909 191 -0.01342592592592592 -909 192 -0.1551783264746228 -909 904 -0.02407407407407408 -909 905 2.949029909160572e-17 -909 906 -0.1063100137174199 -909 907 1.734723475976807e-17 -909 908 2.255140518769849e-17 -909 909 1.241426611796984 -909 910 0.02407407407407408 -909 911 2.775557561562891e-17 -909 912 -0.1063100137174213 -909 1312 -0.012962962962963 -909 1313 0.01342592592592601 -909 1314 -0.1551783264746235 -909 1315 2.42861286636753e-17 -909 1316 0.0287037037037037 -909 1317 -0.2040466392318248 -909 1318 0.01296296296296297 -909 1319 0.01342592592592593 -909 1320 -0.1551783264746229 -910 184 -0.0009703703703703701 -910 185 -0.0005000000000000001 -910 186 -0.008333333333333331 -910 190 -0.0002814814814814843 -910 191 1.192622389734055e-18 -910 192 2.42861286636753e-17 -910 196 -0.0009703703703703709 -910 197 0.0005 -910 198 0.008333333333333335 -910 907 -0.001659259259259261 -910 908 -1.951563910473908e-18 -910 909 -0.03333333333333336 -910 910 0.007762962962962954 -910 911 2.168404344971009e-18 -910 912 -3.469446951953614e-18 -910 913 -0.001659259259259246 -910 914 -1.517883041479706e-18 -910 915 0.03333333333333333 -910 1315 -0.0009703703703703697 -910 1316 0.0004999999999999997 -910 1317 -0.008333333333333342 -910 1318 -0.0002814814814814799 -910 1319 1.192622389734055e-18 -910 1320 3.469446951953614e-18 -910 1321 -0.0009703703703703723 -910 1322 -0.0005000000000000007 -910 1323 0.00833333333333334 -911 184 -0.0005000000000000001 -911 185 -0.001040740740740743 -911 186 -0.009259259259259283 -911 190 9.75781955236954e-19 -911 191 -0.002362962962962966 -911 192 -0.03703703703703703 -911 196 0.0005000000000000002 -911 197 -0.001040740740740741 -911 198 -0.009259259259259262 -911 907 -1.951563910473908e-18 -911 908 0.0002814814814814803 -911 909 -3.989863994746656e-17 -911 910 2.168404344971009e-18 -911 911 0.008325925925925921 -911 912 -4.85722573273506e-17 -911 913 -1.626303258728257e-18 -911 914 0.000281481481481495 -911 915 1.561251128379126e-17 -911 1315 0.0004999999999999996 -911 1316 -0.001040740740740737 -911 1317 0.009259259259259228 -911 1318 1.301042606982605e-18 -911 1319 -0.002362962962962961 -911 1320 0.03703703703703699 -911 1321 -0.0005000000000000007 -911 1322 -0.001040740740740746 -911 1323 0.009259259259259299 -912 184 -0.01296296296296297 -912 185 -0.01342592592592597 -912 186 -0.155178326474623 -912 190 1.734723475976807e-18 -912 191 -0.02870370370370381 -912 192 -0.2040466392318249 -912 196 0.01296296296296299 -912 197 -0.01342592592592589 -912 198 -0.1551783264746228 -912 907 -0.02407407407407408 -912 908 1.734723475976807e-17 -912 909 -0.1063100137174213 -912 910 5.204170427930421e-18 -912 911 7.806255641895632e-17 -912 912 1.241426611796982 -912 913 0.02407407407407407 -912 914 -2.255140518769849e-17 -912 915 -0.1063100137174192 -912 1315 -0.01296296296296294 -912 1316 0.01342592592592584 -912 1317 -0.1551783264746222 -912 1318 -9.194034422677078e-17 -912 1319 0.02870370370370377 -912 1320 -0.2040466392318244 -912 1321 0.01296296296296302 -912 1322 0.01342592592592598 -912 1323 -0.1551783264746238 -913 190 -0.0009703703703703694 -913 191 -0.0004999999999999998 -913 192 -0.008333333333333325 -913 196 -0.000281481481481488 -913 197 -1.301042606982605e-18 -913 198 -1.908195823574488e-17 -913 202 -0.0009703703703703704 -913 203 0.0005000000000000004 -913 204 0.008333333333333326 -913 910 -0.001659259259259246 -913 911 -1.517883041479706e-18 -913 912 -0.03333333333333334 -913 913 0.007762962962962963 -913 914 4.87890977618477e-18 -913 916 -0.001659259259259261 -913 917 -2.602085213965211e-18 -913 918 0.03333333333333335 -913 1318 -0.000970370370370368 -913 1319 0.0004999999999999993 -913 1320 -0.008333333333333342 -913 1321 -0.0002814814814814818 -913 1322 2.927345865710862e-18 -913 1323 1.734723475976807e-18 -913 1324 -0.0009703703703703777 -913 1325 -0.0005000000000000022 -913 1326 0.00833333333333334 -914 190 -0.0004999999999999998 -914 191 -0.001040740740740741 -914 192 -0.009259259259259262 -914 196 -1.084202172485504e-18 -914 197 -0.002362962962962971 -914 198 -0.03703703703703706 -914 202 0.0005000000000000003 -914 203 -0.001040740740740745 -914 204 -0.009259259259259295 -914 910 -1.517883041479706e-18 -914 911 0.000281481481481495 -914 912 -5.898059818321144e-17 -914 913 4.87890977618477e-18 -914 914 0.008325925925925938 -914 915 3.469446951953614e-17 -914 916 -2.710505431213761e-18 -914 917 0.0002814814814814779 -914 918 7.459310946700271e-17 -914 1318 0.0004999999999999994 -914 1319 -0.001040740740740737 -914 1320 0.009259259259259262 -914 1321 2.818925648462312e-18 -914 1322 -0.002362962962962963 -914 1323 0.0370370370370371 -914 1324 -0.0005000000000000022 -914 1325 -0.001040740740740755 -914 1326 0.009259259259259314 -915 190 -0.01296296296296297 -915 191 -0.01342592592592587 -915 192 -0.1551783264746227 -915 196 -1.214306433183765e-17 -915 197 -0.02870370370370376 -915 198 -0.2040466392318258 -915 202 0.01296296296296297 -915 203 -0.01342592592592601 -915 204 -0.1551783264746235 -915 910 -0.02407407407407413 -915 911 -3.295974604355933e-17 -915 912 -0.1063100137174192 -915 913 1.908195823574488e-16 -915 914 5.551115123125783e-17 -915 915 1.241426611796985 -915 916 0.02407407407407395 -915 917 -3.469446951953614e-18 -915 918 -0.1063100137174218 -915 1318 -0.01296296296296296 -915 1319 0.01342592592592587 -915 1320 -0.1551783264746228 -915 1321 -1.07552855510562e-16 -915 1322 0.02870370370370362 -915 1323 -0.204046639231825 -915 1324 0.01296296296296306 -915 1325 0.01342592592592615 -915 1326 -0.1551783264746247 -916 196 -0.0009703703703703699 -916 197 -0.0004999999999999998 -916 198 -0.008333333333333342 -916 202 -0.000281481481481481 -916 203 -4.336808689942018e-19 -916 204 -2.775557561562891e-17 -916 208 -0.000970370370370368 -916 209 0.0004999999999999991 -916 210 0.008333333333333344 -916 913 -0.001659259259259261 -916 914 -2.602085213965211e-18 -916 915 -0.03333333333333334 -916 916 0.007762962962962963 -916 917 8.782037597132586e-18 -916 918 -1.040834085586084e-17 -916 919 -0.00165925925925926 -916 920 -4.98732999343332e-18 -916 921 0.03333333333333337 -916 1321 -0.0009703703703703633 -916 1322 0.0004999999999999977 -916 1323 -0.008333333333333342 -916 1324 -0.000281481481481484 -916 1325 3.794707603699266e-18 -916 1326 -5.204170427930421e-18 -916 1327 -0.0009703703703703757 -916 1328 -0.0005000000000000016 -916 1329 0.008333333333333338 -917 196 -0.0004999999999999998 -917 197 -0.001040740740740738 -917 198 -0.009259259259259259 -917 202 -5.421010862427522e-19 -917 203 -0.002362962962962963 -917 204 -0.03703703703703705 -917 208 0.0004999999999999993 -917 209 -0.001040740740740735 -917 210 -0.009259259259259241 -917 913 -2.602085213965211e-18 -917 914 0.0002814814814814779 -917 915 -9.020562075079397e-17 -917 916 8.890457814381136e-18 -917 917 0.008325925925925924 -917 918 8.673617379884035e-17 -917 919 -5.095750210681871e-18 -917 920 0.0002814814814814804 -917 921 9.8879238130678e-17 -917 1321 0.0004999999999999978 -917 1322 -0.001040740740740726 -917 1323 0.009259259259259193 -917 1324 3.686287386450715e-18 -917 1325 -0.002362962962962967 -917 1326 0.03703703703703712 -917 1327 -0.0005000000000000016 -917 1328 -0.001040740740740753 -917 1329 0.009259259259259323 -918 196 -0.01296296296296296 -918 197 -0.01342592592592593 -918 198 -0.1551783264746229 -918 202 -3.469446951953614e-18 -918 203 -0.02870370370370384 -918 204 -0.2040466392318247 -918 208 0.01296296296296294 -918 209 -0.01342592592592583 -918 210 -0.1551783264746223 -918 913 -0.02407407407407418 -918 914 4.85722573273506e-17 -918 915 -0.1063100137174218 -918 916 1.682681771697503e-16 -918 917 1.214306433183765e-17 -918 918 1.241426611796984 -918 919 0.02407407407407402 -918 920 -5.030698080332741e-17 -918 921 -0.1063100137174215 -918 1321 -0.01296296296296288 -918 1322 0.01342592592592576 -918 1323 -0.1551783264746213 -918 1324 -1.52655665885959e-16 -918 1325 0.02870370370370368 -918 1326 -0.2040466392318253 -918 1327 0.01296296296296304 -918 1328 0.01342592592592614 -918 1329 -0.1551783264746246 -919 202 -0.0009703703703703736 -919 203 -0.0005000000000000008 -919 204 -0.008333333333333342 -919 208 -0.0002814814814814771 -919 209 1.843143693225358e-18 -919 210 2.775557561562891e-17 -919 214 -0.0009703703703703718 -919 215 0.0005000000000000002 -919 216 0.008333333333333345 -919 916 -0.00165925925925926 -919 917 -5.095750210681871e-18 -919 918 -0.03333333333333335 -919 919 0.007762962962962961 -919 920 4.336808689942018e-18 -919 921 -1.040834085586084e-17 -919 922 -0.001659259259259261 -919 923 -4.336808689942018e-19 -919 924 0.03333333333333333 -919 1324 -0.0009703703703703642 -919 1325 0.0004999999999999983 -919 1326 -0.008333333333333333 -919 1327 -0.0002814814814814841 -919 1328 1.409462824231156e-18 -919 1329 -1.734723475976807e-18 -919 1330 -0.0009703703703703694 -919 1331 -0.0004999999999999997 -919 1332 0.008333333333333335 -920 202 -0.0005000000000000009 -920 203 -0.001040740740740746 -920 204 -0.009259259259259288 -920 208 1.951563910473908e-18 -920 209 -0.002362962962962958 -920 210 -0.03703703703703702 -920 214 0.0005000000000000001 -920 215 -0.001040740740740739 -920 216 -0.009259259259259234 -920 916 -4.87890977618477e-18 -920 917 0.0002814814814814805 -920 918 -1.769417945496343e-16 -920 919 4.445228907190568e-18 -920 920 0.008325925925925921 -920 921 -7.28583859910259e-17 -920 922 -4.336808689942018e-19 -920 923 0.0002814814814814785 -920 924 -1.734723475976807e-18 -920 1324 0.0004999999999999983 -920 1325 -0.001040740740740731 -920 1326 0.009259259259259231 -920 1327 1.192622389734055e-18 -920 1328 -0.002362962962962967 -920 1329 0.03703703703703708 -920 1330 -0.0004999999999999997 -920 1331 -0.001040740740740739 -920 1332 0.009259259259259248 -921 202 -0.01296296296296301 -921 203 -0.01342592592592598 -921 204 -0.1551783264746236 -921 208 7.979727989493313e-17 -921 209 -0.02870370370370367 -921 210 -0.2040466392318235 -921 214 0.01296296296296295 -921 215 -0.01342592592592592 -921 216 -0.1551783264746222 -921 916 -0.02407407407407412 -921 917 -8.673617379884035e-18 -921 918 -0.1063100137174215 -921 919 -2.255140518769849e-17 -921 920 -6.938893903907228e-18 -921 921 1.241426611796981 -921 922 0.02407407407407412 -921 923 1.734723475976807e-18 -921 924 -0.1063100137174212 -921 1324 -0.01296296296296289 -921 1325 0.01342592592592584 -921 1326 -0.155178326474622 -921 1327 -2.602085213965211e-17 -921 1328 0.02870370370370385 -921 1329 -0.204046639231825 -921 1330 0.01296296296296294 -921 1331 0.0134259259259259 -921 1332 -0.1551783264746222 -922 208 -0.0009703703703703697 -922 209 -0.0005 -922 210 -0.008333333333333323 -922 214 -0.0002814814814814877 -922 215 4.336808689942018e-19 -922 216 2.42861286636753e-17 -922 220 -0.0009703703703703715 -922 221 0.0005000000000000007 -922 222 0.008333333333333326 -922 919 -0.001659259259259261 -922 920 -3.252606517456513e-19 -922 921 -0.03333333333333333 -922 922 0.007762962962962958 -922 923 -3.577867169202165e-18 -922 924 -1.040834085586084e-17 -922 925 -0.001659259259259245 -922 926 2.818925648462312e-18 -922 927 0.03333333333333333 -922 1327 -0.0009703703703703715 -922 1328 0.0005000000000000004 -922 1329 -0.008333333333333333 -922 1330 -0.0002814814814814839 -922 1331 -1.192622389734055e-18 -922 1332 -1.734723475976807e-18 -922 1333 -0.0009703703703703673 -922 1334 -0.0004999999999999993 -922 1335 0.008333333333333335 -923 208 -0.0005 -923 209 -0.001040740740740742 -923 210 -0.009259259259259254 -923 214 4.336808689942018e-19 -923 215 -0.002362962962962971 -923 216 -0.03703703703703706 -923 220 0.0005000000000000007 -923 221 -0.001040740740740747 -923 222 -0.0092592592592593 -923 919 -4.336808689942018e-19 -923 920 0.0002814814814814786 -923 921 -3.469446951953614e-18 -923 922 -3.469446951953614e-18 -923 923 0.008325925925925931 -923 924 -9.71445146547012e-17 -923 925 2.927345865710862e-18 -923 926 0.0002814814814814953 -923 927 -9.540979117872439e-17 -923 1327 0.0005000000000000003 -923 1328 -0.001040740740740743 -923 1329 0.009259259259259267 -923 1330 -1.192622389734055e-18 -923 1331 -0.002362962962962966 -923 1332 0.03703703703703705 -923 1333 -0.0004999999999999991 -923 1334 -0.001040740740740736 -923 1335 0.009259259259259254 -924 208 -0.01296296296296295 -924 209 -0.01342592592592594 -924 210 -0.1551783264746222 -924 214 -2.775557561562891e-17 -924 215 -0.02870370370370375 -924 216 -0.2040466392318251 -924 220 0.012962962962963 -924 221 -0.01342592592592597 -924 222 -0.1551783264746233 -924 919 -0.02407407407407407 -924 920 -3.295974604355933e-17 -924 921 -0.1063100137174212 -924 922 -1.214306433183765e-17 -924 923 6.245004513516506e-17 -924 924 1.241426611796981 -924 925 0.02407407407407406 -924 926 5.204170427930421e-18 -924 927 -0.1063100137174191 -924 1327 -0.01296296296296296 -924 1328 0.01342592592592596 -924 1329 -0.1551783264746227 -924 1330 8.673617379884035e-18 -924 1331 0.02870370370370381 -924 1332 -0.2040466392318249 -924 1333 0.01296296296296295 -924 1334 0.01342592592592586 -924 1335 -0.1551783264746225 -925 214 -0.0009703703703703676 -925 215 -0.0004999999999999994 -925 216 -0.008333333333333326 -925 220 -0.0002814814814814907 -925 221 -3.469446951953614e-18 -925 222 -6.938893903907228e-18 -925 226 -0.0009703703703703785 -925 227 0.0005000000000000027 -925 228 0.008333333333333325 -925 922 -0.001659259259259245 -925 923 3.035766082959412e-18 -925 924 -0.03333333333333331 -925 925 0.007762962962962965 -925 926 -1.626303258728257e-18 -925 927 -1.040834085586084e-17 -925 928 -0.001659259259259245 -925 929 -1.301042606982605e-18 -925 930 0.03333333333333332 -925 1330 -0.000970370370370373 -925 1331 0.0005000000000000009 -925 1332 -0.008333333333333333 -925 1333 -0.0002814814814814828 -925 1334 2.276824562219559e-18 -925 1335 -3.469446951953614e-18 -925 1336 -0.0009703703703703817 -925 1337 -0.0005000000000000032 -925 1338 0.008333333333333335 -926 214 -0.0004999999999999994 -926 215 -0.001040740740740738 -926 216 -0.009259259259259264 -926 220 -3.577867169202165e-18 -926 221 -0.002362962962962975 -926 222 -0.03703703703703711 -926 226 0.0005000000000000027 -926 227 -0.00104074074074076 -926 228 -0.009259259259259368 -926 922 2.818925648462312e-18 -926 923 0.0002814814814814953 -926 924 7.112366251504909e-17 -926 925 -1.409462824231156e-18 -926 926 0.008325925925925957 -926 927 9.020562075079397e-17 -926 928 -1.301042606982605e-18 -926 929 0.000281481481481496 -926 930 -5.204170427930421e-18 -926 1330 0.0005000000000000009 -926 1331 -0.001040740740740747 -926 1332 0.009259259259259302 -926 1333 2.49366499671666e-18 -926 1334 -0.002362962962962964 -926 1335 0.03703703703703711 -926 1336 -0.0005000000000000034 -926 1337 -0.001040740740740763 -926 1338 0.009259259259259342 -927 214 -0.01296296296296294 -927 215 -0.01342592592592586 -927 216 -0.1551783264746223 -927 220 -1.422473250300982e-16 -927 221 -0.02870370370370377 -927 222 -0.2040466392318264 -927 226 0.01296296296296309 -927 227 -0.01342592592592613 -927 228 -0.1551783264746254 -927 922 -0.02407407407407406 -927 923 -1.908195823574488e-17 -927 924 -0.1063100137174191 -927 925 2.654126918244515e-16 -927 926 6.591949208711867e-17 -927 927 1.241426611796986 -927 928 0.0240740740740738 -927 929 4.336808689942018e-17 -927 930 -0.1063100137174191 -927 1330 -0.01296296296296302 -927 1331 0.01342592592592601 -927 1332 -0.1551783264746239 -927 1333 -1.040834085586084e-16 -927 1334 0.02870370370370346 -927 1335 -0.2040466392318249 -927 1336 0.01296296296296312 -927 1337 0.01342592592592621 -927 1338 -0.1551783264746253 -928 220 -0.0009703703703703607 -928 221 -0.0004999999999999974 -928 222 -0.008333333333333325 -928 226 -0.0002814814814814925 -928 227 -4.662069341687669e-18 -928 232 -0.0009703703703703762 -928 233 0.0005000000000000021 -928 234 0.008333333333333325 -928 925 -0.001659259259259245 -928 926 -1.301042606982605e-18 -928 927 -0.03333333333333331 -928 928 0.007762962962962952 -928 929 -8.673617379884035e-19 -928 930 -3.469446951953614e-18 -928 931 -0.001659259259259257 -928 932 2.168404344971009e-18 -928 933 0.03333333333333333 -928 1333 -0.0009703703703703595 -928 1334 0.0004999999999999968 -928 1335 -0.008333333333333331 -928 1336 -0.0002814814814814866 -928 1337 4.228388472693467e-18 -928 1338 -1.734723475976807e-18 -928 1339 -0.0009703703703703727 -928 1340 -0.000500000000000001 -928 1341 0.008333333333333335 -929 220 -0.0004999999999999973 -929 221 -0.001040740740740725 -929 222 -0.009259259259259221 -929 226 -4.553649124439119e-18 -929 227 -0.002362962962962978 -929 228 -0.03703703703703715 -929 232 0.0005000000000000021 -929 233 -0.001040740740740756 -929 234 -0.009259259259259332 -929 925 -1.301042606982605e-18 -929 926 0.000281481481481496 -929 927 -8.153200337090993e-17 -929 928 -8.673617379884035e-19 -929 929 0.008325925925925921 -929 930 -1.561251128379126e-16 -929 931 1.843143693225358e-18 -929 932 0.0002814814814814809 -929 933 1.734723475976807e-18 -929 1333 0.0004999999999999966 -929 1334 -0.001040740740740718 -929 1335 0.009259259259259156 -929 1336 4.336808689942018e-18 -929 1337 -0.00236296296296297 -929 1338 0.03703703703703706 -929 1339 -0.0005000000000000011 -929 1340 -0.001040740740740749 -929 1341 0.009259259259259345 -930 220 -0.01296296296296286 -930 221 -0.01342592592592565 -930 222 -0.1551783264746213 -930 226 -1.561251128379126e-16 -930 227 -0.02870370370370385 -930 228 -0.2040466392318266 -930 232 0.01296296296296302 -930 233 -0.0134259259259262 -930 234 -0.1551783264746243 -930 925 -0.02407407407407431 -930 926 4.85722573273506e-17 -930 927 -0.1063100137174191 -930 928 4.215378046623641e-16 -930 929 -1.734723475976807e-18 -930 930 1.241426611796981 -930 931 0.02407407407407389 -930 932 5.204170427930421e-18 -930 933 -0.106310013717421 -930 1333 -0.01296296296296285 -930 1334 0.01342592592592561 -930 1335 -0.1551783264746202 -930 1336 -1.405126015541214e-16 -930 1337 0.02870370370370401 -930 1338 -0.2040466392318254 -930 1339 0.01296296296296299 -930 1340 0.01342592592592604 -930 1341 -0.1551783264746236 -931 226 -0.0009703703703703629 -931 227 -0.0004999999999999981 -931 228 -0.008333333333333325 -931 232 -0.000281481481481487 -931 233 -4.119968255444917e-18 -931 234 -1.040834085586084e-17 -931 238 -0.0009703703703703748 -931 239 0.0005000000000000015 -931 240 0.008333333333333314 -931 928 -0.001659259259259257 -931 929 1.843143693225358e-18 -931 930 -0.03333333333333331 -931 931 0.007762962962962965 -931 932 -2.38524477946811e-18 -931 933 -1.040834085586084e-17 -931 934 -0.001659259259259251 -931 935 1.951563910473908e-18 -931 936 0.03333333333333333 -931 1336 -0.000970370370370366 -931 1337 0.0004999999999999989 -931 1338 -0.008333333333333333 -931 1339 -0.0002814814814814932 -931 1340 1.626303258728257e-18 -931 1341 3.469446951953614e-18 -931 1342 -0.0009703703703703738 -931 1343 -0.0005000000000000012 -931 1344 0.008333333333333345 -932 226 -0.0004999999999999982 -932 227 -0.00104074074074073 -932 228 -0.009259259259259221 -932 232 -4.119968255444917e-18 -932 233 -0.00236296296296297 -932 234 -0.0370370370370371 -932 238 0.0005000000000000015 -932 239 -0.001040740740740751 -932 240 -0.009259259259259287 -932 928 2.168404344971009e-18 -932 929 0.0002814814814814809 -932 930 1.127570259384925e-16 -932 931 -2.276824562219559e-18 -932 932 0.008325925925925945 -932 933 7.979727989493313e-17 -932 934 1.734723475976807e-18 -932 935 0.000281481481481488 -932 936 -1.387778780781446e-17 -932 1336 0.000499999999999999 -932 1337 -0.001040740740740736 -932 1338 0.00925925925925929 -932 1339 1.734723475976807e-18 -932 1340 -0.002362962962962978 -932 1341 0.03703703703703726 -932 1342 -0.0005000000000000012 -932 1343 -0.00104074074074075 -932 1344 0.009259259259259323 -933 226 -0.01296296296296285 -933 227 -0.01342592592592584 -933 228 -0.1551783264746212 -933 232 -1.838806884535416e-16 -933 233 -0.0287037037037037 -933 234 -0.2040466392318252 -933 238 0.01296296296296302 -933 239 -0.01342592592592606 -933 240 -0.1551783264746237 -933 928 -0.02407407407407415 -933 929 -6.938893903907228e-18 -933 930 -0.106310013717421 -933 931 2.133709875451473e-16 -933 932 -4.510281037539698e-17 -933 933 1.241426611796985 -933 934 0.02407407407407394 -933 935 -7.806255641895632e-17 -933 936 -0.1063100137174201 -933 1336 -0.01296296296296291 -933 1337 0.01342592592592586 -933 1338 -0.1551783264746221 -933 1339 -1.214306433183765e-16 -933 1340 0.0287037037037038 -933 1341 -0.2040466392318269 -933 1342 0.01296296296296304 -933 1343 0.01342592592592608 -933 1344 -0.1551783264746244 -934 232 -0.0009703703703703661 -934 233 -0.0004999999999999986 -934 234 -0.008333333333333325 -934 238 -0.0002814814814814853 -934 239 -5.963111948670274e-18 -934 240 -3.469446951953614e-17 -934 244 -0.0009703703703703782 -934 245 0.0005000000000000026 -934 246 0.008333333333333314 -934 931 -0.001659259259259251 -934 932 1.734723475976807e-18 -934 933 -0.03333333333333331 -934 934 0.007762962962962972 -934 935 -3.252606517456513e-18 -934 936 -6.938893903907228e-18 -934 937 -0.001659259259259273 -934 938 4.553649124439119e-18 -934 939 0.03333333333333333 -934 1339 -0.0009703703703703654 -934 1340 0.0004999999999999988 -934 1341 -0.008333333333333333 -934 1342 -0.0002814814814814779 -934 1343 1.192622389734055e-18 -934 1344 1.734723475976807e-17 -934 1345 -0.0009703703703703762 -934 1346 -0.0005000000000000013 -934 1347 0.008333333333333345 -935 232 -0.0004999999999999986 -935 233 -0.001040740740740731 -935 234 -0.009259259259259195 -935 238 -5.963111948670274e-18 -935 239 -0.002362962962962967 -935 240 -0.03703703703703706 -935 244 0.0005000000000000025 -935 245 -0.00104074074074076 -935 246 -0.009259259259259339 -935 931 1.843143693225358e-18 -935 932 0.000281481481481488 -935 933 5.898059818321144e-17 -935 934 -3.252606517456513e-18 -935 935 0.008325925925925941 -935 936 -4.510281037539698e-17 -935 937 4.662069341687669e-18 -935 938 0.0002814814814814688 -935 939 -1.162264728904461e-16 -935 1339 0.0004999999999999988 -935 1340 -0.001040740740740735 -935 1341 0.009259259259259269 -935 1342 1.192622389734055e-18 -935 1343 -0.002362962962962959 -935 1344 0.03703703703703706 -935 1345 -0.0005000000000000012 -935 1346 -0.001040740740740746 -935 1347 0.009259259259259245 -936 232 -0.01296296296296292 -936 233 -0.01342592592592577 -936 234 -0.1551783264746214 -936 238 -1.647987302177967e-16 -936 239 -0.0287037037037035 -936 240 -0.2040466392318248 -936 244 0.01296296296296305 -936 245 -0.0134259259259262 -936 246 -0.1551783264746247 -936 931 -0.02407407407407418 -936 932 -6.418476861114186e-17 -936 933 -0.1063100137174201 -936 934 2.931682674400804e-16 -936 935 -3.989863994746656e-17 -936 936 1.241426611796984 -936 937 0.02407407407407389 -936 938 3.122502256758253e-17 -936 939 -0.1063100137174229 -936 1339 -0.01296296296296293 -936 1340 0.01342592592592589 -936 1341 -0.1551783264746226 -936 1342 -4.510281037539698e-17 -936 1343 0.02870370370370365 -936 1344 -0.2040466392318239 -936 1345 0.01296296296296301 -936 1346 0.013425925925926 -936 1347 -0.1551783264746231 -937 238 -0.0009703703703703623 -937 239 -0.0004999999999999974 -937 240 -0.008333333333333333 -937 244 -0.0002814814814814719 -937 245 -4.98732999343332e-18 -937 246 -2.775557561562891e-17 -937 250 -0.0009703703703703764 -937 251 0.0005000000000000013 -937 252 0.008333333333333331 -937 934 -0.001659259259259273 -937 935 4.662069341687669e-18 -937 936 -0.03333333333333331 -937 937 0.007762962962962962 -937 938 -8.131516293641283e-18 -937 940 -0.001659259259259279 -937 941 5.312590645178972e-18 -937 942 0.03333333333333333 -937 1342 -0.0009703703703703671 -937 1343 0.0004999999999999988 -937 1344 -0.008333333333333333 -937 1345 -0.0002814814814814667 -937 1346 -8.673617379884035e-19 -937 1347 1.040834085586084e-17 -937 1348 -0.0009703703703703674 -937 1349 -0.0004999999999999986 -937 1350 0.008333333333333333 -938 238 -0.0004999999999999973 -938 239 -0.001040740740740722 -938 240 -0.009259259259259172 -938 244 -4.98732999343332e-18 -938 245 -0.002362962962962951 -938 246 -0.03703703703703692 -938 250 0.0005000000000000013 -938 251 -0.001040740740740747 -938 252 -0.009259259259259243 -938 934 4.662069341687669e-18 -938 935 0.0002814814814814688 -938 936 1.07552855510562e-16 -938 937 -8.239936510889834e-18 -938 938 0.008325925925925889 -938 939 -9.020562075079397e-17 -938 940 5.095750210681871e-18 -938 941 0.0002814814814814645 -938 942 -1.387778780781446e-16 -938 1342 0.0004999999999999987 -938 1343 -0.001040740740740731 -938 1344 0.009259259259259191 -938 1345 -7.589415207398531e-19 -938 1346 -0.002362962962962943 -938 1347 0.03703703703703677 -938 1348 -0.0004999999999999986 -938 1349 -0.001040740740740729 -938 1350 0.009259259259259156 -939 238 -0.01296296296296283 -939 239 -0.0134259259259257 -939 240 -0.1551783264746206 -939 244 -1.925543058334256e-16 -939 245 -0.02870370370370361 -939 246 -0.2040466392318222 -939 250 0.012962962962963 -939 251 -0.01342592592592599 -939 252 -0.155178326474623 -939 934 -0.02407407407407423 -939 935 6.418476861114186e-17 -939 936 -0.1063100137174229 -939 937 1.335737076502141e-16 -939 938 -2.081668171172169e-17 -939 939 1.241426611796976 -939 940 0.02407407407407411 -939 941 1.214306433183765e-17 -939 942 -0.1063100137174235 -939 1342 -0.0129629629629629 -939 1343 0.0134259259259258 -939 1344 -0.1551783264746213 -939 1345 2.42861286636753e-17 -939 1346 0.02870370370370368 -939 1347 -0.204046639231821 -939 1348 0.01296296296296289 -939 1349 0.01342592592592576 -939 1350 -0.155178326474621 -940 244 -0.0009703703703703674 -940 245 -0.0004999999999999986 -940 246 -0.008333333333333331 -940 250 -0.0002814814814814697 -940 251 -3.252606517456513e-19 -940 252 2.081668171172169e-17 -940 256 -0.0009703703703703721 -940 257 0.0005000000000000001 -940 258 0.008333333333333344 -940 937 -0.001659259259259279 -940 938 5.095750210681871e-18 -940 939 -0.03333333333333333 -940 940 0.00776296296296297 -940 941 -5.204170427930421e-18 -940 942 1.040834085586084e-17 -940 943 -0.001659259259259267 -940 944 -2.38524477946811e-18 -940 945 0.03333333333333333 -940 1345 -0.0009703703703703762 -940 1346 0.0005000000000000013 -940 1347 -0.008333333333333333 -940 1348 -0.0002814814814814682 -940 1350 -1.214306433183765e-17 -940 1351 -0.0009703703703703702 -940 1352 -0.0005000000000000001 -940 1353 0.008333333333333326 -941 244 -0.0004999999999999987 -941 245 -0.001040740740740729 -941 246 -0.009259259259259169 -941 250 -2.168404344971009e-19 -941 251 -0.002362962962962947 -941 252 -0.03703703703703685 -941 256 0.0004999999999999999 -941 257 -0.001040740740740739 -941 258 -0.009259259259259228 -941 937 5.312590645178972e-18 -941 938 0.0002814814814814644 -941 939 1.578598363138894e-16 -941 940 -5.204170427930421e-18 -941 941 0.008325925925925907 -941 942 2.081668171172169e-16 -941 943 -1.951563910473908e-18 -941 944 0.0002814814814814746 -941 945 6.765421556309548e-17 -941 1345 0.0005000000000000013 -941 1346 -0.001040740740740747 -941 1347 0.009259259259259231 -941 1348 -3.252606517456513e-19 -941 1349 -0.002362962962962945 -941 1350 0.03703703703703688 -941 1351 -0.0005 -941 1352 -0.001040740740740741 -941 1353 0.009259259259259248 -942 244 -0.01296296296296289 -942 245 -0.01342592592592575 -942 246 -0.155178326474621 -942 250 -3.989863994746656e-17 -942 251 -0.02870370370370362 -942 252 -0.2040466392318215 -942 256 0.01296296296296296 -942 257 -0.0134259259259259 -942 258 -0.1551783264746222 -942 937 -0.02407407407407411 -942 938 -2.255140518769849e-17 -942 939 -0.1063100137174235 -942 940 -1.387778780781446e-17 -942 941 -6.591949208711867e-17 -942 942 1.241426611796977 -942 943 0.02407407407407413 -942 944 2.602085213965211e-17 -942 945 -0.1063100137174219 -942 1345 -0.012962962962963 -942 1346 0.013425925925926 -942 1347 -0.1551783264746231 -942 1348 3.642919299551295e-17 -942 1349 0.02870370370370344 -942 1350 -0.2040466392318212 -942 1351 0.01296296296296293 -942 1352 0.0134259259259259 -942 1353 -0.1551783264746221 -943 250 -0.0009703703703703695 -943 251 -0.0004999999999999999 -943 252 -0.008333333333333321 -943 256 -0.0002814814814814848 -943 257 2.602085213965211e-18 -943 258 2.081668171172169e-17 -943 262 -0.0009703703703703649 -943 263 0.0004999999999999986 -943 264 0.008333333333333333 -943 940 -0.001659259259259267 -943 941 -1.951563910473908e-18 -943 942 -0.03333333333333335 -943 943 0.007762962962962961 -943 944 4.87890977618477e-18 -943 945 -6.938893903907228e-18 -943 946 -0.001659259259259245 -943 947 -5.312590645178972e-18 -943 948 0.03333333333333334 -943 1348 -0.0009703703703703725 -943 1349 0.0005000000000000002 -943 1350 -0.008333333333333351 -943 1351 -0.0002814814814814838 -943 1352 2.276824562219559e-18 -943 1353 -2.42861286636753e-17 -943 1354 -0.0009703703703703738 -943 1355 -0.0005000000000000013 -943 1356 0.008333333333333337 -944 250 -0.0004999999999999998 -944 251 -0.001040740740740741 -944 252 -0.009259259259259247 -944 256 2.602085213965211e-18 -944 257 -0.002362962962962967 -944 258 -0.03703703703703706 -944 262 0.0004999999999999986 -944 263 -0.001040740740740734 -944 264 -0.009259259259259264 -944 940 -2.38524477946811e-18 -944 941 0.0002814814814814746 -944 942 -5.204170427930421e-18 -944 943 4.77048955893622e-18 -944 944 0.008325925925925929 -944 945 1.110223024625157e-16 -944 946 -5.312590645178972e-18 -944 947 0.0002814814814814938 -944 948 1.474514954580286e-16 -944 1348 0.0005000000000000002 -944 1349 -0.001040740740740739 -944 1350 0.009259259259259228 -944 1351 2.602085213965211e-18 -944 1352 -0.002362962962962966 -944 1353 0.03703703703703709 -944 1354 -0.0005000000000000013 -944 1355 -0.001040740740740752 -944 1356 0.009259259259259339 -945 250 -0.01296296296296293 -945 251 -0.01342592592592593 -945 252 -0.1551783264746222 -945 256 3.295974604355933e-17 -945 257 -0.02870370370370382 -945 258 -0.204046639231825 -945 262 0.01296296296296293 -945 263 -0.01342592592592585 -945 264 -0.1551783264746225 -945 940 -0.0240740740740741 -945 941 -2.775557561562891e-17 -945 942 -0.1063100137174219 -945 943 7.979727989493313e-17 -945 944 1.040834085586084e-17 -945 945 1.241426611796983 -945 946 0.02407407407407403 -945 947 -1.908195823574488e-17 -945 948 -0.1063100137174195 -945 1348 -0.01296296296296297 -945 1349 0.01342592592592587 -945 1350 -0.1551783264746221 -945 1351 -1.07552855510562e-16 -945 1352 0.02870370370370367 -945 1353 -0.2040466392318249 -945 1354 0.01296296296296304 -945 1355 0.01342592592592609 -945 1356 -0.1551783264746245 -946 256 -0.0009703703703703738 -946 257 -0.0005000000000000013 -946 258 -0.008333333333333331 -946 262 -0.0002814814814814775 -946 263 1.734723475976807e-18 -946 264 2.255140518769849e-17 -946 268 -0.000970370370370373 -946 269 0.0005000000000000002 -946 270 0.008333333333333338 -946 943 -0.001659259259259244 -946 944 -5.312590645178972e-18 -946 945 -0.03333333333333333 -946 946 0.007762962962962964 -946 947 4.87890977618477e-18 -946 948 6.938893903907228e-18 -946 949 -0.00165925925925928 -946 950 -2.168404344971009e-19 -946 951 0.03333333333333333 -946 1351 -0.0009703703703703651 -946 1352 0.0004999999999999986 -946 1353 -0.008333333333333331 -946 1354 -0.0002814814814814783 -946 1355 1.301042606982605e-18 -946 1356 -3.469446951953614e-18 -946 1357 -0.0009703703703703718 -946 1358 -0.0004999999999999999 -946 1359 0.008333333333333335 -947 256 -0.0005000000000000013 -947 257 -0.001040740740740752 -947 258 -0.009259259259259339 -947 262 1.843143693225358e-18 -947 263 -0.002362962962962958 -947 264 -0.03703703703703707 -947 268 0.0005000000000000001 -947 269 -0.001040740740740739 -947 270 -0.009259259259259184 -947 943 -5.312590645178972e-18 -947 944 0.0002814814814814938 -947 945 -1.474514954580286e-16 -947 946 4.87890977618477e-18 -947 947 0.008325925925925921 -947 948 -2.116362640691705e-16 -947 949 -2.168404344971009e-19 -947 950 0.000281481481481464 -947 951 9.540979117872439e-17 -947 1351 0.0004999999999999986 -947 1352 -0.001040740740740734 -947 1353 0.009259259259259262 -947 1354 1.301042606982605e-18 -947 1355 -0.002362962962962959 -947 1356 0.03703703703703692 -947 1357 -0.0005 -947 1358 -0.001040740740740738 -947 1359 0.009259259259259214 -948 256 -0.01296296296296304 -948 257 -0.01342592592592608 -948 258 -0.1551783264746245 -948 262 9.020562075079397e-17 -948 263 -0.02870370370370344 -948 264 -0.2040466392318237 -948 268 0.01296296296296296 -948 269 -0.01342592592592595 -948 270 -0.1551783264746222 -948 943 -0.02407407407407404 -948 944 1.561251128379126e-17 -948 945 -0.1063100137174195 -948 946 -7.979727989493313e-17 -948 947 -6.071532165918825e-17 -948 948 1.241426611796982 -948 949 0.02407407407407411 -948 950 1.040834085586084e-17 -948 951 -0.1063100137174236 -948 1351 -0.01296296296296293 -948 1352 0.01342592592592585 -948 1353 -0.1551783264746225 -948 1354 -1.387778780781446e-17 -948 1355 0.02870370370370386 -948 1356 -0.2040466392318239 -948 1357 0.01296296296296295 -948 1358 0.01342592592592581 -948 1359 -0.1551783264746221 -949 262 -0.0009703703703703708 -949 263 -0.0004999999999999998 -949 264 -0.00833333333333333 -949 268 -0.0002814814814814871 -949 269 7.589415207398531e-19 -949 270 8.673617379884035e-18 -949 274 -0.0009703703703703667 -949 275 0.0004999999999999996 -949 276 0.008333333333333325 -949 946 -0.00165925925925928 -949 947 -3.252606517456513e-19 -949 948 -0.03333333333333334 -949 949 0.007762962962962961 -949 950 9.75781955236954e-19 -949 951 -1.387778780781446e-17 -949 952 -0.001659259259259231 -949 953 -1.192622389734055e-18 -949 954 0.03333333333333333 -949 1354 -0.0009703703703703718 -949 1355 0.0004999999999999999 -949 1356 -0.008333333333333333 -949 1357 -0.0002814814814814836 -949 1358 3.252606517456513e-19 -949 1359 -3.469446951953614e-18 -949 1360 -0.0009703703703703695 -949 1361 -0.0005000000000000002 -949 1362 0.008333333333333335 -950 262 -0.0004999999999999998 -950 263 -0.001040740740740737 -950 264 -0.009259259259259184 -950 268 7.589415207398531e-19 -950 269 -0.00236296296296297 -950 270 -0.0370370370370371 -950 274 0.0004999999999999996 -950 275 -0.001040740740740742 -950 276 -0.009259259259259321 -950 946 -3.252606517456513e-19 -950 947 0.0002814814814814641 -950 948 9.71445146547012e-17 -950 949 8.673617379884035e-19 -950 950 0.008325925925925931 -950 951 -4.163336342344337e-17 -950 952 -1.301042606982605e-18 -950 953 0.0002814814814815056 -950 954 5.898059818321144e-17 -950 1354 0.0005 -950 1355 -0.001040740740740738 -950 1356 0.009259259259259215 -950 1357 4.336808689942018e-19 -950 1358 -0.002362962962962965 -950 1359 0.03703703703703703 -950 1360 -0.0005000000000000002 -950 1361 -0.001040740740740747 -950 1362 0.009259259259259352 -951 262 -0.01296296296296293 -951 263 -0.01342592592592593 -951 264 -0.1551783264746218 -951 268 -1.561251128379126e-17 -951 269 -0.0287037037037037 -951 270 -0.2040466392318253 -951 274 0.01296296296296296 -951 275 -0.01342592592592597 -951 276 -0.1551783264746232 -951 946 -0.02407407407407412 -951 947 -5.204170427930421e-18 -951 948 -0.1063100137174236 -951 949 9.194034422677078e-17 -951 950 -1.387778780781446e-17 -951 951 1.241426611796982 -951 952 0.02407407407407401 -951 953 -6.938893903907228e-18 -951 954 -0.1063100137174175 -951 1354 -0.01296296296296295 -951 1355 0.01342592592592581 -951 1356 -0.1551783264746221 -951 1357 -4.510281037539698e-17 -951 1358 0.02870370370370381 -951 1359 -0.2040466392318248 -951 1360 0.01296296296296299 -951 1361 0.013425925925926 -951 1362 -0.1551783264746238 -952 268 -0.0009703703703703696 -952 269 -0.0005000000000000003 -952 270 -0.008333333333333325 -952 274 -0.0002814814814814815 -952 275 6.505213034913027e-19 -952 276 -5.204170427930421e-18 -952 280 -0.0009703703703703718 -952 281 0.0004999999999999996 -952 282 0.008333333333333326 -952 949 -0.001659259259259231 -952 950 -1.301042606982605e-18 -952 951 -0.03333333333333331 -952 952 0.007762962962962963 -952 953 2.602085213965211e-18 -952 954 -1.040834085586084e-17 -952 955 -0.00165925925925929 -952 956 -1.192622389734055e-18 -952 957 0.03333333333333333 -952 1357 -0.0009703703703703671 -952 1358 0.0004999999999999996 -952 1359 -0.008333333333333331 -952 1360 -0.0002814814814814785 -952 1361 8.673617379884035e-19 -952 1362 -3.469446951953614e-18 -952 1363 -0.0009703703703703738 -952 1364 -0.0005000000000000004 -952 1365 0.008333333333333335 -953 268 -0.0005000000000000003 -953 269 -0.001040740740740747 -953 270 -0.009259259259259342 -953 274 7.589415207398531e-19 -953 275 -0.002362962962962963 -953 276 -0.037037037037037 -953 280 0.0004999999999999997 -953 281 -0.001040740740740735 -953 282 -0.009259259259259175 -953 949 -1.192622389734055e-18 -953 950 0.0002814814814815055 -953 951 -1.561251128379126e-17 -953 952 2.602085213965211e-18 -953 953 0.008325925925925924 -953 954 6.591949208711867e-17 -953 955 -1.301042606982605e-18 -953 956 0.000281481481481455 -953 957 -1.561251128379126e-17 -953 1357 0.0004999999999999996 -953 1358 -0.001040740740740742 -953 1359 0.009259259259259333 -953 1360 6.505213034913027e-19 -953 1361 -0.002362962962962959 -953 1362 0.037037037037037 -953 1363 -0.0005000000000000003 -953 1364 -0.001040740740740738 -953 1365 0.009259259259259151 -954 268 -0.01296296296296299 -954 269 -0.01342592592592603 -954 270 -0.1551783264746238 -954 274 7.112366251504909e-17 -954 275 -0.02870370370370369 -954 276 -0.2040466392318243 -954 280 0.01296296296296292 -954 281 -0.01342592592592577 -954 282 -0.1551783264746216 -954 949 -0.02407407407407403 -954 951 -0.1063100137174175 -954 952 -5.724587470723463e-17 -954 953 -1.387778780781446e-17 -954 954 1.241426611796982 -954 955 0.02407407407407408 -954 956 -2.255140518769849e-17 -954 957 -0.1063100137174251 -954 1357 -0.01296296296296297 -954 1358 0.01342592592592594 -954 1359 -0.1551783264746233 -954 1360 6.938893903907228e-18 -954 1361 0.02870370370370364 -954 1362 -0.2040466392318239 -954 1363 0.01296296296296296 -954 1364 0.01342592592592594 -954 1365 -0.1551783264746223 -955 274 -0.0009703703703703737 -955 275 -0.0005000000000000003 -955 276 -0.008333333333333325 -955 280 -0.0002814814814814796 -955 281 3.252606517456513e-19 -955 282 -2.949029909160572e-17 -955 286 -0.0009703703703703645 -955 287 0.0004999999999999989 -955 288 0.008333333333333325 -955 952 -0.00165925925925929 -955 953 -1.409462824231156e-18 -955 954 -0.03333333333333331 -955 955 0.007762962962962969 -955 956 7.480994990149981e-18 -955 957 -1.387778780781446e-17 -955 958 -0.001659259259259239 -955 959 -4.87890977618477e-18 -955 960 0.03333333333333334 -955 1360 -0.0009703703703703717 -955 1361 0.0004999999999999996 -955 1362 -0.008333333333333331 -955 1363 -0.0002814814814814742 -955 1364 2.38524477946811e-18 -955 1365 -1.734723475976807e-18 -955 1366 -0.0009703703703703759 -955 1367 -0.000500000000000002 -955 1368 0.008333333333333335 -956 274 -0.0005000000000000004 -956 275 -0.001040740740740739 -956 276 -0.009259259259259193 -956 280 2.168404344971009e-19 -956 281 -0.00236296296296296 -956 282 -0.03703703703703698 -956 286 0.0004999999999999988 -956 287 -0.001040740740740738 -956 288 -0.0092592592592593 -956 952 -1.192622389734055e-18 -956 953 0.0002814814814814549 -956 954 -9.194034422677078e-17 -956 955 7.37257477290143e-18 -956 956 0.008325925925925922 -956 957 1.283695372222837e-16 -956 958 -4.87890977618477e-18 -956 959 0.0002814814814815021 -956 960 2.411265631607762e-16 -956 1360 0.0004999999999999996 -956 1361 -0.001040740740740734 -956 1362 0.009259259259259134 -956 1363 2.276824562219559e-18 -956 1364 -0.002362962962962953 -956 1365 0.03703703703703695 -956 1366 -0.0005000000000000021 -956 1367 -0.001040740740740756 -956 1368 0.009259259259259392 -957 274 -0.01296296296296295 -957 275 -0.01342592592592583 -957 276 -0.1551783264746221 -957 280 -6.938893903907228e-18 -957 281 -0.02870370370370363 -957 282 -0.2040466392318239 -957 286 0.01296296296296294 -957 287 -0.01342592592592593 -957 288 -0.1551783264746228 -957 952 -0.0240740740740741 -957 953 -1.561251128379126e-17 -957 954 -0.1063100137174251 -957 955 1.07552855510562e-16 -957 956 -5.898059818321144e-17 -957 957 1.241426611796981 -957 958 0.02407407407407402 -957 959 1.040834085586084e-17 -957 960 -0.1063100137174182 -957 1360 -0.01296296296296293 -957 1361 0.01342592592592588 -957 1362 -0.1551783264746218 -957 1363 -1.318389841742373e-16 -957 1364 0.02870370370370352 -957 1365 -0.2040466392318228 -957 1366 0.01296296296296306 -957 1367 0.01342592592592605 -957 1368 -0.1551783264746244 -958 280 -0.0009703703703703728 -958 281 -0.000500000000000001 -958 282 -0.008333333333333342 -958 286 -0.0002814814814814834 -958 287 -6.505213034913027e-19 -958 288 -3.469446951953614e-17 -958 292 -0.00097037037037037 -958 293 0.0004999999999999998 -958 294 0.008333333333333333 -958 955 -0.001659259259259239 -958 956 -4.87890977618477e-18 -958 957 -0.03333333333333332 -958 958 0.007762962962962963 -958 959 1.008308020411519e-17 -958 960 -6.938893903907228e-18 -958 961 -0.001659259259259267 -958 962 -2.927345865710862e-18 -958 963 0.03333333333333335 -958 1363 -0.0009703703703703627 -958 1364 0.000499999999999998 -958 1365 -0.008333333333333333 -958 1366 -0.0002814814814814919 -958 1367 3.252606517456513e-18 -958 1368 3.469446951953614e-18 -958 1369 -0.0009703703703703766 -958 1370 -0.0005000000000000019 -958 1371 0.008333333333333345 -959 280 -0.000500000000000001 -959 281 -0.001040740740740749 -959 282 -0.009259259259259339 -959 286 -2.168404344971009e-19 -959 287 -0.002362962962962966 -959 288 -0.03703703703703717 -959 292 0.0004999999999999999 -959 293 -0.001040740740740739 -959 294 -0.009259259259259243 -959 955 -4.87890977618477e-18 -959 956 0.0002814814814815021 -959 957 -5.551115123125783e-17 -959 958 1.008308020411519e-17 -959 959 0.008325925925925938 -959 960 -6.938893903907228e-18 -959 961 -3.035766082959412e-18 -959 962 0.0002814814814814745 -959 963 1.006139616066548e-16 -959 1363 0.0004999999999999981 -959 1364 -0.00104074074074073 -959 1365 0.009259259259259281 -959 1366 3.361026734705064e-18 -959 1367 -0.002362962962962976 -959 1368 0.03703703703703717 -959 1369 -0.000500000000000002 -959 1370 -0.001040740740740753 -959 1371 0.009259259259259323 -960 280 -0.01296296296296303 -960 281 -0.01342592592592608 -960 282 -0.1551783264746243 -960 286 5.898059818321144e-17 -960 287 -0.02870370370370366 -960 288 -0.2040466392318248 -960 292 0.01296296296296293 -960 293 -0.01342592592592589 -960 294 -0.155178326474622 -960 955 -0.02407407407407413 -960 956 7.632783294297951e-17 -960 957 -0.1063100137174182 -960 958 1.266348137463069e-16 -960 959 -1.196959198423997e-16 -960 960 1.241426611796983 -960 961 0.02407407407407403 -960 962 -8.500145032286355e-17 -960 963 -0.106310013717422 -960 1363 -0.0129629629629629 -960 1364 0.01342592592592569 -960 1365 -0.1551783264746213 -960 1366 -1.179611963664229e-16 -960 1367 0.02870370370370394 -960 1368 -0.2040466392318263 -960 1369 0.01296296296296304 -960 1370 0.01342592592592613 -960 1371 -0.1551783264746243 -961 286 -0.0009703703703703725 -961 287 -0.0005000000000000003 -961 288 -0.008333333333333344 -961 292 -0.0002814814814814642 -961 294 1.040834085586084e-17 -961 298 -0.000970370370370376 -961 299 0.0005000000000000008 -961 300 0.008333333333333344 -961 958 -0.001659259259259266 -961 959 -3.035766082959412e-18 -961 960 -0.03333333333333335 -961 961 0.007762962962962972 -961 962 1.843143693225358e-18 -961 964 -0.001659259259259294 -961 965 7.589415207398531e-19 -961 966 0.03333333333333334 -961 1366 -0.0009703703703703635 -961 1367 0.0004999999999999982 -961 1368 -0.008333333333333335 -961 1369 -0.0002814814814814658 -961 1370 1.192622389734055e-18 -961 1371 3.469446951953614e-18 -961 1372 -0.000970370370370371 -961 1373 -0.0004999999999999995 -961 1374 0.008333333333333338 -962 286 -0.0005000000000000003 -962 287 -0.00104074074074074 -962 288 -0.009259259259259243 -962 292 -1.084202172485504e-19 -962 293 -0.00236296296296294 -962 294 -0.03703703703703683 -962 298 0.0005000000000000008 -962 299 -0.00104074074074074 -962 300 -0.009259259259259182 -962 958 -2.927345865710862e-18 -962 959 0.0002814814814814746 -962 960 -8.326672684688674e-17 -962 961 1.734723475976807e-18 -962 962 0.0083259259259259 -962 963 2.42861286636753e-17 -962 964 7.589415207398531e-19 -962 965 0.0002814814814814521 -962 966 -4.85722573273506e-17 -962 1366 0.0004999999999999983 -962 1367 -0.00104074074074073 -962 1368 0.009259259259259233 -962 1369 1.301042606982605e-18 -962 1370 -0.002362962962962943 -962 1371 0.03703703703703687 -962 1372 -0.0004999999999999995 -962 1373 -0.001040740740740733 -962 1374 0.009259259259259143 -963 286 -0.01296296296296297 -963 287 -0.0134259259259259 -963 288 -0.1551783264746223 -963 292 -1.040834085586084e-17 -963 293 -0.02870370370370338 -963 294 -0.2040466392318206 -963 298 0.01296296296296299 -963 299 -0.01342592592592589 -963 300 -0.1551783264746227 -963 958 -0.02407407407407417 -963 959 -4.163336342344337e-17 -963 960 -0.106310013717422 -963 961 2.949029909160572e-17 -963 962 -1.387778780781446e-16 -963 963 1.241426611796978 -963 964 0.02407407407407413 -963 965 1.908195823574488e-17 -963 966 -0.1063100137174257 -963 1366 -0.01296296296296286 -963 1367 0.01342592592592582 -963 1368 -0.1551783264746215 -963 1369 -5.898059818321144e-17 -963 1370 0.02870370370370366 -963 1371 -0.2040466392318213 -963 1372 0.01296296296296292 -963 1373 0.01342592592592584 -963 1374 -0.1551783264746216 -964 292 -0.0009703703703703696 -964 293 -0.0004999999999999991 -964 294 -0.008333333333333321 -964 298 -0.000281481481481471 -964 300 3.469446951953614e-17 -964 304 -0.0009703703703703731 -964 305 0.0005000000000000009 -964 306 0.008333333333333335 -964 961 -0.001659259259259294 -964 962 7.589415207398531e-19 -964 963 -0.03333333333333335 -964 964 0.007762962962962968 -964 965 -5.746271514173174e-18 -964 966 -1.387778780781446e-17 -964 967 -0.001659259259259238 -964 968 2.49366499671666e-18 -964 969 0.03333333333333333 -964 1369 -0.0009703703703703751 -964 1370 0.0005000000000000004 -964 1371 -0.008333333333333351 -964 1372 -0.0002814814814814809 -964 1373 -5.421010862427522e-19 -964 1374 -1.214306433183765e-17 -964 1375 -0.0009703703703703656 -964 1376 -0.0004999999999999994 -964 1377 0.008333333333333335 -965 292 -0.0004999999999999994 -965 293 -0.001040740740740733 -965 294 -0.009259259259259165 -965 298 1.084202172485504e-19 -965 299 -0.00236296296296295 -965 300 -0.03703703703703687 -965 304 0.0005000000000000009 -965 305 -0.001040740740740747 -965 306 -0.009259259259259302 -965 961 7.589415207398531e-19 -965 962 0.0002814814814814521 -965 963 2.42861286636753e-17 -965 964 -5.746271514173174e-18 -965 965 0.008325925925925919 -965 966 1.595945597898663e-16 -965 967 2.38524477946811e-18 -965 968 0.0002814814814814999 -965 969 -6.591949208711867e-17 -965 1369 0.0005000000000000006 -965 1370 -0.001040740740740738 -965 1371 0.00925925925925916 -965 1372 -6.505213034913027e-19 -965 1373 -0.002362962962962962 -965 1374 0.03703703703703706 -965 1375 -0.0004999999999999993 -965 1376 -0.001040740740740741 -965 1377 0.009259259259259339 -966 292 -0.01296296296296291 -966 293 -0.01342592592592579 -966 294 -0.1551783264746216 -966 298 -6.591949208711867e-17 -966 299 -0.02870370370370357 -966 300 -0.2040466392318221 -966 304 0.01296296296296301 -966 305 -0.01342592592592599 -966 306 -0.1551783264746233 -966 961 -0.02407407407407413 -966 962 -2.949029909160572e-17 -966 963 -0.1063100137174257 -966 964 3.989863994746656e-17 -966 965 -8.500145032286355e-17 -966 966 1.241426611796981 -966 967 0.02407407407407406 -966 968 -5.724587470723463e-17 -966 969 -0.1063100137174182 -966 1369 -0.01296296296296298 -966 1370 0.01342592592592591 -966 1371 -0.1551783264746224 -966 1372 8.673617379884035e-18 -966 1373 0.02870370370370365 -966 1374 -0.2040466392318244 -966 1375 0.01296296296296296 -966 1376 0.01342592592592597 -966 1377 -0.1551783264746231 -967 298 -0.0009703703703703665 -967 299 -0.0004999999999999993 -967 300 -0.008333333333333323 -967 304 -0.0002814814814815023 -967 305 -4.98732999343332e-18 -967 306 -1.040834085586084e-17 -967 310 -0.0009703703703703788 -967 311 0.0005000000000000035 -967 312 0.008333333333333314 -967 964 -0.001659259259259238 -967 965 2.38524477946811e-18 -967 966 -0.03333333333333333 -967 967 0.007762962962962968 -967 968 -4.445228907190568e-18 -967 969 -6.938893903907228e-18 -967 970 -0.001659259259259235 -967 971 3.252606517456513e-18 -967 972 0.03333333333333333 -967 1372 -0.0009703703703703701 -967 1373 0.0005000000000000007 -967 1374 -0.008333333333333331 -967 1375 -0.0002814814814814972 -967 1376 1.517883041479706e-18 -967 1377 3.469446951953614e-18 -967 1378 -0.0009703703703703801 -967 1379 -0.0005000000000000027 -967 1380 0.008333333333333345 -968 298 -0.0004999999999999991 -968 299 -0.001040740740740737 -968 300 -0.009259259259259264 -968 304 -5.095750210681871e-18 -968 305 -0.00236296296296299 -968 306 -0.03703703703703734 -968 310 0.0005000000000000036 -968 311 -0.001040740740740772 -968 312 -0.009259259259259436 -968 964 2.49366499671666e-18 -968 965 0.0002814814814814999 -968 966 8.500145032286355e-17 -968 967 -4.445228907190568e-18 -968 968 0.008325925925925997 -968 969 -3.122502256758253e-17 -968 970 3.144186300207963e-18 -968 971 0.0002814814814814968 -968 972 -9.8879238130678e-17 -968 1372 0.0005000000000000007 -968 1373 -0.00104074074074075 -968 1374 0.009259259259259375 -968 1375 1.626303258728257e-18 -968 1376 -0.002362962962962983 -968 1377 0.03703703703703733 -968 1378 -0.0005000000000000028 -968 1379 -0.001040740740740759 -968 1380 0.009259259259259321 -969 298 -0.01296296296296294 -969 299 -0.01342592592592585 -969 300 -0.155178326474622 -969 304 -1.856154119295184e-16 -969 305 -0.02870370370370372 -969 306 -0.2040466392318283 -969 310 0.01296296296296311 -969 311 -0.01342592592592641 -969 312 -0.1551783264746262 -969 964 -0.02407407407407407 -969 965 -9.540979117872439e-17 -969 966 -0.1063100137174182 -969 967 2.810252031082427e-16 -969 968 8.500145032286355e-17 -969 969 1.24142661179699 -969 970 0.02407407407407379 -969 971 6.071532165918825e-17 -969 972 -0.1063100137174182 -969 1372 -0.01296296296296301 -969 1373 0.01342592592592608 -969 1374 -0.1551783264746241 -969 1375 -8.500145032286355e-17 -969 1376 0.02870370370370364 -969 1377 -0.2040466392318277 -969 1378 0.01296296296296311 -969 1379 0.0134259259259262 -969 1380 -0.155178326474625 -970 304 -0.0009703703703703566 -970 305 -0.0004999999999999964 -970 306 -0.008333333333333335 -970 310 -0.0002814814814814954 -970 311 -6.288372600415926e-18 -970 312 -1.561251128379126e-17 -970 316 -0.0009703703703703788 -970 317 0.0005000000000000023 -970 318 0.008333333333333335 -970 967 -0.001659259259259235 -970 968 3.252606517456513e-18 -970 969 -0.03333333333333331 -970 970 0.007762962962962954 -970 971 1.084202172485504e-18 -970 972 3.469446951953614e-18 -970 973 -0.001659259259259279 -970 974 -3.903127820947816e-18 -970 975 0.03333333333333333 -970 1375 -0.0009703703703703604 -970 1376 0.0004999999999999972 -970 1377 -0.008333333333333333 -970 1378 -0.0002814814814814647 -970 1379 6.288372600415926e-18 -970 1380 5.204170427930421e-18 -970 1381 -0.0009703703703703843 -970 1382 -0.0005000000000000035 -970 1383 0.008333333333333338 -971 304 -0.0004999999999999964 -971 305 -0.00104074074074072 -971 306 -0.009259259259259214 -971 310 -6.396792817664476e-18 -971 311 -0.002362962962962982 -971 312 -0.03703703703703715 -971 316 0.0005000000000000022 -971 317 -0.001040740740740754 -971 318 -0.009259259259259287 -971 967 3.361026734705064e-18 -971 968 0.0002814814814814969 -971 969 5.030698080332741e-17 -971 970 1.084202172485504e-18 -971 971 0.008325925925925917 -971 972 -1.908195823574488e-16 -971 973 -3.686287386450715e-18 -971 974 0.000281481481481465 -971 975 8.153200337090993e-17 -971 1375 0.0004999999999999971 -971 1376 -0.001040740740740723 -971 1377 0.00925925925925917 -971 1378 6.288372600415926e-18 -971 1379 -0.002362962962962941 -971 1380 0.03703703703703682 -971 1381 -0.0005000000000000034 -971 1382 -0.001040740740740759 -971 1383 0.009259259259259276 -972 304 -0.01296296296296283 -972 305 -0.01342592592592572 -972 306 -0.1551783264746205 -972 310 -2.203098814490545e-16 -972 311 -0.02870370370370395 -972 312 -0.2040466392318271 -972 316 0.01296296296296304 -972 317 -0.01342592592592612 -972 318 -0.1551783264746244 -972 967 -0.02407407407407435 -972 968 8.847089727481716e-17 -972 969 -0.1063100137174182 -972 970 5.152128723651117e-16 -972 971 2.151057110211241e-16 -972 972 1.24142661179698 -972 973 0.02407407407407385 -972 974 7.632783294297951e-17 -972 975 -0.1063100137174238 -972 1375 -0.01296296296296286 -972 1376 0.01342592592592572 -972 1377 -0.1551783264746206 -972 1378 -2.307182223049153e-16 -972 1379 0.02870370370370356 -972 1380 -0.204046639231821 -972 1381 0.01296296296296309 -972 1382 0.01342592592592613 -972 1383 -0.1551783264746247 -973 310 -0.0009703703703703628 -973 311 -0.0004999999999999978 -973 312 -0.008333333333333321 -973 316 -0.000281481481481475 -973 317 -1.192622389734055e-18 -973 318 1.040834085586084e-17 -973 322 -0.0009703703703703699 -973 323 0.0004999999999999997 -973 324 0.008333333333333335 -973 970 -0.001659259259259279 -973 971 -3.686287386450715e-18 -973 972 -0.03333333333333334 -973 973 0.007762962962962961 -973 974 7.047314121155779e-18 -973 975 -6.938893903907228e-18 -973 976 -0.001659259259259265 -973 977 -4.662069341687669e-18 -973 978 0.03333333333333334 -973 1378 -0.0009703703703703618 -973 1379 0.0004999999999999964 -973 1380 -0.008333333333333351 -973 1381 -0.0002814814814814701 -973 1382 6.071532165918825e-18 -973 1383 -1.040834085586084e-17 -973 1384 -0.0009703703703703766 -973 1385 -0.000500000000000002 -973 1386 0.008333333333333338 -974 310 -0.0004999999999999977 -974 311 -0.001040740740740726 -974 312 -0.009259259259259175 -974 316 -1.084202172485504e-18 -974 317 -0.002362962962962955 -974 318 -0.03703703703703692 -974 322 0.0004999999999999997 -974 323 -0.001040740740740737 -974 324 -0.009259259259259228 -974 970 -3.903127820947816e-18 -974 971 0.0002814814814814649 -974 972 -1.023486850826316e-16 -974 973 7.155734338404329e-18 -974 974 0.008325925925925893 -974 975 -5.204170427930421e-17 -974 976 -4.662069341687669e-18 -974 977 0.0002814814814814759 -974 978 1.578598363138894e-16 -974 1378 0.0004999999999999965 -974 1379 -0.001040740740740712 -974 1380 0.009259259259259071 -974 1381 5.854691731421724e-18 -974 1382 -0.002362962962962947 -974 1383 0.03703703703703685 -974 1384 -0.0005000000000000021 -974 1385 -0.001040740740740755 -974 1386 0.009259259259259339 -975 310 -0.01296296296296284 -975 311 -0.01342592592592575 -975 312 -0.155178326474621 -975 316 -7.632783294297951e-17 -975 317 -0.02870370370370376 -975 318 -0.2040466392318229 -975 322 0.01296296296296293 -975 323 -0.01342592592592588 -975 324 -0.1551783264746219 -975 970 -0.02407407407407432 -975 971 7.632783294297951e-17 -975 972 -0.1063100137174237 -975 973 3.191891195797325e-16 -975 974 7.632783294297951e-17 -975 975 1.241426611796977 -975 976 0.024074074074074 -975 977 -7.632783294297951e-17 -975 978 -0.1063100137174217 -975 1378 -0.01296296296296282 -975 1379 0.01342592592592549 -975 1380 -0.1551783264746193 -975 1381 -2.324529457808922e-16 -975 1382 0.02870370370370369 -975 1383 -0.204046639231822 -975 1384 0.01296296296296303 -975 1385 0.01342592592592614 -975 1386 -0.1551783264746244 -976 316 -0.0009703703703703721 -976 317 -0.0005000000000000004 -976 318 -0.008333333333333333 -976 322 -0.0002814814814814737 -976 323 4.336808689942018e-19 -976 324 1.040834085586084e-17 -976 328 -0.0009703703703703715 -976 329 0.0005000000000000002 -976 330 0.008333333333333338 -976 973 -0.001659259259259265 -976 974 -4.662069341687669e-18 -976 975 -0.03333333333333333 -976 976 0.007762962962962958 -976 977 1.843143693225358e-18 -976 978 3.469446951953614e-18 -976 979 -0.001659259259259263 -976 980 2.602085213965211e-18 -976 981 0.03333333333333335 -976 1381 -0.0009703703703703633 -976 1382 0.000499999999999998 -976 1383 -0.008333333333333333 -976 1384 -0.0002814814814814824 -976 1385 6.505213034913027e-19 -976 1386 -5.204170427930421e-18 -976 1387 -0.0009703703703703665 -976 1388 -0.0004999999999999986 -976 1389 0.008333333333333335 -977 316 -0.0005000000000000003 -977 317 -0.001040740740740742 -977 318 -0.009259259259259247 -977 322 5.421010862427522e-19 -977 323 -0.002362962962962953 -977 324 -0.03703703703703698 -977 328 0.0005000000000000002 -977 329 -0.00104074074074074 -977 330 -0.009259259259259243 -977 973 -4.77048955893622e-18 -977 974 0.0002814814814814759 -977 975 -9.8879238130678e-17 -977 976 1.843143693225358e-18 -977 977 0.008325925925925902 -977 978 -1.040834085586084e-16 -977 979 2.49366499671666e-18 -977 980 0.0002814814814814809 -977 981 -6.938893903907228e-18 -977 1381 0.0004999999999999981 -977 1382 -0.001040740740740729 -977 1383 0.009259259259259228 -977 1384 6.505213034913027e-19 -977 1385 -0.002362962962962964 -977 1386 0.03703703703703695 -977 1387 -0.0004999999999999987 -977 1388 -0.001040740740740731 -977 1389 0.009259259259259219 -978 316 -0.01296296296296296 -978 317 -0.01342592592592594 -978 318 -0.1551783264746224 -978 322 6.938893903907228e-18 -978 323 -0.02870370370370354 -978 324 -0.2040466392318223 -978 328 0.01296296296296295 -978 329 -0.0134259259259259 -978 330 -0.1551783264746222 -978 973 -0.02407407407407415 -978 974 -5.030698080332741e-17 -978 975 -0.1063100137174217 -978 976 1.040834085586084e-17 -978 977 -1.110223024625157e-16 -978 978 1.241426611796978 -978 979 0.02407407407407414 -978 980 -3.989863994746656e-17 -978 981 -0.1063100137174213 -978 1381 -0.01296296296296287 -978 1382 0.01342592592592578 -978 1383 -0.1551783264746213 -978 1384 -2.081668171172169e-17 -978 1385 0.02870370370370409 -978 1386 -0.2040466392318246 -978 1387 0.01296296296296289 -978 1388 0.01342592592592573 -978 1389 -0.1551783264746218 -979 322 -0.0009703703703703712 -979 323 -0.0005 -979 324 -0.008333333333333338 -979 328 -0.0002814814814814758 -979 329 -6.505213034913027e-19 -979 330 -1.387778780781446e-17 -979 334 -0.0009703703703703702 -979 335 0.0005000000000000001 -979 336 0.008333333333333323 -979 976 -0.001659259259259263 -979 977 2.49366499671666e-18 -979 978 -0.03333333333333334 -979 979 0.00776296296296297 -979 980 -5.746271514173174e-18 -979 981 -2.081668171172169e-17 -979 982 -0.001659259259259261 -979 983 5.204170427930421e-18 -979 984 0.03333333333333332 -979 1384 -0.0009703703703703752 -979 1385 0.0005000000000000014 -979 1386 -0.008333333333333333 -979 1387 -0.0002814814814814885 -979 1388 -4.228388472693467e-18 -979 1389 1.734723475976807e-17 -979 1390 -0.0009703703703703646 -979 1391 -0.0004999999999999985 -979 1392 0.00833333333333334 -980 322 -0.0005 -980 323 -0.00104074074074074 -980 324 -0.009259259259259243 -980 328 -1.084202172485504e-18 -980 329 -0.002362962962962956 -980 330 -0.03703703703703701 -980 334 0.0005000000000000001 -980 335 -0.001040740740740742 -980 336 -0.009259259259259271 -980 976 2.602085213965211e-18 -980 977 0.000281481481481481 -980 978 1.422473250300982e-16 -980 979 -5.637851296924623e-18 -980 980 0.008325925925925931 -980 981 1.35308431126191e-16 -980 982 5.529431079676073e-18 -980 983 0.0002814814814814788 -980 984 -1.509209424099822e-16 -980 1384 0.0005000000000000014 -980 1385 -0.001040740740740749 -980 1386 0.009259259259259295 -980 1387 -4.119968255444917e-18 -980 1388 -0.002362962962962973 -980 1389 0.03703703703703717 -980 1390 -0.0004999999999999985 -980 1391 -0.001040740740740732 -980 1392 0.009259259259259266 -981 322 -0.01296296296296295 -981 323 -0.0134259259259259 -981 324 -0.1551783264746222 -981 328 -4.163336342344337e-17 -981 329 -0.02870370370370358 -981 330 -0.2040466392318235 -981 334 0.01296296296296297 -981 335 -0.01342592592592594 -981 336 -0.1551783264746235 -981 976 -0.02407407407407403 -981 977 -4.85722573273506e-17 -981 978 -0.1063100137174213 -981 979 -6.591949208711867e-17 -981 980 -1.144917494144693e-16 -981 981 1.241426611796984 -981 982 0.02407407407407408 -981 983 -4.163336342344337e-17 -981 984 -0.1063100137174219 -981 1384 -0.012962962962963 -981 1385 0.01342592592592596 -981 1386 -0.1551783264746238 -981 1387 1.07552855510562e-16 -981 1388 0.02870370370370377 -981 1389 -0.2040466392318261 -981 1390 0.01296296296296293 -981 1391 0.0134259259259259 -981 1392 -0.1551783264746222 -982 328 -0.000970370370370371 -982 329 -0.0004999999999999999 -982 330 -0.008333333333333338 -982 334 -0.0002814814814814789 -982 336 -8.673617379884035e-18 -982 340 -0.0009703703703703709 -982 341 0.0004999999999999999 -982 342 0.008333333333333335 -982 979 -0.001659259259259261 -982 980 5.529431079676073e-18 -982 981 -0.03333333333333332 -982 982 0.00776296296296297 -982 983 -6.613633252161577e-18 -982 984 3.469446951953614e-18 -982 985 -0.00165925925925927 -982 986 1.301042606982605e-18 -982 987 0.03333333333333333 -982 1387 -0.0009703703703703735 -982 1388 0.0005000000000000017 -982 1389 -0.008333333333333321 -982 1390 -0.0002814814814814795 -982 1391 -3.361026734705064e-18 -982 1392 1.214306433183765e-17 -982 1393 -0.0009703703703703658 -982 1394 -0.0004999999999999984 -982 1395 0.008333333333333326 -983 328 -0.0004999999999999999 -983 329 -0.001040740740740739 -983 330 -0.009259259259259252 -983 334 -1.084202172485504e-19 -983 335 -0.002362962962962959 -983 336 -0.03703703703703698 -983 340 0.0004999999999999998 -983 341 -0.001040740740740739 -983 342 -0.009259259259259228 -983 979 5.204170427930421e-18 -983 980 0.0002814814814814789 -983 981 1.07552855510562e-16 -983 982 -6.505213034913027e-18 -983 983 0.008325925925925928 -983 984 1.595945597898663e-16 -983 985 1.734723475976807e-18 -983 986 0.0002814814814814739 -983 987 -2.255140518769849e-17 -983 1387 0.0005000000000000017 -983 1388 -0.001040740740740756 -983 1389 0.009259259259259377 -983 1390 -3.361026734705064e-18 -983 1391 -0.002362962962962961 -983 1392 0.03703703703703707 -983 1393 -0.0004999999999999985 -983 1394 -0.001040740740740727 -983 1395 0.009259259259259153 -984 328 -0.01296296296296299 -984 329 -0.01342592592592589 -984 330 -0.1551783264746233 -984 334 4.336808689942018e-17 -984 335 -0.0287037037037036 -984 336 -0.2040466392318239 -984 340 0.01296296296296295 -984 341 -0.01342592592592589 -984 342 -0.155178326474622 -984 979 -0.02407407407407395 -984 980 -2.949029909160572e-17 -984 981 -0.1063100137174219 -984 982 -2.688821387764051e-16 -984 983 -1.769417945496343e-16 -984 984 1.241426611796981 -984 985 0.02407407407407423 -984 986 8.673617379884035e-17 -984 987 -0.1063100137174218 -984 1387 -0.01296296296296304 -984 1388 0.01342592592592623 -984 1389 -0.1551783264746248 -984 1390 1.682681771697503e-16 -984 1391 0.0287037037037036 -984 1392 -0.2040466392318236 -984 1393 0.01296296296296286 -984 1394 0.01342592592592567 -984 1395 -0.1551783264746201 -985 334 -0.0009703703703703706 -985 335 -0.0005000000000000001 -985 336 -0.008333333333333321 -985 340 -0.0002814814814814761 -985 341 1.192622389734055e-18 -985 342 2.255140518769849e-17 -985 346 -0.0009703703703703717 -985 347 0.0005000000000000002 -985 348 0.008333333333333335 -985 982 -0.00165925925925927 -985 983 1.517883041479706e-18 -985 984 -0.03333333333333333 -985 985 0.007762962962962978 -985 986 -1.192622389734055e-18 -985 987 -1.387778780781446e-17 -985 988 -0.001659259259259268 -985 989 -2.818925648462312e-18 -985 990 0.03333333333333333 -985 1390 -0.000970370370370379 -985 1391 0.0005000000000000019 -985 1392 -0.008333333333333351 -985 1393 -0.0002814814814814677 -985 1394 7.589415207398531e-19 -985 1395 -2.42861286636753e-17 -985 1396 -0.0009703703703703756 -985 1397 -0.0005000000000000013 -985 1398 0.008333333333333335 -986 334 -0.0005000000000000001 -986 335 -0.001040740740740742 -986 336 -0.009259259259259247 -986 340 1.192622389734055e-18 -986 341 -0.002362962962962956 -986 342 -0.03703703703703701 -986 346 0.0005000000000000001 -986 347 -0.001040740740740741 -986 348 -0.009259259259259257 -986 982 1.301042606982605e-18 -986 983 0.000281481481481474 -986 984 8.847089727481716e-17 -986 985 -1.301042606982605e-18 -986 986 0.008325925925925935 -986 987 9.71445146547012e-17 -986 988 -2.818925648462312e-18 -986 989 0.0002814814814814714 -986 990 3.642919299551295e-17 -986 1390 0.0005000000000000019 -986 1391 -0.001040740740740747 -986 1392 0.009259259259259226 -986 1393 9.75781955236954e-19 -986 1394 -0.002362962962962945 -986 1395 0.03703703703703687 -986 1396 -0.0005000000000000013 -986 1397 -0.001040740740740749 -986 1398 0.009259259259259247 -987 334 -0.01296296296296294 -987 335 -0.01342592592592593 -987 336 -0.1551783264746222 -987 340 -1.908195823574488e-17 -987 341 -0.02870370370370354 -987 342 -0.204046639231823 -987 346 0.01296296296296298 -987 347 -0.01342592592592593 -987 348 -0.1551783264746227 -987 982 -0.02407407407407407 -987 983 2.42861286636753e-17 -987 984 -0.1063100137174218 -987 985 2.949029909160572e-17 -987 986 2.775557561562891e-17 -987 987 1.24142661179698 -987 988 0.02407407407407404 -987 989 -1.214306433183765e-17 -987 990 -0.1063100137174225 -987 1390 -0.01296296296296303 -987 1391 0.01342592592592594 -987 1392 -0.1551783264746226 -987 1393 -3.989863994746656e-17 -987 1394 0.0287037037037033 -987 1395 -0.2040466392318211 -987 1396 0.01296296296296304 -987 1397 0.01342592592592612 -987 1398 -0.1551783264746238 -988 340 -0.0009703703703703696 -988 341 -0.0004999999999999999 -988 342 -0.008333333333333325 -988 346 -0.0002814814814814862 -988 347 -2.38524477946811e-18 -988 348 -1.040834085586084e-17 -988 352 -0.000970370370370374 -988 353 0.0005000000000000016 -988 354 0.008333333333333314 -988 985 -0.001659259259259268 -988 986 -2.818925648462312e-18 -988 987 -0.03333333333333332 -988 988 0.007762962962962959 -988 989 1.409462824231156e-18 -988 990 -6.938893903907228e-18 -988 991 -0.001659259259259234 -988 992 2.602085213965211e-18 -988 993 0.03333333333333333 -988 1393 -0.0009703703703703666 -988 1394 0.0004999999999999987 -988 1395 -0.008333333333333331 -988 1396 -0.0002814814814814867 -988 1397 1.843143693225358e-18 -988 1398 3.469446951953614e-18 -988 1399 -0.0009703703703703734 -988 1400 -0.0005000000000000012 -988 1401 0.008333333333333345 -989 340 -0.0004999999999999998 -989 341 -0.00104074074074074 -989 342 -0.009259259259259257 -989 346 -2.38524477946811e-18 -989 347 -0.002362962962962969 -989 348 -0.03703703703703708 -989 352 0.0005000000000000016 -989 353 -0.001040740740740755 -989 354 -0.009259259259259359 -989 985 -2.818925648462312e-18 -989 986 0.0002814814814814714 -989 987 -1.110223024625157e-16 -989 988 1.409462824231156e-18 -989 989 0.008325925925925936 -989 990 2.775557561562891e-17 -989 991 2.602085213965211e-18 -989 992 0.000281481481481508 -989 993 -5.377642775528102e-17 -989 1393 0.0004999999999999987 -989 1394 -0.001040740740740731 -989 1395 0.009259259259259172 -989 1396 2.059984127722458e-18 -989 1397 -0.002362962962962969 -989 1398 0.03703703703703708 -989 1399 -0.0005000000000000011 -989 1400 -0.00104074074074075 -989 1401 0.009259259259259352 -990 340 -0.01296296296296297 -990 341 -0.01342592592592591 -990 342 -0.1551783264746225 -990 346 -7.28583859910259e-17 -990 347 -0.02870370370370365 -990 348 -0.2040466392318254 -990 352 0.01296296296296303 -990 353 -0.01342592592592601 -990 354 -0.1551783264746245 -990 985 -0.02407407407407416 -990 986 -1.734723475976807e-17 -990 987 -0.1063100137174225 -990 988 2.654126918244515e-16 -990 989 -6.245004513516506e-17 -990 990 1.241426611796984 -990 991 0.0240740740740739 -990 992 -4.510281037539698e-17 -990 993 -0.1063100137174175 -990 1393 -0.01296296296296293 -990 1394 0.01342592592592588 -990 1395 -0.1551783264746217 -990 1396 -1.006139616066548e-16 -990 1397 0.02870370370370381 -990 1398 -0.2040466392318258 -990 1399 0.01296296296296304 -990 1400 0.01342592592592603 -990 1401 -0.1551783264746244 -991 346 -0.0009703703703703653 -991 347 -0.0004999999999999985 -991 348 -0.008333333333333335 -991 352 -0.0002814814814814845 -991 353 -5.095750210681871e-18 -991 354 -1.734723475976807e-17 -991 358 -0.000970370370370381 -991 359 0.0005000000000000029 -991 360 0.008333333333333335 -991 988 -0.001659259259259234 -991 989 2.602085213965211e-18 -991 990 -0.03333333333333331 -991 991 0.007762962962962958 -991 992 -7.589415207398531e-19 -991 993 3.469446951953614e-18 -991 994 -0.001659259259259267 -991 995 -1.084202172485504e-18 -991 996 0.03333333333333333 -991 1396 -0.0009703703703703647 -991 1397 0.0004999999999999988 -991 1398 -0.008333333333333331 -991 1399 -0.0002814814814814821 -991 1400 4.119968255444917e-18 -991 1401 6.938893903907228e-18 -991 1402 -0.0009703703703703804 -991 1403 -0.0005000000000000028 -991 1404 0.008333333333333338 -992 346 -0.0004999999999999984 -992 347 -0.00104074074074073 -992 348 -0.009259259259259248 -992 352 -5.095750210681871e-18 -992 353 -0.002362962962962967 -992 354 -0.03703703703703701 -992 358 0.0005000000000000028 -992 359 -0.001040740740740759 -992 360 -0.009259259259259318 -992 988 2.602085213965211e-18 -992 989 0.000281481481481508 -992 990 6.071532165918825e-17 -992 991 -8.673617379884035e-19 -992 992 0.008325925925925931 -992 993 1.908195823574488e-16 -992 994 -8.673617379884035e-19 -992 995 0.0002814814814814758 -992 996 3.989863994746656e-17 -992 1396 0.0004999999999999987 -992 1397 -0.001040740740740736 -992 1398 0.009259259259259297 -992 1399 3.903127820947816e-18 -992 1400 -0.002362962962962964 -992 1401 0.03703703703703711 -992 1402 -0.0005000000000000028 -992 1403 -0.001040740740740759 -992 1404 0.009259259259259321 -993 346 -0.01296296296296292 -993 347 -0.01342592592592569 -993 348 -0.155178326474622 -993 352 -1.647987302177967e-16 -993 353 -0.02870370370370374 -993 354 -0.2040466392318248 -993 358 0.01296296296296307 -993 359 -0.01342592592592614 -993 360 -0.1551783264746243 -993 988 -0.02407407407407416 -993 989 -1.387778780781446e-17 -993 990 -0.1063100137174175 -993 991 2.862293735361732e-16 -993 992 -1.387778780781446e-16 -993 993 1.241426611796982 -993 994 0.02407407407407389 -993 995 -1.734723475976807e-18 -993 996 -0.1063100137174217 -993 1396 -0.01296296296296293 -993 1397 0.01342592592592584 -993 1398 -0.1551783264746226 -993 1399 -1.318389841742373e-16 -993 1400 0.02870370370370374 -993 1401 -0.2040466392318246 -993 1402 0.01296296296296306 -993 1403 0.01342592592592615 -993 1404 -0.1551783264746243 -994 352 -0.0009703703703703606 -994 353 -0.0004999999999999972 -994 354 -0.008333333333333321 -994 358 -0.0002814814814814738 -994 359 -5.204170427930421e-18 -994 360 2.255140518769849e-17 -994 364 -0.0009703703703703817 -994 365 0.0005000000000000033 -994 366 0.008333333333333338 -994 991 -0.001659259259259267 -994 992 -9.75781955236954e-19 -994 993 -0.03333333333333334 -994 994 0.007762962962962975 -994 995 -3.794707603699266e-18 -994 996 1.040834085586084e-17 -994 997 -0.001659259259259283 -994 998 3.469446951953614e-18 -994 999 0.03333333333333335 -994 1399 -0.0009703703703703623 -994 1400 0.0004999999999999973 -994 1401 -0.008333333333333349 -994 1402 -0.0002814814814814701 -994 1403 4.445228907190568e-18 -994 1404 -1.040834085586084e-17 -994 1405 -0.000970370370370376 -994 1406 -0.0005000000000000012 -994 1407 0.008333333333333335 -995 352 -0.0004999999999999971 -995 353 -0.001040740740740722 -995 354 -0.009259259259259169 -995 358 -4.98732999343332e-18 -995 359 -0.002362962962962953 -995 360 -0.03703703703703701 -995 364 0.0005000000000000033 -995 365 -0.00104074074074076 -995 366 -0.009259259259259288 -995 991 -1.084202172485504e-18 -995 992 0.0002814814814814758 -995 993 5.204170427930421e-18 -995 994 -3.794707603699266e-18 -995 995 0.008325925925925919 -995 996 -2.081668171172169e-16 -995 997 3.144186300207963e-18 -995 998 0.0002814814814814543 -995 999 -9.367506770274758e-17 -995 1399 0.0004999999999999972 -995 1400 -0.00104074074074072 -995 1401 0.009259259259259155 -995 1402 4.77048955893622e-18 -995 1403 -0.002362962962962948 -995 1404 0.03703703703703687 -995 1405 -0.0005000000000000013 -995 1406 -0.001040740740740747 -995 1407 0.009259259259259234 -996 352 -0.01296296296296281 -996 353 -0.01342592592592565 -996 354 -0.1551783264746199 -996 358 -2.498001805406602e-16 -996 359 -0.02870370370370345 -996 360 -0.2040466392318226 -996 364 0.01296296296296307 -996 365 -0.01342592592592629 -996 366 -0.1551783264746251 -996 991 -0.02407407407407435 -996 992 -1.734723475976807e-17 -996 993 -0.1063100137174217 -996 994 4.805184028455756e-16 -996 995 5.551115123125783e-17 -996 996 1.24142661179698 -996 997 0.02407407407407387 -996 998 3.122502256758253e-17 -996 999 -0.1063100137174251 -996 1399 -0.01296296296296284 -996 1400 0.01342592592592562 -996 1401 -0.1551783264746199 -996 1402 -1.717376241217039e-16 -996 1403 0.02870370370370363 -996 1404 -0.204046639231822 -996 1405 0.012962962962963 -996 1406 0.01342592592592607 -996 1407 -0.1551783264746237 -997 358 -0.0009703703703703611 -997 359 -0.000499999999999997 -997 360 -0.008333333333333338 -997 364 -0.0002814814814814734 -997 365 -3.577867169202165e-18 -997 366 8.673617379884035e-18 -997 370 -0.0009703703703703735 -997 371 0.0005000000000000008 -997 372 0.008333333333333338 -997 994 -0.001659259259259283 -997 995 3.144186300207963e-18 -997 996 -0.03333333333333334 -997 997 0.007762962962962965 -997 998 -8.565197162635485e-18 -997 1000 -0.001659259259259266 -997 1001 5.312590645178972e-18 -997 1002 0.03333333333333335 -997 1402 -0.0009703703703703672 -997 1403 0.0004999999999999987 -997 1404 -0.008333333333333333 -997 1405 -0.0002814814814814772 -997 1406 -7.589415207398531e-19 -997 1407 -1.734723475976807e-18 -997 1408 -0.0009703703703703632 -997 1409 -0.000499999999999998 -997 1410 0.008333333333333338 -998 358 -0.0004999999999999971 -998 359 -0.00104074074074072 -998 360 -0.009259259259259123 -998 364 -3.686287386450715e-18 -998 365 -0.002362962962962953 -998 366 -0.03703703703703692 -998 370 0.0005000000000000009 -998 371 -0.001040740740740744 -998 372 -0.009259259259259271 -998 994 3.469446951953614e-18 -998 995 0.0002814814814814543 -998 996 9.020562075079397e-17 -998 997 -8.565197162635485e-18 -998 998 0.008325925925925903 -998 999 1.387778780781446e-17 -998 1000 5.204170427930421e-18 -998 1001 0.0002814814814814737 -998 1002 -1.925543058334256e-16 -998 1402 0.0004999999999999986 -998 1403 -0.001040740740740729 -998 1404 0.00925925925925916 -998 1405 -8.673617379884035e-19 -998 1406 -0.002362962962962957 -998 1407 0.03703703703703699 -998 1408 -0.0004999999999999981 -998 1409 -0.001040740740740728 -998 1410 0.009259259259259205 -999 358 -0.01296296296296283 -999 359 -0.01342592592592576 -999 360 -0.1551783264746204 -999 364 -1.595945597898663e-16 -999 365 -0.02870370370370371 -999 366 -0.2040466392318227 -999 370 0.01296296296296298 -999 371 -0.01342592592592593 -999 372 -0.1551783264746228 -999 994 -0.02407407407407423 -999 995 1.561251128379126e-17 -999 996 -0.1063100137174251 -999 997 8.326672684688674e-17 -999 998 1.561251128379126e-17 -999 999 1.241426611796979 -999 1000 0.02407407407407414 -999 1001 -4.336808689942018e-17 -999 1002 -0.106310013717422 -999 1402 -0.01296296296296289 -999 1403 0.01342592592592583 -999 1404 -0.1551783264746217 -999 1405 3.642919299551295e-17 -999 1406 0.02870370370370373 -999 1407 -0.2040466392318236 -999 1408 0.01296296296296286 -999 1409 0.01342592592592584 -999 1410 -0.1551783264746212 -1000 364 -0.0009703703703703691 -1000 365 -0.0004999999999999994 -1000 366 -0.008333333333333342 -1000 370 -0.0002814814814814862 -1000 371 -2.168404344971009e-19 -1000 372 -1.040834085586084e-17 -1000 376 -0.0009703703703703673 -1000 377 0.0004999999999999996 -1000 378 0.008333333333333335 -1000 997 -0.001659259259259266 -1000 998 5.204170427930421e-18 -1000 999 -0.03333333333333335 -1000 1000 0.007762962962962959 -1000 1001 -7.047314121155779e-18 -1000 1002 -2.081668171172169e-17 -1000 1003 -0.001659259259259242 -1000 1004 1.951563910473908e-18 -1000 1005 0.03333333333333334 -1000 1405 -0.0009703703703703766 -1000 1406 0.000500000000000002 -1000 1407 -0.008333333333333333 -1000 1408 -0.0002814814814814862 -1000 1409 -3.361026734705064e-18 -1000 1410 -6.938893903907228e-18 -1000 1411 -0.0009703703703703657 -1000 1412 -0.0004999999999999986 -1000 1413 0.008333333333333335 -1001 364 -0.0004999999999999994 -1001 365 -0.001040740740740735 -1001 366 -0.009259259259259234 -1001 370 -6.505213034913027e-19 -1001 371 -0.002362962962962969 -1001 372 -0.0370370370370371 -1001 376 0.0004999999999999996 -1001 377 -0.001040740740740741 -1001 378 -0.009259259259259314 -1001 997 5.312590645178972e-18 -1001 998 0.0002814814814814737 -1001 999 1.023486850826316e-16 -1001 1000 -7.047314121155779e-18 -1001 1001 0.008325925925925931 -1001 1002 1.838806884535416e-16 -1001 1003 2.059984127722458e-18 -1001 1004 0.0002814814814814974 -1001 1005 -1.040834085586084e-17 -1001 1405 0.0005000000000000022 -1001 1406 -0.001040740740740755 -1001 1407 0.009259259259259318 -1001 1408 -3.252606517456513e-18 -1001 1409 -0.002362962962962969 -1001 1410 0.0370370370370371 -1001 1411 -0.0004999999999999987 -1001 1412 -0.001040740740740732 -1001 1413 0.009259259259259231 -1002 364 -0.01296296296296292 -1002 365 -0.01342592592592581 -1002 366 -0.1551783264746217 -1002 370 -4.163336342344337e-17 -1002 371 -0.02870370370370386 -1002 372 -0.2040466392318254 -1002 376 0.01296296296296297 -1002 377 -0.01342592592592596 -1002 378 -0.1551783264746233 -1002 997 -0.02407407407407404 -1002 998 -7.806255641895632e-17 -1002 999 -0.106310013717422 -1002 1000 -1.006139616066548e-16 -1002 1001 -6.418476861114186e-17 -1002 1002 1.241426611796983 -1002 1003 0.02407407407407414 -1002 1004 5.724587470723463e-17 -1002 1005 -0.1063100137174188 -1002 1405 -0.01296296296296303 -1002 1406 0.0134259259259262 -1002 1407 -0.1551783264746242 -1002 1408 9.540979117872439e-17 -1002 1409 0.02870370370370374 -1002 1410 -0.2040466392318252 -1002 1411 0.01296296296296292 -1002 1412 0.01342592592592577 -1002 1413 -0.1551783264746218 -1003 370 -0.0009703703703703701 -1003 371 -0.0005000000000000003 -1003 372 -0.008333333333333333 -1003 376 -0.0002814814814814821 -1003 377 -3.144186300207963e-18 -1003 378 -1.561251128379126e-17 -1003 382 -0.0009703703703703801 -1003 383 0.0005000000000000026 -1003 384 0.008333333333333323 -1003 1000 -0.001659259259259242 -1003 1001 2.168404344971009e-18 -1003 1002 -0.03333333333333333 -1003 1003 0.00776296296296297 -1003 1004 -7.697835424647081e-18 -1003 1005 -1.734723475976807e-17 -1003 1006 -0.001659259259259264 -1003 1007 6.830473686658678e-18 -1003 1008 0.03333333333333334 -1003 1408 -0.0009703703703703746 -1003 1409 0.0005000000000000013 -1003 1410 -0.008333333333333331 -1003 1411 -0.0002814814814814868 -1003 1412 -2.059984127722458e-18 -1003 1413 3.469446951953614e-18 -1003 1414 -0.0009703703703703701 -1003 1415 -0.0004999999999999999 -1003 1416 0.008333333333333345 -1004 370 -0.0005000000000000003 -1004 371 -0.001040740740740746 -1004 372 -0.009259259259259335 -1004 376 -3.252606517456513e-18 -1004 377 -0.002362962962962964 -1004 378 -0.03703703703703715 -1004 382 0.0005000000000000027 -1004 383 -0.001040740740740758 -1004 384 -0.009259259259259287 -1004 1000 1.951563910473908e-18 -1004 1001 0.0002814814814814975 -1004 1002 1.023486850826316e-16 -1004 1003 -7.697835424647081e-18 -1004 1004 0.008325925925925954 -1004 1005 -6.591949208711867e-17 -1004 1006 7.155734338404329e-18 -1004 1007 0.0002814814814814773 -1004 1008 -1.52655665885959e-16 -1004 1408 0.0005000000000000013 -1004 1409 -0.00104074074074075 -1004 1410 0.009259259259259306 -1004 1411 -2.168404344971009e-18 -1004 1412 -0.00236296296296297 -1004 1413 0.03703703703703709 -1004 1414 -0.0004999999999999999 -1004 1415 -0.00104074074074074 -1004 1416 0.009259259259259278 -1005 370 -0.012962962962963 -1005 371 -0.01342592592592602 -1005 372 -0.1551783264746239 -1005 376 -9.71445146547012e-17 -1005 377 -0.02870370370370341 -1005 378 -0.204046639231825 -1005 382 0.01296296296296308 -1005 383 -0.01342592592592616 -1005 384 -0.1551783264746248 -1005 1000 -0.02407407407407402 -1005 1001 4.336808689942018e-17 -1005 1002 -0.1063100137174188 -1005 1003 5.204170427930421e-17 -1005 1004 -1.07552855510562e-16 -1005 1005 1.241426611796987 -1005 1006 0.02407407407407396 -1005 1007 -6.591949208711867e-17 -1005 1008 -0.106310013717422 -1005 1408 -0.01296296296296304 -1005 1409 0.01342592592592601 -1005 1410 -0.1551783264746239 -1005 1411 6.245004513516506e-17 -1005 1412 0.02870370370370375 -1005 1413 -0.2040466392318258 -1005 1414 0.01296296296296299 -1005 1415 0.01342592592592594 -1005 1416 -0.1551783264746233 -1006 376 -0.0009703703703703628 -1006 377 -0.0004999999999999972 -1006 378 -0.008333333333333335 -1006 382 -0.0002814814814814738 -1006 383 -4.98732999343332e-18 -1006 384 1.040834085586084e-17 -1006 388 -0.0009703703703703805 -1006 389 0.0005000000000000028 -1006 390 0.008333333333333335 -1006 1003 -0.001659259259259264 -1006 1004 7.155734338404329e-18 -1006 1005 -0.03333333333333333 -1006 1006 0.007762962962962966 -1006 1007 -1.105886215935215e-17 -1006 1009 -0.001659259259259267 -1006 1010 3.361026734705064e-18 -1006 1011 0.03333333333333332 -1006 1411 -0.0009703703703703701 -1006 1412 0.0005000000000000002 -1006 1413 -0.008333333333333335 -1006 1414 -0.0002814814814814766 -1006 1415 -1.084202172485504e-19 -1006 1416 5.204170427930421e-18 -1006 1417 -0.0009703703703703714 -1006 1418 -0.0005000000000000001 -1006 1419 0.008333333333333338 -1007 376 -0.0004999999999999971 -1007 377 -0.001040740740740719 -1007 378 -0.00925925925925912 -1007 382 -4.98732999343332e-18 -1007 383 -0.002362962962962953 -1007 384 -0.03703703703703685 -1007 388 0.0005000000000000027 -1007 389 -0.001040740740740757 -1007 390 -0.009259259259259304 -1007 1003 6.722053469410127e-18 -1007 1004 0.0002814814814814774 -1007 1005 2.168404344971009e-16 -1007 1006 -1.105886215935215e-17 -1007 1007 0.008325925925925917 -1007 1008 2.046973701652632e-16 -1007 1009 3.469446951953614e-18 -1007 1010 0.0002814814814814753 -1007 1011 -7.979727989493313e-17 -1007 1411 0.0005000000000000003 -1007 1412 -0.001040740740740744 -1007 1413 0.009259259259259299 -1007 1415 -0.002362962962962957 -1007 1416 0.03703703703703707 -1007 1417 -0.0005000000000000002 -1007 1418 -0.001040740740740741 -1007 1419 0.009259259259259248 -1008 376 -0.01296296296296287 -1008 377 -0.01342592592592564 -1008 378 -0.1551783264746205 -1008 382 -1.734723475976807e-16 -1008 383 -0.02870370370370358 -1008 384 -0.2040466392318224 -1008 388 0.01296296296296306 -1008 389 -0.01342592592592613 -1008 390 -0.155178326474624 -1008 1003 -0.02407407407407419 -1008 1004 -7.979727989493313e-17 -1008 1005 -0.106310013717422 -1008 1006 1.821459649775647e-16 -1008 1007 -1.491862189340054e-16 -1008 1008 1.24142661179698 -1008 1009 0.024074074074074 -1008 1010 2.081668171172169e-17 -1008 1011 -0.1063100137174217 -1008 1411 -0.01296296296296298 -1008 1412 0.01342592592592599 -1008 1413 -0.1551783264746236 -1008 1414 3.295974604355933e-17 -1008 1415 0.02870370370370365 -1008 1416 -0.2040466392318236 -1008 1417 0.01296296296296295 -1008 1418 0.01342592592592591 -1008 1419 -0.1551783264746223 -1009 382 -0.0009703703703703608 -1009 383 -0.0004999999999999973 -1009 384 -0.008333333333333312 -1009 388 -0.0002814814814814905 -1009 389 -4.87890977618477e-18 -1009 390 1.734723475976807e-18 -1009 394 -0.0009703703703703754 -1009 395 0.0005000000000000022 -1009 396 0.008333333333333314 -1009 1006 -0.001659259259259267 -1009 1007 3.361026734705064e-18 -1009 1008 -0.03333333333333334 -1009 1009 0.00776296296296297 -1009 1010 -4.011548038196366e-18 -1009 1011 -6.938893903907228e-18 -1009 1012 -0.001659259259259241 -1009 1013 5.421010862427522e-19 -1009 1014 0.03333333333333333 -1009 1414 -0.0009703703703703712 -1009 1415 0.0004999999999999999 -1009 1416 -0.008333333333333349 -1009 1417 -0.0002814814814814851 -1009 1418 2.927345865710862e-18 -1009 1419 -5.204170427930421e-18 -1009 1420 -0.0009703703703703792 -1009 1421 -0.0005000000000000028 -1009 1422 0.008333333333333345 -1010 382 -0.0004999999999999973 -1010 383 -0.001040740740740724 -1010 384 -0.009259259259259172 -1010 388 -4.98732999343332e-18 -1010 389 -0.002362962962962975 -1010 390 -0.03703703703703716 -1010 394 0.0005000000000000023 -1010 395 -0.001040740740740761 -1010 396 -0.009259259259259404 -1010 1006 3.361026734705064e-18 -1010 1007 0.0002814814814814753 -1010 1008 1.422473250300982e-16 -1010 1009 -4.011548038196366e-18 -1010 1010 0.008325925925925952 -1010 1011 1.214306433183765e-16 -1010 1012 4.336808689942018e-19 -1010 1013 0.0002814814814814977 -1010 1014 6.938893903907228e-18 -1010 1414 0.0004999999999999998 -1010 1415 -0.001040740740740737 -1010 1416 0.009259259259259229 -1010 1417 3.144186300207963e-18 -1010 1418 -0.002362962962962968 -1010 1419 0.03703703703703713 -1010 1420 -0.0005000000000000028 -1010 1421 -0.001040740740740761 -1010 1422 0.00925925925925938 -1011 382 -0.01296296296296281 -1011 383 -0.01342592592592568 -1011 384 -0.1551783264746199 -1011 388 -2.42861286636753e-16 -1011 389 -0.02870370370370375 -1011 390 -0.2040466392318257 -1011 394 0.01296296296296305 -1011 395 -0.01342592592592619 -1011 396 -0.1551783264746251 -1011 1006 -0.02407407407407422 -1011 1007 -4.510281037539698e-17 -1011 1008 -0.1063100137174217 -1011 1009 3.729655473350135e-16 -1011 1011 1.241426611796983 -1011 1012 0.02407407407407385 -1011 1013 5.204170427930421e-18 -1011 1014 -0.1063100137174186 -1011 1414 -0.01296296296296296 -1011 1415 0.01342592592592586 -1011 1416 -0.155178326474622 -1011 1417 -1.543903893619358e-16 -1011 1418 0.02870370370370359 -1011 1419 -0.2040466392318247 -1011 1420 0.01296296296296311 -1011 1421 0.01342592592592621 -1011 1422 -0.1551783264746251 -1012 388 -0.0009703703703703619 -1012 389 -0.0004999999999999978 -1012 390 -0.008333333333333333 -1012 394 -0.000281481481481479 -1012 395 -5.963111948670274e-18 -1012 396 -1.734723475976807e-18 -1012 400 -0.0009703703703703862 -1012 401 0.0005000000000000037 -1012 402 0.008333333333333335 -1012 1009 -0.001659259259259241 -1012 1010 4.336808689942018e-19 -1012 1011 -0.03333333333333331 -1012 1012 0.007762962962962977 -1012 1013 3.252606517456513e-18 -1012 1014 6.938893903907228e-18 -1012 1015 -0.001659259259259292 -1012 1016 -3.794707603699266e-18 -1012 1017 0.03333333333333333 -1012 1417 -0.0009703703703703595 -1012 1418 0.0004999999999999971 -1012 1419 -0.008333333333333333 -1012 1420 -0.00028148148148147 -1012 1421 7.697835424647081e-18 -1012 1422 5.204170427930421e-18 -1012 1423 -0.0009703703703703888 -1012 1424 -0.0005000000000000048 -1012 1425 0.008333333333333338 -1013 388 -0.0004999999999999977 -1013 389 -0.001040740740740728 -1013 390 -0.009259259259259257 -1013 394 -5.963111948670274e-18 -1013 395 -0.00236296296296296 -1013 396 -0.037037037037037 -1013 400 0.0005000000000000038 -1013 401 -0.00104074074074076 -1013 402 -0.009259259259259273 -1013 1009 5.421010862427522e-19 -1013 1010 0.0002814814814814978 -1013 1011 6.938893903907228e-18 -1013 1012 3.469446951953614e-18 -1013 1013 0.008325925925925935 -1013 1014 1.595945597898663e-16 -1013 1015 -4.011548038196366e-18 -1013 1016 0.0002814814814814548 -1013 1017 6.938893903907228e-17 -1013 1417 0.0004999999999999972 -1013 1418 -0.001040740740740725 -1013 1419 0.009259259259259231 -1013 1420 7.697835424647081e-18 -1013 1421 -0.002362962962962948 -1013 1422 0.03703703703703699 -1013 1423 -0.0005000000000000048 -1013 1424 -0.001040740740740768 -1013 1425 0.00925925925925929 -1014 388 -0.01296296296296289 -1014 389 -0.01342592592592574 -1014 390 -0.1551783264746215 -1014 394 -2.099015405931937e-16 -1014 395 -0.02870370370370353 -1014 396 -0.2040466392318237 -1014 400 0.0129629629629631 -1014 401 -0.01342592592592613 -1014 402 -0.1551783264746247 -1014 1009 -0.02407407407407429 -1014 1010 4.85722573273506e-17 -1014 1011 -0.1063100137174185 -1014 1012 5.273559366969494e-16 -1014 1013 -1.006139616066548e-16 -1014 1014 1.241426611796982 -1014 1015 0.02407407407407377 -1014 1016 -3.469446951953614e-18 -1014 1017 -0.1063100137174252 -1014 1417 -0.01296296296296286 -1014 1418 0.01342592592592572 -1014 1419 -0.1551783264746207 -1014 1420 -2.896988204881268e-16 -1014 1421 0.02870370370370341 -1014 1422 -0.204046639231822 -1014 1423 0.01296296296296314 -1014 1424 0.01342592592592632 -1014 1425 -0.1551783264746257 -1015 394 -0.0009703703703703593 -1015 395 -0.0004999999999999962 -1015 396 -0.008333333333333312 -1015 400 -0.0002814814814814785 -1015 401 -3.794707603699266e-18 -1015 402 1.387778780781446e-17 -1015 406 -0.0009703703703703717 -1015 407 0.0005000000000000009 -1015 408 0.008333333333333326 -1015 1012 -0.001659259259259292 -1015 1013 -4.011548038196366e-18 -1015 1014 -0.03333333333333334 -1015 1015 0.007762962962962958 -1015 1016 4.445228907190568e-18 -1015 1017 -1.040834085586084e-17 -1015 1018 -0.001659259259259254 -1015 1019 -1.843143693225358e-18 -1015 1020 0.03333333333333333 -1015 1420 -0.0009703703703703573 -1015 1421 0.0004999999999999951 -1015 1422 -0.008333333333333351 -1015 1423 -0.0002814814814814701 -1015 1424 7.37257477290143e-18 -1015 1425 -1.040834085586084e-17 -1015 1426 -0.0009703703703703766 -1015 1427 -0.000500000000000002 -1015 1428 0.008333333333333338 -1016 394 -0.0004999999999999962 -1016 395 -0.001040740740740713 -1016 396 -0.009259259259259087 -1016 400 -3.794707603699266e-18 -1016 401 -0.002362962962962959 -1016 402 -0.03703703703703692 -1016 406 0.0005000000000000008 -1016 407 -0.00104074074074075 -1016 408 -0.009259259259259316 -1016 1012 -3.903127820947816e-18 -1016 1013 0.0002814814814814548 -1016 1014 -1.162264728904461e-16 -1016 1015 4.553649124439119e-18 -1016 1016 0.008325925925925893 -1016 1017 -8.326672684688674e-17 -1016 1018 -1.734723475976807e-18 -1016 1019 0.0002814814814814824 -1016 1020 5.377642775528102e-17 -1016 1420 0.0004999999999999952 -1016 1421 -0.001040740740740703 -1016 1422 0.009259259259259012 -1016 1423 7.26415455565288e-18 -1016 1424 -0.002362962962962948 -1016 1425 0.03703703703703683 -1016 1426 -0.0005000000000000021 -1016 1427 -0.001040740740740755 -1016 1428 0.009259259259259339 -1017 394 -0.01296296296296277 -1017 395 -0.0134259259259255 -1017 396 -0.155178326474619 -1017 400 -1.925543058334256e-16 -1017 401 -0.02870370370370378 -1017 402 -0.2040466392318233 -1017 406 0.01296296296296297 -1017 407 -0.0134259259259261 -1017 408 -0.1551783264746235 -1017 1012 -0.02407407407407446 -1017 1013 -2.775557561562891e-17 -1017 1014 -0.1063100137174252 -1017 1015 5.655198531684391e-16 -1017 1016 8.500145032286355e-17 -1017 1017 1.241426611796976 -1017 1018 0.02407407407407389 -1017 1020 -0.1063100137174206 -1017 1420 -0.01296296296296276 -1017 1421 0.01342592592592544 -1017 1422 -0.1551783264746183 -1017 1423 -2.844946500601964e-16 -1017 1424 0.02870370370370375 -1017 1425 -0.204046639231822 -1017 1426 0.01296296296296303 -1017 1427 0.01342592592592614 -1017 1428 -0.1551783264746244 -1018 400 -0.0009703703703703665 -1018 401 -0.0004999999999999991 -1018 402 -0.008333333333333331 -1018 406 -0.0002814814814814866 -1018 407 -1.084202172485504e-18 -1018 412 -0.0009703703703703714 -1018 413 0.0005000000000000002 -1018 414 0.008333333333333335 -1018 1015 -0.001659259259259254 -1018 1016 -1.734723475976807e-18 -1018 1017 -0.03333333333333331 -1018 1018 0.007762962962962959 -1018 1019 1.843143693225358e-18 -1018 1020 -1.040834085586084e-17 -1018 1021 -0.001659259259259266 -1018 1022 -2.168404344971009e-19 -1018 1023 0.03333333333333333 -1018 1423 -0.0009703703703703633 -1018 1424 0.000499999999999998 -1018 1425 -0.008333333333333333 -1018 1426 -0.000281481481481481 -1018 1427 2.059984127722458e-18 -1018 1428 -6.938893903907228e-18 -1018 1429 -0.000970370370370371 -1018 1430 -0.0005 -1018 1431 0.008333333333333335 -1019 400 -0.0004999999999999991 -1019 401 -0.001040740740740737 -1019 402 -0.009259259259259262 -1019 406 -9.75781955236954e-19 -1019 407 -0.00236296296296297 -1019 408 -0.03703703703703715 -1019 412 0.0005000000000000001 -1019 413 -0.001040740740740741 -1019 414 -0.009259259259259257 -1019 1015 -1.951563910473908e-18 -1019 1016 0.0002814814814814824 -1019 1017 -5.551115123125783e-17 -1019 1018 1.951563910473908e-18 -1019 1019 0.008325925925925921 -1019 1020 -1.422473250300982e-16 -1019 1021 -1.084202172485504e-19 -1019 1022 0.0002814814814814762 -1019 1023 6.938893903907228e-18 -1019 1423 0.0004999999999999981 -1019 1424 -0.001040740740740729 -1019 1425 0.009259259259259228 -1019 1426 2.059984127722458e-18 -1019 1427 -0.002362962962962963 -1019 1428 0.037037037037037 -1019 1429 -0.0005 -1019 1430 -0.00104074074074074 -1019 1431 0.009259259259259231 -1020 400 -0.01296296296296291 -1020 401 -0.01342592592592595 -1020 402 -0.1551783264746222 -1020 406 -7.806255641895632e-17 -1020 407 -0.02870370370370376 -1020 408 -0.2040466392318253 -1020 412 0.01296296296296299 -1020 413 -0.01342592592592593 -1020 414 -0.1551783264746228 -1020 1015 -0.02407407407407416 -1020 1016 3.816391647148976e-17 -1020 1017 -0.1063100137174206 -1020 1018 6.245004513516506e-17 -1020 1019 6.418476861114186e-17 -1020 1020 1.241426611796981 -1020 1021 0.02407407407407409 -1020 1022 3.469446951953614e-18 -1020 1023 -0.106310013717422 -1020 1423 -0.01296296296296286 -1020 1424 0.01342592592592578 -1020 1425 -0.1551783264746213 -1020 1426 -1.196959198423997e-16 -1020 1427 0.02870370370370383 -1020 1428 -0.2040466392318244 -1020 1429 0.01296296296296298 -1020 1430 0.01342592592592593 -1020 1431 -0.1551783264746228 -1021 406 -0.0009703703703703699 -1021 407 -0.0004999999999999999 -1021 408 -0.008333333333333326 -1021 412 -0.0002814814814814856 -1021 413 -2.49366499671666e-18 -1021 414 -1.561251128379126e-17 -1021 418 -0.000970370370370374 -1021 419 0.0005000000000000016 -1021 420 0.008333333333333314 -1021 1018 -0.001659259259259266 -1021 1019 -1.084202172485504e-19 -1021 1020 -0.03333333333333333 -1021 1021 0.007762962962962963 -1021 1022 1.409462824231156e-18 -1021 1023 -1.040834085586084e-17 -1021 1024 -0.001659259259259232 -1021 1025 -1.084202172485504e-19 -1021 1026 0.03333333333333333 -1021 1426 -0.000970370370370371 -1021 1427 0.0005 -1021 1428 -0.008333333333333331 -1021 1429 -0.0002814814814814867 -1021 1430 1.951563910473908e-18 -1021 1431 3.469446951953614e-18 -1021 1432 -0.0009703703703703779 -1021 1433 -0.0005000000000000025 -1021 1434 0.008333333333333345 -1022 406 -0.0004999999999999998 -1022 407 -0.00104074074074074 -1022 408 -0.009259259259259257 -1022 412 -2.49366499671666e-18 -1022 413 -0.002362962962962968 -1022 414 -0.03703703703703708 -1022 418 0.0005000000000000016 -1022 419 -0.001040740740740755 -1022 420 -0.009259259259259359 -1022 1018 -2.168404344971009e-19 -1022 1019 0.0002814814814814763 -1022 1020 5.204170427930421e-18 -1022 1021 1.517883041479706e-18 -1022 1022 0.008325925925925943 -1022 1023 9.020562075079397e-17 -1022 1024 -1.084202172485504e-19 -1022 1025 0.0002814814814815131 -1022 1026 6.418476861114186e-17 -1022 1426 0.0005 -1022 1427 -0.00104074074074074 -1022 1428 0.009259259259259231 -1022 1429 2.059984127722458e-18 -1022 1430 -0.002362962962962969 -1022 1431 0.0370370370370371 -1022 1432 -0.0005000000000000024 -1022 1433 -0.001040740740740759 -1022 1434 0.00925925925925941 -1023 406 -0.01296296296296297 -1023 407 -0.01342592592592591 -1023 408 -0.1551783264746226 -1023 412 -6.938893903907228e-17 -1023 413 -0.02870370370370365 -1023 414 -0.2040466392318254 -1023 418 0.01296296296296303 -1023 419 -0.01342592592592601 -1023 420 -0.1551783264746245 -1023 1018 -0.02407407407407411 -1023 1019 -1.908195823574488e-17 -1023 1020 -0.106310013717422 -1023 1021 2.671474153004283e-16 -1023 1022 -6.938893903907228e-17 -1023 1023 1.241426611796985 -1023 1024 0.02407407407407385 -1023 1025 -4.85722573273506e-17 -1023 1026 -0.1063100137174169 -1023 1426 -0.01296296296296299 -1023 1427 0.01342592592592593 -1023 1428 -0.1551783264746228 -1023 1429 -1.006139616066548e-16 -1023 1430 0.0287037037037037 -1023 1431 -0.2040466392318258 -1023 1432 0.0129629629629631 -1023 1433 0.01342592592592608 -1023 1434 -0.1551783264746254 -1024 412 -0.0009703703703703653 -1024 413 -0.0004999999999999985 -1024 414 -0.008333333333333335 -1024 418 -0.0002814814814814954 -1024 419 -4.553649124439119e-18 -1024 420 -3.816391647148976e-17 -1024 424 -0.0009703703703703724 -1024 425 0.0005000000000000012 -1024 426 0.008333333333333321 -1024 1021 -0.001659259259259232 -1024 1022 -1.084202172485504e-19 -1024 1023 -0.03333333333333331 -1024 1024 0.007762962962962945 -1024 1025 3.144186300207963e-18 -1024 1026 6.938893903907228e-18 -1024 1027 -0.001659259259259256 -1024 1028 -5.421010862427522e-19 -1024 1029 0.03333333333333335 -1024 1429 -0.0009703703703703604 -1024 1430 0.0004999999999999975 -1024 1431 -0.008333333333333331 -1024 1432 -0.0002814814814814888 -1024 1433 3.577867169202165e-18 -1024 1434 1.040834085586084e-17 -1024 1435 -0.0009703703703703759 -1024 1436 -0.0005000000000000016 -1024 1437 0.008333333333333349 -1025 412 -0.0004999999999999984 -1025 413 -0.00104074074074073 -1025 414 -0.009259259259259248 -1025 418 -4.662069341687669e-18 -1025 419 -0.002362962962962982 -1025 420 -0.03703703703703715 -1025 424 0.0005000000000000011 -1025 425 -0.001040740740740752 -1025 426 -0.009259259259259332 -1025 1022 0.0002814814814815131 -1025 1023 2.949029909160572e-17 -1025 1024 2.927345865710862e-18 -1025 1025 0.008325925925925922 -1025 1026 -1.040834085586084e-17 -1025 1027 -4.336808689942018e-19 -1025 1028 0.0002814814814814804 -1025 1029 -5.204170427930421e-18 -1025 1429 0.0004999999999999974 -1025 1430 -0.001040740740740727 -1025 1431 0.009259259259259281 -1025 1432 3.577867169202165e-18 -1025 1433 -0.002362962962962973 -1025 1434 0.03703703703703716 -1025 1435 -0.0005000000000000017 -1025 1436 -0.001040740740740752 -1025 1437 0.009259259259259323 -1026 412 -0.01296296296296292 -1026 413 -0.01342592592592569 -1026 414 -0.155178326474622 -1026 418 -1.127570259384925e-16 -1026 419 -0.02870370370370398 -1026 420 -0.2040466392318271 -1026 424 0.01296296296296299 -1026 425 -0.01342592592592612 -1026 426 -0.1551783264746238 -1026 1021 -0.02407407407407421 -1026 1023 -0.1063100137174169 -1026 1024 3.070460552478949e-16 -1026 1025 -1.908195823574488e-17 -1026 1026 1.241426611796983 -1026 1027 0.02407407407407394 -1026 1028 -3.469446951953614e-18 -1026 1029 -0.106310013717421 -1026 1429 -0.01296296296296287 -1026 1430 0.01342592592592565 -1026 1431 -0.1551783264746216 -1026 1432 -1.405126015541214e-16 -1026 1433 0.02870370370370403 -1026 1434 -0.2040466392318263 -1026 1435 0.01296296296296303 -1026 1436 0.01342592592592613 -1026 1437 -0.1551783264746243 -1027 418 -0.0009703703703703657 -1027 419 -0.0004999999999999988 -1027 420 -0.008333333333333331 -1027 424 -0.0002814814814814813 -1027 425 -4.228388472693467e-18 -1027 426 1.734723475976807e-18 -1027 430 -0.0009703703703703823 -1027 431 0.000500000000000003 -1027 432 0.008333333333333331 -1027 1024 -0.001659259259259256 -1027 1025 -5.421010862427522e-19 -1027 1026 -0.03333333333333335 -1027 1027 0.007762962962962965 -1027 1028 -5.746271514173174e-18 -1027 1030 -0.001659259259259268 -1027 1031 6.288372600415926e-18 -1027 1032 0.03333333333333335 -1027 1432 -0.0009703703703703648 -1027 1433 0.0004999999999999984 -1027 1434 -0.008333333333333349 -1027 1435 -0.0002814814814814778 -1027 1436 1.301042606982605e-18 -1027 1437 1.734723475976807e-18 -1027 1438 -0.0009703703703703701 -1027 1439 -0.0004999999999999997 -1027 1440 0.008333333333333349 -1028 418 -0.0004999999999999989 -1028 419 -0.001040740740740735 -1028 420 -0.009259259259259259 -1028 424 -4.336808689942018e-18 -1028 425 -0.002362962962962963 -1028 426 -0.03703703703703709 -1028 430 0.000500000000000003 -1028 431 -0.001040740740740759 -1028 432 -0.009259259259259287 -1028 1024 -4.336808689942018e-19 -1028 1025 0.0002814814814814805 -1028 1026 -4.163336342344337e-17 -1028 1027 -5.963111948670274e-18 -1028 1028 0.008325925925925929 -1028 1029 -1.873501354054952e-16 -1028 1030 6.613633252161577e-18 -1028 1031 0.0002814814814814729 -1028 1032 -1.682681771697503e-16 -1028 1432 0.0004999999999999983 -1028 1433 -0.00104074074074073 -1028 1434 0.009259259259259233 -1028 1435 1.409462824231156e-18 -1028 1436 -0.002362962962962958 -1028 1437 0.03703703703703702 -1028 1438 -0.0004999999999999998 -1028 1439 -0.001040740740740737 -1028 1440 0.009259259259259222 -1029 418 -0.01296296296296289 -1029 419 -0.0134259259259259 -1029 420 -0.1551783264746219 -1029 424 -2.185751579730777e-16 -1029 425 -0.02870370370370351 -1029 426 -0.2040466392318244 -1029 430 0.01296296296296311 -1029 431 -0.01342592592592617 -1029 432 -0.1551783264746251 -1029 1024 -0.02407407407407418 -1029 1025 2.255140518769849e-17 -1029 1026 -0.106310013717421 -1029 1027 1.769417945496343e-16 -1029 1029 1.241426611796983 -1029 1030 0.024074074074074 -1029 1031 -2.42861286636753e-17 -1029 1032 -0.1063100137174225 -1029 1432 -0.01296296296296289 -1029 1433 0.01342592592592583 -1029 1434 -0.1551783264746217 -1029 1435 -7.459310946700271e-17 -1029 1436 0.02870370370370384 -1029 1437 -0.204046639231824 -1029 1438 0.01296296296296296 -1029 1439 0.01342592592592592 -1029 1440 -0.1551783264746227 -1030 424 -0.0009703703703703605 -1030 425 -0.0004999999999999969 -1030 426 -0.008333333333333323 -1030 430 -0.0002814814814814747 -1030 431 -4.553649124439119e-18 -1030 432 2.081668171172169e-17 -1030 436 -0.0009703703703703799 -1030 437 0.0005000000000000026 -1030 438 0.008333333333333335 -1030 1027 -0.001659259259259268 -1030 1028 6.613633252161577e-18 -1030 1029 -0.03333333333333335 -1030 1030 0.007762962962962965 -1030 1031 -1.192622389734055e-17 -1030 1033 -0.001659259259259268 -1030 1034 3.577867169202165e-18 -1030 1035 0.03333333333333333 -1030 1435 -0.0009703703703703724 -1030 1436 0.0005000000000000004 -1030 1437 -0.008333333333333351 -1030 1438 -0.0002814814814814711 -1030 1439 2.168404344971009e-19 -1030 1440 -3.469446951953614e-18 -1030 1441 -0.0009703703703703714 -1030 1442 -0.0005000000000000001 -1030 1443 0.008333333333333338 -1031 424 -0.0004999999999999968 -1031 425 -0.001040740740740718 -1031 426 -0.00925925925925912 -1031 430 -4.445228907190568e-18 -1031 431 -0.002362962962962954 -1031 432 -0.03703703703703685 -1031 436 0.0005000000000000025 -1031 437 -0.001040740740740756 -1031 438 -0.009259259259259302 -1031 1027 6.396792817664476e-18 -1031 1028 0.0002814814814814731 -1031 1029 2.012279232133096e-16 -1031 1030 -1.20346441145891e-17 -1031 1031 0.008325925925925914 -1031 1032 1.734723475976807e-16 -1031 1033 3.686287386450715e-18 -1031 1034 0.0002814814814814746 -1031 1035 -7.806255641895632e-17 -1031 1435 0.0005000000000000003 -1031 1436 -0.001040740740740742 -1031 1437 0.009259259259259241 -1031 1438 4.336808689942018e-19 -1031 1439 -0.00236296296296295 -1031 1440 0.03703703703703695 -1031 1441 -0.0005000000000000002 -1031 1442 -0.001040740740740741 -1031 1443 0.009259259259259248 -1032 424 -0.01296296296296284 -1032 425 -0.01342592592592562 -1032 426 -0.1551783264746202 -1032 430 -1.821459649775647e-16 -1032 431 -0.0287037037037036 -1032 432 -0.2040466392318227 -1032 436 0.01296296296296306 -1032 437 -0.01342592592592613 -1032 438 -0.155178326474624 -1032 1027 -0.02407407407407422 -1032 1028 -8.153200337090993e-17 -1032 1029 -0.1063100137174225 -1032 1030 1.994931997373328e-16 -1032 1031 -9.8879238130678e-17 -1032 1032 1.241426611796979 -1032 1033 0.02407407407407401 -1032 1034 1.561251128379126e-17 -1032 1035 -0.1063100137174219 -1032 1435 -0.01296296296296299 -1032 1436 0.01342592592592598 -1032 1437 -0.1551783264746232 -1032 1438 2.602085213965211e-17 -1032 1439 0.02870370370370361 -1032 1440 -0.2040466392318223 -1032 1441 0.01296296296296295 -1032 1442 0.01342592592592591 -1032 1443 -0.1551783264746223 -1033 430 -0.0009703703703703617 -1033 431 -0.0004999999999999974 -1033 432 -0.008333333333333321 -1033 436 -0.0002814814814814802 -1033 437 -4.445228907190568e-18 -1033 438 1.040834085586084e-17 -1033 442 -0.000970370370370379 -1033 443 0.0005000000000000026 -1033 444 0.008333333333333333 -1033 1030 -0.001659259259259268 -1033 1031 3.686287386450715e-18 -1033 1032 -0.03333333333333334 -1033 1033 0.007762962962962975 -1033 1034 -1.008308020411519e-17 -1033 1035 -1.040834085586084e-17 -1033 1036 -0.00165925925925927 -1033 1037 5.204170427930421e-18 -1033 1038 0.03333333333333334 -1033 1438 -0.0009703703703703712 -1033 1439 0.0004999999999999999 -1033 1440 -0.008333333333333349 -1033 1441 -0.0002814814814814742 -1033 1442 5.421010862427522e-19 -1033 1443 -1.214306433183765e-17 -1033 1444 -0.0009703703703703711 -1033 1445 -0.0004999999999999999 -1033 1446 0.008333333333333335 -1034 430 -0.0004999999999999974 -1034 431 -0.001040740740740724 -1034 432 -0.009259259259259172 -1034 436 -4.662069341687669e-18 -1034 437 -0.002362962962962961 -1034 438 -0.0370370370370371 -1034 442 0.0005000000000000028 -1034 443 -0.001040740740740759 -1034 444 -0.009259259259259373 -1034 1030 3.469446951953614e-18 -1034 1031 0.0002814814814814745 -1034 1032 1.43982048506075e-16 -1034 1033 -1.019150042136374e-17 -1034 1034 0.008325925925925931 -1034 1035 3.816391647148976e-17 -1034 1036 5.204170427930421e-18 -1034 1037 0.0002814814814814679 -1034 1038 -2.393918396847994e-16 -1034 1438 0.0004999999999999998 -1034 1439 -0.001040740740740737 -1034 1440 0.009259259259259229 -1034 1441 7.589415207398531e-19 -1034 1442 -0.002362962962962953 -1034 1443 0.03703703703703695 -1034 1444 -0.0005 -1034 1445 -0.00104074074074074 -1034 1446 0.009259259259259189 -1035 430 -0.01296296296296283 -1035 431 -0.01342592592592569 -1035 432 -0.1551783264746202 -1035 436 -1.97758476261356e-16 -1035 437 -0.02870370370370361 -1035 438 -0.2040466392318234 -1035 442 0.01296296296296304 -1035 443 -0.01342592592592613 -1035 444 -0.1551783264746243 -1035 1030 -0.02407407407407423 -1035 1031 -3.295974604355933e-17 -1035 1032 -0.1063100137174219 -1035 1033 2.584737979205443e-16 -1035 1034 -6.938893903907228e-18 -1035 1035 1.241426611796979 -1035 1036 0.02407407407407397 -1035 1037 2.949029909160572e-17 -1035 1038 -0.1063100137174226 -1035 1438 -0.01296296296296296 -1035 1439 0.01342592592592586 -1035 1440 -0.155178326474622 -1035 1441 -6.938893903907228e-18 -1035 1442 0.02870370370370355 -1035 1443 -0.2040466392318224 -1035 1444 0.01296296296296295 -1035 1445 0.01342592592592604 -1035 1446 -0.1551783264746222 -1036 436 -0.0009703703703703614 -1036 437 -0.0004999999999999974 -1036 438 -0.008333333333333333 -1036 442 -0.0002814814814814697 -1036 443 -1.517883041479706e-18 -1036 448 -0.0009703703703703695 -1036 449 0.0004999999999999989 -1036 450 0.008333333333333333 -1036 1033 -0.00165925925925927 -1036 1034 5.204170427930421e-18 -1036 1035 -0.03333333333333333 -1036 1036 0.007762962962962973 -1036 1037 -1.301042606982605e-18 -1036 1038 -1.040834085586084e-17 -1036 1039 -0.001659259259259292 -1036 1040 -3.903127820947816e-18 -1036 1041 0.03333333333333334 -1036 1441 -0.000970370370370371 -1036 1442 0.0005 -1036 1443 -0.008333333333333331 -1036 1444 -0.000281481481481464 -1036 1445 9.75781955236954e-19 -1036 1446 -3.469446951953614e-18 -1036 1447 -0.0009703703703703761 -1036 1448 -0.000500000000000001 -1036 1449 0.008333333333333335 -1037 436 -0.0004999999999999972 -1037 437 -0.001040740740740724 -1037 438 -0.009259259259259228 -1037 442 -1.734723475976807e-18 -1037 443 -0.002362962962962948 -1037 444 -0.03703703703703681 -1037 448 0.000499999999999999 -1037 449 -0.00104074074074073 -1037 450 -0.009259259259259167 -1037 1033 5.312590645178972e-18 -1037 1034 0.0002814814814814679 -1037 1035 5.724587470723463e-17 -1037 1036 -1.301042606982605e-18 -1037 1037 0.008325925925925903 -1037 1038 4.579669976578771e-16 -1037 1039 -4.011548038196366e-18 -1037 1040 0.0002814814814814534 -1037 1041 1.387778780781446e-17 -1037 1441 0.0005 -1037 1442 -0.00104074074074074 -1037 1443 0.009259259259259188 -1037 1444 1.084202172485504e-18 -1037 1445 -0.00236296296296294 -1037 1446 0.03703703703703687 -1037 1447 -0.000500000000000001 -1037 1448 -0.001040740740740743 -1037 1449 0.009259259259259158 -1038 436 -0.01296296296296282 -1038 437 -0.01342592592592565 -1038 438 -0.1551783264746202 -1038 442 -8.500145032286355e-17 -1038 443 -0.02870370370370388 -1038 444 -0.2040466392318215 -1038 448 0.0129629629629629 -1038 449 -0.01342592592592568 -1038 450 -0.1551783264746213 -1038 1033 -0.02407407407407421 -1038 1034 -1.734723475976807e-18 -1038 1035 -0.1063100137174226 -1038 1036 1.127570259384925e-16 -1038 1037 1.040834085586084e-17 -1038 1038 1.241426611796977 -1038 1039 0.0240740740740741 -1038 1040 -2.255140518769849e-17 -1038 1041 -0.1063100137174254 -1038 1441 -0.01296296296296295 -1038 1442 0.01342592592592604 -1038 1443 -0.1551783264746222 -1038 1444 -3.989863994746656e-17 -1038 1445 0.02870370370370315 -1038 1446 -0.2040466392318205 -1038 1447 0.01296296296296299 -1038 1448 0.01342592592592603 -1038 1449 -0.1551783264746228 -1039 442 -0.0009703703703703761 -1039 443 -0.000500000000000001 -1039 444 -0.008333333333333333 -1039 448 -0.0002814814814814641 -1039 449 -9.75781955236954e-19 -1039 454 -0.0009703703703703777 -1039 455 0.000500000000000002 -1039 456 0.008333333333333335 -1039 1036 -0.001659259259259292 -1039 1037 -4.119968255444917e-18 -1039 1038 -0.03333333333333333 -1039 1039 0.007762962962962975 -1039 1040 -3.794707603699266e-18 -1039 1041 -1.387778780781446e-17 -1039 1042 -0.001659259259259267 -1039 1043 7.914675859144182e-18 -1039 1044 0.03333333333333334 -1039 1444 -0.0009703703703703695 -1039 1445 0.0004999999999999989 -1039 1446 -0.008333333333333331 -1039 1447 -0.0002814814814814637 -1039 1448 -9.75781955236954e-19 -1039 1449 -3.469446951953614e-18 -1039 1450 -0.0009703703703703645 -1039 1451 -0.000499999999999998 -1039 1452 0.008333333333333335 -1040 442 -0.0005000000000000011 -1040 443 -0.001040740740740743 -1040 444 -0.009259259259259222 -1040 448 -1.084202172485504e-18 -1040 449 -0.002362962962962941 -1040 450 -0.03703703703703688 -1040 454 0.0005000000000000022 -1040 455 -0.001040740740740753 -1040 456 -0.009259259259259287 -1040 1036 -3.903127820947816e-18 -1040 1037 0.0002814814814814535 -1040 1038 -2.0643209364124e-16 -1040 1039 -3.903127820947816e-18 -1040 1040 0.008325925925925903 -1040 1041 -2.255140518769849e-16 -1040 1042 7.914675859144182e-18 -1040 1043 0.0002814814814814748 -1040 1044 -1.682681771697503e-16 -1040 1444 0.0004999999999999989 -1040 1445 -0.001040740740740729 -1040 1446 0.009259259259259103 -1040 1447 -9.75781955236954e-19 -1040 1448 -0.00236296296296294 -1040 1449 0.0370370370370367 -1040 1450 -0.0004999999999999981 -1040 1451 -0.001040740740740726 -1040 1452 0.009259259259259186 -1041 442 -0.01296296296296299 -1041 443 -0.01342592592592586 -1041 444 -0.1551783264746228 -1041 448 -4.163336342344337e-17 -1041 449 -0.02870370370370319 -1041 450 -0.2040466392318206 -1041 454 0.01296296296296303 -1041 455 -0.01342592592592611 -1041 456 -0.1551783264746237 -1041 1036 -0.02407407407407412 -1041 1038 -0.1063100137174254 -1041 1039 1.387778780781446e-17 -1041 1040 -8.326672684688674e-17 -1041 1041 1.241426611796977 -1041 1042 0.0240740740740741 -1041 1043 2.081668171172169e-17 -1041 1044 -0.1063100137174218 -1041 1444 -0.01296296296296291 -1041 1445 0.01342592592592586 -1041 1446 -0.1551783264746213 -1041 1447 4.336808689942018e-17 -1041 1448 0.02870370370370369 -1041 1449 -0.2040466392318205 -1041 1450 0.01296296296296286 -1041 1451 0.01342592592592569 -1041 1452 -0.1551783264746206 -1042 448 -0.0009703703703703643 -1042 449 -0.0004999999999999981 -1042 450 -0.008333333333333333 -1042 454 -0.0002814814814815044 -1042 455 -3.035766082959412e-18 -1042 456 -1.734723475976807e-18 -1042 460 -0.0009703703703703693 -1042 461 0.0005000000000000011 -1042 462 0.008333333333333335 -1042 1039 -0.001659259259259267 -1042 1040 7.914675859144182e-18 -1042 1041 -0.03333333333333333 -1042 1042 0.007762962962962947 -1042 1043 -1.170938346284345e-17 -1042 1044 -1.387778780781446e-17 -1042 1045 -0.001659259259259198 -1042 1046 3.794707603699266e-18 -1042 1047 0.03333333333333334 -1042 1447 -0.0009703703703703777 -1042 1448 0.0005000000000000021 -1042 1449 -0.008333333333333331 -1042 1450 -0.0002814814814815042 -1042 1451 -3.144186300207963e-18 -1042 1452 -1.734723475976807e-18 -1042 1453 -0.0009703703703703628 -1042 1454 -0.0004999999999999989 -1042 1455 0.008333333333333335 -1043 448 -0.000499999999999998 -1043 449 -0.001040740740740726 -1043 450 -0.009259259259259177 -1043 454 -3.252606517456513e-18 -1043 455 -0.002362962962962994 -1043 456 -0.03703703703703732 -1043 460 0.0005000000000000009 -1043 461 -0.001040740740740756 -1043 462 -0.009259259259259479 -1043 1039 7.914675859144182e-18 -1043 1040 0.0002814814814814748 -1043 1041 2.775557561562891e-16 -1043 1042 -1.170938346284345e-17 -1043 1043 0.008325925925925955 -1043 1044 1.283695372222837e-16 -1043 1045 4.011548038196366e-18 -1043 1046 0.0002814814814815338 -1043 1047 -1.838806884535416e-16 -1043 1447 0.000500000000000002 -1043 1448 -0.001040740740740753 -1043 1449 0.009259259259259297 -1043 1450 -3.035766082959412e-18 -1043 1451 -0.002362962962962993 -1043 1452 0.03703703703703738 -1043 1453 -0.0004999999999999989 -1043 1454 -0.001040740740740743 -1043 1455 0.009259259259259401 -1044 448 -0.01296296296296286 -1044 449 -0.01342592592592575 -1044 450 -0.1551783264746207 -1044 454 -1.994931997373328e-16 -1044 455 -0.02870370370370416 -1044 456 -0.2040466392318294 -1044 460 0.01296296296296306 -1044 461 -0.01342592592592612 -1044 462 -0.1551783264746258 -1044 1039 -0.02407407407407412 -1044 1040 -2.602085213965211e-17 -1044 1041 -0.1063100137174218 -1044 1042 1.595945597898663e-16 -1044 1043 1.387778780781446e-17 -1044 1044 1.241426611796989 -1044 1045 0.02407407407407396 -1044 1046 1.387778780781446e-17 -1044 1047 -0.1063100137174137 -1044 1447 -0.01296296296296303 -1044 1448 0.01342592592592605 -1044 1449 -0.1551783264746237 -1044 1450 5.551115123125783e-17 -1044 1451 0.02870370370370394 -1044 1452 -0.2040466392318294 -1044 1453 0.01296296296296298 -1044 1454 0.01342592592592604 -1044 1455 -0.1551783264746242 -1045 454 -0.0009703703703703627 -1045 455 -0.000499999999999999 -1045 456 -0.008333333333333333 -1045 460 -0.0002814814814814935 -1045 461 -1.626303258728257e-18 -1045 462 -1.734723475976807e-18 -1045 466 -0.000970370370370375 -1045 467 0.0005000000000000007 -1045 468 0.008333333333333333 -1045 1042 -0.001659259259259198 -1045 1043 4.011548038196366e-18 -1045 1044 -0.03333333333333333 -1045 1045 0.007762962962962954 -1045 1046 -6.722053469410127e-18 -1045 1047 -6.938893903907228e-18 -1045 1048 -0.001659259259259292 -1045 1049 2.710505431213761e-18 -1045 1050 0.03333333333333334 -1045 1450 -0.0009703703703703694 -1045 1451 0.0005000000000000009 -1045 1452 -0.008333333333333333 -1045 1453 -0.0002814814814814933 -1045 1454 -1.517883041479706e-18 -1045 1455 -3.469446951953614e-18 -1045 1456 -0.0009703703703703705 -1045 1457 -0.0004999999999999994 -1045 1458 0.008333333333333335 -1046 454 -0.0004999999999999989 -1046 455 -0.001040740740740743 -1046 456 -0.009259259259259424 -1046 460 -1.409462824231156e-18 -1046 461 -0.002362962962962979 -1046 462 -0.03703703703703717 -1046 466 0.0005000000000000008 -1046 467 -0.001040740740740741 -1046 468 -0.009259259259259198 -1046 1042 3.794707603699266e-18 -1046 1043 0.000281481481481534 -1046 1044 3.642919299551295e-17 -1046 1045 -6.830473686658678e-18 -1046 1046 0.008325925925925941 -1046 1047 1.422473250300982e-16 -1046 1048 2.49366499671666e-18 -1046 1049 0.0002814814814814535 -1046 1050 -1.058181320345852e-16 -1046 1450 0.0005000000000000011 -1046 1451 -0.001040740740740756 -1046 1452 0.009259259259259457 -1046 1453 -1.734723475976807e-18 -1046 1454 -0.002362962962962978 -1046 1455 0.03703703703703724 -1046 1456 -0.0004999999999999994 -1046 1457 -0.001040740740740732 -1046 1458 0.009259259259259129 -1047 454 -0.01296296296296298 -1047 455 -0.01342592592592594 -1047 456 -0.1551783264746243 -1047 460 5.204170427930421e-18 -1047 461 -0.02870370370370399 -1047 462 -0.2040466392318275 -1047 466 0.01296296296296297 -1047 467 -0.01342592592592588 -1047 468 -0.1551783264746226 -1047 1042 -0.02407407407407396 -1047 1043 -1.387778780781446e-17 -1047 1044 -0.1063100137174136 -1047 1045 -1.405126015541214e-16 -1047 1046 1.908195823574488e-17 -1047 1047 1.241426611796988 -1047 1048 0.0240740740740741 -1047 1049 1.734723475976807e-18 -1047 1050 -0.1063100137174254 -1047 1450 -0.01296296296296307 -1047 1451 0.01342592592592621 -1047 1452 -0.1551783264746258 -1047 1453 1.491862189340054e-16 -1047 1454 0.02870370370370376 -1047 1455 -0.2040466392318274 -1047 1456 0.01296296296296292 -1047 1457 0.01342592592592583 -1047 1458 -0.1551783264746215 -1048 460 -0.0009703703703703707 -1048 461 -0.0004999999999999994 -1048 462 -0.008333333333333333 -1048 466 -0.0002814814814814642 -1048 467 -3.035766082959412e-18 -1048 472 -0.0009703703703703787 -1048 473 0.0005000000000000024 -1048 474 0.008333333333333335 -1048 1045 -0.001659259259259292 -1048 1046 2.49366499671666e-18 -1048 1047 -0.03333333333333333 -1048 1048 0.007762962962962975 -1048 1049 -1.170938346284345e-17 -1048 1050 -1.387778780781446e-17 -1048 1051 -0.001659259259259267 -1048 1052 9.215718466126788e-18 -1048 1053 0.03333333333333334 -1048 1453 -0.000970370370370375 -1048 1454 0.0005000000000000007 -1048 1455 -0.008333333333333331 -1048 1456 -0.0002814814814814638 -1048 1457 -3.035766082959412e-18 -1048 1458 -3.469446951953614e-18 -1048 1459 -0.0009703703703703633 -1048 1460 -0.0004999999999999976 -1048 1461 0.008333333333333335 -1049 460 -0.0004999999999999995 -1049 461 -0.001040740740740732 -1049 462 -0.009259259259259162 -1049 466 -3.144186300207963e-18 -1049 467 -0.00236296296296294 -1049 468 -0.03703703703703686 -1049 472 0.0005000000000000025 -1049 473 -0.001040740740740755 -1049 474 -0.009259259259259304 -1049 1045 2.818925648462312e-18 -1049 1046 0.0002814814814814535 -1049 1047 3.989863994746656e-17 -1049 1048 -1.170938346284345e-17 -1049 1049 0.008325925925925903 -1049 1050 -1.179611963664229e-16 -1049 1051 9.215718466126788e-18 -1049 1052 0.0002814814814814749 -1049 1053 -2.272487753529617e-16 -1049 1453 0.0005000000000000007 -1049 1454 -0.001040740740740741 -1049 1455 0.009259259259259165 -1049 1456 -3.035766082959412e-18 -1049 1457 -0.00236296296296294 -1049 1458 0.03703703703703673 -1049 1459 -0.0004999999999999977 -1049 1460 -0.001040740740740724 -1049 1461 0.009259259259259172 -1050 460 -0.01296296296296292 -1050 461 -0.01342592592592576 -1050 462 -0.1551783264746215 -1050 466 -1.249000902703301e-16 -1050 467 -0.02870370370370328 -1050 468 -0.2040466392318206 -1050 472 0.01296296296296304 -1050 473 -0.01342592592592612 -1050 474 -0.155178326474624 -1050 1045 -0.02407407407407412 -1050 1046 -1.561251128379126e-17 -1050 1047 -0.1063100137174254 -1050 1048 1.387778780781446e-17 -1050 1049 -7.28583859910259e-17 -1050 1050 1.241426611796977 -1050 1051 0.0240740740740741 -1050 1052 2.42861286636753e-17 -1050 1053 -0.1063100137174218 -1050 1453 -0.01296296296296297 -1050 1454 0.01342592592592595 -1050 1455 -0.1551783264746225 -1050 1456 1.249000902703301e-16 -1050 1457 0.02870370370370359 -1050 1458 -0.2040466392318205 -1050 1459 0.01296296296296285 -1050 1460 0.01342592592592568 -1050 1461 -0.1551783264746203 -1051 466 -0.0009703703703703633 -1051 467 -0.0004999999999999977 -1051 468 -0.008333333333333333 -1051 472 -0.0002814814814814748 -1051 473 3.252606517456513e-19 -1051 474 -1.734723475976807e-18 -1051 478 -0.0009703703703703621 -1051 479 0.0004999999999999974 -1051 480 0.008333333333333335 -1051 1048 -0.001659259259259267 -1051 1049 9.215718466126788e-18 -1051 1050 -0.03333333333333333 -1051 1051 0.007762962962962968 -1051 1052 1.409462824231156e-18 -1051 1053 -1.387778780781446e-17 -1051 1054 -0.001659259259259267 -1051 1055 -1.062518129035794e-17 -1051 1056 0.03333333333333334 -1051 1456 -0.0009703703703703789 -1051 1457 0.0005000000000000024 -1051 1458 -0.008333333333333331 -1051 1459 -0.0002814814814814745 -1051 1460 2.168404344971009e-19 -1051 1461 -3.469446951953614e-18 -1051 1462 -0.00097037037037038 -1051 1463 -0.0005000000000000026 -1051 1464 0.008333333333333335 -1052 466 -0.0004999999999999976 -1052 467 -0.001040740740740724 -1052 468 -0.009259259259259172 -1052 472 1.084202172485504e-19 -1052 473 -0.002362962962962955 -1052 474 -0.03703703703703684 -1052 478 0.0004999999999999974 -1052 479 -0.001040740740740722 -1052 480 -0.009259259259259169 -1052 1048 9.215718466126788e-18 -1052 1049 0.0002814814814814748 -1052 1050 2.914335439641036e-16 -1052 1051 1.409462824231156e-18 -1052 1052 0.008325925925925917 -1052 1053 5.724587470723463e-16 -1052 1054 -1.073360150760649e-17 -1052 1055 0.0002814814814814749 -1052 1056 3.070460552478949e-16 -1052 1456 0.0005000000000000024 -1052 1457 -0.001040740740740755 -1052 1458 0.0092592592592593 -1052 1459 4.336808689942018e-19 -1052 1460 -0.002362962962962954 -1052 1461 0.03703703703703706 -1052 1462 -0.0005000000000000026 -1052 1463 -0.001040740740740757 -1052 1464 0.009259259259259304 -1053 466 -0.01296296296296285 -1053 467 -0.01342592592592571 -1053 468 -0.1551783264746204 -1053 472 1.561251128379126e-17 -1053 473 -0.02870370370370402 -1053 474 -0.2040466392318225 -1053 478 0.01296296296296283 -1053 479 -0.01342592592592566 -1053 480 -0.1551783264746201 -1053 1048 -0.02407407407407412 -1053 1049 -3.122502256758253e-17 -1053 1050 -0.1063100137174218 -1053 1051 1.734723475976807e-17 -1053 1052 1.734723475976807e-18 -1053 1053 1.241426611796977 -1053 1054 0.0240740740740741 -1053 1055 -3.642919299551295e-17 -1053 1056 -0.1063100137174218 -1053 1456 -0.01296296296296305 -1053 1457 0.01342592592592609 -1053 1458 -0.155178326474624 -1053 1459 -1.040834085586084e-17 -1053 1460 0.02870370370370322 -1053 1461 -0.2040466392318224 -1053 1462 0.01296296296296306 -1053 1463 0.01342592592592614 -1053 1464 -0.1551783264746242 -1054 472 -0.0009703703703703799 -1054 473 -0.0005000000000000027 -1054 474 -0.008333333333333333 -1054 478 -0.0002814814814814937 -1054 479 2.38524477946811e-18 -1054 480 -1.734723475976807e-18 -1054 484 -0.0009703703703703689 -1054 485 0.0005000000000000003 -1054 486 0.008333333333333333 -1054 1051 -0.001659259259259267 -1054 1052 -1.073360150760649e-17 -1054 1053 -0.03333333333333333 -1054 1054 0.007762962962962956 -1054 1055 9.324138683375338e-18 -1054 1056 -1.387778780781446e-17 -1054 1057 -0.001659259259259223 -1054 1058 1.409462824231156e-18 -1054 1059 0.03333333333333334 -1054 1459 -0.0009703703703703622 -1054 1460 0.0004999999999999974 -1054 1461 -0.008333333333333331 -1054 1462 -0.0002814814814814934 -1054 1463 2.276824562219559e-18 -1054 1464 -1.734723475976807e-18 -1054 1465 -0.0009703703703703667 -1054 1466 -0.0004999999999999997 -1054 1467 0.008333333333333335 -1055 472 -0.0005000000000000026 -1055 473 -0.001040740740740757 -1055 474 -0.009259259259259316 -1055 478 2.38524477946811e-18 -1055 479 -0.00236296296296298 -1055 480 -0.03703703703703728 -1055 484 0.0005000000000000003 -1055 485 -0.001040740740740748 -1055 486 -0.009259259259259377 -1055 1051 -1.062518129035794e-17 -1055 1052 0.0002814814814814749 -1055 1053 -2.844946500601964e-16 -1055 1054 9.324138683375338e-18 -1055 1055 0.008325925925925941 -1055 1056 -3.261280134836397e-16 -1055 1057 1.301042606982605e-18 -1055 1058 0.0002814814814815125 -1055 1059 -6.938893903907228e-17 -1055 1459 0.0004999999999999973 -1055 1460 -0.001040740740740722 -1055 1461 0.009259259259259156 -1055 1462 2.276824562219559e-18 -1055 1463 -0.002362962962962979 -1055 1464 0.03703703703703713 -1055 1465 -0.0004999999999999997 -1055 1466 -0.001040740740740744 -1055 1467 0.009259259259259356 -1056 472 -0.01296296296296306 -1056 473 -0.01342592592592613 -1056 474 -0.1551783264746242 -1056 478 2.42861286636753e-17 -1056 479 -0.02870370370370362 -1056 480 -0.2040466392318275 -1056 484 0.01296296296296303 -1056 485 -0.01342592592592605 -1056 486 -0.1551783264746252 -1056 1051 -0.02407407407407412 -1056 1052 2.42861286636753e-17 -1056 1053 -0.1063100137174218 -1056 1054 1.613292832658431e-16 -1056 1055 -2.775557561562891e-17 -1056 1056 1.241426611796988 -1056 1057 0.02407407407407396 -1056 1058 8.673617379884035e-18 -1056 1059 -0.1063100137174172 -1056 1459 -0.01296296296296284 -1056 1460 0.01342592592592566 -1056 1461 -0.1551783264746201 -1056 1462 -1.717376241217039e-16 -1056 1463 0.02870370370370412 -1056 1464 -0.2040466392318274 -1056 1465 0.01296296296296301 -1056 1466 0.01342592592592602 -1056 1467 -0.1551783264746246 -1057 478 -0.0009703703703703668 -1057 479 -0.0004999999999999998 -1057 480 -0.008333333333333333 -1057 484 -0.0002814814814814937 -1057 485 -2.168404344971009e-19 -1057 490 -0.000970370370370371 -1057 491 0.0005 -1057 492 0.008333333333333335 -1057 1054 -0.001659259259259223 -1057 1055 1.301042606982605e-18 -1057 1056 -0.03333333333333333 -1057 1057 0.007762962962962956 -1057 1058 -1.301042606982605e-18 -1057 1059 -1.040834085586084e-17 -1057 1060 -0.001659259259259267 -1057 1062 0.03333333333333334 -1057 1462 -0.0009703703703703688 -1057 1463 0.0005000000000000003 -1057 1464 -0.008333333333333333 -1057 1465 -0.0002814814814814931 -1057 1466 -4.336808689942018e-19 -1057 1467 -3.469446951953614e-18 -1057 1468 -0.0009703703703703711 -1057 1469 -0.0004999999999999999 -1057 1470 0.008333333333333335 -1058 478 -0.0004999999999999998 -1058 479 -0.001040740740740744 -1058 480 -0.009259259259259358 -1058 484 -3.252606517456513e-19 -1058 485 -0.002362962962962979 -1058 486 -0.03703703703703715 -1058 490 0.0005000000000000001 -1058 491 -0.00104074074074074 -1058 492 -0.009259259259259287 -1058 1054 1.409462824231156e-18 -1058 1055 0.0002814814814815126 -1058 1056 5.204170427930421e-18 -1058 1057 -1.301042606982605e-18 -1058 1058 0.008325925925925941 -1058 1059 2.255140518769849e-16 -1058 1060 -1.084202172485504e-19 -1058 1061 0.0002814814814814749 -1058 1062 -1.595945597898663e-16 -1058 1462 0.0005000000000000003 -1058 1463 -0.001040740740740748 -1058 1464 0.009259259259259375 -1058 1465 -3.252606517456513e-19 -1058 1466 -0.002362962962962978 -1058 1467 0.03703703703703726 -1058 1468 -0.0005 -1058 1469 -0.00104074074074074 -1058 1470 0.009259259259259189 -1059 478 -0.01296296296296301 -1059 479 -0.01342592592592599 -1059 480 -0.1551783264746247 -1059 484 6.418476861114186e-17 -1059 485 -0.02870370370370406 -1059 486 -0.2040466392318275 -1059 490 0.01296296296296294 -1059 491 -0.01342592592592576 -1059 492 -0.1551783264746222 -1059 1054 -0.02407407407407396 -1059 1056 -0.1063100137174172 -1059 1057 -1.35308431126191e-16 -1059 1058 1.908195823574488e-17 -1059 1059 1.241426611796988 -1059 1060 0.0240740740740741 -1059 1061 -2.42861286636753e-17 -1059 1062 -0.1063100137174218 -1059 1462 -0.01296296296296304 -1059 1463 0.01342592592592608 -1059 1464 -0.1551783264746251 -1059 1465 8.847089727481716e-17 -1059 1466 0.02870370370370369 -1059 1467 -0.2040466392318274 -1059 1468 0.01296296296296295 -1059 1469 0.01342592592592604 -1059 1470 -0.1551783264746222 -1060 484 -0.000970370370370371 -1060 485 -0.0005000000000000001 -1060 486 -0.008333333333333333 -1060 490 -0.0002814814814814643 -1060 491 -2.168404344971009e-19 -1060 492 -1.734723475976807e-18 -1060 496 -0.0009703703703703739 -1060 497 0.0005000000000000003 -1060 498 0.008333333333333333 -1060 1057 -0.001659259259259267 -1060 1058 -1.084202172485504e-19 -1060 1059 -0.03333333333333333 -1060 1060 0.007762962962962975 -1060 1061 -1.301042606982605e-18 -1060 1062 -1.040834085586084e-17 -1060 1063 -0.001659259259259292 -1060 1064 1.409462824231156e-18 -1060 1065 0.03333333333333334 -1060 1465 -0.000970370370370371 -1060 1466 0.0005 -1060 1467 -0.008333333333333331 -1060 1468 -0.000281481481481464 -1060 1469 -3.252606517456513e-19 -1060 1470 -3.469446951953614e-18 -1060 1471 -0.0009703703703703715 -1060 1472 -0.0004999999999999997 -1060 1473 0.008333333333333335 -1061 484 -0.0005 -1061 485 -0.00104074074074074 -1061 486 -0.009259259259259285 -1061 490 -3.252606517456513e-19 -1061 491 -0.002362962962962941 -1061 492 -0.03703703703703678 -1061 496 0.0005000000000000004 -1061 497 -0.001040740740740739 -1061 498 -0.009259259259259182 -1061 1058 0.0002814814814814749 -1061 1059 -1.595945597898663e-16 -1061 1060 -1.409462824231156e-18 -1061 1061 0.008325925925925905 -1061 1062 1.908195823574488e-16 -1061 1063 1.301042606982605e-18 -1061 1064 0.0002814814814814534 -1061 1065 -4.683753385137379e-17 -1061 1465 0.0005 -1061 1466 -0.00104074074074074 -1061 1467 0.009259259259259188 -1061 1468 -2.168404344971009e-19 -1061 1469 -0.00236296296296294 -1061 1470 0.03703703703703681 -1061 1471 -0.0004999999999999997 -1061 1472 -0.001040740740740734 -1061 1473 0.009259259259259143 -1062 484 -0.01296296296296295 -1062 485 -0.01342592592592576 -1062 486 -0.1551783264746222 -1062 490 -1.214306433183765e-17 -1062 491 -0.02870370370370354 -1062 492 -0.2040466392318206 -1062 496 0.01296296296296296 -1062 497 -0.01342592592592587 -1062 498 -0.1551783264746223 -1062 1057 -0.02407407407407412 -1062 1058 -2.255140518769849e-17 -1062 1059 -0.1063100137174218 -1062 1060 1.561251128379126e-17 -1062 1061 -3.989863994746656e-17 -1062 1062 1.241426611796977 -1062 1063 0.0240740740740741 -1062 1064 3.469446951953614e-18 -1062 1065 -0.1063100137174254 -1062 1465 -0.01296296296296295 -1062 1466 0.01342592592592604 -1062 1467 -0.1551783264746222 -1062 1468 1.561251128379126e-17 -1062 1469 0.02870370370370334 -1062 1470 -0.2040466392318205 -1062 1471 0.01296296296296293 -1062 1472 0.01342592592592584 -1062 1473 -0.1551783264746218 -1063 490 -0.0009703703703703718 -1063 491 -0.0004999999999999997 -1063 492 -0.008333333333333333 -1063 496 -0.0002814814814814654 -1063 497 -2.38524477946811e-18 -1063 502 -0.0009703703703703775 -1063 503 0.0005000000000000021 -1063 504 0.008333333333333335 -1063 1060 -0.001659259259259292 -1063 1061 1.301042606982605e-18 -1063 1062 -0.03333333333333333 -1063 1063 0.007762962962962975 -1063 1064 -9.107298248878237e-18 -1063 1065 -1.040834085586084e-17 -1063 1066 -0.001659259259259264 -1063 1067 7.806255641895632e-18 -1063 1068 0.03333333333333334 -1063 1468 -0.0009703703703703737 -1063 1469 0.0005000000000000002 -1063 1470 -0.008333333333333331 -1063 1471 -0.000281481481481465 -1063 1472 -2.276824562219559e-18 -1063 1473 -1.734723475976807e-18 -1063 1474 -0.0009703703703703641 -1063 1475 -0.000499999999999998 -1063 1476 0.008333333333333335 -1064 490 -0.0004999999999999998 -1064 491 -0.001040740740740734 -1064 492 -0.009259259259259165 -1064 496 -2.49366499671666e-18 -1064 497 -0.002362962962962942 -1064 498 -0.0370370370370369 -1064 502 0.0005000000000000022 -1064 503 -0.001040740740740754 -1064 504 -0.009259259259259302 -1064 1060 1.517883041479706e-18 -1064 1061 0.0002814814814814534 -1064 1062 2.42861286636753e-17 -1064 1063 -9.107298248878237e-18 -1064 1064 0.008325925925925905 -1064 1065 -1.387778780781446e-16 -1064 1066 7.914675859144182e-18 -1064 1067 0.0002814814814814774 -1064 1068 -1.578598363138894e-16 -1064 1468 0.0005000000000000002 -1064 1469 -0.001040740740740738 -1064 1470 0.009259259259259162 -1064 1471 -2.38524477946811e-18 -1064 1472 -0.002362962962962941 -1064 1473 0.03703703703703673 -1064 1474 -0.0004999999999999981 -1064 1475 -0.001040740740740727 -1064 1476 0.009259259259259189 -1065 490 -0.01296296296296293 -1065 491 -0.01342592592592581 -1065 492 -0.1551783264746218 -1065 496 -9.71445146547012e-17 -1065 497 -0.02870370370370325 -1065 498 -0.2040466392318208 -1065 502 0.01296296296296303 -1065 503 -0.01342592592592611 -1065 504 -0.1551783264746237 -1065 1060 -0.02407407407407412 -1065 1061 -6.938893903907228e-18 -1065 1062 -0.1063100137174254 -1065 1063 1.214306433183765e-17 -1065 1064 -1.040834085586084e-16 -1065 1065 1.241426611796977 -1065 1066 0.0240740740740741 -1065 1067 1.387778780781446e-17 -1065 1068 -0.1063100137174214 -1065 1468 -0.01296296296296296 -1065 1469 0.01342592592592591 -1065 1470 -0.1551783264746223 -1065 1471 9.8879238130678e-17 -1065 1472 0.02870370370370367 -1065 1473 -0.2040466392318207 -1065 1474 0.01296296296296286 -1065 1475 0.0134259259259257 -1065 1476 -0.1551783264746207 -1066 496 -0.0009703703703703642 -1066 497 -0.0004999999999999981 -1066 498 -0.008333333333333333 -1066 502 -0.0002814814814814761 -1066 503 -1.734723475976807e-18 -1066 504 -1.734723475976807e-18 -1066 508 -0.0009703703703703698 -1066 509 0.0004999999999999998 -1066 510 0.008333333333333335 -1066 1063 -0.001659259259259264 -1066 1064 7.914675859144182e-18 -1066 1065 -0.03333333333333333 -1066 1066 0.007762962962962968 -1066 1067 -6.505213034913027e-18 -1066 1068 -1.734723475976807e-17 -1066 1069 -0.001659259259259267 -1066 1070 -1.409462824231156e-18 -1066 1071 0.03333333333333334 -1066 1471 -0.0009703703703703774 -1066 1472 0.0005000000000000021 -1066 1473 -0.008333333333333333 -1066 1474 -0.0002814814814814758 -1066 1475 -1.843143693225358e-18 -1066 1476 -3.469446951953614e-18 -1066 1477 -0.0009703703703703722 -1066 1478 -0.0005000000000000002 -1066 1479 0.008333333333333335 -1067 496 -0.000499999999999998 -1067 497 -0.001040740740740727 -1067 498 -0.009259259259259191 -1067 502 -1.843143693225358e-18 -1067 503 -0.002362962962962956 -1067 504 -0.03703703703703691 -1067 508 0.0004999999999999998 -1067 509 -0.001040740740740737 -1067 510 -0.009259259259259273 -1067 1063 7.806255641895632e-18 -1067 1064 0.0002814814814814774 -1067 1065 2.862293735361732e-16 -1067 1066 -6.505213034913027e-18 -1067 1067 0.008325925925925919 -1067 1068 4.336808689942018e-16 -1067 1069 -1.409462824231156e-18 -1067 1070 0.0002814814814814749 -1067 1071 -1.006139616066548e-16 -1067 1471 0.0005000000000000021 -1067 1472 -0.001040740740740753 -1067 1473 0.009259259259259302 -1067 1474 -1.626303258728257e-18 -1067 1475 -0.002362962962962956 -1067 1476 0.03703703703703702 -1067 1477 -0.0005000000000000003 -1067 1478 -0.001040740740740742 -1067 1479 0.009259259259259203 -1068 496 -0.01296296296296286 -1068 497 -0.01342592592592575 -1068 498 -0.1551783264746207 -1068 502 -6.765421556309548e-17 -1068 503 -0.0287037037037039 -1068 504 -0.2040466392318227 -1068 508 0.01296296296296293 -1068 509 -0.01342592592592575 -1068 510 -0.1551783264746219 -1068 1063 -0.02407407407407412 -1068 1064 -3.295974604355933e-17 -1068 1065 -0.1063100137174214 -1068 1066 1.734723475976807e-17 -1068 1067 -3.989863994746656e-17 -1068 1068 1.241426611796978 -1068 1069 0.0240740740740741 -1068 1070 -2.255140518769849e-17 -1068 1071 -0.1063100137174218 -1068 1471 -0.01296296296296303 -1068 1472 0.01342592592592605 -1068 1473 -0.1551783264746237 -1068 1474 7.28583859910259e-17 -1068 1475 0.02870370370370338 -1068 1476 -0.2040466392318226 -1068 1477 0.01296296296296296 -1068 1478 0.01342592592592605 -1068 1479 -0.1551783264746224 -1069 502 -0.0009703703703703722 -1069 503 -0.0005000000000000004 -1069 504 -0.008333333333333333 -1069 508 -0.0002814814814814952 -1069 509 4.336808689942018e-19 -1069 510 -1.734723475976807e-18 -1069 514 -0.0009703703703703678 -1069 515 0.0005 -1069 516 0.008333333333333335 -1069 1066 -0.001659259259259267 -1069 1067 -1.409462824231156e-18 -1069 1068 -0.03333333333333333 -1069 1069 0.007762962962962966 -1069 1070 6.613633252161577e-18 -1069 1072 -0.001659259259259233 -1069 1073 -5.421010862427522e-18 -1069 1074 0.03333333333333334 -1069 1474 -0.0009703703703703699 -1069 1475 0.0004999999999999997 -1069 1476 -0.008333333333333331 -1069 1477 -0.0002814814814814829 -1069 1478 3.035766082959412e-18 -1069 1479 3.469446951953614e-18 -1069 1480 -0.0009703703703703782 -1069 1481 -0.0005000000000000026 -1069 1482 0.008333333333333338 -1070 502 -0.0005000000000000003 -1070 503 -0.001040740740740742 -1070 504 -0.00925925925925929 -1070 508 3.252606517456513e-19 -1070 509 -0.002362962962962982 -1070 510 -0.03703703703703721 -1070 514 0.0005 -1070 515 -0.001040740740740747 -1070 516 -0.009259259259259377 -1070 1066 -1.409462824231156e-18 -1070 1067 0.0002814814814814749 -1070 1068 -1.752070710736575e-16 -1070 1069 6.505213034913027e-18 -1070 1070 0.008325925925925955 -1070 1071 1.283695372222837e-16 -1070 1072 -5.421010862427522e-18 -1070 1073 0.0002814814814815038 -1070 1074 7.28583859910259e-17 -1070 1474 0.0004999999999999997 -1070 1475 -0.001040740740740737 -1070 1476 0.009259259259259184 -1070 1477 3.144186300207963e-18 -1070 1478 -0.002362962962962965 -1070 1479 0.03703703703703717 -1070 1480 -0.0005000000000000026 -1070 1481 -0.00104074074074076 -1070 1482 0.009259259259259375 -1071 502 -0.01296296296296296 -1071 503 -0.0134259259259258 -1071 504 -0.1551783264746224 -1071 508 -6.071532165918825e-17 -1071 509 -0.02870370370370397 -1071 510 -0.2040466392318278 -1071 514 0.01296296296296302 -1071 515 -0.01342592592592604 -1071 516 -0.1551783264746249 -1071 1066 -0.02407407407407412 -1071 1067 -2.081668171172169e-17 -1071 1068 -0.1063100137174218 -1071 1069 1.873501354054952e-16 -1071 1070 1.179611963664229e-16 -1071 1071 1.241426611796987 -1071 1072 0.02407407407407394 -1071 1073 1.058181320345852e-16 -1071 1074 -0.1063100137174183 -1071 1474 -0.01296296296296293 -1071 1475 0.01342592592592599 -1071 1476 -0.1551783264746219 -1071 1477 -2.0643209364124e-16 -1071 1478 0.02870370370370341 -1071 1479 -0.2040466392318247 -1071 1480 0.01296296296296313 -1071 1481 0.01342592592592623 -1071 1482 -0.1551783264746256 -1072 508 -0.0009703703703703678 -1072 509 -0.0005000000000000001 -1072 510 -0.008333333333333333 -1072 514 -0.000281481481481495 -1072 515 -2.276824562219559e-18 -1072 516 -1.734723475976807e-18 -1072 520 -0.0009703703703703787 -1072 521 0.0005000000000000024 -1072 522 0.008333333333333335 -1072 1069 -0.001659259259259233 -1072 1070 -5.421010862427522e-18 -1072 1071 -0.03333333333333334 -1072 1072 0.007762962962962958 -1072 1073 1.084202172485504e-19 -1072 1074 -1.387778780781446e-17 -1072 1075 -0.001659259259259261 -1072 1076 5.204170427930421e-18 -1072 1077 0.03333333333333335 -1072 1477 -0.0009703703703703608 -1072 1478 0.0004999999999999973 -1072 1479 -0.00833333333333334 -1072 1480 -0.0002814814814814915 -1072 1481 2.38524477946811e-18 -1072 1482 -3.469446951953614e-18 -1072 1483 -0.0009703703703703688 -1072 1484 -0.0004999999999999997 -1072 1485 0.008333333333333338 -1073 508 -0.0005000000000000001 -1073 509 -0.001040740740740747 -1073 510 -0.009259259259259377 -1073 514 -2.38524477946811e-18 -1073 515 -0.002362962962962981 -1073 516 -0.03703703703703731 -1073 520 0.0005000000000000025 -1073 521 -0.001040740740740755 -1073 522 -0.009259259259259304 -1073 1069 -5.204170427930421e-18 -1073 1070 0.0002814814814815038 -1073 1071 -2.255140518769849e-16 -1073 1073 0.008325925925925941 -1073 1074 -3.400058012914542e-16 -1073 1075 5.312590645178972e-18 -1073 1076 0.000281481481481479 -1073 1077 -9.367506770274758e-17 -1073 1477 0.0004999999999999974 -1073 1478 -0.001040740740740725 -1073 1479 0.009259259259259226 -1073 1480 2.276824562219559e-18 -1073 1481 -0.002362962962962976 -1073 1482 0.03703703703703712 -1073 1483 -0.0004999999999999998 -1073 1484 -0.00104074074074074 -1073 1485 0.009259259259259283 -1074 508 -0.01296296296296302 -1074 509 -0.01342592592592604 -1074 510 -0.1551783264746249 -1074 514 -2.255140518769849e-17 -1074 515 -0.02870370370370365 -1074 516 -0.2040466392318278 -1074 520 0.01296296296296304 -1074 521 -0.01342592592592612 -1074 522 -0.155178326474624 -1074 1069 -0.02407407407407414 -1074 1070 1.318389841742373e-16 -1074 1071 -0.1063100137174183 -1074 1072 2.081668171172169e-16 -1074 1073 1.214306433183765e-17 -1074 1074 1.241426611796989 -1074 1075 0.02407407407407394 -1074 1076 -9.8879238130678e-17 -1074 1077 -0.1063100137174215 -1074 1477 -0.01296296296296292 -1074 1478 0.01342592592592576 -1074 1479 -0.1551783264746215 -1074 1480 -2.081668171172169e-17 -1074 1481 0.02870370370370409 -1074 1482 -0.2040466392318271 -1074 1483 0.01296296296296294 -1074 1484 0.01342592592592593 -1074 1485 -0.1551783264746233 -1075 514 -0.0009703703703703633 -1075 515 -0.0004999999999999977 -1075 516 -0.008333333333333333 -1075 520 -0.0002814814814814817 -1075 521 3.252606517456513e-19 -1075 522 -3.469446951953614e-18 -1075 526 -0.000970370370370361 -1075 527 0.0004999999999999974 -1075 528 0.008333333333333335 -1075 1072 -0.001659259259259261 -1075 1073 5.312590645178972e-18 -1075 1074 -0.03333333333333333 -1075 1075 0.007762962962962958 -1075 1076 5.963111948670274e-18 -1075 1077 -1.040834085586084e-17 -1075 1078 -0.001659259259259251 -1075 1079 -1.051676107310939e-17 -1075 1080 0.03333333333333333 -1075 1480 -0.0009703703703703706 -1075 1481 0.0005000000000000003 -1075 1482 -0.008333333333333333 -1075 1483 -0.0002814814814814888 -1075 1484 1.734723475976807e-18 -1075 1485 1.040834085586084e-17 -1075 1486 -0.0009703703703703799 -1075 1487 -0.0005000000000000029 -1075 1488 0.008333333333333338 -1076 514 -0.0004999999999999976 -1076 515 -0.001040740740740724 -1076 516 -0.009259259259259172 -1076 520 1.084202172485504e-19 -1076 521 -0.002362962962962964 -1076 522 -0.0370370370370369 -1076 526 0.0004999999999999973 -1076 527 -0.001040740740740724 -1076 528 -0.0092592592592592 -1076 1072 5.312590645178972e-18 -1076 1073 0.000281481481481479 -1076 1074 2.046973701652632e-16 -1076 1075 6.071532165918825e-18 -1076 1076 0.008325925925925921 -1076 1077 5.100087019371813e-16 -1076 1078 -1.029992063861229e-17 -1076 1079 0.0002814814814814891 -1076 1080 2.758210326803123e-16 -1076 1480 0.0005000000000000002 -1076 1481 -0.001040740740740744 -1076 1482 0.009259259259259302 -1076 1483 1.843143693225358e-18 -1076 1484 -0.002362962962962974 -1076 1485 0.03703703703703727 -1076 1486 -0.000500000000000003 -1076 1487 -0.001040740740740761 -1076 1488 0.009259259259259368 -1077 514 -0.01296296296296285 -1077 515 -0.01342592592592571 -1077 516 -0.1551783264746204 -1077 520 1.387778780781446e-17 -1077 521 -0.02870370370370418 -1077 522 -0.2040466392318237 -1077 526 0.01296296296296283 -1077 527 -0.01342592592592569 -1077 528 -0.1551783264746202 -1077 1072 -0.02407407407407414 -1077 1073 -1.231653667943533e-16 -1077 1074 -0.1063100137174215 -1077 1075 2.255140518769849e-17 -1077 1076 4.683753385137379e-17 -1077 1077 1.241426611796979 -1077 1078 0.02407407407407409 -1077 1079 -3.122502256758253e-17 -1077 1080 -0.1063100137174194 -1077 1480 -0.01296296296296296 -1077 1481 0.01342592592592598 -1077 1482 -0.1551783264746238 -1077 1483 -8.326672684688674e-17 -1077 1484 0.02870370370370353 -1077 1485 -0.2040466392318258 -1077 1486 0.01296296296296306 -1077 1487 0.01342592592592617 -1077 1488 -0.1551783264746244 -1078 520 -0.0009703703703703788 -1078 521 -0.0005000000000000027 -1078 522 -0.008333333333333331 -1078 526 -0.0002814814814814694 -1078 527 2.059984127722458e-18 -1078 528 -1.734723475976807e-18 -1078 532 -0.0009703703703703753 -1078 533 0.0005000000000000007 -1078 534 0.008333333333333335 -1078 1075 -0.001659259259259251 -1078 1076 -1.029992063861229e-17 -1078 1077 -0.03333333333333332 -1078 1078 0.007762962962962972 -1078 1079 8.348356728138384e-18 -1078 1081 -0.001659259259259293 -1078 1082 2.710505431213761e-18 -1078 1083 0.03333333333333332 -1078 1483 -0.0009703703703703598 -1078 1484 0.0004999999999999972 -1078 1485 -0.008333333333333323 -1078 1486 -0.0002814814814814721 -1078 1487 1.517883041479706e-18 -1078 1488 1.040834085586084e-17 -1078 1489 -0.0009703703703703709 -1078 1490 -0.0004999999999999994 -1078 1491 0.008333333333333326 -1079 520 -0.0005000000000000026 -1079 521 -0.00104074074074076 -1079 522 -0.009259259259259347 -1079 526 2.168404344971009e-18 -1079 527 -0.002362962962962947 -1079 528 -0.03703703703703694 -1079 532 0.0005000000000000008 -1079 533 -0.00104074074074074 -1079 534 -0.009259259259259184 -1079 1075 -1.051676107310939e-17 -1079 1076 0.0002814814814814892 -1079 1077 -3.174543961037557e-16 -1079 1078 8.348356728138384e-18 -1079 1079 0.008325925925925912 -1079 1080 -3.677613769070831e-16 -1079 1081 2.49366499671666e-18 -1079 1082 0.0002814814814814523 -1079 1083 -1.162264728904461e-16 -1079 1483 0.0004999999999999972 -1079 1484 -0.001040740740740724 -1079 1485 0.009259259259259221 -1079 1486 1.517883041479706e-18 -1079 1487 -0.002362962962962951 -1079 1488 0.03703703703703681 -1079 1489 -0.0004999999999999994 -1079 1490 -0.001040740740740732 -1079 1491 0.009259259259259123 -1080 520 -0.01296296296296306 -1080 521 -0.01342592592592616 -1080 522 -0.1551783264746243 -1080 526 8.326672684688674e-17 -1080 527 -0.0287037037037033 -1080 528 -0.2040466392318215 -1080 532 0.01296296296296297 -1080 533 -0.01342592592592588 -1080 534 -0.1551783264746226 -1080 1075 -0.02407407407407411 -1080 1076 5.377642775528102e-17 -1080 1077 -0.1063100137174194 -1080 1078 6.938893903907228e-18 -1080 1079 3.469446951953614e-18 -1080 1080 1.241426611796976 -1080 1081 0.02407407407407409 -1080 1082 8.673617379884035e-18 -1080 1083 -0.1063100137174256 -1080 1483 -0.01296296296296282 -1080 1484 0.01342592592592567 -1080 1485 -0.15517832647462 -1080 1486 -7.112366251504909e-17 -1080 1487 0.02870370370370379 -1080 1488 -0.2040466392318218 -1080 1489 0.01296296296296291 -1080 1490 0.01342592592592582 -1080 1491 -0.1551783264746213 -1081 526 -0.000970370370370371 -1081 527 -0.0004999999999999995 -1081 528 -0.008333333333333333 -1081 532 -0.0002814814814814639 -1081 533 -2.602085213965211e-18 -1081 534 -1.734723475976807e-18 -1081 538 -0.0009703703703703775 -1081 539 0.0005000000000000021 -1081 540 0.008333333333333335 -1081 1078 -0.001659259259259293 -1081 1079 2.49366499671666e-18 -1081 1080 -0.03333333333333331 -1081 1081 0.007762962962962975 -1081 1082 -1.040834085586084e-17 -1081 1083 -6.938893903907228e-18 -1081 1084 -0.001659259259259263 -1081 1085 7.914675859144182e-18 -1081 1086 0.03333333333333332 -1081 1486 -0.0009703703703703752 -1081 1487 0.0005000000000000007 -1081 1488 -0.008333333333333325 -1081 1489 -0.000281481481481467 -1081 1490 -2.602085213965211e-18 -1081 1491 -3.469446951953614e-18 -1081 1492 -0.0009703703703703637 -1081 1493 -0.0004999999999999981 -1081 1494 0.008333333333333325 -1082 526 -0.0004999999999999995 -1082 527 -0.001040740740740731 -1082 528 -0.009259259259259146 -1082 532 -2.818925648462312e-18 -1082 533 -0.00236296296296294 -1082 534 -0.03703703703703685 -1082 538 0.0005000000000000022 -1082 539 -0.001040740740740754 -1082 540 -0.009259259259259302 -1082 1078 2.710505431213761e-18 -1082 1079 0.0002814814814814523 -1082 1080 2.949029909160572e-17 -1082 1081 -1.029992063861229e-17 -1082 1082 0.008325925925925903 -1082 1083 -1.07552855510562e-16 -1082 1084 7.914675859144182e-18 -1082 1085 0.0002814814814814789 -1082 1086 -1.578598363138894e-16 -1082 1486 0.0005000000000000008 -1082 1487 -0.001040740740740741 -1082 1488 0.009259259259259162 -1082 1489 -2.710505431213761e-18 -1082 1490 -0.002362962962962943 -1082 1491 0.03703703703703674 -1082 1492 -0.0004999999999999981 -1082 1493 -0.001040740740740727 -1082 1494 0.009259259259259189 -1083 526 -0.01296296296296292 -1083 527 -0.01342592592592576 -1083 528 -0.1551783264746215 -1083 532 -1.110223024625157e-16 -1083 533 -0.02870370370370329 -1083 534 -0.2040466392318206 -1083 538 0.01296296296296303 -1083 539 -0.01342592592592611 -1083 540 -0.1551783264746237 -1083 1078 -0.02407407407407409 -1083 1079 -6.938893903907228e-18 -1083 1080 -0.1063100137174256 -1083 1081 1.040834085586084e-17 -1083 1082 -7.28583859910259e-17 -1083 1083 1.241426611796976 -1083 1084 0.02407407407407409 -1083 1085 1.908195823574488e-17 -1083 1086 -0.1063100137174211 -1083 1486 -0.01296296296296296 -1083 1487 0.01342592592592594 -1083 1488 -0.1551783264746224 -1083 1489 1.144917494144693e-16 -1083 1490 0.02870370370370359 -1083 1491 -0.2040466392318208 -1083 1492 0.01296296296296285 -1083 1493 0.01342592592592569 -1083 1494 -0.1551783264746204 -1084 532 -0.0009703703703703642 -1084 533 -0.0004999999999999981 -1084 534 -0.008333333333333333 -1084 538 -0.0002814814814815043 -1084 539 -1.951563910473908e-18 -1084 540 -1.734723475976807e-18 -1084 544 -0.0009703703703703661 -1084 545 0.0005 -1084 546 0.008333333333333333 -1084 1081 -0.001659259259259263 -1084 1082 7.914675859144182e-18 -1084 1083 -0.03333333333333331 -1084 1084 0.007762962962962948 -1084 1085 -2.818925648462312e-18 -1084 1086 -1.387778780781446e-17 -1084 1087 -0.001659259259259204 -1084 1088 -5.746271514173174e-18 -1084 1089 0.03333333333333333 -1084 1489 -0.0009703703703703771 -1084 1490 0.0005000000000000021 -1084 1491 -0.008333333333333323 -1084 1492 -0.000281481481481494 -1084 1493 1.084202172485504e-18 -1084 1494 -1.387778780781446e-17 -1084 1495 -0.0009703703703703759 -1084 1496 -0.0005000000000000024 -1084 1497 0.008333333333333325 -1085 532 -0.000499999999999998 -1085 533 -0.001040740740740727 -1085 534 -0.009259259259259191 -1085 538 -2.168404344971009e-18 -1085 539 -0.002362962962962994 -1085 540 -0.03703703703703726 -1085 544 0.0005 -1085 545 -0.001040740740740749 -1085 546 -0.009259259259259463 -1085 1081 7.806255641895632e-18 -1085 1082 0.0002814814814814789 -1085 1083 2.8796409701215e-16 -1085 1084 -2.927345865710862e-18 -1085 1085 0.008325925925925954 -1085 1086 2.983724378680108e-16 -1085 1087 -5.421010862427522e-18 -1085 1088 0.000281481481481532 -1085 1089 -1.734723475976807e-17 -1085 1489 0.0005000000000000021 -1085 1490 -0.001040740740740754 -1085 1491 0.009259259259259302 -1085 1492 1.084202172485504e-18 -1085 1493 -0.002362962962962979 -1085 1494 0.03703703703703722 -1085 1495 -0.0005000000000000025 -1085 1496 -0.001040740740740762 -1085 1497 0.009259259259259391 -1086 532 -0.01296296296296286 -1086 533 -0.01342592592592575 -1086 534 -0.1551783264746207 -1086 538 -1.561251128379126e-16 -1086 539 -0.02870370370370434 -1086 540 -0.2040466392318294 -1086 544 0.01296296296296302 -1086 545 -0.01342592592592594 -1086 546 -0.155178326474625 -1086 1081 -0.02407407407407409 -1086 1082 -2.775557561562891e-17 -1086 1083 -0.1063100137174211 -1086 1084 2.012279232133096e-16 -1086 1085 1.006139616066548e-16 -1086 1086 1.241426611796985 -1086 1087 0.02407407407407391 -1086 1088 1.092875789865388e-16 -1086 1089 -0.1063100137174138 -1086 1489 -0.01296296296296302 -1086 1490 0.01342592592592605 -1086 1491 -0.1551783264746235 -1086 1492 -1.092875789865388e-16 -1086 1493 0.02870370370370355 -1086 1494 -0.2040466392318265 -1086 1495 0.01296296296296311 -1086 1496 0.01342592592592625 -1086 1497 -0.1551783264746254 -1087 538 -0.0009703703703703661 -1087 539 -0.0005 -1087 540 -0.008333333333333333 -1087 544 -0.0002814814814814988 -1087 545 -6.505213034913027e-19 -1087 550 -0.0009703703703703737 -1087 551 0.0005000000000000007 -1087 552 0.008333333333333333 -1087 1084 -0.001659259259259204 -1087 1085 -5.421010862427522e-18 -1087 1086 -0.03333333333333332 -1087 1087 0.007762962962962952 -1087 1088 8.673617379884035e-18 -1087 1089 -1.040834085586084e-17 -1087 1090 -0.001659259259259271 -1087 1091 -3.903127820947816e-18 -1087 1092 0.03333333333333334 -1087 1492 -0.0009703703703703608 -1087 1493 0.0004999999999999974 -1087 1494 -0.008333333333333333 -1087 1495 -0.0002814814814814989 -1087 1496 5.963111948670274e-18 -1087 1497 -1.387778780781446e-17 -1087 1498 -0.0009703703703703782 -1087 1499 -0.0005000000000000027 -1087 1500 0.008333333333333335 -1088 538 -0.0005 -1088 539 -0.001040740740740749 -1088 540 -0.009259259259259463 -1088 544 -6.505213034913027e-19 -1088 545 -0.002362962962962986 -1088 546 -0.03703703703703719 -1088 550 0.0005000000000000008 -1088 551 -0.001040740740740743 -1088 552 -0.009259259259259228 -1088 1084 -5.746271514173174e-18 -1088 1085 0.000281481481481532 -1088 1086 -3.122502256758253e-16 -1088 1087 8.565197162635485e-18 -1088 1088 0.008325925925925952 -1088 1089 6.938893903907228e-17 -1088 1090 -4.011548038196366e-18 -1088 1091 0.0002814814814814693 -1088 1092 4.510281037539698e-17 -1088 1492 0.0004999999999999976 -1088 1493 -0.001040740740740728 -1088 1494 0.009259259259259243 -1088 1495 5.854691731421724e-18 -1088 1496 -0.002362962962962986 -1088 1497 0.03703703703703737 -1088 1498 -0.0005000000000000027 -1088 1499 -0.00104074074074076 -1088 1500 0.009259259259259375 -1089 538 -0.01296296296296302 -1089 539 -0.01342592592592594 -1089 540 -0.155178326474625 -1089 544 4.683753385137379e-17 -1089 545 -0.02870370370370412 -1089 546 -0.2040466392318284 -1089 550 0.01296296296296297 -1089 551 -0.01342592592592591 -1089 552 -0.1551783264746226 -1089 1084 -0.02407407407407413 -1089 1085 1.179611963664229e-16 -1089 1086 -0.1063100137174138 -1089 1087 2.619432448724979e-16 -1089 1088 1.214306433183765e-16 -1089 1089 1.241426611796988 -1089 1090 0.02407407407407389 -1089 1091 -1.231653667943533e-16 -1089 1092 -0.106310013717423 -1089 1492 -0.01296296296296292 -1089 1493 0.01342592592592579 -1089 1494 -0.1551783264746216 -1089 1495 -1.52655665885959e-16 -1089 1496 0.02870370370370377 -1089 1497 -0.2040466392318284 -1089 1498 0.01296296296296305 -1089 1499 0.0134259259259263 -1089 1500 -0.1551783264746255 -1090 544 -0.0009703703703703694 -1090 545 -0.0004999999999999994 -1090 546 -0.008333333333333333 -1090 550 -0.0002814814814814534 -1090 551 6.505213034913027e-19 -1090 556 -0.0009703703703703695 -1090 557 0.0004999999999999987 -1090 558 0.008333333333333335 -1090 1087 -0.001659259259259271 -1090 1088 -4.011548038196366e-18 -1090 1089 -0.03333333333333333 -1090 1090 0.007762962962962977 -1090 1091 9.432558900623889e-18 -1090 1092 -1.040834085586084e-17 -1090 1093 -0.001659259259259308 -1090 1094 -5.421010862427522e-18 -1090 1095 0.03333333333333334 -1090 1495 -0.0009703703703703604 -1090 1496 0.0004999999999999974 -1090 1497 -0.008333333333333333 -1090 1498 -0.0002814814814814667 -1090 1499 3.903127820947816e-18 -1090 1500 -1.734723475976807e-18 -1091 544 -0.0004999999999999994 -1091 545 -0.001040740740740734 -1091 546 -0.009259259259259189 -1091 550 5.421010862427522e-19 -1091 551 -0.002362962962962926 -1091 552 -0.03703703703703658 -1091 556 0.0004999999999999986 -1091 557 -0.001040740740740725 -1091 558 -0.009259259259259123 -1091 1087 -3.903127820947816e-18 -1091 1088 0.0002814814814814693 -1091 1089 -1.769417945496343e-16 -1091 1090 9.324138683375338e-18 -1091 1091 0.008325925925925886 -1091 1092 3.920475055707584e-16 -1091 1093 -5.312590645178972e-18 -1091 1094 0.00028148148148144 -1091 1095 1.058181320345852e-16 -1091 1495 0.0004999999999999973 -1091 1496 -0.001040740740740725 -1091 1497 0.009259259259259229 -1091 1498 4.011548038196366e-18 -1091 1499 -0.002362962962962943 -1091 1500 0.0370370370370369 -1092 544 -0.01296296296296292 -1092 545 -0.01342592592592579 -1092 546 -0.1551783264746216 -1092 550 2.949029909160572e-17 -1092 551 -0.02870370370370352 -1092 552 -0.2040466392318186 -1092 556 0.01296296296296289 -1092 557 -0.01342592592592563 -1092 558 -0.1551783264746209 -1092 1087 -0.02407407407407418 -1092 1088 -9.8879238130678e-17 -1092 1089 -0.106310013717423 -1092 1090 7.632783294297951e-17 -1092 1091 -1.006139616066548e-16 -1092 1092 1.241426611796978 -1092 1093 0.02407407407407411 -1092 1094 -4.85722573273506e-17 -1092 1095 -0.1063100137174277 -1092 1495 -0.01296296296296284 -1092 1496 0.01342592592592582 -1092 1497 -0.1551783264746214 -1092 1498 -1.665334536937735e-16 -1092 1499 0.02870370370370334 -1092 1500 -0.2040466392318218 -1093 550 -0.0009703703703703783 -1093 551 -0.0005000000000000014 -1093 552 -0.008333333333333333 -1093 556 -0.0002814814814814748 -1093 557 1.084202172485504e-19 -1093 558 -3.469446951953614e-18 -1093 562 -0.0009703703703703723 -1093 563 0.0005000000000000013 -1093 564 0.008333333333333333 -1093 1090 -0.001659259259259308 -1093 1091 -5.312590645178972e-18 -1093 1092 -0.03333333333333333 -1093 1093 0.007762962962962967 -1093 1094 -1.084202172485504e-19 -1093 1095 -1.387778780781446e-17 -1093 1096 -0.001659259259259226 -1093 1097 5.421010862427522e-18 -1093 1098 0.03333333333333334 -1093 1498 -0.0009703703703703695 -1093 1499 0.0004999999999999986 -1093 1500 -0.008333333333333333 -1094 550 -0.0005000000000000013 -1094 551 -0.001040740740740743 -1094 552 -0.009259259259259196 -1094 556 1.084202172485504e-19 -1094 557 -0.002362962962962954 -1094 558 -0.03703703703703699 -1094 562 0.0005000000000000013 -1094 563 -0.001040740740740754 -1094 564 -0.009259259259259404 -1094 1090 -5.312590645178972e-18 -1094 1091 0.00028148148148144 -1094 1092 -1.89084858881472e-16 -1094 1093 -1.084202172485504e-19 -1094 1094 0.008325925925925915 -1094 1095 -8.326672684688674e-17 -1094 1096 5.204170427930421e-18 -1094 1097 0.0002814814814815098 -1094 1098 -2.567390744445674e-16 -1094 1498 0.0004999999999999987 -1094 1499 -0.001040740740740725 -1094 1500 0.009259259259259037 -1095 550 -0.01296296296296301 -1095 551 -0.01342592592592587 -1095 552 -0.155178326474623 -1095 556 5.204170427930421e-18 -1095 557 -0.0287037037037035 -1095 558 -0.2040466392318225 -1095 562 0.012962962962963 -1095 563 -0.01342592592592602 -1095 564 -0.1551783264746234 -1095 1090 -0.02407407407407411 -1095 1091 -1.734723475976807e-17 -1095 1092 -0.1063100137174277 -1095 1093 8.673617379884035e-18 -1095 1094 -6.245004513516506e-17 -1095 1095 1.241426611796977 -1095 1096 0.0240740740740741 -1095 1097 1.908195823574488e-17 -1095 1098 -0.106310013717416 -1095 1498 -0.01296296296296289 -1095 1499 0.0134259259259258 -1095 1500 -0.1551783264746209 -1096 556 -0.0009703703703703634 -1096 557 -0.0004999999999999986 -1096 558 -0.008333333333333331 -1096 562 -0.0002814814814815097 -1096 563 -2.059984127722458e-18 -1096 564 -1.734723475976807e-18 -1096 568 -0.0009703703703703701 -1096 569 0.0005000000000000007 -1096 570 0.008333333333333333 -1096 1093 -0.001659259259259226 -1096 1094 5.204170427930421e-18 -1096 1095 -0.03333333333333333 -1096 1096 0.007762962962962942 -1096 1097 -7.914675859144182e-18 -1096 1098 -1.040834085586084e-17 -1096 1099 -0.001659259259259226 -1096 1100 2.710505431213761e-18 -1096 1101 0.03333333333333334 -1097 556 -0.0004999999999999987 -1097 557 -0.001040740740740736 -1097 558 -0.00925925925925933 -1097 562 -1.843143693225358e-18 -1097 563 -0.002362962962963001 -1097 564 -0.03703703703703733 -1097 568 0.0005000000000000007 -1097 569 -0.00104074074074075 -1097 570 -0.009259259259259373 -1097 1093 5.421010862427522e-18 -1097 1094 0.0002814814814815098 -1097 1095 4.163336342344337e-17 -1097 1096 -8.023096076392733e-18 -1097 1097 0.008325925925925962 -1097 1098 1.179611963664229e-16 -1097 1099 2.602085213965211e-18 -1097 1100 0.0002814814814815098 -1097 1101 -1.405126015541214e-16 -1098 556 -0.01296296296296289 -1098 557 -0.01342592592592578 -1098 558 -0.1551783264746213 -1098 562 -1.595945597898663e-16 -1098 563 -0.02870370370370436 -1098 564 -0.2040466392318304 -1098 568 0.01296296296296305 -1098 569 -0.01342592592592606 -1098 570 -0.1551783264746254 -1098 1093 -0.02407407407407412 -1098 1094 -1.040834085586084e-17 -1098 1095 -0.106310013717416 -1098 1096 1.613292832658431e-16 -1098 1097 1.318389841742373e-16 -1098 1098 1.241426611796989 -1098 1099 0.02407407407407396 -1098 1100 1.561251128379126e-17 -1098 1101 -0.1063100137174177 -1099 562 -0.0009703703703703656 -1099 563 -0.0004999999999999994 -1099 564 -0.008333333333333331 -1099 568 -0.0002814814814814881 -1099 569 -6.505213034913027e-19 -1099 574 -0.0009703703703703715 -1099 575 0.0005 -1099 576 0.008333333333333333 -1099 1096 -0.001659259259259226 -1099 1097 2.602085213965211e-18 -1099 1098 -0.03333333333333333 -1099 1099 0.007762962962962958 -1099 1100 -2.602085213965211e-18 -1099 1101 -6.938893903907228e-18 -1099 1102 -0.001659259259259277 -1099 1104 0.03333333333333334 -1100 562 -0.0004999999999999995 -1100 563 -0.001040740740740741 -1100 564 -0.009259259259259339 -1100 568 -6.505213034913027e-19 -1100 569 -0.002362962962962972 -1100 570 -0.03703703703703705 -1100 574 0.0005000000000000001 -1100 575 -0.001040740740740738 -1100 576 -0.009259259259259196 -1100 1096 2.818925648462312e-18 -1100 1097 0.0002814814814815098 -1100 1098 8.673617379884035e-18 -1100 1099 -2.602085213965211e-18 -1100 1100 0.008325925925925935 -1100 1101 3.122502256758253e-17 -1100 1102 -2.168404344971009e-19 -1100 1103 0.0002814814814814666 -1100 1104 -2.081668171172169e-17 -1101 562 -0.01296296296296299 -1101 563 -0.01342592592592594 -1101 564 -0.1551783264746243 -1101 568 4.85722573273506e-17 -1101 569 -0.02870370370370393 -1101 570 -0.2040466392318265 -1101 574 0.01296296296296295 -1101 575 -0.01342592592592589 -1101 576 -0.1551783264746221 -1101 1096 -0.02407407407407397 -1101 1097 -1.734723475976807e-18 -1101 1098 -0.1063100137174177 -1101 1099 -1.370431546021678e-16 -1101 1100 1.283695372222837e-16 -1101 1101 1.241426611796988 -1101 1102 0.0240740740740741 -1101 1103 8.673617379884035e-18 -1101 1104 -0.1063100137174232 -1102 568 -0.0009703703703703715 -1102 569 -0.0005 -1102 570 -0.008333333333333333 -1102 574 -0.0002814814814814856 -1102 575 6.505213034913027e-19 -1102 580 -0.0009703703703703662 -1102 581 0.0004999999999999994 -1102 582 0.008333333333333333 -1102 1099 -0.001659259259259277 -1102 1100 -1.084202172485504e-19 -1102 1101 -0.03333333333333333 -1102 1102 0.00776296296296296 -1102 1103 2.710505431213761e-18 -1102 1104 -1.387778780781446e-17 -1102 1105 -0.001659259259259233 -1102 1106 -2.602085213965211e-18 -1102 1107 0.03333333333333334 -1103 568 -0.0005 -1103 569 -0.001040740740740738 -1103 570 -0.009259259259259198 -1103 574 6.505213034913027e-19 -1103 575 -0.002362962962962969 -1103 576 -0.03703703703703702 -1103 580 0.0004999999999999994 -1103 581 -0.00104074074074074 -1103 582 -0.009259259259259287 -1103 1100 0.0002814814814814665 -1103 1101 -2.081668171172169e-17 -1103 1102 2.818925648462312e-18 -1103 1103 0.008325925925925931 -1103 1104 -1.040834085586084e-16 -1103 1105 -2.602085213965211e-18 -1103 1106 0.0002814814814815045 -1103 1107 7.28583859910259e-17 -1104 568 -0.01296296296296295 -1104 569 -0.01342592592592589 -1104 570 -0.1551783264746221 -1104 574 2.949029909160572e-17 -1104 575 -0.0287037037037039 -1104 576 -0.2040466392318244 -1104 580 0.01296296296296292 -1104 581 -0.01342592592592594 -1104 582 -0.1551783264746218 -1104 1099 -0.02407407407407412 -1104 1100 8.673617379884035e-18 -1104 1101 -0.1063100137174232 -1104 1102 1.734723475976807e-17 -1104 1103 1.665334536937735e-16 -1104 1104 1.241426611796978 -1104 1105 0.0240740740740741 -1104 1106 2.081668171172169e-17 -1104 1107 -0.1063100137174169 -1105 574 -0.0009703703703703707 -1105 575 -0.0005000000000000007 -1105 576 -0.008333333333333333 -1105 580 -0.0002814814814814855 -1105 586 -0.0009703703703703737 -1105 587 0.0005000000000000007 -1105 588 0.008333333333333333 -1105 1102 -0.001659259259259233 -1105 1103 -2.710505431213761e-18 -1105 1104 -0.03333333333333333 -1105 1105 0.007762962962962959 -1105 1107 -1.040834085586084e-17 -1105 1108 -0.001659259259259277 -1105 1109 2.710505431213761e-18 -1105 1110 0.03333333333333334 -1106 574 -0.0005000000000000008 -1106 575 -0.001040740740740749 -1106 576 -0.009259259259259325 -1106 581 -0.002362962962962969 -1106 582 -0.03703703703703706 -1106 586 0.0005000000000000008 -1106 587 -0.001040740740740743 -1106 588 -0.009259259259259228 -1106 1102 -2.602085213965211e-18 -1106 1103 0.0002814814814815046 -1106 1104 -7.632783294297951e-17 -1106 1105 -1.084202172485504e-19 -1106 1106 0.008325925925925929 -1106 1107 -2.775557561562891e-16 -1106 1108 2.602085213965211e-18 -1106 1109 0.0002814814814814666 -1106 1110 -1.370431546021678e-16 -1107 574 -0.01296296296296297 -1107 575 -0.01342592592592606 -1107 576 -0.1551783264746228 -1107 581 -0.02870370370370376 -1107 582 -0.2040466392318244 -1107 586 0.01296296296296297 -1107 587 -0.01342592592592591 -1107 588 -0.1551783264746226 -1107 1102 -0.02407407407407412 -1107 1103 3.816391647148976e-17 -1107 1104 -0.1063100137174169 -1107 1105 1.734723475976807e-17 -1107 1106 1.422473250300982e-16 -1107 1107 1.241426611796978 -1107 1108 0.0240740740740741 -1107 1109 1.561251128379126e-17 -1107 1110 -0.1063100137174232 -1108 580 -0.0009703703703703694 -1108 581 -0.0004999999999999994 -1108 582 -0.008333333333333333 -1108 586 -0.0002814814814814639 -1108 587 -6.505213034913027e-19 -1108 592 -0.0009703703703703721 -1108 593 0.0005 -1108 594 0.008333333333333335 -1108 1105 -0.001659259259259277 -1108 1106 2.602085213965211e-18 -1108 1107 -0.03333333333333333 -1108 1108 0.007762962962962975 -1108 1109 -2.602085213965211e-18 -1108 1110 -1.387778780781446e-17 -1108 1111 -0.001659259259259283 -1108 1113 0.03333333333333334 -1109 580 -0.0004999999999999994 -1109 581 -0.001040740740740734 -1109 582 -0.009259259259259189 -1109 586 -7.589415207398531e-19 -1109 587 -0.00236296296296294 -1109 588 -0.0370370370370367 -1109 592 0.0005000000000000001 -1109 593 -0.001040740740740737 -1109 594 -0.009259259259259169 -1109 1105 2.710505431213761e-18 -1109 1106 0.0002814814814814665 -1109 1107 1.040834085586084e-17 -1109 1108 -2.602085213965211e-18 -1109 1109 0.008325925925925903 -1109 1110 -1.040834085586084e-17 -1109 1111 -2.168404344971009e-19 -1109 1112 0.0002814814814814615 -1109 1113 -4.163336342344337e-17 -1110 580 -0.01296296296296292 -1110 581 -0.01342592592592579 -1110 582 -0.1551783264746216 -1110 586 -2.775557561562891e-17 -1110 587 -0.02870370370370361 -1110 588 -0.2040466392318205 -1110 592 0.01296296296296295 -1110 593 -0.01342592592592588 -1110 594 -0.1551783264746221 -1110 1105 -0.02407407407407412 -1110 1106 -3.469446951953614e-18 -1110 1107 -0.1063100137174232 -1110 1108 1.387778780781446e-17 -1110 1109 1.700029006457271e-16 -1110 1110 1.241426611796977 -1110 1111 0.02407407407407411 -1110 1112 2.081668171172169e-17 -1110 1113 -0.1063100137174241 -1111 586 -0.0009703703703703722 -1111 587 -0.0005000000000000001 -1111 588 -0.008333333333333333 -1111 592 -0.0002814814814815099 -1111 593 -1.301042606982605e-18 -1111 594 -1.734723475976807e-18 -1111 598 -0.0009703703703703684 -1111 599 0.0005000000000000014 -1111 600 0.008333333333333335 -1111 1108 -0.001659259259259283 -1111 1109 -1.084202172485504e-19 -1111 1110 -0.03333333333333333 -1111 1111 0.007762962962962944 -1111 1112 -5.204170427930421e-18 -1111 1113 -1.040834085586084e-17 -1111 1114 -0.001659259259259169 -1111 1115 5.312590645178972e-18 -1111 1116 0.03333333333333334 -1112 586 -0.0005 -1112 587 -0.001040740740740737 -1112 588 -0.00925925925925917 -1112 592 -1.409462824231156e-18 -1112 593 -0.002362962962963002 -1112 594 -0.0370370370370374 -1112 598 0.0005000000000000013 -1112 599 -0.001040740740740762 -1112 600 -0.009259259259259583 -1112 1109 0.0002814814814814615 -1112 1110 -4.163336342344337e-17 -1112 1111 -5.095750210681871e-18 -1112 1112 0.008325925925925962 -1112 1113 -1.52655665885959e-16 -1112 1114 5.421010862427522e-18 -1112 1115 0.0002814814814815581 -1112 1116 -2.324529457808922e-16 -1113 586 -0.01296296296296295 -1113 587 -0.01342592592592588 -1113 588 -0.1551783264746221 -1113 592 -1.283695372222837e-16 -1113 593 -0.02870370370370415 -1113 594 -0.2040466392318304 -1113 598 0.01296296296296308 -1113 599 -0.01342592592592617 -1113 600 -0.1551783264746262 -1113 1108 -0.02407407407407412 -1113 1109 2.081668171172169e-17 -1113 1110 -0.1063100137174241 -1113 1111 1.665334536937735e-16 -1113 1112 1.023486850826316e-16 -1113 1113 1.241426611796989 -1113 1114 0.02407407407407395 -1113 1115 5.204170427930421e-18 -1113 1116 -0.1063100137174096 -1114 592 -0.0009703703703703595 -1114 593 -0.0004999999999999987 -1114 594 -0.008333333333333333 -1114 598 -0.0002814814814815097 -1114 599 -2.602085213965211e-18 -1114 600 -1.734723475976807e-18 -1114 604 -0.0009703703703703766 -1114 605 0.0005000000000000013 -1114 606 0.008333333333333335 -1114 1111 -0.001659259259259169 -1114 1112 5.204170427930421e-18 -1114 1113 -0.03333333333333333 -1114 1114 0.007762962962962944 -1114 1115 -1.040834085586084e-17 -1114 1116 -1.040834085586084e-17 -1114 1117 -0.001659259259259283 -1114 1118 5.204170427930421e-18 -1114 1119 0.03333333333333334 -1115 592 -0.0004999999999999987 -1115 593 -0.001040740740740745 -1115 594 -0.009259259259259509 -1115 598 -2.602085213965211e-18 -1115 599 -0.002362962962963001 -1115 600 -0.03703703703703734 -1115 604 0.0005000000000000014 -1115 605 -0.001040740740740746 -1115 606 -0.009259259259259228 -1115 1111 5.312590645178972e-18 -1115 1112 0.0002814814814815581 -1115 1113 6.071532165918825e-17 -1115 1114 -1.062518129035794e-17 -1115 1115 0.008325925925925962 -1115 1116 8.673617379884035e-17 -1115 1117 5.204170427930421e-18 -1115 1118 0.0002814814814814613 -1115 1119 -2.740863092043355e-16 -1116 592 -0.01296296296296297 -1116 593 -0.01342592592592593 -1116 594 -0.1551783264746242 -1116 598 -3.642919299551295e-17 -1116 599 -0.02870370370370433 -1116 600 -0.2040466392318304 -1116 604 0.012962962962963 -1116 605 -0.01342592592592593 -1116 606 -0.1551783264746232 -1116 1111 -0.02407407407407397 -1116 1112 -2.42861286636753e-17 -1116 1113 -0.1063100137174096 -1116 1114 -1.387778780781446e-16 -1116 1115 1.231653667943533e-16 -1116 1116 1.241426611796989 -1116 1117 0.02407407407407411 -1116 1118 2.949029909160572e-17 -1116 1119 -0.1063100137174241 -1117 598 -0.0009703703703703678 -1117 599 -0.0004999999999999988 -1117 600 -0.008333333333333333 -1117 604 -0.0002814814814814639 -1117 605 -1.192622389734055e-18 -1117 606 -1.734723475976807e-18 -1117 610 -0.0009703703703703715 -1117 611 0.0005 -1117 612 0.008333333333333333 -1117 1114 -0.001659259259259283 -1117 1115 5.204170427930421e-18 -1117 1116 -0.03333333333333333 -1117 1117 0.007762962962962975 -1117 1118 -5.204170427930421e-18 -1117 1119 -1.040834085586084e-17 -1117 1120 -0.001659259259259277 -1117 1122 0.03333333333333334 -1118 598 -0.0004999999999999987 -1118 599 -0.001040740740740729 -1118 600 -0.009259259259259155 -1118 604 -1.409462824231156e-18 -1118 605 -0.00236296296296294 -1118 606 -0.03703703703703667 -1118 610 0.0005000000000000001 -1118 611 -0.001040740740740738 -1118 612 -0.009259259259259196 -1118 1114 5.204170427930421e-18 -1118 1115 0.0002814814814814613 -1118 1116 2.081668171172169e-17 -1118 1117 -5.204170427930421e-18 -1118 1118 0.008325925925925902 -1118 1119 1.040834085586084e-16 -1118 1120 -2.168404344971009e-19 -1118 1121 0.0002814814814814666 -1118 1122 -2.081668171172169e-17 -1119 598 -0.01296296296296289 -1119 599 -0.0134259259259257 -1119 600 -0.1551783264746211 -1119 604 -5.377642775528102e-17 -1119 605 -0.0287037037037037 -1119 606 -0.2040466392318205 -1119 610 0.01296296296296295 -1119 611 -0.01342592592592589 -1119 612 -0.1551783264746221 -1119 1114 -0.02407407407407412 -1119 1115 -1.734723475976807e-18 -1119 1116 -0.1063100137174241 -1119 1117 1.561251128379126e-17 -1119 1118 1.804112415015879e-16 -1119 1119 1.241426611796977 -1119 1120 0.0240740740740741 -1119 1121 8.673617379884035e-18 -1119 1122 -0.1063100137174232 -1120 604 -0.0009703703703703715 -1120 605 -0.0005 -1120 606 -0.008333333333333333 -1120 610 -0.0002814814814814747 -1120 611 6.505213034913027e-19 -1120 616 -0.000970370370370368 -1120 617 0.0004999999999999994 -1120 618 0.008333333333333333 -1120 1117 -0.001659259259259277 -1120 1118 -1.084202172485504e-19 -1120 1119 -0.03333333333333333 -1120 1120 0.007762962962962968 -1120 1121 2.818925648462312e-18 -1120 1122 -1.387778780781446e-17 -1120 1123 -0.001659259259259258 -1120 1124 -2.710505431213761e-18 -1120 1125 0.03333333333333334 -1121 604 -0.0005 -1121 605 -0.001040740740740738 -1121 606 -0.009259259259259198 -1121 610 5.421010862427522e-19 -1121 611 -0.002362962962962954 -1121 612 -0.03703703703703695 -1121 616 0.0004999999999999994 -1121 617 -0.001040740740740737 -1121 618 -0.009259259259259255 -1121 1118 0.0002814814814814665 -1121 1119 -2.081668171172169e-17 -1121 1120 2.927345865710862e-18 -1121 1121 0.008325925925925917 -1121 1122 6.938893903907228e-17 -1121 1123 -2.710505431213761e-18 -1121 1124 0.0002814814814814828 -1121 1125 1.595945597898663e-16 -1122 604 -0.01296296296296295 -1122 605 -0.01342592592592589 -1122 606 -0.1551783264746221 -1122 610 2.949029909160572e-17 -1122 611 -0.02870370370370362 -1122 612 -0.2040466392318224 -1122 616 0.01296296296296292 -1122 617 -0.01342592592592588 -1122 618 -0.1551783264746217 -1122 1117 -0.02407407407407412 -1122 1118 8.673617379884035e-18 -1122 1119 -0.1063100137174232 -1122 1120 1.908195823574488e-17 -1122 1121 -4.510281037539698e-17 -1122 1122 1.241426611796977 -1122 1123 0.0240740740740741 -1122 1124 -2.775557561562891e-17 -1122 1125 -0.1063100137174205 -1123 610 -0.0009703703703703725 -1123 611 -0.0005000000000000007 -1123 612 -0.008333333333333333 -1123 616 -0.0002814814814814964 -1123 618 -1.734723475976807e-18 -1123 622 -0.0009703703703703701 -1123 623 0.0005000000000000007 -1123 624 0.008333333333333333 -1123 1120 -0.001659259259259258 -1123 1121 -2.710505431213761e-18 -1123 1122 -0.03333333333333333 -1123 1123 0.007762962962962952 -1123 1125 -1.734723475976807e-17 -1123 1126 -0.001659259259259226 -1123 1127 2.710505431213761e-18 -1123 1128 0.03333333333333334 -1124 610 -0.0005000000000000007 -1124 611 -0.001040740740740746 -1124 612 -0.009259259259259293 -1124 616 1.084202172485504e-19 -1124 617 -0.002362962962962983 -1124 618 -0.0370370370370373 -1124 622 0.0005000000000000007 -1124 623 -0.00104074074074075 -1124 624 -0.009259259259259373 -1124 1120 -2.710505431213761e-18 -1124 1121 0.0002814814814814828 -1124 1122 1.214306433183765e-17 -1124 1123 -1.084202172485504e-19 -1124 1124 0.008325925925925945 -1124 1125 -1.040834085586084e-16 -1124 1126 2.602085213965211e-18 -1124 1127 0.0002814814814815098 -1124 1128 -1.405126015541214e-16 -1125 610 -0.01296296296296297 -1125 611 -0.013425925925926 -1125 612 -0.1551783264746227 -1125 616 -7.459310946700271e-17 -1125 617 -0.02870370370370377 -1125 618 -0.204046639231828 -1125 622 0.01296296296296305 -1125 623 -0.01342592592592606 -1125 624 -0.1551783264746254 -1125 1120 -0.02407407407407412 -1125 1121 -8.673617379884035e-18 -1125 1122 -0.1063100137174205 -1125 1123 1.682681771697503e-16 -1125 1124 -6.591949208711867e-17 -1125 1125 1.241426611796988 -1125 1126 0.02407407407407396 -1125 1127 1.561251128379126e-17 -1125 1128 -0.1063100137174177 -1126 616 -0.0009703703703703656 -1126 617 -0.0004999999999999994 -1126 618 -0.008333333333333331 -1126 622 -0.0002814814814814881 -1126 623 -6.505213034913027e-19 -1126 628 -0.0009703703703703715 -1126 629 0.0005 -1126 630 0.008333333333333333 -1126 1123 -0.001659259259259226 -1126 1124 2.602085213965211e-18 -1126 1125 -0.03333333333333333 -1126 1126 0.007762962962962955 -1126 1127 -8.023096076392733e-18 -1126 1128 -1.040834085586084e-17 -1126 1129 -0.001659259259259272 -1126 1130 5.421010862427522e-18 -1126 1131 0.03333333333333334 -1127 616 -0.0004999999999999995 -1127 617 -0.001040740740740741 -1127 618 -0.009259259259259339 -1127 622 -6.505213034913027e-19 -1127 623 -0.002362962962962972 -1127 624 -0.03703703703703705 -1127 628 0.0005000000000000001 -1127 629 -0.001040740740740738 -1127 630 -0.009259259259259196 -1127 1123 2.818925648462312e-18 -1127 1124 0.0002814814814815098 -1127 1125 8.673617379884035e-18 -1127 1126 -8.023096076392733e-18 -1127 1127 0.008325925925925938 -1127 1128 9.020562075079397e-17 -1127 1129 5.312590645178972e-18 -1127 1130 0.0002814814814814668 -1127 1131 -1.942890293094024e-16 -1128 616 -0.01296296296296299 -1128 617 -0.01342592592592594 -1128 618 -0.1551783264746243 -1128 622 4.85722573273506e-17 -1128 623 -0.02870370370370393 -1128 624 -0.2040466392318265 -1128 628 0.01296296296296295 -1128 629 -0.01342592592592589 -1128 630 -0.1551783264746221 -1128 1123 -0.02407407407407397 -1128 1124 -1.734723475976807e-18 -1128 1125 -0.1063100137174177 -1128 1126 -1.717376241217039e-16 -1128 1127 5.030698080332741e-17 -1128 1128 1.24142661179699 -1128 1129 0.02407407407407414 -1128 1130 -9.367506770274758e-17 -1128 1131 -0.1063100137174233 -1129 622 -0.0009703703703703715 -1129 623 -0.0005 -1129 624 -0.008333333333333333 -1129 628 -0.0002814814814814882 -1129 629 7.589415207398531e-19 -1129 630 -1.734723475976807e-18 -1129 634 -0.0009703703703703656 -1129 635 0.0004999999999999993 -1129 636 0.008333333333333333 -1129 1126 -0.001659259259259272 -1129 1127 5.204170427930421e-18 -1129 1128 -0.03333333333333333 -1129 1129 0.007762962962962958 -1129 1130 -9.324138683375338e-18 -1129 1131 -1.040834085586084e-17 -1129 1132 -0.001659259259259232 -1129 1133 4.119968255444917e-18 -1129 1134 0.03333333333333334 -1130 622 -0.0005 -1130 623 -0.001040740740740738 -1130 624 -0.009259259259259198 -1130 628 6.505213034913027e-19 -1130 629 -0.002362962962962972 -1130 630 -0.03703703703703708 -1130 634 0.0004999999999999994 -1130 635 -0.001040740740740741 -1130 636 -0.009259259259259316 -1130 1126 5.421010862427522e-18 -1130 1127 0.0002814814814814668 -1130 1128 1.023486850826316e-16 -1130 1129 -9.432558900623889e-18 -1130 1130 0.008325925925925933 -1130 1131 -7.28583859910259e-17 -1130 1132 4.011548038196366e-18 -1130 1133 0.0002814814814815072 -1130 1134 -8.500145032286355e-17 -1131 622 -0.01296296296296295 -1131 623 -0.01342592592592589 -1131 624 -0.1551783264746221 -1131 628 2.949029909160572e-17 -1131 629 -0.02870370370370393 -1131 630 -0.2040466392318249 -1131 634 0.01296296296296292 -1131 635 -0.01342592592592595 -1131 636 -0.1551783264746218 -1131 1126 -0.02407407407407394 -1131 1127 -1.266348137463069e-16 -1131 1128 -0.1063100137174233 -1131 1129 -3.833738881908744e-16 -1131 1130 1.07552855510562e-16 -1131 1131 1.241426611796977 -1131 1132 0.02407407407407432 -1131 1133 1.474514954580286e-16 -1131 1134 -0.1063100137174162 -1132 628 -0.0009703703703703701 -1132 629 -0.0005000000000000007 -1132 630 -0.008333333333333331 -1132 634 -0.0002814814814814749 -1132 635 1.951563910473908e-18 -1132 640 -0.0009703703703703695 -1132 641 0.0004999999999999987 -1132 642 0.008333333333333335 -1132 1129 -0.001659259259259232 -1132 1130 4.011548038196366e-18 -1132 1131 -0.03333333333333333 -1132 1132 0.007762962962962972 -1132 1133 1.301042606982605e-18 -1132 1134 -1.040834085586084e-17 -1132 1135 -0.001659259259259308 -1132 1136 -5.312590645178972e-18 -1132 1137 0.03333333333333334 -1133 628 -0.0005000000000000008 -1133 629 -0.00104074074074075 -1133 630 -0.009259259259259354 -1133 634 1.951563910473908e-18 -1133 635 -0.002362962962962954 -1133 636 -0.03703703703703698 -1133 640 0.0004999999999999986 -1133 641 -0.001040740740740725 -1133 642 -0.00925925925925908 -1133 1129 4.119968255444917e-18 -1133 1130 0.0002814814814815072 -1133 1131 1.35308431126191e-16 -1133 1132 1.409462824231156e-18 -1133 1133 0.008325925925925921 -1133 1134 -1.040834085586084e-17 -1133 1135 -5.312590645178972e-18 -1133 1136 0.0002814814814814399 -1133 1137 2.775557561562891e-16 -1134 628 -0.01296296296296297 -1134 629 -0.01342592592592606 -1134 630 -0.1551783264746229 -1134 634 8.153200337090993e-17 -1134 635 -0.02870370370370355 -1134 636 -0.2040466392318224 -1134 640 0.01296296296296289 -1134 641 -0.01342592592592577 -1134 642 -0.1551783264746209 -1134 1129 -0.02407407407407405 -1134 1130 1.214306433183765e-16 -1134 1131 -0.1063100137174162 -1134 1132 -5.377642775528102e-17 -1134 1133 2.081668171172169e-17 -1134 1134 1.241426611796975 -1134 1135 0.02407407407407411 -1134 1136 -3.295974604355933e-17 -1134 1137 -0.1063100137174277 -1135 634 -0.0009703703703703784 -1135 635 -0.0005000000000000013 -1135 636 -0.008333333333333333 -1135 640 -0.0002814814814814531 -1135 641 1.301042606982605e-18 -1135 642 -1.734723475976807e-18 -1135 646 -0.0009703703703703715 -1135 647 0.0005 -1135 648 0.008333333333333333 -1135 1132 -0.001659259259259308 -1135 1133 -5.312590645178972e-18 -1135 1134 -0.03333333333333333 -1135 1135 0.007762962962962983 -1135 1136 5.312590645178972e-18 -1135 1137 -1.040834085586084e-17 -1135 1138 -0.001659259259259277 -1135 1140 0.03333333333333334 -1136 634 -0.0005000000000000013 -1136 635 -0.001040740740740743 -1136 636 -0.009259259259259155 -1136 640 1.409462824231156e-18 -1136 641 -0.002362962962962925 -1136 642 -0.03703703703703673 -1136 646 0.0005000000000000001 -1136 647 -0.001040740740740738 -1136 648 -0.009259259259259196 -1136 1132 -5.421010862427522e-18 -1136 1133 0.00028148148148144 -1136 1134 -1.908195823574488e-17 -1136 1135 5.312590645178972e-18 -1136 1136 0.008325925925925888 -1136 1137 -1.942890293094024e-16 -1136 1138 -2.168404344971009e-19 -1136 1139 0.0002814814814814666 -1136 1140 -2.081668171172169e-17 -1137 634 -0.012962962962963 -1137 635 -0.01342592592592601 -1137 636 -0.155178326474623 -1137 640 5.724587470723463e-17 -1137 641 -0.02870370370370304 -1137 642 -0.2040466392318185 -1137 646 0.01296296296296295 -1137 647 -0.01342592592592589 -1137 648 -0.1551783264746221 -1137 1132 -0.02407407407407412 -1137 1134 -0.1063100137174277 -1137 1135 1.387778780781446e-17 -1137 1136 -7.632783294297951e-17 -1137 1137 1.241426611796976 -1137 1138 0.0240740740740741 -1137 1139 8.673617379884035e-18 -1137 1140 -0.1063100137174232 -1138 640 -0.0009703703703703715 -1138 641 -0.0005 -1138 642 -0.008333333333333333 -1138 646 -0.0002814814814814882 -1138 647 -1.951563910473908e-18 -1138 648 -1.734723475976807e-18 -1138 652 -0.0009703703703703745 -1138 653 0.000500000000000002 -1138 654 0.008333333333333333 -1138 1135 -0.001659259259259277 -1138 1136 -1.084202172485504e-19 -1138 1137 -0.03333333333333333 -1138 1138 0.007762962962962959 -1138 1139 -7.914675859144182e-18 -1138 1140 -1.734723475976807e-17 -1138 1141 -0.001659259259259226 -1138 1142 8.023096076392733e-18 -1138 1143 0.03333333333333334 -1139 640 -0.0005 -1139 641 -0.001040740740740738 -1139 642 -0.009259259259259198 -1139 646 -2.059984127722458e-18 -1139 647 -0.002362962962962972 -1139 648 -0.03703703703703719 -1139 652 0.000500000000000002 -1139 653 -0.001040740740740759 -1139 654 -0.009259259259259347 -1139 1136 0.0002814814814814665 -1139 1137 -2.081668171172169e-17 -1139 1138 -7.806255641895632e-18 -1139 1139 0.008325925925925935 -1139 1140 -5.30825383648903e-16 -1139 1141 7.914675859144182e-18 -1139 1142 0.0002814814814815098 -1139 1143 -3.122502256758253e-17 -1140 640 -0.01296296296296295 -1140 641 -0.01342592592592589 -1140 642 -0.1551783264746221 -1140 646 -1.561251128379126e-16 -1140 647 -0.02870370370370348 -1140 648 -0.2040466392318265 -1140 652 0.0129629629629631 -1140 653 -0.01342592592592639 -1140 654 -0.1551783264746264 -1140 1135 -0.02407407407407412 -1140 1136 8.673617379884035e-18 -1140 1137 -0.1063100137174232 -1140 1138 1.682681771697503e-16 -1140 1139 6.071532165918825e-17 -1140 1140 1.241426611796988 -1140 1141 0.02407407407407395 -1140 1142 6.245004513516506e-17 -1140 1143 -0.1063100137174177 -1141 646 -0.0009703703703703612 -1141 647 -0.000499999999999998 -1141 648 -0.008333333333333331 -1141 652 -0.0002814814814815097 -1141 653 -3.361026734705064e-18 -1141 654 -1.734723475976807e-18 -1141 658 -0.0009703703703703723 -1141 659 0.0005000000000000013 -1141 660 0.008333333333333333 -1141 1138 -0.001659259259259226 -1141 1139 7.806255641895632e-18 -1141 1140 -0.03333333333333333 -1141 1141 0.007762962962962943 -1141 1142 -1.322726650432315e-17 -1141 1143 -1.040834085586084e-17 -1141 1144 -0.001659259259259226 -1141 1145 5.421010862427522e-18 -1141 1146 0.03333333333333334 -1142 646 -0.0004999999999999981 -1142 647 -0.001040740740740732 -1142 648 -0.009259259259259236 -1142 652 -3.252606517456513e-18 -1142 653 -0.002362962962963001 -1142 654 -0.0370370370370374 -1142 658 0.0005000000000000013 -1142 659 -0.001040740740740754 -1142 660 -0.009259259259259404 -1142 1138 8.023096076392733e-18 -1142 1139 0.0002814814814815099 -1142 1140 4.128641872824801e-16 -1142 1141 -1.33356867215717e-17 -1142 1142 0.008325925925925962 -1142 1143 -1.387778780781446e-16 -1142 1144 5.204170427930421e-18 -1142 1145 0.0002814814814815098 -1142 1146 -2.567390744445674e-16 -1143 646 -0.01296296296296294 -1143 647 -0.01342592592592603 -1143 648 -0.1551783264746233 -1143 652 -6.418476861114186e-17 -1143 653 -0.02870370370370415 -1143 654 -0.2040466392318304 -1143 658 0.012962962962963 -1143 659 -0.01342592592592602 -1143 660 -0.1551783264746234 -1143 1138 -0.02407407407407396 -1143 1139 1.214306433183765e-17 -1143 1140 -0.1063100137174177 -1143 1141 -1.387778780781446e-16 -1143 1142 1.006139616066548e-16 -1143 1143 1.241426611796989 -1143 1144 0.0240740740740741 -1143 1145 1.908195823574488e-17 -1143 1146 -0.106310013717416 -1144 652 -0.0009703703703703634 -1144 653 -0.0004999999999999986 -1144 654 -0.008333333333333331 -1144 658 -0.0002814814814814748 -1144 659 -2.059984127722458e-18 -1144 664 -0.0009703703703703761 -1144 665 0.0005000000000000007 -1144 666 0.008333333333333335 -1144 1141 -0.001659259259259226 -1144 1142 5.204170427930421e-18 -1144 1143 -0.03333333333333333 -1144 1144 0.007762962962962967 -1144 1145 -7.806255641895632e-18 -1144 1146 -6.938893903907228e-18 -1144 1147 -0.001659259259259308 -1144 1148 2.602085213965211e-18 -1144 1149 0.03333333333333334 -1145 652 -0.0004999999999999987 -1145 653 -0.001040740740740736 -1145 654 -0.00925925925925933 -1145 658 -1.951563910473908e-18 -1145 659 -0.002362962962962954 -1145 660 -0.03703703703703692 -1145 664 0.0005000000000000007 -1145 665 -0.001040740740740738 -1145 666 -0.009259259259259167 -1145 1141 5.421010862427522e-18 -1145 1142 0.0002814814814815098 -1145 1143 4.163336342344337e-17 -1145 1144 -7.806255641895632e-18 -1145 1145 0.008325925925925917 -1145 1146 2.42861286636753e-16 -1145 1147 2.710505431213761e-18 -1145 1148 0.0002814814814814399 -1145 1149 -7.28583859910259e-17 -1146 652 -0.01296296296296289 -1146 653 -0.01342592592592578 -1146 654 -0.1551783264746213 -1146 658 -8.673617379884035e-17 -1146 659 -0.02870370370370376 -1146 660 -0.2040466392318224 -1146 664 0.01296296296296297 -1146 665 -0.01342592592592584 -1146 666 -0.1551783264746225 -1146 1141 -0.02407407407407412 -1146 1142 -1.040834085586084e-17 -1146 1143 -0.106310013717416 -1146 1144 6.938893903907228e-18 -1146 1145 -3.122502256758253e-17 -1146 1146 1.241426611796977 -1146 1147 0.02407407407407411 -1146 1148 -2.081668171172169e-17 -1146 1149 -0.1063100137174277 -1147 658 -0.0009703703703703718 -1147 659 -0.0004999999999999994 -1147 660 -0.008333333333333333 -1147 664 -0.0002814814814814748 -1147 665 2.710505431213761e-18 -1147 666 -3.469446951953614e-18 -1147 670 -0.0009703703703703568 -1147 671 0.0004999999999999966 -1147 672 0.008333333333333333 -1147 1144 -0.001659259259259308 -1147 1145 2.710505431213761e-18 -1147 1146 -0.03333333333333333 -1147 1147 0.007762962962962967 -1147 1148 1.051676107310939e-17 -1147 1149 -1.387778780781446e-17 -1147 1150 -0.001659259259259226 -1147 1151 -1.322726650432315e-17 -1147 1152 0.03333333333333334 -1148 658 -0.0004999999999999994 -1148 659 -0.00104074074074073 -1148 660 -0.00925925925925913 -1148 664 2.710505431213761e-18 -1148 665 -0.002362962962962954 -1148 666 -0.03703703703703681 -1148 670 0.0004999999999999966 -1148 671 -0.001040740740740723 -1148 672 -0.009259259259259285 -1148 1144 2.602085213965211e-18 -1148 1145 0.00028148148148144 -1148 1146 7.632783294297951e-17 -1148 1147 1.051676107310939e-17 -1148 1148 0.008325925925925917 -1148 1149 6.522560269672795e-16 -1148 1150 -1.33356867215717e-17 -1148 1151 0.0002814814814815098 -1148 1152 2.185751579730777e-16 -1149 658 -0.01296296296296292 -1149 659 -0.01342592592592572 -1149 660 -0.1551783264746215 -1149 664 1.110223024625157e-16 -1149 665 -0.02870370370370409 -1149 666 -0.2040466392318225 -1149 670 0.01296296296296281 -1149 671 -0.01342592592592557 -1149 672 -0.1551783264746198 -1149 1144 -0.02407407407407412 -1149 1145 -3.989863994746656e-17 -1149 1146 -0.1063100137174277 -1149 1147 8.847089727481716e-17 -1149 1148 1.023486850826316e-16 -1149 1149 1.24142661179698 -1149 1150 0.02407407407407403 -1149 1151 -1.196959198423997e-16 -1149 1152 -0.1063100137174164 -1150 664 -0.000970370370370379 -1150 665 -0.0005000000000000033 -1150 666 -0.008333333333333331 -1150 670 -0.0002814814814814854 -1150 671 1.951563910473908e-18 -1150 676 -0.0009703703703703766 -1150 677 0.0005000000000000013 -1150 678 0.008333333333333335 -1150 1147 -0.001659259259259226 -1150 1148 -1.344410693882025e-17 -1150 1149 -0.03333333333333333 -1150 1150 0.007762962962962959 -1150 1151 8.239936510889834e-18 -1150 1152 -6.938893903907228e-18 -1150 1153 -0.001659259259259283 -1150 1154 5.204170427930421e-18 -1150 1155 0.03333333333333334 -1151 664 -0.0005000000000000034 -1151 665 -0.001040740740740768 -1151 666 -0.00925925925925947 -1151 670 2.059984127722458e-18 -1151 671 -0.002362962962962969 -1151 672 -0.0370370370370371 -1151 676 0.0005000000000000014 -1151 677 -0.001040740740740746 -1151 678 -0.009259259259259228 -1151 1147 -1.322726650432315e-17 -1151 1148 0.0002814814814815098 -1151 1149 -5.204170427930421e-16 -1151 1150 8.131516293641283e-18 -1151 1151 0.008325925925925931 -1151 1152 -4.336808689942018e-16 -1151 1153 5.204170427930421e-18 -1151 1154 0.0002814814814814613 -1151 1155 -2.740863092043355e-16 -1152 664 -0.01296296296296308 -1152 665 -0.01342592592592617 -1152 666 -0.1551783264746249 -1152 670 8.153200337090993e-17 -1152 671 -0.02870370370370363 -1152 672 -0.2040466392318244 -1152 676 0.012962962962963 -1152 677 -0.01342592592592593 -1152 678 -0.1551783264746232 -1152 1147 -0.02407407407407404 -1152 1148 -3.642919299551295e-17 -1152 1149 -0.1063100137174164 -1152 1150 -1.35308431126191e-16 -1152 1151 1.214306433183765e-16 -1152 1152 1.241426611796977 -1152 1153 0.02407407407407418 -1152 1154 1.07552855510562e-16 -1152 1155 -0.1063100137174237 -1153 670 -0.0009703703703703678 -1153 671 -0.0004999999999999988 -1153 672 -0.008333333333333333 -1153 676 -0.0002814814814814885 -1153 677 -1.192622389734055e-18 -1153 678 -1.734723475976807e-18 -1153 682 -0.0009703703703703678 -1153 683 0.0005 -1153 684 0.008333333333333335 -1153 1150 -0.001659259259259283 -1153 1151 5.204170427930421e-18 -1153 1152 -0.03333333333333333 -1153 1153 0.007762962962962959 -1153 1154 -5.204170427930421e-18 -1153 1155 -1.387778780781446e-17 -1153 1156 -0.00165925925925922 -1153 1158 0.03333333333333334 -1154 670 -0.0004999999999999987 -1154 671 -0.001040740740740729 -1154 672 -0.009259259259259155 -1154 676 -1.301042606982605e-18 -1154 677 -0.002362962962962973 -1154 678 -0.03703703703703703 -1154 682 0.0005 -1154 683 -0.001040740740740747 -1154 684 -0.009259259259259377 -1154 1150 5.204170427930421e-18 -1154 1151 0.0002814814814814613 -1154 1152 2.081668171172169e-17 -1154 1153 -5.204170427930421e-18 -1154 1154 0.008325925925925935 -1154 1155 1.457167719820518e-16 -1154 1157 0.0002814814814815154 -1155 670 -0.01296296296296289 -1155 671 -0.0134259259259257 -1155 672 -0.1551783264746211 -1155 676 -1.301042606982605e-16 -1155 677 -0.02870370370370403 -1155 678 -0.2040466392318266 -1155 682 0.01296296296296302 -1155 683 -0.01342592592592604 -1155 684 -0.1551783264746249 -1155 1150 -0.02407407407407419 -1155 1151 7.459310946700271e-17 -1155 1152 -0.1063100137174237 -1155 1153 2.393918396847994e-16 -1155 1154 4.85722573273506e-17 -1155 1155 1.241426611796985 -1155 1156 0.02407407407407396 -1155 1158 -0.1063100137174168 -1156 676 -0.0009703703703703678 -1156 677 -0.0005000000000000001 -1156 678 -0.008333333333333333 -1156 682 -0.0002814814814814777 -1156 683 -2.602085213965211e-18 -1156 684 -1.734723475976807e-18 -1156 688 -0.0009703703703703827 -1156 689 0.0005000000000000027 -1156 690 0.008333333333333335 -1156 1153 -0.00165925925925922 -1156 1155 -0.03333333333333333 -1156 1156 0.007762962962962966 -1156 1157 -1.062518129035794e-17 -1156 1158 -6.938893903907228e-18 -1156 1159 -0.001659259259259308 -1156 1160 1.062518129035794e-17 -1156 1161 0.03333333333333334 -1157 676 -0.0005000000000000001 -1157 677 -0.001040740740740747 -1157 678 -0.009259259259259377 -1157 682 -2.602085213965211e-18 -1157 683 -0.002362962962962958 -1157 684 -0.03703703703703715 -1157 688 0.0005000000000000026 -1157 689 -0.001040740740740752 -1157 690 -0.009259259259259169 -1157 1154 0.0002814814814815154 -1157 1156 -1.062518129035794e-17 -1157 1157 0.008325925925925921 -1157 1158 -3.816391647148976e-16 -1157 1159 1.062518129035794e-17 -1157 1160 0.00028148148148144 -1157 1161 -8.153200337090993e-17 -1158 676 -0.01296296296296302 -1158 677 -0.01342592592592604 -1158 678 -0.1551783264746249 -1158 682 -3.642919299551295e-17 -1158 683 -0.02870370370370317 -1158 684 -0.2040466392318246 -1158 688 0.01296296296296306 -1158 689 -0.0134259259259262 -1158 690 -0.155178326474624 -1158 1153 -0.02407407407407396 -1158 1155 -0.1063100137174168 -1158 1156 -1.405126015541214e-16 -1158 1157 -1.578598363138894e-16 -1158 1158 1.241426611796987 -1158 1159 0.0240740740740741 -1158 1160 2.775557561562891e-17 -1158 1161 -0.1063100137174277 -1159 682 -0.0009703703703703649 -1159 683 -0.0004999999999999974 -1159 684 -0.008333333333333333 -1159 688 -0.0002814814814814748 -1159 689 -1.192622389734055e-18 -1159 690 -3.469446951953614e-18 -1159 694 -0.0009703703703703634 -1159 695 0.0004999999999999986 -1159 696 0.008333333333333333 -1159 1156 -0.001659259259259308 -1159 1157 1.062518129035794e-17 -1159 1158 -0.03333333333333333 -1159 1159 0.007762962962962968 -1159 1160 -5.312590645178972e-18 -1159 1161 -1.387778780781446e-17 -1159 1162 -0.001659259259259226 -1159 1163 -5.312590645178972e-18 -1159 1164 0.03333333333333334 -1160 682 -0.0004999999999999974 -1160 683 -0.001040740740740716 -1160 684 -0.009259259259259023 -1160 688 -1.192622389734055e-18 -1160 689 -0.002362962962962954 -1160 690 -0.03703703703703692 -1160 694 0.0004999999999999987 -1160 695 -0.001040740740740736 -1160 696 -0.009259259259259287 -1160 1156 1.062518129035794e-17 -1160 1157 0.00028148148148144 -1160 1158 5.100087019371813e-16 -1160 1159 -5.421010862427522e-18 -1160 1160 0.008325925925925917 -1160 1161 2.324529457808922e-16 -1160 1162 -5.421010862427522e-18 -1160 1163 0.0002814814814815098 -1160 1164 2.116362640691705e-16 -1161 682 -0.01296296296296284 -1161 683 -0.01342592592592572 -1161 684 -0.1551783264746199 -1161 688 -5.204170427930421e-17 -1161 689 -0.02870370370370375 -1161 690 -0.2040466392318225 -1161 694 0.01296296296296289 -1161 695 -0.01342592592592592 -1161 696 -0.1551783264746213 -1161 1156 -0.02407407407407412 -1161 1157 -3.989863994746656e-17 -1161 1158 -0.1063100137174277 -1161 1159 1.214306433183765e-17 -1161 1160 -3.122502256758253e-17 -1161 1161 1.241426611796977 -1161 1162 0.0240740740740741 -1161 1163 3.469446951953614e-18 -1161 1164 -0.106310013717416 -1162 688 -0.0009703703703703723 -1162 689 -0.0005000000000000013 -1162 690 -0.008333333333333331 -1162 694 -0.0002814814814814855 -1162 695 6.505213034913027e-19 -1162 700 -0.0009703703703703744 -1162 701 0.0005000000000000007 -1162 702 0.008333333333333335 -1162 1159 -0.001659259259259226 -1162 1160 -5.421010862427522e-18 -1162 1161 -0.03333333333333333 -1162 1162 0.007762962962962959 -1162 1163 2.710505431213761e-18 -1162 1164 3.469446951953614e-18 -1162 1165 -0.001659259259259283 -1162 1166 2.602085213965211e-18 -1162 1167 0.03333333333333334 -1163 688 -0.0005000000000000014 -1163 689 -0.001040740740740754 -1163 690 -0.009259259259259361 -1163 694 6.505213034913027e-19 -1163 695 -0.002362962962962968 -1163 696 -0.0370370370370371 -1163 700 0.0005000000000000008 -1163 701 -0.001040740740740742 -1163 702 -0.0092592592592592 -1163 1159 -5.204170427930421e-18 -1163 1160 0.0002814814814815098 -1163 1161 -8.326672684688674e-17 -1163 1162 2.710505431213761e-18 -1163 1163 0.008325925925925931 -1163 1164 -3.920475055707584e-16 -1163 1165 2.38524477946811e-18 -1163 1166 0.0002814814814814607 -1163 1167 -1.578598363138894e-16 -1164 688 -0.012962962962963 -1164 689 -0.01342592592592616 -1164 690 -0.1551783264746234 -1164 694 2.775557561562891e-17 -1164 695 -0.02870370370370367 -1164 696 -0.2040466392318244 -1164 700 0.01296296296296297 -1164 701 -0.01342592592592591 -1164 702 -0.1551783264746226 -1164 1159 -0.02407407407407412 -1164 1160 3.816391647148976e-17 -1164 1161 -0.106310013717416 -1164 1162 -1.734723475976807e-18 -1164 1163 1.35308431126191e-16 -1164 1164 1.241426611796978 -1164 1165 0.02407407407407413 -1164 1166 2.949029909160572e-17 -1164 1167 -0.1063100137174242 -1165 694 -0.00097037037037037 -1165 695 -0.0004999999999999995 -1165 696 -0.008333333333333333 -1165 700 -0.0002814814814814856 -1165 701 2.168404344971009e-19 -1165 702 -3.469446951953614e-18 -1165 706 -0.0009703703703703656 -1165 707 0.0004999999999999993 -1165 708 0.008333333333333333 -1165 1162 -0.001659259259259283 -1165 1163 2.38524477946811e-18 -1165 1164 -0.03333333333333335 -1165 1165 0.007762962962962961 -1165 1166 1.084202172485504e-19 -1165 1167 -1.387778780781446e-17 -1165 1168 -0.001659259259259226 -1165 1169 -2.49366499671666e-18 -1165 1170 0.03333333333333334 -1166 694 -0.0004999999999999994 -1166 695 -0.001040740740740733 -1166 696 -0.009259259259259162 -1166 701 -0.002362962962962969 -1166 702 -0.03703703703703699 -1166 706 0.0004999999999999994 -1166 707 -0.001040740740740741 -1166 708 -0.009259259259259316 -1166 1162 2.602085213965211e-18 -1166 1163 0.0002814814814814606 -1166 1164 -1.214306433183765e-17 -1166 1165 1.084202172485504e-19 -1166 1166 0.008325925925925933 -1166 1167 1.387778780781446e-17 -1166 1168 -2.602085213965211e-18 -1166 1169 0.0002814814814815096 -1166 1170 9.540979117872439e-17 -1167 694 -0.01296296296296292 -1167 695 -0.01342592592592579 -1167 696 -0.1551783264746216 -1167 700 -7.28583859910259e-17 -1167 701 -0.02870370370370394 -1167 702 -0.2040466392318261 -1167 706 0.01296296296296299 -1167 707 -0.01342592592592601 -1167 708 -0.1551783264746243 -1167 1162 -0.02407407407407412 -1167 1163 3.469446951953614e-18 -1167 1164 -0.1063100137174242 -1167 1165 1.682681771697503e-16 -1167 1166 1.838806884535416e-16 -1167 1167 1.241426611796988 -1167 1168 0.02407407407407394 -1167 1169 1.734723475976807e-18 -1167 1170 -0.1063100137174177 -1168 700 -0.0009703703703703701 -1168 701 -0.0005000000000000007 -1168 702 -0.008333333333333331 -1168 706 -0.0002814814814815097 -1168 707 -6.505213034913027e-19 -1168 708 -1.734723475976807e-18 -1168 712 -0.0009703703703703723 -1168 713 0.0005000000000000013 -1168 714 0.008333333333333333 -1168 1165 -0.001659259259259226 -1168 1166 -2.710505431213761e-18 -1168 1167 -0.03333333333333333 -1168 1168 0.007762962962962943 -1168 1169 -2.49366499671666e-18 -1168 1170 -1.040834085586084e-17 -1168 1171 -0.001659259259259226 -1168 1172 5.421010862427522e-18 -1168 1173 0.03333333333333334 -1169 700 -0.0005000000000000008 -1169 701 -0.00104074074074075 -1169 702 -0.009259259259259354 -1169 706 -6.505213034913027e-19 -1169 707 -0.002362962962963001 -1169 708 -0.03703703703703742 -1169 712 0.0005000000000000013 -1169 713 -0.001040740740740754 -1169 714 -0.009259259259259404 -1169 1165 -2.49366499671666e-18 -1169 1166 0.0002814814814815095 -1169 1167 -5.204170427930421e-17 -1169 1168 -2.602085213965211e-18 -1169 1169 0.008325925925925962 -1169 1170 -2.706168622523819e-16 -1169 1171 5.204170427930421e-18 -1169 1172 0.0002814814814815098 -1169 1173 -2.567390744445674e-16 -1170 700 -0.01296296296296305 -1170 701 -0.01342592592592613 -1170 702 -0.1551783264746254 -1170 706 4.85722573273506e-17 -1170 707 -0.02870370370370405 -1170 708 -0.2040466392318304 -1170 712 0.012962962962963 -1170 713 -0.01342592592592602 -1170 714 -0.1551783264746234 -1170 1165 -0.02407407407407398 -1170 1166 2.775557561562891e-17 -1170 1167 -0.1063100137174177 -1170 1168 -1.405126015541214e-16 -1170 1169 9.020562075079397e-17 -1170 1170 1.241426611796989 -1170 1171 0.0240740740740741 -1170 1172 1.908195823574488e-17 -1170 1173 -0.106310013717416 -1171 706 -0.0009703703703703634 -1171 707 -0.0004999999999999986 -1171 708 -0.008333333333333331 -1171 712 -0.000281481481481488 -1171 713 -2.059984127722458e-18 -1171 718 -0.0009703703703703737 -1171 719 0.0005000000000000007 -1171 720 0.008333333333333333 -1171 1168 -0.001659259259259226 -1171 1169 5.204170427930421e-18 -1171 1170 -0.03333333333333333 -1171 1171 0.007762962962962958 -1171 1172 -7.914675859144182e-18 -1171 1173 -6.938893903907228e-18 -1171 1174 -0.001659259259259277 -1171 1175 2.710505431213761e-18 -1171 1176 0.03333333333333334 -1172 706 -0.0004999999999999987 -1172 707 -0.001040740740740736 -1172 708 -0.00925925925925933 -1172 712 -1.951563910473908e-18 -1172 713 -0.002362962962962972 -1172 714 -0.03703703703703703 -1172 718 0.0005000000000000008 -1172 719 -0.001040740740740743 -1172 720 -0.009259259259259228 -1172 1168 5.421010862427522e-18 -1172 1169 0.0002814814814815098 -1172 1170 4.163336342344337e-17 -1172 1171 -7.914675859144182e-18 -1172 1172 0.008325925925925935 -1172 1173 1.179611963664229e-16 -1172 1174 2.602085213965211e-18 -1172 1175 0.0002814814814814666 -1172 1176 -1.370431546021678e-16 -1173 706 -0.01296296296296289 -1173 707 -0.01342592592592578 -1173 708 -0.1551783264746213 -1173 712 -8.500145032286355e-17 -1173 713 -0.02870370370370406 -1173 714 -0.2040466392318248 -1173 718 0.01296296296296297 -1173 719 -0.01342592592592591 -1173 720 -0.1551783264746226 -1173 1168 -0.02407407407407412 -1173 1169 -1.040834085586084e-17 -1173 1170 -0.106310013717416 -1173 1171 1.387778780781446e-17 -1173 1172 1.318389841742373e-16 -1173 1173 1.241426611796978 -1173 1174 0.0240740740740741 -1173 1175 1.561251128379126e-17 -1173 1176 -0.1063100137174232 -1174 712 -0.0009703703703703694 -1174 713 -0.0004999999999999994 -1174 714 -0.008333333333333333 -1174 718 -0.0002814814814814639 -1174 719 -6.505213034913027e-19 -1174 724 -0.0009703703703703721 -1174 725 0.0005 -1174 726 0.008333333333333335 -1174 1171 -0.001659259259259277 -1174 1172 2.602085213965211e-18 -1174 1173 -0.03333333333333333 -1174 1174 0.007762962962962975 -1174 1175 -2.602085213965211e-18 -1174 1176 -1.387778780781446e-17 -1174 1177 -0.001659259259259283 -1174 1179 0.03333333333333334 -1175 712 -0.0004999999999999994 -1175 713 -0.001040740740740734 -1175 714 -0.009259259259259189 -1175 718 -7.589415207398531e-19 -1175 719 -0.00236296296296294 -1175 720 -0.0370370370370367 -1175 724 0.0005000000000000001 -1175 725 -0.001040740740740737 -1175 726 -0.009259259259259169 -1175 1171 2.710505431213761e-18 -1175 1172 0.0002814814814814665 -1175 1173 1.040834085586084e-17 -1175 1174 -2.602085213965211e-18 -1175 1175 0.008325925925925903 -1175 1176 -1.040834085586084e-17 -1175 1177 -2.168404344971009e-19 -1175 1178 0.0002814814814814615 -1175 1179 -4.163336342344337e-17 -1176 712 -0.01296296296296292 -1176 713 -0.01342592592592579 -1176 714 -0.1551783264746216 -1176 718 -2.775557561562891e-17 -1176 719 -0.02870370370370361 -1176 720 -0.2040466392318205 -1176 724 0.01296296296296295 -1176 725 -0.01342592592592588 -1176 726 -0.1551783264746221 -1176 1171 -0.02407407407407412 -1176 1172 -3.469446951953614e-18 -1176 1173 -0.1063100137174232 -1176 1174 1.387778780781446e-17 -1176 1175 1.700029006457271e-16 -1176 1176 1.241426611796977 -1176 1177 0.02407407407407411 -1176 1178 2.081668171172169e-17 -1176 1179 -0.1063100137174241 -1177 718 -0.0009703703703703722 -1177 719 -0.0005000000000000001 -1177 720 -0.008333333333333333 -1177 724 -0.0002814814814814856 -1177 725 -1.192622389734055e-18 -1177 726 -3.469446951953614e-18 -1177 730 -0.0009703703703703723 -1177 731 0.0005000000000000013 -1177 732 0.008333333333333333 -1177 1174 -0.001659259259259283 -1177 1175 -1.084202172485504e-19 -1177 1176 -0.03333333333333333 -1177 1177 0.007762962962962959 -1177 1178 -5.312590645178972e-18 -1177 1179 -1.387778780781446e-17 -1177 1180 -0.001659259259259226 -1177 1181 5.421010862427522e-18 -1177 1182 0.03333333333333334 -1178 718 -0.0005 -1178 719 -0.001040740740740737 -1178 720 -0.00925925925925917 -1178 724 -1.409462824231156e-18 -1178 725 -0.002362962962962969 -1178 726 -0.03703703703703704 -1178 730 0.0005000000000000013 -1178 731 -0.001040740740740754 -1178 732 -0.009259259259259404 -1178 1175 0.0002814814814814615 -1178 1176 -4.163336342344337e-17 -1178 1177 -5.204170427930421e-18 -1178 1178 0.008325925925925931 -1178 1179 -1.908195823574488e-16 -1178 1180 5.204170427930421e-18 -1178 1181 0.0002814814814815098 -1178 1182 -2.567390744445674e-16 -1179 718 -0.01296296296296295 -1179 719 -0.01342592592592588 -1179 720 -0.1551783264746221 -1179 724 -5.377642775528102e-17 -1179 725 -0.02870370370370384 -1179 726 -0.2040466392318244 -1179 730 0.012962962962963 -1179 731 -0.01342592592592602 -1179 732 -0.1551783264746234 -1179 1174 -0.02407407407407412 -1179 1175 2.081668171172169e-17 -1179 1176 -0.1063100137174241 -1179 1177 1.561251128379126e-17 -1179 1178 1.561251128379126e-16 -1179 1179 1.241426611796978 -1179 1180 0.0240740740740741 -1179 1181 1.908195823574488e-17 -1179 1182 -0.106310013717416 -1180 724 -0.0009703703703703634 -1180 725 -0.0004999999999999986 -1180 726 -0.008333333333333331 -1180 730 -0.0002814814814815097 -1180 731 -2.059984127722458e-18 -1180 732 -1.734723475976807e-18 -1180 736 -0.0009703703703703701 -1180 737 0.0005000000000000007 -1180 738 0.008333333333333333 -1180 1177 -0.001659259259259226 -1180 1178 5.204170427930421e-18 -1180 1179 -0.03333333333333333 -1180 1180 0.007762962962962942 -1180 1181 -7.914675859144182e-18 -1180 1182 -1.040834085586084e-17 -1180 1183 -0.001659259259259226 -1180 1184 2.710505431213761e-18 -1180 1185 0.03333333333333334 -1181 724 -0.0004999999999999987 -1181 725 -0.001040740740740736 -1181 726 -0.00925925925925933 -1181 730 -1.843143693225358e-18 -1181 731 -0.002362962962963001 -1181 732 -0.03703703703703733 -1181 736 0.0005000000000000007 -1181 737 -0.00104074074074075 -1181 738 -0.009259259259259373 -1181 1177 5.421010862427522e-18 -1181 1178 0.0002814814814815098 -1181 1179 4.163336342344337e-17 -1181 1180 -8.023096076392733e-18 -1181 1181 0.008325925925925962 -1181 1182 1.179611963664229e-16 -1181 1183 2.602085213965211e-18 -1181 1184 0.0002814814814815098 -1181 1185 -1.405126015541214e-16 -1182 724 -0.01296296296296289 -1182 725 -0.01342592592592578 -1182 726 -0.1551783264746213 -1182 730 -1.595945597898663e-16 -1182 731 -0.02870370370370436 -1182 732 -0.2040466392318304 -1182 736 0.01296296296296305 -1182 737 -0.01342592592592606 -1182 738 -0.1551783264746254 -1182 1177 -0.02407407407407412 -1182 1178 -1.040834085586084e-17 -1182 1179 -0.106310013717416 -1182 1180 1.613292832658431e-16 -1182 1181 1.318389841742373e-16 -1182 1182 1.241426611796989 -1182 1183 0.02407407407407396 -1182 1184 1.561251128379126e-17 -1182 1185 -0.1063100137174177 -1183 730 -0.0009703703703703656 -1183 731 -0.0004999999999999994 -1183 732 -0.008333333333333331 -1183 736 -0.0002814814814814881 -1183 737 -6.505213034913027e-19 -1183 742 -0.0009703703703703715 -1183 743 0.0005 -1183 744 0.008333333333333333 -1183 1180 -0.001659259259259226 -1183 1181 2.602085213965211e-18 -1183 1182 -0.03333333333333333 -1183 1183 0.007762962962962958 -1183 1184 -8.023096076392733e-18 -1183 1185 -6.938893903907228e-18 -1183 1186 -0.001659259259259278 -1183 1187 5.421010862427522e-18 -1183 1188 0.03333333333333334 -1184 730 -0.0004999999999999995 -1184 731 -0.001040740740740741 -1184 732 -0.009259259259259339 -1184 736 -6.505213034913027e-19 -1184 737 -0.002362962962962972 -1184 738 -0.03703703703703705 -1184 742 0.0005000000000000001 -1184 743 -0.001040740740740738 -1184 744 -0.009259259259259196 -1184 1180 2.818925648462312e-18 -1184 1181 0.0002814814814815098 -1184 1182 8.673617379884035e-18 -1184 1183 -8.023096076392733e-18 -1184 1184 0.008325925925925938 -1184 1185 3.122502256758253e-17 -1184 1186 5.204170427930421e-18 -1184 1187 0.0002814814814814629 -1184 1188 -2.237793284010081e-16 -1185 730 -0.01296296296296299 -1185 731 -0.01342592592592594 -1185 732 -0.1551783264746243 -1185 736 4.85722573273506e-17 -1185 737 -0.02870370370370393 -1185 738 -0.2040466392318265 -1185 742 0.01296296296296295 -1185 743 -0.01342592592592589 -1185 744 -0.1551783264746221 -1185 1180 -0.02407407407407397 -1185 1181 -1.734723475976807e-18 -1185 1182 -0.1063100137174177 -1185 1183 -1.734723475976807e-16 -1185 1184 1.196959198423997e-16 -1185 1185 1.241426611796991 -1185 1186 0.02407407407407414 -1185 1187 -7.806255641895632e-17 -1185 1188 -0.106310013717424 -1186 736 -0.0009703703703703715 -1186 737 -0.0005 -1186 738 -0.008333333333333333 -1186 742 -0.0002814814814814747 -1186 743 6.505213034913027e-19 -1186 748 -0.000970370370370368 -1186 749 0.0004999999999999994 -1186 750 0.008333333333333333 -1186 1183 -0.001659259259259278 -1186 1184 5.204170427930421e-18 -1186 1185 -0.03333333333333333 -1186 1186 0.007762962962962967 -1186 1187 -7.914675859144182e-18 -1186 1188 -1.387778780781446e-17 -1186 1189 -0.001659259259259257 -1186 1190 2.710505431213761e-18 -1186 1191 0.03333333333333334 -1187 736 -0.0005 -1187 737 -0.001040740740740738 -1187 738 -0.009259259259259198 -1187 742 5.421010862427522e-19 -1187 743 -0.002362962962962954 -1187 744 -0.03703703703703695 -1187 748 0.0004999999999999994 -1187 749 -0.001040740740740737 -1187 750 -0.009259259259259255 -1187 1183 5.421010862427522e-18 -1187 1184 0.0002814814814814629 -1187 1185 7.28583859910259e-17 -1187 1186 -7.914675859144182e-18 -1187 1187 0.008325925925925917 -1187 1188 6.938893903907228e-17 -1187 1189 2.49366499671666e-18 -1187 1190 0.0002814814814814864 -1187 1191 6.591949208711867e-17 -1188 736 -0.01296296296296295 -1188 737 -0.01342592592592589 -1188 738 -0.1551783264746221 -1188 742 2.949029909160572e-17 -1188 743 -0.02870370370370362 -1188 744 -0.2040466392318224 -1188 748 0.01296296296296292 -1188 749 -0.01342592592592588 -1188 750 -0.1551783264746217 -1188 1183 -0.02407407407407394 -1188 1184 -1.110223024625157e-16 -1188 1185 -0.106310013717424 -1188 1186 -3.521488656232918e-16 -1188 1187 -4.85722573273506e-17 -1188 1188 1.241426611796977 -1188 1189 0.02407407407407429 -1188 1190 9.540979117872439e-17 -1188 1191 -0.1063100137174197 -1189 742 -0.0009703703703703725 -1189 743 -0.0005000000000000007 -1189 744 -0.008333333333333333 -1189 748 -0.0002814814814814747 -1189 754 -0.0009703703703703737 -1189 755 0.0005000000000000007 -1189 756 0.008333333333333333 -1189 1186 -0.001659259259259257 -1189 1187 2.49366499671666e-18 -1189 1188 -0.03333333333333333 -1189 1189 0.007762962962962966 -1189 1190 -5.204170427930421e-18 -1189 1191 -1.387778780781446e-17 -1189 1192 -0.001659259259259277 -1189 1193 2.710505431213761e-18 -1189 1194 0.03333333333333334 -1190 742 -0.0005000000000000007 -1190 743 -0.001040740740740746 -1190 744 -0.009259259259259293 -1190 749 -0.002362962962962954 -1190 750 -0.037037037037037 -1190 754 0.0005000000000000008 -1190 755 -0.001040740740740743 -1190 756 -0.009259259259259228 -1190 1186 2.710505431213761e-18 -1190 1187 0.0002814814814814864 -1190 1188 2.151057110211241e-16 -1190 1189 -5.204170427930421e-18 -1190 1190 0.008325925925925912 -1190 1191 -1.040834085586084e-16 -1190 1192 2.602085213965211e-18 -1190 1193 0.0002814814814814666 -1190 1194 -1.370431546021678e-16 -1191 742 -0.01296296296296297 -1191 743 -0.013425925925926 -1191 744 -0.1551783264746227 -1191 749 -0.02870370370370347 -1191 750 -0.2040466392318224 -1191 754 0.01296296296296297 -1191 755 -0.01342592592592591 -1191 756 -0.1551783264746226 -1191 1186 -0.02407407407407408 -1191 1187 7.806255641895632e-17 -1191 1188 -0.1063100137174197 -1191 1189 -1.908195823574488e-17 -1191 1190 -5.898059818321144e-17 -1191 1191 1.241426611796974 -1191 1192 0.0240740740740741 -1191 1193 1.561251128379126e-17 -1191 1194 -0.1063100137174232 -1192 748 -0.0009703703703703694 -1192 749 -0.0004999999999999994 -1192 750 -0.008333333333333333 -1192 754 -0.0002814814814814882 -1192 755 -5.421010862427522e-19 -1192 756 -1.734723475976807e-18 -1192 760 -0.000970370370370368 -1192 761 0.0004999999999999999 -1192 762 0.008333333333333333 -1192 1189 -0.001659259259259277 -1192 1190 2.602085213965211e-18 -1192 1191 -0.03333333333333333 -1192 1192 0.007762962962962959 -1192 1193 -2.710505431213761e-18 -1192 1194 -1.734723475976807e-17 -1192 1195 -0.001659259259259226 -1192 1196 1.084202172485504e-19 -1192 1197 0.03333333333333334 -1193 748 -0.0004999999999999994 -1193 749 -0.001040740740740734 -1193 750 -0.009259259259259189 -1193 754 -6.505213034913027e-19 -1193 755 -0.002362962962962972 -1193 756 -0.03703703703703705 -1193 760 0.0005 -1193 761 -0.001040740740740745 -1193 762 -0.009259259259259345 -1193 1189 2.710505431213761e-18 -1193 1190 0.0002814814814814665 -1193 1191 1.040834085586084e-17 -1193 1192 -2.818925648462312e-18 -1193 1193 0.008325925925925935 -1193 1194 2.42861286636753e-17 -1193 1195 -1.084202172485504e-19 -1193 1196 0.0002814814814815098 -1193 1197 -2.255140518769849e-17 -1194 748 -0.01296296296296292 -1194 749 -0.01342592592592579 -1194 750 -0.1551783264746216 -1194 754 -1.006139616066548e-16 -1194 755 -0.02870370370370393 -1194 756 -0.2040466392318265 -1194 760 0.01296296296296302 -1194 761 -0.01342592592592604 -1194 762 -0.1551783264746249 -1194 1189 -0.02407407407407412 -1194 1190 -3.469446951953614e-18 -1194 1191 -0.1063100137174232 -1194 1192 1.647987302177967e-16 -1194 1193 1.283695372222837e-16 -1194 1194 1.241426611796988 -1194 1195 0.02407407407407396 -1194 1196 1.040834085586084e-17 -1194 1197 -0.1063100137174177 -1195 754 -0.000970370370370368 -1195 755 -0.0005 -1195 756 -0.008333333333333331 -1195 760 -0.0002814814814815097 -1195 761 7.589415207398531e-19 -1195 762 -1.734723475976807e-18 -1195 766 -0.0009703703703703656 -1195 767 0.0004999999999999993 -1195 768 0.008333333333333333 -1195 1192 -0.001659259259259226 -1195 1193 -1.084202172485504e-19 -1195 1194 -0.03333333333333333 -1195 1195 0.007762962962962944 -1195 1196 2.710505431213761e-18 -1195 1197 -1.040834085586084e-17 -1195 1198 -0.001659259259259226 -1195 1199 -2.602085213965211e-18 -1195 1200 0.03333333333333334 -1196 754 -0.0005000000000000001 -1196 755 -0.001040740740740745 -1196 756 -0.009259259259259345 -1196 760 7.589415207398531e-19 -1196 761 -0.002362962962963001 -1196 762 -0.03703703703703737 -1196 766 0.0004999999999999994 -1196 767 -0.001040740740740741 -1196 768 -0.009259259259259316 -1196 1192 2.168404344971009e-19 -1196 1193 0.0002814814814815099 -1196 1194 -2.081668171172169e-17 -1196 1195 2.710505431213761e-18 -1196 1196 0.008325925925925962 -1196 1197 -5.551115123125783e-17 -1196 1198 -2.710505431213761e-18 -1196 1199 0.0002814814814815098 -1196 1200 9.540979117872439e-17 -1197 754 -0.01296296296296302 -1197 755 -0.01342592592592604 -1197 756 -0.1551783264746249 -1197 760 1.040834085586084e-16 -1197 761 -0.02870370370370423 -1197 762 -0.2040466392318304 -1197 766 0.01296296296296292 -1197 767 -0.01342592592592595 -1197 768 -0.1551783264746218 -1197 1192 -0.02407407407407396 -1197 1193 1.214306433183765e-17 -1197 1194 -0.1063100137174177 -1197 1195 -1.405126015541214e-16 -1197 1196 1.144917494144693e-16 -1197 1197 1.241426611796989 -1197 1198 0.0240740740740741 -1197 1199 1.040834085586084e-17 -1197 1200 -0.106310013717416 -1198 760 -0.0009703703703703701 -1198 761 -0.0005000000000000007 -1198 762 -0.008333333333333331 -1198 766 -0.0002814814814814749 -1198 767 -6.505213034913027e-19 -1198 772 -0.0009703703703703784 -1198 773 0.0005000000000000013 -1198 774 0.008333333333333335 -1198 1195 -0.001659259259259226 -1198 1196 -2.710505431213761e-18 -1198 1197 -0.03333333333333333 -1198 1198 0.007762962962962967 -1198 1199 -2.49366499671666e-18 -1198 1200 -6.938893903907228e-18 -1198 1201 -0.001659259259259308 -1198 1202 5.204170427930421e-18 -1198 1203 0.03333333333333334 -1199 760 -0.0005000000000000008 -1199 761 -0.00104074074074075 -1199 762 -0.009259259259259354 -1199 766 -6.505213034913027e-19 -1199 767 -0.002362962962962954 -1199 768 -0.03703703703703701 -1199 772 0.0005000000000000013 -1199 773 -0.001040740740740743 -1199 774 -0.009259259259259196 -1199 1195 -2.602085213965211e-18 -1199 1196 0.0002814814814815099 -1199 1197 -5.204170427930421e-17 -1199 1198 -2.49366499671666e-18 -1199 1199 0.008325925925925917 -1199 1200 -1.249000902703301e-16 -1199 1201 5.421010862427522e-18 -1199 1202 0.0002814814814814399 -1199 1203 -1.89084858881472e-16 -1200 760 -0.01296296296296297 -1200 761 -0.01342592592592606 -1200 762 -0.1551783264746229 -1200 766 -2.949029909160572e-17 -1200 767 -0.02870370370370345 -1200 768 -0.2040466392318224 -1200 772 0.012962962962963 -1200 773 -0.01342592592592587 -1200 774 -0.155178326474623 -1200 1195 -0.02407407407407412 -1200 1196 2.775557561562891e-17 -1200 1197 -0.106310013717416 -1200 1198 1.040834085586084e-17 -1200 1199 -7.632783294297951e-17 -1200 1200 1.241426611796977 -1200 1201 0.02407407407407411 -1200 1202 -1.734723475976807e-17 -1200 1203 -0.1063100137174277 -1201 766 -0.0009703703703703695 -1201 767 -0.0004999999999999987 -1201 768 -0.008333333333333333 -1201 772 -0.0002814814814814531 -1201 773 -1.301042606982605e-18 -1201 774 -1.734723475976807e-18 -1201 778 -0.0009703703703703715 -1201 779 0.0005 -1201 780 0.008333333333333333 -1201 1198 -0.001659259259259308 -1201 1199 5.312590645178972e-18 -1201 1200 -0.03333333333333333 -1201 1201 0.007762962962962983 -1201 1202 -5.312590645178972e-18 -1201 1203 -1.040834085586084e-17 -1201 1204 -0.001659259259259277 -1201 1206 0.03333333333333334 -1202 766 -0.0004999999999999987 -1202 767 -0.001040740740740725 -1202 768 -0.009259259259259123 -1202 772 -1.301042606982605e-18 -1202 773 -0.002362962962962925 -1202 774 -0.0370370370370366 -1202 778 0.0005000000000000001 -1202 779 -0.001040740740740738 -1202 780 -0.009259259259259196 -1202 1198 5.204170427930421e-18 -1202 1199 0.00028148148148144 -1202 1200 1.07552855510562e-16 -1202 1201 -5.421010862427522e-18 -1202 1202 0.008325925925925888 -1202 1203 2.775557561562891e-16 -1202 1204 -2.168404344971009e-19 -1202 1205 0.0002814814814814666 -1202 1206 -2.081668171172169e-17 -1203 766 -0.01296296296296289 -1203 767 -0.01342592592592563 -1203 768 -0.1551783264746209 -1203 772 -5.377642775528102e-17 -1203 773 -0.02870370370370342 -1203 774 -0.2040466392318186 -1203 778 0.01296296296296295 -1203 779 -0.01342592592592589 -1203 780 -0.1551783264746221 -1203 1198 -0.02407407407407412 -1203 1199 -4.85722573273506e-17 -1203 1200 -0.1063100137174277 -1203 1201 1.561251128379126e-17 -1203 1202 -2.775557561562891e-17 -1203 1203 1.241426611796976 -1203 1204 0.0240740740740741 -1203 1205 8.673617379884035e-18 -1203 1206 -0.1063100137174232 -1204 772 -0.0009703703703703715 -1204 773 -0.0005 -1204 774 -0.008333333333333333 -1204 778 -0.0002814814814814856 -1204 779 6.505213034913027e-19 -1204 784 -0.0009703703703703662 -1204 785 0.0004999999999999994 -1204 786 0.008333333333333333 -1204 1201 -0.001659259259259277 -1204 1202 -1.084202172485504e-19 -1204 1203 -0.03333333333333333 -1204 1204 0.007762962962962959 -1204 1205 2.710505431213761e-18 -1204 1206 -3.469446951953614e-18 -1204 1207 -0.001659259259259234 -1204 1208 -2.710505431213761e-18 -1204 1209 0.03333333333333334 -1205 772 -0.0005 -1205 773 -0.001040740740740738 -1205 774 -0.009259259259259198 -1205 778 6.505213034913027e-19 -1205 779 -0.002362962962962969 -1205 780 -0.03703703703703702 -1205 784 0.0004999999999999994 -1205 785 -0.00104074074074074 -1205 786 -0.009259259259259287 -1205 1202 0.0002814814814814665 -1205 1203 -2.081668171172169e-17 -1205 1204 2.710505431213761e-18 -1205 1205 0.008325925925925929 -1205 1206 -1.040834085586084e-16 -1205 1207 -2.710505431213761e-18 -1205 1208 0.0002814814814815037 -1205 1209 7.459310946700271e-17 -1206 772 -0.01296296296296295 -1206 773 -0.01342592592592589 -1206 774 -0.1551783264746221 -1206 778 2.949029909160572e-17 -1206 779 -0.0287037037037039 -1206 780 -0.2040466392318244 -1206 784 0.01296296296296292 -1206 785 -0.01342592592592594 -1206 786 -0.1551783264746218 -1206 1201 -0.02407407407407412 -1206 1202 8.673617379884035e-18 -1206 1203 -0.1063100137174232 -1206 1204 5.204170427930421e-18 -1206 1205 1.665334536937735e-16 -1206 1206 1.241426611796978 -1206 1207 0.02407407407407412 -1206 1208 2.602085213965211e-17 -1206 1209 -0.106310013717417 -1207 778 -0.0009703703703703707 -1207 779 -0.0005000000000000007 -1207 780 -0.008333333333333333 -1207 784 -0.00028148148148151 -1207 790 -0.0009703703703703699 -1207 791 0.0005000000000000007 -1207 792 0.008333333333333335 -1207 1204 -0.001659259259259234 -1207 1205 -2.710505431213761e-18 -1207 1206 -0.03333333333333334 -1207 1207 0.007762962962962945 -1207 1208 -1.084202172485504e-19 -1207 1209 -1.387778780781446e-17 -1207 1210 -0.00165925925925922 -1207 1211 2.818925648462312e-18 -1207 1212 0.03333333333333334 -1208 778 -0.0005000000000000008 -1208 779 -0.001040740740740749 -1208 780 -0.009259259259259325 -1208 784 1.084202172485504e-19 -1208 785 -0.002362962962963002 -1208 786 -0.03703703703703742 -1208 790 0.0005000000000000007 -1208 791 -0.001040740740740751 -1208 792 -0.009259259259259406 -1208 1204 -2.602085213965211e-18 -1208 1205 0.0002814814814815037 -1208 1206 -7.632783294297951e-17 -1208 1208 0.008325925925925964 -1208 1209 -2.393918396847994e-16 -1208 1210 2.710505431213761e-18 -1208 1211 0.0002814814814815153 -1208 1212 -1.179611963664229e-16 -1209 778 -0.01296296296296297 -1209 779 -0.01342592592592606 -1209 780 -0.1551783264746228 -1209 784 -7.632783294297951e-17 -1209 785 -0.02870370370370408 -1209 786 -0.2040466392318304 -1209 790 0.01296296296296305 -1209 791 -0.01342592592592607 -1209 792 -0.1551783264746254 -1209 1204 -0.02407407407407412 -1209 1205 3.122502256758253e-17 -1209 1206 -0.106310013717417 -1209 1207 1.700029006457271e-16 -1209 1208 9.194034422677078e-17 -1209 1209 1.241426611796989 -1209 1210 0.02407407407407394 -1209 1211 -3.469446951953614e-18 -1209 1212 -0.1063100137174168 -1210 784 -0.0009703703703703656 -1210 785 -0.0004999999999999995 -1210 786 -0.008333333333333333 -1210 790 -0.0002814814814814777 -1210 791 -1.192622389734055e-18 -1210 792 -1.734723475976807e-18 -1210 796 -0.0009703703703703761 -1210 797 0.0005000000000000007 -1210 798 0.008333333333333335 -1210 1207 -0.00165925925925922 -1210 1208 2.602085213965211e-18 -1210 1209 -0.03333333333333333 -1210 1210 0.007762962962962966 -1210 1211 -5.095750210681871e-18 -1210 1212 -6.938893903907228e-18 -1210 1213 -0.001659259259259308 -1210 1214 2.602085213965211e-18 -1210 1215 0.03333333333333334 -1211 784 -0.0004999999999999995 -1211 785 -0.001040740740740742 -1211 786 -0.00925925925925937 -1211 790 -1.301042606982605e-18 -1211 791 -0.002362962962962958 -1211 792 -0.03703703703703701 -1211 796 0.0005000000000000007 -1211 797 -0.001040740740740738 -1211 798 -0.009259259259259167 -1211 1207 2.710505431213761e-18 -1211 1208 0.0002814814814815154 -1211 1209 2.775557561562891e-17 -1211 1210 -5.095750210681871e-18 -1211 1211 0.008325925925925921 -1211 1212 1.665334536937735e-16 -1211 1213 2.710505431213761e-18 -1211 1214 0.0002814814814814399 -1211 1215 -7.28583859910259e-17 -1212 784 -0.012962962962963 -1212 785 -0.01342592592592595 -1212 786 -0.1551783264746244 -1212 790 2.081668171172169e-17 -1212 791 -0.02870370370370362 -1212 792 -0.2040466392318246 -1212 796 0.01296296296296297 -1212 797 -0.01342592592592584 -1212 798 -0.1551783264746225 -1212 1207 -0.02407407407407397 -1212 1208 -8.673617379884035e-18 -1212 1209 -0.1063100137174168 -1212 1210 -1.491862189340054e-16 -1212 1211 -8.673617379884035e-17 -1212 1212 1.241426611796987 -1212 1213 0.02407407407407411 -1212 1214 -2.081668171172169e-17 -1212 1215 -0.1063100137174277 -1213 790 -0.0009703703703703718 -1213 791 -0.0004999999999999994 -1213 792 -0.008333333333333333 -1213 796 -0.0002814814814814748 -1213 797 -2.602085213965211e-18 -1213 798 -3.469446951953614e-18 -1213 802 -0.0009703703703703745 -1213 803 0.000500000000000002 -1213 804 0.008333333333333333 -1213 1210 -0.001659259259259308 -1213 1211 2.710505431213761e-18 -1213 1212 -0.03333333333333333 -1213 1213 0.007762962962962968 -1213 1214 -1.073360150760649e-17 -1213 1215 -1.387778780781446e-17 -1213 1216 -0.001659259259259226 -1213 1217 8.023096076392733e-18 -1213 1218 0.03333333333333334 -1214 790 -0.0004999999999999994 -1214 791 -0.00104074074074073 -1214 792 -0.00925925925925913 -1214 796 -2.602085213965211e-18 -1214 797 -0.002362962962962954 -1214 798 -0.03703703703703705 -1214 802 0.000500000000000002 -1214 803 -0.001040740740740759 -1214 804 -0.009259259259259347 -1214 1210 2.602085213965211e-18 -1214 1211 0.00028148148148144 -1214 1212 7.632783294297951e-17 -1214 1213 -1.073360150760649e-17 -1214 1214 0.008325925925925915 -1214 1215 -2.810252031082427e-16 -1214 1216 7.914675859144182e-18 -1214 1217 0.0002814814814815098 -1214 1218 -3.122502256758253e-17 -1215 790 -0.01296296296296292 -1215 791 -0.01342592592592572 -1215 792 -0.1551783264746215 -1215 796 -1.092875789865388e-16 -1215 797 -0.02870370370370334 -1215 798 -0.2040466392318225 -1215 802 0.01296296296296303 -1215 803 -0.01342592592592632 -1215 804 -0.1551783264746239 -1215 1210 -0.02407407407407412 -1215 1211 -3.989863994746656e-17 -1215 1212 -0.1063100137174277 -1215 1213 1.387778780781446e-17 -1215 1214 -8.500145032286355e-17 -1215 1215 1.241426611796977 -1215 1216 0.0240740740740741 -1215 1217 6.418476861114186e-17 -1215 1218 -0.106310013717416 -1216 796 -0.0009703703703703612 -1216 797 -0.000499999999999998 -1216 798 -0.008333333333333331 -1216 802 -0.0002814814814814854 -1216 803 -7.589415207398531e-19 -1216 808 -0.0009703703703703678 -1216 809 0.0004999999999999987 -1216 810 0.008333333333333335 -1216 1213 -0.001659259259259226 -1216 1214 7.806255641895632e-18 -1216 1215 -0.03333333333333333 -1216 1216 0.007762962962962959 -1216 1217 -2.49366499671666e-18 -1216 1218 -6.938893903907228e-18 -1216 1219 -0.001659259259259283 -1216 1220 -5.312590645178972e-18 -1216 1221 0.03333333333333334 -1217 796 -0.0004999999999999981 -1217 797 -0.001040740740740732 -1217 798 -0.009259259259259236 -1217 802 -6.505213034913027e-19 -1217 803 -0.002362962962962969 -1217 804 -0.03703703703703701 -1217 808 0.0004999999999999987 -1217 809 -0.001040740740740729 -1217 810 -0.009259259259259111 -1217 1213 8.023096076392733e-18 -1217 1214 0.0002814814814815099 -1217 1215 4.128641872824801e-16 -1217 1216 -2.49366499671666e-18 -1217 1217 0.008325925925925931 -1217 1218 -5.204170427930421e-17 -1217 1219 -5.421010862427522e-18 -1217 1220 0.0002814814814814615 -1217 1221 1.925543058334256e-16 -1218 796 -0.01296296296296286 -1218 797 -0.01342592592592596 -1218 798 -0.1551783264746208 -1218 802 -2.775557561562891e-17 -1218 803 -0.02870370370370394 -1218 804 -0.2040466392318244 -1218 808 0.01296296296296289 -1218 809 -0.01342592592592583 -1218 810 -0.1551783264746211 -1218 1213 -0.02407407407407412 -1218 1214 1.561251128379126e-17 -1218 1215 -0.106310013717416 -1218 1216 1.214306433183765e-17 -1218 1217 1.595945597898663e-16 -1218 1218 1.241426611796978 -1218 1219 0.02407407407407411 -1218 1220 1.561251128379126e-17 -1218 1221 -0.1063100137174241 -1219 802 -0.0009703703703703766 -1219 803 -0.0005000000000000014 -1219 804 -0.008333333333333333 -1219 808 -0.0002814814814814887 -1219 809 9.75781955236954e-19 -1219 810 -1.387778780781446e-17 -1219 814 -0.0009703703703703667 -1219 815 0.0004999999999999998 -1219 816 0.008333333333333333 -1219 1216 -0.001659259259259283 -1219 1217 -5.421010862427522e-18 -1219 1218 -0.03333333333333333 -1219 1219 0.00776296296296296 -1219 1220 6.179952383167375e-18 -1219 1221 -6.938893903907228e-18 -1219 1222 -0.00165925925925922 -1219 1223 4.336808689942018e-19 -1219 1224 0.03333333333333334 -1220 802 -0.0005000000000000013 -1220 803 -0.001040740740740747 -1220 804 -0.009259259259259186 -1220 808 1.084202172485504e-18 -1220 809 -0.002362962962962973 -1220 810 -0.03703703703703715 -1220 814 0.0004999999999999999 -1220 815 -0.001040740740740746 -1220 816 -0.009259259259259377 -1220 1216 -5.421010862427522e-18 -1220 1217 0.0002814814814814613 -1220 1218 -1.058181320345852e-16 -1220 1219 6.179952383167375e-18 -1220 1220 0.008325925925925935 -1220 1221 -3.261280134836397e-16 -1220 1222 4.336808689942018e-19 -1220 1223 0.0002814814814815153 -1221 802 -0.012962962962963 -1221 803 -0.01342592592592607 -1221 804 -0.1551783264746231 -1221 808 -3.122502256758253e-17 -1221 809 -0.02870370370370365 -1221 810 -0.2040466392318267 -1221 814 0.01296296296296302 -1221 815 -0.01342592592592604 -1221 816 -0.155178326474625 -1221 1216 -0.02407407407407412 -1221 1217 4.85722573273506e-17 -1221 1218 -0.1063100137174241 -1221 1219 1.717376241217039e-16 -1221 1220 8.153200337090993e-17 -1221 1221 1.241426611796988 -1221 1222 0.02407407407407394 -1221 1223 -1.387778780781446e-17 -1221 1224 -0.1063100137174168 -1222 808 -0.0009703703703703686 -1222 809 -0.0005000000000000002 -1222 810 -0.008333333333333342 -1222 814 -0.000140740740740756 -1222 815 0.0004999999999999997 -1222 816 -0.008333333333333356 -1222 1219 -0.00165925925925922 -1222 1220 4.336808689942018e-19 -1222 1221 -0.03333333333333333 -1222 1222 0.00388148148148147 -1222 1223 7.589415207398531e-19 -1222 1224 -0.03333333333333333 -1223 1223 1 -1224 808 -0.01296296296296304 -1224 809 -0.01342592592592606 -1224 810 -0.1551783264746252 -1224 814 0.01296296296296303 -1224 815 -0.01435185185185207 -1224 816 -0.1020233196159163 -1224 1219 -0.02407407407407397 -1224 1220 3.122502256758253e-17 -1224 1221 -0.1063100137174168 -1224 1222 0.02407407407407396 -1224 1223 -1.908195823574488e-17 -1224 1224 0.6207133058984996 -1225 817 -0.0002814814814814805 -1225 818 1.084202172485504e-19 -1225 819 -3.469446951953614e-18 -1225 820 -0.0009703703703703708 -1225 821 -0.0005000000000000001 -1225 822 -0.008333333333333333 -1225 823 -0.0009703703703703704 -1225 824 0.0005 -1225 825 0.008333333333333335 -1225 1225 0.007762962962962964 -1225 1226 -2.168404344971009e-19 -1225 1227 -1.040834085586084e-17 -1225 1228 -0.001659259259259261 -1225 1230 -0.03333333333333332 -1225 1231 -0.001659259259259257 -1225 1232 -1.084202172485504e-19 -1225 1233 0.03333333333333333 -1226 817 1.084202172485504e-19 -1226 818 -0.002362962962962962 -1226 819 -0.03703703703703703 -1226 820 -0.0005 -1226 821 -0.001040740740740741 -1226 822 -0.009259259259259252 -1226 823 0.0005 -1226 824 -0.001040740740740741 -1226 825 -0.009259259259259262 -1226 1225 -3.252606517456513e-19 -1226 1226 0.008325925925925928 -1226 1228 -1.084202172485504e-19 -1226 1229 0.00028148148148148 -1226 1231 -2.168404344971009e-19 -1226 1232 0.0002814814814814834 -1226 1233 1.734723475976807e-18 -1227 817 -1.734723475976807e-18 -1227 818 -0.0287037037037037 -1227 819 -0.2040466392318242 -1227 820 -0.01296296296296296 -1227 821 -0.01342592592592592 -1227 822 -0.1551783264746226 -1227 823 0.01296296296296296 -1227 824 -0.01342592592592593 -1227 825 -0.1551783264746228 -1227 1225 1.908195823574488e-17 -1227 1226 1.734723475976807e-18 -1227 1227 1.241426611796982 -1227 1228 -0.02407407407407407 -1227 1229 -1.734723475976807e-18 -1227 1230 -0.1063100137174213 -1227 1231 0.02407407407407406 -1227 1232 5.204170427930421e-18 -1227 1233 -0.1063100137174209 -1228 1228 1 -1229 1229 1 -1230 817 0.01296296296296296 -1230 818 -0.01342592592592592 -1230 819 -0.1551783264746226 -1230 820 -0.01296296296296296 -1230 821 -0.01435185185185183 -1230 822 -0.1020233196159119 -1230 1225 0.02407407407407406 -1230 1226 -1.734723475976807e-18 -1230 1227 -0.1063100137174213 -1230 1228 -0.02407407407407406 -1230 1230 0.6207133058984904 -1231 817 -0.0009703703703703705 -1231 818 -0.0005 -1231 819 -0.008333333333333333 -1231 823 -0.0002814814814814804 -1231 825 1.040834085586084e-17 -1231 826 -0.000970370370370371 -1231 827 0.0005000000000000002 -1231 828 0.00833333333333334 -1231 1225 -0.001659259259259257 -1231 1226 -1.084202172485504e-19 -1231 1227 -0.03333333333333332 -1231 1231 0.007762962962962963 -1231 1232 -1.084202172485504e-19 -1231 1233 1.387778780781446e-17 -1231 1234 -0.001659259259259259 -1231 1235 -2.168404344971009e-19 -1231 1236 0.03333333333333333 -1232 817 -0.0005000000000000001 -1232 818 -0.001040740740740741 -1232 819 -0.009259259259259264 -1232 823 1.084202172485504e-19 -1232 824 -0.002362962962962961 -1232 825 -0.03703703703703705 -1232 826 0.0005000000000000001 -1232 827 -0.001040740740740741 -1232 828 -0.009259259259259262 -1232 1226 0.0002814814814814833 -1232 1227 -1.734723475976807e-18 -1232 1231 -1.084202172485504e-19 -1232 1232 0.008325925925925926 -1232 1233 -3.469446951953614e-18 -1232 1234 -2.168404344971009e-19 -1232 1235 0.0002814814814814816 -1232 1236 1.734723475976807e-18 -1233 817 -0.01296296296296297 -1233 818 -0.01342592592592593 -1233 819 -0.1551783264746228 -1233 823 -1.734723475976807e-18 -1233 824 -0.02870370370370371 -1233 825 -0.2040466392318243 -1233 826 0.01296296296296297 -1233 827 -0.01342592592592593 -1233 828 -0.1551783264746228 -1233 1225 -0.02407407407407407 -1233 1226 -8.673617379884035e-18 -1233 1227 -0.1063100137174209 -1233 1231 -8.673617379884035e-18 -1233 1232 6.938893903907228e-18 -1233 1233 1.241426611796982 -1233 1234 0.02407407407407407 -1233 1235 3.469446951953614e-18 -1233 1236 -0.1063100137174211 -1234 823 -0.0009703703703703705 -1234 824 -0.0005 -1234 825 -0.00833333333333334 -1234 826 -0.0002814814814814806 -1234 827 1.084202172485504e-19 -1234 828 6.938893903907228e-18 -1234 829 -0.0009703703703703706 -1234 830 0.0005 -1234 831 0.00833333333333334 -1234 1231 -0.001659259259259259 -1234 1232 -2.168404344971009e-19 -1234 1233 -0.03333333333333334 -1234 1234 0.007762962962962962 -1234 1235 2.168404344971009e-19 -1234 1236 1.387778780781446e-17 -1234 1237 -0.001659259259259258 -1234 1238 -2.168404344971009e-19 -1234 1239 0.03333333333333334 -1235 823 -0.0004999999999999999 -1235 824 -0.001040740740740741 -1235 825 -0.009259259259259262 -1235 826 1.084202172485504e-19 -1235 827 -0.002362962962962962 -1235 828 -0.03703703703703705 -1235 829 0.0004999999999999999 -1235 830 -0.001040740740740741 -1235 831 -0.009259259259259266 -1235 1231 -2.168404344971009e-19 -1235 1232 0.0002814814814814816 -1235 1233 -8.673617379884035e-18 -1235 1234 2.168404344971009e-19 -1235 1235 0.008325925925925926 -1235 1237 -1.084202172485504e-19 -1235 1238 0.0002814814814814825 -1235 1239 5.204170427930421e-18 -1236 823 -0.01296296296296297 -1236 824 -0.01342592592592592 -1236 825 -0.1551783264746228 -1236 826 -1.040834085586084e-17 -1236 827 -0.02870370370370372 -1236 828 -0.2040466392318244 -1236 829 0.01296296296296297 -1236 830 -0.01342592592592593 -1236 831 -0.155178326474623 -1236 1231 -0.02407407407407408 -1236 1232 3.469446951953614e-18 -1236 1233 -0.1063100137174211 -1236 1234 5.204170427930421e-18 -1236 1235 3.469446951953614e-18 -1236 1236 1.241426611796983 -1236 1237 0.02407407407407407 -1236 1239 -0.106310013717421 -1237 826 -0.0009703703703703706 -1237 827 -0.0004999999999999999 -1237 828 -0.008333333333333342 -1237 829 -0.0002814814814814818 -1237 830 -3.252606517456513e-19 -1237 831 -1.040834085586084e-17 -1237 832 -0.0009703703703703701 -1237 833 0.0005 -1237 834 0.008333333333333337 -1237 1234 -0.001659259259259258 -1237 1235 -1.084202172485504e-19 -1237 1236 -0.03333333333333335 -1237 1237 0.007762962962962963 -1237 1238 5.421010862427522e-19 -1237 1239 -1.040834085586084e-17 -1237 1240 -0.001659259259259257 -1237 1241 1.084202172485504e-19 -1237 1242 0.03333333333333333 -1238 826 -0.0005 -1238 827 -0.001040740740740741 -1238 828 -0.009259259259259264 -1238 829 1.084202172485504e-19 -1238 830 -0.002362962962962963 -1238 831 -0.03703703703703706 -1238 832 0.0004999999999999999 -1238 833 -0.001040740740740741 -1238 834 -0.009259259259259266 -1238 1234 -2.168404344971009e-19 -1238 1235 0.0002814814814814825 -1238 1236 -6.938893903907228e-18 -1238 1237 5.421010862427522e-19 -1238 1238 0.008325925925925929 -1238 1239 -3.469446951953614e-18 -1238 1240 4.336808689942018e-19 -1238 1241 0.0002814814814814835 -1239 826 -0.01296296296296297 -1239 827 -0.01342592592592594 -1239 828 -0.155178326474623 -1239 829 3.469446951953614e-18 -1239 830 -0.02870370370370372 -1239 831 -0.2040466392318247 -1239 832 0.01296296296296297 -1239 833 -0.01342592592592593 -1239 834 -0.1551783264746229 -1239 1234 -0.02407407407407407 -1239 1235 6.938893903907228e-18 -1239 1236 -0.106310013717421 -1239 1237 1.214306433183765e-17 -1239 1238 5.204170427930421e-18 -1239 1239 1.241426611796983 -1239 1240 0.02407407407407406 -1239 1242 -0.1063100137174208 -1240 829 -0.0009703703703703706 -1240 830 -0.0005 -1240 831 -0.008333333333333335 -1240 832 -0.0002814814814814827 -1240 833 -1.084202172485504e-19 -1240 834 -6.938893903907228e-18 -1240 835 -0.0009703703703703701 -1240 836 0.0005 -1240 837 0.008333333333333337 -1240 1237 -0.001659259259259257 -1240 1238 3.252606517456513e-19 -1240 1239 -0.03333333333333333 -1240 1240 0.007762962962962961 -1240 1241 4.336808689942018e-19 -1240 1242 -6.938893903907228e-18 -1240 1243 -0.001659259259259256 -1240 1244 -3.252606517456513e-19 -1240 1245 0.03333333333333333 -1241 829 -0.0005000000000000001 -1241 830 -0.001040740740740741 -1241 831 -0.009259259259259264 -1241 832 1.084202172485504e-19 -1241 833 -0.002362962962962964 -1241 834 -0.03703703703703706 -1241 835 0.0004999999999999999 -1241 836 -0.001040740740740741 -1241 837 -0.009259259259259266 -1241 1237 1.084202172485504e-19 -1241 1238 0.0002814814814814836 -1241 1240 4.336808689942018e-19 -1241 1241 0.008325925925925929 -1241 1242 3.469446951953614e-18 -1241 1243 -3.252606517456513e-19 -1241 1244 0.0002814814814814849 -1241 1245 1.561251128379126e-17 -1242 829 -0.01296296296296297 -1242 830 -0.01342592592592593 -1242 831 -0.155178326474623 -1242 832 1.214306433183765e-17 -1242 833 -0.02870370370370373 -1242 834 -0.2040466392318248 -1242 835 0.01296296296296296 -1242 836 -0.01342592592592593 -1242 837 -0.1551783264746228 -1242 1237 -0.02407407407407407 -1242 1238 1.387778780781446e-17 -1242 1239 -0.1063100137174208 -1242 1240 1.214306433183765e-17 -1242 1241 -8.673617379884035e-18 -1242 1242 1.241426611796983 -1242 1243 0.02407407407407406 -1242 1245 -0.1063100137174206 -1243 832 -0.0009703703703703706 -1243 833 -0.0005 -1243 834 -0.008333333333333335 -1243 835 -0.0002814814814814795 -1243 837 -3.469446951953614e-18 -1243 838 -0.0009703703703703709 -1243 839 0.0005 -1243 840 0.008333333333333337 -1243 1240 -0.001659259259259256 -1243 1241 -3.252606517456513e-19 -1243 1242 -0.03333333333333333 -1243 1243 0.007762962962962965 -1243 1244 6.505213034913027e-19 -1243 1245 -3.469446951953614e-18 -1243 1246 -0.001659259259259265 -1243 1247 -6.505213034913027e-19 -1243 1248 0.03333333333333333 -1244 832 -0.0005000000000000002 -1244 833 -0.001040740740740742 -1244 834 -0.009259259259259269 -1244 835 3.252606517456513e-19 -1244 836 -0.00236296296296296 -1244 837 -0.03703703703703702 -1244 838 0.0005 -1244 839 -0.001040740740740739 -1244 840 -0.009259259259259238 -1244 1240 -3.252606517456513e-19 -1244 1241 0.000281481481481485 -1244 1242 -3.469446951953614e-18 -1244 1243 7.589415207398531e-19 -1244 1244 0.008325925925925924 -1244 1246 -5.421010862427522e-19 -1244 1247 0.0002814814814814767 -1244 1248 3.295974604355933e-17 -1245 832 -0.01296296296296297 -1245 833 -0.01342592592592594 -1245 834 -0.1551783264746229 -1245 835 1.387778780781446e-17 -1245 836 -0.02870370370370368 -1245 837 -0.2040466392318239 -1245 838 0.01296296296296295 -1245 839 -0.0134259259259259 -1245 840 -0.1551783264746224 -1245 1240 -0.02407407407407406 -1245 1241 -8.673617379884035e-18 -1245 1242 -0.1063100137174206 -1245 1243 -3.469446951953614e-18 -1245 1244 -3.469446951953614e-18 -1245 1245 1.241426611796982 -1245 1246 0.02407407407407407 -1245 1247 -5.204170427930421e-18 -1245 1248 -0.1063100137174218 -1246 835 -0.0009703703703703714 -1246 836 -0.0005000000000000001 -1246 837 -0.008333333333333333 -1246 838 -0.0002814814814814764 -1246 839 3.252606517456513e-19 -1246 840 -3.469446951953614e-18 -1246 841 -0.0009703703703703704 -1246 842 0.0004999999999999998 -1246 843 0.008333333333333335 -1246 1243 -0.001659259259259265 -1246 1244 -6.505213034913027e-19 -1246 1245 -0.03333333333333333 -1246 1246 0.007762962962962966 -1246 1247 9.75781955236954e-19 -1246 1248 -6.938893903907228e-18 -1246 1249 -0.001659259259259263 -1246 1250 -1.084202172485504e-19 -1246 1251 0.03333333333333333 -1247 835 -0.0005000000000000002 -1247 836 -0.001040740740740741 -1247 837 -0.009259259259259241 -1247 838 2.168404344971009e-19 -1247 839 -0.002362962962962956 -1247 840 -0.03703703703703698 -1247 841 0.0004999999999999998 -1247 842 -0.001040740740740739 -1247 843 -0.009259259259259243 -1247 1243 -6.505213034913027e-19 -1247 1244 0.0002814814814814766 -1247 1245 -3.469446951953614e-18 -1247 1246 8.673617379884035e-19 -1247 1247 0.008325925925925919 -1247 1248 -6.938893903907228e-18 -1247 1249 1.084202172485504e-19 -1247 1250 0.0002814814814814782 -1247 1251 6.938893903907228e-18 -1248 835 -0.01296296296296296 -1248 836 -0.01342592592592592 -1248 837 -0.1551783264746225 -1248 838 1.040834085586084e-17 -1248 839 -0.02870370370370363 -1248 840 -0.2040466392318232 -1248 841 0.01296296296296295 -1248 842 -0.01342592592592591 -1248 843 -0.1551783264746225 -1248 1243 -0.02407407407407409 -1248 1245 -0.1063100137174218 -1248 1246 1.561251128379126e-17 -1248 1247 -1.387778780781446e-17 -1248 1248 1.24142661179698 -1248 1249 0.02407407407407407 -1248 1250 -1.387778780781446e-17 -1248 1251 -0.1063100137174216 -1249 838 -0.0009703703703703714 -1249 839 -0.0005000000000000002 -1249 840 -0.008333333333333333 -1249 841 -0.0002814814814814861 -1249 842 5.421010862427522e-19 -1249 843 -1.734723475976807e-18 -1249 844 -0.0009703703703703684 -1249 845 0.0004999999999999997 -1249 846 0.008333333333333335 -1249 1246 -0.001659259259259263 -1249 1247 1.084202172485504e-19 -1249 1248 -0.03333333333333333 -1249 1249 0.007762962962962959 -1249 1250 4.336808689942018e-19 -1249 1251 -6.938893903907228e-18 -1249 1252 -0.001659259259259242 -1249 1253 -3.252606517456513e-19 -1249 1254 0.03333333333333333 -1250 838 -0.0005000000000000002 -1250 839 -0.001040740740740742 -1250 840 -0.009259259259259252 -1250 841 4.336808689942018e-19 -1250 842 -0.002362962962962969 -1250 843 -0.0370370370370371 -1250 844 0.0004999999999999997 -1250 845 -0.001040740740740741 -1250 846 -0.009259259259259297 -1250 1246 -1.084202172485504e-19 -1250 1247 0.000281481481481478 -1250 1248 1.734723475976807e-18 -1250 1249 4.336808689942018e-19 -1250 1250 0.008325925925925935 -1250 1251 1.734723475976807e-17 -1250 1252 -2.168404344971009e-19 -1250 1253 0.0002814814814814961 -1250 1254 -1.734723475976807e-18 -1251 838 -0.01296296296296297 -1251 839 -0.01342592592592594 -1251 840 -0.1551783264746228 -1251 841 -1.734723475976807e-18 -1251 842 -0.02870370370370378 -1251 843 -0.2040466392318254 -1251 844 0.01296296296296297 -1251 845 -0.01342592592592594 -1251 846 -0.1551783264746231 -1251 1246 -0.02407407407407405 -1251 1247 -3.469446951953614e-18 -1251 1248 -0.1063100137174216 -1251 1249 1.734723475976807e-18 -1251 1250 5.204170427930421e-18 -1251 1251 1.241426611796984 -1251 1252 0.02407407407407404 -1251 1253 -5.204170427930421e-18 -1251 1254 -0.106310013717419 -1252 841 -0.00097037037037037 -1252 842 -0.0005000000000000002 -1252 843 -0.008333333333333333 -1252 844 -0.0002814814814814884 -1252 845 2.168404344971009e-19 -1252 846 -1.734723475976807e-18 -1252 847 -0.0009703703703703701 -1252 848 0.0005 -1252 849 0.008333333333333338 -1252 1249 -0.001659259259259242 -1252 1250 -2.168404344971009e-19 -1252 1251 -0.03333333333333332 -1252 1252 0.007762962962962958 -1252 1253 3.252606517456513e-19 -1252 1255 -0.001659259259259257 -1252 1256 -4.336808689942018e-19 -1252 1257 0.03333333333333333 -1253 841 -0.0005000000000000002 -1253 842 -0.001040740740740744 -1253 843 -0.009259259259259313 -1253 844 5.421010862427522e-19 -1253 845 -0.002362962962962972 -1253 846 -0.03703703703703714 -1253 847 0.0005 -1253 848 -0.001040740740740741 -1253 849 -0.009259259259259262 -1253 1249 -3.252606517456513e-19 -1253 1250 0.0002814814814814962 -1253 1251 -1.387778780781446e-17 -1253 1252 2.168404344971009e-19 -1253 1253 0.008325925925925941 -1253 1254 3.469446951953614e-18 -1253 1255 -4.336808689942018e-19 -1253 1256 0.0002814814814814835 -1253 1257 1.561251128379126e-17 -1254 841 -0.01296296296296299 -1254 842 -0.01342592592592598 -1254 843 -0.1551783264746235 -1254 844 3.122502256758253e-17 -1254 845 -0.02870370370370381 -1254 846 -0.204046639231826 -1254 847 0.01296296296296296 -1254 848 -0.01342592592592593 -1254 849 -0.1551783264746228 -1254 1249 -0.02407407407407402 -1254 1250 -5.204170427930421e-18 -1254 1251 -0.106310013717419 -1254 1252 -3.295974604355933e-17 -1254 1253 1.040834085586084e-17 -1254 1254 1.241426611796985 -1254 1255 0.02407407407407406 -1254 1256 3.469446951953614e-18 -1254 1257 -0.1063100137174208 -1255 844 -0.0009703703703703708 -1255 845 -0.0005000000000000001 -1255 846 -0.008333333333333333 -1255 847 -0.0002814814814814757 -1255 848 5.421010862427522e-19 -1255 849 6.938893903907228e-18 -1255 850 -0.0009703703703703707 -1255 851 0.0004999999999999998 -1255 852 0.00833333333333334 -1255 1252 -0.001659259259259257 -1255 1253 -4.336808689942018e-19 -1255 1254 -0.03333333333333333 -1255 1255 0.007762962962962965 -1255 1256 -3.252606517456513e-19 -1255 1257 3.469446951953614e-18 -1255 1258 -0.001659259259259273 -1255 1259 2.168404344971009e-19 -1255 1260 0.03333333333333333 -1256 844 -0.0005000000000000002 -1256 845 -0.001040740740740742 -1256 846 -0.009259259259259266 -1256 847 2.168404344971009e-19 -1256 848 -0.002362962962962955 -1256 849 -0.03703703703703699 -1256 850 0.0004999999999999997 -1256 851 -0.001040740740740737 -1256 852 -0.009259259259259217 -1256 1252 -3.252606517456513e-19 -1256 1253 0.0002814814814814834 -1256 1254 -5.204170427930421e-18 -1256 1255 -2.168404344971009e-19 -1256 1256 0.008325925925925917 -1256 1257 -3.122502256758253e-17 -1256 1258 3.252606517456513e-19 -1256 1259 0.000281481481481469 -1256 1260 1.214306433183765e-17 -1257 844 -0.01296296296296297 -1257 845 -0.01342592592592594 -1257 846 -0.1551783264746229 -1257 847 2.602085213965211e-17 -1257 848 -0.02870370370370361 -1257 849 -0.2040466392318231 -1257 850 0.01296296296296294 -1257 851 -0.0134259259259259 -1257 852 -0.1551783264746222 -1257 1252 -0.02407407407407407 -1257 1253 -1.214306433183765e-17 -1257 1254 -0.1063100137174209 -1257 1255 -4.85722573273506e-17 -1257 1256 -1.561251128379126e-17 -1257 1257 1.241426611796981 -1257 1258 0.02407407407407412 -1257 1260 -0.1063100137174229 -1258 847 -0.0009703703703703719 -1258 848 -0.0005000000000000002 -1258 849 -0.008333333333333338 -1258 850 -0.0002814814814814719 -1258 851 6.505213034913027e-19 -1258 852 8.673617379884035e-18 -1258 853 -0.0009703703703703698 -1258 854 0.0004999999999999997 -1258 855 0.00833333333333334 -1258 1255 -0.001659259259259273 -1258 1256 2.168404344971009e-19 -1258 1257 -0.03333333333333334 -1258 1258 0.007762962962962967 -1258 1259 -2.168404344971009e-19 -1258 1260 1.387778780781446e-17 -1258 1261 -0.001659259259259265 -1258 1262 -1.084202172485504e-19 -1258 1263 0.03333333333333334 -1259 847 -0.0005000000000000001 -1259 848 -0.00104074074074074 -1259 849 -0.009259259259259231 -1259 850 9.75781955236954e-19 -1259 851 -0.00236296296296295 -1259 852 -0.03703703703703694 -1259 853 0.0004999999999999997 -1259 854 -0.001040740740740737 -1259 855 -0.009259259259259228 -1259 1255 2.168404344971009e-19 -1259 1256 0.000281481481481469 -1259 1257 3.122502256758253e-17 -1259 1258 -3.252606517456513e-19 -1259 1259 0.008325925925925914 -1259 1260 3.469446951953614e-18 -1259 1261 -2.168404344971009e-19 -1259 1262 0.0002814814814814778 -1259 1263 8.673617379884035e-18 -1260 847 -0.01296296296296296 -1260 848 -0.01342592592592594 -1260 849 -0.1551783264746225 -1260 850 1.387778780781446e-17 -1260 851 -0.02870370370370358 -1260 852 -0.2040466392318223 -1260 853 0.01296296296296295 -1260 854 -0.01342592592592587 -1260 855 -0.1551783264746222 -1260 1255 -0.02407407407407406 -1260 1256 1.734723475976807e-18 -1260 1257 -0.1063100137174229 -1260 1258 -8.500145032286355e-17 -1260 1259 -5.204170427930421e-18 -1260 1260 1.241426611796979 -1260 1261 0.02407407407407414 -1260 1262 8.673617379884035e-18 -1260 1263 -0.1063100137174216 -1261 850 -0.0009703703703703727 -1261 851 -0.0005000000000000007 -1261 852 -0.008333333333333342 -1261 853 -0.0002814814814814791 -1261 854 2.168404344971009e-19 -1261 855 -8.673617379884035e-18 -1261 856 -0.0009703703703703711 -1261 857 0.0005000000000000002 -1261 858 0.008333333333333337 -1261 1258 -0.001659259259259264 -1261 1259 -3.252606517456513e-19 -1261 1260 -0.03333333333333335 -1261 1261 0.007762962962962963 -1261 1262 -8.673617379884035e-19 -1261 1263 -6.938893903907228e-18 -1261 1264 -0.001659259259259251 -1261 1265 1.301042606982605e-18 -1261 1266 0.03333333333333334 -1262 850 -0.0005000000000000006 -1262 851 -0.001040740740740742 -1262 852 -0.009259259259259252 -1262 853 -1.084202172485504e-19 -1262 854 -0.00236296296296296 -1262 855 -0.03703703703703701 -1262 856 0.0005000000000000003 -1262 857 -0.001040740740740743 -1262 858 -0.00925925925925928 -1262 1258 -1.084202172485504e-19 -1262 1259 0.0002814814814814778 -1262 1260 -3.469446951953614e-18 -1262 1261 -9.75781955236954e-19 -1262 1262 0.008325925925925928 -1262 1263 -6.938893903907228e-18 -1262 1264 1.301042606982605e-18 -1262 1265 0.000281481481481488 -1262 1266 -4.85722573273506e-17 -1263 850 -0.01296296296296298 -1263 851 -0.01342592592592594 -1263 852 -0.1551783264746228 -1263 853 -1.734723475976807e-18 -1263 854 -0.02870370370370367 -1263 855 -0.204046639231824 -1263 856 0.01296296296296299 -1263 857 -0.01342592592592595 -1263 858 -0.1551783264746232 -1263 1258 -0.02407407407407408 -1263 1259 5.204170427930421e-18 -1263 1260 -0.1063100137174216 -1263 1261 2.255140518769849e-17 -1263 1262 3.469446951953614e-18 -1263 1263 1.241426611796982 -1263 1264 0.02407407407407405 -1263 1265 -2.081668171172169e-17 -1263 1266 -0.1063100137174203 -1264 853 -0.0009703703703703694 -1264 854 -0.0004999999999999998 -1264 855 -0.008333333333333337 -1264 856 -0.0002814814814814837 -1264 857 -1.192622389734055e-18 -1264 858 -1.040834085586084e-17 -1264 859 -0.0009703703703703733 -1264 860 0.0005000000000000009 -1264 861 0.008333333333333337 -1264 1261 -0.001659259259259252 -1264 1262 1.301042606982605e-18 -1264 1263 -0.03333333333333333 -1264 1264 0.007762962962962961 -1264 1265 -3.469446951953614e-18 -1264 1266 -1.040834085586084e-17 -1264 1267 -0.001659259259259256 -1264 1268 2.49366499671666e-18 -1264 1269 0.03333333333333333 -1265 853 -0.0004999999999999997 -1265 854 -0.001040740740740739 -1265 855 -0.00925925925925926 -1265 856 -1.301042606982605e-18 -1265 857 -0.002362962962962966 -1265 858 -0.03703703703703708 -1265 859 0.000500000000000001 -1265 860 -0.001040740740740747 -1265 861 -0.009259259259259302 -1265 1261 1.301042606982605e-18 -1265 1262 0.000281481481481488 -1265 1263 2.602085213965211e-17 -1265 1264 -3.469446951953614e-18 -1265 1265 0.008325925925925933 -1265 1266 -6.938893903907228e-18 -1265 1267 2.602085213965211e-18 -1265 1268 0.0002814814814814858 -1265 1269 -6.765421556309548e-17 -1266 853 -0.01296296296296296 -1266 854 -0.01342592592592589 -1266 855 -0.1551783264746227 -1266 856 -3.642919299551295e-17 -1266 857 -0.02870370370370374 -1266 858 -0.2040466392318248 -1266 859 0.012962962962963 -1266 860 -0.013425925925926 -1266 861 -0.1551783264746233 -1266 1261 -0.02407407407407406 -1266 1262 -3.642919299551295e-17 -1266 1263 -0.1063100137174203 -1266 1264 8.673617379884035e-18 -1266 1265 -3.469446951953614e-18 -1266 1266 1.241426611796983 -1266 1267 0.02407407407407405 -1266 1268 5.204170427930421e-18 -1266 1269 -0.1063100137174204 -1267 856 -0.0009703703703703672 -1267 857 -0.0004999999999999991 -1267 858 -0.008333333333333333 -1267 859 -0.0002814814814814811 -1267 860 -1.734723475976807e-18 -1267 861 -3.469446951953614e-18 -1267 862 -0.0009703703703703732 -1267 863 0.0005000000000000009 -1267 864 0.008333333333333335 -1267 1264 -0.001659259259259256 -1267 1265 2.49366499671666e-18 -1267 1266 -0.03333333333333333 -1267 1267 0.007762962962962965 -1267 1268 -2.602085213965211e-18 -1267 1269 -3.469446951953614e-18 -1267 1270 -0.001659259259259262 -1267 1271 1.084202172485504e-19 -1267 1272 0.03333333333333333 -1268 856 -0.0004999999999999991 -1268 857 -0.001040740740740735 -1268 858 -0.00925925925925925 -1268 859 -1.734723475976807e-18 -1268 860 -0.002362962962962963 -1268 861 -0.03703703703703703 -1268 862 0.0005000000000000008 -1268 863 -0.001040740740740746 -1268 864 -0.009259259259259276 -1268 1264 2.49366499671666e-18 -1268 1265 0.0002814814814814858 -1268 1266 6.938893903907228e-17 -1268 1267 -2.710505431213761e-18 -1268 1268 0.008325925925925931 -1268 1269 6.591949208711867e-17 -1268 1270 3.252606517456513e-19 -1268 1271 0.0002814814814814793 -1268 1272 -1.040834085586084e-17 -1269 856 -0.01296296296296292 -1269 857 -0.01342592592592583 -1269 858 -0.1551783264746219 -1269 859 -6.938893903907228e-17 -1269 860 -0.02870370370370372 -1269 861 -0.2040466392318241 -1269 862 0.01296296296296299 -1269 863 -0.01342592592592598 -1269 864 -0.1551783264746232 -1269 1264 -0.0240740740740741 -1269 1266 -0.1063100137174204 -1269 1267 8.673617379884035e-17 -1269 1268 -3.469446951953614e-18 -1269 1269 1.241426611796982 -1269 1270 0.02407407407407402 -1269 1271 5.204170427930421e-18 -1269 1272 -0.1063100137174214 -1270 859 -0.0009703703703703681 -1270 860 -0.0004999999999999993 -1270 861 -0.008333333333333333 -1270 862 -0.0002814814814814797 -1270 863 -1.409462824231156e-18 -1270 865 -0.0009703703703703726 -1270 866 0.0005000000000000007 -1270 867 0.008333333333333335 -1270 1267 -0.001659259259259262 -1270 1268 3.252606517456513e-19 -1270 1269 -0.03333333333333332 -1270 1270 0.007762962962962966 -1270 1271 -4.336808689942018e-19 -1270 1272 -6.938893903907228e-18 -1270 1273 -0.001659259259259261 -1270 1274 2.168404344971009e-19 -1270 1275 0.03333333333333333 -1271 859 -0.0004999999999999993 -1271 860 -0.001040740740740735 -1271 861 -0.009259259259259234 -1271 862 -1.409462824231156e-18 -1271 863 -0.002362962962962961 -1271 864 -0.03703703703703703 -1271 865 0.0005000000000000007 -1271 866 -0.001040740740740745 -1271 867 -0.00925925925925928 -1271 1267 2.168404344971009e-19 -1271 1268 0.0002814814814814793 -1271 1269 6.938893903907228e-18 -1271 1270 -5.421010862427522e-19 -1271 1271 0.008325925925925926 -1271 1272 2.42861286636753e-17 -1271 1273 3.252606517456513e-19 -1271 1274 0.0002814814814814804 -1272 859 -0.01296296296296293 -1272 860 -0.01342592592592584 -1272 861 -0.155178326474622 -1272 862 -5.377642775528102e-17 -1272 863 -0.02870370370370368 -1272 864 -0.2040466392318239 -1272 865 0.01296296296296298 -1272 866 -0.01342592592592597 -1272 867 -0.1551783264746231 -1272 1267 -0.02407407407407413 -1272 1268 -1.040834085586084e-17 -1272 1269 -0.1063100137174215 -1272 1270 1.196959198423997e-16 -1272 1271 -1.387778780781446e-17 -1272 1272 1.241426611796982 -1272 1273 0.02407407407407401 -1272 1274 -1.387778780781446e-17 -1272 1275 -0.1063100137174213 -1273 862 -0.0009703703703703687 -1273 863 -0.0004999999999999994 -1273 864 -0.008333333333333335 -1273 865 -0.000281481481481479 -1273 866 -6.505213034913027e-19 -1273 867 -1.734723475976807e-18 -1273 868 -0.0009703703703703708 -1273 869 0.0005 -1273 870 0.008333333333333335 -1273 1270 -0.001659259259259261 -1273 1271 4.336808689942018e-19 -1273 1272 -0.03333333333333333 -1273 1273 0.007762962962962963 -1273 1276 -0.001659259259259262 -1273 1277 -1.084202172485504e-19 -1273 1278 0.03333333333333333 -1274 862 -0.0004999999999999994 -1274 863 -0.001040740740740737 -1274 864 -0.009259259259259247 -1274 865 -6.505213034913027e-19 -1274 866 -0.00236296296296296 -1274 867 -0.03703703703703701 -1274 868 0.0005 -1274 869 -0.00104074074074074 -1274 870 -0.00925925925925925 -1274 1270 3.252606517456513e-19 -1274 1271 0.0002814814814814804 -1274 1272 6.938893903907228e-18 -1274 1273 -1.084202172485504e-19 -1274 1274 0.008325925925925921 -1274 1275 3.469446951953614e-17 -1274 1276 1.084202172485504e-19 -1274 1277 0.0002814814814814795 -1274 1278 3.469446951953614e-18 -1275 862 -0.01296296296296293 -1275 863 -0.01342592592592587 -1275 864 -0.1551783264746222 -1275 865 -2.42861286636753e-17 -1275 866 -0.02870370370370372 -1275 867 -0.2040466392318237 -1275 868 0.01296296296296296 -1275 869 -0.01342592592592591 -1275 870 -0.1551783264746225 -1275 1270 -0.0240740740740741 -1275 1272 -0.1063100137174213 -1275 1273 2.775557561562891e-17 -1275 1274 -2.42861286636753e-17 -1275 1275 1.24142661179698 -1275 1276 0.02407407407407407 -1275 1278 -0.1063100137174213 -1276 865 -0.0009703703703703709 -1276 866 -0.0005000000000000001 -1276 867 -0.008333333333333333 -1276 868 -0.0002814814814814824 -1276 869 -3.252606517456513e-19 -1276 870 -1.040834085586084e-17 -1276 871 -0.0009703703703703688 -1276 872 0.0004999999999999998 -1276 873 0.008333333333333325 -1276 1273 -0.001659259259259262 -1276 1274 1.084202172485504e-19 -1276 1275 -0.03333333333333332 -1276 1276 0.007762962962962962 -1276 1277 5.421010862427522e-19 -1276 1278 1.387778780781446e-17 -1276 1279 -0.001659259259259253 -1276 1280 7.589415207398531e-19 -1276 1281 0.03333333333333334 -1277 865 -0.0005 -1277 866 -0.00104074074074074 -1277 867 -0.00925925925925925 -1277 868 -5.421010862427522e-19 -1277 869 -0.002362962962962964 -1277 870 -0.03703703703703706 -1277 871 0.0004999999999999999 -1277 872 -0.001040740740740742 -1277 873 -0.009259259259259283 -1277 1274 0.0002814814814814795 -1277 1275 3.469446951953614e-18 -1277 1276 6.505213034913027e-19 -1277 1277 0.008325925925925929 -1277 1278 -6.938893903907228e-18 -1277 1279 7.589415207398531e-19 -1277 1280 0.000281481481481487 -1277 1281 -1.908195823574488e-17 -1278 865 -0.01296296296296296 -1278 866 -0.01342592592592591 -1278 867 -0.1551783264746225 -1278 868 -1.734723475976807e-17 -1278 869 -0.02870370370370372 -1278 870 -0.2040466392318246 -1278 871 0.01296296296296296 -1278 872 -0.01342592592592594 -1278 873 -0.1551783264746232 -1278 1273 -0.02407407407407408 -1278 1274 -3.469446951953614e-18 -1278 1275 -0.1063100137174213 -1278 1276 2.775557561562891e-17 -1278 1277 2.602085213965211e-17 -1278 1278 1.241426611796983 -1278 1279 0.02407407407407405 -1278 1280 -2.42861286636753e-17 -1278 1281 -0.1063100137174206 -1279 868 -0.0009703703703703708 -1279 869 -0.0005000000000000001 -1279 870 -0.008333333333333335 -1279 871 -0.0002814814814814887 -1279 872 -4.336808689942018e-19 -1279 873 -1.734723475976807e-18 -1279 874 -0.0009703703703703725 -1279 875 0.0005000000000000007 -1279 876 0.008333333333333335 -1279 1276 -0.001659259259259253 -1279 1277 7.589415207398531e-19 -1279 1278 -0.03333333333333334 -1279 1279 0.007762962962962961 -1279 1280 -1.734723475976807e-18 -1279 1282 -0.001659259259259257 -1279 1283 9.75781955236954e-19 -1279 1284 0.03333333333333335 -1280 868 -0.0005000000000000001 -1280 869 -0.001040740740740742 -1280 870 -0.009259259259259278 -1280 871 -3.252606517456513e-19 -1280 872 -0.002362962962962972 -1280 873 -0.0370370370370371 -1280 874 0.0005000000000000007 -1280 875 -0.001040740740740744 -1280 876 -0.009259259259259287 -1280 1276 7.589415207398531e-19 -1280 1277 0.000281481481481487 -1280 1278 -1.734723475976807e-18 -1280 1279 -1.409462824231156e-18 -1280 1280 0.008325925925925931 -1280 1281 6.938893903907228e-18 -1280 1282 8.673617379884035e-19 -1280 1283 0.0002814814814814836 -1280 1284 -5.204170427930421e-17 -1281 868 -0.01296296296296299 -1281 869 -0.01342592592592595 -1281 870 -0.1551783264746233 -1281 871 -8.673617379884035e-18 -1281 872 -0.02870370370370375 -1281 873 -0.2040466392318259 -1281 874 0.01296296296296299 -1281 875 -0.01342592592592595 -1281 876 -0.1551783264746232 -1281 1276 -0.02407407407407405 -1281 1277 1.387778780781446e-17 -1281 1278 -0.1063100137174205 -1281 1279 -1.908195823574488e-17 -1281 1280 -3.122502256758253e-17 -1281 1281 1.241426611796985 -1281 1282 0.02407407407407408 -1281 1283 8.673617379884035e-18 -1281 1284 -0.1063100137174209 -1282 871 -0.0009703703703703678 -1282 872 -0.0004999999999999995 -1282 873 -0.008333333333333323 -1282 874 -0.0002814814814814815 -1282 875 -7.589415207398531e-19 -1282 876 -1.561251128379126e-17 -1282 877 -0.0009703703703703691 -1282 878 0.0004999999999999998 -1282 879 0.008333333333333325 -1282 1279 -0.001659259259259257 -1282 1280 8.673617379884035e-19 -1282 1281 -0.03333333333333334 -1282 1282 0.007762962962962965 -1282 1283 -1.517883041479706e-18 -1282 1284 -3.469446951953614e-18 -1282 1285 -0.001659259259259264 -1282 1286 1.409462824231156e-18 -1282 1287 0.03333333333333335 -1283 871 -0.0004999999999999995 -1283 872 -0.001040740740740739 -1283 873 -0.009259259259259267 -1283 874 -8.673617379884035e-19 -1283 875 -0.002362962962962963 -1283 876 -0.03703703703703703 -1283 877 0.0004999999999999998 -1283 878 -0.00104074074074074 -1283 879 -0.00925925925925926 -1283 1279 7.589415207398531e-19 -1283 1280 0.0002814814814814836 -1283 1281 2.081668171172169e-17 -1283 1282 -1.517883041479706e-18 -1283 1283 0.008325925925925924 -1283 1284 6.938893903907228e-17 -1283 1285 1.517883041479706e-18 -1283 1286 0.0002814814814814774 -1283 1287 -2.42861286636753e-17 -1284 871 -0.01296296296296293 -1284 872 -0.01342592592592588 -1284 873 -0.1551783264746224 -1284 874 -2.42861286636753e-17 -1284 875 -0.02870370370370376 -1284 876 -0.2040466392318244 -1284 877 0.01296296296296294 -1284 878 -0.01342592592592591 -1284 879 -0.1551783264746226 -1284 1279 -0.02407407407407408 -1284 1280 -3.642919299551295e-17 -1284 1281 -0.1063100137174209 -1284 1282 -1.734723475976807e-18 -1284 1283 4.683753385137379e-17 -1284 1284 1.241426611796983 -1284 1285 0.02407407407407409 -1284 1286 -3.816391647148976e-17 -1284 1287 -0.1063100137174219 -1285 874 -0.0009703703703703724 -1285 875 -0.0005000000000000003 -1285 876 -0.008333333333333344 -1285 877 -0.0002814814814814738 -1285 878 -2.168404344971009e-19 -1285 879 5.204170427930421e-18 -1285 880 -0.0009703703703703738 -1285 881 0.0005000000000000004 -1285 882 0.008333333333333349 -1285 1282 -0.001659259259259264 -1285 1283 1.517883041479706e-18 -1285 1284 -0.03333333333333335 -1285 1285 0.00776296296296297 -1285 1286 -4.336808689942018e-19 -1285 1287 1.734723475976807e-17 -1285 1288 -0.001659259259259273 -1285 1289 -7.589415207398531e-19 -1285 1290 0.03333333333333335 -1286 874 -0.0005000000000000002 -1286 875 -0.001040740740740741 -1286 876 -0.009259259259259252 -1286 878 -0.002362962962962953 -1286 879 -0.03703703703703697 -1286 880 0.0005000000000000004 -1286 881 -0.00104074074074074 -1286 882 -0.009259259259259217 -1286 1282 1.409462824231156e-18 -1286 1283 0.0002814814814814775 -1286 1284 1.214306433183765e-17 -1286 1285 -4.336808689942018e-19 -1286 1286 0.008325925925925915 -1286 1287 -3.469446951953614e-18 -1286 1288 -6.505213034913027e-19 -1286 1289 0.0002814814814814703 -1286 1290 4.163336342344337e-17 -1287 874 -0.01296296296296298 -1287 875 -0.01342592592592591 -1287 876 -0.1551783264746229 -1287 877 8.673617379884035e-18 -1287 878 -0.02870370370370357 -1287 879 -0.2040466392318226 -1287 880 0.01296296296296297 -1287 881 -0.01342592592592594 -1287 882 -0.1551783264746223 -1287 1282 -0.02407407407407409 -1287 1283 2.081668171172169e-17 -1287 1284 -0.1063100137174219 -1287 1285 -5.898059818321144e-17 -1287 1286 -5.377642775528102e-17 -1287 1287 1.24142661179698 -1287 1288 0.02407407407407414 -1287 1289 2.255140518769849e-17 -1287 1290 -0.1063100137174227 -1288 877 -0.0009703703703703692 -1288 878 -0.0004999999999999997 -1288 879 -0.00833333333333333 -1288 880 -0.0002814814814814732 -1288 881 1.301042606982605e-18 -1288 882 5.204170427930421e-18 -1288 883 -0.000970370370370368 -1288 884 0.0004999999999999991 -1288 885 0.008333333333333337 -1288 1285 -0.001659259259259273 -1288 1286 -7.589415207398531e-19 -1288 1287 -0.03333333333333337 -1288 1288 0.007762962962962967 -1288 1289 4.336808689942018e-19 -1288 1290 -3.469446951953614e-17 -1288 1291 -0.001659259259259268 -1288 1292 -1.192622389734055e-18 -1288 1293 0.03333333333333334 -1289 877 -0.0004999999999999997 -1289 878 -0.001040740740740738 -1289 879 -0.009259259259259217 -1289 880 9.75781955236954e-19 -1289 881 -0.002362962962962952 -1289 882 -0.03703703703703693 -1289 883 0.0004999999999999993 -1289 884 -0.001040740740740734 -1289 885 -0.009259259259259224 -1289 1285 -6.505213034913027e-19 -1289 1286 0.0002814814814814703 -1289 1287 4.163336342344337e-17 -1289 1288 3.252606517456513e-19 -1289 1289 0.00832592592592591 -1289 1290 -3.469446951953614e-17 -1289 1291 -1.301042606982605e-18 -1289 1292 0.0002814814814814757 -1289 1293 5.551115123125783e-17 -1290 877 -0.01296296296296292 -1290 878 -0.01342592592592591 -1290 879 -0.1551783264746218 -1290 880 2.602085213965211e-17 -1290 881 -0.02870370370370363 -1290 882 -0.2040466392318223 -1290 883 0.01296296296296291 -1290 884 -0.01342592592592583 -1290 885 -0.1551783264746218 -1290 1285 -0.02407407407407413 -1290 1286 -2.42861286636753e-17 -1290 1287 -0.1063100137174227 -1290 1288 2.255140518769849e-17 -1290 1289 3.122502256758253e-17 -1290 1290 1.241426611796977 -1290 1291 0.02407407407407411 -1290 1292 1.040834085586084e-17 -1290 1293 -0.1063100137174219 -1291 880 -0.0009703703703703744 -1291 881 -0.0005000000000000009 -1291 882 -0.008333333333333342 -1291 883 -0.000281481481481478 -1291 884 2.059984127722458e-18 -1291 885 -6.938893903907228e-18 -1291 886 -0.0009703703703703688 -1291 887 0.0004999999999999994 -1291 888 0.008333333333333347 -1291 1288 -0.001659259259259268 -1291 1289 -1.301042606982605e-18 -1291 1290 -0.03333333333333333 -1291 1291 0.007762962962962962 -1291 1292 2.276824562219559e-18 -1291 1293 -3.469446951953614e-18 -1291 1294 -0.001659259259259251 -1291 1295 -1.843143693225358e-18 -1291 1296 0.03333333333333334 -1292 880 -0.0005000000000000009 -1292 881 -0.001040740740740744 -1292 882 -0.009259259259259262 -1292 883 1.951563910473908e-18 -1292 884 -0.002362962962962959 -1292 885 -0.03703703703703701 -1292 886 0.0004999999999999994 -1292 887 -0.001040740740740736 -1292 888 -0.009259259259259245 -1292 1288 -1.084202172485504e-18 -1292 1289 0.0002814814814814756 -1292 1290 -1.908195823574488e-17 -1292 1291 2.38524477946811e-18 -1292 1292 0.008325925925925919 -1292 1293 -3.469446951953614e-18 -1292 1294 -1.734723475976807e-18 -1292 1295 0.0002814814814814883 -1292 1296 2.081668171172169e-17 -1293 880 -0.01296296296296299 -1293 881 -0.01342592592592597 -1293 882 -0.155178326474623 -1293 883 3.816391647148976e-17 -1293 884 -0.02870370370370371 -1293 885 -0.2040466392318239 -1293 886 0.01296296296296297 -1293 887 -0.01342592592592586 -1293 888 -0.1551783264746226 -1293 1288 -0.02407407407407407 -1293 1289 3.642919299551295e-17 -1293 1290 -0.1063100137174219 -1293 1291 -2.255140518769849e-17 -1293 1292 -1.040834085586084e-17 -1293 1293 1.241426611796982 -1293 1294 0.02407407407407407 -1293 1295 -3.469446951953614e-18 -1293 1296 -0.1063100137174204 -1294 883 -0.0009703703703703714 -1294 884 -0.0005000000000000008 -1294 885 -0.008333333333333325 -1294 886 -0.0002814814814814872 -1294 887 1.409462824231156e-18 -1294 888 2.602085213965211e-17 -1294 889 -0.0009703703703703708 -1294 890 0.0005000000000000004 -1294 891 0.00833333333333334 -1294 1291 -0.001659259259259251 -1294 1292 -1.734723475976807e-18 -1294 1293 -0.03333333333333331 -1294 1294 0.007762962962962959 -1294 1295 -8.673617379884035e-19 -1294 1296 3.122502256758253e-17 -1294 1297 -0.001659259259259247 -1294 1298 1.084202172485504e-18 -1294 1299 0.03333333333333333 -1295 883 -0.0005000000000000007 -1295 884 -0.001040740740740747 -1295 885 -0.009259259259259302 -1295 886 1.409462824231156e-18 -1295 887 -0.00236296296296297 -1295 888 -0.03703703703703715 -1295 889 0.0005000000000000003 -1295 890 -0.001040740740740744 -1295 891 -0.009259259259259309 -1295 1291 -1.843143693225358e-18 -1295 1292 0.0002814814814814883 -1295 1293 -5.377642775528102e-17 -1295 1294 -7.589415207398531e-19 -1295 1295 0.008325925925925943 -1295 1296 -3.469446951953614e-17 -1295 1297 1.301042606982605e-18 -1295 1298 0.0002814814814814919 -1295 1299 -6.245004513516506e-17 -1296 883 -0.012962962962963 -1296 884 -0.01342592592592601 -1296 885 -0.1551783264746237 -1296 886 5.204170427930421e-17 -1296 887 -0.02870370370370376 -1296 888 -0.2040466392318256 -1296 889 0.01296296296296298 -1296 890 -0.01342592592592596 -1296 891 -0.1551783264746231 -1296 1291 -0.02407407407407402 -1296 1292 -4.683753385137379e-17 -1296 1293 -0.1063100137174204 -1296 1294 -9.367506770274758e-17 -1296 1295 2.775557561562891e-17 -1296 1296 1.241426611796985 -1296 1297 0.02407407407407409 -1296 1298 1.734723475976807e-18 -1296 1299 -0.1063100137174194 -1297 886 -0.0009703703703703682 -1297 887 -0.0004999999999999996 -1297 888 -0.008333333333333338 -1297 889 -0.0002814814814814862 -1297 890 -5.421010862427522e-19 -1297 891 -3.469446951953614e-18 -1297 892 -0.000970370370370371 -1297 893 0.0005000000000000001 -1297 894 0.008333333333333337 -1297 1294 -0.001659259259259247 -1297 1295 1.301042606982605e-18 -1297 1296 -0.03333333333333334 -1297 1297 0.007762962962962959 -1297 1298 -1.626303258728257e-18 -1297 1299 -3.469446951953614e-18 -1297 1300 -0.001659259259259258 -1297 1301 8.673617379884035e-19 -1297 1302 0.03333333333333333 -1298 886 -0.0004999999999999996 -1298 887 -0.00104074074074074 -1298 888 -0.00925925925925929 -1298 889 -4.336808689942018e-19 -1298 890 -0.002362962962962969 -1298 891 -0.03703703703703709 -1298 892 0.0005000000000000001 -1298 893 -0.001040740740740742 -1298 894 -0.009259259259259264 -1298 1294 1.084202172485504e-18 -1298 1295 0.0002814814814814919 -1298 1296 1.214306433183765e-17 -1298 1297 -1.843143693225358e-18 -1298 1298 0.008325925925925933 -1298 1299 3.469446951953614e-17 -1298 1300 1.084202172485504e-18 -1298 1301 0.0002814814814814823 -1298 1302 -3.469446951953614e-17 -1299 886 -0.01296296296296295 -1299 887 -0.0134259259259259 -1299 888 -0.1551783264746225 -1299 889 -2.602085213965211e-17 -1299 890 -0.02870370370370386 -1299 891 -0.2040466392318254 -1299 892 0.01296296296296297 -1299 893 -0.01342592592592593 -1299 894 -0.155178326474623 -1299 1294 -0.02407407407407407 -1299 1295 -5.204170427930421e-18 -1299 1296 -0.1063100137174194 -1299 1297 1.387778780781446e-17 -1299 1298 4.336808689942018e-17 -1299 1299 1.241426611796982 -1299 1300 0.02407407407407406 -1299 1301 -1.734723475976807e-18 -1299 1302 -0.106310013717421 -1300 889 -0.0009703703703703702 -1300 890 -0.0004999999999999999 -1300 891 -0.008333333333333335 -1300 892 -0.0002814814814814773 -1300 893 4.336808689942018e-19 -1300 894 -8.673617379884035e-18 -1300 895 -0.0009703703703703688 -1300 896 0.0004999999999999994 -1300 897 0.008333333333333335 -1300 1297 -0.001659259259259259 -1300 1298 1.084202172485504e-18 -1300 1299 -0.03333333333333333 -1300 1300 0.007762962962962966 -1300 1301 1.084202172485504e-18 -1300 1302 -1.040834085586084e-17 -1300 1303 -0.001659259259259272 -1300 1304 -1.409462824231156e-18 -1300 1305 0.03333333333333332 -1301 889 -0.0005 -1301 890 -0.00104074074074074 -1301 891 -0.009259259259259255 -1301 892 4.336808689942018e-19 -1301 893 -0.002362962962962957 -1301 894 -0.03703703703703698 -1301 895 0.0004999999999999994 -1301 896 -0.001040740740740736 -1301 897 -0.009259259259259214 -1301 1297 9.75781955236954e-19 -1301 1298 0.0002814814814814823 -1301 1299 3.469446951953614e-18 -1301 1300 1.084202172485504e-18 -1301 1301 0.008325925925925919 -1301 1303 -1.301042606982605e-18 -1301 1304 0.0002814814814814697 -1301 1305 3.989863994746656e-17 -1302 889 -0.01296296296296296 -1302 890 -0.01342592592592591 -1302 891 -0.1551783264746228 -1302 892 4.336808689942018e-17 -1302 893 -0.0287037037037037 -1302 894 -0.2040466392318236 -1302 895 0.01296296296296292 -1302 896 -0.01342592592592587 -1302 897 -0.1551783264746219 -1302 1297 -0.02407407407407407 -1302 1298 1.387778780781446e-17 -1302 1299 -0.106310013717421 -1302 1300 -3.816391647148976e-17 -1302 1301 2.775557561562891e-17 -1302 1302 1.24142661179698 -1302 1303 0.0240740740740741 -1302 1304 2.602085213965211e-17 -1302 1305 -0.1063100137174227 -1303 892 -0.0009703703703703732 -1303 893 -0.0005000000000000008 -1303 894 -0.008333333333333333 -1303 895 -0.0002814814814814814 -1303 896 8.673617379884035e-19 -1303 897 -2.42861286636753e-17 -1303 898 -0.0009703703703703643 -1303 899 0.0004999999999999986 -1303 900 0.008333333333333325 -1303 1300 -0.001659259259259272 -1303 1301 -1.301042606982605e-18 -1303 1302 -0.03333333333333331 -1303 1303 0.007762962962962958 -1303 1304 2.602085213965211e-18 -1303 1305 2.081668171172169e-17 -1303 1306 -0.001659259259259246 -1303 1307 6.505213034913027e-19 -1303 1308 0.03333333333333335 -1304 892 -0.0005000000000000007 -1304 893 -0.001040740740740744 -1304 894 -0.00925925925925925 -1304 895 8.673617379884035e-19 -1304 896 -0.002362962962962963 -1304 897 -0.03703703703703702 -1304 898 0.0004999999999999986 -1304 899 -0.001040740740740734 -1304 900 -0.00925925925925925 -1304 1300 -1.409462824231156e-18 -1304 1301 0.0002814814814814697 -1304 1302 -3.642919299551295e-17 -1304 1303 2.602085213965211e-18 -1304 1304 0.008325925925925917 -1304 1305 -8.326672684688674e-17 -1304 1306 5.421010862427522e-19 -1304 1307 0.0002814814814814933 -1304 1308 8.673617379884035e-18 -1305 892 -0.01296296296296297 -1305 893 -0.01342592592592599 -1305 894 -0.1551783264746229 -1305 895 3.642919299551295e-17 -1305 896 -0.02870370370370375 -1305 897 -0.2040466392318244 -1305 898 0.01296296296296291 -1305 899 -0.01342592592592584 -1305 900 -0.155178326474622 -1305 1300 -0.02407407407407405 -1305 1301 3.295974604355933e-17 -1305 1302 -0.1063100137174227 -1305 1303 -9.540979117872439e-17 -1305 1304 5.551115123125783e-17 -1305 1305 1.241426611796981 -1305 1306 0.02407407407407415 -1305 1307 -5.204170427930421e-17 -1305 1308 -0.1063100137174196 -1306 895 -0.0009703703703703757 -1306 896 -0.0005000000000000015 -1306 897 -0.008333333333333344 -1306 898 -0.0002814814814814858 -1306 899 7.589415207398531e-19 -1306 900 5.204170427930421e-18 -1306 901 -0.0009703703703703734 -1306 902 0.0005000000000000008 -1306 903 0.008333333333333347 -1306 1303 -0.001659259259259246 -1306 1304 5.421010862427522e-19 -1306 1305 -0.03333333333333334 -1306 1306 0.007762962962962959 -1306 1307 -9.75781955236954e-19 -1306 1308 1.040834085586084e-17 -1306 1309 -0.00165925925925925 -1306 1310 6.505213034913027e-19 -1306 1311 0.03333333333333334 -1307 895 -0.0005000000000000014 -1307 896 -0.00104074074074075 -1307 897 -0.009259259259259306 -1307 898 5.421010862427522e-19 -1307 899 -0.002362962962962969 -1307 900 -0.0370370370370371 -1307 901 0.0005000000000000007 -1307 902 -0.001040740740740745 -1307 903 -0.00925925925925928 -1307 1303 7.589415207398531e-19 -1307 1304 0.0002814814814814933 -1307 1305 6.938893903907228e-18 -1307 1306 -9.75781955236954e-19 -1307 1307 0.008325925925925941 -1307 1308 1.040834085586084e-17 -1307 1309 7.589415207398531e-19 -1307 1310 0.0002814814814814889 -1307 1311 -5.377642775528102e-17 -1308 895 -0.01296296296296305 -1308 896 -0.01342592592592605 -1308 897 -0.1551783264746241 -1308 898 4.510281037539698e-17 -1308 899 -0.02870370370370374 -1308 900 -0.2040466392318251 -1308 901 0.01296296296296301 -1308 902 -0.01342592592592597 -1308 903 -0.1551783264746229 -1308 1303 -0.02407407407407399 -1308 1304 -1.734723475976807e-18 -1308 1305 -0.1063100137174196 -1308 1306 -1.387778780781446e-16 -1308 1307 -3.816391647148976e-17 -1308 1308 1.241426611796985 -1308 1309 0.02407407407407413 -1308 1310 -5.204170427930421e-18 -1308 1311 -0.1063100137174197 -1309 898 -0.0009703703703703667 -1309 899 -0.0004999999999999994 -1309 900 -0.008333333333333328 -1309 901 -0.0002814814814814745 -1309 902 -2.168404344971009e-19 -1309 903 1.734723475976807e-17 -1309 904 -0.0009703703703703747 -1309 905 0.0005000000000000008 -1309 906 0.008333333333333335 -1309 1306 -0.00165925925925925 -1309 1307 7.589415207398531e-19 -1309 1308 -0.03333333333333337 -1309 1309 0.00776296296296297 -1309 1310 -7.480994990149981e-18 -1309 1311 -2.081668171172169e-17 -1309 1312 -0.001659259259259286 -1309 1313 4.662069341687669e-18 -1309 1314 0.03333333333333333 -1310 898 -0.0004999999999999993 -1310 899 -0.001040740740740738 -1310 900 -0.009259259259259262 -1310 901 -3.252606517456513e-19 -1310 902 -0.002362962962962954 -1310 903 -0.03703703703703694 -1310 904 0.0005000000000000008 -1310 905 -0.001040740740740743 -1310 906 -0.009259259259259212 -1310 1306 5.421010862427522e-19 -1310 1307 0.0002814814814814889 -1310 1308 1.908195823574488e-17 -1310 1309 -7.480994990149981e-18 -1310 1310 0.008325925925925924 -1310 1311 -3.122502256758253e-17 -1310 1312 4.77048955893622e-18 -1310 1313 0.0002814814814814556 -1310 1314 -1.613292832658431e-16 -1311 898 -0.01296296296296292 -1311 899 -0.01342592592592587 -1311 900 -0.1551783264746219 -1311 901 -8.673617379884035e-18 -1311 902 -0.02870370370370361 -1311 903 -0.2040466392318223 -1311 904 0.01296296296296296 -1311 905 -0.01342592592592596 -1311 906 -0.1551783264746223 -1311 1306 -0.02407407407407411 -1311 1307 -6.418476861114186e-17 -1311 1308 -0.1063100137174197 -1311 1309 -6.938893903907228e-18 -1311 1310 5.377642775528102e-17 -1311 1311 1.241426611796979 -1311 1312 0.0240740740740741 -1311 1313 -1.040834085586084e-17 -1311 1314 -0.1063100137174246 -1312 901 -0.0009703703703703692 -1312 902 -0.0004999999999999991 -1312 903 -0.008333333333333331 -1312 904 -0.0002814814814814771 -1312 905 -1.301042606982605e-18 -1312 906 -1.734723475976807e-18 -1312 907 -0.0009703703703703707 -1312 908 0.0005000000000000004 -1312 909 0.008333333333333335 -1312 1309 -0.001659259259259286 -1312 1310 4.77048955893622e-18 -1312 1311 -0.03333333333333332 -1312 1312 0.007762962962962961 -1312 1313 -1.073360150760649e-17 -1312 1314 -3.469446951953614e-18 -1312 1315 -0.001659259259259245 -1312 1316 5.963111948670274e-18 -1312 1317 0.03333333333333332 -1313 901 -0.0004999999999999991 -1313 902 -0.001040740740740732 -1313 903 -0.009259259259259165 -1313 904 -1.192622389734055e-18 -1313 905 -0.002362962962962957 -1313 906 -0.03703703703703697 -1313 907 0.0005000000000000002 -1313 908 -0.001040740740740745 -1313 909 -0.009259259259259309 -1313 1309 4.662069341687669e-18 -1313 1310 0.0002814814814814557 -1313 1311 9.71445146547012e-17 -1313 1312 -1.073360150760649e-17 -1313 1313 0.008325925925925907 -1313 1314 -9.020562075079397e-17 -1313 1315 6.071532165918825e-18 -1313 1316 0.0002814814814814957 -1313 1317 -1.630640067418199e-16 -1314 901 -0.01296296296296289 -1314 902 -0.01342592592592581 -1314 903 -0.1551783264746211 -1314 904 -8.673617379884035e-17 -1314 905 -0.0287037037037037 -1314 906 -0.2040466392318233 -1314 907 0.01296296296296298 -1314 908 -0.01342592592592596 -1314 909 -0.1551783264746235 -1314 1309 -0.02407407407407405 -1314 1310 -3.469446951953614e-17 -1314 1311 -0.1063100137174246 -1314 1312 -9.8879238130678e-17 -1314 1313 4.336808689942018e-17 -1314 1314 1.241426611796978 -1314 1315 0.02407407407407415 -1314 1316 7.806255641895632e-17 -1314 1317 -0.106310013717419 -1315 904 -0.0009703703703703685 -1315 905 -0.0004999999999999996 -1315 906 -0.008333333333333333 -1315 907 -0.0002814814814814826 -1315 908 1.084202172485504e-19 -1315 909 1.040834085586084e-17 -1315 910 -0.0009703703703703697 -1315 911 0.0004999999999999996 -1315 912 0.00833333333333334 -1315 1312 -0.001659259259259245 -1315 1313 5.963111948670274e-18 -1315 1314 -0.03333333333333332 -1315 1315 0.007762962962962963 -1315 1316 -7.26415455565288e-18 -1315 1317 1.387778780781446e-17 -1315 1318 -0.001659259259259266 -1315 1319 9.75781955236954e-19 -1315 1320 0.03333333333333333 -1316 904 -0.0004999999999999996 -1316 905 -0.00104074074074074 -1316 906 -0.00925925925925929 -1316 907 4.336808689942018e-19 -1316 908 -0.002362962962962965 -1316 909 -0.03703703703703706 -1316 910 0.0004999999999999997 -1316 911 -0.001040740740740737 -1316 912 -0.009259259259259229 -1316 1312 5.963111948670274e-18 -1316 1313 0.0002814814814814957 -1316 1314 1.717376241217039e-16 -1316 1315 -7.37257477290143e-18 -1316 1316 0.008325925925925935 -1316 1317 1.283695372222837e-16 -1316 1318 7.589415207398531e-19 -1316 1319 0.0002814814814814744 -1316 1320 -1.040834085586084e-17 -1317 904 -0.01296296296296295 -1317 905 -0.0134259259259259 -1317 906 -0.155178326474623 -1317 907 1.734723475976807e-18 -1317 908 -0.02870370370370379 -1317 909 -0.2040466392318247 -1317 910 0.01296296296296295 -1317 911 -0.01342592592592589 -1317 912 -0.1551783264746222 -1317 1312 -0.02407407407407396 -1317 1313 3.816391647148976e-17 -1317 1314 -0.106310013717419 -1317 1315 -1.97758476261356e-16 -1317 1316 -2.602085213965211e-17 -1317 1317 1.241426611796983 -1317 1318 0.02407407407407415 -1317 1319 -2.602085213965211e-17 -1317 1320 -0.1063100137174221 -1318 907 -0.0009703703703703726 -1318 908 -0.0005000000000000004 -1318 909 -0.008333333333333338 -1318 910 -0.0002814814814814799 -1318 911 1.301042606982605e-18 -1318 912 6.938893903907228e-18 -1318 913 -0.000970370370370368 -1318 914 0.0004999999999999994 -1318 915 0.00833333333333334 -1318 1315 -0.001659259259259266 -1318 1316 7.589415207398531e-19 -1318 1317 -0.03333333333333333 -1318 1318 0.007762962962962972 -1318 1319 -1.734723475976807e-18 -1318 1320 1.387778780781446e-17 -1318 1321 -0.001659259259259261 -1318 1322 1.084202172485504e-19 -1318 1323 0.03333333333333333 -1319 907 -0.0005000000000000004 -1319 908 -0.001040740740740743 -1319 909 -0.009259259259259255 -1319 910 1.192622389734055e-18 -1319 911 -0.002362962962962961 -1319 912 -0.03703703703703708 -1319 913 0.0004999999999999993 -1319 914 -0.001040740740740737 -1319 915 -0.009259259259259257 -1319 1315 9.75781955236954e-19 -1319 1316 0.0002814814814814745 -1319 1317 4.336808689942018e-17 -1319 1318 -1.626303258728257e-18 -1319 1319 0.008325925925925936 -1319 1320 6.938893903907228e-18 -1319 1321 3.252606517456513e-19 -1319 1322 0.0002814814814814797 -1319 1323 1.734723475976807e-18 -1320 907 -0.01296296296296299 -1320 908 -0.01342592592592598 -1320 909 -0.1551783264746229 -1320 910 4.336808689942018e-17 -1320 911 -0.02870370370370361 -1320 912 -0.2040466392318244 -1320 913 0.01296296296296295 -1320 914 -0.01342592592592591 -1320 915 -0.1551783264746228 -1320 1315 -0.02407407407407402 -1320 1316 -3.989863994746656e-17 -1320 1317 -0.1063100137174221 -1320 1318 -1.144917494144693e-16 -1320 1319 -4.163336342344337e-17 -1320 1320 1.241426611796983 -1320 1321 0.02407407407407414 -1320 1322 6.765421556309548e-17 -1320 1323 -0.1063100137174214 -1321 910 -0.0009703703703703724 -1321 911 -0.0005000000000000007 -1321 912 -0.008333333333333342 -1321 913 -0.0002814814814814818 -1321 914 2.818925648462312e-18 -1321 915 1.734723475976807e-18 -1321 916 -0.0009703703703703634 -1321 917 0.0004999999999999978 -1321 918 0.00833333333333334 -1321 1318 -0.001659259259259261 -1321 1319 4.336808689942018e-19 -1321 1320 -0.03333333333333334 -1321 1321 0.007762962962962962 -1321 1322 3.903127820947816e-18 -1321 1323 1.040834085586084e-17 -1321 1324 -0.001659259259259258 -1321 1325 -4.553649124439119e-18 -1321 1326 0.03333333333333334 -1322 910 -0.0005000000000000007 -1322 911 -0.001040740740740746 -1322 912 -0.009259259259259293 -1322 913 2.927345865710862e-18 -1322 914 -0.002362962962962963 -1322 915 -0.03703703703703705 -1322 916 0.0004999999999999977 -1322 917 -0.001040740740740726 -1322 918 -0.009259259259259205 -1322 1318 1.084202172485504e-19 -1322 1319 0.0002814814814814797 -1322 1320 1.908195823574488e-17 -1322 1321 4.011548038196366e-18 -1322 1322 0.008325925925925919 -1322 1323 4.510281037539698e-17 -1322 1324 -4.662069341687669e-18 -1322 1325 0.0002814814814814836 -1322 1326 1.144917494144693e-16 -1323 910 -0.012962962962963 -1323 911 -0.01342592592592604 -1323 912 -0.1551783264746238 -1323 913 1.144917494144693e-16 -1323 914 -0.02870370370370384 -1323 915 -0.204046639231825 -1323 916 0.01296296296296288 -1323 917 -0.01342592592592572 -1323 918 -0.1551783264746213 -1323 1318 -0.02407407407407401 -1323 1319 6.071532165918825e-17 -1323 1320 -0.1063100137174214 -1323 1321 -1.457167719820518e-16 -1323 1322 4.163336342344337e-17 -1323 1323 1.241426611796982 -1323 1324 0.02407407407407416 -1323 1325 -5.204170427930421e-18 -1323 1326 -0.106310013717421 -1324 913 -0.0009703703703703777 -1324 914 -0.0005000000000000022 -1324 915 -0.008333333333333342 -1324 916 -0.0002814814814814839 -1324 917 3.686287386450715e-18 -1324 918 -1.040834085586084e-17 -1324 919 -0.0009703703703703642 -1324 920 0.0004999999999999983 -1324 921 0.008333333333333335 -1324 1321 -0.001659259259259258 -1324 1322 -4.553649124439119e-18 -1324 1323 -0.03333333333333335 -1324 1324 0.007762962962962956 -1324 1325 7.480994990149981e-18 -1324 1326 -1.040834085586084e-17 -1324 1327 -0.001659259259259246 -1324 1328 -2.710505431213761e-18 -1324 1329 0.03333333333333333 -1325 913 -0.0005000000000000022 -1325 914 -0.001040740740740755 -1325 915 -0.009259259259259326 -1325 916 3.794707603699266e-18 -1325 917 -0.002362962962962966 -1325 918 -0.03703703703703705 -1325 919 0.0004999999999999983 -1325 920 -0.001040740740740731 -1325 921 -0.009259259259259243 -1325 1321 -4.553649124439119e-18 -1325 1322 0.0002814814814814837 -1325 1323 -1.457167719820518e-16 -1325 1324 7.589415207398531e-18 -1325 1325 0.008325925925925926 -1325 1326 -1.387778780781446e-17 -1325 1327 -2.602085213965211e-18 -1325 1328 0.000281481481481494 -1325 1329 3.122502256758253e-17 -1326 913 -0.01296296296296306 -1326 914 -0.0134259259259261 -1326 915 -0.1551783264746247 -1326 916 1.52655665885959e-16 -1326 917 -0.02870370370370381 -1326 918 -0.2040466392318253 -1326 919 0.01296296296296292 -1326 920 -0.01342592592592576 -1326 921 -0.155178326474622 -1326 1321 -0.02407407407407399 -1326 1322 1.908195823574488e-17 -1326 1323 -0.106310013717421 -1326 1324 -1.578598363138894e-16 -1326 1325 1.040834085586084e-17 -1326 1326 1.241426611796984 -1326 1327 0.02407407407407414 -1326 1328 -8.673617379884035e-18 -1326 1329 -0.1063100137174194 -1327 916 -0.0009703703703703757 -1327 917 -0.0005000000000000016 -1327 918 -0.008333333333333335 -1327 919 -0.000281481481481484 -1327 920 1.192622389734055e-18 -1327 921 -8.673617379884035e-18 -1327 922 -0.0009703703703703715 -1327 923 0.0005000000000000003 -1327 924 0.008333333333333338 -1327 1324 -0.001659259259259246 -1327 1325 -2.602085213965211e-18 -1327 1326 -0.03333333333333333 -1327 1327 0.007762962962962961 -1327 1328 1.843143693225358e-18 -1327 1329 -3.469446951953614e-18 -1327 1330 -0.001659259259259251 -1327 1331 1.192622389734055e-18 -1327 1332 0.03333333333333333 -1328 916 -0.0005000000000000016 -1328 917 -0.001040740740740753 -1328 918 -0.009259259259259335 -1328 919 1.409462824231156e-18 -1328 920 -0.002362962962962967 -1328 921 -0.03703703703703709 -1328 922 0.0005000000000000004 -1328 923 -0.001040740740740743 -1328 924 -0.009259259259259273 -1328 1324 -2.818925648462312e-18 -1328 1325 0.0002814814814814941 -1328 1326 -1.162264728904461e-16 -1328 1327 1.734723475976807e-18 -1328 1328 0.008325925925925947 -1328 1329 3.122502256758253e-17 -1328 1330 1.084202172485504e-18 -1328 1331 0.0002814814814814891 -1328 1332 -6.938893903907228e-18 -1329 916 -0.01296296296296306 -1329 917 -0.01342592592592606 -1329 918 -0.1551783264746246 -1329 919 8.673617379884035e-17 -1329 920 -0.02870370370370366 -1329 921 -0.204046639231825 -1329 922 0.01296296296296298 -1329 923 -0.01342592592592594 -1329 924 -0.1551783264746228 -1329 1324 -0.02407407407407398 -1329 1325 3.469446951953614e-18 -1329 1326 -0.1063100137174194 -1329 1327 -7.979727989493313e-17 -1329 1328 -5.551115123125783e-17 -1329 1329 1.241426611796986 -1329 1330 0.02407407407407405 -1329 1331 -6.591949208711867e-17 -1329 1332 -0.1063100137174199 -1330 919 -0.0009703703703703694 -1330 920 -0.0004999999999999997 -1330 921 -0.008333333333333333 -1330 922 -0.000281481481481484 -1330 923 -1.192622389734055e-18 -1330 924 -5.204170427930421e-18 -1330 925 -0.000970370370370373 -1330 926 0.0005000000000000009 -1330 927 0.008333333333333338 -1330 1327 -0.001659259259259251 -1330 1328 1.192622389734055e-18 -1330 1329 -0.03333333333333333 -1330 1330 0.007762962962962965 -1330 1331 -2.927345865710862e-18 -1330 1332 -6.938893903907228e-18 -1330 1333 -0.001659259259259258 -1330 1334 2.059984127722458e-18 -1330 1335 0.03333333333333333 -1331 919 -0.0004999999999999998 -1331 920 -0.001040740740740739 -1331 921 -0.009259259259259254 -1331 922 -1.192622389734055e-18 -1331 923 -0.002362962962962966 -1331 924 -0.0370370370370371 -1331 925 0.0005000000000000009 -1331 926 -0.001040740740740747 -1331 927 -0.009259259259259302 -1331 1327 1.192622389734055e-18 -1331 1328 0.0002814814814814891 -1331 1329 5.030698080332741e-17 -1331 1330 -2.818925648462312e-18 -1331 1331 0.008325925925925938 -1331 1332 3.469446951953614e-17 -1331 1333 2.059984127722458e-18 -1331 1334 0.0002814814814814819 -1331 1335 -5.724587470723463e-17 -1332 919 -0.01296296296296295 -1332 920 -0.01342592592592588 -1332 921 -0.1551783264746222 -1332 922 -4.85722573273506e-17 -1332 923 -0.02870370370370367 -1332 924 -0.204046639231825 -1332 925 0.012962962962963 -1332 926 -0.01342592592592604 -1332 927 -0.1551783264746238 -1332 1327 -0.02407407407407407 -1332 1328 -6.245004513516506e-17 -1332 1329 -0.1063100137174199 -1332 1330 4.510281037539698e-17 -1332 1331 -5.724587470723463e-17 -1332 1332 1.241426611796984 -1332 1333 0.02407407407407402 -1332 1334 3.989863994746656e-17 -1332 1335 -0.1063100137174211 -1333 922 -0.0009703703703703673 -1333 923 -0.0004999999999999991 -1333 924 -0.008333333333333333 -1333 925 -0.0002814814814814829 -1333 926 2.49366499671666e-18 -1333 927 -5.204170427930421e-18 -1333 928 -0.0009703703703703595 -1333 929 0.0004999999999999966 -1333 930 0.008333333333333337 -1333 1330 -0.001659259259259258 -1333 1331 2.059984127722458e-18 -1333 1332 -0.03333333333333331 -1333 1333 0.007762962962962958 -1333 1334 3.144186300207963e-18 -1333 1335 -6.938893903907228e-18 -1333 1336 -0.001659259259259273 -1333 1337 -5.421010862427522e-18 -1333 1338 0.03333333333333333 -1334 922 -0.0004999999999999993 -1334 923 -0.001040740740740736 -1334 924 -0.009259259259259255 -1334 925 2.38524477946811e-18 -1334 926 -0.002362962962962965 -1334 927 -0.03703703703703701 -1334 928 0.0004999999999999968 -1334 929 -0.001040740740740718 -1334 930 -0.009259259259259169 -1334 1330 2.059984127722458e-18 -1334 1331 0.0002814814814814817 -1334 1332 5.377642775528102e-17 -1334 1333 3.144186300207963e-18 -1334 1334 0.008325925925925903 -1334 1335 1.214306433183765e-16 -1334 1336 -5.637851296924623e-18 -1334 1337 0.0002814814814814682 -1334 1338 1.214306433183765e-16 -1335 922 -0.01296296296296293 -1335 923 -0.01342592592592589 -1335 924 -0.1551783264746225 -1335 925 1.249000902703301e-16 -1335 926 -0.02870370370370399 -1335 927 -0.204046639231825 -1335 928 0.0129629629629628 -1335 929 -0.01342592592592564 -1335 930 -0.1551783264746202 -1335 1330 -0.02407407407407407 -1335 1331 3.122502256758253e-17 -1335 1332 -0.1063100137174211 -1335 1333 -1.387778780781446e-16 -1335 1334 5.204170427930421e-17 -1335 1335 1.241426611796979 -1335 1336 0.02407407407407423 -1335 1337 4.163336342344337e-17 -1335 1338 -0.106310013717423 -1336 925 -0.0009703703703703817 -1336 926 -0.0005000000000000034 -1336 927 -0.008333333333333333 -1336 928 -0.0002814814814814867 -1336 929 4.336808689942018e-18 -1336 930 -3.469446951953614e-18 -1336 931 -0.000970370370370366 -1336 932 0.000499999999999999 -1336 933 0.008333333333333335 -1336 1333 -0.001659259259259273 -1336 1334 -5.529431079676073e-18 -1336 1335 -0.03333333333333332 -1336 1336 0.007762962962962967 -1336 1337 6.396792817664476e-18 -1336 1339 -0.001659259259259231 -1336 1340 -1.192622389734055e-18 -1336 1341 0.03333333333333333 -1337 925 -0.0005000000000000033 -1337 926 -0.001040740740740763 -1337 927 -0.009259259259259352 -1337 928 4.228388472693467e-18 -1337 929 -0.00236296296296297 -1337 930 -0.03703703703703717 -1337 931 0.0004999999999999989 -1337 932 -0.001040740740740736 -1337 933 -0.009259259259259257 -1337 1333 -5.421010862427522e-18 -1337 1334 0.0002814814814814682 -1337 1335 -1.752070710736575e-16 -1337 1336 6.396792817664476e-18 -1337 1337 0.008325925925925952 -1337 1338 -1.561251128379126e-16 -1337 1339 -1.301042606982605e-18 -1337 1340 0.0002814814814815066 -1337 1341 7.28583859910259e-17 -1338 925 -0.01296296296296309 -1338 926 -0.01342592592592624 -1338 927 -0.1551783264746253 -1338 928 1.457167719820518e-16 -1338 929 -0.02870370370370358 -1338 930 -0.2040466392318253 -1338 931 0.01296296296296294 -1338 932 -0.01342592592592587 -1338 933 -0.1551783264746221 -1338 1333 -0.02407407407407389 -1338 1334 6.071532165918825e-17 -1338 1335 -0.106310013717423 -1338 1336 -2.133709875451473e-16 -1338 1337 2.081668171172169e-17 -1338 1338 1.241426611796985 -1338 1339 0.02407407407407412 -1338 1340 -5.551115123125783e-17 -1338 1341 -0.1063100137174173 -1339 928 -0.0009703703703703727 -1339 929 -0.0005000000000000011 -1339 930 -0.008333333333333333 -1339 931 -0.0002814814814814932 -1339 932 1.843143693225358e-18 -1339 933 -1.387778780781446e-17 -1339 934 -0.0009703703703703654 -1339 935 0.0004999999999999987 -1339 936 0.008333333333333335 -1339 1336 -0.001659259259259231 -1339 1337 -1.409462824231156e-18 -1339 1338 -0.03333333333333333 -1339 1339 0.00776296296296295 -1339 1340 5.963111948670274e-18 -1339 1342 -0.001659259259259245 -1339 1343 -3.686287386450715e-18 -1339 1344 0.03333333333333334 -1340 928 -0.000500000000000001 -1340 929 -0.001040740740740749 -1340 930 -0.009259259259259314 -1340 931 1.734723475976807e-18 -1340 932 -0.002362962962962978 -1340 933 -0.03703703703703715 -1340 934 0.0004999999999999989 -1340 935 -0.001040740740740735 -1340 936 -0.009259259259259278 -1340 1336 -1.192622389734055e-18 -1340 1337 0.0002814814814815066 -1340 1339 5.854691731421724e-18 -1340 1340 0.008325925925925947 -1340 1341 1.006139616066548e-16 -1340 1342 -3.686287386450715e-18 -1340 1343 0.0002814814814814937 -1340 1344 8.847089727481716e-17 -1341 928 -0.01296296296296302 -1341 929 -0.01342592592592605 -1341 930 -0.1551783264746236 -1341 931 7.632783294297951e-17 -1341 932 -0.02870370370370397 -1341 933 -0.2040466392318269 -1341 934 0.01296296296296293 -1341 935 -0.01342592592592585 -1341 936 -0.1551783264746226 -1341 1336 -0.02407407407407401 -1341 1337 -4.336808689942018e-17 -1341 1338 -0.1063100137174173 -1341 1339 -1.214306433183765e-17 -1341 1340 2.775557561562891e-17 -1341 1341 1.241426611796987 -1341 1342 0.02407407407407403 -1341 1343 -3.469446951953614e-17 -1341 1344 -0.1063100137174196 -1342 931 -0.0009703703703703738 -1342 932 -0.0005000000000000013 -1342 933 -0.008333333333333342 -1342 934 -0.0002814814814814779 -1342 935 1.192622389734055e-18 -1342 936 -2.42861286636753e-17 -1342 937 -0.0009703703703703671 -1342 938 0.0004999999999999988 -1342 939 0.008333333333333335 -1342 1339 -0.001659259259259245 -1342 1340 -3.686287386450715e-18 -1342 1341 -0.03333333333333333 -1342 1342 0.007762962962962963 -1342 1343 9.432558900623889e-18 -1342 1344 1.387778780781446e-17 -1342 1345 -0.001659259259259276 -1342 1346 -3.361026734705064e-18 -1342 1347 0.03333333333333335 -1343 931 -0.0005000000000000012 -1343 932 -0.00104074074074075 -1343 933 -0.009259259259259335 -1343 934 1.192622389734055e-18 -1343 935 -0.002362962962962959 -1343 936 -0.03703703703703702 -1343 937 0.0004999999999999989 -1343 938 -0.001040740740740731 -1343 939 -0.009259259259259189 -1343 1339 -3.686287386450715e-18 -1343 1340 0.0002814814814814937 -1343 1341 -1.335737076502141e-16 -1343 1342 9.432558900623889e-18 -1343 1343 0.008325925925925924 -1343 1344 2.081668171172169e-17 -1343 1345 -3.686287386450715e-18 -1343 1346 0.0002814814814814676 -1343 1347 7.632783294297951e-17 -1344 931 -0.01296296296296304 -1344 932 -0.01342592592592605 -1344 933 -0.1551783264746244 -1344 934 1.196959198423997e-16 -1344 935 -0.02870370370370376 -1344 936 -0.204046639231824 -1344 937 0.01296296296296289 -1344 938 -0.01342592592592578 -1344 939 -0.1551783264746213 -1344 1339 -0.02407407407407403 -1344 1340 2.255140518769849e-17 -1344 1341 -0.1063100137174196 -1344 1342 -9.194034422677078e-17 -1344 1343 6.071532165918825e-17 -1344 1344 1.241426611796983 -1344 1345 0.02407407407407413 -1344 1346 -2.602085213965211e-17 -1344 1347 -0.1063100137174232 -1345 934 -0.0009703703703703763 -1345 935 -0.0005000000000000012 -1345 936 -0.008333333333333344 -1345 937 -0.0002814814814814666 -1345 938 -7.589415207398531e-19 -1345 939 -1.214306433183765e-17 -1345 940 -0.0009703703703703763 -1345 941 0.0005000000000000013 -1345 942 0.008333333333333335 -1345 1342 -0.001659259259259276 -1345 1343 -3.686287386450715e-18 -1345 1344 -0.03333333333333336 -1345 1345 0.007762962962962974 -1345 1346 -2.168404344971009e-19 -1345 1347 -3.469446951953614e-18 -1345 1348 -0.001659259259259282 -1345 1349 5.312590645178972e-18 -1345 1350 0.03333333333333335 -1346 934 -0.0005000000000000013 -1346 935 -0.001040740740740746 -1346 936 -0.009259259259259247 -1346 937 -7.589415207398531e-19 -1346 938 -0.002362962962962943 -1346 939 -0.03703703703703689 -1346 940 0.0005000000000000013 -1346 941 -0.001040740740740747 -1346 942 -0.009259259259259241 -1346 1342 -3.469446951953614e-18 -1346 1343 0.0002814814814814676 -1346 1344 -1.43982048506075e-16 -1346 1345 -1.084202172485504e-19 -1346 1346 0.008325925925925903 -1346 1347 -2.393918396847994e-16 -1346 1348 5.204170427930421e-18 -1346 1349 0.0002814814814814621 -1346 1350 -1.370431546021678e-16 -1347 934 -0.01296296296296301 -1347 935 -0.01342592592592597 -1347 936 -0.1551783264746231 -1347 937 -5.204170427930421e-18 -1347 938 -0.02870370370370328 -1347 939 -0.204046639231821 -1347 940 0.012962962962963 -1347 941 -0.013425925925926 -1347 942 -0.1551783264746231 -1347 1342 -0.02407407407407413 -1347 1343 3.295974604355933e-17 -1347 1344 -0.1063100137174231 -1347 1345 -5.204170427930421e-18 -1347 1346 -4.510281037539698e-17 -1347 1347 1.241426611796978 -1347 1348 0.02407407407407414 -1347 1349 8.673617379884035e-18 -1347 1350 -0.106310013717424 -1348 937 -0.0009703703703703673 -1348 938 -0.0004999999999999986 -1348 939 -0.008333333333333333 -1348 940 -0.0002814814814814681 -1348 941 -3.252606517456513e-19 -1348 942 2.775557561562891e-17 -1348 943 -0.0009703703703703723 -1348 944 0.0005000000000000002 -1348 945 0.008333333333333349 -1348 1345 -0.001659259259259282 -1348 1346 5.312590645178972e-18 -1348 1347 -0.03333333333333335 -1348 1348 0.007762962962962972 -1348 1349 -5.529431079676073e-18 -1348 1350 1.734723475976807e-17 -1348 1351 -0.001659259259259269 -1348 1352 -1.951563910473908e-18 -1348 1353 0.03333333333333335 -1349 937 -0.0004999999999999987 -1349 938 -0.001040740740740729 -1349 939 -0.009259259259259167 -1349 940 -1.084202172485504e-19 -1349 941 -0.002362962962962945 -1349 942 -0.03703703703703685 -1349 943 0.0005000000000000002 -1349 944 -0.001040740740740738 -1349 945 -0.009259259259259228 -1349 1345 5.204170427930421e-18 -1349 1346 0.000281481481481462 -1349 1347 1.578598363138894e-16 -1349 1348 -5.312590645178972e-18 -1349 1349 0.008325925925925907 -1349 1350 1.97758476261356e-16 -1349 1351 -2.059984127722458e-18 -1349 1352 0.0002814814814814731 -1349 1353 6.938893903907228e-17 -1350 937 -0.01296296296296289 -1350 938 -0.01342592592592576 -1350 939 -0.155178326474621 -1350 940 -4.510281037539698e-17 -1350 941 -0.02870370370370362 -1350 942 -0.2040466392318212 -1350 943 0.01296296296296296 -1350 944 -0.0134259259259259 -1350 945 -0.1551783264746221 -1350 1345 -0.02407407407407413 -1350 1346 -2.602085213965211e-17 -1350 1347 -0.106310013717424 -1350 1348 -1.908195823574488e-17 -1350 1349 -5.030698080332741e-17 -1350 1350 1.241426611796977 -1350 1351 0.02407407407407414 -1350 1352 1.040834085586084e-17 -1350 1353 -0.1063100137174222 -1351 940 -0.0009703703703703701 -1351 941 -0.0005 -1351 942 -0.00833333333333333 -1351 943 -0.0002814814814814838 -1351 944 2.710505431213761e-18 -1351 945 1.908195823574488e-17 -1351 946 -0.0009703703703703651 -1351 947 0.0004999999999999986 -1351 948 0.008333333333333337 -1351 1348 -0.001659259259259269 -1351 1349 -2.168404344971009e-18 -1351 1350 -0.03333333333333337 -1351 1351 0.007762962962962963 -1351 1352 5.529431079676073e-18 -1351 1353 -2.775557561562891e-17 -1351 1354 -0.001659259259259244 -1351 1355 -5.421010862427522e-18 -1351 1356 0.03333333333333332 -1352 940 -0.0005 -1352 941 -0.001040740740740741 -1352 942 -0.009259259259259247 -1352 943 2.38524477946811e-18 -1352 944 -0.002362962962962967 -1352 945 -0.03703703703703706 -1352 946 0.0004999999999999986 -1352 947 -0.001040740740740734 -1352 948 -0.009259259259259264 -1352 1348 -1.951563910473908e-18 -1352 1349 0.0002814814814814731 -1352 1350 -5.204170427930421e-18 -1352 1351 5.421010862427522e-18 -1352 1352 0.008325925925925931 -1352 1353 1.110223024625157e-16 -1352 1354 -5.204170427930421e-18 -1352 1355 0.0002814814814814947 -1352 1356 1.474514954580286e-16 -1353 940 -0.01296296296296293 -1353 941 -0.01342592592592592 -1353 942 -0.1551783264746221 -1353 943 3.642919299551295e-17 -1353 944 -0.02870370370370383 -1353 945 -0.2040466392318248 -1353 946 0.01296296296296293 -1353 947 -0.01342592592592585 -1353 948 -0.1551783264746225 -1353 1348 -0.02407407407407412 -1353 1349 -3.295974604355933e-17 -1353 1350 -0.1063100137174222 -1353 1351 9.71445146547012e-17 -1353 1352 2.255140518769849e-17 -1353 1353 1.241426611796983 -1353 1354 0.02407407407407402 -1353 1355 -1.908195823574488e-17 -1353 1356 -0.1063100137174194 -1354 943 -0.0009703703703703738 -1354 944 -0.0005000000000000014 -1354 945 -0.008333333333333333 -1354 946 -0.0002814814814814783 -1354 947 1.409462824231156e-18 -1354 948 -3.469446951953614e-18 -1354 949 -0.0009703703703703718 -1354 950 0.0005 -1354 951 0.008333333333333335 -1354 1351 -0.001659259259259244 -1354 1352 -5.204170427930421e-18 -1354 1353 -0.03333333333333332 -1354 1354 0.007762962962962964 -1354 1355 5.204170427930421e-18 -1354 1356 -3.469446951953614e-18 -1354 1357 -0.001659259259259278 -1354 1359 0.03333333333333333 -1355 943 -0.0005000000000000013 -1355 944 -0.001040740740740751 -1355 945 -0.009259259259259339 -1355 946 1.409462824231156e-18 -1355 947 -0.002362962962962959 -1355 948 -0.03703703703703707 -1355 949 0.0004999999999999999 -1355 950 -0.001040740740740738 -1355 951 -0.009259259259259184 -1355 1351 -5.421010862427522e-18 -1355 1352 0.0002814814814814946 -1355 1353 -1.474514954580286e-16 -1355 1354 5.312590645178972e-18 -1355 1355 0.008325925925925924 -1355 1356 -2.081668171172169e-16 -1355 1357 1.084202172485504e-19 -1355 1358 0.0002814814814814651 -1355 1359 9.540979117872439e-17 -1356 943 -0.01296296296296304 -1356 944 -0.01342592592592609 -1356 945 -0.1551783264746245 -1356 946 9.8879238130678e-17 -1356 947 -0.02870370370370345 -1356 948 -0.2040466392318239 -1356 949 0.01296296296296295 -1356 950 -0.01342592592592595 -1356 951 -0.1551783264746221 -1356 1351 -0.02407407407407403 -1356 1352 1.561251128379126e-17 -1356 1353 -0.1063100137174194 -1356 1354 -7.112366251504909e-17 -1356 1355 -5.898059818321144e-17 -1356 1356 1.241426611796982 -1356 1357 0.02407407407407409 -1356 1358 1.040834085586084e-17 -1356 1359 -0.1063100137174235 -1357 946 -0.0009703703703703719 -1357 947 -0.0005 -1357 948 -0.008333333333333333 -1357 949 -0.0002814814814814836 -1357 950 4.336808689942018e-19 -1357 951 -3.469446951953614e-18 -1357 952 -0.0009703703703703671 -1357 953 0.0004999999999999996 -1357 954 0.008333333333333335 -1357 1354 -0.001659259259259278 -1357 1356 -0.03333333333333331 -1357 1357 0.007762962962962959 -1357 1358 4.011548038196366e-18 -1357 1359 -6.938893903907228e-18 -1357 1360 -0.001659259259259233 -1357 1361 -4.011548038196366e-18 -1357 1362 0.03333333333333332 -1358 946 -0.0005 -1358 947 -0.001040740740740738 -1358 948 -0.009259259259259182 -1358 949 3.252606517456513e-19 -1358 950 -0.002362962962962966 -1358 951 -0.0370370370370371 -1358 952 0.0004999999999999996 -1358 953 -0.001040740740740742 -1358 954 -0.009259259259259321 -1358 1354 -1.084202172485504e-19 -1358 1355 0.0002814814814814651 -1358 1356 9.540979117872439e-17 -1358 1357 3.903127820947816e-18 -1358 1358 0.008325925925925926 -1358 1359 -7.28583859910259e-17 -1358 1360 -3.903127820947816e-18 -1358 1361 0.0002814814814815055 -1358 1362 1.43982048506075e-16 -1359 946 -0.01296296296296295 -1359 947 -0.01342592592592594 -1359 948 -0.1551783264746221 -1359 949 -1.908195823574488e-17 -1359 950 -0.02870370370370367 -1359 951 -0.2040466392318248 -1359 952 0.01296296296296297 -1359 953 -0.01342592592592597 -1359 954 -0.1551783264746233 -1359 1354 -0.02407407407407409 -1359 1355 1.734723475976807e-18 -1359 1356 -0.1063100137174235 -1359 1357 1.006139616066548e-16 -1359 1358 -5.204170427930421e-18 -1359 1359 1.241426611796981 -1359 1360 0.024074074074074 -1359 1361 4.683753385137379e-17 -1359 1362 -0.1063100137174175 -1360 949 -0.0009703703703703695 -1360 950 -0.0005000000000000003 -1360 951 -0.008333333333333331 -1360 952 -0.0002814814814814786 -1360 953 7.589415207398531e-19 -1360 954 -1.734723475976807e-18 -1360 955 -0.0009703703703703717 -1360 956 0.0004999999999999996 -1360 957 0.008333333333333335 -1360 1357 -0.001659259259259233 -1360 1358 -3.903127820947816e-18 -1360 1359 -0.03333333333333331 -1360 1360 0.007762962962962965 -1360 1361 8.348356728138384e-18 -1360 1363 -0.001659259259259288 -1360 1364 -4.77048955893622e-18 -1360 1365 0.03333333333333333 -1361 949 -0.0005000000000000002 -1361 950 -0.001040740740740747 -1361 951 -0.009259259259259342 -1361 952 8.673617379884035e-19 -1361 953 -0.002362962962962959 -1361 954 -0.037037037037037 -1361 955 0.0004999999999999996 -1361 956 -0.001040740740740734 -1361 957 -0.009259259259259175 -1361 1357 -4.011548038196366e-18 -1361 1358 0.0002814814814815053 -1361 1359 -7.806255641895632e-17 -1361 1360 8.348356728138384e-18 -1361 1361 0.008325925925925924 -1361 1362 7.28583859910259e-17 -1361 1363 -4.662069341687669e-18 -1361 1364 0.0002814814814814555 -1361 1365 7.459310946700271e-17 -1362 949 -0.012962962962963 -1362 950 -0.01342592592592603 -1362 951 -0.1551783264746238 -1362 952 5.898059818321144e-17 -1362 953 -0.02870370370370368 -1362 954 -0.2040466392318239 -1362 955 0.01296296296296293 -1362 956 -0.01342592592592578 -1362 957 -0.1551783264746218 -1362 1357 -0.02407407407407411 -1362 1358 7.632783294297951e-17 -1362 1359 -0.1063100137174175 -1362 1360 1.387778780781446e-16 -1362 1361 -1.214306433183765e-17 -1362 1362 1.241426611796983 -1362 1363 0.02407407407407399 -1362 1364 -8.153200337090993e-17 -1362 1365 -0.1063100137174252 -1363 952 -0.0009703703703703738 -1363 953 -0.0005000000000000003 -1363 954 -0.008333333333333333 -1363 955 -0.0002814814814814744 -1363 956 2.276824562219559e-18 -1363 957 -3.469446951953614e-18 -1363 958 -0.0009703703703703627 -1363 959 0.0004999999999999981 -1363 960 0.008333333333333335 -1363 1360 -0.001659259259259288 -1363 1361 -4.662069341687669e-18 -1363 1362 -0.03333333333333333 -1363 1363 0.007762962962962963 -1363 1364 7.155734338404329e-18 -1363 1365 -3.469446951953614e-18 -1363 1366 -0.001659259259259259 -1363 1367 -2.710505431213761e-18 -1363 1368 0.03333333333333333 -1364 952 -0.0005000000000000004 -1364 953 -0.001040740740740738 -1364 954 -0.009259259259259193 -1364 955 2.38524477946811e-18 -1364 956 -0.002362962962962953 -1364 957 -0.03703703703703694 -1364 958 0.000499999999999998 -1364 959 -0.00104074074074073 -1364 960 -0.009259259259259228 -1364 1360 -4.77048955893622e-18 -1364 1361 0.0002814814814814555 -1364 1362 -1.856154119295184e-16 -1364 1363 7.155734338404329e-18 -1364 1364 0.008325925925925902 -1364 1365 -3.816391647148976e-17 -1364 1366 -2.49366499671666e-18 -1364 1367 0.0002814814814814757 -1364 1368 5.551115123125783e-17 -1365 952 -0.01296296296296296 -1365 953 -0.01342592592592584 -1365 954 -0.1551783264746223 -1365 955 9.8879238130678e-17 -1365 956 -0.02870370370370369 -1365 957 -0.2040466392318228 -1365 958 0.01296296296296286 -1365 959 -0.01342592592592586 -1365 960 -0.1551783264746213 -1365 1360 -0.02407407407407413 -1365 1361 -6.591949208711867e-17 -1365 1362 -0.1063100137174252 -1365 1363 -3.122502256758253e-17 -1365 1364 6.591949208711867e-17 -1365 1365 1.241426611796979 -1365 1366 0.02407407407407417 -1365 1367 6.418476861114186e-17 -1365 1368 -0.1063100137174214 -1366 955 -0.0009703703703703759 -1366 956 -0.000500000000000002 -1366 957 -0.008333333333333331 -1366 958 -0.000281481481481492 -1366 959 3.144186300207963e-18 -1366 960 -1.387778780781446e-17 -1366 961 -0.0009703703703703635 -1366 962 0.0004999999999999983 -1366 963 0.008333333333333337 -1366 1363 -0.001659259259259259 -1366 1364 -2.49366499671666e-18 -1366 1365 -0.03333333333333333 -1366 1366 0.007762962962962961 -1366 1367 6.938893903907228e-18 -1366 1369 -0.001659259259259236 -1366 1370 -3.577867169202165e-18 -1366 1371 0.03333333333333334 -1367 955 -0.000500000000000002 -1367 956 -0.001040740740740756 -1367 957 -0.00925925925925934 -1367 958 3.361026734705064e-18 -1367 959 -0.002362962962962977 -1367 960 -0.0370370370370372 -1367 961 0.0004999999999999983 -1367 962 -0.00104074074074073 -1367 963 -0.009259259259259241 -1367 1363 -2.710505431213761e-18 -1367 1364 0.0002814814814814757 -1367 1365 -9.367506770274758e-17 -1367 1366 7.047314121155779e-18 -1367 1367 0.008325925925925954 -1367 1368 -3.469446951953614e-18 -1367 1369 -3.794707603699266e-18 -1367 1370 0.0002814814814815044 -1367 1371 1.387778780781446e-16 -1368 955 -0.01296296296296303 -1368 956 -0.01342592592592622 -1368 957 -0.1551783264746244 -1368 958 1.110223024625157e-16 -1368 959 -0.02870370370370382 -1368 960 -0.2040466392318263 -1368 961 0.01296296296296291 -1368 962 -0.01342592592592575 -1368 963 -0.1551783264746215 -1368 1363 -0.02407407407407396 -1368 1364 7.806255641895632e-17 -1368 1365 -0.1063100137174214 -1368 1366 -1.665334536937735e-16 -1368 1367 3.469446951953614e-17 -1368 1368 1.241426611796985 -1368 1369 0.02407407407407412 -1368 1370 -9.8879238130678e-17 -1368 1371 -0.1063100137174178 -1369 958 -0.0009703703703703765 -1369 959 -0.0005000000000000019 -1369 960 -0.008333333333333342 -1369 961 -0.0002814814814814659 -1369 962 1.409462824231156e-18 -1369 963 3.469446951953614e-18 -1369 964 -0.0009703703703703751 -1369 965 0.0005000000000000006 -1369 966 0.008333333333333347 -1369 1366 -0.001659259259259236 -1369 1367 -3.794707603699266e-18 -1369 1368 -0.03333333333333333 -1369 1369 0.007762962962962968 -1369 1370 2.927345865710862e-18 -1369 1371 1.040834085586084e-17 -1369 1372 -0.001659259259259292 -1369 1373 1.084202172485504e-18 -1369 1374 0.03333333333333333 -1370 958 -0.0005000000000000019 -1370 959 -0.001040740740740753 -1370 960 -0.009259259259259335 -1370 961 1.192622389734055e-18 -1370 962 -0.002362962962962943 -1370 963 -0.03703703703703691 -1370 964 0.0005000000000000004 -1370 965 -0.001040740740740738 -1370 966 -0.009259259259259182 -1370 1366 -3.577867169202165e-18 -1370 1367 0.0002814814814815043 -1370 1368 -7.979727989493313e-17 -1370 1369 3.035766082959412e-18 -1370 1370 0.008325925925925921 -1370 1371 2.42861286636753e-17 -1370 1372 1.301042606982605e-18 -1370 1373 0.0002814814814814531 -1370 1374 -4.683753385137379e-17 -1371 958 -0.01296296296296307 -1371 959 -0.01342592592592606 -1371 960 -0.1551783264746243 -1371 961 9.020562075079397e-17 -1371 962 -0.02870370370370342 -1371 963 -0.2040466392318213 -1371 964 0.01296296296296297 -1371 965 -0.01342592592592587 -1371 966 -0.1551783264746224 -1371 1366 -0.02407407407407402 -1371 1367 -4.510281037539698e-17 -1371 1368 -0.1063100137174179 -1371 1369 -1.110223024625157e-16 -1371 1370 -1.43982048506075e-16 -1371 1371 1.241426611796981 -1371 1372 0.02407407407407412 -1371 1373 8.673617379884035e-18 -1371 1374 -0.1063100137174254 -1372 961 -0.000970370370370371 -1372 962 -0.0004999999999999996 -1372 963 -0.00833333333333334 -1372 964 -0.0002814814814814809 -1372 965 -6.505213034913027e-19 -1372 966 6.938893903907228e-18 -1372 967 -0.0009703703703703704 -1372 968 0.0005000000000000007 -1372 969 0.008333333333333335 -1372 1369 -0.001659259259259292 -1372 1370 1.301042606982605e-18 -1372 1371 -0.03333333333333335 -1372 1372 0.007762962962962963 -1372 1373 -4.445228907190568e-18 -1372 1374 -6.938893903907228e-18 -1372 1375 -0.001659259259259225 -1372 1376 2.602085213965211e-18 -1372 1377 0.03333333333333332 -1373 961 -0.0004999999999999995 -1373 962 -0.001040740740740733 -1373 963 -0.009259259259259163 -1373 964 -4.336808689942018e-19 -1373 965 -0.002362962962962962 -1373 966 -0.03703703703703702 -1373 967 0.0005000000000000007 -1373 968 -0.00104074074074075 -1373 969 -0.009259259259259375 -1373 1369 1.084202172485504e-18 -1373 1370 0.0002814814814814531 -1373 1371 2.602085213965211e-17 -1373 1372 -4.553649124439119e-18 -1373 1373 0.008325925925925928 -1373 1374 6.938893903907228e-18 -1373 1375 2.710505431213761e-18 -1373 1376 0.0002814814814815108 -1373 1377 -1.370431546021678e-16 -1374 961 -0.01296296296296293 -1374 962 -0.0134259259259258 -1374 963 -0.1551783264746217 -1374 964 -6.938893903907228e-17 -1374 965 -0.02870370370370374 -1374 966 -0.2040466392318244 -1374 967 0.01296296296296301 -1374 968 -0.01342592592592603 -1374 969 -0.1551783264746241 -1374 1369 -0.02407407407407411 -1374 1370 -1.908195823574488e-17 -1374 1371 -0.1063100137174254 -1374 1372 8.153200337090993e-17 -1374 1373 3.295974604355933e-17 -1374 1374 1.241426611796983 -1374 1375 0.02407407407407402 -1374 1376 1.387778780781446e-17 -1374 1377 -0.1063100137174166 -1375 964 -0.0009703703703703656 -1375 965 -0.0004999999999999993 -1375 966 -0.008333333333333331 -1375 967 -0.0002814814814814972 -1375 968 1.517883041479706e-18 -1375 969 -1.387778780781446e-17 -1375 970 -0.0009703703703703605 -1375 971 0.0004999999999999972 -1375 972 0.008333333333333335 -1375 1372 -0.001659259259259225 -1375 1373 2.602085213965211e-18 -1375 1374 -0.03333333333333331 -1375 1375 0.007762962962962948 -1375 1376 3.144186300207963e-18 -1375 1378 -0.001659259259259264 -1375 1379 -5.204170427930421e-18 -1375 1380 0.03333333333333334 -1376 964 -0.0004999999999999995 -1376 965 -0.001040740740740741 -1376 966 -0.009259259259259339 -1376 967 1.626303258728257e-18 -1376 968 -0.002362962962962983 -1376 969 -0.03703703703703719 -1376 970 0.0004999999999999972 -1376 971 -0.001040740740740723 -1376 972 -0.009259259259259226 -1376 1372 2.710505431213761e-18 -1376 1373 0.0002814814814815108 -1376 1374 1.214306433183765e-17 -1376 1375 3.035766082959412e-18 -1376 1376 0.008325925925925929 -1376 1377 2.151057110211241e-16 -1376 1378 -5.204170427930421e-18 -1376 1379 0.0002814814814814785 -1376 1380 1.43982048506075e-16 -1377 964 -0.01296296296296295 -1377 965 -0.01342592592592591 -1377 966 -0.1551783264746231 -1377 967 1.162264728904461e-16 -1377 968 -0.02870370370370427 -1377 969 -0.2040466392318276 -1377 970 0.01296296296296283 -1377 971 -0.01342592592592566 -1377 972 -0.1551783264746206 -1377 1372 -0.02407407407407402 -1377 1373 -3.469446951953614e-18 -1377 1374 -0.1063100137174167 -1377 1375 -1.474514954580286e-16 -1377 1376 6.245004513516506e-17 -1377 1377 1.241426611796983 -1377 1378 0.02407407407407418 -1377 1379 1.561251128379126e-17 -1377 1380 -0.1063100137174216 -1378 967 -0.0009703703703703802 -1378 968 -0.0005000000000000028 -1378 969 -0.008333333333333342 -1378 970 -0.0002814814814814647 -1378 971 6.288372600415926e-18 -1378 972 5.204170427930421e-18 -1378 973 -0.0009703703703703619 -1378 974 0.0004999999999999965 -1378 975 0.008333333333333347 -1378 1375 -0.001659259259259264 -1378 1376 -5.204170427930421e-18 -1378 1377 -0.03333333333333333 -1378 1378 0.007762962962962975 -1378 1379 9.432558900623889e-18 -1378 1380 6.938893903907228e-18 -1378 1381 -0.001659259259259293 -1378 1382 -4.228388472693467e-18 -1378 1383 0.03333333333333333 -1379 967 -0.0005000000000000028 -1379 968 -0.001040740740740759 -1379 969 -0.009259259259259373 -1379 970 6.288372600415926e-18 -1379 971 -0.002362962962962941 -1379 972 -0.03703703703703692 -1379 973 0.0004999999999999965 -1379 974 -0.001040740740740712 -1379 975 -0.009259259259259051 -1379 1375 -5.204170427930421e-18 -1379 1376 0.0002814814814814785 -1379 1377 -1.52655665885959e-16 -1379 1378 9.432558900623889e-18 -1379 1379 0.008325925925925905 -1379 1380 5.551115123125783e-17 -1379 1381 -4.119968255444917e-18 -1379 1382 0.000281481481481448 -1379 1383 1.301042606982605e-16 -1380 967 -0.01296296296296307 -1380 968 -0.01342592592592616 -1380 969 -0.155178326474625 -1380 970 2.636779683484747e-16 -1380 971 -0.02870370370370347 -1380 972 -0.204046639231821 -1380 973 0.01296296296296281 -1380 974 -0.01342592592592559 -1380 975 -0.1551783264746193 -1380 1375 -0.02407407407407396 -1380 1376 6.591949208711867e-17 -1380 1377 -0.1063100137174216 -1380 1378 -3.469446951953614e-16 -1380 1379 -1.023486850826316e-16 -1380 1380 1.241426611796979 -1380 1381 0.0240740740740743 -1380 1382 -6.245004513516506e-17 -1380 1383 -0.1063100137174261 -1381 970 -0.0009703703703703843 -1381 971 -0.0005000000000000035 -1381 972 -0.00833333333333334 -1381 973 -0.0002814814814814701 -1381 974 5.963111948670274e-18 -1381 975 8.673617379884035e-18 -1381 976 -0.0009703703703703633 -1381 977 0.0004999999999999981 -1381 978 0.008333333333333337 -1381 1378 -0.001659259259259293 -1381 1379 -4.119968255444917e-18 -1381 1380 -0.03333333333333335 -1381 1381 0.007762962962962972 -1381 1382 5.529431079676073e-18 -1381 1383 -6.938893903907228e-18 -1381 1384 -0.00165925925925924 -1381 1385 -1.951563910473908e-18 -1381 1386 0.03333333333333332 -1382 970 -0.0005000000000000035 -1382 971 -0.001040740740740759 -1382 972 -0.009259259259259254 -1382 973 5.963111948670274e-18 -1382 974 -0.002362962962962948 -1382 975 -0.03703703703703692 -1382 976 0.000499999999999998 -1382 977 -0.001040740740740729 -1382 978 -0.009259259259259228 -1382 1378 -4.228388472693467e-18 -1382 1379 0.000281481481481448 -1382 1380 -9.367506770274758e-17 -1382 1381 5.637851296924623e-18 -1382 1382 0.008325925925925931 -1382 1383 2.081668171172169e-17 -1382 1384 -2.059984127722458e-18 -1382 1385 0.0002814814814815007 -1382 1386 9.367506770274758e-17 -1383 970 -0.01296296296296309 -1383 971 -0.01342592592592622 -1383 972 -0.1551783264746247 -1383 973 2.081668171172169e-16 -1383 974 -0.02870370370370338 -1383 975 -0.204046639231822 -1383 976 0.0129629629629629 -1383 977 -0.01342592592592574 -1383 978 -0.1551783264746213 -1383 1378 -0.02407407407407386 -1383 1379 -6.071532165918825e-17 -1383 1380 -0.1063100137174261 -1383 1381 -3.712308238590367e-16 -1383 1382 -7.632783294297951e-17 -1383 1383 1.241426611796982 -1383 1384 0.02407407407407422 -1383 1385 -3.469446951953614e-18 -1383 1386 -0.1063100137174181 -1384 973 -0.0009703703703703766 -1384 974 -0.0005000000000000021 -1384 975 -0.008333333333333333 -1384 976 -0.0002814814814814822 -1384 977 6.505213034913027e-19 -1384 978 -3.469446951953614e-18 -1384 979 -0.0009703703703703752 -1384 980 0.0005000000000000014 -1384 981 0.008333333333333335 -1384 1381 -0.00165925925925924 -1384 1382 -2.059984127722458e-18 -1384 1383 -0.03333333333333332 -1384 1384 0.007762962962962963 -1384 1385 -3.144186300207963e-18 -1384 1387 -0.001659259259259261 -1384 1388 5.204170427930421e-18 -1384 1389 0.03333333333333333 -1385 973 -0.000500000000000002 -1385 974 -0.001040740740740755 -1385 975 -0.009259259259259339 -1385 976 6.505213034913027e-19 -1385 977 -0.002362962962962964 -1385 978 -0.03703703703703716 -1385 979 0.0005000000000000014 -1385 980 -0.001040740740740749 -1385 981 -0.009259259259259273 -1385 1381 -2.059984127722458e-18 -1385 1382 0.0002814814814815006 -1385 1383 -1.734723475976807e-17 -1385 1384 -3.144186300207963e-18 -1385 1385 0.008325925925925941 -1385 1386 -2.324529457808922e-16 -1385 1387 5.421010862427522e-18 -1385 1388 0.0002814814814814819 -1385 1389 -2.602085213965211e-17 -1386 973 -0.01296296296296307 -1386 974 -0.0134259259259261 -1386 975 -0.1551783264746244 -1386 976 3.122502256758253e-17 -1386 977 -0.02870370370370337 -1386 978 -0.2040466392318246 -1386 979 0.01296296296296304 -1386 980 -0.01342592592592612 -1386 981 -0.1551783264746238 -1386 1381 -0.02407407407407397 -1386 1382 6.938893903907228e-18 -1386 1383 -0.1063100137174181 -1386 1384 -8.500145032286355e-17 -1386 1385 -1.023486850826316e-16 -1386 1386 1.241426611796985 -1386 1387 0.02407407407407405 -1386 1388 -3.642919299551295e-17 -1386 1389 -0.1063100137174214 -1387 976 -0.0009703703703703663 -1387 977 -0.0004999999999999987 -1387 978 -0.008333333333333333 -1387 979 -0.0002814814814814885 -1387 980 -4.119968255444917e-18 -1387 981 -2.602085213965211e-17 -1387 982 -0.0009703703703703736 -1387 983 0.0005000000000000016 -1387 984 0.008333333333333319 -1387 1384 -0.001659259259259261 -1387 1385 5.312590645178972e-18 -1387 1386 -0.03333333333333332 -1387 1387 0.007762962962962958 -1387 1388 -3.903127820947816e-18 -1387 1389 1.040834085586084e-17 -1387 1390 -0.001659259259259228 -1387 1391 7.589415207398531e-19 -1387 1392 0.03333333333333334 -1388 976 -0.0004999999999999986 -1388 977 -0.001040740740740731 -1388 978 -0.0092592592592592 -1388 979 -4.119968255444917e-18 -1388 980 -0.002362962962962973 -1388 981 -0.03703703703703709 -1388 982 0.0005000000000000017 -1388 983 -0.001040740740740756 -1388 984 -0.009259259259259375 -1388 1384 5.204170427930421e-18 -1388 1385 0.0002814814814814818 -1388 1386 2.706168622523819e-16 -1388 1387 -4.119968255444917e-18 -1388 1388 0.008325925925925941 -1388 1389 3.469446951953614e-17 -1388 1390 6.505213034913027e-19 -1388 1391 0.0002814814814815131 -1388 1392 -5.204170427930421e-17 -1389 976 -0.01296296296296293 -1389 977 -0.01342592592592587 -1389 978 -0.1551783264746218 -1389 979 -1.370431546021678e-16 -1389 980 -0.02870370370370383 -1389 981 -0.2040466392318261 -1389 982 0.01296296296296304 -1389 983 -0.01342592592592605 -1389 984 -0.1551783264746248 -1389 1384 -0.02407407407407406 -1389 1385 -6.938893903907228e-17 -1389 1386 -0.1063100137174214 -1389 1387 1.543903893619358e-16 -1389 1388 7.459310946700271e-17 -1389 1389 1.241426611796986 -1389 1390 0.02407407407407391 -1389 1391 3.816391647148976e-17 -1389 1392 -0.1063100137174165 -1390 979 -0.0009703703703703646 -1390 980 -0.0004999999999999985 -1390 981 -0.008333333333333342 -1390 982 -0.0002814814814814795 -1390 983 -3.252606517456513e-18 -1390 984 1.040834085586084e-17 -1390 985 -0.000970370370370379 -1390 986 0.0005000000000000017 -1390 987 0.008333333333333349 -1390 1387 -0.001659259259259228 -1390 1388 6.505213034913027e-19 -1390 1389 -0.03333333333333334 -1390 1390 0.007762962962962957 -1390 1391 7.589415207398531e-19 -1390 1392 2.775557561562891e-17 -1390 1393 -0.001659259259259295 -1390 1394 -1.301042606982605e-18 -1390 1395 0.03333333333333334 -1391 979 -0.0004999999999999985 -1391 980 -0.001040740740740732 -1391 981 -0.009259259259259264 -1391 982 -3.361026734705064e-18 -1391 983 -0.002362962962962961 -1391 984 -0.03703703703703697 -1391 985 0.0005000000000000019 -1391 986 -0.001040740740740747 -1391 987 -0.009259259259259228 -1391 1387 8.673617379884035e-19 -1391 1388 0.0002814814814815131 -1391 1389 -5.377642775528102e-17 -1391 1390 6.505213034913027e-19 -1391 1391 0.008325925925925903 -1391 1392 -6.938893903907228e-17 -1391 1393 -1.409462824231156e-18 -1391 1394 0.0002814814814814487 -1391 1395 4.510281037539698e-17 -1392 979 -0.01296296296296293 -1392 980 -0.01342592592592573 -1392 981 -0.1551783264746222 -1392 982 -7.28583859910259e-17 -1392 983 -0.0287037037037038 -1392 984 -0.2040466392318236 -1392 985 0.01296296296296299 -1392 986 -0.01342592592592603 -1392 987 -0.1551783264746226 -1392 1387 -0.02407407407407423 -1392 1388 8.847089727481716e-17 -1392 1389 -0.1063100137174166 -1392 1390 2.255140518769849e-16 -1392 1391 1.387778780781446e-17 -1392 1392 1.241426611796977 -1392 1393 0.02407407407407401 -1392 1394 8.673617379884035e-18 -1392 1395 -0.1063100137174256 -1393 982 -0.0009703703703703656 -1393 983 -0.0004999999999999985 -1393 984 -0.00833333333333333 -1393 985 -0.0002814814814814677 -1393 986 9.75781955236954e-19 -1393 987 1.908195823574488e-17 -1393 988 -0.0009703703703703666 -1393 989 0.0004999999999999987 -1393 990 0.008333333333333335 -1393 1390 -0.001659259259259295 -1393 1391 -1.301042606982605e-18 -1393 1392 -0.03333333333333336 -1393 1393 0.007762962962962966 -1393 1394 2.059984127722458e-18 -1393 1395 -2.081668171172169e-17 -1393 1396 -0.001659259259259261 -1393 1397 -2.710505431213761e-18 -1393 1398 0.03333333333333333 -1394 982 -0.0004999999999999983 -1394 983 -0.001040740740740727 -1394 984 -0.009259259259259155 -1394 985 7.589415207398531e-19 -1394 986 -0.002362962962962945 -1394 987 -0.03703703703703683 -1394 988 0.0004999999999999987 -1394 989 -0.001040740740740731 -1394 990 -0.009259259259259228 -1394 1390 -1.301042606982605e-18 -1394 1391 0.0002814814814814487 -1394 1392 6.938893903907228e-18 -1394 1393 2.059984127722458e-18 -1394 1394 0.008325925925925889 -1394 1395 1.700029006457271e-16 -1394 1396 -2.602085213965211e-18 -1394 1397 0.0002814814814814827 -1394 1398 5.724587470723463e-17 -1395 982 -0.01296296296296283 -1395 983 -0.01342592592592576 -1395 984 -0.15517832647462 -1395 985 -3.122502256758253e-17 -1395 986 -0.02870370370370372 -1395 987 -0.2040466392318211 -1395 988 0.01296296296296289 -1395 989 -0.01342592592592571 -1395 990 -0.1551783264746217 -1395 1390 -0.02407407407407425 -1395 1391 -3.816391647148976e-17 -1395 1392 -0.1063100137174256 -1395 1393 1.630640067418199e-16 -1395 1394 -5.551115123125783e-17 -1395 1395 1.241426611796975 -1395 1396 0.02407407407407408 -1395 1397 -2.949029909160572e-17 -1395 1398 -0.1063100137174211 -1396 985 -0.0009703703703703756 -1396 986 -0.0005000000000000013 -1396 987 -0.008333333333333333 -1396 988 -0.0002814814814814867 -1396 989 2.059984127722458e-18 -1396 990 -1.561251128379126e-17 -1396 991 -0.0009703703703703647 -1396 992 0.0004999999999999987 -1396 993 0.008333333333333335 -1396 1393 -0.001659259259259261 -1396 1394 -2.710505431213761e-18 -1396 1395 -0.03333333333333332 -1396 1396 0.007762962962962964 -1396 1397 3.794707603699266e-18 -1396 1398 -3.469446951953614e-18 -1396 1399 -0.001659259259259255 -1396 1400 -5.421010862427522e-19 -1396 1401 0.03333333333333333 -1397 985 -0.0005000000000000013 -1397 986 -0.001040740740740749 -1397 987 -0.0092592592592593 -1397 988 1.843143693225358e-18 -1397 989 -0.002362962962962969 -1397 990 -0.03703703703703715 -1397 991 0.0004999999999999988 -1397 992 -0.001040740740740736 -1397 993 -0.009259259259259285 -1397 1393 -2.710505431213761e-18 -1397 1394 0.0002814814814814827 -1397 1395 -9.020562075079397e-17 -1397 1396 3.794707603699266e-18 -1397 1397 0.008325925925925933 -1397 1398 -7.979727989493313e-17 -1397 1399 -5.421010862427522e-19 -1397 1400 0.0002814814814814836 -1397 1401 -2.081668171172169e-17 -1398 985 -0.012962962962963 -1398 986 -0.01342592592592595 -1398 987 -0.1551783264746238 -1398 988 5.551115123125783e-17 -1398 989 -0.02870370370370374 -1398 990 -0.2040466392318258 -1398 991 0.01296296296296293 -1398 992 -0.01342592592592592 -1398 993 -0.1551783264746226 -1398 1393 -0.02407407407407396 -1398 1394 -1.387778780781446e-17 -1398 1395 -0.1063100137174211 -1398 1396 -1.595945597898663e-16 -1398 1397 3.469446951953614e-17 -1398 1398 1.241426611796984 -1398 1399 0.02407407407407414 -1398 1400 5.551115123125783e-17 -1398 1401 -0.1063100137174209 -1399 988 -0.0009703703703703734 -1399 989 -0.0005000000000000011 -1399 990 -0.008333333333333342 -1399 991 -0.0002814814814814819 -1399 992 3.903127820947816e-18 -1399 993 5.204170427930421e-18 -1399 994 -0.0009703703703703623 -1399 995 0.0004999999999999972 -1399 996 0.008333333333333349 -1399 1396 -0.001659259259259255 -1399 1397 -4.336808689942018e-19 -1399 1398 -0.03333333333333333 -1399 1399 0.007762962962962965 -1399 1400 4.553649124439119e-18 -1399 1401 1.734723475976807e-17 -1399 1402 -0.001659259259259266 -1399 1403 -4.119968255444917e-18 -1399 1404 0.03333333333333333 -1400 988 -0.0005000000000000011 -1400 989 -0.00104074074074075 -1400 990 -0.009259259259259342 -1400 991 4.119968255444917e-18 -1400 992 -0.002362962962962964 -1400 993 -0.03703703703703711 -1400 994 0.0004999999999999973 -1400 995 -0.00104074074074072 -1400 996 -0.009259259259259155 -1400 1396 -6.505213034913027e-19 -1400 1397 0.0002814814814814837 -1400 1398 -5.898059818321144e-17 -1400 1399 4.662069341687669e-18 -1400 1400 0.008325925925925931 -1400 1401 8.673617379884035e-17 -1400 1402 -4.228388472693467e-18 -1400 1403 0.0002814814814814745 -1400 1404 1.318389841742373e-16 -1401 988 -0.01296296296296304 -1401 989 -0.01342592592592612 -1401 990 -0.1551783264746244 -1401 991 1.97758476261356e-16 -1401 992 -0.02870370370370386 -1401 993 -0.2040466392318246 -1401 994 0.01296296296296284 -1401 995 -0.01342592592592566 -1401 996 -0.1551783264746199 -1401 1396 -0.024074074074074 -1401 1397 7.979727989493313e-17 -1401 1398 -0.1063100137174209 -1401 1399 -2.550043509685906e-16 -1401 1400 3.122502256758253e-17 -1401 1401 1.241426611796983 -1401 1402 0.02407407407407425 -1401 1403 -6.418476861114186e-17 -1401 1404 -0.106310013717422 -1402 991 -0.0009703703703703803 -1402 992 -0.0005000000000000028 -1402 993 -0.00833333333333334 -1402 994 -0.0002814814814814702 -1402 995 4.662069341687669e-18 -1402 996 6.938893903907228e-18 -1402 997 -0.0009703703703703672 -1402 998 0.0004999999999999987 -1402 999 0.008333333333333335 -1402 1399 -0.001659259259259266 -1402 1400 -4.228388472693467e-18 -1402 1401 -0.03333333333333335 -1402 1402 0.007762962962962961 -1402 1403 4.336808689942018e-19 -1402 1404 -6.938893903907228e-18 -1402 1405 -0.00165925925925926 -1402 1406 3.252606517456513e-18 -1402 1407 0.03333333333333332 -1403 991 -0.0005000000000000028 -1403 992 -0.001040740740740759 -1403 993 -0.009259259259259321 -1403 994 4.553649124439119e-18 -1403 995 -0.002362962962962948 -1403 996 -0.03703703703703691 -1403 997 0.0004999999999999987 -1403 998 -0.001040740740740729 -1403 999 -0.009259259259259182 -1403 1399 -4.119968255444917e-18 -1403 1400 0.0002814814814814744 -1403 1401 -9.194034422677078e-17 -1403 1402 3.252606517456513e-19 -1403 1403 0.008325925925925909 -1403 1404 -8.673617379884035e-17 -1403 1405 3.361026734705064e-18 -1403 1406 0.0002814814814814876 -1403 1407 -3.816391647148976e-17 -1404 991 -0.01296296296296307 -1404 992 -0.01342592592592617 -1404 993 -0.1551783264746243 -1404 994 1.578598363138894e-16 -1404 995 -0.02870370370370344 -1404 996 -0.204046639231822 -1404 997 0.01296296296296293 -1404 998 -0.01342592592592573 -1404 999 -0.1551783264746217 -1404 1399 -0.02407407407407391 -1404 1400 -6.071532165918825e-17 -1404 1401 -0.106310013717422 -1404 1402 -3.816391647148976e-16 -1404 1403 -1.405126015541214e-16 -1404 1404 1.24142661179698 -1404 1405 0.02407407407407427 -1404 1406 3.469446951953614e-18 -1404 1407 -0.1063100137174208 -1405 994 -0.0009703703703703761 -1405 995 -0.0005000000000000013 -1405 996 -0.008333333333333333 -1405 997 -0.0002814814814814772 -1405 998 -7.589415207398531e-19 -1405 999 -1.734723475976807e-18 -1405 1000 -0.0009703703703703766 -1405 1001 0.0005000000000000021 -1405 1002 0.008333333333333337 -1405 1402 -0.00165925925925926 -1405 1403 3.361026734705064e-18 -1405 1404 -0.03333333333333332 -1405 1405 0.007762962962962969 -1405 1406 -6.071532165918825e-18 -1405 1408 -0.001659259259259232 -1405 1409 2.710505431213761e-18 -1405 1410 0.03333333333333332 -1406 994 -0.0005000000000000013 -1406 995 -0.001040740740740747 -1406 996 -0.009259259259259255 -1406 997 -7.589415207398531e-19 -1406 998 -0.002362962962962957 -1406 999 -0.03703703703703698 -1406 1000 0.000500000000000002 -1406 1001 -0.001040740740740755 -1406 1002 -0.009259259259259359 -1406 1402 3.252606517456513e-18 -1406 1403 0.0002814814814814875 -1406 1404 1.474514954580286e-16 -1406 1405 -5.963111948670274e-18 -1406 1406 0.008325925925925952 -1406 1407 1.769417945496343e-16 -1406 1408 2.710505431213761e-18 -1406 1409 0.0002814814814815105 -1406 1410 -6.418476861114186e-17 -1407 994 -0.01296296296296304 -1407 995 -0.01342592592592597 -1407 996 -0.1551783264746237 -1407 997 -2.081668171172169e-17 -1407 998 -0.02870370370370354 -1407 999 -0.2040466392318235 -1407 1000 0.01296296296296306 -1407 1001 -0.01342592592592603 -1407 1002 -0.1551783264746242 -1407 1402 -0.02407407407407391 -1407 1403 -2.081668171172169e-17 -1407 1404 -0.1063100137174208 -1407 1405 -3.989863994746656e-17 -1407 1406 -1.387778780781446e-16 -1407 1407 1.241426611796986 -1407 1408 0.02407407407407395 -1407 1409 -6.591949208711867e-17 -1407 1410 -0.106310013717417 -1408 997 -0.0009703703703703632 -1408 998 -0.0004999999999999981 -1408 999 -0.008333333333333333 -1408 1000 -0.0002814814814814863 -1408 1001 -3.252606517456513e-18 -1408 1002 -3.469446951953614e-18 -1408 1003 -0.0009703703703703745 -1408 1004 0.0005000000000000013 -1408 1005 0.008333333333333335 -1408 1405 -0.001659259259259232 -1408 1406 2.710505431213761e-18 -1408 1407 -0.03333333333333332 -1408 1408 0.007762962962962953 -1408 1409 -5.312590645178972e-18 -1408 1411 -0.001659259259259267 -1408 1412 2.602085213965211e-18 -1408 1413 0.03333333333333332 -1409 997 -0.000499999999999998 -1409 998 -0.001040740740740729 -1409 999 -0.009259259259259248 -1409 1000 -3.361026734705064e-18 -1409 1001 -0.002362962962962969 -1409 1002 -0.0370370370370371 -1409 1003 0.0005000000000000013 -1409 1004 -0.00104074074074075 -1409 1005 -0.009259259259259316 -1409 1405 2.602085213965211e-18 -1409 1406 0.0002814814814815105 -1409 1407 8.500145032286355e-17 -1409 1408 -5.312590645178972e-18 -1409 1409 0.008325925925925926 -1409 1410 9.71445146547012e-17 -1409 1411 2.710505431213761e-18 -1409 1412 0.0002814814814814741 -1409 1413 -3.642919299551295e-17 -1410 997 -0.0129629629629629 -1410 998 -0.01342592592592567 -1410 999 -0.1551783264746211 -1410 1000 -1.07552855510562e-16 -1410 1001 -0.02870370370370385 -1410 1002 -0.2040466392318252 -1410 1003 0.012962962962963 -1410 1004 -0.01342592592592609 -1410 1005 -0.1551783264746238 -1410 1405 -0.02407407407407417 -1410 1406 -8.500145032286355e-17 -1410 1407 -0.106310013717417 -1410 1408 1.838806884535416e-16 -1410 1409 -1.144917494144693e-16 -1410 1410 1.241426611796981 -1410 1411 0.024074074074074 -1410 1412 5.030698080332741e-17 -1410 1413 -0.106310013717422 -1411 1000 -0.0009703703703703657 -1411 1001 -0.0004999999999999987 -1411 1002 -0.008333333333333333 -1411 1003 -0.0002814814814814868 -1411 1004 -2.168404344971009e-18 -1411 1005 -1.387778780781446e-17 -1411 1006 -0.0009703703703703702 -1411 1007 0.0005000000000000002 -1411 1008 0.008333333333333337 -1411 1408 -0.001659259259259267 -1411 1409 2.710505431213761e-18 -1411 1410 -0.03333333333333332 -1411 1411 0.007762962962962963 -1411 1412 -3.686287386450715e-18 -1411 1413 3.469446951953614e-18 -1411 1414 -0.001659259259259251 -1411 1415 1.517883041479706e-18 -1411 1416 0.03333333333333334 -1412 1000 -0.0004999999999999986 -1412 1001 -0.001040740740740732 -1412 1002 -0.009259259259259241 -1412 1003 -2.059984127722458e-18 -1412 1004 -0.00236296296296297 -1412 1005 -0.03703703703703713 -1412 1006 0.0005000000000000002 -1412 1007 -0.001040740740740744 -1412 1008 -0.009259259259259288 -1412 1408 2.602085213965211e-18 -1412 1409 0.0002814814814814742 -1412 1410 1.110223024625157e-16 -1412 1411 -3.577867169202165e-18 -1412 1412 0.008325925925925929 -1412 1413 -4.163336342344337e-17 -1412 1414 1.626303258728257e-18 -1412 1415 0.0002814814814814886 -1412 1416 -7.979727989493313e-17 -1413 1000 -0.01296296296296289 -1413 1001 -0.01342592592592586 -1413 1002 -0.1551783264746218 -1413 1003 -1.144917494144693e-16 -1413 1004 -0.02870370370370379 -1413 1005 -0.2040466392318258 -1413 1006 0.01296296296296299 -1413 1007 -0.01342592592592597 -1413 1008 -0.1551783264746236 -1413 1408 -0.02407407407407411 -1413 1409 3.816391647148976e-17 -1413 1410 -0.106310013717422 -1413 1411 1.006139616066548e-16 -1413 1412 3.122502256758253e-17 -1413 1413 1.241426611796984 -1413 1414 0.02407407407407403 -1413 1415 1.734723475976807e-18 -1413 1416 -0.1063100137174204 -1414 1003 -0.0009703703703703699 -1414 1004 -0.0004999999999999999 -1414 1005 -0.008333333333333342 -1414 1006 -0.0002814814814814766 -1414 1008 3.469446951953614e-18 -1414 1009 -0.0009703703703703712 -1414 1010 0.0004999999999999998 -1414 1011 0.008333333333333349 -1414 1411 -0.001659259259259251 -1414 1412 1.626303258728257e-18 -1414 1413 -0.03333333333333333 -1414 1414 0.007762962962962962 -1414 1415 -2.710505431213761e-18 -1414 1416 1.387778780781446e-17 -1414 1417 -0.001659259259259266 -1414 1418 1.084202172485504e-18 -1414 1419 0.03333333333333333 -1415 1003 -0.0004999999999999998 -1415 1004 -0.00104074074074074 -1415 1005 -0.009259259259259269 -1415 1007 -0.002362962962962957 -1415 1008 -0.03703703703703701 -1415 1009 0.0004999999999999999 -1415 1010 -0.001040740740740737 -1415 1011 -0.009259259259259228 -1415 1411 1.409462824231156e-18 -1415 1412 0.0002814814814814885 -1415 1413 -6.938893903907228e-18 -1415 1414 -2.818925648462312e-18 -1415 1415 0.008325925925925928 -1415 1416 7.979727989493313e-17 -1415 1417 1.084202172485504e-18 -1415 1418 0.0002814814814814744 -1415 1419 -1.734723475976807e-17 -1416 1003 -0.01296296296296298 -1416 1004 -0.01342592592592593 -1416 1005 -0.1551783264746233 -1416 1006 3.469446951953614e-17 -1416 1007 -0.02870370370370376 -1416 1008 -0.2040466392318236 -1416 1009 0.01296296296296295 -1416 1010 -0.01342592592592589 -1416 1011 -0.155178326474622 -1416 1411 -0.02407407407407403 -1416 1412 1.387778780781446e-17 -1416 1413 -0.1063100137174204 -1416 1414 -1.144917494144693e-16 -1416 1415 -1.387778780781446e-17 -1416 1416 1.241426611796984 -1416 1417 0.02407407407407414 -1416 1418 -4.85722573273506e-17 -1416 1419 -0.106310013717422 -1417 1006 -0.0009703703703703712 -1417 1007 -0.0005000000000000002 -1417 1008 -0.00833333333333334 -1417 1009 -0.0002814814814814852 -1417 1010 3.035766082959412e-18 -1417 1011 -5.204170427930421e-18 -1417 1012 -0.0009703703703703596 -1417 1013 0.0004999999999999972 -1417 1014 0.008333333333333335 -1417 1414 -0.001659259259259266 -1417 1415 1.084202172485504e-18 -1417 1416 -0.03333333333333335 -1417 1417 0.007762962962962947 -1417 1418 -4.553649124439119e-18 -1417 1419 -6.938893903907228e-18 -1417 1420 -0.001659259259259252 -1417 1421 3.469446951953614e-18 -1417 1422 0.03333333333333333 -1418 1006 -0.0005000000000000002 -1418 1007 -0.001040740740740741 -1418 1008 -0.009259259259259247 -1418 1009 2.927345865710862e-18 -1418 1010 -0.002362962962962968 -1418 1011 -0.03703703703703706 -1418 1012 0.0004999999999999972 -1418 1013 -0.001040740740740725 -1418 1014 -0.009259259259259241 -1418 1414 1.084202172485504e-18 -1418 1415 0.0002814814814814742 -1418 1416 5.551115123125783e-17 -1418 1417 -4.553649124439119e-18 -1418 1418 0.008325925925925896 -1418 1419 -1.110223024625157e-16 -1418 1420 3.469446951953614e-18 -1418 1421 0.0002814814814814898 -1418 1422 -1.231653667943533e-16 -1419 1006 -0.01296296296296296 -1419 1007 -0.01342592592592593 -1419 1008 -0.1551783264746223 -1419 1009 1.301042606982605e-16 -1419 1010 -0.02870370370370397 -1419 1011 -0.2040466392318247 -1419 1012 0.01296296296296283 -1419 1013 -0.01342592592592569 -1419 1014 -0.1551783264746207 -1419 1414 -0.02407407407407402 -1419 1415 -7.806255641895632e-17 -1419 1416 -0.106310013717422 -1419 1417 -3.41740524767431e-16 -1419 1418 5.724587470723463e-17 -1419 1419 1.241426611796976 -1419 1420 0.02407407407407436 -1419 1421 7.806255641895632e-17 -1419 1422 -0.1063100137174197 -1420 1009 -0.0009703703703703792 -1420 1010 -0.0005000000000000028 -1420 1011 -0.008333333333333342 -1420 1012 -0.0002814814814814699 -1420 1013 7.697835424647081e-18 -1420 1014 5.204170427930421e-18 -1420 1015 -0.0009703703703703575 -1420 1016 0.0004999999999999952 -1420 1017 0.008333333333333347 -1420 1417 -0.001659259259259252 -1420 1418 3.469446951953614e-18 -1420 1419 -0.03333333333333333 -1420 1420 0.007762962962962965 -1420 1422 1.040834085586084e-17 -1420 1423 -0.001659259259259293 -1420 1424 -3.469446951953614e-18 -1420 1425 0.03333333333333333 -1421 1009 -0.0005000000000000028 -1421 1010 -0.001040740740740761 -1421 1011 -0.009259259259259391 -1421 1012 7.697835424647081e-18 -1421 1013 -0.002362962962962948 -1421 1014 -0.0370370370370369 -1421 1015 0.0004999999999999952 -1421 1016 -0.001040740740740703 -1421 1017 -0.009259259259259033 -1421 1417 3.469446951953614e-18 -1421 1418 0.0002814814814814898 -1421 1419 6.245004513516506e-17 -1421 1421 0.008325925925925896 -1421 1422 7.979727989493313e-17 -1421 1423 -3.577867169202165e-18 -1421 1424 0.0002814814814814518 -1421 1425 7.112366251504909e-17 -1422 1009 -0.01296296296296307 -1422 1010 -0.01342592592592619 -1422 1011 -0.155178326474625 -1422 1012 3.157196726277789e-16 -1422 1013 -0.02870370370370381 -1422 1014 -0.204046639231822 -1422 1015 0.01296296296296275 -1422 1016 -0.0134259259259254 -1422 1017 -0.1551783264746182 -1422 1417 -0.02407407407407378 -1422 1418 7.459310946700271e-17 -1422 1419 -0.1063100137174197 -1422 1420 -6.938893903907228e-16 -1422 1421 1.006139616066548e-16 -1422 1422 1.241426611796977 -1422 1423 0.02407407407407447 -1422 1424 -1.214306433183765e-17 -1422 1425 -0.1063100137174256 -1423 1012 -0.0009703703703703888 -1423 1013 -0.0005000000000000048 -1423 1014 -0.00833333333333334 -1423 1015 -0.0002814814814814701 -1423 1016 7.26415455565288e-18 -1423 1017 8.673617379884035e-18 -1423 1018 -0.0009703703703703633 -1423 1019 0.0004999999999999981 -1423 1020 0.008333333333333337 -1423 1420 -0.001659259259259293 -1423 1421 -3.577867169202165e-18 -1423 1422 -0.03333333333333335 -1423 1423 0.007762962962962979 -1423 1424 5.095750210681871e-18 -1423 1425 -3.469446951953614e-18 -1423 1426 -0.001659259259259238 -1423 1427 -2.059984127722458e-18 -1423 1428 0.03333333333333332 -1424 1012 -0.0005000000000000049 -1424 1013 -0.001040740740740768 -1424 1014 -0.009259259259259311 -1424 1015 7.37257477290143e-18 -1424 1016 -0.002362962962962948 -1424 1017 -0.03703703703703694 -1424 1018 0.000499999999999998 -1424 1019 -0.001040740740740729 -1424 1020 -0.009259259259259228 -1424 1420 -3.469446951953614e-18 -1424 1421 0.0002814814814814518 -1424 1422 -1.127570259384925e-16 -1424 1423 5.204170427930421e-18 -1424 1424 0.008325925925925941 -1424 1425 2.775557561562891e-17 -1424 1426 -2.059984127722458e-18 -1424 1427 0.0002814814814815041 -1424 1428 1.092875789865388e-16 -1425 1012 -0.01296296296296315 -1425 1013 -0.01342592592592627 -1425 1014 -0.1551783264746257 -1425 1015 2.654126918244515e-16 -1425 1016 -0.02870370370370333 -1425 1017 -0.204046639231822 -1425 1018 0.0129629629629629 -1425 1019 -0.01342592592592575 -1425 1020 -0.1551783264746213 -1425 1420 -0.02407407407407376 -1425 1421 -1.040834085586084e-17 -1425 1422 -0.1063100137174256 -1425 1423 -4.666406150377611e-16 -1425 1424 -7.632783294297951e-17 -1425 1425 1.241426611796983 -1425 1426 0.02407407407407421 -1425 1427 -1.214306433183765e-17 -1425 1428 -0.1063100137174177 -1426 1015 -0.0009703703703703766 -1426 1016 -0.0005000000000000021 -1426 1017 -0.008333333333333333 -1426 1018 -0.000281481481481481 -1426 1019 2.059984127722458e-18 -1426 1020 -3.469446951953614e-18 -1426 1021 -0.000970370370370371 -1426 1022 0.0005 -1426 1023 0.008333333333333335 -1426 1423 -0.001659259259259238 -1426 1424 -2.059984127722458e-18 -1426 1425 -0.03333333333333332 -1426 1426 0.007762962962962961 -1426 1427 2.059984127722458e-18 -1426 1429 -0.001659259259259264 -1426 1431 0.03333333333333333 -1427 1015 -0.000500000000000002 -1427 1016 -0.001040740740740755 -1427 1017 -0.009259259259259339 -1427 1018 2.059984127722458e-18 -1427 1019 -0.002362962962962963 -1427 1020 -0.03703703703703707 -1427 1021 0.0005 -1427 1022 -0.00104074074074074 -1427 1023 -0.009259259259259241 -1427 1423 -2.168404344971009e-18 -1427 1424 0.000281481481481504 -1427 1425 -1.734723475976807e-18 -1427 1426 2.059984127722458e-18 -1427 1427 0.008325925925925938 -1427 1428 6.938893903907228e-18 -1427 1429 1.084202172485504e-19 -1427 1430 0.0002814814814814776 -1427 1431 2.602085213965211e-17 -1428 1015 -0.01296296296296307 -1428 1016 -0.0134259259259261 -1428 1017 -0.1551783264746244 -1428 1018 1.231653667943533e-16 -1428 1019 -0.02870370370370356 -1428 1020 -0.2040466392318243 -1428 1021 0.01296296296296295 -1428 1022 -0.0134259259259259 -1428 1023 -0.1551783264746228 -1428 1423 -0.02407407407407397 -1428 1424 -3.469446951953614e-18 -1428 1425 -0.1063100137174177 -1428 1426 -5.204170427930421e-17 -1428 1427 -1.318389841742373e-16 -1428 1428 1.241426611796983 -1428 1429 0.02407407407407403 -1428 1430 -1.734723475976807e-17 -1428 1431 -0.1063100137174217 -1429 1018 -0.000970370370370371 -1429 1019 -0.0005 -1429 1020 -0.008333333333333333 -1429 1021 -0.0002814814814814867 -1429 1022 2.059984127722458e-18 -1429 1023 -1.561251128379126e-17 -1429 1024 -0.0009703703703703604 -1429 1025 0.0004999999999999974 -1429 1026 0.008333333333333335 -1429 1426 -0.001659259259259264 -1429 1428 -0.03333333333333332 -1429 1429 0.00776296296296296 -1429 1430 3.794707603699266e-18 -1429 1431 -3.469446951953614e-18 -1429 1432 -0.001659259259259257 -1429 1433 -3.252606517456513e-18 -1429 1434 0.03333333333333333 -1430 1018 -0.0005 -1430 1019 -0.00104074074074074 -1430 1020 -0.009259259259259241 -1430 1021 1.843143693225358e-18 -1430 1022 -0.002362962962962969 -1430 1023 -0.03703703703703712 -1430 1024 0.0004999999999999975 -1430 1025 -0.001040740740740727 -1430 1026 -0.009259259259259228 -1430 1427 0.0002814814814814776 -1430 1428 2.602085213965211e-17 -1430 1429 3.794707603699266e-18 -1430 1430 0.008325925925925924 -1430 1431 -1.040834085586084e-17 -1430 1432 -3.144186300207963e-18 -1430 1433 0.0002814814814814785 -1430 1434 9.540979117872439e-17 -1431 1018 -0.01296296296296295 -1431 1019 -0.0134259259259259 -1431 1020 -0.1551783264746228 -1431 1021 5.204170427930421e-17 -1431 1022 -0.02870370370370384 -1431 1023 -0.2040466392318258 -1431 1024 0.01296296296296288 -1431 1025 -0.01342592592592587 -1431 1026 -0.1551783264746216 -1431 1426 -0.02407407407407402 -1431 1427 -1.561251128379126e-17 -1431 1428 -0.1063100137174217 -1431 1429 -1.561251128379126e-16 -1431 1430 3.469446951953614e-17 -1431 1431 1.241426611796983 -1431 1432 0.02407407407407419 -1431 1433 5.204170427930421e-17 -1431 1434 -0.1063100137174215 -1432 1021 -0.0009703703703703777 -1432 1022 -0.0005000000000000024 -1432 1023 -0.008333333333333342 -1432 1024 -0.0002814814814814887 -1432 1025 3.577867169202165e-18 -1432 1026 -6.938893903907228e-18 -1432 1027 -0.0009703703703703647 -1432 1028 0.0004999999999999983 -1432 1029 0.008333333333333349 -1432 1429 -0.001659259259259257 -1432 1430 -3.035766082959412e-18 -1432 1431 -0.03333333333333333 -1432 1432 0.007762962962962966 -1432 1433 7.37257477290143e-18 -1432 1434 1.040834085586084e-17 -1432 1435 -0.001659259259259238 -1432 1436 -4.119968255444917e-18 -1432 1437 0.03333333333333335 -1433 1021 -0.0005000000000000024 -1433 1022 -0.001040740740740759 -1433 1023 -0.009259259259259358 -1433 1024 3.577867169202165e-18 -1433 1025 -0.002362962962962972 -1433 1026 -0.03703703703703724 -1433 1027 0.0004999999999999984 -1433 1028 -0.00104074074074073 -1433 1029 -0.009259259259259241 -1433 1429 -3.252606517456513e-18 -1433 1430 0.0002814814814814785 -1433 1431 -9.020562075079397e-17 -1433 1432 7.480994990149981e-18 -1433 1433 0.008325925925925962 -1433 1434 -1.387778780781446e-17 -1433 1435 -4.228388472693467e-18 -1433 1436 0.0002814814814815027 -1433 1437 1.422473250300982e-16 -1434 1021 -0.01296296296296309 -1434 1022 -0.01342592592592631 -1434 1023 -0.1551783264746254 -1434 1024 1.561251128379126e-16 -1434 1025 -0.02870370370370374 -1434 1026 -0.2040466392318263 -1434 1027 0.01296296296296292 -1434 1028 -0.01342592592592576 -1434 1029 -0.1551783264746217 -1434 1429 -0.02407407407407394 -1434 1430 9.194034422677078e-17 -1434 1431 -0.1063100137174215 -1434 1432 -1.89084858881472e-16 -1434 1433 -1.214306433183765e-17 -1434 1434 1.241426611796989 -1434 1435 0.02407407407407415 -1434 1436 -7.112366251504909e-17 -1434 1437 -0.1063100137174181 -1435 1024 -0.0009703703703703759 -1435 1025 -0.0005000000000000017 -1435 1026 -0.008333333333333351 -1435 1027 -0.0002814814814814778 -1435 1028 1.409462824231156e-18 -1435 1029 1.734723475976807e-18 -1435 1030 -0.0009703703703703724 -1435 1031 0.0005000000000000003 -1435 1032 0.008333333333333349 -1435 1432 -0.001659259259259238 -1435 1433 -4.119968255444917e-18 -1435 1434 -0.03333333333333335 -1435 1435 0.007762962962962965 -1435 1436 5.421010862427522e-18 -1435 1437 6.938893903907228e-18 -1435 1438 -0.001659259259259266 -1435 1439 -1.301042606982605e-18 -1435 1440 0.03333333333333335 -1436 1024 -0.0005000000000000016 -1436 1025 -0.001040740740740752 -1436 1026 -0.009259259259259335 -1436 1027 1.409462824231156e-18 -1436 1028 -0.002362962962962958 -1436 1029 -0.03703703703703709 -1436 1030 0.0005000000000000004 -1436 1031 -0.001040740740740742 -1436 1032 -0.009259259259259273 -1436 1432 -4.119968255444917e-18 -1436 1433 0.0002814814814815027 -1436 1434 -7.979727989493313e-17 -1436 1435 5.312590645178972e-18 -1436 1436 0.00832592592592594 -1436 1437 4.85722573273506e-17 -1436 1438 -1.409462824231156e-18 -1436 1439 0.0002814814814814791 -1436 1440 6.418476861114186e-17 -1437 1024 -0.01296296296296307 -1437 1025 -0.01342592592592606 -1437 1026 -0.1551783264746243 -1437 1027 7.632783294297951e-17 -1437 1028 -0.02870370370370359 -1437 1029 -0.204046639231824 -1437 1030 0.01296296296296299 -1437 1031 -0.01342592592592594 -1437 1032 -0.1551783264746232 -1437 1432 -0.02407407407407403 -1437 1433 -6.071532165918825e-17 -1437 1434 -0.1063100137174182 -1437 1435 -2.775557561562891e-17 -1437 1436 -1.387778780781446e-16 -1437 1437 1.241426611796986 -1437 1438 0.02407407407407405 -1437 1439 1.561251128379126e-17 -1437 1440 -0.1063100137174219 -1438 1027 -0.0009703703703703701 -1438 1028 -0.0004999999999999998 -1438 1029 -0.008333333333333351 -1438 1030 -0.0002814814814814711 -1438 1031 4.336808689942018e-19 -1438 1032 1.387778780781446e-17 -1438 1033 -0.0009703703703703712 -1438 1034 0.0004999999999999998 -1438 1035 0.008333333333333349 -1438 1435 -0.001659259259259266 -1438 1436 -1.409462824231156e-18 -1438 1437 -0.03333333333333335 -1438 1438 0.007762962962962972 -1438 1439 6.071532165918825e-18 -1438 1440 1.040834085586084e-17 -1438 1441 -0.001659259259259265 -1438 1442 -4.98732999343332e-18 -1438 1443 0.03333333333333333 -1439 1027 -0.0004999999999999998 -1439 1028 -0.001040740740740737 -1439 1029 -0.009259259259259254 -1439 1030 3.252606517456513e-19 -1439 1031 -0.00236296296296295 -1439 1032 -0.03703703703703698 -1439 1033 0.0004999999999999999 -1439 1034 -0.001040740740740737 -1439 1035 -0.009259259259259228 -1439 1435 -1.192622389734055e-18 -1439 1436 0.0002814814814814791 -1439 1437 -8.673617379884035e-18 -1439 1438 5.854691731421724e-18 -1439 1439 0.008325925925925924 -1439 1440 1.769417945496343e-16 -1439 1441 -4.87890977618477e-18 -1439 1442 0.0002814814814814756 -1439 1443 1.578598363138894e-16 -1440 1027 -0.01296296296296296 -1440 1028 -0.01342592592592588 -1440 1029 -0.1551783264746227 -1440 1030 2.949029909160572e-17 -1440 1031 -0.02870370370370363 -1440 1032 -0.2040466392318223 -1440 1033 0.01296296296296295 -1440 1034 -0.01342592592592589 -1440 1035 -0.155178326474622 -1440 1435 -0.02407407407407416 -1440 1436 3.642919299551295e-17 -1440 1437 -0.1063100137174219 -1440 1438 1.249000902703301e-16 -1440 1439 -1.058181320345852e-16 -1440 1440 1.241426611796982 -1440 1441 0.02407407407407402 -1440 1442 -6.591949208711867e-17 -1440 1443 -0.1063100137174218 -1441 1030 -0.0009703703703703712 -1441 1031 -0.0005000000000000002 -1441 1032 -0.00833333333333334 -1441 1033 -0.0002814814814814743 -1441 1034 7.589415207398531e-19 -1441 1035 6.938893903907228e-18 -1441 1036 -0.000970370370370371 -1441 1037 0.0005 -1441 1038 0.008333333333333335 -1441 1438 -0.001659259259259265 -1441 1439 -4.87890977618477e-18 -1441 1440 -0.03333333333333335 -1441 1441 0.007762962962962965 -1441 1442 4.445228907190568e-18 -1441 1443 -6.938893903907228e-18 -1441 1444 -0.001659259259259266 -1441 1445 -1.084202172485504e-19 -1441 1446 0.03333333333333332 -1442 1030 -0.0005000000000000002 -1442 1031 -0.001040740740740741 -1442 1032 -0.009259259259259247 -1442 1033 6.505213034913027e-19 -1442 1034 -0.002362962962962953 -1442 1035 -0.03703703703703694 -1442 1036 0.0005 -1442 1037 -0.00104074074074074 -1442 1038 -0.009259259259259285 -1442 1438 -4.87890977618477e-18 -1442 1439 0.0002814814814814756 -1442 1440 -1.006139616066548e-16 -1442 1441 4.445228907190568e-18 -1442 1442 0.008325925925925919 -1442 1443 1.595945597898663e-16 -1442 1445 0.000281481481481476 -1442 1446 -1.595945597898663e-16 -1443 1030 -0.01296296296296296 -1443 1031 -0.01342592592592593 -1443 1032 -0.1551783264746223 -1443 1033 2.42861286636753e-17 -1443 1034 -0.02870370370370369 -1443 1035 -0.2040466392318224 -1443 1036 0.01296296296296294 -1443 1037 -0.01342592592592576 -1443 1038 -0.1551783264746222 -1443 1438 -0.02407407407407414 -1443 1439 -5.724587470723463e-17 -1443 1440 -0.1063100137174218 -1443 1441 4.336808689942018e-17 -1443 1442 -8.500145032286355e-17 -1443 1443 1.241426611796978 -1443 1444 0.02407407407407409 -1443 1445 -2.42861286636753e-17 -1443 1446 -0.1063100137174217 -1444 1033 -0.000970370370370371 -1444 1034 -0.0005 -1444 1035 -0.008333333333333333 -1444 1036 -0.0002814814814814639 -1444 1037 1.084202172485504e-18 -1444 1038 -1.734723475976807e-18 -1444 1039 -0.0009703703703703693 -1444 1040 0.0004999999999999989 -1444 1041 0.008333333333333335 -1444 1441 -0.001659259259259266 -1444 1443 -0.03333333333333332 -1444 1444 0.007762962962962974 -1444 1445 3.903127820947816e-18 -1444 1447 -0.001659259259259291 -1444 1448 -3.903127820947816e-18 -1444 1449 0.03333333333333332 -1445 1033 -0.0005 -1445 1034 -0.00104074074074074 -1445 1035 -0.009259259259259285 -1445 1036 1.084202172485504e-18 -1445 1037 -0.00236296296296294 -1445 1038 -0.03703703703703672 -1445 1039 0.0004999999999999989 -1445 1040 -0.001040740740740729 -1445 1041 -0.009259259259259167 -1445 1441 -1.084202172485504e-19 -1445 1442 0.000281481481481476 -1445 1443 -1.595945597898663e-16 -1445 1444 3.903127820947816e-18 -1445 1445 0.008325925925925903 -1445 1446 4.336808689942018e-16 -1445 1447 -4.011548038196366e-18 -1445 1448 0.0002814814814814546 -1445 1449 1.561251128379126e-17 -1446 1033 -0.01296296296296295 -1446 1034 -0.01342592592592576 -1446 1035 -0.1551783264746222 -1446 1036 4.510281037539698e-17 -1446 1037 -0.02870370370370372 -1446 1038 -0.2040466392318205 -1446 1039 0.0129629629629629 -1446 1040 -0.01342592592592568 -1446 1041 -0.1551783264746213 -1446 1441 -0.02407407407407409 -1446 1442 -2.255140518769849e-17 -1446 1443 -0.1063100137174217 -1446 1445 -1.387778780781446e-17 -1446 1446 1.241426611796977 -1446 1447 0.02407407407407409 -1446 1448 -2.255140518769849e-17 -1446 1449 -0.1063100137174252 -1447 1036 -0.0009703703703703761 -1447 1037 -0.000500000000000001 -1447 1038 -0.008333333333333333 -1447 1039 -0.0002814814814814636 -1447 1040 -9.75781955236954e-19 -1447 1041 -1.734723475976807e-18 -1447 1042 -0.0009703703703703777 -1447 1043 0.000500000000000002 -1447 1044 0.008333333333333335 -1447 1444 -0.001659259259259291 -1447 1445 -4.011548038196366e-18 -1447 1446 -0.03333333333333332 -1447 1447 0.007762962962962975 -1447 1448 -4.011548038196366e-18 -1447 1450 -0.001659259259259266 -1447 1451 7.806255641895632e-18 -1447 1452 0.03333333333333333 -1448 1036 -0.0005000000000000011 -1448 1037 -0.001040740740740743 -1448 1038 -0.009259259259259222 -1448 1039 -9.75781955236954e-19 -1448 1040 -0.002362962962962939 -1448 1041 -0.03703703703703688 -1448 1042 0.0005000000000000021 -1448 1043 -0.001040740740740753 -1448 1044 -0.009259259259259287 -1448 1444 -3.903127820947816e-18 -1448 1445 0.0002814814814814546 -1448 1446 -2.0643209364124e-16 -1448 1447 -4.011548038196366e-18 -1448 1448 0.008325925925925903 -1448 1449 -2.255140518769849e-16 -1448 1450 7.806255641895632e-18 -1448 1451 0.0002814814814814755 -1448 1452 -1.682681771697503e-16 -1449 1036 -0.01296296296296299 -1449 1037 -0.01342592592592586 -1449 1038 -0.1551783264746228 -1449 1039 -4.163336342344337e-17 -1449 1040 -0.02870370370370319 -1449 1041 -0.2040466392318205 -1449 1042 0.01296296296296303 -1449 1043 -0.01342592592592611 -1449 1044 -0.1551783264746237 -1449 1444 -0.02407407407407409 -1449 1445 -3.469446951953614e-18 -1449 1446 -0.1063100137174252 -1449 1447 5.204170427930421e-18 -1449 1448 -8.326672684688674e-17 -1449 1449 1.241426611796977 -1449 1450 0.02407407407407409 -1449 1451 2.42861286636753e-17 -1449 1452 -0.1063100137174217 -1450 1039 -0.0009703703703703645 -1450 1040 -0.000499999999999998 -1450 1041 -0.008333333333333333 -1450 1042 -0.0002814814814815042 -1450 1043 -3.144186300207963e-18 -1450 1044 -1.734723475976807e-18 -1450 1045 -0.0009703703703703693 -1450 1046 0.0005000000000000011 -1450 1047 0.008333333333333335 -1450 1447 -0.001659259259259266 -1450 1448 7.806255641895632e-18 -1450 1449 -0.03333333333333332 -1450 1450 0.007762962962962956 -1450 1451 -4.011548038196366e-18 -1450 1452 -3.469446951953614e-18 -1450 1453 -0.001659259259259204 -1450 1454 -4.119968255444917e-18 -1450 1455 0.03333333333333333 -1451 1039 -0.000499999999999998 -1451 1040 -0.001040740740740726 -1451 1041 -0.009259259259259175 -1451 1042 -3.144186300207963e-18 -1451 1043 -0.002362962962962993 -1451 1044 -0.03703703703703731 -1451 1045 0.0005000000000000009 -1451 1046 -0.001040740740740756 -1451 1047 -0.009259259259259479 -1451 1447 7.806255641895632e-18 -1451 1448 0.0002814814814814757 -1451 1449 2.758210326803123e-16 -1451 1450 -4.011548038196366e-18 -1451 1451 0.008325925925925966 -1451 1452 1.873501354054952e-16 -1451 1453 -3.903127820947816e-18 -1451 1454 0.0002814814814815289 -1451 1455 1.734723475976807e-17 -1452 1039 -0.01296296296296286 -1452 1040 -0.01342592592592575 -1452 1041 -0.1551783264746206 -1452 1042 -1.994931997373328e-16 -1452 1043 -0.02870370370370416 -1452 1044 -0.2040466392318293 -1452 1045 0.01296296296296306 -1452 1046 -0.01342592592592612 -1452 1047 -0.1551783264746258 -1452 1447 -0.0240740740740741 -1452 1448 -3.469446951953614e-17 -1452 1449 -0.1063100137174217 -1452 1450 2.445960101127298e-16 -1452 1451 1.110223024625157e-16 -1452 1452 1.241426611796988 -1452 1453 0.02407407407407386 -1452 1454 1.006139616066548e-16 -1452 1455 -0.1063100137174142 -1453 1042 -0.0009703703703703625 -1453 1043 -0.0004999999999999989 -1453 1044 -0.008333333333333333 -1453 1045 -0.0002814814814814932 -1453 1046 -1.734723475976807e-18 -1453 1047 -1.734723475976807e-18 -1453 1048 -0.0009703703703703748 -1453 1049 0.0005000000000000007 -1453 1050 0.008333333333333335 -1453 1450 -0.001659259259259205 -1453 1451 -3.903127820947816e-18 -1453 1452 -0.03333333333333333 -1453 1453 0.007762962962962963 -1453 1454 1.322726650432315e-17 -1453 1455 -6.938893903907228e-18 -1453 1456 -0.001659259259259293 -1453 1457 -9.324138683375338e-18 -1453 1458 0.03333333333333333 -1454 1042 -0.0004999999999999989 -1454 1043 -0.001040740740740743 -1454 1044 -0.009259259259259424 -1454 1045 -1.409462824231156e-18 -1454 1046 -0.002362962962962978 -1454 1047 -0.03703703703703717 -1454 1048 0.0005000000000000007 -1454 1049 -0.001040740740740741 -1454 1050 -0.009259259259259196 -1454 1450 -4.119968255444917e-18 -1454 1451 0.000281481481481529 -1454 1452 -2.029626466892864e-16 -1454 1453 1.31188462870746e-17 -1454 1454 0.008325925925925952 -1454 1455 1.838806884535416e-16 -1454 1456 -9.215718466126788e-18 -1454 1457 0.0002814814814814493 -1454 1458 1.786765180256111e-16 -1455 1042 -0.01296296296296298 -1455 1043 -0.01342592592592594 -1455 1044 -0.1551783264746243 -1455 1045 8.673617379884035e-18 -1455 1046 -0.02870370370370399 -1455 1047 -0.2040466392318274 -1455 1048 0.01296296296296297 -1455 1049 -0.01342592592592588 -1455 1050 -0.1551783264746225 -1455 1450 -0.02407407407407419 -1455 1451 1.249000902703301e-16 -1455 1452 -0.1063100137174142 -1455 1453 3.469446951953614e-16 -1455 1454 7.112366251504909e-17 -1455 1455 1.241426611796987 -1455 1456 0.02407407407407385 -1455 1457 -5.551115123125783e-17 -1455 1458 -0.1063100137174259 -1456 1045 -0.0009703703703703705 -1456 1046 -0.0004999999999999993 -1456 1047 -0.008333333333333333 -1456 1048 -0.0002814814814814636 -1456 1049 -3.035766082959412e-18 -1456 1050 -1.734723475976807e-18 -1456 1051 -0.0009703703703703788 -1456 1052 0.0005000000000000023 -1456 1053 0.008333333333333335 -1456 1453 -0.001659259259259293 -1456 1454 -9.324138683375338e-18 -1456 1455 -0.03333333333333333 -1456 1456 0.00776296296296297 -1456 1457 9.540979117872439e-18 -1456 1458 -3.469446951953614e-18 -1456 1459 -0.001659259259259265 -1456 1460 -2.168404344971009e-19 -1456 1461 0.03333333333333333 -1457 1045 -0.0004999999999999995 -1457 1046 -0.001040740740740732 -1457 1047 -0.00925925925925916 -1457 1048 -3.035766082959412e-18 -1457 1049 -0.002362962962962939 -1457 1050 -0.03703703703703685 -1457 1051 0.0005000000000000024 -1457 1052 -0.001040740740740755 -1457 1053 -0.009259259259259302 -1457 1453 -9.215718466126788e-18 -1457 1454 0.0002814814814814493 -1457 1455 -3.41740524767431e-16 -1457 1456 9.432558900623889e-18 -1457 1457 0.008325925925925895 -1457 1458 -1.942890293094024e-16 -1457 1459 1.084202172485504e-19 -1457 1460 0.0002814814814814798 -1457 1461 8.153200337090993e-17 -1458 1045 -0.01296296296296292 -1458 1046 -0.01342592592592576 -1458 1047 -0.1551783264746215 -1458 1048 -1.266348137463069e-16 -1458 1049 -0.02870370370370328 -1458 1050 -0.2040466392318205 -1458 1051 0.01296296296296304 -1458 1052 -0.01342592592592612 -1458 1053 -0.155178326474624 -1458 1453 -0.02407407407407435 -1458 1455 -0.1063100137174259 -1458 1456 4.544975507059235e-16 -1458 1457 -7.112366251504909e-17 -1458 1458 1.241426611796976 -1458 1459 0.02407407407407389 -1458 1460 5.204170427930421e-18 -1458 1461 -0.1063100137174213 -1459 1048 -0.0009703703703703633 -1459 1049 -0.0004999999999999977 -1459 1050 -0.008333333333333333 -1459 1051 -0.0002814814814814746 -1459 1052 3.252606517456513e-19 -1459 1053 -1.734723475976807e-18 -1459 1054 -0.0009703703703703622 -1459 1055 0.0004999999999999974 -1459 1056 0.008333333333333335 -1459 1456 -0.001659259259259265 -1459 1457 1.084202172485504e-19 -1459 1458 -0.03333333333333333 -1459 1459 0.007762962962962961 -1459 1460 1.734723475976807e-17 -1459 1461 -3.469446951953614e-18 -1459 1462 -0.00165925925925926 -1459 1463 -1.723881454251952e-17 -1459 1464 0.03333333333333333 -1460 1048 -0.0004999999999999976 -1460 1049 -0.001040740740740724 -1460 1050 -0.009259259259259172 -1460 1051 2.168404344971009e-19 -1460 1052 -0.002362962962962954 -1460 1053 -0.03703703703703683 -1460 1054 0.0004999999999999974 -1460 1055 -0.001040740740740722 -1460 1056 -0.009259259259259169 -1460 1456 -2.168404344971009e-19 -1460 1457 0.0002814814814814798 -1460 1458 8.153200337090993e-17 -1460 1459 1.734723475976807e-17 -1460 1460 0.008325925925925915 -1460 1461 5.93275428784068e-16 -1460 1462 -1.734723475976807e-17 -1460 1463 0.0002814814814814784 -1460 1464 4.909267437014364e-16 -1461 1048 -0.01296296296296285 -1461 1049 -0.01342592592592571 -1461 1050 -0.1551783264746204 -1461 1051 1.734723475976807e-17 -1461 1052 -0.02870370370370402 -1461 1053 -0.2040466392318224 -1461 1054 0.01296296296296283 -1461 1055 -0.01342592592592566 -1461 1056 -0.1551783264746201 -1461 1456 -0.02407407407407429 -1461 1457 5.204170427930421e-18 -1461 1458 -0.1063100137174213 -1461 1459 4.024558464266192e-16 -1461 1460 -3.816391647148976e-17 -1461 1461 1.241426611796979 -1461 1462 0.02407407407407388 -1461 1463 -1.821459649775647e-16 -1461 1464 -0.1063100137174215 -1462 1051 -0.00097037037037038 -1462 1052 -0.0005000000000000026 -1462 1053 -0.008333333333333333 -1462 1054 -0.0002814814814814934 -1462 1055 2.276824562219559e-18 -1462 1056 -1.734723475976807e-18 -1462 1057 -0.0009703703703703689 -1462 1058 0.0005000000000000003 -1462 1059 0.008333333333333335 -1462 1459 -0.00165925925925926 -1462 1460 -1.734723475976807e-17 -1462 1461 -0.03333333333333333 -1462 1462 0.007762962962962958 -1462 1463 2.40692882291782e-17 -1462 1464 -3.469446951953614e-18 -1462 1465 -0.001659259259259229 -1462 1466 -6.613633252161577e-18 -1462 1467 0.03333333333333333 -1463 1051 -0.0005000000000000026 -1463 1052 -0.001040740740740757 -1463 1053 -0.009259259259259316 -1463 1054 2.38524477946811e-18 -1463 1055 -0.002362962962962979 -1463 1056 -0.03703703703703728 -1463 1057 0.0005000000000000003 -1463 1058 -0.001040740740740748 -1463 1059 -0.009259259259259375 -1463 1459 -1.723881454251952e-17 -1463 1460 0.0002814814814814784 -1463 1461 -4.735795089416683e-16 -1463 1462 2.396086801192965e-17 -1463 1463 0.00832592592592595 -1463 1464 -2.532696274926138e-16 -1463 1465 -6.722053469410127e-18 -1463 1466 0.0002814814814815078 -1463 1467 1.335737076502141e-16 -1464 1051 -0.01296296296296306 -1464 1052 -0.01342592592592613 -1464 1053 -0.1551783264746242 -1464 1054 2.775557561562891e-17 -1464 1055 -0.02870370370370362 -1464 1056 -0.2040466392318274 -1464 1057 0.01296296296296303 -1464 1058 -0.01342592592592605 -1464 1059 -0.1551783264746252 -1464 1459 -0.02407407407407416 -1464 1460 -6.938893903907228e-17 -1464 1461 -0.1063100137174215 -1464 1462 3.035766082959412e-16 -1464 1463 -2.775557561562891e-17 -1464 1464 1.241426611796989 -1464 1465 0.02407407407407385 -1464 1466 1.040834085586084e-16 -1464 1467 -0.1063100137174177 -1465 1054 -0.0009703703703703667 -1465 1055 -0.0004999999999999997 -1465 1056 -0.008333333333333333 -1465 1057 -0.0002814814814814931 -1465 1058 -3.252606517456513e-19 -1465 1059 -1.734723475976807e-18 -1465 1060 -0.000970370370370371 -1465 1061 0.0005 -1465 1062 0.008333333333333335 -1465 1462 -0.001659259259259229 -1465 1463 -6.722053469410127e-18 -1465 1464 -0.03333333333333332 -1465 1465 0.007762962962962955 -1465 1466 1.853985714950213e-17 -1465 1467 -3.469446951953614e-18 -1465 1468 -0.001659259259259265 -1465 1469 -1.214306433183765e-17 -1465 1470 0.03333333333333333 -1466 1054 -0.0004999999999999998 -1466 1055 -0.001040740740740744 -1466 1056 -0.009259259259259358 -1466 1057 -3.252606517456513e-19 -1466 1058 -0.002362962962962978 -1466 1059 -0.03703703703703715 -1466 1060 0.0005 -1466 1061 -0.00104074074074074 -1466 1062 -0.009259259259259285 -1466 1462 -6.613633252161577e-18 -1466 1463 0.0002814814814815078 -1466 1464 -2.359223927328458e-16 -1466 1465 1.843143693225358e-17 -1466 1466 0.008325925925925935 -1466 1467 1.52655665885959e-16 -1466 1468 -1.192622389734055e-17 -1466 1469 0.0002814814814814779 -1466 1470 1.960237527853792e-16 -1467 1054 -0.01296296296296301 -1467 1055 -0.01342592592592599 -1467 1056 -0.1551783264746246 -1467 1057 6.418476861114186e-17 -1467 1058 -0.02870370370370405 -1467 1059 -0.2040466392318274 -1467 1060 0.01296296296296294 -1467 1061 -0.01342592592592576 -1467 1062 -0.1551783264746222 -1467 1462 -0.02407407407407419 -1467 1463 1.35308431126191e-16 -1467 1464 -0.1063100137174177 -1467 1465 3.521488656232918e-16 -1467 1466 1.023486850826316e-16 -1467 1467 1.241426611796986 -1467 1468 0.02407407407407385 -1467 1469 -6.418476861114186e-17 -1467 1470 -0.1063100137174215 -1468 1057 -0.000970370370370371 -1468 1058 -0.0005 -1468 1059 -0.008333333333333333 -1468 1060 -0.0002814814814814639 -1468 1061 -3.252606517456513e-19 -1468 1062 -1.734723475976807e-18 -1468 1063 -0.0009703703703703737 -1468 1064 0.0005000000000000003 -1468 1065 0.008333333333333335 -1468 1465 -0.001659259259259265 -1468 1466 -1.192622389734055e-17 -1468 1467 -0.03333333333333333 -1468 1468 0.007762962962962979 -1468 1469 2.255140518769849e-17 -1468 1470 -3.469446951953614e-18 -1468 1471 -0.001659259259259294 -1468 1472 -1.062518129035794e-17 -1468 1473 0.03333333333333333 -1469 1057 -0.0005 -1469 1058 -0.00104074074074074 -1469 1059 -0.009259259259259285 -1469 1060 -2.168404344971009e-19 -1469 1061 -0.00236296296296294 -1469 1062 -0.03703703703703677 -1469 1063 0.0005000000000000002 -1469 1064 -0.001040740740740738 -1469 1065 -0.009259259259259182 -1469 1465 -1.20346441145891e-17 -1469 1466 0.0002814814814814778 -1469 1467 -4.701100619897147e-16 -1469 1468 2.244298497044994e-17 -1469 1469 0.008325925925925914 -1469 1470 2.706168622523819e-16 -1469 1471 -1.051676107310939e-17 -1469 1472 0.0002814814814814493 -1469 1473 2.359223927328458e-16 -1470 1057 -0.01296296296296295 -1470 1058 -0.01342592592592576 -1470 1059 -0.1551783264746222 -1470 1060 -1.214306433183765e-17 -1470 1061 -0.02870370370370354 -1470 1062 -0.2040466392318205 -1470 1063 0.01296296296296296 -1470 1064 -0.01342592592592587 -1470 1065 -0.1551783264746223 -1470 1465 -0.02407407407407435 -1470 1466 1.040834085586084e-17 -1470 1467 -0.1063100137174215 -1470 1468 5.030698080332741e-16 -1470 1469 -6.418476861114186e-17 -1470 1470 1.241426611796979 -1470 1471 0.02407407407407385 -1470 1472 -6.071532165918825e-17 -1470 1473 -0.1063100137174259 -1471 1060 -0.0009703703703703715 -1471 1061 -0.0004999999999999997 -1471 1062 -0.008333333333333333 -1471 1063 -0.0002814814814814649 -1471 1064 -2.38524477946811e-18 -1471 1065 -1.734723475976807e-18 -1471 1066 -0.0009703703703703774 -1471 1067 0.0005000000000000021 -1471 1068 0.008333333333333335 -1471 1468 -0.001659259259259294 -1471 1469 -1.062518129035794e-17 -1471 1470 -0.03333333333333333 -1471 1471 0.007762962962962978 -1471 1472 1.192622389734055e-17 -1471 1473 -6.938893903907228e-18 -1471 1474 -0.00165925925925927 -1471 1475 -1.301042606982605e-18 -1471 1476 0.03333333333333333 -1472 1060 -0.0004999999999999998 -1472 1061 -0.001040740740740734 -1472 1062 -0.009259259259259163 -1472 1063 -2.276824562219559e-18 -1472 1064 -0.002362962962962941 -1472 1065 -0.0370370370370369 -1472 1066 0.0005000000000000021 -1472 1067 -0.001040740740740753 -1472 1068 -0.009259259259259302 -1472 1468 -1.051676107310939e-17 -1472 1469 0.0002814814814814492 -1472 1470 -3.556183125752455e-16 -1472 1471 1.1817803680092e-17 -1472 1472 0.00832592592592591 -1472 1473 -1.561251128379126e-16 -1472 1474 -1.517883041479706e-18 -1472 1475 0.0002814814814814716 -1472 1476 5.030698080332741e-17 -1473 1060 -0.01296296296296293 -1473 1061 -0.01342592592592581 -1473 1062 -0.1551783264746218 -1473 1063 -1.006139616066548e-16 -1473 1064 -0.02870370370370325 -1473 1065 -0.2040466392318207 -1473 1066 0.01296296296296303 -1473 1067 -0.01342592592592611 -1473 1068 -0.1551783264746237 -1473 1468 -0.02407407407407435 -1473 1469 6.938893903907228e-18 -1473 1470 -0.1063100137174259 -1473 1471 4.510281037539698e-16 -1473 1472 -5.724587470723463e-17 -1473 1473 1.241426611796978 -1473 1474 0.0240740740740739 -1473 1475 -3.469446951953614e-18 -1473 1476 -0.1063100137174224 -1474 1063 -0.0009703703703703641 -1474 1064 -0.0004999999999999981 -1474 1065 -0.008333333333333333 -1474 1066 -0.0002814814814814758 -1474 1067 -1.626303258728257e-18 -1474 1068 -1.734723475976807e-18 -1474 1069 -0.0009703703703703699 -1474 1070 0.0004999999999999997 -1474 1071 0.008333333333333335 -1474 1471 -0.00165925925925927 -1474 1472 -1.517883041479706e-18 -1474 1473 -0.03333333333333333 -1474 1474 0.007762962962962962 -1474 1475 6.938893903907228e-18 -1474 1476 -3.469446951953614e-18 -1474 1477 -0.00165925925925926 -1474 1478 -5.421010862427522e-18 -1474 1479 0.03333333333333333 -1475 1063 -0.000499999999999998 -1475 1064 -0.001040740740740727 -1475 1065 -0.009259259259259191 -1475 1066 -1.843143693225358e-18 -1475 1067 -0.002362962962962956 -1475 1068 -0.0370370370370369 -1475 1069 0.0004999999999999997 -1475 1070 -0.001040740740740737 -1475 1071 -0.009259259259259271 -1475 1471 -1.301042606982605e-18 -1475 1472 0.0002814814814814716 -1475 1473 -2.42861286636753e-17 -1475 1474 6.938893903907228e-18 -1475 1475 0.00832592592592591 -1475 1476 3.608224830031759e-16 -1475 1477 -5.421010862427522e-18 -1475 1478 0.0002814814814814796 -1475 1479 3.469446951953614e-17 -1476 1063 -0.01296296296296286 -1476 1064 -0.01342592592592575 -1476 1065 -0.1551783264746206 -1476 1066 -6.765421556309548e-17 -1476 1067 -0.0287037037037039 -1476 1068 -0.2040466392318226 -1476 1069 0.01296296296296293 -1476 1070 -0.01342592592592575 -1476 1071 -0.1551783264746219 -1476 1471 -0.0240740740740743 -1476 1472 6.938893903907228e-18 -1476 1473 -0.1063100137174224 -1476 1474 3.538835890992686e-16 -1476 1475 -6.938893903907228e-18 -1476 1476 1.241426611796979 -1476 1477 0.02407407407407394 -1476 1478 -1.457167719820518e-16 -1476 1479 -0.1063100137174215 -1477 1066 -0.0009703703703703722 -1477 1067 -0.0005000000000000003 -1477 1068 -0.008333333333333333 -1477 1069 -0.0002814814814814828 -1477 1070 3.144186300207963e-18 -1477 1071 8.673617379884035e-18 -1477 1072 -0.0009703703703703609 -1477 1073 0.0004999999999999974 -1477 1074 0.00833333333333334 -1477 1474 -0.00165925925925926 -1477 1475 -5.421010862427522e-18 -1477 1476 -0.03333333333333333 -1477 1477 0.007762962962962954 -1477 1478 1.040834085586084e-17 -1477 1479 6.938893903907228e-18 -1477 1480 -0.001659259259259263 -1477 1481 -5.204170427930421e-18 -1477 1482 0.03333333333333333 -1478 1066 -0.0005000000000000002 -1478 1067 -0.001040740740740742 -1478 1068 -0.009259259259259288 -1478 1069 3.035766082959412e-18 -1478 1070 -0.002362962962962964 -1478 1071 -0.03703703703703698 -1478 1072 0.0004999999999999973 -1478 1073 -0.001040740740740725 -1478 1074 -0.009259259259259228 -1478 1474 -5.421010862427522e-18 -1478 1475 0.0002814814814814796 -1478 1476 -2.619432448724979e-16 -1478 1477 1.051676107310939e-17 -1478 1478 0.008325925925925909 -1478 1479 2.151057110211241e-16 -1478 1480 -5.529431079676073e-18 -1478 1481 0.0002814814814814723 -1478 1482 -1.214306433183765e-17 -1479 1066 -0.01296296296296296 -1479 1067 -0.0134259259259258 -1479 1068 -0.1551783264746224 -1479 1069 1.214306433183765e-16 -1479 1070 -0.02870370370370408 -1479 1071 -0.2040466392318247 -1479 1072 0.01296296296296284 -1479 1073 -0.01342592592592571 -1479 1074 -0.1551783264746215 -1479 1474 -0.02407407407407411 -1479 1475 -1.144917494144693e-16 -1479 1476 -0.1063100137174215 -1479 1477 -3.989863994746656e-17 -1479 1478 7.112366251504909e-17 -1479 1479 1.241426611796981 -1479 1480 0.02407407407407415 -1479 1481 9.367506770274758e-17 -1479 1482 -0.1063100137174222 -1480 1069 -0.0009703703703703782 -1480 1070 -0.0005000000000000026 -1480 1071 -0.008333333333333337 -1480 1072 -0.0002814814814814915 -1480 1073 2.276824562219559e-18 -1480 1074 -5.204170427930421e-18 -1480 1075 -0.0009703703703703708 -1480 1076 0.0005000000000000003 -1480 1077 0.008333333333333335 -1480 1477 -0.001659259259259263 -1480 1478 -5.637851296924623e-18 -1480 1479 -0.03333333333333334 -1480 1480 0.007762962962962977 -1480 1481 1.214306433183765e-17 -1480 1482 -3.469446951953614e-18 -1480 1483 -0.001659259259259242 -1480 1484 -6.613633252161577e-18 -1480 1485 0.03333333333333333 -1481 1069 -0.0005000000000000026 -1481 1070 -0.00104074074074076 -1481 1071 -0.009259259259259375 -1481 1072 2.38524477946811e-18 -1481 1073 -0.002362962962962976 -1481 1074 -0.03703703703703725 -1481 1075 0.0005000000000000003 -1481 1076 -0.001040740740740744 -1481 1077 -0.009259259259259302 -1481 1477 -5.312590645178972e-18 -1481 1478 0.0002814814814814723 -1481 1479 -3.087807787238717e-16 -1481 1480 1.214306433183765e-17 -1481 1481 0.008325925925925976 -1481 1482 -4.510281037539698e-17 -1481 1483 -6.613633252161577e-18 -1481 1484 0.0002814814814814966 -1481 1485 2.081668171172169e-16 -1482 1069 -0.01296296296296306 -1482 1070 -0.01342592592592619 -1482 1071 -0.1551783264746256 -1482 1072 2.42861286636753e-17 -1482 1073 -0.02870370370370361 -1482 1074 -0.2040466392318271 -1482 1075 0.01296296296296304 -1482 1076 -0.013425925925926 -1482 1077 -0.1551783264746238 -1482 1477 -0.02407407407407392 -1482 1478 1.318389841742373e-16 -1482 1479 -0.1063100137174222 -1482 1480 -6.938893903907228e-18 -1482 1481 1.162264728904461e-16 -1482 1482 1.24142661179699 -1482 1483 0.02407407407407394 -1482 1484 -1.387778780781446e-17 -1482 1485 -0.1063100137174191 -1483 1072 -0.0009703703703703688 -1483 1073 -0.0004999999999999998 -1483 1074 -0.008333333333333335 -1483 1075 -0.0002814814814814889 -1483 1076 1.843143693225358e-18 -1483 1077 -1.908195823574488e-17 -1483 1078 -0.0009703703703703598 -1483 1079 0.0004999999999999972 -1483 1080 0.008333333333333326 -1483 1480 -0.001659259259259242 -1483 1481 -6.613633252161577e-18 -1483 1482 -0.03333333333333333 -1483 1483 0.007762962962962952 -1483 1484 2.526191061891225e-17 -1483 1485 1.040834085586084e-17 -1483 1486 -0.001659259259259247 -1483 1487 -1.680513367352532e-17 -1483 1488 0.03333333333333334 -1484 1072 -0.0004999999999999996 -1484 1073 -0.00104074074074074 -1484 1074 -0.009259259259259283 -1484 1075 1.843143693225358e-18 -1484 1076 -0.002362962962962974 -1484 1077 -0.03703703703703703 -1484 1078 0.0004999999999999972 -1484 1079 -0.001040740740740724 -1484 1080 -0.009259259259259198 -1484 1480 -6.613633252161577e-18 -1484 1481 0.0002814814814814967 -1484 1482 -1.613292832658431e-16 -1484 1483 2.51534904016637e-17 -1484 1484 0.008325925925925941 -1484 1485 4.128641872824801e-16 -1484 1486 -1.691355389077387e-17 -1484 1487 0.0002814814814814902 -1484 1488 4.579669976578771e-16 -1485 1072 -0.01296296296296301 -1485 1073 -0.01342592592592594 -1485 1074 -0.1551783264746233 -1485 1075 1.821459649775647e-16 -1485 1076 -0.02870370370370414 -1485 1077 -0.2040466392318258 -1485 1078 0.01296296296296281 -1485 1079 -0.01342592592592569 -1485 1080 -0.15517832647462 -1485 1480 -0.02407407407407428 -1485 1481 1.908195823574488e-17 -1485 1482 -0.1063100137174191 -1485 1483 3.642919299551295e-16 -1485 1484 3.816391647148976e-17 -1485 1485 1.241426611796986 -1485 1486 0.02407407407407389 -1485 1487 -1.838806884535416e-16 -1485 1488 -0.1063100137174195 -1486 1075 -0.0009703703703703799 -1486 1076 -0.000500000000000003 -1486 1077 -0.008333333333333335 -1486 1078 -0.000281481481481472 -1486 1079 1.517883041479706e-18 -1486 1080 -1.387778780781446e-17 -1486 1081 -0.0009703703703703752 -1486 1082 0.0005000000000000007 -1486 1083 0.008333333333333326 -1486 1483 -0.001659259259259247 -1486 1484 -1.691355389077387e-17 -1486 1485 -0.03333333333333334 -1486 1486 0.007762962962962966 -1486 1487 1.604619215278547e-17 -1486 1488 3.469446951953614e-18 -1486 1489 -0.001659259259259296 -1486 1490 2.602085213965211e-18 -1486 1491 0.03333333333333334 -1487 1075 -0.0005000000000000029 -1487 1076 -0.00104074074074076 -1487 1077 -0.009259259259259345 -1487 1078 1.517883041479706e-18 -1487 1079 -0.002362962962962951 -1487 1080 -0.03703703703703694 -1487 1081 0.0005000000000000007 -1487 1082 -0.001040740740740741 -1487 1083 -0.009259259259259182 -1487 1483 -1.669671345627677e-17 -1487 1484 0.0002814814814814903 -1487 1485 -5.048045315092509e-16 -1487 1486 1.604619215278547e-17 -1487 1487 0.008325925925925909 -1487 1488 -3.677613769070831e-16 -1487 1489 2.710505431213761e-18 -1487 1490 0.0002814814814814502 -1487 1491 -1.162264728904461e-16 -1488 1075 -0.01296296296296308 -1488 1076 -0.01342592592592617 -1488 1077 -0.1551783264746244 -1488 1078 9.020562075079397e-17 -1488 1079 -0.02870370370370329 -1488 1080 -0.2040466392318218 -1488 1081 0.01296296296296297 -1488 1082 -0.01342592592592587 -1488 1083 -0.1551783264746224 -1488 1483 -0.02407407407407419 -1488 1484 -3.989863994746656e-17 -1488 1485 -0.1063100137174195 -1488 1486 5.551115123125783e-17 -1488 1487 -6.765421556309548e-17 -1488 1488 1.241426611796979 -1488 1489 0.02407407407407412 -1488 1490 -8.673617379884035e-18 -1488 1491 -0.106310013717426 -1489 1078 -0.0009703703703703708 -1489 1079 -0.0004999999999999995 -1489 1080 -0.008333333333333325 -1489 1081 -0.000281481481481467 -1489 1082 -2.602085213965211e-18 -1489 1083 -1.734723475976807e-18 -1489 1084 -0.0009703703703703771 -1489 1085 0.0005000000000000021 -1489 1086 0.008333333333333325 -1489 1486 -0.001659259259259296 -1489 1487 2.602085213965211e-18 -1489 1488 -0.03333333333333334 -1489 1489 0.007762962962962977 -1489 1490 -1.582935171828836e-17 -1489 1491 -1.040834085586084e-17 -1489 1492 -0.001659259259259265 -1489 1493 1.322726650432315e-17 -1489 1494 0.03333333333333334 -1490 1078 -0.0004999999999999995 -1490 1079 -0.001040740740740732 -1490 1080 -0.009259259259259146 -1490 1081 -2.710505431213761e-18 -1490 1082 -0.002362962962962943 -1490 1083 -0.03703703703703685 -1490 1084 0.0005000000000000021 -1490 1085 -0.001040740740740754 -1490 1086 -0.0092592592592593 -1490 1486 2.602085213965211e-18 -1490 1487 0.0002814814814814502 -1490 1488 2.949029909160572e-17 -1490 1489 -1.593777193553692e-17 -1490 1490 0.008325925925925907 -1490 1491 -1.040834085586084e-16 -1490 1492 1.33356867215717e-17 -1490 1493 0.0002814814814814738 -1490 1494 -3.590877595271991e-16 -1491 1078 -0.01296296296296291 -1491 1079 -0.01342592592592575 -1491 1080 -0.1551783264746213 -1491 1081 -1.110223024625157e-16 -1491 1082 -0.02870370370370331 -1491 1083 -0.2040466392318208 -1491 1084 0.01296296296296302 -1491 1085 -0.0134259259259261 -1491 1086 -0.1551783264746235 -1491 1486 -0.02407407407407412 -1491 1487 -2.775557561562891e-17 -1491 1488 -0.1063100137174259 -1491 1489 -3.295974604355933e-17 -1491 1490 -5.204170427930421e-17 -1491 1491 1.241426611796979 -1491 1492 0.02407407407407415 -1491 1493 -8.500145032286355e-17 -1491 1494 -0.1063100137174222 -1492 1081 -0.0009703703703703637 -1492 1082 -0.0004999999999999981 -1492 1083 -0.008333333333333325 -1492 1084 -0.0002814814814814941 -1492 1085 1.084202172485504e-18 -1492 1086 8.673617379884035e-18 -1492 1087 -0.0009703703703703608 -1492 1088 0.0004999999999999976 -1492 1089 0.008333333333333335 -1492 1489 -0.001659259259259265 -1492 1490 1.344410693882025e-17 -1492 1491 -0.03333333333333333 -1492 1492 0.007762962962962951 -1492 1493 -1.973247953923618e-17 -1492 1494 -6.938893903907228e-18 -1492 1495 -0.001659259259259245 -1492 1496 4.77048955893622e-18 -1492 1497 0.03333333333333334 -1493 1081 -0.000499999999999998 -1493 1082 -0.001040740740740727 -1493 1083 -0.009259259259259191 -1493 1084 1.084202172485504e-18 -1493 1085 -0.002362962962962979 -1493 1086 -0.03703703703703711 -1493 1087 0.0004999999999999975 -1493 1088 -0.001040740740740728 -1493 1089 -0.009259259259259287 -1493 1489 1.322726650432315e-17 -1493 1490 0.0002814814814814738 -1493 1491 3.799044412389208e-16 -1493 1492 -1.962405932198763e-17 -1493 1493 0.008325925925925905 -1493 1494 1.665334536937735e-16 -1493 1495 5.095750210681871e-18 -1493 1496 0.0002814814814815001 -1493 1497 -1.214306433183765e-16 -1494 1081 -0.01296296296296285 -1494 1082 -0.01342592592592575 -1494 1083 -0.1551783264746204 -1494 1084 2.081668171172169e-17 -1494 1085 -0.02870370370370419 -1494 1086 -0.2040466392318265 -1494 1087 0.01296296296296285 -1494 1088 -0.01342592592592572 -1494 1089 -0.1551783264746216 -1494 1489 -0.02407407407407394 -1494 1490 -1.647987302177967e-16 -1494 1491 -0.1063100137174222 -1494 1492 -4.354155924701786e-16 -1494 1493 3.642919299551295e-17 -1494 1494 1.24142661179698 -1494 1495 0.02407407407407437 -1494 1496 1.43982048506075e-16 -1494 1497 -0.1063100137174187 -1495 1084 -0.0009703703703703759 -1495 1085 -0.0005000000000000025 -1495 1086 -0.008333333333333321 -1495 1087 -0.000281481481481499 -1495 1088 5.854691731421724e-18 -1495 1089 6.938893903907228e-18 -1495 1090 -0.0009703703703703604 -1495 1091 0.0004999999999999973 -1495 1092 0.008333333333333335 -1495 1492 -0.001659259259259245 -1495 1493 4.98732999343332e-18 -1495 1494 -0.03333333333333334 -1495 1495 0.007762962962962937 -1495 1496 -7.806255641895632e-18 -1495 1497 -2.081668171172169e-17 -1495 1498 -0.001659259259259223 -1495 1499 1.409462824231156e-18 -1495 1500 0.03333333333333332 -1496 1084 -0.0005000000000000024 -1496 1085 -0.001040740740740762 -1496 1086 -0.009259259259259436 -1496 1087 5.854691731421724e-18 -1496 1088 -0.002362962962962987 -1496 1089 -0.03703703703703719 -1496 1090 0.0004999999999999973 -1496 1091 -0.001040740740740725 -1496 1092 -0.009259259259259228 -1496 1492 4.77048955893622e-18 -1496 1493 0.0002814814814815001 -1496 1494 1.734723475976807e-16 -1496 1495 -7.914675859144182e-18 -1496 1496 0.008325925925925919 -1496 1497 -1.249000902703301e-16 -1496 1498 1.084202172485504e-18 -1496 1499 0.0002814814814815172 -1496 1500 -9.020562075079397e-17 -1497 1084 -0.01296296296296304 -1497 1085 -0.01342592592592618 -1497 1086 -0.1551783264746254 -1497 1087 1.422473250300982e-16 -1497 1088 -0.02870370370370417 -1497 1089 -0.2040466392318284 -1497 1090 0.01296296296296291 -1497 1091 -0.01342592592592564 -1497 1092 -0.1551783264746215 -1497 1492 -0.0240740740740737 -1497 1493 8.500145032286355e-17 -1497 1494 -0.1063100137174187 -1497 1495 -6.366435156834882e-16 -1497 1496 1.838806884535416e-16 -1497 1497 1.241426611796982 -1497 1498 0.02407407407407434 -1497 1499 1.734723475976807e-17 -1497 1500 -0.106310013717416 -1498 1087 -0.0009703703703703782 -1498 1088 -0.0005000000000000027 -1498 1089 -0.008333333333333331 -1498 1090 -0.0002814814814814667 -1498 1091 4.011548038196366e-18 -1498 1092 -1.734723475976807e-18 -1498 1093 -0.0009703703703703695 -1498 1094 0.0004999999999999987 -1498 1095 0.008333333333333337 -1498 1495 -0.001659259259259223 -1498 1496 1.192622389734055e-18 -1498 1497 -0.03333333333333331 -1498 1498 0.007762962962962969 -1498 1499 4.119968255444917e-18 -1498 1500 -3.469446951953614e-18 -1499 1087 -0.0005000000000000027 -1499 1088 -0.00104074074074076 -1499 1089 -0.009259259259259375 -1499 1090 4.011548038196366e-18 -1499 1091 -0.002362962962962943 -1499 1092 -0.03703703703703677 -1499 1093 0.0004999999999999986 -1499 1094 -0.001040740740740725 -1499 1095 -0.009259259259259123 -1499 1495 1.409462824231156e-18 -1499 1496 0.0002814814814815173 -1499 1497 -1.387778780781446e-17 -1499 1498 4.228388472693467e-18 -1499 1499 0.008325925925925921 -1499 1500 3.191891195797325e-16 -1500 1087 -0.01296296296296313 -1500 1088 -0.01342592592592611 -1500 1089 -0.1551783264746256 -1500 1090 2.411265631607762e-16 -1500 1091 -0.02870370370370357 -1500 1092 -0.2040466392318218 -1500 1093 0.01296296296296289 -1500 1094 -0.01342592592592563 -1500 1095 -0.1551783264746209 -1500 1495 -0.02407407407407384 -1500 1496 8.673617379884035e-18 -1500 1497 -0.106310013717416 -1500 1498 -2.480654570646834e-16 -1500 1500 1.241426611796983 diff --git a/packages/muelu/test/navierstokes/CMakeLists.txt b/packages/muelu/test/navierstokes/CMakeLists.txt deleted file mode 100644 index 8673e2ef2a9a..000000000000 --- a/packages/muelu/test/navierstokes/CMakeLists.txt +++ /dev/null @@ -1,197 +0,0 @@ -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Graph) # we need this line because this file is not on the header file List of MueLu -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Smoothers) - -# first ensure that these cmake boolean variables are defined -ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Epetra - ${PACKAGE_NAME}_ENABLE_EpetraExt - ${PACKAGE_NAME}_ENABLE_Amesos - ) - - -IF (${PACKAGE_NAME}_ENABLE_Epetra AND - ${PACKAGE_NAME}_ENABLE_EpetraExt AND - ${PACKAGE_NAME}_ENABLE_Ifpack AND - ${PACKAGE_NAME}_ENABLE_Amesos) - - IF(${PACKAGE_NAME}_ENABLE_AztecOO) - # build only if AztecOO available, too - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2D_Epetra - SOURCES Navier2D_Epetra.cpp - COMM mpi - ) - TRIBITS_COPY_FILES_TO_BINARY_DIR(Navier2D_cpdata - SOURCE_FILES A_re1000_5932.txt b_re1000_5932.txt - ) - - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2DBlocked_Epetra - SOURCES Navier2DBlocked_Epetra.cpp - COMM serial mpi - ) - - ################################# tests for xml framework - TRIBITS_ADD_EXECUTABLE( - Navier2DBlocked_xml - SOURCES Navier2DBlocked_xml.cpp - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_format" - ARGS "--xml=myXML.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_format2" - ARGS "--xml=myXMLg.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_blockdirect" - ARGS "--xml=myXML2.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_bgs1" - ARGS "--xml=myBGS1.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_bs1" - ARGS "--xml=myBS1.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_bs2" - ARGS "--xml=myBS2.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_bs3" - ARGS "--xml=myBS3.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_sim1" - ARGS "--xml=mySIM1.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_sim2" - ARGS "--xml=mySIM2.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_uzawa1" - ARGS "--xml=myUzawa1.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_uzawa2" - ARGS "--xml=myUzawa2.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_uzawa3" - ARGS "--xml=myUzawa3.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - Navier2DBlocked_xml - NAME "Navier2DBlocked_xml_indef1" - ARGS "--xml=myIndefDiag1.xml" - NUM_MPI_PROCS 4 - COMM mpi - ) - ################################## - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2DBlocked_BraessSarazinSmoother - SOURCES Navier2DBlocked_BraessSarazinSmoother.cpp - COMM serial mpi - ) - - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2DBlocked_SimpleSmoother - SOURCES Navier2DBlocked_SimpleSmoother.cpp - COMM serial mpi - ) - - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2DBlocked_BraessSarazin - SOURCES Navier2DBlocked_BraessSarazin.cpp - COMM serial mpi - ) - - TRIBITS_ADD_EXECUTABLE( - Navier2DBlocked_rebalancing2 - SOURCES Navier2DBlocked_test2.cpp - COMM mpi - ) - - # TODO: fix CloneRepartitionInterface - TRIBITS_ADD_TEST( - Navier2DBlocked_rebalancing2 - NAME "Navier2DBlockedReuseAggs" - ARGS "--rebalanceBlocks=0" - NUM_MPI_PROCS 4 - COMM mpi - ) - #TRIBITS_ADD_TEST( - # Navier2DBlocked_rebalancing2 - # NAME "Navier2DBlockedReuseAggsReb" - # ARGS "--rebalanceBlocks=1" - # NUM_MPI_PROCS 4 - # COMM mpi - # ) - - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Navier2DBlocked_Simple - SOURCES Navier2DBlocked_Simple.cpp - COMM serial mpi - ) - TRIBITS_COPY_FILES_TO_BINARY_DIR(Navier2D_cp - SOURCE_FILES myXML.xml myXMLg.xml myXML2.xml myBS1.xml myBS2.xml myBS3.xml myBGS1.xml mySIM1.xml mySIM2.xml myUzawa1.xml myUzawa2.xml myUzawa3.xml myIndefDiag1.xml - ) - ENDIF() - -ENDIF() diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazin.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazin.cpp deleted file mode 100644 index 1f07a7312687..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazin.cpp +++ /dev/null @@ -1,499 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_epetra.cpp - * - * Created on: Mar 26, 2011 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_BlockedRAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedPFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_SchurComplementFactory.hpp" -#include "MueLu_BraessSarazinSmoother.hpp" - -#include "MueLu_CoarseMapFactory.hpp" - -#include "MueLu_AmalgamationFactory.hpp" -#include "MueLu_AggregationExportFactory.hpp" - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using namespace MueLuTests; - using namespace Teuchos; - - oblackholestream blackhole; - GlobalMPISession mpiSession(&argc, &argv, &blackhole); - // - RCP > comm = DefaultComm::getComm(); - RCP out = fancyOStream(rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Time myTime("global"); - TimeMonitor MM(myTime); - - // custom parameters - LocalOrdinal maxLevels = 3; - - GlobalOrdinal maxCoarseSize = 1; // FIXME clp doesn't like long long int - - int globalNumDofs = 1500; // used for the maps - int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const RCP fullmap = rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - - RCP epA = rcp(ptrA); - RCP epv = rcp(ptrf); - RCP epNS = rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - RCP A11; - RCP A12; - RCP A21; - RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - RCP > xA11 = rcp(new Xpetra::EpetraCrsMatrixT(A11)); - RCP > xA12 = rcp(new Xpetra::EpetraCrsMatrixT(A12)); - RCP > xA21 = rcp(new Xpetra::EpetraCrsMatrixT(A21)); - RCP > xA22 = rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - RCP > bOp = rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - - //////////////////////////////////////////////////// create Hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(VERB_HIGH); - // H->setDefaultVerbLevel(VERB_NONE); - H->SetMaxCoarseSize(maxCoarseSize); - - //////////////////////////////////////////////////////// finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(VERB_HIGH); - Finest->Set("A", rcp_dynamic_cast(bOp)); - - /////////////////////////////////////////////// define subblocks of A - // make A11 block and A22 block available as variable "A" generated - // by A11Fact and A22Fact - RCP A11Fact = rcp(new SubBlockAFactory()); - A11Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A11Fact->SetParameter("block row", ParameterEntry(0)); - A11Fact->SetParameter("block col", ParameterEntry(0)); - RCP A22Fact = rcp(new SubBlockAFactory()); - A22Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A22Fact->SetParameter("block row", ParameterEntry(1)); - A22Fact->SetParameter("block col", ParameterEntry(1)); - - ////////////////////////////////////////// prepare null space for A11 - RCP nullspace11 = MultiVectorFactory::Build(xstridedvelmap, 2); // this is a 2D standard null space - - for (int i = 0; i < nDofsPerNode - 1; ++i) { - ArrayRCP nsValues = nullspace11->getDataNonConst(i); - int numBlocks = nsValues.size() / (nDofsPerNode - 1); - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * (nDofsPerNode - 1) + i] = 1.0; - } - } - - Finest->Set("Nullspace1", nullspace11); - - ///////////////////////////////////////// define CoalesceDropFactory and Aggregation for A11 - // set up amalgamation for A11. Note: we're using a default null space factory (null) - RCP amalgFact11 = rcp(new AmalgamationFactory()); - amalgFact11->SetFactory("A", A11Fact); - - amalgFact11->setDefaultVerbLevel(VERB_EXTREME); - RCP dropFact11 = rcp(new CoalesceDropFactory()); - dropFact11->SetFactory("A", A11Fact); - dropFact11->SetFactory("UnAmalgamationInfo", amalgFact11); - dropFact11->setDefaultVerbLevel(VERB_EXTREME); - RCP CoupledAggFact11 = rcp(new UncoupledAggregationFactory()); - CoupledAggFact11->SetFactory("Graph", dropFact11); - CoupledAggFact11->SetMinNodesPerAggregate(9); - CoupledAggFact11->SetMaxNeighAlreadySelected(2); - CoupledAggFact11->SetOrdering("natural"); - - ///////////////////////////////////////// define transfer ops for A11 -#if 0 - // use PG-AMG - RCP P11Fact = rcp(new PgPFactory()); - - RCP R11Fact = rcp(new GenericRFactory()); - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1",P11tentFact)); - - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1")); - - RCP coarseMapFact11 = rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); - // M11->SetFactory("Ptent", P11tentFact); - M11->SetFactory("CoarseMap", coarseMapFact11); -#else - RCP P11Fact = rcp(new TentativePFactory()); - - RCP R11Fact = rcp(new TransPFactory()); - - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1")); - nspFact11->SetFactory("Nullspace1", P11Fact); - - RCP coarseMapFact11 = rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); - // M11->SetFactory("Ptent", P11Fact); - M11->SetFactory("CoarseMap", coarseMapFact11); - M11->SetFactory("Graph", dropFact11); -#endif - M11->SetIgnoreUserData(true); // always use data from factories defined in factory manager - - ////////////////////////////////////////// prepare null space for A22 - RCP nullspace22 = MultiVectorFactory::Build(xstridedpremap, 1); // this is a 2D standard null space - ArrayRCP nsValues22 = nullspace22->getDataNonConst(0); - for (int j = 0; j < nsValues22.size(); ++j) { - nsValues22[j] = 1.0; - } - - Finest->Set("Nullspace2", nullspace22); - - ///////////////////////////////////////// define transfer ops for A22 -#if 0 - // use PGAMG - RCP amalgFact22 = rcp(new AmalgamationFactory(A22Fact)); - RCP P22tentFact = rcp(new TentativePFactory(CoupledAggFact11, amalgFact22)); - - RCP P22Fact = rcp(new SaPFactory(P22tentFact)); - - //RCP R22Fact = rcp(new GenericRFactory(P22Fact)); - RCP R22Fact = rcp(new TransPFactory(P22Fact)); - - RCP nspFact22 = rcp(new NullspaceFactory("Nullspace2",P22tentFact)); - RCP coarseMapFact22 = rcp(new CoarseMapFactory(CoupledAggFact11, nspFact22)); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("Aggregates", AggFact22); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("Ptent", P22tentFact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager - -#else - // use TentativePFactory - RCP amalgFact22 = rcp(new AmalgamationFactory()); - RCP P22Fact = rcp(new TentativePFactory()); // check me (fed with A22) wrong column GIDS!!! - - RCP R22Fact = rcp(new TransPFactory()); - - RCP nspFact22 = rcp(new NullspaceFactory("Nullspace2")); - nspFact22->SetFactory("Nullspace2", P22Fact); - RCP coarseMapFact22 = rcp(new CoarseMapFactory()); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("Aggregates", CoupledAggFact11); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); // TODO oops what about that? it was M11 before? - M22->SetFactory("Ptent", P22Fact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager -#endif - - /////////////////////////////////////////// define blocked transfer ops - RCP PFact = rcp(new BlockedPFactory()); // use row map index base from bOp - PFact->AddFactoryManager(M11); - PFact->AddFactoryManager(M22); - - RCP RFact = rcp(new GenericRFactory()); - RFact->SetFactory("P", PFact); - - RCP AcFact = rcp(new BlockedRAPFactory()); - AcFact->SetFactory("P", PFact); - AcFact->SetFactory("R", RFact); - - *out << "Creating Braess-Sarazin Smoother" << std::endl; - - ////////////////////////////////////////////////////////////////////// - // Smoothers - - // Another factory manager for braes sarazin smoother - // Schur Complement Factory, using the factory to generate AcFact - SC omega = 1.3; - RCP SFact = rcp(new SchurComplementFactory()); - SFact->SetParameter("omega", ParameterEntry(omega)); - SFact->SetFactory("A", MueLu::NoFactory::getRCP()); - - // Smoother Factory, using SFact as a factory for A - std::string ifpackSCType; - ParameterList ifpackSCList; - ifpackSCList.set("relaxation: sweeps", (LocalOrdinal)3); - ifpackSCList.set("relaxation: damping factor", (Scalar)1.0); - ifpackSCType = "RELAXATION"; - ifpackSCList.set("relaxation: type", "Gauss-Seidel"); - RCP smoProtoSC = rcp(new TrilinosSmoother(ifpackSCType, ifpackSCList, 0)); - smoProtoSC->SetFactory("A", SFact); - RCP SmooSCFact = rcp(new SmootherFactory(smoProtoSC)); - - RCP smootherPrototype = rcp(new BraessSarazinSmoother()); - smootherPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(3)); - smootherPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(omega)); - - RCP smootherFact = rcp(new SmootherFactory(smootherPrototype)); - - RCP coarseSolverPrototype = rcp(new BraessSarazinSmoother()); - coarseSolverPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(3)); - coarseSolverPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(omega)); - - RCP coarseSolverFact = rcp(new SmootherFactory(coarseSolverPrototype, null)); - - RCP MB = rcp(new FactoryManager()); - MB->SetFactory("A", SFact); - MB->SetFactory("Smoother", SmooSCFact); - MB->SetIgnoreUserData(true); // always use data from factories defined in factory manager - smootherPrototype->AddFactoryManager(MB, 0); - coarseSolverPrototype->AddFactoryManager(MB, 0); - - // main factory manager - FactoryManager M; - M.SetFactory("A", AcFact); - M.SetFactory("P", PFact); - M.SetFactory("R", RFact); - M.SetFactory("Smoother", smootherFact); // TODO fix me - M.SetFactory("PreSmoother", smootherFact); // TODO fix me - M.SetFactory("PostSmoother", smootherFact); // TODO fix me - M.SetFactory("CoarseSolver", coarseSolverFact); - - //////////////////////////////////// setup multigrid - - H->Setup(M, 0, maxLevels); - - *out << std::endl; - *out << "print content of multigrid levels:" << std::endl; - - Finest->print(*out); - - RCP coarseLevel = H->GetLevel(1); - coarseLevel->print(*out); - - RCP coarseLevel2 = H->GetLevel(2); - coarseLevel2->print(*out); - - RCP xLsg = MultiVectorFactory::Build(xstridedfullmap, 1); - - // Use AMG directly as an iterative method -#if 0 - { - xLsg->putScalar( (SC) 0.0); - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = rcp(new Xpetra::EpetraVector(epv)); - - // calculate initial (absolute) residual - Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs,*xLsg,100); - - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(xstridedfullmap,1); - bOp->apply(*xLsg,*xTmp,NO_TRANS,(SC)1.0,(SC)0.0); - xRhs->update((SC)-1.0,*xTmp,(SC)1.0); - xRhs->norm2(norms); - *out << "||x|| = " << norms[0] << std::endl; - } -#endif - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - } - - return EXIT_SUCCESS; -#else - std::cout << "Epetra (and/or EpetraExt) not enabled. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_SERIAL) && defined(HAVE_MUELU_EPETRA) -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazinSmoother.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazinSmoother.cpp deleted file mode 100644 index 7c87b94b50d3..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_BraessSarazinSmoother.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_blocked_bssmoother.cpp - * - * Created on: Jun 18, 2012 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_BraessSarazinSmoother.hpp" -#include "MueLu_SchurComplementFactory.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_TopSmootherFactory.hpp" -#include "MueLu_HierarchyUtils.hpp" - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using namespace MueLuTests; - using namespace Teuchos; - - oblackholestream blackhole; - GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - RCP > comm = DefaultComm::getComm(); - RCP out = fancyOStream(rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Time myTime("global"); - TimeMonitor MM(myTime); - - // read in input parameters - - // default parameters - LO BS_nSweeps = 100; - Scalar BS_omega = 1.7; - LO SC_nSweeps = 1; - Scalar SC_omega = 1.0; - int SC_bUseDirectSolver = 0; - - // Note: use --help to list available options. - CommandLineProcessor clp(false); - clp.setOption("BraessSarazin_sweeps", &BS_nSweeps, "number of sweeps with BraessSarazin smoother"); - clp.setOption("BraessSarazin_omega", &BS_omega, "scaling factor for BraessSarazin smoother"); - clp.setOption("SchurComp_sweeps", &SC_nSweeps, "number of sweeps for BraessSarazin internal SchurComp solver/smoother (GaussSeidel)"); - clp.setOption("SchurComp_omega", &SC_omega, "damping parameter for BraessSarazin internal SchurComp solver/smoother (GaussSeidel)"); - clp.setOption("SchurComp_solver", &SC_bUseDirectSolver, "if 1: use direct solver for SchurComp equation, otherwise use GaussSeidel smoother (=default)"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - int globalNumDofs = 1500; // used for the maps - // int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for our splitting routine - const RCP fullmap = rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - - RCP epA = rcp(ptrA); - RCP epv = rcp(ptrf); - RCP epNS = rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - RCP A11; - RCP A12; - RCP A21; - RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - RCP > xA11 = rcp(new Xpetra::EpetraCrsMatrixT(A11)); - RCP > xA12 = rcp(new Xpetra::EpetraCrsMatrixT(A12)); - RCP > xA21 = rcp(new Xpetra::EpetraCrsMatrixT(A21)); - RCP > xA22 = rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - RCP > bOp = rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - //////////////////////////////////////////////////////// finest Level - RCP Finest = rcp(new Level()); - Finest->setDefaultVerbLevel(VERB_NONE); - Finest->Set("A", rcp_dynamic_cast(bOp)); - - /////////////////////////////////// - // Test Braess Sarazin Smoother as a solver - - *out << "Test: Creating Braess Sarazin Smoother" << std::endl; - *out << "Test: Omega for BraessSarazin = " << BS_omega << std::endl; - *out << "Test: Number of sweeps for BraessSarazin = " << BS_nSweeps << std::endl; - *out << "Test: Omega for Schur Complement solver= " << SC_omega << std::endl; - *out << "Test: Number of Schur Complement solver= " << SC_nSweeps << std::endl; - *out << "Test: Setting up Braess Sarazin Smoother" << std::endl; - - // define BraessSarazin Smoother with BS_nSweeps and BS_omega as scaling factor - // AFact_ = null (= default) for the 2x2 blocked operator - RCP BraessSarazinSm = rcp(new BraessSarazinSmoother()); - BraessSarazinSm->SetParameter("Sweeps", Teuchos::ParameterEntry(BS_nSweeps)); - BraessSarazinSm->SetParameter("Damping factor", Teuchos::ParameterEntry(BS_omega)); - - RCP smootherFact = rcp(new SmootherFactory(BraessSarazinSm)); - - /*note that omega must be the same in the SchurComplementFactory and in the BraessSarazinSmoother*/ - // define SchurComplement Factory - // SchurComp gets a RCP to AFact_ which has to be the 2x2 blocked operator - // and the scaling/damping factor omega that is used for BraessSarazin - // It stores the resulting SchurComplement operator as "A" generated by the SchurComplementFactory - // Instead of F^{-1} it uses the approximation \hat{F}^{-1} with \hat{F} = diag(F) - RCP SFact = rcp(new SchurComplementFactory()); - SFact->SetParameter("omega", ParameterEntry(BS_omega)); - SFact->SetFactory("A", MueLu::NoFactory::getRCP()); - - // define smoother/solver for BraessSarazin - RCP smoProtoSC = null; - if (SC_bUseDirectSolver != 1) { - // Smoother Factory, using SFact as a factory for A - std::string ifpackSCType; - ParameterList ifpackSCList; - ifpackSCList.set("relaxation: sweeps", SC_nSweeps); - ifpackSCList.set("relaxation: damping factor", SC_omega); - ifpackSCType = "RELAXATION"; - ifpackSCList.set("relaxation: type", "Gauss-Seidel"); - smoProtoSC = rcp(new TrilinosSmoother(ifpackSCType, ifpackSCList, 0)); - smoProtoSC->SetFactory("A", SFact); - } else { - ParameterList ifpackDSList; - std::string ifpackDSType; - smoProtoSC = rcp(new DirectSolver(ifpackDSType, ifpackDSList)); - smoProtoSC->SetFactory("A", SFact); - } - - RCP SmooSCFact = rcp(new SmootherFactory(smoProtoSC)); - - // define temporary FactoryManager that is used as input for BraessSarazin smoother - RCP MB = rcp(new FactoryManager()); - MB->SetFactory("A", SFact); // SchurComplement operator for correction step (defined as "A") - MB->SetFactory("Smoother", SmooSCFact); // solver/smoother for correction step - MB->SetFactory("PreSmoother", SmooSCFact); - MB->SetFactory("PostSmoother", SmooSCFact); - MB->SetIgnoreUserData(true); // always use data from factories defined in factory manager - BraessSarazinSm->AddFactoryManager(MB, 0); // set temporary factory manager in BraessSarazin smoother - - // setup main factory manager - RCP M = rcp(new FactoryManager()); - M->SetFactory("A", MueLu::NoFactory::getRCP()); // this is the 2x2 blocked operator - M->SetFactory("Smoother", smootherFact); // BraessSarazin block smoother - M->SetFactory("PreSmoother", smootherFact); - M->SetFactory("PostSmoother", smootherFact); - - MueLu::SetFactoryManager SFMCoarse(Finest, M); - Finest->Request(MueLu::TopSmootherFactory(M, "Smoother")); - - // call setup (= extract blocks and extract diagonal of F) - BraessSarazinSm->Setup(*Finest); - - RCP xtest = MultiVectorFactory::Build(xstridedfullmap, 1); - xtest->putScalar((SC)0.0); - - RCP xR = rcp(new Xpetra::EpetraVectorT(epv)); - // calculate initial (absolute) residual - Array::magnitudeType> norms(1); - - xR->norm2(norms); - *out << "Test: ||x_0|| = " << norms[0] << std::endl; - *out << "Test: Applying Braess-Sarazin Smoother" << std::endl; - *out << "Test: START DATA" << std::endl; - *out << "iterations\tVelocity_residual\tPressure_residual" << std::endl; - BraessSarazinSm->Apply(*xtest, *xR); - xtest->norm2(norms); - *out << "Test: ||x_1|| = " << norms[0] << std::endl; - - Array::magnitudeType> test = MueLu::Utilities::ResidualNorm(*bOp, *xtest, *xR); - *out << "residual norm: " << test[0] << std::endl; - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_SERIAL) && defined(HAVE_MUELU_EPETRA) -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_Epetra.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_Epetra.cpp deleted file mode 100644 index 430192bdaacb..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_Epetra.cpp +++ /dev/null @@ -1,542 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_epetra.cpp - * - * Created on: Mar 26, 2011 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_BlockedRAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedPFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_CoarseMapFactory.hpp" -#include "MueLu_AmalgamationFactory.hpp" - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using namespace MueLuTests; - using namespace Teuchos; - - oblackholestream blackhole; - GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - // default parameters - LO BGS_nSweeps = 3; - Scalar BGS_omega = 1.0; - - // Note: use --help to list available options. - CommandLineProcessor clp(false); - clp.setOption("BGS_sweeps", &BGS_nSweeps, "number of sweeps with BGS smoother"); - clp.setOption("BGS_omega", &BGS_omega, "scaling factor for BGS smoother"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - RCP > comm = DefaultComm::getComm(); - RCP out = fancyOStream(rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Time myTime("global"); - TimeMonitor MM(myTime); - - // custom parameters - LO maxLevels = 2; // TODO: singular system if MaxLevels > 2? - - GO maxCoarseSize = 1; // FIXME clp doesn't like long long int - - int globalNumDofs = 1500; // used for the maps - int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const RCP fullmap = rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - RCP epA = rcp(ptrA); - RCP epv = rcp(ptrf); - RCP epNS = rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - RCP A11; - RCP A12; - RCP A21; - RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - RCP > xA11 = rcp(new Xpetra::EpetraCrsMatrixT(A11)); - RCP > xA12 = rcp(new Xpetra::EpetraCrsMatrixT(A12)); - RCP > xA21 = rcp(new Xpetra::EpetraCrsMatrixT(A21)); - RCP > xA22 = rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - RCP > bOp = rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - - //////////////////////////////////////////////////// create Hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(VERB_HIGH); - H->SetMaxCoarseSize(maxCoarseSize); - - //////////////////////////////////////////////////////// finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(VERB_HIGH); - Finest->Set("A", rcp_dynamic_cast(bOp)); - - /////////////////////////////////////////////// define subblocks of A - // make A11 block and A22 block available as variable "A" generated - // by A11Fact and A22Fact - RCP A11Fact = rcp(new SubBlockAFactory()); - A11Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A11Fact->SetParameter("block row", ParameterEntry(0)); - A11Fact->SetParameter("block col", ParameterEntry(0)); - RCP A22Fact = rcp(new SubBlockAFactory()); - A22Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A22Fact->SetParameter("block row", ParameterEntry(1)); - A22Fact->SetParameter("block col", ParameterEntry(1)); - - ///////////////////////////////////////////// define smoother for A11 - // define block smoother for the first block matrix row in BlockGaussSeidel Smoother - std::string ifpack11Type; - ParameterList ifpack11List; - ifpack11List.set("relaxation: sweeps", (LO)3); - ifpack11List.set("relaxation: damping factor", (SC)0.5); - ifpack11Type = "RELAXATION"; - ifpack11List.set("relaxation: type", "Gauss-Seidel"); - RCP smoProto11 = rcp(new TrilinosSmoother(ifpack11Type, ifpack11List, 0)); - smoProto11->SetFactory("A", A11Fact); - RCP Smoo11Fact = rcp(new SmootherFactory(smoProto11)); - - ////////////////////////////////////////// prepare null space for A11 - RCP nullspace11 = MultiVectorFactory::Build(xstridedvelmap, 2); // this is a 2D standard null space - - for (int i = 0; i < nDofsPerNode - 1; ++i) { - ArrayRCP nsValues = nullspace11->getDataNonConst(i); - int numBlocks = nsValues.size() / (nDofsPerNode - 1); - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * (nDofsPerNode - 1) + i] = 1.0; - } - } - - Finest->Set("Nullspace1", nullspace11); - - ///////////////////////////////////////// define CoalesceDropFactory and Aggregation for A11 - // set up amalgamation for A11. Note: we're using a default null space factory (null) - RCP amalgFact11 = rcp(new AmalgamationFactory()); - amalgFact11->SetFactory("A", A11Fact); - RCP dropFact11 = rcp(new CoalesceDropFactory()); - dropFact11->SetFactory("A", A11Fact); - dropFact11->SetFactory("UnAmalgamationInfo", amalgFact11); - RCP CoupledAggFact11 = rcp(new UncoupledAggregationFactory()); - CoupledAggFact11->SetFactory("Graph", dropFact11); - CoupledAggFact11->SetMinNodesPerAggregate(5); - CoupledAggFact11->SetMaxNeighAlreadySelected(1); - CoupledAggFact11->SetOrdering("natural"); - - ///////////////////////////////////////// define transfer ops for A11 -#if 0 - // use PG-AMG - RCP P11tentFact = rcp(new TentativePFactory()); // check me - - RCP P11Fact = rcp(new PgPFactory()); - - RCP R11Fact = rcp(new GenericRFactory()); - - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1")); - nspFact11->SetFactory("Nullspace1", P11tentFact); - - RCP coarseMapFact11 = rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Nullspace", nspFact11); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Ptent", P11tentFact); - M11->SetFactory("Smoother", Smoo11Fact); - M11->SetFactory("CoarseMap", coarseMapFact11); - -#else - - RCP P11Fact = rcp(new TentativePFactory()); - - RCP R11Fact = rcp(new TransPFactory()); - - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1")); - nspFact11->SetFactory("Nullspace1", P11Fact); - - RCP coarseMapFact11 = rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Graph", dropFact11); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); - M11->SetFactory("Ptent", P11Fact); - M11->SetFactory("Smoother", Smoo11Fact); - M11->SetFactory("CoarseMap", coarseMapFact11); - -#if OLD - RCP P11Fact = rcp(new TentativePFactory(CoupledAggFact11, amalgFact11)); // check me - - RCP R11Fact = rcp(new TransPFactory(P11Fact)); - - RCP nspFact11 = rcp(new NullspaceFactory("Nullspace1", P11Fact)); - - RCP coarseMapFact11 = rcp(new CoarseMapFactory(CoupledAggFact11, nspFact11)); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Nullspace", nspFact11); - M11->SetFactory("Ptent", P11Fact); - M11->SetFactory("Smoother", Smoo11Fact); - M11->SetFactory("CoarseMap", coarseMapFact11); -#endif // TODO remove this - -#endif - M11->SetIgnoreUserData(true); // always use data from factories defined in factory manager - - ///////////////////////////////////////////// define smoother for A22 - std::string ifpack22Type; - ParameterList ifpack22List; - ifpack22List.set("relaxation: sweeps", (LO)1); - ifpack22List.set("relaxation: damping factor", (SC)0.3); - ifpack22Type = "RELAXATION"; - ifpack22List.set("relaxation: type", "Gauss-Seidel"); - RCP smoProto22 = rcp(new TrilinosSmoother(ifpack22Type, ifpack22List, 0)); - smoProto22->SetFactory("A", A22Fact); - RCP Smoo22Fact = rcp(new SmootherFactory(smoProto22)); - - ////////////////////////////////////////// prepare null space for A22 - RCP nullspace22 = MultiVectorFactory::Build(xstridedpremap, 1); // this is a 2D standard null space - ArrayRCP nsValues22 = nullspace22->getDataNonConst(0); - for (int j = 0; j < nsValues22.size(); ++j) { - nsValues22[j] = 1.0; - } - - Finest->Set("Nullspace2", nullspace22); - - ///////////////////////////////////////// define transfer ops for A22 -#if 0 - // use PGAMG - RCP amalgFact22 = rcp(new AmalgamationFactory(A22Fact)); - RCP P22tentFact = rcp(new TentativePFactory(CoupledAggFact11, amalgFact22)); // check me (fed with A22) wrong column GIDS!!! - - RCP P22Fact = rcp(new SaPFactory(P22tentFact)); - - //RCP R22Fact = rcp(new GenericRFactory(P22Fact)); - RCP R22Fact = rcp(new TransPFactory(P22Fact)); - - RCP nspFact22 = rcp(new NullspaceFactory("Nullspace2",P22tentFact)); - - RCP coarseMapFact22 = rcp(new CoarseMapFactory(CoupledAggFact11, nspFact22)); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); - M22->SetFactory("Aggregates", AggFact22); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("Ptent", P22tentFact); - M22->SetFactory("Smoother", Smoo22Fact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager - -#else - // use TentativePFactory - RCP amalgFact22 = rcp(new AmalgamationFactory()); - RCP P22Fact = rcp(new TentativePFactory()); // check me (fed with A22) wrong column GIDS!!! - - RCP R22Fact = rcp(new TransPFactory()); - - RCP nspFact22 = rcp(new NullspaceFactory("Nullspace2")); - nspFact22->SetFactory("Nullspace2", P22Fact); - - RCP coarseMapFact22 = rcp(new CoarseMapFactory()); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); - M22->SetFactory("Aggregates", CoupledAggFact11); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("Ptent", P22Fact); - M22->SetFactory("Smoother", Smoo22Fact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager -#endif - - /////////////////////////////////////////// define blocked transfer ops - RCP PFact = rcp(new BlockedPFactory()); // use row map index base from bOp - PFact->AddFactoryManager(M11); - PFact->AddFactoryManager(M22); - - RCP RFact = rcp(new GenericRFactory()); - RFact->SetFactory("P", PFact); - - RCP AcFact = rcp(new BlockedRAPFactory()); - AcFact->SetFactory("P", PFact); - AcFact->SetFactory("R", RFact); - - ////////////////////////////////////////////////////////////////////// - // Smoothers - RCP smootherPrototype = rcp(new BlockedGaussSeidelSmoother()); - smootherPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(BGS_nSweeps)); - smootherPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(BGS_omega)); - smootherPrototype->AddFactoryManager(M11, 0); - smootherPrototype->AddFactoryManager(M22, 1); - RCP smootherFact = rcp(new SmootherFactory(smootherPrototype)); - - // Coarse grid correction - RCP coarseSolverPrototype = rcp(new BlockedGaussSeidelSmoother()); - coarseSolverPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(BGS_nSweeps)); - coarseSolverPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(BGS_omega)); - coarseSolverPrototype->AddFactoryManager(M11, 0); - coarseSolverPrototype->AddFactoryManager(M22, 1); - RCP coarseSolverFact = rcp(new SmootherFactory(coarseSolverPrototype, null)); - - // main factory manager - FactoryManager M; - M.SetFactory("A", AcFact); - M.SetFactory("P", PFact); - M.SetFactory("R", RFact); - M.SetFactory("Smoother", smootherFact); // TODO fix me - M.SetFactory("PreSmoother", smootherFact); // TODO fix me - M.SetFactory("PostSmoother", smootherFact); // TODO fix me - M.SetFactory("CoarseSolver", coarseSolverFact); - - //////////////////////////////////// setup multigrid - - H->Setup(M, 0, maxLevels); - - *out << std::endl; - *out << "print content of multigrid levels:" << std::endl; - - Finest->print(*out); - - RCP coarseLevel = H->GetLevel(1); - coarseLevel->print(*out); - - // RCP coarseLevel2 = H->GetLevel(2); - // coarseLevel2->print(*out); - - RCP xLsg = MultiVectorFactory::Build(xstridedfullmap, 1); - - // Use AMG directly as an iterative method - { - xLsg->putScalar((SC)0.0); - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = rcp(new Xpetra::EpetraVectorT(epv)); - - // calculate initial (absolute) residual - Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs, *xLsg, 100); - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(xstridedfullmap, 1); - bOp->apply(*xLsg, *xTmp, NO_TRANS, (SC)1.0, (SC)0.0); - xRhs->update((SC)-1.0, *xTmp, (SC)1.0); - xRhs->norm2(norms); - *out << "||r|| = " << norms[0] << std::endl; - } - - // TODO: don't forget to add Aztec as prerequisite in CMakeLists.txt! - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_SERIAL) && defined(HAVE_MUELU_EPETRA) -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_Simple.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_Simple.cpp deleted file mode 100644 index d69e6e715baf..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_Simple.cpp +++ /dev/null @@ -1,533 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_epetra.cpp - * - * Created on: Mar 26, 2011 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_BlockedRAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedPFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_SchurComplementFactory.hpp" -#include "MueLu_SimpleSmoother.hpp" -#include "MueLu_InverseApproximationFactory.hpp" - -#include "MueLu_CoarseMapFactory.hpp" - -#include "MueLu_AmalgamationFactory.hpp" -#include "MueLu_AggregationExportFactory.hpp" - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - // - RCP > comm = Teuchos::DefaultComm::getComm(); - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Teuchos::Time myTime("global"); - Teuchos::TimeMonitor MM(myTime); - - // custom parameters - LocalOrdinal maxLevels = 3; - - GlobalOrdinal maxCoarseSize = 1; // FIXME clp doesn't like long long int - - int globalNumDofs = 1500; // used for the maps - int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const RCP fullmap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - - RCP epA = Teuchos::rcp(ptrA); - RCP epv = Teuchos::rcp(ptrf); - RCP epNS = Teuchos::rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - Teuchos::RCP A11; - Teuchos::RCP A12; - Teuchos::RCP A21; - Teuchos::RCP A22; - - if (MueLuTests::SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - Teuchos::RCP > xA11 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A11)); - Teuchos::RCP > xA12 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A12)); - Teuchos::RCP > xA21 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A21)); - Teuchos::RCP > xA22 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - Teuchos::RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - Teuchos::RCP > bOp = Teuchos::rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - - //////////////////////////////////////////////////// create Hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - // H->setDefaultVerbLevel(Teuchos::VERB_NONE); - H->SetMaxCoarseSize(maxCoarseSize); - - //////////////////////////////////////////////////////// finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Teuchos::rcp_dynamic_cast(bOp)); - - /////////////////////////////////////////////// define subblocks of A - // make A11 block and A22 block available as variable "A" generated - // by A11Fact and A22Fact - RCP A11Fact = rcp(new SubBlockAFactory()); - A11Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A11Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - A11Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - RCP A22Fact = rcp(new SubBlockAFactory()); - A22Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A22Fact->SetParameter("block row", Teuchos::ParameterEntry(1)); - A22Fact->SetParameter("block col", Teuchos::ParameterEntry(1)); - - ////////////////////////////////////////// prepare null space for A11 - RCP nullspace11 = MultiVectorFactory::Build(xstridedvelmap, 2); // this is a 2D standard null space - - for (int i = 0; i < nDofsPerNode - 1; ++i) { - Teuchos::ArrayRCP nsValues = nullspace11->getDataNonConst(i); - int numBlocks = nsValues.size() / (nDofsPerNode - 1); - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * (nDofsPerNode - 1) + i] = 1.0; - } - } - - Finest->Set("Nullspace1", nullspace11); - - ///////////////////////////////////////// define CoalesceDropFactory and Aggregation for A11 - // set up amalgamation for A11. Note: we're using a default null space factory (Teuchos::null) - RCP amalgFact11 = rcp(new AmalgamationFactory()); - amalgFact11->SetFactory("A", A11Fact); - - amalgFact11->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - RCP dropFact11 = rcp(new CoalesceDropFactory()); - dropFact11->SetFactory("A", A11Fact); - dropFact11->SetFactory("UnAmalgamationInfo", amalgFact11); - dropFact11->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - RCP CoupledAggFact11 = rcp(new UncoupledAggregationFactory()); - CoupledAggFact11->SetFactory("Graph", dropFact11); - CoupledAggFact11->SetMinNodesPerAggregate(9); - CoupledAggFact11->SetMaxNeighAlreadySelected(2); - CoupledAggFact11->SetOrdering("natural"); - - ///////////////////////////////////////// define transfer ops for A11 -#if 0 - // use PG-AMG - RCP P11Fact = rcp(new PgPFactory()); - - RCP R11Fact = rcp(new GenericRFactory()); - Teuchos::RCP nspFact11 = Teuchos::rcp(new NullspaceFactory("Nullspace1",P11tentFact)); - - Teuchos::RCP nspFact11 = Teuchos::rcp(new NullspaceFactory("Nullspace1")); - - RCP coarseMapFact11 = Teuchos::rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); - // M11->SetFactory("Ptent", P11tentFact); - M11->SetFactory("CoarseMap", coarseMapFact11); -#else - RCP P11Fact = rcp(new TentativePFactory()); - - RCP R11Fact = rcp(new TransPFactory()); - - Teuchos::RCP nspFact11 = Teuchos::rcp(new NullspaceFactory("Nullspace1")); - nspFact11->SetFactory("Nullspace1", P11Fact); - - RCP coarseMapFact11 = Teuchos::rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Aggregates", CoupledAggFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); - // M11->SetFactory("Ptent", P11Fact); - M11->SetFactory("CoarseMap", coarseMapFact11); - M11->SetFactory("Graph", dropFact11); -#endif - M11->SetIgnoreUserData(true); // always use data from factories defined in factory manager - - ////////////////////////////////////////// prepare null space for A22 - RCP nullspace22 = MultiVectorFactory::Build(xstridedpremap, 1); // this is a 2D standard null space - Teuchos::ArrayRCP nsValues22 = nullspace22->getDataNonConst(0); - for (int j = 0; j < nsValues22.size(); ++j) { - nsValues22[j] = 1.0; - } - - Finest->Set("Nullspace2", nullspace22); - - ///////////////////////////////////////// define transfer ops for A22 -#if 0 - // use PGAMG - RCP amalgFact22 = rcp(new AmalgamationFactory(A22Fact)); - RCP P22tentFact = rcp(new TentativePFactory(CoupledAggFact11, amalgFact22)); - - RCP P22Fact = rcp(new SaPFactory(P22tentFact)); - - //RCP R22Fact = rcp(new GenericRFactory(P22Fact)); - RCP R22Fact = rcp(new TransPFactory(P22Fact)); - - Teuchos::RCP nspFact22 = Teuchos::rcp(new NullspaceFactory("Nullspace2",P22tentFact)); - RCP coarseMapFact22 = Teuchos::rcp(new CoarseMapFactory(CoupledAggFact11, nspFact22)); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); - M22->SetFactory("Aggregates", AggFact22); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("Ptent", P22tentFact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager - -#else - // use TentativePFactory - RCP amalgFact22 = rcp(new AmalgamationFactory()); - RCP P22Fact = rcp(new TentativePFactory()); // check me (fed with A22) wrong column GIDS!!! - - RCP R22Fact = rcp(new TransPFactory()); - - Teuchos::RCP nspFact22 = Teuchos::rcp(new NullspaceFactory("Nullspace2")); - nspFact22->SetFactory("Nullspace2", P22Fact); - RCP coarseMapFact22 = Teuchos::rcp(new CoarseMapFactory()); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("Aggregates", CoupledAggFact11); - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); - M22->SetFactory("Ptent", P22Fact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); // always use data from factories defined in factory manager -#endif - - /////////////////////////////////////////// define blocked transfer ops - RCP PFact = rcp(new BlockedPFactory()); - PFact->AddFactoryManager(M11); - PFact->AddFactoryManager(M22); - - RCP RFact = rcp(new GenericRFactory()); - RFact->SetFactory("P", PFact); - - RCP AcFact = rcp(new BlockedRAPFactory()); - AcFact->SetFactory("P", PFact); - AcFact->SetFactory("R", RFact); - - *out << "Creating Simple Smoother" << std::endl; - - ////////////////////////////////////////////////////////////////////// - // Smoothers - - RCP A00Fact = Teuchos::rcp(new SubBlockAFactory()); - A00Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A00Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - A00Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - std::string ifpackTypePredictSmoother; - Teuchos::ParameterList ifpackListPredictSmoother; - ifpackListPredictSmoother.set("relaxation: sweeps", (LocalOrdinal)1); - ifpackListPredictSmoother.set("relaxation: damping factor", (Scalar)0.5); - ifpackTypePredictSmoother = "RELAXATION"; - ifpackListPredictSmoother.set("relaxation: type", "Gauss-Seidel"); - RCP smoProtoPredict = rcp(new TrilinosSmoother(ifpackTypePredictSmoother, ifpackListPredictSmoother, 0)); - smoProtoPredict->SetFactory("A", A00Fact); - RCP SmooPredictFact = rcp(new SmootherFactory(smoProtoPredict)); - - RCP MPredict = rcp(new FactoryManager()); - MPredict->SetFactory("A", A00Fact); // SchurComplement operator for correction step (defined as "A") - MPredict->SetFactory("Smoother", SmooPredictFact); // solver/smoother for correction step - MPredict->SetFactory("PreSmoother", SmooPredictFact); - MPredict->SetFactory("PostSmoother", SmooPredictFact); - MPredict->SetIgnoreUserData(true); // always use data from factories defined in factory manager - - //////////////////////////////////////////////// - // InverseApproximation - Teuchos::RCP AinvFact = Teuchos::rcp(new InverseApproximationFactory()); - AinvFact->SetFactory("A", A11Fact); - AinvFact->SetParameter("inverse: approximation type", Teuchos::ParameterEntry(std::string("lumping"))); - - // SchurComp - // create SchurComp factory (SchurComplement smoother is provided by local FactoryManager) - Teuchos::RCP SFact = Teuchos::rcp(new SchurComplementFactory()); - SFact->SetParameter("omega", Teuchos::ParameterEntry(0.8)); - SFact->SetFactory("A", MueLu::NoFactory::getRCP()); // 2x2 blocked operator - SFact->SetFactory("Ainv", AinvFact); - - // define SchurComplement solver - std::string ifpackTypeSchurSmoother; - ifpackTypeSchurSmoother = "RELAXATION"; - Teuchos::ParameterList ifpackListSchurSmoother; - ifpackListSchurSmoother.set("relaxation: sweeps", (LocalOrdinal)10); - ifpackListSchurSmoother.set("relaxation: damping factor", (Scalar)0.8); - ifpackListSchurSmoother.set("relaxation: type", "Gauss-Seidel"); - RCP smoProtoSC = rcp(new TrilinosSmoother(ifpackTypeSchurSmoother, ifpackListSchurSmoother, 0)); - smoProtoSC->SetFactory("A", SFact); // explicitely use SchurComplement matrix as input for smoother - RCP SmooSCFact = rcp(new SmootherFactory(smoProtoSC)); - - // setup local factory manager for SchurComplementFactory - Teuchos::RCP MSchur = Teuchos::rcp(new FactoryManager()); - MSchur->SetFactory("A", SFact); // SchurCompFactory as generating factory for SchurComp equation - MSchur->SetFactory("Smoother", SmooSCFact); - MSchur->SetIgnoreUserData(true); - - ///////////////////////////////////////////////////// - // create smoother prototype - - RCP smootherPrototype = rcp(new SimpleSmoother()); - smootherPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(3)); - smootherPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(0.6)); - - smootherPrototype->AddFactoryManager(MPredict, 0); // set temporary factory manager for prediction step - smootherPrototype->AddFactoryManager(MSchur, 1); // set temporary factory manager for correction step - smootherPrototype->SetFactory("A", MueLu::NoFactory::getRCP()); - - ///////////////////////////////////////////////////// - // create smoother factories - RCP smootherFact = rcp(new SmootherFactory(smootherPrototype)); // pre and postsmoothing with SIMPLE on the finest and intermedium levels - RCP coarseSmootherFact = rcp(new SmootherFactory(smootherPrototype, Teuchos::null)); // only presmoothing on finest level (we do not want to run two SIMPLE iterations on the coarsest level) - - // main factory manager - FactoryManager M; - M.SetFactory("A", AcFact); - M.SetFactory("P", PFact); - M.SetFactory("R", RFact); - M.SetFactory("Smoother", smootherFact); // TODO fix me - M.SetFactory("CoarseSolver", coarseSmootherFact); - - //////////////////////////////////// setup multigrid - - H->Setup(M, 0, maxLevels); - - Finest->print(*out); - - RCP coarseLevel = H->GetLevel(1); - coarseLevel->print(*out); - - // RCP coarseLevel2 = H->GetLevel(2); - // coarseLevel2->print(*out); - - RCP xLsg = MultiVectorFactory::Build(xstridedfullmap, 1); - - // Use AMG directly as an iterative method -#if 0 - { - xLsg->putScalar( (SC) 0.0); - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = Teuchos::rcp(new Xpetra::EpetraVector(epv)); - - // calculate initial (absolute) residual - Teuchos::Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs,*xLsg,100); - - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(xstridedfullmap,1); - bOp->apply(*xLsg,*xTmp,Teuchos::NO_TRANS,(SC)1.0,(SC)0.0); - xRhs->update((SC)-1.0,*xTmp,(SC)1.0); - xRhs->norm2(norms); - *out << "||x|| = " << norms[0] << std::endl; - } -#endif - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_SERIAL) && defined(HAVE_MUELU_EPETRA) -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_SimpleSmoother.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_SimpleSmoother.cpp deleted file mode 100644 index 4787a426294f..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_SimpleSmoother.cpp +++ /dev/null @@ -1,353 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_SimpleSmoother.hpp" -#include "MueLu_SchurComplementFactory.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_TopSmootherFactory.hpp" -#include "MueLu_HierarchyUtils.hpp" -#include "MueLu_InverseApproximationFactory.hpp" - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using namespace MueLuTests; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Teuchos::Time myTime("global"); - Teuchos::TimeMonitor MM(myTime); - - // read in input parameters - - // default parameters - LO SIMPLE_nSweeps = 600; - Scalar SIMPLE_omega = 0.5; - LO SC_nSweeps = 10; - Scalar SC_omega = 1.0; - LO PRED_nSweeps = 3; - Scalar PRED_omega = 1.0; - LO useSIMPLEC = 0; - - int SC_bUseDirectSolver = 0; - - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - clp.setOption("SIMPLE_sweeps", &SIMPLE_nSweeps, "number of sweeps with SIMPLE smoother"); - clp.setOption("SIMPLE_omega", &SIMPLE_omega, "scaling factor for SIMPLE smoother"); - clp.setOption("Predict_sweeps", &PRED_nSweeps, "number of sweeps for SIMPLE internal velocity prediction smoother (GaussSeidel)"); - clp.setOption("Predict_omega", &PRED_omega, "damping parameter for SIMPLE internal velocity prediction smoother (GaussSeidel)"); - clp.setOption("SchurComp_sweeps", &SC_nSweeps, "number of sweeps for SIMPLE internal SchurComp solver/smoother (GaussSeidel)"); - clp.setOption("SchurComp_omega", &SC_omega, "damping parameter for SIMPLE internal SchurComp solver/smoother (GaussSeidel)"); - clp.setOption("SchurComp_solver", &SC_bUseDirectSolver, "if 1: use direct solver for SchurComp equation, otherwise use GaussSeidel smoother"); - clp.setOption("useSIMPLEC", &useSIMPLEC, "if 1: use SIMPLEC instead of SIMPLE (default = 0 (SIMPLE))"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - int globalNumDofs = 1500; // used for the maps - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for our splitting routine - const RCP fullmap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = Teuchos::rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - - RCP epA = Teuchos::rcp(ptrA); - RCP epv = Teuchos::rcp(ptrf); - RCP epNS = Teuchos::rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - Teuchos::RCP A11; - Teuchos::RCP A12; - Teuchos::RCP A21; - Teuchos::RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - Teuchos::RCP > xA11 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A11)); - Teuchos::RCP > xA12 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A12)); - Teuchos::RCP > xA21 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A21)); - Teuchos::RCP > xA22 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - Teuchos::RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - Teuchos::RCP > bOp = Teuchos::rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - //////////////////////////////////////////////////////// finest Level - RCP Finest = rcp(new Level()); - Finest->setDefaultVerbLevel(Teuchos::VERB_NONE); - Finest->Set("A", Teuchos::rcp_dynamic_cast(bOp)); - - /////////////////////////////////// - // Test Braess Sarazin Smoother as a solver - - *out << "Test: Creating SIMPLE Smoother" << std::endl; - *out << "Test: Omega for SIMPLE = " << SIMPLE_omega << std::endl; - *out << "Test: Number of sweeps for SIMPLE = " << SIMPLE_nSweeps << std::endl; - *out << "Test: Omega for Schur Complement solver= " << SC_omega << std::endl; - *out << "Test: Number of Schur Complement solver= " << SC_nSweeps << std::endl; - *out << "Test: Setting up Braess Sarazin Smoother" << std::endl; - - // define SIMPLE Smoother with SIMPLE_nSweeps and SIMPLE_omega as scaling factor - // AFact_ = Teuchos::null (= default) for the 2x2 blocked operator - RCP SimpleSm = rcp(new SimpleSmoother()); - SimpleSm->SetParameter("Sweeps", Teuchos::ParameterEntry(SIMPLE_nSweeps)); - SimpleSm->SetParameter("Damping factor", Teuchos::ParameterEntry(SIMPLE_omega)); - if (useSIMPLEC == 1) SimpleSm->SetParameter("UseSIMPLEC", Teuchos::ParameterEntry(true)); - - RCP smootherFact = rcp(new SmootherFactory(SimpleSm)); - - // define smoother for velocity prediction - // RCP A00Fact = Teuchos::rcp(new SubBlockAFactory(MueLu::NoFactory::getRCP(), 0, 0)); - RCP A00Fact = rcp(new SubBlockAFactory()); - A00Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A00Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - A00Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - RCP smoProtoPredict = Teuchos::null; - std::string ifpackPredictType; - Teuchos::ParameterList ifpackPredictList; - ifpackPredictList.set("relaxation: sweeps", PRED_nSweeps); - ifpackPredictList.set("relaxation: damping factor", PRED_omega); - ifpackPredictType = "RELAXATION"; - ifpackPredictList.set("relaxation: type", "Gauss-Seidel"); - smoProtoPredict = rcp(new TrilinosSmoother(ifpackPredictType, ifpackPredictList, 0)); - smoProtoPredict->SetFactory("A", A00Fact); - RCP SmooPredictFact = rcp(new SmootherFactory(smoProtoPredict)); - // define temporary FactoryManager that is used as input for BraessSarazin smoother - RCP MPredict = rcp(new FactoryManager()); - MPredict->SetFactory("A", A00Fact); - MPredict->SetFactory("Smoother", SmooPredictFact); // solver/smoother for correction step - MPredict->SetFactory("PreSmoother", SmooPredictFact); - MPredict->SetFactory("PostSmoother", SmooPredictFact); - MPredict->SetIgnoreUserData(true); // always use data from factories defined in factory manager - SimpleSm->SetVelocityPredictionFactoryManager(MPredict); // set temporary factory manager in BraessSarazin smoother - - // define SchurComplement Factory - // SchurComp gets a RCP to AFact_ which has to be the 2x2 blocked operator - // It stores the resulting SchurComplement operator as "A" generated by the SchurComplementFactory - // Instead of F^{-1} it uses the approximation \hat{F}^{-1} with \hat{F} = diag(F) - // InverseApproximation - Teuchos::RCP AinvFact = Teuchos::rcp(new InverseApproximationFactory()); - AinvFact->SetFactory("A", A00Fact); - if (useSIMPLEC == 1) AinvFact->SetParameter("inverse: approximation type", Teuchos::ParameterEntry(std::string("lumping"))); - - RCP SFact = Teuchos::rcp(new SchurComplementFactory()); - SFact->SetParameter("omega", Teuchos::ParameterEntry(1.0)); // for Simple, omega is always 1.0 in the SchurComplement - SFact->SetFactory("A", MueLu::NoFactory::getRCP()); - - // define smoother/solver for BraessSarazin - RCP smoProtoSC = Teuchos::null; - if (SC_bUseDirectSolver != 1) { - // Smoother Factory, using SFact as a factory for A - std::string ifpackSCType; - Teuchos::ParameterList ifpackSCList; - ifpackSCList.set("relaxation: sweeps", SC_nSweeps); - ifpackSCList.set("relaxation: damping factor", SC_omega); - ifpackSCType = "RELAXATION"; - ifpackSCList.set("relaxation: type", "Gauss-Seidel"); - smoProtoSC = rcp(new TrilinosSmoother(ifpackSCType, ifpackSCList, 0)); - smoProtoSC->SetFactory("A", SFact); - } else { - Teuchos::ParameterList ifpackDSList; - std::string ifpackDSType; - smoProtoSC = rcp(new DirectSolver(ifpackDSType, ifpackDSList)); - smoProtoSC->SetFactory("A", SFact); - } - - RCP SmooSCFact = rcp(new SmootherFactory(smoProtoSC)); - - // define temporary FactoryManager that is used as input for BraessSarazin smoother - RCP MB = rcp(new FactoryManager()); - MB->SetFactory("A", SFact); // SchurComplement operator for correction step (defined as "A") - MB->SetFactory("Smoother", SmooSCFact); // solver/smoother for correction step - MB->SetFactory("PreSmoother", SmooSCFact); - MB->SetFactory("PostSmoother", SmooSCFact); - MB->SetIgnoreUserData(true); // always use data from factories defined in factory manager - SimpleSm->SetSchurCompFactoryManager(MB); // set temporary factory manager in BraessSarazin smoother - - // setup main factory manager - RCP M = rcp(new FactoryManager()); - M->SetFactory("A", MueLu::NoFactory::getRCP()); // this is the 2x2 blocked operator - M->SetFactory("Smoother", smootherFact); // BraessSarazin block smoother - M->SetFactory("PreSmoother", smootherFact); - M->SetFactory("PostSmoother", smootherFact); - - MueLu::SetFactoryManager SFMCoarse(Finest, M); - Finest->Request(MueLu::TopSmootherFactory(M, "Smoother")); - - // call setup (= extract blocks and extract diagonal of F) - SimpleSm->Setup(*Finest); - - RCP xtest = MultiVectorFactory::Build(xstridedfullmap, 1); - xtest->putScalar((Scalar)0.0); - - RCP xR = Teuchos::rcp(new Xpetra::EpetraVectorT(epv)); - // calculate initial (absolute) residual - Teuchos::Array::magnitudeType> norms(1); - - xR->norm2(norms); - *out << "Test: ||x_0|| = " << norms[0] << std::endl; - *out << "Test: Applying Simple Smoother" << std::endl; - *out << "Test: START DATA" << std::endl; - *out << "iterations\tVelocity_residual\tPressure_residual" << std::endl; - SimpleSm->Apply(*xtest, *xR); - xtest->norm2(norms); - *out << "Test: ||x_1|| = " << norms[0] << std::endl; - - Teuchos::Array::magnitudeType> test = MueLu::Utilities::ResidualNorm(*bOp, *xtest, *xR); - *out << "residual norm: " << test[0] << std::endl; - - success = (test[0] < 1.0e-7); - if (!success) - *out << "no convergence" << std::endl; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra needs Serial node. Please recompile MueLu with the Serial node enabled." << std::endl; - return EXIT_SUCCESS; -#endif // #if defined(HAVE_MUELU_SERIAL) && defined(HAVE_MUELU_EPETRA) -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_test2.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_test2.cpp deleted file mode 100644 index f972f2d81dee..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_test2.cpp +++ /dev/null @@ -1,612 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_BlockedRAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedPFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_SchurComplementFactory.hpp" -#include "MueLu_BraessSarazinSmoother.hpp" - -#include "MueLu_CoarseMapFactory.hpp" - -#include "MueLu_AmalgamationFactory.hpp" -#include "MueLu_AggregationExportFactory.hpp" - -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) -#include "MueLu_RepartitionFactory.hpp" -#include "MueLu_RepartitionHeuristicFactory.hpp" -#include "MueLu_RebalanceTransferFactory.hpp" -#include "MueLu_IsorropiaInterface.hpp" -#include "MueLu_RebalanceBlockAcFactory.hpp" -#include "MueLu_RebalanceBlockInterpolationFactory.hpp" -#include "MueLu_RebalanceBlockRestrictionFactory.hpp" -#include "MueLu_RepartitionInterface.hpp" -#include "MueLu_CloneRepartitionInterface.hpp" -#endif - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - * - * 3 level multigrid with Braess-Sarazin smoother - * Reuse aggregates of block 0 for aggregates in block 1 - * - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using Teuchos::rcpFromRef; - using namespace MueLuTests; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Teuchos::Time myTime("global"); - Teuchos::TimeMonitor MM(myTime); - - // read in some command line parameters - Teuchos::CommandLineProcessor clp(false); - - int rebalanceBlocks = 1; - clp.setOption("rebalanceBlocks", &rebalanceBlocks, "rebalance blocks (1=yes, else=no)"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) -#ifndef HAVE_XPETRA_INT_LONG_LONG - *out << "Warning: scaling test was not compiled with long long int support" << std::endl; - - // custom parameters - LocalOrdinal maxLevels = 3; - - GlobalOrdinal maxCoarseSize = 1; // FIXME clp doesn't like long long int - - int globalNumDofs = 1500; // used for the maps - int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const RCP fullmap = rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - // EpetraExt::MatrixMarketFileToCrsMatrix("/home/tobias/promotion/trilinos/fc17-dyn/packages/muelu/test/navierstokes/A_re1000_5932.txt",*fullmap,*fullmap,*fullmap,ptrA); - // EpetraExt::MatrixMarketFileToVector("/home/tobias/promotion/trilinos/fc17-dyn/packages/muelu/test/navierstokes/b_re1000_5932.txt",*fullmap,ptrf); - - RCP epA = Teuchos::rcp(ptrA); - RCP epv = Teuchos::rcp(ptrf); - RCP epNS = Teuchos::rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - Teuchos::RCP A11; - Teuchos::RCP A12; - Teuchos::RCP A21; - Teuchos::RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - Teuchos::RCP > xA11 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A11)); - Teuchos::RCP > xA12 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A12)); - Teuchos::RCP > xA21 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A21)); - Teuchos::RCP > xA22 = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - Teuchos::RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap, xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - Teuchos::RCP > bOp = Teuchos::rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - - //////////////////////////////////////////////////// create Hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - // H->setDefaultVerbLevel(Teuchos::VERB_NONE); - H->SetMaxCoarseSize(maxCoarseSize); - - //////////////////////////////////////////////////////// finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Teuchos::rcp_dynamic_cast(bOp)); - - ////////////////////////////////////////// prepare null space for A11 - RCP nullspace11 = MultiVectorFactory::Build(xstridedvelmap, 2); // this is a 2D standard null space - - for (int i = 0; i < nDofsPerNode - 1; ++i) { - Teuchos::ArrayRCP nsValues = nullspace11->getDataNonConst(i); - int numBlocks = nsValues.size() / (nDofsPerNode - 1); - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * (nDofsPerNode - 1) + i] = 1.0; - } - } - - Finest->Set("Nullspace1", nullspace11); - - ////////////////////////////////////////// prepare null space for A22 - RCP nullspace22 = MultiVectorFactory::Build(xstridedpremap, 1); // this is a 2D standard null space - Teuchos::ArrayRCP nsValues22 = nullspace22->getDataNonConst(0); - for (int j = 0; j < nsValues22.size(); ++j) { - nsValues22[j] = 1.0; - } - - Finest->Set("Nullspace2", nullspace22); - - /////////////////////////////////////////// define rebalanced block AC factory - // This is the main factory for "A" and defines the input for - // - the SubBlockAFactory objects - // - the rebalanced block Ac factory - RCP RebalancedAcFact = rcp(new RebalanceBlockAcFactory()); - - /////////////////////////////////////////// define non-rebalanced blocked transfer ops - RCP PFact = rcp(new BlockedPFactory()); // use row map index base from bOp - RCP RFact = rcp(new GenericRFactory()); - RFact->SetFactory("P", PFact); - - // non-rebalanced block coarse matrix factory - // output is non-rebalanced coarse block matrix Ac - // used as input for rebalanced block coarse factory RebalancedAcFact - RCP AcFact = rcp(new BlockedRAPFactory()); - AcFact->SetFactory("A", MueLu::NoFactory::getRCP()); - AcFact->SetFactory("P", PFact); // use non-rebalanced block prolongator as input - AcFact->SetFactory("R", RFact); // use non-rebalanced block restrictor as input - - // Repartitioning (decides how many partitions are built) - RCP RepartitionHeuristicFact = rcp(new RepartitionHeuristicFactory()); - { - Teuchos::ParameterList paramList; - paramList.set("repartition: min rows per proc", 200); - paramList.set("repartition: max imbalance", 1.3); - if (rebalanceBlocks == 1) - paramList.set("repartition: start level", 1); - else - paramList.set("repartition: start level", 10); // supress rebalancing - RepartitionHeuristicFact->SetParameterList(paramList); - } - RepartitionHeuristicFact->SetFactory("A", AcFact); - - // define matrix sub-blocks of possibly rebalanced block matrix A - // These are used as input for - // - the sub blocks of the transfer operators - RCP A11Fact = Teuchos::rcp(new SubBlockAFactory()); - A11Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A11Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - A11Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - /*A11Fact->SetParameter("Range map: Striding info",Teuchos::ParameterEntry(std::string("{ 2 1 }"))); - A11Fact->SetParameter("Range map: Strided block id",Teuchos::ParameterEntry(0)); - A11Fact->SetParameter("Domain map: Striding info",Teuchos::ParameterEntry(std::string("{ 2 1 }"))); - A11Fact->SetParameter("Domain map: Strided block id",Teuchos::ParameterEntry(0));*/ - - RCP A22Fact = Teuchos::rcp(new SubBlockAFactory()); - A22Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A22Fact->SetParameter("block row", Teuchos::ParameterEntry(1)); - A22Fact->SetParameter("block col", Teuchos::ParameterEntry(1)); - /*A22Fact->SetParameter("Range map: Striding info",Teuchos::ParameterEntry(std::string("{ 2 1 }"))); - A22Fact->SetParameter("Range map: Strided block id",Teuchos::ParameterEntry(1)); - A22Fact->SetParameter("Domain map: Striding info",Teuchos::ParameterEntry(std::string("{ 2 1 }"))); - A22Fact->SetParameter("Domain map: Strided block id",Teuchos::ParameterEntry(1));*/ - - /////////////////////////////////////////// define rebalancing factories - // define sub blocks of the coarse non-rebalanced block matrix Ac - // input is the block operator generated by AcFact - RCP rebA11Fact = Teuchos::rcp(new SubBlockAFactory()); - rebA11Fact->SetFactory("A", AcFact); - rebA11Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - rebA11Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - rebA11Fact->SetParameter("Range map: Striding info", Teuchos::ParameterEntry(std::string("{ 2, 1 }"))); - rebA11Fact->SetParameter("Range map: Strided block id", Teuchos::ParameterEntry(0)); - rebA11Fact->SetParameter("Domain map: Striding info", Teuchos::ParameterEntry(std::string("{ 2, 1 }"))); - rebA11Fact->SetParameter("Domain map: Strided block id", Teuchos::ParameterEntry(0)); - - RCP rebA22Fact = Teuchos::rcp(new SubBlockAFactory()); - rebA22Fact->SetFactory("A", AcFact); - rebA22Fact->SetParameter("block row", Teuchos::ParameterEntry(1)); - rebA22Fact->SetParameter("block col", Teuchos::ParameterEntry(1)); - rebA22Fact->SetParameter("Range map: Striding info", Teuchos::ParameterEntry(std::string("{ 2, 1 }"))); - rebA22Fact->SetParameter("Range map: Strided block id", Teuchos::ParameterEntry(1)); - rebA22Fact->SetParameter("Domain map: Striding info", Teuchos::ParameterEntry(std::string("{ 2, 1 }"))); - rebA22Fact->SetParameter("Domain map: Strided block id", Teuchos::ParameterEntry(1)); - - // define rebalancing factory for coarse block matrix A(1,1) - RCP rebAmalgFact11 = rcp(new AmalgamationFactory()); - rebAmalgFact11->SetFactory("A", rebA11Fact); - rebAmalgFact11->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - - RCP > isoInterface1 = rcp(new MueLu::IsorropiaInterface()); - isoInterface1->SetFactory("A", rebA11Fact); - isoInterface1->SetFactory("number of partitions", RepartitionHeuristicFact); - isoInterface1->SetFactory("UnAmalgamationInfo", rebAmalgFact11); - - RCP > repInterface1 = rcp(new MueLu::RepartitionInterface()); - repInterface1->SetFactory("A", rebA11Fact); - repInterface1->SetFactory("number of partitions", RepartitionHeuristicFact); - repInterface1->SetFactory("AmalgamatedPartition", isoInterface1); - - // Repartitioning (creates "Importer" from "Partition") - RCP RepartitionFact = rcp(new RepartitionFactory()); - RepartitionFact->SetFactory("A", rebA11Fact); - RepartitionFact->SetFactory("number of partitions", RepartitionHeuristicFact); - RepartitionFact->SetFactory("Partition", repInterface1); - RepartitionFact->SetParameter("repartition: print partition distribution", Teuchos::ParameterEntry(true)); - RepartitionFact->SetParameter("repartition: remap parts", Teuchos::ParameterEntry(true)); - - // define rebalancing factory for coarse block matrix A(1,1) - RCP rebAmalgFact22 = rcp(new AmalgamationFactory()); - rebAmalgFact22->SetFactory("A", rebA22Fact); - rebAmalgFact22->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - - RCP > repInterface2 = rcp(new MueLu::CloneRepartitionInterface()); - repInterface2->SetFactory("A", rebA22Fact); - repInterface2->SetFactory("number of partitions", RepartitionHeuristicFact); - repInterface2->SetFactory("Partition", repInterface1); - - // second repartition factory - RCP RepartitionFact2 = rcp(new RepartitionFactory()); - RepartitionFact2->SetFactory("A", rebA22Fact); - RepartitionFact2->SetFactory("number of partitions", RepartitionHeuristicFact); - RepartitionFact2->SetFactory("Partition", repInterface2); // this is not valid - RepartitionFact2->SetParameter("repartition: print partition distribution", Teuchos::ParameterEntry(true)); - RepartitionFact2->SetParameter("repartition: remap parts", Teuchos::ParameterEntry(false)); /* do not remap! */ - - ////////////////////////////////////////// build non-rebalanced matrix blocks - // build factories for transfer operator P(1,1) and R(1,1) - RCP amalgFact11 = rcp(new AmalgamationFactory()); - amalgFact11->SetFactory("A", A11Fact); - amalgFact11->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - - RCP dropFact11 = rcp(new CoalesceDropFactory()); - dropFact11->SetFactory("A", A11Fact); - dropFact11->SetFactory("UnAmalgamationInfo", amalgFact11); - dropFact11->setDefaultVerbLevel(Teuchos::VERB_EXTREME); - - RCP UncoupledAggFact11 = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact11->SetFactory("Graph", dropFact11); - UncoupledAggFact11->SetMinNodesPerAggregate(9); - UncoupledAggFact11->SetMaxNeighAlreadySelected(2); - UncoupledAggFact11->SetOrdering("natural"); - - RCP coarseMapFact11 = Teuchos::rcp(new CoarseMapFactory()); - coarseMapFact11->setStridingData(stridingInfo); - coarseMapFact11->setStridedBlockId(0); - - RCP P11Fact = rcp(new TentativePFactory()); - RCP R11Fact = rcp(new TransPFactory()); - - Teuchos::RCP nspFact11 = Teuchos::rcp(new NullspaceFactory("Nullspace1")); - nspFact11->SetFactory("Nullspace1", P11Fact); // pick "Nullspace1" from Finest level - - //////////////////////////////// define factory manager for (1,1) block - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); // rebalanced fine-level block operator - M11->SetFactory("P", P11Fact); // non-rebalanced transfer operator block P(1,1) - M11->SetFactory("R", R11Fact); // non-rebalanced transfer operator block R(1,1) - M11->SetFactory("Aggregates", UncoupledAggFact11); - M11->SetFactory("Graph", dropFact11); - M11->SetFactory("DofsPerNode", dropFact11); - M11->SetFactory("UnAmalgamationInfo", amalgFact11); - M11->SetFactory("Nullspace", nspFact11); // TODO check me? - M11->SetFactory("CoarseMap", coarseMapFact11); - M11->SetIgnoreUserData(true); // always use data from factories defined in factory manager - - ////////////////////////////////////////// build non-rebalanced matrix blocks - // build factories for transfer operator P(2,2) and R(2,2) - RCP amalgFact22 = rcp(new AmalgamationFactory()); - RCP P22Fact = rcp(new TentativePFactory()); - RCP R22Fact = rcp(new TransPFactory()); - - // connect null space and tentative PFactory - Teuchos::RCP nspFact22 = Teuchos::rcp(new NullspaceFactory("Nullspace2")); - nspFact22->SetFactory("Nullspace2", P22Fact); // define null space generated by P22Fact as null space for coarse level (non-rebalanced) - - RCP coarseMapFact22 = Teuchos::rcp(new CoarseMapFactory()); - coarseMapFact22->setStridingData(stridingInfo); - coarseMapFact22->setStridedBlockId(1); - - //////////////////////////////// define factory manager for (2,2) block - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); // rebalanced fine-level block operator - M22->SetFactory("P", P22Fact); // non-rebalanced transfer operator P(2,2) - M22->SetFactory("R", R22Fact); // non-rebalanced transfer operator R(2,2) - M22->SetFactory("Aggregates", UncoupledAggFact11); // aggregates from block (1,1) - M22->SetFactory("Nullspace", nspFact22); - M22->SetFactory("UnAmalgamationInfo", amalgFact22); - M22->SetFactory("Ptent", P22Fact); - M22->SetFactory("CoarseMap", coarseMapFact22); - M22->SetIgnoreUserData(true); - - /////////////////////////////////////////// define rebalanced blocked transfer ops - //////////////////////////////// define factory manager for (1,1) block - RCP rebM11 = rcp(new FactoryManager()); - rebM11->SetFactory("A", AcFact); // important: must be a 2x2 block A Factory - rebM11->SetFactory("Importer", RepartitionFact); - rebM11->SetFactory("number of partitions", RepartitionHeuristicFact); - rebM11->SetFactory("Nullspace", nspFact11); - // rebM11->SetIgnoreUserData(true); - - RCP rebM22 = rcp(new FactoryManager()); - rebM22->SetFactory("A", AcFact); // important: must be a 2x2 block A Factory - rebM22->SetFactory("Importer", RepartitionFact2); // use dummy repartitioning factory - rebM22->SetFactory("number of partitions", RepartitionHeuristicFact); - rebM22->SetFactory("Nullspace", nspFact22); - - // Reordering of the transfer operators - RCP RebalancedBlockPFact = rcp(new RebalanceBlockInterpolationFactory()); - RebalancedBlockPFact->SetFactory("P", PFact); // use non-rebalanced block P operator as input - RebalancedBlockPFact->AddFactoryManager(rebM11); - RebalancedBlockPFact->AddFactoryManager(rebM22); - - RCP RebalancedBlockRFact = rcp(new RebalanceBlockRestrictionFactory()); - // RebalancedBlockRFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Restriction"))); - RebalancedBlockRFact->SetFactory("R", RFact); // non-rebalanced block P operator - RebalancedBlockRFact->SetParameter("repartition: use subcommunicators", Teuchos::ParameterEntry(true)); - RebalancedBlockRFact->AddFactoryManager(rebM11); - RebalancedBlockRFact->AddFactoryManager(rebM22); - - ///////////////////////////////////////// initialize non-rebalanced block transfer operators - // output are the non-rebalanced block transfer operators used as input in AcFact to build - // the non-rebalanced coarse level block matrix Ac - PFact->AddFactoryManager(M11); // use non-rebalanced information from sub block factory manager M11 - PFact->AddFactoryManager(M22); // use non-rebalanced information from sub block factory manager M22 - - ///////////////////////////////////////// initialize rebalanced coarse block AC factory - RebalancedAcFact->SetFactory("A", AcFact); // use non-rebalanced block operator as input - RebalancedAcFact->SetParameter("repartition: use subcommunicators", Teuchos::ParameterEntry(true)); - RebalancedAcFact->AddFactoryManager(rebM11); - RebalancedAcFact->AddFactoryManager(rebM22); - - ////////////////////////////////////////////////////////////////////// - // Smoothers - - // Another factory manager for braes sarazin smoother - // Schur Complement Factory, using the factory to generate AcFact - SC omega = 1.3; - RCP SFact = Teuchos::rcp(new SchurComplementFactory()); - SFact->SetParameter("omega", Teuchos::ParameterEntry(omega)); - SFact->SetFactory("A", MueLu::NoFactory::getRCP()); // this finally be the rebalanced block operator! - - // Smoother Factory, using SFact as a factory for A - std::string ifpackSCType; - Teuchos::ParameterList ifpackSCList; - ifpackSCList.set("relaxation: sweeps", (LocalOrdinal)3); - ifpackSCList.set("relaxation: damping factor", (Scalar)1.0); - ifpackSCType = "RELAXATION"; - ifpackSCList.set("relaxation: type", "Gauss-Seidel"); - RCP smoProtoSC = rcp(new TrilinosSmoother(ifpackSCType, ifpackSCList, 0)); - smoProtoSC->SetFactory("A", SFact); - RCP SmooSCFact = rcp(new SmootherFactory(smoProtoSC)); - - RCP smootherPrototype = rcp(new BraessSarazinSmoother()); - smootherPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(3)); - smootherPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(omega)); - smootherPrototype->SetFactory("A", MueLu::NoFactory::getRCP()); - RCP smootherFact = rcp(new SmootherFactory(smootherPrototype)); - - RCP coarseSolverPrototype = rcp(new BraessSarazinSmoother()); - coarseSolverPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(3)); - coarseSolverPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(omega)); - coarseSolverPrototype->SetFactory("A", MueLu::NoFactory::getRCP()); - RCP coarseSolverFact = rcp(new SmootherFactory(coarseSolverPrototype, Teuchos::null)); - - RCP MB = rcp(new FactoryManager()); - MB->SetFactory("A", SFact); - MB->SetFactory("Smoother", SmooSCFact); - MB->SetIgnoreUserData(true); // always use data from factories defined in factory manager - smootherPrototype->AddFactoryManager(MB, 0); - coarseSolverPrototype->AddFactoryManager(MB, 0); - - ////////////////////////////////////////// define main factory manager - FactoryManager M; - M.SetFactory("A", RebalancedAcFact); // rebalance block AC Factory using importer - M.SetFactory("P", RebalancedBlockPFact); // rebalance prolongator using non-balanced Ac - M.SetFactory("R", RebalancedBlockRFact); // rebalance restrictor and null space using non-balanced Ac - M.SetFactory("Smoother", smootherFact); - M.SetFactory("PreSmoother", smootherFact); - M.SetFactory("PostSmoother", smootherFact); - M.SetFactory("CoarseSolver", coarseSolverFact); - - H->Setup(M, 0, maxLevels); - - /**out << std::endl; - *out << "print content of multigrid levels:" << std::endl; - - Finest->print(*out); - - RCP coarseLevel = H->GetLevel(1); - coarseLevel->print(*out); - - RCP coarseLevel2 = H->GetLevel(2); - coarseLevel2->print(*out);*/ - - RCP xLsg = MultiVectorFactory::Build(xstridedfullmap, 1); - - // Use AMG directly as an iterative method -#if 0 - { - xLsg->putScalar( (SC) 0.0); - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = Teuchos::rcp(new Xpetra::EpetraVector(epv)); - - // calculate initial (absolute) residual - Teuchos::Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs,*xLsg,100); - - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(xstridedfullmap,1); - bOp->apply(*xLsg,*xTmp,Teuchos::NO_TRANS,(SC)1.0,(SC)0.0); - xRhs->update((SC)-1.0,*xTmp,(SC)1.0); - xRhs->norm2(norms); - *out << "||x|| = " << norms[0] << std::endl; - } -#endif - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - } - -#endif // end ifndef HAVE_LONG_LONG_INT -#endif // #if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif -} diff --git a/packages/muelu/test/navierstokes/Navier2DBlocked_xml.cpp b/packages/muelu/test/navierstokes/Navier2DBlocked_xml.cpp deleted file mode 100644 index 6809ecd02b01..000000000000 --- a/packages/muelu/test/navierstokes/Navier2DBlocked_xml.cpp +++ /dev/null @@ -1,308 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_epetra.cpp - * - * Created on: Mar 26, 2011 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_BlockedRAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#include "MueLu_SubBlockAFactory.hpp" -#include "MueLu_BlockedPFactory.hpp" -#include "MueLu_BlockedGaussSeidelSmoother.hpp" -#include "MueLu_CoarseMapFactory.hpp" -#include "MueLu_AmalgamationFactory.hpp" -#include - -#include -#include - -#include "Navier2D_Helpers.h" - -/*! - * 2d Navier Stokes example (for Epetra) - * - * using block matrices - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - using namespace MueLuTests; - using namespace Teuchos; - - oblackholestream blackhole; - GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - // default parameters - std::string xmlFile = "myXML.xml"; - - // Note: use --help to list available options. - CommandLineProcessor clp(false); - clp.setOption("xml", &xmlFile, "xml file with solver parameters for a 2x2 blocked NS example"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - RCP > comm = DefaultComm::getComm(); - RCP out = fancyOStream(rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Time myTime("global"); - TimeMonitor MM(myTime); - - GO maxCoarseSize = 1; // FIXME clp doesn't like long long int - - int globalNumDofs = 1500; // used for the maps - int nDofsPerNode = 3; // used for generating the fine level null-space - - // build strided maps - // striding information: 2 velocity dofs and 1 pressure dof = 3 dofs per node - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - /////////////////////////////////////// build strided maps - // build strided maps: - // xstridedfullmap: full map (velocity and pressure dof gids), continous - // xstridedvelmap: only velocity dof gid maps (i.e. 0,1,3,4,6,7...) - // xstridedpremap: only pressure dof gid maps (i.e. 2,5,8,...) - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - RCP xstridedfullmap = StridedMapFactory::Build(lib, globalNumDofs, 0, stridingInfo, comm, -1); - RCP xstridedvelmap = StridedMapFactory::Build(xstridedfullmap, 0); - RCP xstridedpremap = StridedMapFactory::Build(xstridedfullmap, 1); - - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const RCP fullmap = rcpFromRef(Xpetra::toEpetra(*xstridedfullmap)); - RCP velmap = rcpFromRef(Xpetra::toEpetra(*xstridedvelmap)); - RCP premap = rcpFromRef(Xpetra::toEpetra(*xstridedpremap)); - - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - *out << "Reading matrix market file" << std::endl; - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", *fullmap, *fullmap, *fullmap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", *fullmap, ptrf); - RCP epA = rcp(ptrA); - RCP epv = rcp(ptrf); - RCP epNS = rcp(ptrNS); - - /////////////////////////////////////// split system into 2x2 block system - - *out << "Split matrix into 2x2 block matrix" << std::endl; - - // split fullA into A11,..., A22 - RCP A11; - RCP A12; - RCP A21; - RCP A22; - - if (SplitMatrix2x2(epA, *velmap, *premap, A11, A12, A21, A22) == false) - *out << "Problem with splitting matrix" << std::endl; - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - RCP > xA11 = rcp(new Xpetra::EpetraCrsMatrixT(A11)); - RCP > xA12 = rcp(new Xpetra::EpetraCrsMatrixT(A12)); - RCP > xA21 = rcp(new Xpetra::EpetraCrsMatrixT(A21)); - RCP > xA22 = rcp(new Xpetra::EpetraCrsMatrixT(A22)); - - /////////////////////////////////////// generate MapExtractor object - - std::vector > > xmaps; - xmaps.push_back(xstridedvelmap); - xmaps.push_back(xstridedpremap); - - RCP > map_extractor = Xpetra::MapExtractorFactory::Build(xstridedfullmap->getMap(), xmaps); - - /////////////////////////////////////// build blocked transfer operator - // using the map extractor - RCP > bOp = rcp(new Xpetra::BlockedCrsMatrix(map_extractor, map_extractor, 10)); - bOp->setMatrix(0, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA11))); - bOp->setMatrix(0, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA12))); - bOp->setMatrix(1, 0, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA21))); - bOp->setMatrix(1, 1, Teuchos::rcp(new Xpetra::CrsMatrixWrap(xA22))); - - bOp->fillComplete(); - - //////////////////////////////////////// prepare setup - ParameterListInterpreter mueLuFactory(xmlFile, *comm); - - RCP H = mueLuFactory.CreateHierarchy(); - H->setDefaultVerbLevel(VERB_HIGH); - H->SetMaxCoarseSize(maxCoarseSize); - - RCP Finest = H->GetLevel(0); - Finest->setDefaultVerbLevel(VERB_HIGH); - Finest->Set("A", rcp_dynamic_cast(bOp)); - - ////////////////////////////////////////// prepare null space for A11 - RCP nullspace11 = MultiVectorFactory::Build(xstridedvelmap, 2); // this is a 2D standard null space - - for (int i = 0; i < nDofsPerNode - 1; ++i) { - ArrayRCP nsValues = nullspace11->getDataNonConst(i); - int numBlocks = nsValues.size() / (nDofsPerNode - 1); - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * (nDofsPerNode - 1) + i] = 1.0; - } - } - - Finest->Set("Nullspace1", nullspace11); - - ////////////////////////////////////////// prepare null space for A22 - RCP nullspace22 = MultiVectorFactory::Build(xstridedpremap, 1); // this is a 2D standard null space - ArrayRCP nsValues22 = nullspace22->getDataNonConst(0); - for (int j = 0; j < nsValues22.size(); ++j) { - nsValues22[j] = 1.0; - } - - Finest->Set("Nullspace2", nullspace22); - - /////////////////////////////////// BEGIN setup - - mueLuFactory.SetupHierarchy(*H); - - ///////////////////////////////////// END setup - - *out << std::endl; - - RCP xLsg = MultiVectorFactory::Build(xstridedfullmap, 1); - - // Use AMG directly as an iterative method - { - xLsg->putScalar((SC)0.0); - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = rcp(new Xpetra::EpetraVectorT(epv)); - - // calculate initial (absolute) residual - Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs, *xLsg, 100); - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(xstridedfullmap, 1); - bOp->apply(*xLsg, *xTmp, NO_TRANS, (SC)1.0, (SC)0.0); - xRhs->update((SC)-1.0, *xTmp, (SC)1.0); - xRhs->norm2(norms); - *out << "||r|| = " << norms[0] << std::endl; - } - - // TODO: don't forget to add Aztec as prerequisite in CMakeLists.txt! - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif -} diff --git a/packages/muelu/test/navierstokes/Navier2D_Epetra.cpp b/packages/muelu/test/navierstokes/Navier2D_Epetra.cpp deleted file mode 100644 index aef993aabb82..000000000000 --- a/packages/muelu/test/navierstokes/Navier2D_Epetra.cpp +++ /dev/null @@ -1,443 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/* - * Navier2D_epetra.cpp - * - * Created on: Mar 26, 2011 - * Author: wiesner - */ - -#include -#include -#include - -// Teuchos -#include -#include -#include -#include -#include -#include - -// Epetra -#include -#include -#include - -// Xpetra -#include -#include -#include -#include -#include -#include - -// MueLu -#include "MueLu_ConfigDefs.hpp" -#include "MueLu_Memory.hpp" -#include "MueLu_Hierarchy.hpp" -#include "MueLu_AmalgamationFactory.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_PgPFactory.hpp" -#include "MueLu_GenericRFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_RAPFactory.hpp" -#include "MueLu_TrilinosSmoother.hpp" -#include "MueLu_Utilities.hpp" -#include "MueLu_Exceptions.hpp" -#include "MueLu_Aggregates.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_PreDropFunctionConstVal.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_SmootherFactory.hpp" -#include "MueLu_DirectSolver.hpp" -#include "MueLu_EpetraOperator.hpp" -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) -#include "MueLu_IsorropiaInterface.hpp" -#include "MueLu_RepartitionInterface.hpp" -#include "MueLu_RepartitionHeuristicFactory.hpp" -#include "MueLu_RepartitionFactory.hpp" -#include "MueLu_RebalanceTransferFactory.hpp" -#include "MueLu_RebalanceAcFactory.hpp" -#endif - -#include -#include - -/*! - * 2d Navier Stokes example (for Epetra) - * - */ - -int main(int argc, char* argv[]) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef LocalOrdinal LO; - typedef GlobalOrdinal GO; - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - - using Teuchos::RCP; - using Teuchos::rcp; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - *out << MueLu::MemUtils::PrintMemoryUsage() << std::endl; - - // Timing - Teuchos::Time myTime("global"); - Teuchos::TimeMonitor m(myTime); - - // - // SET TEST PARAMETERS - // - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // - Levels - LO optMaxLevels = 4; - clp.setOption("maxLevels", &optMaxLevels, "maximum number of levels allowed"); - int optMaxCoarseSize = 1; - clp.setOption("maxCoarseSize", &optMaxCoarseSize, "maximum #dofs in coarse operator"); // FIXME clp doesn't like long long int - - // - Repartitioning -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) - int optRepartition = 1; - clp.setOption("repartition", &optRepartition, "enable repartitioning"); - LO optMinRowsPerProc = 50; - clp.setOption("minRowsPerProc", &optMinRowsPerProc, "min #rows allowable per proc before repartitioning occurs"); - double optNnzImbalance = 1.2; - clp.setOption("nnzImbalance", &optNnzImbalance, "max allowable nonzero imbalance before repartitioning occurs"); -#else - int optRepartition = 0; -#endif - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - ///////////////////////////////////////////// - // custom parameters - LO maxLevels = optMaxLevels; - - GO maxCoarseSize = optMaxCoarseSize; - std::string aggOrdering = "natural"; - int minPerAgg = 3; - int maxNbrAlreadySelected = 0; - - int globalNumDofs = 1500; - int nProcs = comm->getSize(); - int nDofsPerNode = 3; - - int nLocalDofs = (int)globalNumDofs / nProcs; - nLocalDofs = nLocalDofs - (nLocalDofs % nDofsPerNode); - int nCumulatedDofs = 0; - MueLu_sumAll(comm, nLocalDofs, nCumulatedDofs); - // Teuchos::reduceAll(*comm,Teuchos::REDUCE_SUM, 1, nLocalDofs, &nCumulatedDofs ); - - if (comm->getRank() == nProcs - 1) { - nLocalDofs += globalNumDofs - nCumulatedDofs; - } - - std::cout << "PROC: " << comm->getRank() << " numLocalDofs=" << nLocalDofs << std::endl; - - // read in problem - Epetra_Map emap(globalNumDofs, nLocalDofs, 0, *Xpetra::toEpetra(comm)); - Epetra_CrsMatrix* ptrA = 0; - Epetra_Vector* ptrf = 0; - Epetra_MultiVector* ptrNS = 0; - - std::cout << "Reading matrix market file" << std::endl; - EpetraExt::MatrixMarketFileToCrsMatrix("A_re1000_5932.txt", emap, emap, emap, ptrA); - EpetraExt::MatrixMarketFileToVector("b_re1000_5932.txt", emap, ptrf); - RCP epA = Teuchos::rcp(ptrA); - RCP epv = Teuchos::rcp(ptrf); - RCP epNS = Teuchos::rcp(ptrNS); - - // Epetra_CrsMatrix -> Xpetra::Matrix - RCP exA = Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epA)); - RCP crsOp = Teuchos::rcp(new CrsMatrixWrap(exA)); - RCP Op = Teuchos::rcp_dynamic_cast(crsOp); - - Op->SetFixedBlockSize(nDofsPerNode); // 2 velocity dofs and 1 pressure dof per node. - - // Epetra_Vector -> Xpetra::Vector - RCP xRhs = Teuchos::rcp(new Xpetra::EpetraVectorT(epv)); - - RCP xNS = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epNS)); - - // Epetra_Map -> Xpetra::Map - const RCP map = Xpetra::toXpetra(emap); - - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - H->SetMaxCoarseSize(maxCoarseSize); - - // build finest Level - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); - // Finest->Set("Nullspace",xNS); - - if (optRepartition == 1) { - // create null space - - RCP nullspace; - // determine numPDEs - LocalOrdinal numPDEs = 1; - if (Op->IsView("stridedMaps") == true) { - Xpetra::viewLabel_t oldView = Op->SwitchToView("stridedMaps"); // note: "stridedMaps are always non-overlapping (correspond to range and domain maps!) - // TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::rcp_dynamic_cast(Op->getRowMap()) == Teuchos::null, Exceptions::BadCast, "cast to strided row map failed."); - numPDEs = Teuchos::rcp_dynamic_cast(Op->getRowMap())->getFixedBlockSize(); - oldView = Op->SwitchToView(oldView); - } - - // GetOStream(Runtime1, 0) << "Generating canonical nullspace: dimension = " << numPDEs << std::endl; - nullspace = MultiVectorFactory::Build(Op->getDomainMap(), numPDEs); - - for (int i = 0; i < numPDEs; ++i) { - Teuchos::ArrayRCP nsValues = nullspace->getDataNonConst(i); - int numBlocks = nsValues.size() / numPDEs; - for (int j = 0; j < numBlocks; ++j) { - nsValues[j * numPDEs + i] = 1.0; - } - } - Finest->Set("Nullspace", nullspace); - } - - RCP dropFact = rcp(new CoalesceDropFactory()); - dropFact->SetParameter("lightweight wrap", Teuchos::ParameterEntry(false)); - dropFact->SetVerbLevel(MueLu::Extreme); - - // RCP predrop = rcp(new PreDropFunctionConstVal(0.00001)); - // dropFact->SetPreDropFunction(predrop); - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetFactory("Graph", dropFact); - *out << "========================= Aggregate option summary =========================" << std::endl; - *out << "min DOFs per aggregate : " << minPerAgg << std::endl; - *out << "min # of root nbrs already aggregated : " << maxNbrAlreadySelected << std::endl; - UncoupledAggFact->SetMinNodesPerAggregate(minPerAgg); // TODO should increase if run anything other than 1D - UncoupledAggFact->SetMaxNeighAlreadySelected(maxNbrAlreadySelected); - std::transform(aggOrdering.begin(), aggOrdering.end(), aggOrdering.begin(), ::tolower); - if (aggOrdering == "natural" || aggOrdering == "random" || aggOrdering == "graph") { - *out << "aggregate ordering : " << aggOrdering << std::endl; - UncoupledAggFact->SetOrdering(aggOrdering); - } else { - std::string msg = - "main: bad aggregation option " - "" + - aggOrdering + - "" - "."; - throw(MueLu::Exceptions::RuntimeError(msg)); - } - *out << "=============================================================================" << std::endl; - - // build non-rebalanced transfer operators - RCP Pfact = rcp(new PgPFactory()); - RCP Rfact = rcp(new GenericRFactory()); - // RCP Pfact = rcp( new SaPFactory() ); - // RCP Rfact = rcp( new TransPFactory() ); - RCP Acfact = rcp(new RAPFactory()); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - // build level smoothers - RCP smooProto; - std::string ifpackType; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)3); - ifpackList.set("relaxation: damping factor", (SC)0.6); // 0.7 - ifpackType = "RELAXATION"; - ifpackList.set("relaxation: type", "Gauss-Seidel"); - - smooProto = Teuchos::rcp(new TrilinosSmoother(ifpackType, ifpackList)); - RCP SmooFact; - if (maxLevels > 1) - SmooFact = rcp(new SmootherFactory(smooProto)); - - // create coarsest smoother - RCP coarsestSmooProto; - std::string type = ""; - Teuchos::ParameterList coarsestSmooList; -#if defined(HAVE_AMESOS_SUPERLU) - coarsestSmooProto = Teuchos::rcp(new DirectSolver("Superlu", coarsestSmooList)); -#else - coarsestSmooProto = Teuchos::rcp(new DirectSolver("Klu", coarsestSmooList)); -#endif - RCP coarsestSmooFact = rcp(new SmootherFactory(coarsestSmooProto, Teuchos::null)); - - FactoryManager M; - M.SetKokkosRefactor(false); - M.SetFactory("Graph", dropFact); - // M.SetFactory("UnAmalgamationInfo", amalgFact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarsestSmooFact); - - if (optRepartition == 0) { - // no rebalancing - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - } else { -#if defined(HAVE_MPI) && defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MUELU_ISORROPIA) - // The Factory Manager will be configured to return the rebalanced versions of P, R, A by default. - // Everytime we want to use the non-rebalanced versions, we need to explicitly define the generating factory. - Rfact->SetFactory("P", Pfact); - // - Acfact->SetFactory("P", Pfact); - Acfact->SetFactory("R", Rfact); - - // define rebalancing factory for coarse block matrix A(1,1) - RCP rebAmalgFact = rcp(new AmalgamationFactory()); - rebAmalgFact->SetFactory("A", Acfact); - - // Repartitioning (decides how many partitions are built) - RCP RepartitionHeuristicFact = rcp(new RepartitionHeuristicFactory()); - { - Teuchos::ParameterList paramList; - paramList.set("repartition: min rows per proc", optMinRowsPerProc); - paramList.set("repartition: max imbalance", optNnzImbalance); - RepartitionHeuristicFact->SetParameterList(paramList); - } - RepartitionHeuristicFact->SetFactory("A", Acfact); - - // create amalgamated "Partition" - RCP > isoInterface = rcp(new MueLu::IsorropiaInterface()); - isoInterface->SetFactory("A", Acfact); - isoInterface->SetFactory("number of partitions", RepartitionHeuristicFact); - isoInterface->SetFactory("UnAmalgamationInfo", rebAmalgFact); - - // create "Partition" by unamalgamtion - RCP > repInterface = rcp(new MueLu::RepartitionInterface()); - repInterface->SetFactory("A", Acfact); - repInterface->SetFactory("number of partitions", RepartitionHeuristicFact); - repInterface->SetFactory("AmalgamatedPartition", isoInterface); - - // Repartitioning (creates "Importer" from "Partition") - RCP RepartitionFact = rcp(new RepartitionFactory()); - RepartitionFact->SetFactory("A", Acfact); - RepartitionFact->SetFactory("number of partitions", RepartitionHeuristicFact); - RepartitionFact->SetFactory("Partition", repInterface); - - // Reordering of the transfer operators - RCP RebalancedPFact = rcp(new RebalanceTransferFactory()); - RebalancedPFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Interpolation"))); - RebalancedPFact->SetFactory("P", Pfact); - RebalancedPFact->SetFactory("Nullspace", M.GetFactory("Ptent")); - - RCP RebalancedRFact = rcp(new RebalanceTransferFactory()); - RebalancedRFact->SetParameter("type", Teuchos::ParameterEntry(std::string("Restriction"))); - RebalancedRFact->SetFactory("R", Rfact); - // RebalancedRFact->SetFactory("Coordinates", TransferCoordinatesFact); - - // Compute Ac from rebalanced P and R - RCP RebalancedAFact = rcp(new RebalanceAcFactory()); - RebalancedAFact->SetFactory("A", Acfact); - - // Configure FactoryManager - M.SetFactory("A", RebalancedAFact); - M.SetFactory("P", RebalancedPFact); - M.SetFactory("R", RebalancedRFact); - M.SetFactory("Nullspace", RebalancedPFact); - M.SetFactory("Importer", RepartitionFact); -#else - // no re-balancing available - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); -#endif - } - - H->Setup(M, 0, maxLevels); - - { // some debug output - // print out content of levels - std::cout << "FINAL CONTENT of multigrid levels" << std::endl; - for (LO l = 0; l < H->GetNumLevels(); l++) { - RCP coarseLevel = H->GetLevel(l); - coarseLevel->print(*out); - } - std::cout << "END FINAL CONTENT of multigrid levels" << std::endl; - } // end debug output - - RCP xLsg = MultiVectorFactory::Build(map, 1); - - // Use AMG directly as an iterative method - { - xLsg->putScalar((SC)0.0); - - // calculate initial (absolute) residual - Teuchos::Array::magnitudeType> norms(1); - xRhs->norm2(norms); - *out << "||x_0|| = " << norms[0] << std::endl; - - // apply ten multigrid iterations - H->Iterate(*xRhs, *xLsg, 10); - - // calculate and print residual - RCP xTmp = MultiVectorFactory::Build(map, 1); - Op->apply(*xLsg, *xTmp, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - xRhs->update((SC)-1.0, *xTmp, (SC)1.0); - xRhs->norm2(norms); - *out << "||x|| = " << norms[0] << std::endl; - } - - // - // Solve Ax = b using AMG as a preconditioner in AztecOO - // - { - RCP X = rcp(new Epetra_Vector(epv->Map())); - X->PutScalar(0.0); - Epetra_LinearProblem epetraProblem(epA.get(), X.get(), epv.get()); - - AztecOO aztecSolver(epetraProblem); - aztecSolver.SetAztecOption(AZ_solver, AZ_gmres); - -#if 0 - // TODO TAW: 4/8/2016 - // temporarely deactivate this due to runtime error on perseus: - // Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed - // if SERIAL=OFF, OPENMP=OFF, PTHREAD=ON, CUDA=OFF - // probably a fix necessary in EpetraOperator (which only supports - // SERIAL or OPENMP, but not PTHREAD of course). - MueLu::EpetraOperator aztecPrec(H); - aztecSolver.SetPrecOperator(&aztecPrec); - - int maxIts = 50; - double tol = 1e-8; - - aztecSolver.Iterate(maxIts, tol); -#endif - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(true, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -#else - std::cout << "Epetra (and/or EpetraExt) are not available. Skip test." << std::endl; - return EXIT_SUCCESS; -#endif -} diff --git a/packages/muelu/test/navierstokes/Navier2D_Helpers.cpp b/packages/muelu/test/navierstokes/Navier2D_Helpers.cpp deleted file mode 100644 index 44dc838411f5..000000000000 --- a/packages/muelu/test/navierstokes/Navier2D_Helpers.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -// the concrete implementation is in the .h file -#include "Navier2D_Helpers.h" diff --git a/packages/muelu/test/navierstokes/Navier2D_Helpers.h b/packages/muelu/test/navierstokes/Navier2D_Helpers.h deleted file mode 100644 index dc369b1b4ba7..000000000000 --- a/packages/muelu/test/navierstokes/Navier2D_Helpers.h +++ /dev/null @@ -1,245 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - - -namespace MueLuTests { - -// helper routines -bool SplitMatrix2x2(Teuchos::RCP A, - const Epetra_Map& A11rowmap, - const Epetra_Map& A22rowmap, - Teuchos::RCP& A11, - Teuchos::RCP& A12, - Teuchos::RCP& A21, - Teuchos::RCP& A22) -{ - if (A==Teuchos::null) { - std::cout << "ERROR: SplitMatrix2x2: A==null on entry" << std::endl; - return false; - } - - const Epetra_Comm& Comm = A->Comm(); - const Epetra_Map& A22map = A22rowmap; - const Epetra_Map& A11map = A11rowmap; - - //----------------------------- create a parallel redundant map of A22map - std::map a22gmap; - { - std::vector a22global(A22map.NumGlobalElements()); - int count=0; - for (int proc=0; proc a22gcindices(100); - std::vector a22values(100); - for (int i=0; iNumMyRows(); ++i) { - const int grid = A->GRID(i); - if (A22map.MyGID(grid)==false) - continue; - int numentries; - double* values; - int* cindices; - int err = A->ExtractMyRowView(i,numentries,values,cindices); - if (err) { - std::cout << "ERROR: SplitMatrix2x2: A->ExtractMyRowView returned " << err << std::endl; - return false; - } - - if (numentries>(int)a22gcindices.size()) { - a22gcindices.resize(numentries); - a22values.resize(numentries); - } - int count=0; - for (int j=0; jColMap().GID(cindices[j]); - // see whether we have gcid in a22gmap - std::map::iterator curr = a22gmap.find(gcid); - if (curr==a22gmap.end()) continue; - //cout << gcid << " "; - a22gcindices[count] = gcid; - a22values[count] = values[j]; - ++count; - } - //cout << endl; fflush(stdout); - // add this filtered row to A22 - err = A22->InsertGlobalValues(grid,count,&a22values[0],&a22gcindices[0]); - if (err<0) { - std::cout << "ERROR: SplitMatrix2x2: A->InsertGlobalValues returned " << err << std::endl; - return false; - } - - } //for (int i=0; iNumMyRows(); ++i) - a22gcindices.clear(); - a22values.clear(); - } - A22->FillComplete(); - A22->OptimizeStorage(); - - //----------------------------------------------------- create matrix A11 - A11 = Teuchos::rcp(new Epetra_CrsMatrix(Copy,A11map,100)); - { - std::vector a11gcindices(100); - std::vector a11values(100); - for (int i=0; iNumMyRows(); ++i) - { - const int grid = A->GRID(i); - if (A11map.MyGID(grid)==false) continue; - int numentries; - double* values; - int* cindices; - int err = A->ExtractMyRowView(i,numentries,values,cindices); - if (err) { - std::cout << "ERROR: SplitMatrix2x2: A->ExtractMyRowView returned " << err << std::endl; - return false; - } - - if (numentries>(int)a11gcindices.size()) { - a11gcindices.resize(numentries); - a11values.resize(numentries); - } - int count=0; - for (int j=0; jColMap().GID(cindices[j]); - // see whether we have gcid as part of a22gmap - std::map::iterator curr = a22gmap.find(gcid); - if (curr!=a22gmap.end()) continue; - a11gcindices[count] = gcid; - a11values[count] = values[j]; - ++count; - } - err = A11->InsertGlobalValues(grid,count,&a11values[0],&a11gcindices[0]); - if (err<0) { - std::cout << "ERROR: SplitMatrix2x2: A->InsertGlobalValues returned " << err << std::endl; - return false; - } - - } // for (int i=0; iNumMyRows(); ++i) - a11gcindices.clear(); - a11values.clear(); - } - A11->FillComplete(); - A11->OptimizeStorage(); - - //---------------------------------------------------- create matrix A12 - A12 = Teuchos::rcp(new Epetra_CrsMatrix(Copy,A11map,100)); - { - std::vector a12gcindices(100); - std::vector a12values(100); - for (int i=0; iNumMyRows(); ++i) { - const int grid = A->GRID(i); - if (A11map.MyGID(grid)==false) continue; - int numentries; - double* values; - int* cindices; - int err = A->ExtractMyRowView(i,numentries,values,cindices); - if (err) { - std::cout << "ERROR: SplitMatrix2x2: A->ExtractMyRowView returned " << err << std::endl; - return false; - } - - if (numentries>(int)a12gcindices.size()) { - a12gcindices.resize(numentries); - a12values.resize(numentries); - } - int count=0; - for (int j=0; jColMap().GID(cindices[j]); - // see whether we have gcid as part of a22gmap - std::map::iterator curr = a22gmap.find(gcid); - if (curr==a22gmap.end()) continue; - a12gcindices[count] = gcid; - a12values[count] = values[j]; - ++count; - } - err = A12->InsertGlobalValues(grid,count,&a12values[0],&a12gcindices[0]); - if (err<0) { - std::cout << "ERROR: SplitMatrix2x2: A->InsertGlobalValues returned " << err << std::endl; - return false; - } - - } // for (int i=0; iNumMyRows(); ++i) - a12values.clear(); - a12gcindices.clear(); - } - A12->FillComplete(A22map,A11map); - A12->OptimizeStorage(); - - //----------------------------------------------------------- create A21 - A21 = Teuchos::rcp(new Epetra_CrsMatrix(Copy,A22map,100)); - { - std::vector a21gcindices(100); - std::vector a21values(100); - for (int i=0; iNumMyRows(); ++i) { - const int grid = A->GRID(i); - if (A22map.MyGID(grid)==false) continue; - int numentries; - double* values; - int* cindices; - int err = A->ExtractMyRowView(i,numentries,values,cindices); - if (err) { - std::cout << "ERROR: SplitMatrix2x2: A->ExtractMyRowView returned " << err << std::endl; - return false; - } - - if (numentries>(int)a21gcindices.size()) { - a21gcindices.resize(numentries); - a21values.resize(numentries); - } - int count=0; - for (int j=0; jColMap().GID(cindices[j]); - // see whether we have gcid as part of a22gmap - std::map::iterator curr = a22gmap.find(gcid); - if (curr!=a22gmap.end()) continue; - a21gcindices[count] = gcid; - a21values[count] = values[j]; - ++count; - } - err = A21->InsertGlobalValues(grid,count,&a21values[0],&a21gcindices[0]); - if (err<0) { - std::cout << "ERROR: SplitMatrix2x2: A->InsertGlobalValues returned " << err << std::endl; - return false; - } - - } // for (int i=0; iNumMyRows(); ++i) - a21values.clear(); - a21gcindices.clear(); - } - A21->FillComplete(A11map,A22map); - A21->OptimizeStorage(); - - //-------------------------------------------------------------- tidy up - a22gmap.clear(); - return true; -} - -} diff --git a/packages/muelu/test/navierstokes/b_re1000_5932.txt b/packages/muelu/test/navierstokes/b_re1000_5932.txt deleted file mode 100644 index 2bb0af0119d5..000000000000 --- a/packages/muelu/test/navierstokes/b_re1000_5932.txt +++ /dev/null @@ -1,1502 +0,0 @@ -%%MatrixMarket matrix array real general -1500 1 - 0.2564467013462763 - 0.3452488427287302 - 0.2291903571814953 - 0.0848224209487926 - 0.5922112348795537 - 0.1063197605330878 - 0.3202930044421843 - 0.2640292314683583 - 0.6799768182208593 - 0.1360914052570821 - 0.5266087082579863 - 0.9238552434816886 - 0.6113376117780283 - 0.4428460130451384 - 0.2819298611754712 - 0.2854464049368818 - 0.2247705234092796 - 0.5858948545882591 - 0.02545411111528533 - 0.02545991600820701 - 0.6720265416073978 - 0.6877640423929033 - 0.1247701680185737 - 0.622802504553837 - 0.4706983309397719 - 0.09089794349651296 - 0.6075201925491347 - 0.9697425755233068 - 0.7097626213666257 - 0.8565365814548902 - 0.3518178407178511 - 0.4690102070875579 - 0.05961531315780115 - 0.9935811258116053 - 0.641348949402486 - 0.509574863441996 - 0.839152679397284 - 0.7448659974895344 - 0.2309032530397017 - 0.3225889581515338 - 0.650568746356072 - 0.009533008472333116 - 0.409474067044566 - 0.5403469305773658 - 0.7912234815788558 - 0.2526600148386604 - 0.4217275155682185 - 0.8330455002295949 - 0.04373897354656024 - 0.08854782320920211 - 0.2082734629088372 - 0.9515085128611801 - 0.2189432251594602 - 0.7868333844782074 - 0.3011622130956016 - 0.2672928627852457 - 0.5640915833580286 - 0.9579529260106072 - 0.8804958494366553 - 0.07171765398913114 - 0.376355509706237 - 0.3570358436562432 - 0.4870210163811622 - 0.06789530362877809 - 0.03847201803006621 - 0.08043494366866559 - 0.4341239836113005 - 0.7526586050645425 - 0.3754282979059816 - 0.2816256117627268 - 0.7706855634829071 - 0.7064495913835097 - 0.7312842749828987 - 0.3532411730666479 - 0.9441040019487816 - 0.004041990686115038 - 0.1357685087573721 - 0.3222402571387874 - 0.3659389163277388 - 0.4346091334729242 - 0.6424498402747116 - 0.2345382745625026 - 0.3383753032687812 - 0.5658577396984071 - 0.8936011434788549 - 0.8930790521410269 - 0.153120745430467 - 0.1975501339436042 - 0.7570054720398406 - 0.4647784236970292 - 0.9356605677742075 - 0.2868496530741265 - 0.5017822858347261 - 0.4748250231165831 - 0.5109224528145117 - 0.1246692226431836 - 0.332239054697298 - 0.5378570085511531 - 0.3266998483347891 - 0.8019320560028887 - 0.3845403822288461 - 0.7058858179112052 - 0.857073894447826 - 0.5425661415157356 - 0.6846771825635765 - 0.4252334040229735 - 0.3942869173241749 - 0.1164153521346837 - 0.4559299349847779 - 0.6913351201627893 - 0.9202923775249648 - 0.443629250914066 - 0.3223246183596125 - 0.4859112579713287 - 0.0701627072041731 - 0.9572179799169404 - 0.7885130299278026 - 0.9460214103789741 - 0.7178179394290792 - 0.07062009424034991 - 0.9329544903584327 - 0.4062866338591106 - 0.171474830383519 - 0.9032764364976557 - 0.8430361659353354 - 0.557825324782424 - 0.8337083016897173 - 0.9948676420795278 - 0.9914964671099005 - 0.7476470759026645 - 0.0209820490572074 - 0.3488838260055846 - 0.224819067924334 - 0.3932913530844369 - 0.9660183460064742 - 0.519856923056693 - 0.2096699292868666 - 0.5832645705078797 - 0.3791962210496846 - 0.9069635520617609 - 0.4683003549497067 - 0.4888072221772023 - 0.155916167825789 - 0.1376666406568219 - 0.1122229134949449 - 0.7411625915956404 - 0.8742420875678965 - 0.8180910903144577 - 0.8351564586547553 - 0.3831196189679548 - 0.882367037257355 - 0.4891719620602213 - 0.5124823841714923 - 0.8638555003455858 - 0.7408205682350625 - 0.1444856115091188 - 0.1181093082020793 - 0.4219218794311085 - 0.5254746723405394 - 0.2198998265429585 - 0.437296018130193 - 0.2152465701352722 - 0.7715383200883259 - 0.6830502260921606 - 0.9475075661225065 - 0.8926276908685508 - 0.8386693483824234 - 0.2893768298521436 - 0.4576607076406071 - 0.6338500047864737 - 0.4191936860588605 - 0.2026194982143232 - 0.150176089035935 - 0.965592815105122 - 0.6961745176979085 - 0.2229461555277546 - 0.6546592265652627 - 0.2297687112693753 - 0.2752193565280753 - 0.09883596179266001 - 0.6868848933608412 - 0.1820857952860592 - 0.1025469335291038 - 0.3487166890453847 - 0.1227108751605385 - 0.7169291531399811 - 0.5730410703474382 - 0.2714043057410684 - 0.3851728534820587 - 0.7861651716324339 - 0.8096611316027894 - 0.1860599288320043 - 0.3479799833312293 - 0.6333236718247947 - 0.9858902934288263 - 0.8786432847347183 - 0.9691579334126224 - 0.5751767491640987 - 0.7397588807236622 - 0.7451530244945762 - 0.7635143996139453 - 0.6833385111759264 - 0.617959476685626 - 0.8783013101676109 - 0.8512622483701759 - 0.7970982658159136 - 0.3060735242230331 - 0.7914281431305186 - 0.6682022092629193 - 0.1871011535786092 - 0.2135900763643169 - 0.6610396338640635 - 0.7891246906551823 - 0.830949272898089 - 0.3791547036592831 - 0.01420842891768497 - 0.7246611291006457 - 0.376397674551035 - 0.8634889779455489 - 0.4288577963569478 - 0.9352961104700892 - 0.5080440404149845 - 0.3053128249522754 - 0.5541738805150154 - 0.1178452566525539 - 0.5645224498484293 - 0.2871340417806935 - 0.1181705787990081 - 0.03490937913761631 - 0.8300755893914777 - 0.5658924650521743 - 0.2667050034794553 - 0.4684654003239702 - 0.9480874066637306 - 0.8822346224542048 - 0.5966404897377786 - 0.5984802192463665 - 0.3981621038671254 - 0.6408909526503029 - 0.93327012863956 - 0.3372891475219597 - 0.3655664275236141 - 0.7460484103223701 - 0.5188791744529792 - 0.3461952637078893 - 0.5981266965304051 - 0.4911924472906925 - 0.4806144476358246 - 0.7948938022727334 - 0.8810600650830537 - 0.1994933925616307 - 0.9366710102054975 - 0.4192560754646988 - 0.5195167858279657 - 0.1581703687941822 - 0.5311112587437898 - 0.228225568686594 - 0.6373994990011582 - 0.5147287977706489 - 0.625302487843349 - 0.6391402444854563 - 0.9615076872149739 - 0.4569483995762171 - 0.596320158448761 - 0.3201894824647901 - 0.437439961806564 - 0.9900953740314571 - 0.4356161239705342 - 0.07944489027982919 - 0.6934558384825125 - 0.3352780825733944 - 0.2637134677686392 - 0.6475743967863095 - 0.5834010396020748 - 0.1879264054223742 - 0.07023242298127023 - 0.9353190372672257 - 0.8005763400061148 - 0.900509975265197 - 0.4109525358905277 - 0.4384502794042504 - 0.6367547250171754 - 0.5849942002004057 - 0.8786623361428078 - 0.8494808371443844 - 0.3595926606877028 - 0.7408977626327958 - 0.5378747542578702 - 0.5374580177143989 - 0.1572459852637753 - 0.6839274146161912 - 0.4904425983962102 - 0.9471745481726309 - 0.202877078099533 - 0.04225914026775306 - 0.151524893985519 - 0.2122483322517431 - 0.8515133056764732 - 0.7672903152640278 - 0.7855935858843645 - 0.6407462196961936 - 0.1731774262657879 - 0.05954602490373199 - 0.3380899237951367 - 0.5238954285159715 - 0.3627502343490112 - 0.5333446408789242 - 0.2552711522708372 - 0.9003138414949861 - 0.5917536145245077 - 0.2043801751945454 - 0.870210878684055 - 0.4741861541170251 - 0.8044371192968848 - 0.2440050033647612 - 0.09316892863557406 - 0.2922629727245477 - 0.7013057974436342 - 0.7084623408563288 - 0.6041171660602336 - 0.5395528645679487 - 0.7111704957321811 - 0.1422589700641153 - 0.7326956748470811 - 0.6833960058892905 - 0.04248689548371369 - 0.463636748576039 - 0.9990396798548663 - 0.3179528496961179 - 0.4363043747719422 - 0.07970503149776069 - 0.5449527312067683 - 0.4860876606093741 - 0.5549631336208902 - 0.4654162939601101 - 0.6415119886382223 - 0.6417288994361254 - 0.5101890884574896 - 0.02949510974881424 - 0.5885280077746438 - 0.9645230978769518 - 0.2918074300271108 - 0.5668062781072765 - 0.06133378479335454 - 0.4886829711349037 - 0.002049242410174279 - 0.7845906237450618 - 0.09395369653950052 - 0.5269071873999269 - 0.2066819407017101 - 0.03869931755361582 - 0.9470406717406111 - 0.4496154772018405 - 0.1208273153407893 - 0.7209044562939175 - 0.661121900445846 - 0.8418058062959347 - 0.2967642155932833 - 0.3368852151591473 - 0.8678230308303243 - 0.2571995592399021 - 0.3882263260009973 - 0.7538050658847254 - 0.8938525870276059 - 0.3238571916422445 - 0.3957966811946336 - 0.5119002462474513 - 0.6586621802590656 - 0.3297413632863074 - 0.7494347303006985 - 0.4662234538800152 - 0.9065157173168363 - 0.4569627502926569 - 0.9832038152304042 - 0.3328331977662933 - 0.2093035926971803 - 0.1257953949880472 - 0.3693166165557769 - 0.289419563796241 - 0.6165442747815679 - 0.4104133229660161 - 0.2830671627250317 - 0.7967201965982037 - 0.180156339110615 - 0.6826255453718127 - 0.04752323897409987 - 0.4197255051664081 - 0.5376242743952371 - 0.8618771948205085 - 0.5899022996077713 - 0.1998924372898099 - 0.3412046154760289 - 0.7838122644245367 - 0.5171240067730503 - 0.9226210416894867 - 0.7839138810510727 - 0.1308132591296057 - 0.02577144233023836 - 0.2918851901521911 - 0.7477050832034294 - 0.9720390879043033 - 0.4220644998698 - 0.4259712891920308 - 0.5009102292163007 - 0.2506904472095524 - 0.1970451519915938 - 0.9633033671415848 - 0.005177367439868008 - 0.08389935942155739 - 0.612013617645645 - 0.2168287393083801 - 0.5359352406632013 - 0.0226193071231751 - 0.4451047403825903 - 0.4937261347488193 - 0.6630075081302131 - 0.7749734967097415 - 0.360072067054898 - 0.702853346456747 - 0.886383165487868 - 0.3654242230713954 - 0.8953819381786161 - 0.08292739408289422 - 0.8575662679358208 - 0.07648092060887639 - 0.5813776591953247 - 0.9750723744658933 - 0.3538794183304367 - 0.3334133261606284 - 0.5978423785734828 - 0.7137094321912824 - 0.6835258233918303 - 0.4337107159090478 - 0.7791888606089743 - 0.5326422858950198 - 0.7788346939149404 - 0.1346720729131937 - 0.7501145778587206 - 0.2501760243288004 - 0.72077933906213 - 0.1427333736641791 - 0.2196833537927357 - 0.7130643358280047 - 0.8837711975511059 - 0.07110244898199373 - 0.2375446032259634 - 0.9840654565102459 - 0.7811532845204319 - 0.4446489381614644 - 0.4911987801969815 - 0.9540203827750822 - 0.2021411465082311 - 0.8661052225624448 - 0.09172137326517298 - 0.2268538800396854 - 0.9605799768812603 - 0.6774953699170297 - 0.5526617324976401 - 0.7429681441000798 - 0.1721554848805644 - 0.4122850812656646 - 0.3151427320475509 - 0.57086621961331 - 0.4534621120732571 - 0.8992724381318915 - 0.8453708606462466 - 0.747411633290618 - 0.1049913412488157 - 0.210785431308713 - 0.2900713528364366 - 0.6106082887199307 - 0.6958673095764111 - 0.6250971807184862 - 0.1745517056897118 - 0.3515946559267375 - 0.1396069446237905 - 0.5705168750124499 - 0.6411148261803059 - 0.06460148922327895 - 0.2925044068382281 - 0.8309943982373066 - 0.8162805802844887 - 0.9016751658403124 - 0.6477674733633739 - 0.2658027579236563 - 0.9796903384008431 - 0.3227378207350544 - 0.8970935796453829 - 0.2378580867523791 - 0.09607030346181493 - 0.1000802082902414 - 0.8895840815375847 - 0.5824806421835779 - 0.2042286405973847 - 0.4032794555760092 - 0.3936087625826958 - 0.002263567208643113 - 0.3103252207335485 - 0.1195701963472866 - 0.4412771368351472 - 0.2145852977682307 - 0.2691557709090267 - 0.5379205250426334 - 0.3795290847095759 - 0.5608467505976377 - 0.04570257429779349 - 0.2743429205636955 - 0.8531212718370405 - 0.9606335063022299 - 0.4609531774281249 - 0.7342123314323462 - 0.5047113979599345 - 0.3083396809383894 - 0.2593608218926286 - 0.9202395972033276 - 0.9378611960001634 - 0.6991174442430172 - 0.3240395105063209 - 0.6420070217772148 - 0.9221385975984742 - 0.2630193371485374 - 0.8824592713508399 - 0.1130297889959569 - 0.09050304552253667 - 0.5928665669679873 - 0.5338893857134145 - 0.3770243086821158 - 0.1206121665640568 - 0.5431888581705718 - 0.9355438934097422 - 0.2945269351278834 - 0.637787390498782 - 0.2174566079034259 - 0.2731691521137252 - 0.1745387752449193 - 0.7237567583606361 - 0.8643305561546841 - 0.06197278185665393 - 0.4407460146845736 - 0.7567530050597051 - 0.188362203196471 - 0.7141075959658081 - 0.4628134224695592 - 0.8433995875212741 - 0.8484776931491191 - 0.517101461774659 - 0.6833130841226416 - 0.6805319980777893 - 0.1163282459396743 - 0.610195612608058 - 0.1589174803554409 - 0.681107803584998 - 0.07290525333819335 - 0.2102485579121563 - 0.7049728011609818 - 0.6075433482658719 - 0.2338325056822129 - 0.215704978827566 - 0.8140873392483697 - 0.6090630791726415 - 0.9329761799794565 - 0.9743696271957667 - 0.326540347979052 - 0.8222973034742193 - 0.4932755724805494 - 0.7780436147198629 - 0.8045480858738959 - 0.7760144307696 - 0.2957364363385893 - 0.1689115108661028 - 0.3142612398294169 - 0.9459160470511242 - 0.3341019153436556 - 0.1671961054185614 - 0.03412966846021219 - 0.1449403910514339 - 0.8720103223574517 - 0.7476020655846248 - 0.2228706206454571 - 0.8493374120229797 - 0.5959786745777874 - 0.3894131301063871 - 0.9139922633823064 - 0.9775768134021938 - 0.1716620845227926 - 0.7225302094230941 - 0.2440938113238637 - 0.3661037869666837 - 0.8612435253800703 - 0.3446469457560155 - 0.318720404050336 - 0.5220744785421958 - 0.8880206899408399 - 0.5634774945307948 - 0.9747541732552174 - 0.8102281041010764 - 0.6203340500400349 - 0.4310435738481046 - 0.8712608827026916 - 0.8994202471290041 - 0.2705928865325186 - 0.4521508723802859 - 0.6905025461858068 - 0.4916651130460493 - 0.1804584509878764 - 0.2017015003478852 - 0.3395612438897959 - 0.4091002604069691 - 0.5600197845626381 - 0.5956277119101879 - 0.8838321638557483 - 0.9658612027944986 - 0.6963460659776661 - 0.4738495479538888 - 0.4088119113580302 - 0.243284483054209 - 0.3859296436381466 - 0.7679544357104162 - 0.01381159924825186 - 0.1796811448730014 - 0.02541082334789051 - 0.7743384896047482 - 0.141483560101383 - 0.3889654336665851 - 0.8459402061837412 - 0.1405166229612373 - 0.9287785116849069 - 0.3140817050649155 - 0.5504986286971166 - 0.2422571404929973 - 0.2659128725950909 - 0.3870170197842911 - 0.5413139984374419 - 0.8625100772880461 - 0.7613679970891851 - 0.5730129884362317 - 0.1049478534842198 - 0.6929555386435059 - 0.8755770513105527 - 0.07269326371310651 - 0.8033069796739505 - 0.1370703232384103 - 0.8858623873308566 - 0.3023220394949059 - 0.4550848132764369 - 0.9905978777755867 - 0.01670583470407387 - 0.6436711056162766 - 0.06279571445182157 - 0.5052188950111678 - 0.8538507156686752 - 0.4396330476423022 - 0.02677514121712281 - 0.2115722346560593 - 0.5061218287842983 - 0.2427971814210999 - 0.9817541944739631 - 0.8429169137427158 - 0.4386705025508759 - 0.0696305050252302 - 0.2026887661912696 - 0.7945464248623811 - 0.003091268207049458 - 0.8244325196754175 - 0.5974378754111207 - 0.1573986463364677 - 0.9225258982404058 - 0.5836561857240182 - 0.1289123458548393 - 0.9884255592181573 - 0.1893804140323522 - 0.3782965032231579 - 0.2999975134725639 - 0.120010547026463 - 0.6389036255953586 - 0.9260330877534549 - 0.5827358770771827 - 0.09636587900876641 - 0.1278879032495667 - 0.06851399916891658 - 0.4242571474054461 - 0.1066483523776082 - 0.9949658293193997 - 0.2995006794311852 - 0.8747688154968453 - 0.4456912029318541 - 0.1886307984630315 - 0.1478096750681439 - 0.8248453302845162 - 0.6148854538446694 - 0.8425552442990274 - 0.3680433093563081 - 0.7433714676486414 - 0.9039110115732223 - 0.7196683178722294 - 0.7941963919891452 - 0.5514322523813037 - 0.4327590090298268 - 0.9242768015464562 - 0.9399185154803609 - 0.1317700763001642 - 0.5764953305607093 - 0.3242712195883189 - 0.4515189969248448 - 0.7729207394392783 - 0.7618251009920901 - 0.3405845114417143 - 0.4541923320320092 - 0.4057618027789309 - 0.7642146540518437 - 0.9286519410922046 - 0.718431422144423 - 0.4424542298244888 - 0.05606278261311252 - 0.5960353643448986 - 0.4811394277903455 - 0.4146973882953274 - 0.4920868109971459 - 0.6326989326475572 - 0.2732887011923575 - 0.1091636473262322 - 0.389959875407753 - 0.6038967013071028 - 0.8350402852411354 - 0.4902591647603883 - 0.8331922328561268 - 0.4912482537091994 - 0.8570467279336746 - 0.1094308223329823 - 0.6282479725723822 - 0.9100074117353395 - 0.5602508836990613 - 0.2920251327465024 - 0.8514043412579372 - 0.01537251436533576 - 0.6881663239512863 - 0.01706958906470695 - 0.8217778601582442 - 0.1191014134939982 - 0.725228841798392 - 0.4437742418097352 - 0.1235544902212146 - 0.801799356599981 - 0.3527858446278138 - 0.8582637237724371 - 0.9163963064442912 - 0.5726744842914573 - 0.4524406749426405 - 0.1880737410200616 - 0.373614723965328 - 0.7325739388320339 - 0.6999537856177709 - 0.01330397189336845 - 0.751164458663805 - 0.07417225409900334 - 0.2690798010824355 - 0.8822851214351823 - 0.1791896863317788 - 0.3045185796698804 - 0.5936045437703302 - 0.03606891649639914 - 0.396599802753088 - 0.3656781095183303 - 0.5806719483298611 - 0.7482572179396327 - 0.4680168598446316 - 0.7086084167914426 - 0.7471127414094495 - 0.1492424893621891 - 0.8565759617383288 - 0.2240663562090822 - 0.05845715246300846 - 0.9997072310982718 - 0.6018473335203661 - 0.643039968515234 - 0.7089007238297697 - 0.3104032324001013 - 0.3069612925020412 - 0.9113368067527325 - 0.2435779821290638 - 0.6752496416746457 - 0.1778387025273011 - 0.6925117161630895 - 0.5441882067135849 - 0.6437577622558207 - 0.1289260713665658 - 0.09889475837258514 - 0.1691373330066308 - 0.7227251468036348 - 0.621670717769386 - 0.4034542567789129 - 0.2303706609191148 - 0.0212834178803955 - 0.6207971583076944 - 0.8880512502373764 - 0.4245159977967383 - 0.1400464889962343 - 0.4086529948295152 - 0.9239332331657654 - 0.9681090080465848 - 0.1500437048339138 - 0.7126079393145757 - 0.7892058816186217 - 0.887479937316816 - 0.6721611667393579 - 0.3077499769165418 - 0.5905821862535975 - 0.8432957351313645 - 0.2603972632523439 - 0.2680991243397005 - 0.7118039371892934 - 0.763486285932547 - 0.06138382344243391 - 0.08274535805983434 - 0.4289110762152741 - 0.01244910956316574 - 0.5705607932647186 - 0.8229949712109675 - 0.5668310758308389 - 0.4513635251539973 - 0.4891930400609323 - 0.5500614565681379 - 0.8150267837567298 - 0.6098643174405738 - 0.722678207720437 - 0.8105868246132308 - 0.342122889796706 - 0.2795077587508625 - 0.1553010411619414 - 0.1098345987752024 - 0.114510854640637 - 0.01802190020541432 - 0.785814594151004 - 0.6680863964936914 - 0.7360013240079439 - 0.8815712350135023 - 0.4998816696044335 - 0.8856704014960747 - 0.3413437294837701 - 0.03634656897376436 - 0.4592133881876219 - 0.4393353261863663 - 0.1305100613585626 - 0.9337895571315944 - 0.8671894907062691 - 0.05302540146830918 - 0.591551894431407 - 0.71597600179319 - 0.5319767122362667 - 0.5838587320039861 - 0.1051209784987235 - 0.05277053587886453 - 0.6720618843125248 - 0.4665845719888469 - 0.1107915586891454 - 0.5226393827038072 - 0.2204652440673544 - 0.06601499404732207 - 0.3387533214391681 - 0.9706485079814611 - 0.1413295117550827 - 0.8589759809899643 - 0.08023056789558551 - 0.9818616666182494 - 0.1525582229572501 - 0.8497589156219139 - 0.2296906934057258 - 0.3664228557502381 - 0.3938589309492805 - 0.08975470787675215 - 0.5423000640808678 - 0.2096503808121794 - 0.8703204513334639 - 0.291244153303485 - 0.3227383849921404 - 0.3118386748815531 - 0.5173416914875623 - 0.671514488029772 - 0.5980772302030491 - 0.248002563363223 - 0.07549655984316621 - 0.04306584293219066 - 0.07443758670604221 - 0.1326441247474257 - 0.1611722776648295 - 0.1778957960607805 - 0.4743474054484313 - 0.2850730924701975 - 0.6298896153026614 - 0.9272958267639055 - 0.3216062923498228 - 0.8384147580354113 - 0.4570782284014609 - 0.817628727130461 - 0.5604555806798577 - 0.9726831870474196 - 0.9858680504634877 - 0.07392947424835354 - 0.09968440450719789 - 0.09751126711566153 - 0.03211548077421704 - 0.3875651951958846 - 0.7457322982884322 - 0.0004697040417629861 - 0.1077940713434874 - 0.4279600787668676 - 0.6893011378373346 - 0.1717478612279998 - 0.3692187838466137 - 0.8382571163390394 - 0.3149083970250214 - 0.6840459863769585 - 0.7135391229502623 - 0.6967511324751411 - 0.60682826210796 - 0.9312038004730354 - 0.8489470936583481 - 0.6675596258593118 - 0.7102575116484467 - 0.7967909701354394 - 0.4222335175131094 - 0.7658571827362561 - 0.3955452784091645 - 0.7391478951253777 - 0.05950582451091894 - 0.7377350156494462 - 0.4356315025102891 - 0.5760202792053971 - 0.1259744142612996 - 0.8800929652466301 - 0.9917123938415827 - 0.8999824872601219 - 0.6904739973304442 - 0.3937429103863946 - 0.7676213008584185 - 0.8378212900266957 - 0.09557417084964519 - 0.7587848534693958 - 0.1674699461872662 - 0.3100017590466494 - 0.7585817456076577 - 0.5301585756332858 - 0.4967109489039354 - 0.1720401586974536 - 0.7751750894332681 - 0.2283956914742215 - 0.6161865420719972 - 0.4672540667013729 - 0.4122114631912392 - 0.5002685895175031 - 0.8992035394321143 - 0.7630075683616467 - 0.636190987859467 - 0.8993717561421758 - 0.9046917795404263 - 0.8813557355427249 - 0.1390034801968926 - 0.3730716896392752 - 0.7493950429884348 - 0.5029684186942133 - 0.002931732425185118 - 0.7789901595130169 - 0.5797134111246834 - 0.07582599466765109 - 0.1692973190110605 - 0.3218872787628239 - 0.9772473433917533 - 0.4789804157567115 - 0.6492369078344077 - 0.4348055711922547 - 0.07530210788829965 - 0.7411302103616203 - 0.2822842925826574 - 0.7659498912288849 - 0.4158163251939743 - 0.810220587861167 - 0.4332936819970083 - 0.6509266944332163 - 0.7890454195885467 - 0.07677581573100249 - 0.01715959772393887 - 0.3513180956056803 - 0.7573848799235937 - 0.7832430131254958 - 0.5488928792607946 - 0.2773807079428495 - 0.9644101076109292 - 0.158128025147876 - 0.2162000576369936 - 0.8059668123173478 - 0.5596874475431408 - 0.9036123190078021 - 0.08245919929739202 - 0.4017322585526485 - 0.6189041471871277 - 0.2976975411997949 - 0.9118928858752171 - 0.8118844157466067 - 0.2004919029544974 - 0.7195897694720751 - 0.614117480737869 - 0.306868520691101 - 0.0717548601853502 - 0.316192042616442 - 0.4950875509345636 - 0.06341940125232008 - 0.2261429159513282 - 0.9477322391849365 - 0.2379723606355013 - 0.113282590712818 - 0.8954895978126202 - 0.897962688213585 - 0.7859583224991343 - 0.5395933599442969 - 0.2940186000883492 - 0.2881129505656405 - 0.9254074869056036 - 0.4665788917538722 - 0.2516783318053842 - 0.4673264901039096 - 0.5587270942101568 - 0.8373336551012776 - 0.8578313585116252 - 0.08421676586460895 - 0.9117896197064603 - 0.362068346471736 - 0.08494934091248922 - 0.0589882001708371 - 0.3482495482508627 - 0.9183185712666031 - 0.04509779404133844 - 0.6896750573093369 - 0.0436647400414291 - 0.4959922081717886 - 0.258489085695881 - 0.2671004679365747 - 0.1404033538059976 - 0.7992996307669106 - 0.9153005849023453 - 0.3486058871149975 - 0.3125036970697249 - 0.2958797579693915 - 0.2818197402951976 - 0.9588779210113451 - 0.3245333955132491 - 0.1448761252595434 - 0.6858518785732061 - 0.7963713371647351 - 0.06101090004089031 - 0.5047314999463277 - 0.08193366782962246 - 0.05245896328572013 - 0.1296420254365437 - 0.7937405220245349 - 0.6322448824643628 - 0.8046882987960707 - 0.2972781117403377 - 0.9701834242027625 - 0.4619063501984906 - 0.07378755308013256 - 0.8062440179206589 - 0.909194869187436 - 0.8614088354824202 - 0.006690870757484357 - 0.1411727712466666 - 0.911329642194494 - 0.7086769671942363 - 0.8725257377557902 - 0.922351990582281 - 0.7136859047158257 - 0.8483603178024464 - 0.4028343849054984 - 0.9535369162656465 - 0.1578313833998866 - 0.5332375920394412 - 0.6134822502813563 - 0.4617561168111728 - 0.4631144263600847 - 0.4194165802899457 - 0.6548189885067731 - 0.8953243898387648 - 0.7645678431712443 - 0.377354750244799 - 0.7698310848536658 - 0.590461611435421 - 0.3511027997311003 - 0.4563868438609254 - 0.6907407481225073 - 0.8477647240556769 - 0.05189504045270381 - 0.238271151863399 - 0.4621819944008538 - 0.8226561065249887 - 0.0991627683467086 - 0.2260422345023392 - 0.3214905996142528 - 0.5034650291634134 - 0.3568090090124901 - 0.8954744314113768 - 0.9961634645278953 - 0.05592562075719436 - 0.6094996827420404 - 0.6299883306167965 - 0.4968024430663177 - 0.9666553624616696 - 0.1562721485868494 - 0.2087950602055799 - 0.9845884015225781 - 0.08013060435051116 - 0.660584965912305 - 0.6185756180952549 - 0.1682132659549145 - 0.5292042644762542 - 0.4506671787073869 - 0.6253361339687641 - 0.829764286775202 - 0.01193963992800622 - 0.5971093457835975 - 0.526713497747761 - 0.6368931740302869 - 0.5003096919148142 - 0.05210850004107907 - 0.09143239349921133 - 0.4285658558372586 - 0.8845129759567675 - 0.3574970195444563 - 0.3827176331309809 - 0.007061177729346157 - 0.9728547232184367 - 0.3048161073844426 - 0.05672969476285321 - 0.6966150557728767 - 0.2241098237291293 - 0.6023795465926515 - 0.3888252033140849 - 0.22076936560458 - 0.2077741662392577 - 0.9973340266701218 - 0.09640036219002894 - 0.5493953384102378 - 0.6331189646117095 - 0.1560639387456087 - 0.7613072425402105 - 0.7963608949318763 - 0.1096597520220524 - 0.7282307238548603 - 0.4716769743635857 - 0.4493162460288411 - 0.4943913366408397 - 0.4721696629559047 - 0.1427344078076833 - 0.5709975735457051 - 0.6357211383353272 - 0.7751682515780767 - 0.7988028543903278 - 0.6427185834563324 - 0.1229811929321158 - 0.180622971450645 - 0.5818295807934132 - 0.8306782717089598 - 0.8040272734297611 - 0.3846443174149285 - 0.9063579640079829 - 0.9258502085418037 - 0.3122769024397199 - 0.01365530722529522 - 0.6688296045982205 - 0.1225798304347622 - 0.2777893059623694 - 0.4606303248498584 - 0.6004330239244856 - 0.01396692564680484 - 0.2346999690105585 - 0.495680993033855 - 0.01139045831962475 - 0.8063614705586037 - 0.8878735313611138 - 0.3858808740669085 - 0.8106925919645608 - 0.0001194300927482184 - 0.4792492687346955 - 0.6922062264664133 - 0.6880750489499505 - 0.4019511021877059 - 0.5866401713118062 - 0.9104654479942975 - 0.7352613804377491 - 0.2801322422973289 - 0.4914802270273346 - 0.7888744574729042 - 0.2578842821138366 - 0.5107520699440508 - 0.1887975424737173 - 0.9230533990859889 - 0.1379936807125312 - 0.8716709676467432 - 0.2430341300108037 - 0.1456003821523588 - 0.9637647199215743 - 0.1133054109782459 - 0.7526737364010497 - 0.5338865194784609 - 0.1046405553485287 - 0.5715352134468953 - 0.9191098078626746 - 0.4147043748114285 - 0.009149058245851927 - 0.2461444377562196 - 0.8375426547426361 - 0.7453467435167912 - 0.2019932927024077 - 0.178720421335089 - 0.6117359424836225 - 0.3194780356252735 - 0.1127758378100353 - 0.3700288321332428 - 0.8709350030897772 - 0.4319769743699743 - 0.7752869137189558 - 0.5543693324732653 - 0.331207635012958 - 0.7717079358756485 - 0.02726295719922582 - 0.7284959580819013 - 0.4594120414860793 - 0.40718209433765 - 0.226578766991043 - 0.3604793378678612 - 0.9272079264992265 - 0.3624000994256164 - 0.5083410505936828 - 0.5132010193885073 - 0.1870429231875193 - 0.8735136110638102 - 0.6890939743487512 - 0.5051236709151333 - 0.8139743912615182 - 0.1120758936900458 - 0.9306755140184001 - 0.9665951515696175 - 0.02471692156535448 - 0.5771470256319545 - 0.7110943844202603 - 0.5922335442319472 - 0.2398018977772279 - 0.1203609933764469 - 0.3826580876049639 - 0.875805558068222 - 0.3981163435254406 - 0.2108112451881527 - 0.191099083671583 - 0.5124795678625652 - 0.7503979355312498 - 0.7547862613298055 - 0.1789196514639365 - 0.3028497185704136 - 0.3385065971416608 - 0.3745784534396412 - 0.3248866877814978 - 0.613835961315966 - 0.4889792947062341 - 0.8716740681915276 - 0.6756480344063235 - 0.968112438426283 - 0.9308161405896457 - 0.2538406098596726 - 0.3627292049052688 - 0.2025475957545959 - 0.1811788234788845 - 0.9608429624299698 - 0.4333927840810356 - 0.01603033395983349 - 0.9892798657921559 - 0.8345493122951335 - 0.1467690268157033 - 0.6515231915812871 - 0.04242365793537033 - 0.07211348196173166 - 0.008519136855435084 - 0.899080212021852 - 0.2957822514012526 - 0.2390899967867923 - 0.3324238754920917 - 0.2486949475576186 - 0.5127430817294065 - 0.09317781704725296 - 0.6874292155612595 - 0.9026597852654902 - 0.3926674513911342 - 0.5117818051033309 - 0.5175175869912791 - 0.8039224784380771 - 0.6959210754766185 - 0.07706306981330029 - 0.5276455823271231 - 0.7839613435050881 - 0.2001366271802047 - 0.08902919547661874 - 0.8048397500719897 - 0.1555384003018449 - 0.4441815425846533 - 0.4823602917887764 - 0.3401085531863694 - 0.3011816171840091 - 0.543744200215992 - 0.4239042920984262 - 0.4455084629239816 - 0.2936079590265439 - 0.2234175086927699 - 0.008053063992677734 - 0.5162477058394888 - 0.8327241539560692 - 0.4868967495860982 - 0.5610734944924202 - 0.7592612407079381 - 0.6806092985372305 - 0.1711518583823707 - 0.6492827793916514 - 0.6164542527755618 - 0.9176357458772743 - 0.9110377033653959 - 0.1138326962043278 - 0.6282820898249568 - 0.5223380643853266 - 0.531675792025915 - 0.6159258517083439 - 0.8165352239818717 - 0.3165316024840137 - 0.9540078127517641 - 0.7205929289665157 - 0.7255199418600131 - 0.3533332560809035 - 0.932211347981781 - 0.03301042155249816 - 0.9773712086089945 - 0.4298262134133736 - 0.9105073877840035 - 0.7441073093378612 - 0.5532773286995735 - 0.1107016802926484 - 0.5641726460407059 - 0.9173148095248845 - 0.2821930451433768 - 0.9251178319034694 - 0.1099791916419871 - 0.7669220627371564 - 0.1668065341618327 - 0.7997049365434751 - 0.7710458896862208 - 0.8940259454112305 - 0.7458956764371325 - 0.3360972494653212 - 0.01857409463499742 - 0.09135582751964948 - 0.6117138554299808 - 0.3234976761366443 - 0.2572152731427709 - 0.5991283124374612 - 0.9803232204821808 - 0.8419270971519397 - 0.847450268997076 - 0.4270975513603293 - 0.617516262315833 - 0.4785105542177723 - 0.4310331638959676 - 0.4166271814244361 - 0.09543657088347417 - 0.05230608336573576 - 0.7573438467432491 - 0.1873455017174158 - 0.08639341650190784 - 0.4699261851036909 - 0.7885833570553514 - 0.3101950990203943 - 0.92299458056949 - 0.2183588927595191 - 0.7669441496039388 - 0.7318366708627464 - 0.8374815825708336 - 0.1465524917864471 - 0.6524839251731855 - 0.5298420135281581 - 0.3751582216810048 - 0.08223058299700385 - 0.8053864935951569 - 0.7827495125402972 - 0.9085876927414407 - 0.6582655448311053 - 0.2009221353122 - 0.84909078271494 - 0.5162758942521 - 0.7351026433431321 - 0.2392584579963593 - 0.9121431535312886 - 0.7538698856613363 - 0.337535871506999 - 0.6421286580674769 - 0.8019863530844662 - 0.7817014652246687 - 0.8399559948165362 - 0.3706777111010865 - 0.3100963232217205 - 0.1595502756309751 - 0.9225597915281327 - 0.8443921678509758 - 0.1353833524464909 - 0.8868118624565748 - 0.1871009220083383 - 0.5404799541422477 - 0.9204085503644368 - 0.5169503123969303 - 0.8052747353895215 - 0.6184613906934043 - 0.3086863282877159 - 0.5635625338377678 - 0.9246082641358258 - 0.8554347191003365 - 0.9937942648258703 - 0.5697781531410282 - 0.818071466342193 - 0.2191285401289352 - 0.2411231556302273 - 0.9134360740123122 - 0.1065620672389537 - 0.7814774339538224 - 0.5436031859859516 - 0.7996598357100672 - 0.01460122498504251 - 0.5348768157729654 - 0.5532616175527936 - 0.04259679440381663 - 0.2151978834194401 - 0.9636760743982743 - 0.8935821396699114 - 0.7199144874335632 - 0.9261607671827503 - 0.322090215809866 - 0.3464364039028821 - 0.6046687957430094 - 0.5466826291883904 - 0.5488130183746518 - 0.7730239361954699 - 0.1186714941138909 - 0.163675267602798 - 0.5839922667751914 - 0.3376690853040974 - 0.3157625955485641 - 0.2335444519150322 - 0.9552128787117048 - 0.6060498684168233 - 0.8031205790966756 - 0.09500394924393367 - 0.6829293612225309 - 0.02474172790868994 - 0.6928399599537594 - 0.9596662968909566 - 0.0354140096120779 - 0.1700160463986237 - 0.5431418713960434 - 0.3518108929501464 - 0.478690003324274 - 0.9975356573648183 - 0.5688629381980881 - 0.07301866870144262 - 0.1769912570904168 - 0.8785636309166717 - 0.7938444777774916 - 0.3649112372869195 - 0.6449426993878609 - 0.319081343338302 - 0.4145125723157901 - 0.3347414790034876 - 0.05679418328935963 - 0.7741908818972759 - 0.1665714838674846 - 0.580437131728996 - 0.2548933276798601 - 0.118487305147958 - 0.8998981013784229 - 0.9189234457230651 - 0.4815650513691491 - 0.0184262730245514 - 0.4788222375808187 - 0.7113373371556735 - 0.1807011619352573 - 0.4770037873643909 - 0.6901673126823901 - 0.7028505087653749 - 0.1327824622351439 - 0.1990375833814905 - 0.4505384052186897 - 0.4487799018544328 - 0.261501007045134 - 0.7367005909649922 - 0.9616152826820373 - 0.652256524642562 - 0.4432236802169118 - 0.07726278457386186 - 0.7005161194649856 - 0.2227400848204112 diff --git a/packages/muelu/test/navierstokes/myBGS1.xml b/packages/muelu/test/navierstokes/myBGS1.xml deleted file mode 100644 index 38c2c2513150..000000000000 --- a/packages/muelu/test/navierstokes/myBGS1.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myBS1.xml b/packages/muelu/test/navierstokes/myBS1.xml deleted file mode 100644 index 9e2afe1a68bc..000000000000 --- a/packages/muelu/test/navierstokes/myBS1.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myBS2.xml b/packages/muelu/test/navierstokes/myBS2.xml deleted file mode 100644 index aad9bd493d8a..000000000000 --- a/packages/muelu/test/navierstokes/myBS2.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myBS3.xml b/packages/muelu/test/navierstokes/myBS3.xml deleted file mode 100644 index b88aeda14d7a..000000000000 --- a/packages/muelu/test/navierstokes/myBS3.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myIndefDiag1.xml b/packages/muelu/test/navierstokes/myIndefDiag1.xml deleted file mode 100644 index a768ca679bda..000000000000 --- a/packages/muelu/test/navierstokes/myIndefDiag1.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/mySIM1.xml b/packages/muelu/test/navierstokes/mySIM1.xml deleted file mode 100644 index 490b201d9991..000000000000 --- a/packages/muelu/test/navierstokes/mySIM1.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/mySIM2.xml b/packages/muelu/test/navierstokes/mySIM2.xml deleted file mode 100644 index a021071b5ebb..000000000000 --- a/packages/muelu/test/navierstokes/mySIM2.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myUzawa1.xml b/packages/muelu/test/navierstokes/myUzawa1.xml deleted file mode 100644 index 496f184b5b42..000000000000 --- a/packages/muelu/test/navierstokes/myUzawa1.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myUzawa2.xml b/packages/muelu/test/navierstokes/myUzawa2.xml deleted file mode 100644 index d91036ab88c4..000000000000 --- a/packages/muelu/test/navierstokes/myUzawa2.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myUzawa3.xml b/packages/muelu/test/navierstokes/myUzawa3.xml deleted file mode 100644 index aad14d35832b..000000000000 --- a/packages/muelu/test/navierstokes/myUzawa3.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myXML.xml b/packages/muelu/test/navierstokes/myXML.xml deleted file mode 100644 index 19e2aab335b6..000000000000 --- a/packages/muelu/test/navierstokes/myXML.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myXML2.xml b/packages/muelu/test/navierstokes/myXML2.xml deleted file mode 100644 index 5ad9d559a5b8..000000000000 --- a/packages/muelu/test/navierstokes/myXML2.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/navierstokes/myXMLg.xml b/packages/muelu/test/navierstokes/myXMLg.xml deleted file mode 100644 index bffd8b6c7d03..000000000000 --- a/packages/muelu/test/navierstokes/myXMLg.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/muelu/test/perf_tests_kokkos/CMakeLists.txt b/packages/muelu/test/perf_tests_kokkos/CMakeLists.txt index b736403f8bbd..36dfeb3b27a3 100644 --- a/packages/muelu/test/perf_tests_kokkos/CMakeLists.txt +++ b/packages/muelu/test/perf_tests_kokkos/CMakeLists.txt @@ -9,8 +9,7 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../gallery) TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../unit_tests) -IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) OR - (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos)) +IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) TRIBITS_ADD_EXECUTABLE( Redirection @@ -44,15 +43,3 @@ TRIBITS_ADD_EXECUTABLE( ) ENDIF() - - IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - - TRIBITS_ADD_TEST( - Redirection - NAME "Redirection_Epetra" - ARGS "--linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - - ENDIF() diff --git a/packages/muelu/test/perf_tests_kokkos/Redirection.cpp b/packages/muelu/test/perf_tests_kokkos/Redirection.cpp index 2e085a260db9..8de091be5ee4 100644 --- a/packages/muelu/test/perf_tests_kokkos/Redirection.cpp +++ b/packages/muelu/test/perf_tests_kokkos/Redirection.cpp @@ -137,30 +137,8 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib &lib, int ar tm = Teuchos::null; } if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - typedef Epetra_CrsMatrix eCrsMatrix; - RCP eA = Utilities::Op2EpetraCrs(A); - TEUCHOS_TEST_FOR_EXCEPTION(eA.is_null(), MueLu::Exceptions::RuntimeError, - "A is not a Epetra CrsMatrix"); - - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("Loop #2: Tpetra/Epetra"))); - - for (int i = 0; i < loops; i++) { - for (LocalOrdinal row = 0; row < numRows; row++) { - int numEntries; - double *eValues; - int *eIndices; - - eA->ExtractMyRowView(row, numEntries, eValues, eIndices); - - validation += numEntries; - } - } - tm = Teuchos::null; -#else TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::RuntimeError, "Epetra is not available"); -#endif } std::cout << "validation = " << validation << std::endl; } diff --git a/packages/muelu/test/permutation/CMakeLists.txt b/packages/muelu/test/permutation/CMakeLists.txt deleted file mode 100644 index 96a13a1dc4b4..000000000000 --- a/packages/muelu/test/permutation/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src) - -# GH: remove all the permutation tests based on this? -IF(NOT HAVE_MUELU_COMPLEX AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Epetra AND NOT ${PACKAGE_NAME}_ENABLE_Tpetra) - TRIBITS_ADD_EXECUTABLE_AND_TEST( - Permutation - SOURCES Permutation.cpp - ARGS "--linAlgebra=Epetra" - COMM serial mpi - ) -ENDIF() - -TRIBITS_COPY_FILES_TO_BINARY_DIR(Permutation_cp -SOURCE_FILES test1.txt test2.txt test3.txt test4.txt test5.txt exp1.txt exp2.txt exp3.txt exp4.txt exp5.txt -) diff --git a/packages/muelu/test/permutation/Permutation.cpp b/packages/muelu/test/permutation/Permutation.cpp deleted file mode 100644 index e35fc4ecaded..000000000000 --- a/packages/muelu/test/permutation/Permutation.cpp +++ /dev/null @@ -1,310 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include "MueLu_ConfigDefs.hpp" - -#include "MueLu_Utilities.hpp" -#include "MueLu_Level.hpp" -#include "MueLu_FactoryManager.hpp" -#include "MueLu_HierarchyUtils.hpp" -#include "MueLu_PermutationFactory.hpp" - -#include "MueLu_Exceptions.hpp" - -#include -/**********************************************************************************/ - -namespace MueLuTests { - -template -Teuchos::RCP GetEpetraMatrix(std::string name, const Teuchos::RCP level, const Teuchos::RCP& fct) { - Teuchos::RCP > result = level->Get > >(name, fct.get()); - Teuchos::RCP > crsres = Teuchos::rcp_dynamic_cast >(result); - Teuchos::RCP > crsmat = crsres->getCrsMatrix(); - Teuchos::RCP > epcrsmat = Teuchos::rcp_dynamic_cast >(crsmat); - Teuchos::RCP epres = epcrsmat->getEpetra_CrsMatrix(); - return epres; -} - -// run tests with "Algebraic" permutation strategy and nDofsPerNode = 1 -template -bool runPermutationTest(const std::string input_filename, const std::string expected_filename, const Teuchos::RCP >& comm) { -#include - -#ifndef HAVE_MUELU_INST_COMPLEX_INT_INT - Teuchos::RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - - Epetra_CrsMatrix* ptrA = NULL; - Epetra_CrsMatrix* ptrExpected = NULL; - int ret = EpetraExt::MatlabFileToCrsMatrix(input_filename.c_str(), - *Xpetra::toEpetra(comm), - ptrA); - - if (ret != 0) - std::cout << "failed to read matrix from file" << std::endl; - - if (expected_filename.size() > 0) { - int ret2 = EpetraExt::MatlabFileToCrsMatrix(expected_filename.c_str(), - *Xpetra::toEpetra(comm), - ptrExpected); - - if (ret2 != 0) - std::cout << "failed to read matrix from file" << std::endl; - } - Teuchos::RCP epA = Teuchos::rcp(ptrA); - Teuchos::RCP epExpected = Teuchos::rcp(ptrExpected); - - // Epetra_CrsMatrix -> Xpetra::Matrix - Teuchos::RCP exA = Teuchos::rcp(new EpetraCrsMatrix(epA)); - Teuchos::RCP crsOp = Teuchos::rcp(new CrsMatrixWrap(exA)); - Teuchos::RCP A = Teuchos::rcp_dynamic_cast(crsOp); - A->SetFixedBlockSize(1); - - Teuchos::RCP Finest = Teuchos::rcp(new Level()); - Finest->SetLevelID(0); // must be level 0 for NullspaceFactory - Finest->Set("A", A); - - // permute full matrix - Teuchos::RCP PermFact = Teuchos::rcp(new MueLu::PermutationFactory()); - PermFact->SetParameter("PermutationStrategy", Teuchos::ParameterEntry(std::string("Algebraic"))); - // PermFact->SetParameter("PermutationStrategy",Teuchos::ParameterEntry(std::string("Local"))); - PermFact->SetParameter("PermutationRowMapName", Teuchos::ParameterEntry(std::string(""))); - PermFact->SetFactory("PermutationRowMapFactory", Teuchos::null); - - // setup main factory manager - Teuchos::RCP M = Teuchos::rcp(new FactoryManager()); - M->SetFactory("permQT", PermFact); - M->SetFactory("A", MueLu::NoFactory::getRCP()); // this is the input matrix - MueLu::SetFactoryManager SFMFinest(Finest, M); - - // prepare building process for permutation operators - Finest->Request("A", PermFact.get()); - Finest->Request("permA", PermFact.get()); - Finest->Request("permP", PermFact.get()); - Finest->Request("permQT", PermFact.get()); - Finest->Request("permScaling", PermFact.get()); - Finest->Request("#RowPermutations", PermFact.get()); - Finest->Request("#ColPermutations", PermFact.get()); - Finest->Request("#WideRangeRowPermutations", PermFact.get()); - Finest->Request("#WideRangeColPermutations", PermFact.get()); - - // build permutation operators - PermFact->Build(*Finest); - - // std::cout << "P" << *GetEpetraMatrix("permP", Finest, PermFact) << std::endl; - // std::cout << "Q^T" << *GetEpetraMatrix("permQT", Finest, PermFact) << std::endl; - // std::cout << "permA" << *GetEpetraMatrix("A", Finest, PermFact) << std::endl; - - Teuchos::RCP epResult = GetEpetraMatrix("A", Finest, PermFact); - // std::cout << *epResult << std::endl; - - if (epExpected != Teuchos::null) { - Epetra_CrsMatrix* comparison = NULL; - EpetraExt::MatrixMatrix::Add(*epResult, false, -1.0, *epExpected, false, 1.0, comparison); - comparison->FillComplete(); - double norm = comparison->NormInf(); - delete comparison; - comparison = NULL; - - if (norm < 1.0e-14) { - *out << "** PASSED **: " << input_filename << std::endl; - return true; - } else { - *out << "-- FAILED --: " << input_filename << std::endl; - return false; - } - } -#endif - *out << "-- FAILED --: " << input_filename << " no result file found" << std::endl; - return false; // no result for comparison available -} - -// run tests with "Local" permutation strategy and nDofsPerNode = 3 -template -bool runPermutationTest2(const std::string input_filename, const std::string expected_filename, const Teuchos::RCP >& comm) { -#include - -#ifndef HAVE_MUELU_INST_COMPLEX_INT_INT - Teuchos::RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - out->setOutputToRootOnly(0); - - Epetra_CrsMatrix* ptrA = NULL; - Epetra_CrsMatrix* ptrExpected = NULL; - int ret = EpetraExt::MatlabFileToCrsMatrix(input_filename.c_str(), - *Xpetra::toEpetra(comm), - ptrA); - - if (ret != 0) - std::cout << "failed to read matrix from file" << std::endl; - - if (expected_filename.size() > 0) { - int ret2 = EpetraExt::MatlabFileToCrsMatrix(expected_filename.c_str(), - *Xpetra::toEpetra(comm), - ptrExpected); - - if (ret2 != 0) - std::cout << "failed to read matrix from file" << std::endl; - } - Teuchos::RCP epA = Teuchos::rcp(ptrA); - Teuchos::RCP epExpected = Teuchos::rcp(ptrExpected); - - // Epetra_CrsMatrix -> Xpetra::Matrix - Teuchos::RCP exA = Teuchos::rcp(new EpetraCrsMatrix(epA)); - Teuchos::RCP crsOp = Teuchos::rcp(new CrsMatrixWrap(exA)); - Teuchos::RCP A = Teuchos::rcp_dynamic_cast(crsOp); - A->SetFixedBlockSize(3); - - Teuchos::RCP Finest = Teuchos::rcp(new Level()); - Finest->SetLevelID(0); // must be level 0 for NullspaceFactory - Finest->Set("A", A); - - // permute full matrix - Teuchos::RCP PermFact = Teuchos::rcp(new MueLu::PermutationFactory()); - PermFact->SetParameter("PermutationStrategy", Teuchos::ParameterEntry(std::string("Local"))); - PermFact->SetParameter("PermutationRowMapName", Teuchos::ParameterEntry(std::string(""))); - PermFact->SetFactory("PermutationRowMapFactory", Teuchos::null); - - // setup main factory manager - Teuchos::RCP M = Teuchos::rcp(new FactoryManager()); - M->SetFactory("permQT", PermFact); - M->SetFactory("A", MueLu::NoFactory::getRCP()); // this is the input matrix - MueLu::SetFactoryManager SFMFinest(Finest, M); - - // prepare building process for permutation operators - Finest->Request("A", PermFact.get()); - Finest->Request("permA", PermFact.get()); - Finest->Request("permP", PermFact.get()); - Finest->Request("permQT", PermFact.get()); - Finest->Request("permScaling", PermFact.get()); - Finest->Request("#RowPermutations", PermFact.get()); - Finest->Request("#ColPermutations", PermFact.get()); - Finest->Request("#WideRangeRowPermutations", PermFact.get()); - Finest->Request("#WideRangeColPermutations", PermFact.get()); - - // build permutation operators - PermFact->Build(*Finest); - - // std::cout << "P" << *GetEpetraMatrix("permP", Finest, PermFact) << std::endl; - // std::cout << "Q^T" << *GetEpetraMatrix("permQT", Finest, PermFact) << std::endl; - // std::cout << "permA" << *GetEpetraMatrix("A", Finest, PermFact) << std::endl; - - Teuchos::RCP epResult = GetEpetraMatrix("A", Finest, PermFact); - // std::cout << *epResult << std::endl; - - if (epExpected != Teuchos::null) { - Epetra_CrsMatrix* comparison = NULL; - EpetraExt::MatrixMatrix::Add(*epResult, false, -1.0, *epExpected, false, 1.0, comparison); - comparison->FillComplete(); - // std::cout << *comparison << std::endl; - double norm = comparison->NormInf(); - delete comparison; - comparison = NULL; - - if (norm < 1.0e-14) { - *out << "** PASSED **: " << input_filename << std::endl; - return true; - } else { - *out << "-- FAILED --: " << input_filename << std::endl; - return false; - } - } -#endif - *out << "-- FAILED --: " << input_filename << " no result file found" << std::endl; - return false; // no result for comparison available -} - -} // namespace MueLuTests - -template -int main_(Teuchos::CommandLineProcessor& clp, Xpetra::UnderlyingLib lib, int argc, char* argv[]) { -#include - - using Teuchos::RCP; - using namespace MueLuTests; - - Teuchos::oblackholestream blackhole; - - RCP > comm = Teuchos::DefaultComm::getComm(); - int numProcs = comm->getSize(); - - bool bSuccess = true; -#ifndef HAVE_MUELU_INST_COMPLEX_INT_INT - // runPermutationTest(MatrixFileName, ExpectedFileName, comm) - if (runPermutationTest("test1.txt", "exp1.txt", comm) == false) bSuccess = false; - if (runPermutationTest("test2.txt", "exp2.txt", comm) == false) bSuccess = false; - if (runPermutationTest("test3.txt", "exp3.txt", comm) == false) bSuccess = false; - - // the following tests work only on 1 or 2 processors - if (numProcs == 1 || numProcs == 2) { - if (runPermutationTest2("test4.txt", "exp4.txt", comm) == false) bSuccess = false; - // test seems to be ok, but matrix addition is not working - // has wrong entries on the diagonal on proc1... -> wrong handling of index base? - // if(runPermutationTest2("test5.txt", "exp5.txt" /*"exp5.txt"*/, comm) == false) bSuccess = false; - } -#endif - if (bSuccess == false) - return EXIT_FAILURE; - return EXIT_SUCCESS; -} - -int main(int argc, char* argv[]) { - bool success = false; - - Teuchos::GlobalMPISession mpiSession(&argc, &argv); - - const bool throwExceptions = false; - const bool recogniseAllOptions = false; - - Teuchos::CommandLineProcessor clp(throwExceptions, recogniseAllOptions); - Xpetra::Parameters xpetraParameters(clp); - - std::string node = ""; - clp.setOption("node", &node, "node type (serial | openmp | cuda | hip)"); - - switch (clp.parse(argc, argv, NULL)) { - case Teuchos::CommandLineProcessor::PARSE_ERROR: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); - - if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - return main_(clp, lib, argc, argv); -#else - throw MueLu::Exceptions::RuntimeError("Epetra is not available"); -#endif - } - - if (lib == Xpetra::UseTpetra) { - std::cout << "Skip permutation tests for Tpetra." << std::endl; - } - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -} diff --git a/packages/muelu/test/permutation/exp1.txt b/packages/muelu/test/permutation/exp1.txt deleted file mode 100644 index f05addfae256..000000000000 --- a/packages/muelu/test/permutation/exp1.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 1 1.0 -2 2 1.0 -3 3 1.0 \ No newline at end of file diff --git a/packages/muelu/test/permutation/exp2.txt b/packages/muelu/test/permutation/exp2.txt deleted file mode 100644 index 1254af30db3d..000000000000 --- a/packages/muelu/test/permutation/exp2.txt +++ /dev/null @@ -1,6 +0,0 @@ -1 1 1.0 -2 2 1.0 -2 3 0.5 -3 1 1.4 -3 2 0.6 -3 3 1.0 \ No newline at end of file diff --git a/packages/muelu/test/permutation/exp3.txt b/packages/muelu/test/permutation/exp3.txt deleted file mode 100644 index 54c20b036e1d..000000000000 --- a/packages/muelu/test/permutation/exp3.txt +++ /dev/null @@ -1,6 +0,0 @@ -1 1 1 -2 2 1 -3 3 1 -4 4 1 -5 5 1 -6 6 1 \ No newline at end of file diff --git a/packages/muelu/test/permutation/exp4.txt b/packages/muelu/test/permutation/exp4.txt deleted file mode 100644 index 860fb927e6d3..000000000000 --- a/packages/muelu/test/permutation/exp4.txt +++ /dev/null @@ -1,6 +0,0 @@ -1 1 1.0 -2 2 1.0 -3 3 1.0 -4 4 1.0 -5 5 1.0 -6 6 1.0 \ No newline at end of file diff --git a/packages/muelu/test/permutation/exp5.txt b/packages/muelu/test/permutation/exp5.txt deleted file mode 100644 index 0dfe72b2b558..000000000000 --- a/packages/muelu/test/permutation/exp5.txt +++ /dev/null @@ -1,13 +0,0 @@ -1 1 1.0 -1 2 10.0 -2 1 0.01 -2 2 1.0 -3 1 1.1 -4 2 1.125 -3 3 1.0 -4 4 1.0 -5 5 1.0 -6 6 1.0 - - - diff --git a/packages/muelu/test/permutation/test1.txt b/packages/muelu/test/permutation/test1.txt deleted file mode 100644 index 2600cd39d02f..000000000000 --- a/packages/muelu/test/permutation/test1.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 1 1.0 -2 3 2.0 -3 2 3.0 diff --git a/packages/muelu/test/permutation/test2.txt b/packages/muelu/test/permutation/test2.txt deleted file mode 100644 index 92d5d4290b45..000000000000 --- a/packages/muelu/test/permutation/test2.txt +++ /dev/null @@ -1,6 +0,0 @@ -1 1 1.0 -2 3 2.0 -2 2 1.0 -3 1 7.0 -3 2 5.0 -3 3 3.0 diff --git a/packages/muelu/test/permutation/test3.txt b/packages/muelu/test/permutation/test3.txt deleted file mode 100644 index 1f5433d482ed..000000000000 --- a/packages/muelu/test/permutation/test3.txt +++ /dev/null @@ -1,6 +0,0 @@ -3 1 3 -1 2 1 -2 3 2 -5 4 5 -6 5 6 -4 6 4 \ No newline at end of file diff --git a/packages/muelu/test/permutation/test4.txt b/packages/muelu/test/permutation/test4.txt deleted file mode 100644 index 5137403a2aa1..000000000000 --- a/packages/muelu/test/permutation/test4.txt +++ /dev/null @@ -1,6 +0,0 @@ -1 2 1.0 -2 1 2.0 -3 3 3.0 -4 5 4.0 -5 6 5.0 -6 4 6.0 \ No newline at end of file diff --git a/packages/muelu/test/permutation/test5.txt b/packages/muelu/test/permutation/test5.txt deleted file mode 100644 index e92a13ad7830..000000000000 --- a/packages/muelu/test/permutation/test5.txt +++ /dev/null @@ -1,10 +0,0 @@ -1 1 1.0 -2 2 2.0 -3 3 3.0 -4 4 4.0 -5 5 5.0 -6 6 6.0 -1 2 0.1 -2 1 200 -3 2 3.3 -4 1 4.5 \ No newline at end of file diff --git a/packages/muelu/test/scaling/CMakeLists.txt b/packages/muelu/test/scaling/CMakeLists.txt index ab9a95e1b7ff..2602e7a2a595 100644 --- a/packages/muelu/test/scaling/CMakeLists.txt +++ b/packages/muelu/test/scaling/CMakeLists.txt @@ -1,9 +1,7 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 ${PACKAGE_NAME}_ENABLE_Belos - ${PACKAGE_NAME}_ENABLE_Epetra ) # @@ -24,12 +22,8 @@ IF (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) SET(${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK YES) ENDIF() -IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - SET(${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK YES) -ENDIF() - -IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK OR ${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK) +IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK) TRIBITS_ADD_EXECUTABLE( Driver @@ -168,7 +162,6 @@ TRIBITS_ADD_TEST( PASS_REGULAR_EXPRESSION "Belos converged" ) -# not very elegant. The best would probably to make Reuse.cpp work for both Epetra and Tpetra IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK) TRIBITS_ADD_EXECUTABLE( Reuse @@ -194,121 +187,12 @@ TRIBITS_COPY_FILES_TO_BINARY_DIR(ReadMatrix_cp ENDIF() -IF (${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK) - - TRIBITS_ADD_EXECUTABLE( - ImportPerformanceEpetra - SOURCES ImportPerformance - COMM mpi - TARGET_DEFINES ${PACKAGE_NAME}_UNDEFINE_Tpetra=1 - ) - -ENDIF() - - # # Tests # - -IF (${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK AND (NOT Xpetra_INT_LONG_LONG)) - - IF (${PACKAGE_NAME}_ENABLE_Zoltan) - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_Defaults" - ARGS "--linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_Rerun" - ARGS "--linAlgebra=Epetra --xml=scaling-with-rerun.xml" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_isotropic_poisson" - ARGS "--linAlgebra=Epetra --xml=iso_poisson.xml" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - - - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_Milestone" - ARGS "--linAlgebra=Epetra --xml=conchas_milestone_zoltan.xml" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - - IF (${PACKAGE_NAME}_ENABLE_Zoltan AND ${PACKAGE_NAME}_ENABLE_Isorropia) - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_IsorropiaPoisson" - ARGS "--linAlgebra=Epetra --xml=isorropia.xml" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - ENDIF() - - IF (${PACKAGE_NAME}_ENABLE_Zoltan AND ${PACKAGE_NAME}_ENABLE_Isorropia) - TRIBITS_ADD_TEST( - Driver - NAME "DriverEpetra_CircNspDependency" - ARGS "--linAlgebra=Epetra --xml=circ_nsp_dependency.xml" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - ENDIF() - - ENDIF() - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Driver - NAME "RAPScalingTestEpetra" - ARGS "--linAlgebra=Epetra --xml=rap.xml --solver=none --nx=50 --ny=50 --rebuild=1" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Driver - NAME "SmootherScalingTestEpetra" - ARGS "--linAlgebra=Epetra --xml=smoother.xml --nx=10 --ny=10 --solver=none" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - ReadMatrix - NAME "ReadMatrixEpetra" - ARGS "--linAlgebra=Epetra --xml=simple.xml" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - -ENDIF() - -IF (${PACKAGE_NAME}_HAVE_EPETRA_SOLVER_STACK) - - TRIBITS_ADD_TEST( - ImportPerformanceEpetra - NAME "ImportPerformance_Epetra" - ARGS "--linAlgebra=Epetra --nx=30 --ny=30" - NUM_MPI_PROCS 4 - COMM mpi # HAVE_MPI required - ) - -ENDIF() - IF (${PACKAGE_NAME}_HAVE_TPETRA_SOLVER_STACK) TRIBITS_ADD_TEST( @@ -641,29 +525,6 @@ IF(Tpetra_INST_SERIAL) ) ENDIF() -IF (${PACKAGE_NAME}_ENABLE_Epetra) - TRIBITS_ADD_TEST( - SpMVPerformance - NAME_POSTFIX "Epetra" - COMM mpi - NUM_MPI_PROCS 1 - ARGS "--linAlgebra=Epetra --nx=120 --ny=120 --nz=120 --matrixType=Laplace3D --num-runs=1000" - PASS_REGULAR_EXPRESSION "Complete" - RUN_SERIAL - CATEGORIES PERFORMANCE - ) - - TRIBITS_ADD_TEST( - SpMVPerformance - NAME_POSTFIX "Epetra" - COMM mpi - NUM_MPI_PROCS 4 - ARGS "--linAlgebra=Epetra --nx=120 --ny=120 --nz=120 --matrixType=Laplace3D --num-runs=1000" - PASS_REGULAR_EXPRESSION "Complete" - RUN_SERIAL - CATEGORIES PERFORMANCE - ) -ENDIF() # Driver to evaluate low level Matrix Matrix multiply kernels potentially using different TPLs # This differs from the existing Matrix Matrix driver that forms parallel random matrices for testing diff --git a/packages/muelu/test/scaling/ComboPDriver.cpp b/packages/muelu/test/scaling/ComboPDriver.cpp index 909bbd012e63..b509add0198c 100644 --- a/packages/muelu/test/scaling/ComboPDriver.cpp +++ b/packages/muelu/test/scaling/ComboPDriver.cpp @@ -45,9 +45,7 @@ #include #include #include -#ifdef HAVE_MUELU_TPETRA #include -#endif #include // => This header defines Belos::XpetraOp #endif #define FOURBYFOUR diff --git a/packages/muelu/test/scaling/Driver.cpp b/packages/muelu/test/scaling/Driver.cpp index 39f2fd5d2053..6e3568e06af6 100644 --- a/packages/muelu/test/scaling/Driver.cpp +++ b/packages/muelu/test/scaling/Driver.cpp @@ -56,9 +56,6 @@ #include // => This header defines Belos::XpetraOp #include // => This header defines Belos::MueLuOp #include // => This header defines Belos::TpetraOp -#ifdef HAVE_MUELU_EPETRA -#include // => This header defines Belos::EpetraPrecOp -#endif #endif #ifdef HAVE_MUELU_CUDA @@ -77,10 +74,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#endif - /*********************************************************************/ #include "KokkosBlas1_abs_impl.hpp" diff --git a/packages/muelu/test/scaling/DriverCore.hpp b/packages/muelu/test/scaling/DriverCore.hpp index e04b9e51748b..8d1a3a7cd52a 100644 --- a/packages/muelu/test/scaling/DriverCore.hpp +++ b/packages/muelu/test/scaling/DriverCore.hpp @@ -45,9 +45,6 @@ extern void register_GmresSingleReduce(const bool verbose); } // namespace Impl } // namespace BelosTpetra -#ifdef HAVE_MUELU_EPETRA -#include // => This header defines Belos::EpetraPrecOp -#endif #endif // Cuda @@ -180,40 +177,6 @@ void PreconditionerSetup(Teuchos::RCP -struct Matvec_Wrapper { - static void UnwrapEpetra(Teuchos::RCP>& A, - Teuchos::RCP>& X, - Teuchos::RCP>& B, - Teuchos::RCP& Aepetra, - Teuchos::RCP& Xepetra, - Teuchos::RCP& Bepetra) { - throw std::runtime_error("Template parameter mismatch"); - } -}; - -template -struct Matvec_Wrapper { - static void UnwrapEpetra(Teuchos::RCP>& A, - Teuchos::RCP>& X, - Teuchos::RCP>& B, - Teuchos::RCP& Aepetra, - Teuchos::RCP& Xepetra, - Teuchos::RCP& Bepetra) { - typedef double SC; - typedef int LO; - typedef GlobalOrdinal GO; - typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode NO; - Aepetra = Xpetra::Helpers::Op2EpetraCrs(A); - Xepetra = Teuchos::rcp(&Xpetra::toEpetra(*X), false); - Bepetra = Teuchos::rcp(&Xpetra::toEpetra(*B), false); - } -}; -#endif - //************************************************************************************* template void SystemSolve(Teuchos::RCP>& A, @@ -261,14 +224,6 @@ void SystemSolve(Teuchos::RCP Aepetra; - Teuchos::RCP Xepetra, Bepetra; - if (lib == Xpetra::UseEpetra) { - Matvec_Wrapper::UnwrapEpetra(A, X, B, Aepetra, Xepetra, Bepetra); - } -#endif - for (int solveno = 0; solveno <= numResolves; solveno++) { RCP tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("Driver: 3 - LHS and RHS initialization"))); X->putScalar(zero); @@ -282,9 +237,6 @@ void SystemSolve(Teuchos::RCPapply(*Btpetra, *Xtpetra); -#if defined(HAVE_MUELU_EPETRA) && !defined(HAVE_MUELU_INST_COMPLEX_INT_INT) && !defined(HAVE_MUELU_INST_FLOAT_INT_INT) - if (lib == Xpetra::UseEpetra) Aepetra->Apply(*Bepetra, *Xepetra); -#endif // clear the cache (and don't time it) tm = Teuchos::null; int ttt = rand(); diff --git a/packages/muelu/test/scaling/ImportPerformance.cpp b/packages/muelu/test/scaling/ImportPerformance.cpp index a501130ce2e0..d4714c1275cf 100644 --- a/packages/muelu/test/scaling/ImportPerformance.cpp +++ b/packages/muelu/test/scaling/ImportPerformance.cpp @@ -37,11 +37,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#include -#endif - #include #include @@ -67,269 +62,10 @@ inline void resize_doubles(int nold, int nnew, double*& d) { // ========================================================================= // ========================================================================= // ========================================================================= -#if defined(HAVE_MUELU_EPETRA) - -extern void MakeColMapAndReindexSort(int& NumRemoteColGIDs, int*& RemoteColindices, - std::vector& RemotePermuteIDs, std::vector& RemoteOwningPIDs); - -extern void MakeColMapAndReindexSort(int& NumRemoteColGIDs, long long*& RemoteColindices, - std::vector& RemotePermuteIDs, std::vector& RemoteOwningPIDs); - -void build_remote_pids(int MyPID, const std::vector& ColMapOwningPIDs, std::vector& RemotePIDs) { - // Presume the column map has Aztec ordering - int N = (int)ColMapOwningPIDs.size(); - int first_idx; - for (first_idx = 0; first_idx < N; first_idx++) - if (ColMapOwningPIDs[first_idx] != MyPID) - break; - - /* printf("[%d] ColMapOwningPIDs(%d) =",MyPID,(int)ColMapOwningPIDs.size()); - for(int i=0;i<(int)ColMapOwningPIDs.size(); i++) - printf("%d ",ColMapOwningPIDs[i]); - printf("\n");*/ - - // Make sure there are some non-local unknowns - if (first_idx == N) { - printf("[%d] No remotes\n", MyPID); - return; - } - - RemotePIDs.resize(ColMapOwningPIDs.size() - first_idx); - for (int i = first_idx; i < N; i++) - RemotePIDs[i - first_idx] = ColMapOwningPIDs[i]; - - /* printf("[%d] RemotePIDs(%d) =",MyPID,(int)RemotePIDs.size()); - for(int i=0;i<(int)RemotePIDs.size(); i++) - printf("%d ",RemotePIDs[i]); - printf("\n");*/ -} - -Epetra_Map* convert_lightweightmap_to_map(const EpetraExt::LightweightMap& A, const Epetra_Comm& Comm) { - Epetra_Map* Aout = 0; - if (A.GlobalIndicesInt()) { -#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES - Aout = new Epetra_Map(-1, A.NumMyElements(), A.MyGlobalElements(), 0, Comm); -#endif - } else if (A.GlobalIndicesLongLong()) { -#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES - Aout = new Epetra_Map((long long)-1, A.NumMyElements(), A.MyGlobalElements64(), (long long)0, Comm); -#endif - } - - return Aout; -} - -Epetra_CrsMatrix* convert_lightweightcrsmatrix_to_crsmatrix(const EpetraExt::LightweightCrsMatrix& A) { - auto tm = TimeMonitor::getNewTimer("OptimizedTransfer: Convert: MapConstructor"); - const Epetra_Comm& Comm = A.DomainMap_.Comm(); - - // Build Maps - Epetra_Map *RowMap, *ColMap; - if (A.use_lw) - RowMap = convert_lightweightmap_to_map(*A.RowMapLW_, Comm); - else - throw std::runtime_error("Only works in LW mode"); - ColMap = convert_lightweightmap_to_map(A.ColMap_, Comm); - Epetra_CrsMatrix* Aout = new Epetra_CrsMatrix(Copy, *RowMap, *ColMap, 0); - int N = RowMap->NumMyElements(); - int nnz = A.colind_.size(); - - tm = Teuchos::null; - // Copy pointers over - auto tm2 = TimeMonitor::getNewTimer("OptimizedTransfer: Convert: Data Copy"); - Epetra_IntSerialDenseVector& rowptr = Aout->ExpertExtractIndexOffset(); - Epetra_IntSerialDenseVector& colind = Aout->ExpertExtractIndices(); - double*& vals = Aout->ExpertExtractValues(); - rowptr.Resize(N + 1); - colind.Resize(nnz); - resize_doubles(0, nnz, vals); - - for (int i = 0; i < N + 1; i++) - rowptr[i] = A.rowptr_[i]; - - for (int i = 0; i < nnz; i++) { - colind[i] = A.colind_[i]; - vals[i] = A.vals_[i]; - } - tm2 = Teuchos::null; - auto tm3 = TimeMonitor::getNewTimer("OptimizedTransfer: Convert: BuildRemote"); - - // Get RemotePIDs - std::vector RemotePIDs_; - build_remote_pids(Comm.MyPID(), A.ColMapOwningPIDs_, RemotePIDs_); - - tm3 = Teuchos::null; - auto tm4 = TimeMonitor::getNewTimer("OptimizedTransfer: Convert: BuildImport"); - - // Importer build - const int* ExportLIDs = A.ExportLIDs_.size() ? &A.ExportLIDs_[0] : 0; - const int* ExportPIDs = A.ExportPIDs_.size() ? &A.ExportPIDs_[0] : 0; - const int* RemotePIDs = RemotePIDs_.size() ? &RemotePIDs_[0] : 0; - Epetra_Import* Importer = new Epetra_Import(*ColMap, A.DomainMap_, RemotePIDs_.size(), RemotePIDs, A.ExportLIDs_.size(), ExportLIDs, ExportPIDs); - - tm4 = Teuchos::null; - auto tm5 = TimeMonitor::getNewTimer("OptimizedTransfer: Convert: ESFC"); - - // ESFC - Aout->ExpertStaticFillComplete(A.DomainMap_, *RowMap, Importer, 0); - - // Cleanup - if (A.use_lw) delete RowMap; - delete ColMap; - - return Aout; -} - -#endif // ========================================================================= // ========================================================================= // ========================================================================= -#if defined(HAVE_MUELU_EPETRA) -bool epetra_check_importer_correctness(const Epetra_Import& A, const Epetra_Import& B) { - int MyPID = A.SourceMap().Comm().MyPID(); - bool is_correct = true; - - // Same - if (A.NumSameIDs() != B.NumSameIDs()) { - printf("[%d] NumSameIDs %d vs. %d\n", MyPID, A.NumSameIDs(), B.NumSameIDs()); - is_correct = false; - } - // Permutes - if (A.NumPermuteIDs() != B.NumPermuteIDs()) { - printf("[%d] NumPermuteIDs %d vs. %d\n", MyPID, A.NumPermuteIDs(), B.NumPermuteIDs()); - is_correct = false; - } else { - int N = A.NumPermuteIDs(); - bool error_detected = false; - for (int i = 0; !error_detected && i < N; i++) - error_detected = (A.PermuteFromLIDs()[i] != B.PermuteFromLIDs()[i]) || (A.PermuteToLIDs()[i] != B.PermuteToLIDs()[i]); - - if (error_detected) { - printf("[%d] A Permutes = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", A.PermuteFromLIDs()[i], A.PermuteToLIDs()[i]); - printf("\n[%d] B Permutes = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", B.PermuteFromLIDs()[i], B.PermuteToLIDs()[i]); - printf("\n"); - is_correct = false; - } - } - - // Remotes - if (A.NumRemoteIDs() != B.NumRemoteIDs()) { - printf("[%d] NumRemoteIDs %d vs. %d\n", MyPID, A.NumRemoteIDs(), B.NumRemoteIDs()); - is_correct = false; - } else { - int N = A.NumRemoteIDs(); - bool error_detected = false; - for (int i = 0; !error_detected && i < N; i++) - error_detected = A.RemoteLIDs()[i] != B.RemoteLIDs()[i]; - - if (error_detected) { - printf("[%d] A RemoteLIDs = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d ", A.RemoteLIDs()[i]); - printf("\n[%d] B RemoteLIDs = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d ", B.RemoteLIDs()[i]); - printf("\n"); - is_correct = false; - } - } - - // Exports - if (A.NumExportIDs() != B.NumExportIDs()) { - printf("[%d] NumExportIDs %d vs. %d\n", MyPID, A.NumExportIDs(), B.NumExportIDs()); - is_correct = false; - } else { - int N = A.NumExportIDs(); - bool error_detected = false; - for (int i = 0; !error_detected && i < N; i++) - error_detected = (A.ExportLIDs()[i] != B.ExportLIDs()[i]) || (A.ExportPIDs()[i] != B.ExportPIDs()[i]); - - if (error_detected) { - printf("[%d] A Exports(%d) = ", MyPID, A.NumExportIDs()); - for (int i = 0; i < N; i++) - printf("%d(%d)->%d ", A.ExportLIDs()[i], A.SourceMap().GID(A.ExportLIDs()[i]), A.ExportPIDs()[i]); - printf("\n[%d] B Exports(%d) = ", MyPID, B.NumExportIDs()); - for (int i = 0; i < N; i++) - printf("%d(%d)->%d ", B.ExportLIDs()[i], B.SourceMap().GID(A.ExportLIDs()[i]), B.ExportPIDs()[i]); - printf("\n"); - is_correct = false; - } - } - - // Message Counts - if (A.NumSend() != B.NumSend()) { - printf("[%d] NumSend %d vs. %d\n", MyPID, A.NumSend(), B.NumSend()); - is_correct = false; - } - if (A.NumRecv() != B.NumRecv()) { - printf("[%d] NumRecv %d vs. %d\n", MyPID, A.NumRecv(), B.NumRecv()); - is_correct = false; - } - -#ifdef HAVE_MPI - const Epetra_MpiDistributor& Ad = *dynamic_cast(&A.Distributor()); - const Epetra_MpiDistributor& Bd = *dynamic_cast(&B.Distributor()); - - if (Ad.MaxSendLength() != Bd.MaxSendLength()) { - printf("[%d] Distor.MaxSendLength %d vs. %d\n", MyPID, Ad.MaxSendLength(), Bd.MaxSendLength()); - is_correct = false; - } - if (Ad.TotalReceiveLength() != Bd.TotalReceiveLength()) { - printf("[%d] Distor.TotalReceiveLength %d vs. %d\n", MyPID, Ad.TotalReceiveLength(), Bd.TotalReceiveLength()); - is_correct = false; - } - - if (Ad.NumSends() != Bd.NumSends()) { - printf("[%d] Distor.NumSends %d vs. %d\n", MyPID, Ad.NumSends(), Bd.NumSends()); - is_correct = false; - } else { - int N = Ad.NumSends(); - bool error_detected = false; - for (int i = 0; !error_detected && i < N; i++) - error_detected = (Ad.ProcsTo()[i] != Bd.ProcsTo()[i]) || (Ad.LengthsTo()[i] != Bd.LengthsTo()[i]); - - if (error_detected) { - printf("[%d] Ad Sends = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", Ad.LengthsTo()[i], Ad.ProcsTo()[i]); - printf("\n[%d] Bd Sends = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", Bd.LengthsTo()[i], Bd.ProcsTo()[i]); - printf("\n"); - is_correct = false; - } - } - - if (Ad.NumReceives() != Bd.NumReceives()) { - printf("[%d] Distor.NumReceives %d vs. %d\n", MyPID, Ad.NumReceives(), Bd.NumReceives()); - is_correct = false; - } else { - int N = Ad.NumReceives(); - bool error_detected = false; - for (int i = 0; !error_detected && i < N; i++) - error_detected = (Ad.ProcsFrom()[i] != Bd.ProcsFrom()[i]) || (Ad.LengthsFrom()[i] != Bd.LengthsFrom()[i]); - - if (error_detected) { - printf("[%d] Ad Receives = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", Ad.LengthsFrom()[i], Ad.ProcsFrom()[i]); - printf("\n[%d] Bd Receives = ", MyPID); - for (int i = 0; i < N; i++) - printf("%d->%d ", Bd.LengthsFrom()[i], Bd.ProcsFrom()[i]); - printf("\n"); - is_correct = false; - } - } -#endif - - return is_correct; -} -#endif // if defined(HAVE_MUELU_EPETRA) // ========================================================================= // ========================================================================= @@ -367,57 +103,6 @@ void TestTransfer(Teuchos::RCPgetColMap(), Pu->getDomainMap()); Au->getComm()->barrier(); } else if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) - RCP Au = Utilities::Op2EpetraCrs(A); - RCP Pu = Utilities::Op2EpetraCrs(P); - if (Au->Comm().NumProc() == 1) return; - - // ================== - // Optimized Transfer - // ================== - // Build the LightweightCrsMatrix - - auto tm3 = TimeMonitor::getNewTimer("OptimizedTransfer: Import"); - EpetraExt::CrsMatrixStruct Pview; - bool SortGhosts = true; - - if (Au->RowMap().GlobalIndicesInt()) { -#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES - EpetraExt::import_only(*Pu, Au->ColMap(), Pview, Au->Importer(), SortGhosts, "ImportPerf: "); -#endif - } else if (Au->RowMap().GlobalIndicesInt()) { -#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES - EpetraExt::import_only(*Pu, Au->ColMap(), Pview, Au->Importer(), SortGhosts, "ImportPerf: "); -#endif - } - tm3 = Teuchos::null; - auto tm4 = TimeMonitor::getNewTimer("OptimizedTransfer: Convert"); - Epetra_CrsMatrix* Aopt = convert_lightweightcrsmatrix_to_crsmatrix(*Pview.importMatrix); - - Au->Comm().Barrier(); - // ================== - // Naive Transfer - // ================== - // Use the columnmap from Aopt and build an importer ex nihilo - tm4 = Teuchos::null; - auto tm5 = TimeMonitor::getNewTimer("NaiveTransfer: BuildImport"); - const Epetra_Map& NaiveColMap = Aopt->ColMap(); - Epetra_Import NaiveImport(NaiveColMap, Pu->DomainMap()); - - Au->Comm().Barrier(); - - // Check importer for correctness - fflush(stdout); - const Epetra_Import* OptImport = Aopt->Importer(); - bool is_correct = epetra_check_importer_correctness(NaiveImport, *OptImport); - fflush(stdout); - int is_OK_local = is_correct, is_OK_global; - Au->Comm().MinAll(&is_OK_local, &is_OK_global, 1); - if (!is_OK_global) throw std::runtime_error("Importer correctness test failed."); - - // Cleanup - delete Aopt; -#endif // defined(HAVE_MUELU_EPETRA) } } diff --git a/packages/muelu/test/scaling/TAFCPerformance.cpp b/packages/muelu/test/scaling/TAFCPerformance.cpp index e9fcad9df948..d7557e2c09c3 100644 --- a/packages/muelu/test/scaling/TAFCPerformance.cpp +++ b/packages/muelu/test/scaling/TAFCPerformance.cpp @@ -39,11 +39,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include -#include -#include -#endif using Teuchos::RCP; using Teuchos::rcp; diff --git a/packages/muelu/test/simple1D/CMakeLists.txt b/packages/muelu/test/simple1D/CMakeLists.txt deleted file mode 100644 index b432b8c7c923..000000000000 --- a/packages/muelu/test/simple1D/CMakeLists.txt +++ /dev/null @@ -1,74 +0,0 @@ - -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../unit_tests) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Transfers) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Smoothers) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../gallery) -TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/belos) - -# first ensure that these cmake boolean variables are defined -ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos - ${PACKAGE_NAME}_ENABLE_Ifpack - ) - -ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos2 - ) - -IF (${PACKAGE_NAME}_ENABLE_Epetra) - - # TRIBITS_ADD_EXECUTABLE_AND_TEST( - # amesos2 - # SOURCES amesos2.cpp - # ARGS "" - # COMM serial mpi - # ) - - - # TRIBITS_ADD_EXECUTABLE_AND_TEST( - # simple1D-mergedSmoo - # SOURCES mainMergedSmoo.cpp - # ARGS "" - # COMM serial mpi - # ) - - # JJH: 9/3/2013 This test is failing. Until Andrey fixes it, I'm allowing - # it to compile (for coverage) but not run. - IF (${PACKAGE_NAME}_ENABLE_Belos) - TRIBITS_ADD_EXECUTABLE( - simple1D-Emin - SOURCES Emin.cpp - COMM serial mpi - ) - ENDIF() - - # TRIBITS_ADD_EXECUTABLE_AND_TEST( - # simple1D-Emin - # SOURCES Emin.cpp - # ARGS "" - # COMM serial mpi - # ) - - TRIBITS_ADD_EXECUTABLE( - simple1D-UncoupledAggregation - SOURCES simple1D-UncoupledAggregation.cpp - ) - - TRIBITS_ADD_TEST( - simple1D-UncoupledAggregation - NAME "simple1D-UncoupledAggregation-Tpetra" - ARGS "--linAlgebra=Tpetra" - COMM serial mpi - ) - - IF( ${PACKAGE_NAME}_ENABLE_Epetra ) - TRIBITS_ADD_TEST( - simple1D-UncoupledAggregation - NAME "simple1D-UncoupledAggregation-Epetra" - ARGS "--linAlgebra=Epetra" - COMM serial mpi - ) - ENDIF() -ENDIF() diff --git a/packages/muelu/test/simple1D/Emin.cpp b/packages/muelu/test/simple1D/Emin.cpp deleted file mode 100644 index bac68d3a4ace..000000000000 --- a/packages/muelu/test/simple1D/Emin.cpp +++ /dev/null @@ -1,365 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include -#include - -#include "MueLu_Exceptions.hpp" - -#include "MueLu_Hierarchy.hpp" -#include "MueLu_EminPFactory.hpp" -#include "MueLu_PatternFactory.hpp" -#include "MueLu_ConstraintFactory.hpp" -#include "MueLu_NullspaceFactory.hpp" -#include "MueLu_NullspacePresmoothFactory.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_RAPFactory.hpp" -#include "MueLu_IfpackSmoother.hpp" -#include "MueLu_Ifpack2Smoother.hpp" -#include "MueLu_ProjectorSmoother.hpp" - -#include "MueLu_MergedSmoother.hpp" -#include "MueLu_AmesosSmoother.hpp" -#include "MueLu_Amesos2Smoother.hpp" -#include "MueLu_Utilities.hpp" - -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_TransPFactory.hpp" -#include "MueLu_SmootherFactory.hpp" - -#include "MueLu_VerbosityLevel.hpp" - -#include -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include - -#include "MueLu_UseDefaultTypes.hpp" -#include -/**********************************************************************************/ - -// Belos -#include "BelosConfigDefs.hpp" -#include "BelosLinearProblem.hpp" -#include "BelosBlockCGSolMgr.hpp" -#include "BelosMueLuAdapter.hpp" // this header defines Belos::MueLuOp() - -#define NEUMANN -#define EMIN - -using Teuchos::ArrayRCP; -using Teuchos::RCP; -using Teuchos::rcp; - -namespace MueLuTests { - -#include "MueLu_UseShortNames.hpp" - -RCP gimmeGaussSeidelProto(Xpetra::UnderlyingLib lib) { - RCP smooProto; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)1); - ifpackList.set("relaxation: damping factor", (SC)1.0); - - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) -#if defined(HAVE_MUELU_SERIAL) - ifpackList.set("relaxation: type", "symmetric Gauss-Seidel"); - smooProto = MueLu::GetIfpackSmoother("point relaxation stand-alone", ifpackList); -#else - throw(MueLu::Exceptions::RuntimeError("gimmeGaussSeidelProto: IfpackSmoother only available with SerialNode.")); -#endif -#endif - } else if (lib == Xpetra::UseTpetra) { -#if defined(HAVE_MUELU_IFPACK2) - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smooProto = rcp(new Ifpack2Smoother("RELAXATION", ifpackList)); -#endif - } - if (smooProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("gimmeGaussSeidelSmoother: smoother error")); - } - - return smooProto; -} - -RCP gimmeCoarseProto(Xpetra::UnderlyingLib lib, const std::string& coarseSolver, int rank) { - RCP coarseProto; - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) -#if defined(HAVE_MUELU_SERIAL) - if (rank == 0) std::cout << "CoarseGrid: AMESOS" << std::endl; - Teuchos::ParameterList amesosList; - amesosList.set("PrintTiming", true); - coarseProto = MueLu::GetAmesosSmoother("Amesos_Klu", amesosList); -#else - throw(MueLu::Exceptions::RuntimeError("gimmeGaussSeidelProto: AmesosSmoother only available with SerialNode.")); -#endif -#endif - } else if (lib == Xpetra::UseTpetra) { - if (coarseSolver == "amesos2") { -#if defined(HAVE_MUELU_AMESOS2) - if (rank == 0) std::cout << "CoarseGrid: AMESOS2" << std::endl; - Teuchos::ParameterList paramList; // unused - coarseProto = rcp(new Amesos2Smoother("Superlu", paramList)); -#else - std::cout << "AMESOS2 not available (try --coarseSolver=ifpack2)" << std::endl; - return Teuchos::null; // TODO test for exception //EXIT_FAILURE; -#endif // HAVE_MUELU_AMESOS2 - } else if (coarseSolver == "ifpack2") { -#if defined(HAVE_MUELU_IFPACK2) - if (rank == 0) std::cout << "CoarseGrid: IFPACK2" << std::endl; - Teuchos::ParameterList ifpack2List; - ifpack2List.set("fact: ilut level-of-fill", (double)99); // TODO ?? - ifpack2List.set("fact: drop tolerance", 0.0); - ifpack2List.set("fact: absolute threshold", 0.0); - ifpack2List.set("fact: relative threshold", 1.0); - coarseProto = rcp(new Ifpack2Smoother("ILUT", ifpack2List)); -#else - std::cout << "IFPACK2 not available (try --coarseSolver=amesos2)" << std::endl; - // TODO TEUCHOS_TEST_FOR_EXCEPTION - return Teuchos::null; -#endif - } else { - std::cout << "Unknow coarse grid solver (try --coarseSolver=ifpack2 or --coarseSolver=amesos2)" << std::endl; - return Teuchos::null; - } - } - if (coarseProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("main: coarse smoother error")); - } - - return coarseProto; -} - -RCP gimmeMergedSmoother(int nSmoothers, Xpetra::UnderlyingLib lib, const std::string& coarseSolver, int rank) { - ArrayRCP > smootherList(nSmoothers); - - for (int i = 0; i < nSmoothers; i++) - smootherList[i] = gimmeGaussSeidelProto(lib); - - return rcp(new MergedSmoother(smootherList)); - // verbose mode: return rcp (new MergedSmoother(smootherList, true)); -} - -} // namespace MueLuTests - -int main(int argc, char* argv[]) { -#include "MueLu_UseShortNames.hpp" - - using namespace MueLuTests; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - bool success = false; - bool verbose = true; - try { - RCP > comm = Teuchos::DefaultComm::getComm(); - - /**********************************************************************************/ - /* SET TEST PARAMETERS */ - /**********************************************************************************/ - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561=3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748=4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // custom parameters - int nSmoothers = 2; - LO maxLevels = 3; - LO its = 10; - std::string coarseSolver = "ifpack2"; - // std::string coarseSolver="amesos2"; - clp.setOption("nSmoothers", &nSmoothers, "number of Gauss-Seidel smoothers in the MergedSmoothers"); - clp.setOption("maxLevels", &maxLevels, "maximum number of levels allowed. If 1, then a MergedSmoother is used on the coarse grid"); - clp.setOption("its", &its, "number of multigrid cycles"); - clp.setOption("coarseSolver", &coarseSolver, "amesos2 or ifpack2 (Tpetra specific. Ignored for Epetra)"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - matrixParameters.check(); - xpetraParameters.check(); - // TODO: check custom parameters - - if (comm->getRank() == 0) { - // matrixParameters.print(); - // xpetraParameters.print(); - // TODO: print custom parameters - } - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - const RCP map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm); - RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - RCP Op = Pr->BuildMatrix(); - -#ifdef NEUMANN - // Tranform matrix to Neumann b.c. - // Essentially, we need to update two diagonal elements - - // TODO: calls to getLocalRowView not really needed - - Op->resumeFill(); - - Teuchos::ArrayView indices; - Teuchos::ArrayView values; - Teuchos::Array newValues(2, 0.0); - - size_t myRank = Op->getRowMap()->getComm()->getRank(); - size_t nCpus = Op->getRowMap()->getComm()->getSize(); - if (myRank == 0) { // JG TODO: can we use rowMap->isNodeLocalElement(0) instead for more genericity? - // LO firstRow = 0; - newValues[0] = 1.0; - newValues[1] = -1.0; - Op->getLocalRowView(0, indices, values); - Op->replaceLocalValues(0, indices, newValues); - } - if (myRank == nCpus - 1) { // JG TODO: can we use rowMap->isNodeLocalElement(lastRow) instead for more genericity? - LO lastRow = Op->getLocalNumRows() - 1; - newValues[0] = -1.0; - newValues[1] = 1.0; - Op->getLocalRowView(lastRow, indices, values); - Op->replaceLocalValues(lastRow, indices, newValues); - } - - Op->fillComplete(); -#endif // NEUMANN - - /**********************************************************************************/ - /* */ - /**********************************************************************************/ - - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar((SC)1.0); - Teuchos::Array::magnitudeType> norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - std::cout << "||NS|| = " << norms[0] << std::endl; - - RCP > H = rcp(new Hierarchy()); - H->SetDefaultVerbLevel(MueLu::Extreme); - H->IsPreconditioner(false); - - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); - Finest->Set("Nullspace", nullSpace); - - FactoryManager M; - - M.SetFactory("Aggregates", rcp(new UncoupledAggregationFactory())); - M.SetFactory("Ptent", rcp(new TentativePFactory())); - M.SetFactory("P", rcp(new SaPFactory())); - -#ifdef EMIN - // Energy-minimization - RCP PatternFact = rcp(new PatternFactory()); -#if 0 - PatternFact->SetFactory("P", M.GetFactory("Ptent")); -#else - PatternFact->SetFactory("P", M.GetFactory("P")); -#endif - M.SetFactory("Ppattern", PatternFact); - - RCP EminPFact = rcp(new EminPFactory()); - EminPFact->SetFactory("P", M.GetFactory("Ptent")); - M.SetFactory("P", EminPFact); - - RCP NullPreFact = rcp(new NullspacePresmoothFactory()); - NullPreFact->SetFactory("Nullspace", M.GetFactory("Nullspace")); - M.SetFactory("Nullspace", NullPreFact); -#endif - - RCP smooProto = gimmeMergedSmoother(nSmoothers, xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - M.SetFactory("Smoother", rcp(new SmootherFactory(smooProto))); - - Teuchos::ParameterList status; - - RCP coarseProto; - if (maxLevels != 1) - coarseProto = gimmeCoarseProto(xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - else - coarseProto = gimmeMergedSmoother(nSmoothers, xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - - if (coarseProto == Teuchos::null) - return EXIT_FAILURE; - -#ifdef NEUMANN - // Use coarse level projection solver - RCP projectedSolver = rcp(new ProjectorSmoother(coarseProto)); - RCP coarseSolveFact = rcp(new SmootherFactory(projectedSolver, Teuchos::null)); -#else - RCP coarseSolveFact = rcp(new SmootherFactory(coarseProto, Teuchos::null)); -#endif - M.SetFactory("CoarseSolver", coarseSolveFact); - - H->EnableGraphDumping("graph.dot", 2); - - H->Setup(M, 0, maxLevels); - // if (comm->getRank() == 0) { - // std::cout << "======================\n Multigrid statistics \n======================" << std::endl; - // status.print(std::cout,Teuchos::ParameterList::PrintOptions().indent(2)); - // } - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->setSeed(846930886); - X->randomize(); - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((SC)0.0); - - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - } - - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -} diff --git a/packages/muelu/test/simple1D/aggregation.cpp b/packages/muelu/test/simple1D/aggregation.cpp deleted file mode 100644 index 5f412b92d6f6..000000000000 --- a/packages/muelu/test/simple1D/aggregation.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include - -#include "MueLu_Hierarchy.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_Utilities.hpp" - -/**********************************************************************************/ -/* CREATE INITAL MATRIX */ -/**********************************************************************************/ -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include - -#include "MueLu_UseDefaultTypes.hpp" -#include -/**********************************************************************************/ - -int main(int argc, char *argv[]) { -#include "MueLu_UseShortNames.hpp" - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - RCP > comm = Teuchos::DefaultComm::getComm(); - - /**********************************************************************************/ - /* SET TEST PARAMETERS */ - /**********************************************************************************/ - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561=3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748=4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // custom parameters - LO maxLevels = 3; - LO its = 10; - clp.setOption("maxLevels", &maxLevels, "maximum number of levels allowed"); - clp.setOption("its", &its, "number of multigrid cycles"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - matrixParameters.check(); - xpetraParameters.check(); - // TODO: check custom parameters - - if (comm->getRank() == 0) { - matrixParameters.print(); - xpetraParameters.print(); - // TODO: print custom parameters - } - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - const RCP map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm); - RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - RCP Op = Pr->BuildMatrix(); - /**********************************************************************************/ - /* */ - /**********************************************************************************/ - - MueLu::AggregationOptions aggOptions; - aggOptions.SetPrintFlag(6); - aggOptions.SetMinNodesPerAggregate(2); - aggOptions.SetMaxNeighAlreadySelected(0); - aggOptions.SetOrdering("natural"); - UncoupledAggregationFactory aggFact(aggOptions); - RCP graph = rcp(new Graph(Op->getCrsGraph(), "someGraphLabel")); - double t0 = MPI_Wtime(); - RCP aggregates = aggFact.Build(*graph); - double t1 = MPI_Wtime() - t0; - printf("Aggregation time only: %g\n", t1); - - return EXIT_SUCCESS; -} diff --git a/packages/muelu/test/simple1D/amesos2.cpp b/packages/muelu/test/simple1D/amesos2.cpp deleted file mode 100644 index edfbc9b3d4f0..000000000000 --- a/packages/muelu/test/simple1D/amesos2.cpp +++ /dev/null @@ -1,282 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include - -#include "MueLu_Hierarchy.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_RAPFactory.hpp" -#include "MueLu_IfpackSmoother.hpp" -#include "MueLu_Ifpack2Smoother.hpp" -#include "MueLu_GenericPRFactory.hpp" - -#include "MueLu_AmesosSmoother.hpp" -#include "MueLu_Amesos2Smoother.hpp" -#include "MueLu_Utilities.hpp" - -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include - -#include "MueLu_UseDefaultTypes.hpp" -#include -/**********************************************************************************/ - -// Belos -#include "BelosConfigDefs.hpp" -#include "BelosLinearProblem.hpp" -#include "BelosBlockCGSolMgr.hpp" -#include "BelosMueLuAdapter.hpp" // this header defines Belos::MueLuOp() - -int main(int argc, char *argv[]) { -#include "MueLu_UseShortNames.hpp" - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - RCP > comm = Teuchos::DefaultComm::getComm(); - - /**********************************************************************************/ - /* SET TEST PARAMETERS */ - /**********************************************************************************/ - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561=3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748=4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // custom parameters - LO maxLevels = 1; - LO its = 2; - std::string coarseSolver = "amesos2"; - clp.setOption("maxLevels", &maxLevels, "maximum number of levels allowed"); - clp.setOption("its", &its, "number of multigrid cycles"); - clp.setOption("coarseSolver", &coarseSolver, "amesos2 or ifpack2 (Tpetra specific. Ignored for Epetra)"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - matrixParameters.check(); - xpetraParameters.check(); - // TODO: check custom parameters - - if (comm->getRank() == 0) { - matrixParameters.print(); - xpetraParameters.print(); - // TODO: print custom parameters - } - -#ifdef FOR_PARALLEL_DEBUGGING - // Utils::BreakForDebugger(*comm); - - LO mypid = comm->getRank(); - - if (mypid == 0) std::cout << "Host and Process Ids for tasks" << std::endl; - for (LO i = 0; i < comm->getSize(); i++) { - if (i == mypid) { - char buf[80]; - char hostname[80]; - gethostname(hostname, sizeof(hostname)); - LO pid = getpid(); - sprintf(buf, "Host: %s\tMPI rank: %d,\tPID: %d\n\tattach %d\n\tcontinue\n", - hostname, mypid, pid, pid); - printf("%s\n", buf); - fflush(stdout); - sleep(1); - } - } - - if (mypid == 0) { - printf("** Enter a character to continue > "); - fflush(stdout); - char go = ' '; - scanf("%c", &go); - } - comm->barrier(); -#endif - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - const RCP map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm); - RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - RCP Op = Pr->BuildMatrix(); - /**********************************************************************************/ - /* */ - /**********************************************************************************/ - - // dump matrix to file - // std::string fileName = "Amat.mm"; - // Utils::Write(fileName,Op); - - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar((SC)1.0); - Teuchos::Array::magnitudeType> norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - std::cout << "||NS|| = " << norms[0] << std::endl; - - RCP > H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - RCP Finest = rcp(new MueLu::Level()); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - - Finest->Set("A", Op); - Finest->Set("Nullspace", nullSpace); - Finest->Request("Nullspace"); // FIXME putting this in to avoid error until Merge needs business - // FIXME is implemented - - Finest->Set("NullSpace", nullSpace); - H->SetLevel(Finest); - - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP TentPFact = rcp(new TentativePFactory(UncoupledAggFact)); - - RCP Pfact = rcp(new SaPFactory(TentPFact)); - RCP Rfact = rcp(new TransPFactory()); - RCP PRfact = rcp(new GenericPRFactory(Pfact, Rfact)); - RCP Acfact = rcp(new RAPFactory()); - - RCP smooProto; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)1); - ifpackList.set("relaxation: damping factor", (SC)1.0); - /* - ifpackList.set("type", "Chebyshev"); - ifpackList.set("chebyshev: degree", (int) 1); - ifpackList.set("chebyshev: max eigenvalue", (double) 2.0); - ifpackList.set("chebyshev: min eigenvalue", (double) 1.0); - ifpackList.set("chebyshev: zero starting solution", false); - */ - if (xpetraParameters.GetLib() == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - ifpackList.set("relaxation: type", "symmetric Gauss-Seidel"); - smooProto = rcp(new IfpackSmoother("point relaxation stand-alone", ifpackList)); -#endif - } else if (xpetraParameters.GetLib() == Xpetra::UseTpetra) { -#if defined(HAVE_MUELU_IFPACK2) - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smooProto = rcp(new Ifpack2Smoother("RELAXATION", ifpackList)); -#endif - } - if (smooProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("main: smoother error")); - } - - RCP SmooFact = rcp(new SmootherFactory(smooProto)); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - Teuchos::ParameterList status; - status = H->FullPopulate(PRfact, Acfact, SmooFact, 0, maxLevels); - // RCP coarseLevel = H.GetLevel(1); - // RCP P = coarseLevel->template Get< RCP >("P"); - // fileName = "Pfinal.mm"; - // Utils::Write(fileName,P); - if (comm->getRank() == 0) { - std::cout << "======================\n Multigrid statistics \n======================" << std::endl; - status.print(std::cout, Teuchos::ParameterList::PrintOptions().indent(2)); - } - - // FIXME we should be able to just call smoother->SetNIts(50) ... but right now an exception gets thrown - - RCP coarseProto; - if (xpetraParameters.GetLib() == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - if (comm->getRank() == 0) std::cout << "CoarseGrid: AMESOS" << std::endl; - Teuchos::ParameterList amesosList; - amesosList.set("PrintTiming", true); - coarseProto = rcp(new AmesosSmoother("Amesos_Klu", amesosList)); - //#elif -#endif - } else if (xpetraParameters.GetLib() == Xpetra::UseTpetra) { - if (coarseSolver == "amesos2") { -#if defined(HAVE_MUELU_AMESOS2) - if (comm->getRank() == 0) std::cout << "CoarseGrid: AMESOS2" << std::endl; - Teuchos::ParameterList paramList; // unused - coarseProto = rcp(new Amesos2Smoother("Superlu", paramList)); -#else - std::cout << "AMESOS2 not available (try --coarseSolver=ifpack2)" << std::endl; - return EXIT_FAILURE; -#endif // HAVE_MUELU_AMESOS2 - } else if (coarseSolver == "ifpack2") { -#if defined(HAVE_MUELU_IFPACK2) - if (comm->getRank() == 0) std::cout << "CoarseGrid: IFPACK2" << std::endl; - Teuchos::ParameterList ifpack2List; - ifpack2List.set("fact: ilut level-of-fill", 99); // TODO ?? - ifpack2List.set("fact: drop tolerance", 0); - ifpack2List.set("fact: absolute threshold", 0); - ifpack2List.set("fact: relative threshold", 0); - coarseProto = rcp(new Ifpack2Smoother("ILUT", ifpack2List)); -#else - std::cout << "IFPACK2 not available (try --coarseSolver=amesos2)" << std::endl; - return EXIT_FAILURE; -#endif - } else { - std::cout << "Unknow coarse grid solver (try --coarseSolver=ifpack2 or --coarseSolver=amesos2)" << std::endl; - return EXIT_FAILURE; - } - } - if (coarseProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("main: coarse smoother error")); - } - - SmootherFactory coarseSolveFact(coarseProto); - H->SetCoarsestSolver(coarseSolveFact, MueLu::PRE); - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->setSeed(846930886); - X->randomize(); - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((SC)0.0); - - H->PrintResidualHistory(true); - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - } - - return EXIT_SUCCESS; -} diff --git a/packages/muelu/test/simple1D/amesos2StandAlone.cpp b/packages/muelu/test/simple1D/amesos2StandAlone.cpp deleted file mode 100644 index ea77dce35c3c..000000000000 --- a/packages/muelu/test/simple1D/amesos2StandAlone.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// -// Amesos2: Templated Direct Sparse Solver Package -// -// Copyright 2011 NTESS and the Amesos2 contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -/** - \file SimpleSolve.cpp - \author Eric Bavier - \date Sat Jul 17 10:35:39 2010 - - \brief Simple example of Amesos2 usage. - - This example solves a simple sparse system of linear equations using the - Amesos2 interface to the Superlu solver. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "Amesos2.hpp" -#include "Amesos2_Version.hpp" - -int main(int argc, char *argv[]) { - Tpetra::ScopeGuard mpiSession(&argc, &argv); - - typedef Tpetra::MultiVector<> MV; - typedef MV::scalar_type Scalar; - typedef MV::local_ordinal_type LO; - typedef MV::global_ordinal_type GO; - - typedef Teuchos::ScalarTraits ST; - typedef Tpetra::CrsMatrix MAT; - - using std::endl; - using Teuchos::tuple; - using Tpetra::global_size_t; - - std::ostream &out = std::cout; - RCP fos = Teuchos::fancyOStream(rcpFromRef(out)); - - RCP > comm = Tpetra::getDefaultComm(); - size_t myRank = comm->getRank(); - - out << "Amesos2 stand-alone test" << endl - << endl; - - const size_t numVectors = 1; - - int numGlobalElements = 1000; - RCP > map = Tpetra::createUniformContigMap(numGlobalElements, comm); - const size_t numMyElements = map->getLocalNumElements(); - Teuchos::ArrayView myGlobalElements = map->getLocalElementList(); - - RCP A = Tpetra::createCrsMatrix(map, 3); - - // 1D Laplace - for (size_t i = 0; i < numMyElements; i++) { - if (myGlobalElements[i] == 0) { - A->insertGlobalValues(myGlobalElements[i], - tuple(myGlobalElements[i], myGlobalElements[i] + 1), - tuple(2.0, -1.0)); - } else if (myGlobalElements[i] == numGlobalElements - 1) { - A->insertGlobalValues(myGlobalElements[i], - tuple(myGlobalElements[i] - 1, myGlobalElements[i]), - tuple(-1.0, 2.0)); - } else { - A->insertGlobalValues(myGlobalElements[i], - tuple(myGlobalElements[i] - 1, myGlobalElements[i], myGlobalElements[i] + 1), - tuple(-1.0, 2.0, -1.0)); - } - } - A->fillComplete(); - - /* Create X */ - RCP X = rcp(new MV(map, numVectors)); - Teuchos::ScalarTraits::seedrandom(846930886); - X->randomize(); - - /* Print X norm */ - { - Teuchos::Array norms(1); - X->norm2(norms); - if (myRank == 0) - *fos << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << endl; - } - - /* Create B */ - RCP B = rcp(new MV(map, numVectors)); - A->apply(*X, *B, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - - /* Reset X */ - X->putScalar((Scalar)0.0); - - // Create solver interface to Superlu through Amesos::Factory - RCP > solver = Amesos2::create("Superlu", A, X, B); - - // Solve - solver->symbolicFactorization().numericFactorization().solve(); - - /* Print X norm */ - { - Teuchos::Array norms(1); - X->norm2(norms); - if (myRank == 0) - *fos << "||X_directSolve|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << endl; - } - - // /* Print the solution */ - // RCP fos = Teuchos::fancyOStream(rcpFromRef(out)); - - // *fos << "Solution :" << endl; - // X->describe(*fos,Teuchos::VERB_EXTREME); - // *fos << endl; - - // We are done. - return 0; -} diff --git a/packages/muelu/test/simple1D/mainMergedSmoo.cpp b/packages/muelu/test/simple1D/mainMergedSmoo.cpp deleted file mode 100644 index f7f0bd59d97b..000000000000 --- a/packages/muelu/test/simple1D/mainMergedSmoo.cpp +++ /dev/null @@ -1,270 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include - -#include "MueLu_Hierarchy.hpp" -#include "MueLu_SaPFactory.hpp" -#include "MueLu_RAPFactory.hpp" -#include "MueLu_IfpackSmoother.hpp" -#include "MueLu_Ifpack2Smoother.hpp" -#include "MueLu_GenericPRFactory.hpp" - -#include "MueLu_MergedSmoother.hpp" -#include "MueLu_AmesosSmoother.hpp" -#include "MueLu_Amesos2Smoother.hpp" -#include "MueLu_Utilities.hpp" - -#include -#include -#include -#include -#include -#include - -// Galeri -#include -#include - -#include "MueLu_UseDefaultTypes.hpp" -#include -/**********************************************************************************/ - -// Belos -#include "BelosConfigDefs.hpp" -#include "BelosLinearProblem.hpp" -#include "BelosBlockCGSolMgr.hpp" -#include "BelosMueLuAdapter.hpp" // this header defines Belos::MueLuOp() - -namespace MueLuTests { -#include "MueLu_UseShortNames.hpp" - -RCP gimmeGaussSeidelProto(Xpetra::UnderlyingLib lib) { - RCP smooProto; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)1); - ifpackList.set("relaxation: damping factor", (SC)1.0); - - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - ifpackList.set("relaxation: type", "symmetric Gauss-Seidel"); - smooProto = rcp(new IfpackSmoother("point relaxation stand-alone", ifpackList)); -#endif - } else if (lib == Xpetra::UseTpetra) { -#if defined(HAVE_MUELU_IFPACK2) - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smooProto = rcp(new Ifpack2Smoother("RELAXATION", ifpackList)); -#endif - } - if (smooProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("gimmeGaussSeidelSmoother: smoother error")); - } - - return smooProto; -} - -RCP gimmeCoarseProto(Xpetra::UnderlyingLib lib, const std::string& coarseSolver, int rank) { - RCP coarseProto; - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - if (rank == 0) std::cout << "CoarseGrid: AMESOS" << std::endl; - Teuchos::ParameterList amesosList; - amesosList.set("PrintTiming", true); - coarseProto = rcp(new AmesosSmoother("Amesos_Klu", amesosList)); - //#elif... -#endif - } else if (lib == Xpetra::UseTpetra) { - if (coarseSolver == "amesos2") { -#if defined(HAVE_MUELU_AMESOS2) - if (rank == 0) std::cout << "CoarseGrid: AMESOS2" << std::endl; - Teuchos::ParameterList paramList; // unused - coarseProto = rcp(new Amesos2Smoother("Superlu", paramList)); -#else - std::cout << "AMESOS2 not available (try --coarseSolver=ifpack2)" << std::endl; - return Teuchos::null; // TODO test for exception //EXIT_FAILURE; -#endif // HAVE_MUELU_AMESOS2 - } else if (coarseSolver == "ifpack2") { -#if defined(HAVE_MUELU_IFPACK2) - if (rank == 0) std::cout << "CoarseGrid: IFPACK2" << std::endl; - Teuchos::ParameterList ifpack2List; - ifpack2List.set("fact: ilut level-of-fill", 99); // TODO ?? - ifpack2List.set("fact: drop tolerance", 0); - ifpack2List.set("fact: absolute threshold", 0); - ifpack2List.set("fact: relative threshold", 0); - coarseProto = rcp(new Ifpack2Smoother("ILUT", ifpack2List)); -#else - std::cout << "IFPACK2 not available (try --coarseSolver=amesos2)" << std::endl; - // TODO TEUCHOS_TEST_FOR_EXCEPTION - return Teuchos::null; -#endif - } else { - std::cout << "Unknow coarse grid solver (try --coarseSolver=ifpack2 or --coarseSolver=amesos2)" << std::endl; - return Teuchos::null; - } - } - if (coarseProto == Teuchos::null) { - throw(MueLu::Exceptions::RuntimeError("main: coarse smoother error")); - } - - return coarseProto; -} - -RCP gimmeMergedSmoother(int nSmoothers, Xpetra::UnderlyingLib lib, const std::string& coarseSolver, int rank) { - ArrayRCP > smootherList(nSmoothers); - - for (int i = 0; i < nSmoothers; i++) - smootherList[i] = gimmeGaussSeidelProto(lib); - - return rcp(new MergedSmoother(smootherList)); - // verbose mode: return rcp (new MergedSmoother(smootherList, true)); -} - -} // namespace MueLuTests - -int main(int argc, char* argv[]) { -#include "MueLu_UseShortNames.hpp" - - using namespace MueLuTests; - - Teuchos::oblackholestream blackhole; - Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole); - RCP > comm = Teuchos::DefaultComm::getComm(); - - /**********************************************************************************/ - /* SET TEST PARAMETERS */ - /**********************************************************************************/ - // Note: use --help to list available options. - Teuchos::CommandLineProcessor clp(false); - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561=3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748=4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // custom parameters - int nSmoothers = 2; - LO maxLevels = 3; - LO its = 10; - std::string coarseSolver = "ifpack2"; - clp.setOption("nSmoothers", &nSmoothers, "number of Gauss-Seidel smoothers in the MergedSmootehrs"); - clp.setOption("maxLevels", &maxLevels, "maximum number of levels allowed. If 1, then a MergedSmoother is used on the coarse grid"); - clp.setOption("its", &its, "number of multigrid cycles"); - clp.setOption("coarseSolver", &coarseSolver, "amesos2 or ifpack2 (Tpetra specific. Ignored for Epetra)"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - matrixParameters.check(); - xpetraParameters.check(); - // TODO: check custom parameters - - if (comm->getRank() == 0) { - matrixParameters.print(); - xpetraParameters.print(); - // TODO: print custom parameters - } - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - const RCP map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm); - RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - RCP Op = Pr->BuildMatrix(); - /**********************************************************************************/ - /* */ - /**********************************************************************************/ - - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar((SC)1.0); - Teuchos::Array::magnitudeType> norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - std::cout << "||NS|| = " << norms[0] << std::endl; - - RCP > H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - RCP Finest = rcp(new MueLu::Level()); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - - Finest->Set("A", Op); - Finest->Set("Nullspace", nullSpace); - Finest->Request("Nullspace"); // FIXME putting this in to avoid error until Merge needs business - // FIXME is implemented - - Finest->Set("NullSpace", nullSpace); - H->SetLevel(Finest); - - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - RCP TentPFact = rcp(new TentativePFactory(UncoupledAggFact)); - - RCP Pfact = rcp(new SaPFactory(TentPFact)); - RCP Rfact = rcp(new TransPFactory()); - RCP PRfact = rcp(new GenericPRFactory(Pfact, Rfact)); - RCP Acfact = rcp(new RAPFactory()); - - RCP smooProto = gimmeMergedSmoother(nSmoothers, xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - RCP SmooFact = rcp(new SmootherFactory(smooProto)); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - Teuchos::ParameterList status; - status = H->FullPopulate(PRfact, Acfact, SmooFact, 0, maxLevels); - if (comm->getRank() == 0) { - std::cout << "======================\n Multigrid statistics \n======================" << std::endl; - status.print(std::cout, Teuchos::ParameterList::PrintOptions().indent(2)); - } - - RCP coarseProto; - if (maxLevels != 1) { - coarseProto = gimmeCoarseProto(xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - } else { - coarseProto = gimmeMergedSmoother(nSmoothers, xpetraParameters.GetLib(), coarseSolver, comm->getRank()); - } - if (coarseProto == Teuchos::null) return EXIT_FAILURE; - SmootherFactory coarseSolveFact(coarseProto); - H->SetCoarsestSolver(coarseSolveFact, MueLu::PRE); - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->setSeed(846930886); - X->randomize(); - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((SC)0.0); - - H->PrintResidualHistory(true); - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - std::cout << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - } - - return EXIT_SUCCESS; -} diff --git a/packages/muelu/test/simple1D/simple1D-UncoupledAggregation.cpp b/packages/muelu/test/simple1D/simple1D-UncoupledAggregation.cpp deleted file mode 100644 index 5cf3106a8f55..000000000000 --- a/packages/muelu/test/simple1D/simple1D-UncoupledAggregation.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// @HEADER -// ***************************************************************************** -// MueLu: A package for multigrid based preconditioning -// -// Copyright 2012 NTESS and the MueLu contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -// Teuchos -#include -#include -#include -#include -#include -#include -#include - -#include "MueLu_Hierarchy.hpp" -#include "MueLu_CoalesceDropFactory.hpp" -#include "MueLu_AmalgamationFactory.hpp" -#include "MueLu_UncoupledAggregationFactory.hpp" -#include "MueLu_Utilities.hpp" - -/**********************************************************************************/ -/* CREATE INITAL MATRIX */ -/**********************************************************************************/ -#include -#include -#include -#include -#include -#include -#include - -// Galeri -// Galeri -#include -#include -#include -#include -/**********************************************************************************/ - -template -int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib lib, int argc, char *argv[]) { -#include - - Teuchos::oblackholestream blackhole; - - bool success = false; - bool verbose = true; - try { - Teuchos::RCP > comm = Teuchos::DefaultComm::getComm(); - - /**********************************************************************************/ - /* SET TEST PARAMETERS */ - /**********************************************************************************/ - - // Default is Laplace1D with nx = 8748. - // It's a nice size for 1D and perfect aggregation. (6561=3^8) - // Nice size for 1D and perfect aggregation on small numbers of processors. (8748=4*3^7) - Galeri::Xpetra::Parameters matrixParameters(clp, 8748); // manage parameters of the test case - Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra - - // custom parameters - // std::string aggOrdering = "natural"; - int minPerAgg = 2; // was 3 in simple - int maxNbrAlreadySelected = 0; - int printTimings = 0; - - // clp.setOption("aggOrdering",&aggOrdering,"aggregation ordering strategy (natural,graph)"); - clp.setOption("maxNbrSel", &maxNbrAlreadySelected, "maximum # of nbrs allowed to be in other aggregates"); - clp.setOption("minPerAgg", &minPerAgg, "minimum #DOFs per aggregate"); - clp.setOption("timings", &printTimings, "print timings to screen"); - - switch (clp.parse(argc, argv)) { - case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; - case Teuchos::CommandLineProcessor::PARSE_ERROR: - case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; - case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break; - } - - Teuchos::RCP globalTimeMonitor = Teuchos::rcp(new Teuchos::TimeMonitor(*Teuchos::TimeMonitor::getNewTimer("Timings: Global Time"))); - - matrixParameters.check(); - xpetraParameters.check(); - - if (comm->getRank() == 0) { - std::cout << xpetraParameters << matrixParameters; - } - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - Teuchos::RCP map; - Teuchos::RCP A; - - { - Teuchos::TimeMonitor tm(*Teuchos::TimeMonitor::getNewTimer("Timings: Matrix Build")); - - map = MapFactory::Build(lib, matrixParameters.GetNumGlobalElements(), 0, comm); - Teuchos::RCP > Pr = - Galeri::Xpetra::BuildProblem(matrixParameters.GetMatrixType(), map, matrixParameters.GetParameterList()); // TODO: Matrix vs. CrsMatrixWrap - A = Pr->BuildMatrix(); - } - /**********************************************************************************/ - /* */ - /**********************************************************************************/ - - Teuchos::RCP hierarchy = Teuchos::rcp(new Hierarchy(A)); - hierarchy->SetDefaultVerbLevel(MueLu::toMueLuVerbLevel(Teuchos::VERB_EXTREME)); - hierarchy->SetMaxCoarseSize(100); - - /////////////////////////////////////////////////////////// - - Teuchos::RCP Finest = hierarchy->GetLevel(); // get finest level - - Finest->Set("A", A); - - Teuchos::RCP amalgFact = Teuchos::rcp(new AmalgamationFactory()); - Teuchos::RCP dropFact = Teuchos::rcp(new CoalesceDropFactory()); - dropFact->SetFactory("UnAmalgamationInfo", amalgFact); - - // aggregation factory - Teuchos::RCP UnCoupledAggFact = Teuchos::rcp(new UncoupledAggregationFactory(/*dropFact*/)); - UnCoupledAggFact->SetFactory("Graph", dropFact); - UnCoupledAggFact->SetFactory("DofsPerNode", dropFact); - // UnCoupledAggFact->SetFactory("Graph", dropFact); // UnCoupledAggFact not changed to new factory handling - // UnCoupledAggFact->SetMinNodesPerAggregate(minPerAgg); - // UnCoupledAggFact->SetMaxNeighAlreadySelected(maxNbrAlreadySelected); - // UnCoupledAggFact->SetOrdering(MueLu::AggOptions::GRAPH); - UnCoupledAggFact->SetParameter("aggregation: max selected neighbors", Teuchos::ParameterEntry(maxNbrAlreadySelected)); - UnCoupledAggFact->SetParameter("aggregation: min agg size", Teuchos::ParameterEntry(minPerAgg)); - UnCoupledAggFact->SetParameter("aggregation: ordering", Teuchos::ParameterEntry(std::string("graph"))); - - Finest->Request("Graph", dropFact.get()); - Finest->Request("DofsPerNode", dropFact.get()); - Finest->Request("UnAmalgamationInfo", amalgFact.get()); - UnCoupledAggFact->Build(*Finest); - - // Timer final summaries - globalTimeMonitor = Teuchos::null; // stop this timer before summary - - if (printTimings) { - Teuchos::TimeMonitor::summarize(); -#ifdef HAVE_TEUCHOS_ADD_TIME_MONITOR_TO_STACKED_TIMER - Teuchos::TimeMonitor::getStackedTimer()->report(std::cout, comm); -#endif - } - success = true; - } - TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success); - - return (success ? EXIT_SUCCESS : EXIT_FAILURE); -} - -//- -- -------------------------------------------------------- -#define MUELU_AUTOMATIC_TEST_ETI_NAME main_ -#include "MueLu_Test_ETI.hpp" - -int main(int argc, char *argv[]) { - return Automatic_Test_ETI(argc, argv); -} diff --git a/packages/muelu/test/structured/CMakeLists.txt b/packages/muelu/test/structured/CMakeLists.txt index 6f0c3734dfb3..8fc8f116043a 100644 --- a/packages/muelu/test/structured/CMakeLists.txt +++ b/packages/muelu/test/structured/CMakeLists.txt @@ -92,40 +92,6 @@ IF (${PACKAGE_NAME}_ENABLE_Belos AND ${PACKAGE_NAME}_ENABLE_Amesos2) NUM_MPI_PROCS 4 ) - IF (${PACKAGE_NAME}_ENABLE_Epetra) - MUELU_ADD_SERIAL_AND_MPI_TEST( - Structured - NAME "Structured_Laplace2D_Epetra" - ARGS "--linAlgebra=Epetra --xml=structured_1dof.xml --matrixType=Laplace2D" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Structured - NAME "Structured_Laplace2D_Shift_Epetra" - ARGS "--linAlgebra=Epetra --xml=structured_1dof_shift.xml --matrixType=Laplace2D" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Structured - NAME "Structured_Elasticity3D_Epetra" - ARGS "--linAlgebra=Epetra --xml=structured_3dof.xml --matrixType=Elasticity3D --nx=25 --ny=25 --nz=25" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Structured - NAME "Structured_Line_Epetra" - ARGS "--linAlgebra=Epetra --xml=structured_interp_line.xml --matrixType=Laplace3D --nx=25 --ny=25 --nz=25" - COMM serial mpi - NUM_MPI_PROCS 4 - ) - ENDIF() - TRIBITS_COPY_FILES_TO_BINARY_DIR(Structured_cp SOURCE_FILES structured_1dof.xml structured_1dof_shift.xml structured_2dof.xml structured_3dof.xml structured_interp_line.xml structured_interp_kokkos.xml structured_interp_sa_kokkos.xml structured_tentative_kokkos.xml structured_scp_1dof.xml structured_sparc_1dof.xml diff --git a/packages/muelu/test/structured/Driver_Structured.cpp b/packages/muelu/test/structured/Driver_Structured.cpp index 5b42573c1ba9..3997d9438b85 100644 --- a/packages/muelu/test/structured/Driver_Structured.cpp +++ b/packages/muelu/test/structured/Driver_Structured.cpp @@ -68,10 +68,6 @@ #include #include -#ifdef HAVE_MUELU_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#endif - #include template diff --git a/packages/muelu/test/toggletransfer/CMakeLists.txt b/packages/muelu/test/toggletransfer/CMakeLists.txt index 0b1adb9a0174..9d6477693f76 100644 --- a/packages/muelu/test/toggletransfer/CMakeLists.txt +++ b/packages/muelu/test/toggletransfer/CMakeLists.txt @@ -8,10 +8,6 @@ TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../gallery) TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/belos) # first ensure that these cmake boolean variables are defined -ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos - ) - ASSERT_DEFINED( ${PACKAGE_NAME}_ENABLE_Amesos2 ) @@ -24,50 +20,6 @@ TRIBITS_ADD_EXECUTABLE( COMM serial mpi ) -IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND - ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - TogglePFactory_driver - NAME "Driver_TogglePFactory_tent_tent_Epetra" - ARGS "--matrixType=Laplace3D --nx=40 --ny=40 --nz=60 --mz=1 --xmlFile=parameters_tent_tent.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - TogglePFactory_driver - NAME "Driver_TogglePFactory_sa_tent_Epetra" - ARGS "--matrixType=Laplace3D --nx=40 --ny=40 --nz=60 --mz=1 --xmlFile=parameters_sa_tent.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - TogglePFactory_driver - NAME "Driver_TogglePFactory_semi_tent_Epetra" - ARGS "--matrixType=Laplace3D --nx=40 --ny=40 --nz=60 --mz=1 --xmlFile=parameters_semi_tent.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - TRIBITS_ADD_TEST( - TogglePFactory_driver - NAME "Driver_TogglePFactory_semi_tent_line_Epetra" - ARGS "--matrixType=Laplace3D --nx=40 --ny=40 --nz=60 --mz=1 --xmlFile=parameters_semi_tent_line.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - TRIBITS_ADD_TEST( - TogglePFactory_driver - NAME "Driver_TogglePFactory_semi_sa_line_easy_Epetra" - ARGS "--matrixType=Laplace3D --nx=40 --ny=40 --nz=60 --mz=1 --xmlFile=parameters_semi_sa_easy.xml --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) -ENDIF() - IF (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) MUELU_ADD_SERIAL_AND_MPI_TEST( TogglePFactory_driver diff --git a/packages/muelu/test/unit_tests/Adapters/BelosAdapters.cpp b/packages/muelu/test/unit_tests/Adapters/BelosAdapters.cpp index f7e78702c312..cc5e291e8d90 100644 --- a/packages/muelu/test/unit_tests/Adapters/BelosAdapters.cpp +++ b/packages/muelu/test/unit_tests/Adapters/BelosAdapters.cpp @@ -145,27 +145,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BelosAdapters, XpetraOp_EpetraMV, Scalar, Loca MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_AMESOS) - Xpetra::UnderlyingLib lib = TestHelpers::Parameters::getLib(); - RCP > p = rcp(new TestProblem(lib)); - - typedef Epetra_MultiVector MV; - typedef Belos::OperatorT OP; - - // Construct a Belos LinearProblem object - RCP belosOp = rcp(new Belos::XpetraOp(p->GetA())); - RCP belosPrec = rcp(new Belos::MueLuOp(p->GetH())); - - // X, B - RCP X = MueLu::Utilities::MV2NonConstEpetraMV(p->GetNewX0()); - RCP B = MueLu::Utilities::MV2NonConstEpetraMV(p->GetRHS()); - - // Run Belos - int numIters = MueLuTests::BelosAdaptersTest(belosOp, belosPrec, X, B, out, success); - - // Tests - TEST_EQUALITY(MueLuTests::BelosAdaptersTestResults(numIters, X, out, success), true); -#endif } // TEST: @@ -178,34 +157,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BelosAdapters, BelosMultiVec_BelosMatrix, Scal MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_AMESOS) - Xpetra::UnderlyingLib lib = TestHelpers::Parameters::getLib(); - RCP > p = rcp(new TestProblem(lib)); - - typedef Belos::MultiVec MV; - typedef Belos::Operator OP; - - // Construct a Belos LinearProblem object - RCP A = Utilities::Op2NonConstEpetraCrs(p->GetA()); - RCP belosOp = rcp(new Belos::EpetraOp(A)); - RCP belosPrec = rcp(new Belos::MueLuOp(p->GetH())); - - // X, B - RCP eX = Utilities::MV2NonConstEpetraMV(p->GetNewX0()); - RCP eB = Utilities::MV2NonConstEpetraMV(p->GetRHS()); - RCP X = rcp(new Belos::EpetraMultiVec(*eX)); - RCP B = rcp(new Belos::EpetraMultiVec(*eB)); - - // Run Belos - int numIters = MueLuTests::BelosAdaptersTest(belosOp, belosPrec, X, B, out, success); - - // Tests - TEST_EQUALITY(MueLuTests::BelosAdaptersTestResults(numIters, X, out, success), true); - - // TODO: this do not work. Is it a bug? - // double norm; - // eX->Norm2(&norm); -#endif } // TEST: @@ -218,7 +169,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BelosAdapters, XpetraOp_TpetraMV, Scalar, Loca MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if defined(HAVE_MUELU_IFPACK2) && defined(HAVE_MUELU_AMESOS2) Xpetra::UnderlyingLib lib = TestHelpers::Parameters::getLib(); RCP > p = rcp(new TestProblem(lib)); @@ -238,7 +188,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BelosAdapters, XpetraOp_TpetraMV, Scalar, Loca // Tests TEST_EQUALITY(MueLuTests::BelosAdaptersTestResults(numIters, X, out, success), true); -#endif } // Instantiate the Tpetra and Xpetra based tests @@ -273,19 +222,6 @@ typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode OpenMPNode; TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BelosAdapters, XpetraOp_TpetraMV, double, int, LongLong, OpenMPNode) #endif -#if defined(HAVE_MUELU_EPETRA) -#include "Epetra_config.h" -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES -TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BelosAdapters, XpetraOp_EpetraMV, double, int, int, EpetraNode) -#endif -#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES -// typedef long long int LongLong; -// TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BelosAdapters, XpetraOp_EpetraMV, double, int, LongLong, EpetraNode) -#endif -#endif - } // namespace MueLuTests // TODO: norm test can be factorized, using Belos Adapter Norm function. diff --git a/packages/muelu/test/unit_tests/Adapters/CreatePreconditioner.cpp b/packages/muelu/test/unit_tests/Adapters/CreatePreconditioner.cpp index bcf3b145440c..d6b0abfef07a 100644 --- a/packages/muelu/test/unit_tests/Adapters/CreatePreconditioner.cpp +++ b/packages/muelu/test/unit_tests/Adapters/CreatePreconditioner.cpp @@ -31,10 +31,6 @@ #include "MueLu_CreateTpetraPreconditioner.hpp" #include "MueLu_TpetraOperator.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "MueLu_CreateEpetraPreconditioner.hpp" -#include "MueLu_EpetraOperator.hpp" -#endif // #endif @@ -104,61 +100,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PetraOperator, CreatePreconditioner, Scalar, L #endif // #if defined(HAVE_MUELU_TPETRA_INST_INT_INT) } else if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - - // Matrix - GO nx = 1000; - RCP Op = TestHelpers::TestFactory::Build1DPoisson(nx * comm->getSize(), lib); - RCP map = Op->getRowMap(); - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(map, 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array::magnitudeType> norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - -#if defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MPI) - Teuchos::ParameterList galeriList; - galeriList.set("nx", nx); - RCP coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", Op->getRowMap(), galeriList); - RCP nullspace = Xpetra::MultiVectorFactory::Build(Op->getDomainMap(), 1); - nullspace->putScalar(Teuchos::ScalarTraits::one()); - - RCP epA = Utils::Op2NonConstEpetraCrs(Op); - - RCP eH = MueLu::CreateEpetraPreconditioner(epA, xmlFileName); - - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - - xmlFileName = "testWithRebalance.xml"; - - RCP epcoordinates = MueLu::Utilities::MV2NonConstEpetraMV(coordinates); - RCP epnullspace = Utils::MV2NonConstEpetraMV(nullspace); - - Teuchos::ParameterList paramList; - Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, Teuchos::Ptr(¶mList), *map->getComm()); - Teuchos::ParameterList& userParamList = paramList.sublist("user data"); - userParamList.set >("Coordinates", epcoordinates); - userParamList.set >("Nullspace", epnullspace); - - eH = MueLu::CreateEpetraPreconditioner(epA, paramList); - - X1->putScalar(Teuchos::ScalarTraits::zero()); - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - -#endif - -#else std::cout << "Skip PetraOperator::CreatePreconditioner: Epetra is not available" << std::endl; -#endif } else { TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::InvalidArgument, "Unknown Xpetra lib"); @@ -242,54 +184,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PetraOperator, CreatePreconditioner_XMLOnList, #endif // #if defined(HAVE_MUELU_TPETRA_INST_INT_INT) } else if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - // Matrix - GO nx = 1000; - RCP Op = TestHelpers::TestFactory::Build1DPoisson(nx * comm->getSize(), lib); - RCP map = Op->getRowMap(); - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(map, 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array::magnitudeType> norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - -#if defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MPI) - Teuchos::ParameterList galeriList; - galeriList.set("nx", nx); - RCP coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", Op->getRowMap(), galeriList); - RCP nullspace = Xpetra::MultiVectorFactory::Build(Op->getDomainMap(), 1); - nullspace->putScalar(Teuchos::ScalarTraits::one()); - - RCP epA = Utils::Op2NonConstEpetraCrs(Op); - - RCP eH = MueLu::CreateEpetraPreconditioner(epA, mylist); - - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - - mylist.set("xml parameter file", "testWithRebalance.xml"); - - RCP epcoordinates = MueLu::Utilities::MV2NonConstEpetraMV(coordinates); - RCP epnullspace = Utils::MV2NonConstEpetraMV(nullspace); - - Teuchos::ParameterList paramList = mylist; - Teuchos::ParameterList& userParamList = paramList.sublist("user data"); - userParamList.set >("Coordinates", epcoordinates); - userParamList.set >("Nullspace", epnullspace); - eH = MueLu::CreateEpetraPreconditioner(epA, paramList); - -#endif - -#else std::cout << "Skip PetraOperator::CreatePreconditioner_XMLOnList: Epetra is not available" << std::endl; -#endif } else { TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::InvalidArgument, "Unknown Xpetra lib"); @@ -377,64 +272,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PetraOperator, CreatePreconditioner_PDESystem, #endif // #if defined(HAVE_MUELU_TPETRA_INST_INT_INT) } else if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - int numPDEs = 3; - - // Matrix - GO nx = 972; - RCP Op = TestHelpers::TestFactory::Build1DPoisson(nx * comm->getSize(), lib); - RCP map = Op->getRowMap(); - - Teuchos::ParameterList clist; - clist.set("nx", (nx * comm->getSize()) / numPDEs); - RCP cmap = MapFactory::Build(lib, Teuchos::as((nx * comm->getSize()) / numPDEs), Teuchos::as(0), comm); - RCP coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", cmap, clist); - RCP nullspace = Xpetra::MultiVectorFactory::Build(Op->getDomainMap(), numPDEs); - if (numPDEs == 1) { - nullspace->putScalar(Teuchos::ScalarTraits::one()); - } else { - for (int i = 0; i < numPDEs; i++) { - Teuchos::ArrayRCP nsData = nullspace->getDataNonConst(i); - for (int j = 0; j < nsData.size(); j++) { - GlobalOrdinal GID = Op->getDomainMap()->getGlobalElement(j) - Op->getDomainMap()->getIndexBase(); - if ((GID - i) % numPDEs == 0) - nsData[j] = Teuchos::ScalarTraits::one(); - } - } - } - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array::magnitudeType> norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - - RCP epA = MueLu::Utilities::Op2NonConstEpetraCrs(Op); - RCP epcoordinates = MueLu::Utilities::MV2NonConstEpetraMV(coordinates); - RCP epnullspace = Utils::MV2NonConstEpetraMV(nullspace); - - Teuchos::ParameterList paramList; - Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, - Teuchos::Ptr(¶mList), - *map->getComm()); - paramList.set("use kokkos refactor", false); // Done to avoid having kokkos factories called with Epetra - Teuchos::ParameterList& userParamList = paramList.sublist("user data"); - userParamList.set >("Coordinates", epcoordinates); - userParamList.set >("Nullspace", epnullspace); - RCP eH = MueLu::CreateEpetraPreconditioner(epA, paramList); - - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - -#else std::cout << "Skip PetraOperator::CreatePreconditioner_PDESystem: Epetra is not available" << std::endl; -#endif } else { TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::InvalidArgument, "Unknown Xpetra lib"); } @@ -497,45 +335,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PetraOperator, ReusePreconditioner, Scalar, Lo #endif // #if defined(HAVE_MUELU_TPETRA_INST_INT_INT) } else if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - // Matrix - GO nx = 1000; - RCP Op = TestHelpers::TestFactory::Build1DPoisson(nx * comm->getSize(), lib); - RCP map = Op->getRowMap(); - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array::magnitudeType> norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - - RCP epA = MueLu::Utilities::Op2NonConstEpetraCrs(Op); - - Teuchos::ParameterList paramList; - Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, - Teuchos::Ptr(¶mList), - *map->getComm()); - paramList.set("use kokkos refactor", false); - RCP eH = MueLu::CreateEpetraPreconditioner(epA, paramList); - - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - - // Reuse preconditioner - MueLu::ReuseEpetraPreconditioner(epA, *eH); - - X1->putScalar(Teuchos::ScalarTraits::zero()); - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; -#else std::cout << "Skip PetraOperator::ReusePreconditioner: Epetra is not available" << std::endl; -#endif } else { TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::InvalidArgument, "Unknown Xpetra lib"); @@ -604,45 +404,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PetraOperator, ReusePreconditioner2, Scalar, L tH->apply(*(Utils::MV2TpetraMV(RHS1)), *(Utils::MV2NonConstTpetraMV(X1))); out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; } else if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - // Matrix - std::string matrixFile("TestMatrices/fuego0.mm"); - RCP rowmap = MapFactory::Build(lib, Teuchos::as(1500), Teuchos::as(0), comm); - RCP Op = Xpetra::IO::Read(matrixFile, rowmap, null, null, null); - RCP map = Op->getRowMap(); - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array::magnitudeType> norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - - params.set("use kokkos refactor", false); - RCP epA = MueLu::Utilities::Op2NonConstEpetraCrs(Op); - RCP eH = MueLu::CreateEpetraPreconditioner(epA, params); - - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; - - // Reuse preconditioner - - matrixFile = "TestMatrices/fuego1.mm"; - RCP Op2 = Xpetra::IO::Read(matrixFile, rowmap, null, null, null); - epA = MueLu::Utilities::Op2NonConstEpetraCrs(Op); - MueLu::ReuseEpetraPreconditioner(epA, *eH); - - X1->putScalar(Teuchos::ScalarTraits::zero()); - eH->Apply(*(Utils::MV2EpetraMV(RHS1)), *(Utils::MV2NonConstEpetraMV(X1))); - out << "after apply, ||b-A*x||_2 = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << Utils::ResidualNorm(*Op, *X1, *RHS1) << std::endl; -#else std::cout << "Skip PetraOperator::ReusePreconditioner: Epetra is not available" << std::endl; -#endif } else { TEUCHOS_TEST_FOR_EXCEPTION(true, MueLu::Exceptions::InvalidArgument, "Unknown Xpetra lib"); diff --git a/packages/muelu/test/unit_tests/Adapters/TpetraOperatorAdapter.cpp b/packages/muelu/test/unit_tests/Adapters/TpetraOperatorAdapter.cpp index 5e86c7be2a76..4a413788fb88 100644 --- a/packages/muelu/test/unit_tests/Adapters/TpetraOperatorAdapter.cpp +++ b/packages/muelu/test/unit_tests/Adapters/TpetraOperatorAdapter.cpp @@ -37,7 +37,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TpetraOperator, Apply, Scalar, LocalOrdinal, G MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if defined(HAVE_MUELU_IFPACK2) && defined(HAVE_MUELU_AMESOS2) typedef MueLu::Utilities Utils; typedef MueLu::TpetraOperator muelu_tpetra_operator_type; typedef typename Teuchos::ScalarTraits::magnitudeType magnitude_type; @@ -109,9 +108,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TpetraOperator, Apply, Scalar, LocalOrdinal, G } else { out << "This test is enabled only for linAlgebra=Tpetra." << std::endl; } -#else - out << "Skipping test because some required packages are not enabled (Tpetra, Ifpack2, Amesos2)." << std::endl; -#endif } // Apply TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TpetraOperator, Getters, Scalar, LocalOrdinal, GlobalOrdinal, Node) { @@ -120,7 +116,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TpetraOperator, Getters, Scalar, LocalOrdinal, MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if defined(HAVE_MUELU_IFPACK2) && defined(HAVE_MUELU_AMESOS2) using Utils = MueLu::Utilities; using TpetraOperatorType = MueLu::TpetraOperator; using MagnitudeType = typename Teuchos::ScalarTraits::magnitudeType; @@ -169,9 +164,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TpetraOperator, Getters, Scalar, LocalOrdinal, TEST_EQUALITY(tO->hasTransposeApply(), false); } } -#else - out << "Skipping test because some required packages are not enabled (Tpetra, Ifpack2, Amesos2)." << std::endl; -#endif } #define MUELU_ETI_GROUP(Scalar, LocalOrdinal, GlobalOrdinal, Node) \ diff --git a/packages/muelu/test/unit_tests/BlockedRepartition.cpp b/packages/muelu/test/unit_tests/BlockedRepartition.cpp index b5357021bef6..6af9d39c4705 100644 --- a/packages/muelu/test/unit_tests/BlockedRepartition.cpp +++ b/packages/muelu/test/unit_tests/BlockedRepartition.cpp @@ -240,34 +240,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactory, Scalar, Amalg11Fact->SetFactory("A", A11Fact); Amalg22Fact->SetFactory("A", A22Fact); -#ifdef HAVE_MUELU_ISORROPIA - RCP Rep11Interface = Teuchos::null; - if (TestHelpers::Parameters::getLib() == Xpetra::UseEpetra) { - RCP Iso11Interface = Teuchos::rcp(new IsorropiaInterface()); - Iso11Interface->SetFactory("A", A11Fact); - Iso11Interface->SetFactory("number of partitions", RepHeuFact); - Iso11Interface->SetFactory("UnAmalgamationInfo", Amalg11Fact); - - Rep11Interface = Teuchos::rcp(new RepartitionInterface()); - Rep11Interface->SetFactory("A", A11Fact); - Rep11Interface->SetFactory("number of partitions", RepHeuFact); - Rep11Interface->SetFactory("AmalgamatedPartition", Iso11Interface); - } else { - // we are in Tpetra mode (even though Isorropia would be available) - // create dummy "Partition" array - RCP > decomposition = Xpetra::VectorFactory::Build(Op11->getRowMap(), false); - ArrayRCP decompEntries = decomposition->getDataNonConst(0); - for (size_t r = 0; r < decomposition->getMap()->getLocalNumElements(); r++) { - if (r % 2 == 0) - decompEntries[r] = 0; - else - decompEntries[r] = 1; - } - Rep11Interface = Teuchos::rcp(new SubBlockAFactory()); - levelTwo->Request("Partition", Rep11Interface.get()); - levelTwo->Set("Partition", decomposition, Rep11Interface.get()); - } -#else // create dummy "Partition" array RCP > decomposition = Xpetra::VectorFactory::Build(Op11->getRowMap(), false); ArrayRCP decompEntries = decomposition->getDataNonConst(0); @@ -280,7 +252,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactory, Scalar, RCP Rep11Interface = Teuchos::rcp(new SubBlockAFactory()); levelTwo->Request("Partition", Rep11Interface.get()); levelTwo->Set("Partition", decomposition, Rep11Interface.get()); -#endif RCP Rep11Factory = Teuchos::rcp(new RepartitionFactory); Rep11Factory->SetFactory("A", A11Fact); @@ -500,34 +471,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryWithRestr Amalg11Fact->SetFactory("A", A11Fact); Amalg22Fact->SetFactory("A", A22Fact); -#ifdef HAVE_MUELU_ISORROPIA - RCP Rep11Interface = Teuchos::null; - if (TestHelpers::Parameters::getLib() == Xpetra::UseEpetra) { - RCP Iso11Interface = Teuchos::rcp(new IsorropiaInterface()); - Iso11Interface->SetFactory("A", A11Fact); - Iso11Interface->SetFactory("number of partitions", RepHeuFact); - Iso11Interface->SetFactory("UnAmalgamationInfo", Amalg11Fact); - - Rep11Interface = Teuchos::rcp(new RepartitionInterface()); - Rep11Interface->SetFactory("A", A11Fact); - Rep11Interface->SetFactory("number of partitions", RepHeuFact); - Rep11Interface->SetFactory("AmalgamatedPartition", Iso11Interface); - } else { - // we are in Tpetra mode (even though Isorropia would be available) - // create dummy "Partition" array - RCP > decomposition = Xpetra::VectorFactory::Build(Op11->getRowMap(), false); - ArrayRCP decompEntries = decomposition->getDataNonConst(0); - for (size_t r = 0; r < decomposition->getMap()->getLocalNumElements(); r++) { - if (r % 2 == 0) - decompEntries[r] = 0; - else - decompEntries[r] = 1; - } - Rep11Interface = Teuchos::rcp(new SubBlockAFactory()); - levelTwo->Request("Partition", Rep11Interface.get()); - levelTwo->Set("Partition", decomposition, Rep11Interface.get()); - } -#else // create dummy "Partition" array RCP > decomposition = Xpetra::VectorFactory::Build(Op11->getRowMap(), false); ArrayRCP decompEntries = decomposition->getDataNonConst(0); @@ -540,7 +483,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryWithRestr RCP Rep11Interface = Teuchos::rcp(new SubBlockAFactory()); levelTwo->Request("Partition", Rep11Interface.get()); levelTwo->Set("Partition", decomposition, Rep11Interface.get()); -#endif RCP Rep11Factory = Teuchos::rcp(new RepartitionFactory); Rep11Factory->SetFactory("A", A11Fact); @@ -636,300 +578,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryWithRestr } // end if rebA != Teuchos::null } // BlockedRAPFactoryWithRestriction -#if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MUELU_ZOLTAN) -TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryWithDiagonal, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#include "MueLu_UseShortNames.hpp" - MUELU_TESTING_SET_OSTREAM; - MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); - out << "version: " << MueLu::Version() << std::endl; - - RCP > comm = TestHelpers::Parameters::getDefaultComm(); - - if (comm->getSize() == 1) { - out << "Skip BlockedRepartion test in serial case" << std::endl; - return; - } - - // int NumProcs = comm->getSize(); // number of procs used before rebalancing - - /**********************************************************************************/ - /* CREATE INITIAL MATRIX */ - /**********************************************************************************/ - RCP bigMap; - RCP map1; - RCP map2; - GO numElements = 400; - GO numElements1 = 200; - GO numElements2 = 200; - - Xpetra::UnderlyingLib lib = MueLuTests::TestHelpers::Parameters::getLib(); - - // the test matrix has to be a nxn block matrix with quadratic blocks - // where the subblocks use consequent numbering of global DOF ids. - std::vector stridingInfo; - stridingInfo.push_back(1); - - map1 = StridedMapFactory::Build(lib, numElements1, 0, stridingInfo, comm); - map2 = StridedMapFactory::Build(lib, numElements2, 0, stridingInfo, comm, -1, numElements1); - - std::vector localGids; // vector with all local GIDs on cur proc - Teuchos::ArrayView map1eleList = map1->getLocalElementList(); // append all local gids from map1 and map2 - localGids.insert(localGids.end(), map1eleList.begin(), map1eleList.end()); - Teuchos::ArrayView map2eleList = map2->getLocalElementList(); - localGids.insert(localGids.end(), map2eleList.begin(), map2eleList.end()); - Teuchos::ArrayView eleList(&localGids[0], localGids.size()); - bigMap = StridedMapFactory::Build(lib, numElements, eleList, 0, stridingInfo, comm); // create full big map (concatenation of map1 and map2) - std::vector > maps; - maps.push_back(map1); - maps.push_back(map2); - - Teuchos::RCP > mapExtractor = Xpetra::MapExtractorFactory::Build(bigMap, maps); - - RCP Op11 = GenerateProblemMatrix(map1, map1, 2, -1, -1); - RCP Op12 = GenerateProblemMatrix(map1, map2, 1, 0, 0); - RCP Op21 = GenerateProblemMatrix(map2, map1, 1, 0, 0); - RCP Op22 = GenerateProblemMatrix(map2, map2, 3, -2, -1); - - // store output of simple MV products for OpIJ - RCP test11 = VectorFactory::Build(Op11->getDomainMap()); - test11->putScalar(1.0); - RCP test12 = VectorFactory::Build(Op12->getDomainMap()); - test12->putScalar(1.0); - RCP test21 = VectorFactory::Build(Op21->getDomainMap()); - test21->putScalar(1.0); - RCP test22 = VectorFactory::Build(Op22->getDomainMap()); - test22->putScalar(1.0); - RCP res11 = VectorFactory::Build(Op11->getRangeMap()); - RCP res12 = VectorFactory::Build(Op12->getRangeMap()); - RCP res21 = VectorFactory::Build(Op21->getRangeMap()); - RCP res22 = VectorFactory::Build(Op22->getRangeMap()); - Op11->apply(*test11, *res11); - Op12->apply(*test12, *res12); - Op21->apply(*test21, *res21); - Op22->apply(*test22, *res22); - - // build blocked operator - Teuchos::RCP > bOp = Teuchos::rcp(new Xpetra::BlockedCrsMatrix(mapExtractor, mapExtractor, 10)); - - bOp->setMatrix(0, 0, Op11); - bOp->setMatrix(0, 1, Op12); - bOp->setMatrix(1, 0, Op21); - bOp->setMatrix(1, 1, Op22); - bOp->fillComplete(); - TEST_EQUALITY(bOp != Teuchos::null, true); - TEST_EQUALITY(bOp->getGlobalNumEntries(), 2392); - - // coordinates - RCP::magnitudeType, LO, GO, NO> > coord = Xpetra::MultiVectorFactory::magnitudeType, LO, GO, NO>::Build(bOp->getFullRangeMap(), 1); - int PID = comm->getRank(); - // GH: scope data manipulation because we should not let a pointer to this data live once we call MueLu - { - Teuchos::ArrayRCP::magnitudeType> coordData = coord->getDataNonConst(0); - for (size_t i = 0; i < (size_t)coordData.size(); ++i) - coordData[i] = PID + (typename Teuchos::ScalarTraits::magnitudeType)i / coordData.size(); - } - // nullspace - RCP nullspace = MultiVectorFactory::Build(bOp->getFullRangeMap(), 1); - Teuchos::ArrayRCP nspData = nullspace->getDataNonConst(0); - for (size_t i = 0; i < (size_t)nspData.size(); i++) - nspData[i] = 1.0; - - // Grab sub-blocks for the Tobias-style goodies - RCP nullspace1 = mapExtractor->ExtractVector(nullspace, 0); - RCP nullspace2 = mapExtractor->ExtractVector(nullspace, 1); - - // build hierarchy - Hierarchy H; - H.SetMaxCoarseSize(10); // FIXME: At present this does not work past two levels - RCP levelOne = H.GetLevel(); - levelOne->Set("A", Teuchos::rcp_dynamic_cast(bOp)); // set blocked operator - levelOne->Set("Coordinates", coord); - levelOne->Set("Nullspace1", nullspace1); - levelOne->Set("Nullspace2", nullspace2); - - // Define the operator's subblocks - RCP A11Fact = Teuchos::rcp(new SubBlockAFactory()); - A11Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A11Fact->SetParameter("block row", Teuchos::ParameterEntry(0)); - A11Fact->SetParameter("block col", Teuchos::ParameterEntry(0)); - RCP A22Fact = Teuchos::rcp(new SubBlockAFactory()); - A22Fact->SetFactory("A", MueLu::NoFactory::getRCP()); - A22Fact->SetParameter("block row", Teuchos::ParameterEntry(1)); - A22Fact->SetParameter("block col", Teuchos::ParameterEntry(1)); - - // Create smoothers for each block - std::string ifpackType; - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: sweeps", (LO)5); - ifpackList.set("relaxation: damping factor", (SC)1.0); - ifpackType = "RELAXATION"; - ifpackList.set("relaxation: type", "Symmetric Gauss-Seidel"); - RCP smoProto11 = rcp(new TrilinosSmoother(ifpackType, ifpackList, 0)); - smoProto11->SetFactory("A", A11Fact); - RCP smoProto22 = rcp(new TrilinosSmoother(ifpackType, ifpackList, 0)); - smoProto22->SetFactory("A", A22Fact); - - RCP Smoo11Fact = rcp(new SmootherFactory(smoProto11)); - RCP Smoo22Fact = rcp(new SmootherFactory(smoProto22)); - - // Define how the transfer operators for block (0,0) is computed - RCP Amalg11 = rcp(new AmalgamationFactory()); - RCP CDFact11 = rcp(new CoalesceDropFactory()); - CDFact11->SetFactory("UnAmalgamationInfo", Amalg11); - RCP AggFact11 = rcp(new UncoupledAggregationFactory()); - AggFact11->SetFactory("Graph", CDFact11); - AggFact11->SetFactory("DofsPerNode", CDFact11); - RCP P11Fact = rcp(new TentativePFactory()); - P11Fact->SetFactory("Aggregates", AggFact11); - P11Fact->SetFactory("UnAmalgamationInfo", Amalg11); - P11Fact->SetParameter("tentative: build coarse coordinates", Teuchos::ParameterEntry(false)); - RCP R11Fact = rcp(new TransPFactory()); - RCP Nullspace11 = rcp(new NullspaceFactory()); - Nullspace11->SetParameter("Fine level nullspace", Teuchos::ParameterEntry(std::string("Nullspace1"))); - Nullspace11->SetFactory("Nullspace1", P11Fact); - RCP Coord11 = rcp(new CoordinatesTransferFactory()); - RCP Cmap11 = rcp(new CoarseMapFactory()); - Coord11->SetFactory("Aggregates", AggFact11); - Coord11->SetFactory("CoarseMap", Cmap11); - - // Create a factory manager for block (0,0) - RCP M11 = rcp(new FactoryManager()); - M11->SetFactory("A", A11Fact); - M11->SetFactory("Graph", CDFact11); - M11->SetFactory("DofsPerNode", CDFact11); - M11->SetFactory("Aggregates", AggFact11); - M11->SetFactory("UnAmalgamationInfo", Amalg11); - M11->SetFactory("P", P11Fact); - M11->SetFactory("R", R11Fact); - M11->SetFactory("Ptent", P11Fact); // for Nullspace - M11->SetFactory("Coordinates", Coord11); - M11->SetFactory("Smoother", Smoo11Fact); - M11->SetFactory("CoarseMap", Cmap11); - M11->SetFactory("Nullspace", Nullspace11); - M11->SetIgnoreUserData(true); - - // Define how the transfer operators for block (1,1) is computed - RCP Amalg22 = rcp(new AmalgamationFactory()); - RCP CDFact22 = rcp(new CoalesceDropFactory()); - CDFact22->SetFactory("UnAmalgamationInfo", Amalg22); - RCP AggFact22 = rcp(new UncoupledAggregationFactory()); - AggFact22->SetFactory("Graph", CDFact22); - AggFact22->SetFactory("DofsPerNode", CDFact22); - RCP P22Fact = rcp(new TentativePFactory()); - P22Fact->SetFactory("Aggregates", AggFact22); - P22Fact->SetFactory("UnAmalgamationInfo", Amalg22); - P22Fact->SetParameter("tentative: build coarse coordinates", Teuchos::ParameterEntry(false)); - RCP R22Fact = rcp(new TransPFactory()); - RCP Nullspace22 = rcp(new NullspaceFactory()); - Nullspace22->SetParameter("Fine level nullspace", Teuchos::ParameterEntry(std::string("Nullspace2"))); - Nullspace22->SetFactory("Nullspace2", P22Fact); - RCP Cmap22 = rcp(new BlockedCoarseMapFactory()); - Cmap22->SetFactory("Aggregates", AggFact22); - Cmap22->SetFactory("CoarseMap", Cmap11); - RCP Coord22 = rcp(new CoordinatesTransferFactory()); - Coord22->SetFactory("Aggregates", AggFact22); - Coord22->SetFactory("CoarseMap", Cmap22); - - // Create a factory manager for block (1,1) - RCP M22 = rcp(new FactoryManager()); - M22->SetFactory("A", A22Fact); - M22->SetFactory("Graph", CDFact22); - M22->SetFactory("DofsPerNode", CDFact22); - M22->SetFactory("Aggregates", AggFact22); - M22->SetFactory("UnAmalgamationInfo", Amalg22); - M22->SetFactory("P", P22Fact); - M22->SetFactory("R", R22Fact); - M22->SetFactory("Ptent", P22Fact); // for Nullspace - M22->SetFactory("Coordinates", P22Fact); - M22->SetFactory("Smoother", Smoo22Fact); - M22->SetFactory("CoarseMap", Cmap22); - M22->SetFactory("Nullspace", Nullspace22); - M22->SetIgnoreUserData(true); - - RCP PFact = rcp(new BlockedPFactory()); - // We might want to set a afactory for "A" here? - PFact->AddFactoryManager(M11); - PFact->AddFactoryManager(M22); - - RCP RFact = rcp(new GenericRFactory()); - RFact->SetFactory("P", PFact); - - RCP CoordXfer = rcp(new BlockedCoordinatesTransferFactory()); - CoordXfer->AddFactory(Coord11); - CoordXfer->AddFactory(Coord22); - CoordXfer->SetFactory("CoarseMap", PFact); - - RCP AcFact = rcp(new BlockedRAPFactory()); - AcFact->AddTransferFactory(CoordXfer); - AcFact->SetFactory("P", PFact); - AcFact->SetFactory("R", RFact); - - // Smoothers - RCP smootherPrototype = rcp(new BlockedGaussSeidelSmoother()); - smootherPrototype->SetParameter("Sweeps", Teuchos::ParameterEntry(2)); - smootherPrototype->SetParameter("Damping factor", Teuchos::ParameterEntry(Teuchos::as(1.0))); - smootherPrototype->AddFactoryManager(M11, 0); - smootherPrototype->AddFactoryManager(M22, 1); - RCP smootherFact = rcp(new SmootherFactory(smootherPrototype)); - - // Coarse grid correction - RCP coarseSolverPrototype = rcp(new BlockedGaussSeidelSmoother()); - coarseSolverPrototype->AddFactoryManager(M11, 0); - coarseSolverPrototype->AddFactoryManager(M22, 1); - RCP coarseSolverFact = rcp(new SmootherFactory(coarseSolverPrototype, Teuchos::null)); - - // Repartitioning - RCP RepHeuFact = Teuchos::rcp(new RepartitionHeuristicFactory); - RepHeuFact->SetFactory("A", AcFact); // MueLu::NoFactory::getRCP()); - RepHeuFact->SetParameter("repartition: start level", Teuchos::ParameterEntry(0)); - RepHeuFact->SetParameter("repartition: min rows per proc", Teuchos::ParameterEntry(40)); - - RCP BDFact = rcp(new RepartitionBlockDiagonalFactory()); - BDFact->SetFactory("A", AcFact); - - RCP zoltan = rcp(new ZoltanInterface()); - zoltan->SetFactory("A", BDFact); - zoltan->SetFactory("number of partitions", RepHeuFact); - zoltan->SetFactory("Coordinates", CoordXfer); - - RCP repart = rcp(new RepartitionFactory()); - repart->SetFactory("A", BDFact); - repart->SetFactory("number of partitions", RepHeuFact); - repart->SetFactory("Partition", zoltan); - - RCP RebAcFact = rcp(new RebalanceBlockAcFactory()); - RebAcFact->SetFactory("A", AcFact); - RebAcFact->SetFactory("Importer", repart); - RebAcFact->SetFactory("SubImporters", repart); - - RCP RebRFact = rcp(new RebalanceBlockRestrictionFactory()); - RebRFact->AddFactoryManager(M11); - RebRFact->AddFactoryManager(M22); - RebRFact->SetFactory("SubImporters", repart); - RebRFact->SetFactory("R", RFact); - RebRFact->SetSingleSourceImporters(true); - - RCP RebPFact = rcp(new RebalanceBlockInterpolationFactory()); - - // main factory manager - FactoryManager M; - M.SetFactory("A", RebAcFact); - M.SetFactory("P", PFact); - M.SetFactory("R", RebRFact); - M.SetFactory("Coordinates", CoordXfer); - M.SetFactory("Smoother", smootherFact); // TODO fix me - M.SetFactory("CoarseSolver", coarseSolverFact); - M.SetFactory("Nullspace", RebRFact); - - // setup hierarchy - H.SetVerbLevel(MueLu::Test); - H.EnableGraphDumping("dep_graph", 0); - - H.Setup(M); - -} // BlockedRAPFactoryWithDiagonal -#endif - TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryCoords, Scalar, LocalOrdinal, GlobalOrdinal, Node) { #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; @@ -1255,24 +903,9 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(BlockedRepartition, BlockedRAPFactoryCoords, S H.Setup(M); } // BlockedRAPFactoryCoords -#if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MUELU_ZOLTAN) -#define MUELU_ETI_GROUP(SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactory, SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryWithRestriction, SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryWithDiagonal, SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryCoords, SC, LO, GO, Node) - -#elif defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MUELU_ZOLTAN) -#define MUELU_ETI_GROUP(SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactory, SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryWithRestriction, SC, LO, GO, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryWithDiagonal, SC, LO, GO, Node) - -#else #define MUELU_ETI_GROUP(SC, LO, GO, Node) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactory, SC, LO, GO, Node) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(BlockedRepartition, BlockedRAPFactoryWithRestriction, SC, LO, GO, Node) -#endif #include diff --git a/packages/muelu/test/unit_tests/CMakeLists.txt b/packages/muelu/test/unit_tests/CMakeLists.txt index ea356df4ea6a..db415fee955b 100644 --- a/packages/muelu/test/unit_tests/CMakeLists.txt +++ b/packages/muelu/test/unit_tests/CMakeLists.txt @@ -117,19 +117,6 @@ TRIBITS_COPY_FILES_TO_BINARY_DIR(UnitTestsTestMatrices_cp DEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/TestMatrices ) -IF (${PACKAGE_NAME}_ENABLE_Epetra) - -IF( HAVE_${PACKAGE_NAME_UC}_DEPRECATED_CODE) -APPEND_SET(SOURCES - ParameterList/MLParameterListInterpreter.cpp -) -ENDIF() - -APPEND_SET(SOURCES - ParameterList/CreateSublists.cpp -) -ENDIF() - APPEND_SET(SOURCES_BLOCKED BlockedCoarseMapFactory.cpp BlockedPFactory.cpp @@ -148,12 +135,8 @@ ENDIF() # first ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 - ${PACKAGE_NAME}_ENABLE_Ifpack ${PACKAGE_NAME}_ENABLE_Ifpack2 - ${PACKAGE_NAME}_ENABLE_Epetra - ${PACKAGE_NAME}_ENABLE_EpetraExt ${PACKAGE_NAME}_ENABLE_Belos ${PACKAGE_NAME}_ENABLE_Zoltan ) @@ -165,10 +148,6 @@ IF(${PACKAGE_NAME}_ENABLE_Ifpack2) APPEND_SET(SOURCES_BLOCKED Smoothers/BlockedSmoother.cpp) ENDIF() -IF(${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Ifpack) - APPEND_SET(SOURCES Smoothers/IfpackSmoother.cpp) -ENDIF() - IF(${PACKAGE_NAME}_ENABLE_Belos) APPEND_SET(SOURCES Smoothers/BelosSmoother.cpp) ENDIF() @@ -177,13 +156,6 @@ IF(${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Thyra) APPEND_SET(SOURCES Smoothers/StratimikosSmoother.cpp) ENDIF() -IF(${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_Amesos) - APPEND_SET(SOURCES Smoothers/AmesosSmoother.cpp) - IF(NOT ${PACKAGE_NAME}_ENABLE_Amesos2) - APPEND_SET(SOURCES_BLOCKED Smoothers/BlockedDirectSolver.cpp) - ENDIF() -ENDIF() - IF(${PACKAGE_NAME}_ENABLE_Amesos2) APPEND_SET(SOURCES Smoothers/Amesos2Smoother.cpp) APPEND_SET(SOURCES_BLOCKED Smoothers/BlockedDirectSolver.cpp) @@ -201,8 +173,7 @@ IF (${PACKAGE_NAME}_ENABLE_Belos) APPEND_SET(SOURCES Adapters/BelosAdapters.cpp) ENDIF() -IF ((${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos) OR - (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) +IF ((${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2)) SET(${PACKAGE_NAME}_ENABLE_CreatePreconditionerTests ON) ELSE() SET(${PACKAGE_NAME}_ENABLE_CreatePreconditionerTests OFF) @@ -280,66 +251,6 @@ ENDIF() ) ENDIF() - IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt) - - TRIBITS_ADD_TEST( - UnitTests - NAME "UnitTestsEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 1 - COMM serial mpi - ) - - TRIBITS_ADD_TEST( - UnitTests - NAME "UnitTestsEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 4 - COMM mpi - ) - - TRIBITS_ADD_TEST( - UnitTests_Blocked - NAME "UnitTestsBlockedEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 1 - COMM serial mpi - ) - - TRIBITS_ADD_TEST( - UnitTests_Blocked - NAME "UnitTestsBlockedEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 4 - COMM mpi - ) - - IF (${PACKAGE_NAME}_ENABLE_CreatePreconditionerTests) - TRIBITS_ADD_TEST( - UnitTests_CreatePreconditioner - NAME "UnitTestsCreatePreconditionerEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 1 - COMM serial mpi - ) - - TRIBITS_ADD_TEST( - UnitTests_CreatePreconditioner - NAME "UnitTestsCreatePreconditionerEpetra" - ARGS "--linAlgebra=Epetra" - PASS_REGULAR_EXPRESSION "End Result: TEST PASSED" - NUM_MPI_PROCS 4 - COMM mpi - ) - ENDIF() - - ENDIF() # Epetra / EpetraExt - TRIBITS_ADD_TEST( UnitTests NAME "UnitTestsTpetra" @@ -448,8 +359,3 @@ ENDIF() ADD_SUBDIRECTORY(ParameterList/FactoryFactory/) ADD_SUBDIRECTORY(ParameterList/ParameterListInterpreter/) - -IF (${PACKAGE_NAME}_ENABLE_Epetra) - ADD_SUBDIRECTORY(ParameterList/MLParameterListInterpreter/) - ADD_SUBDIRECTORY(ParameterList/CreateSublists/) -ENDIF() diff --git a/packages/muelu/test/unit_tests/GenericRFactory.cpp b/packages/muelu/test/unit_tests/GenericRFactory.cpp index 271627cdd2d4..d0d0d94c17b1 100644 --- a/packages/muelu/test/unit_tests/GenericRFactory.cpp +++ b/packages/muelu/test/unit_tests/GenericRFactory.cpp @@ -53,9 +53,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(GenericRFactory, SymmetricProblem, Scalar, Loc MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); #if !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Ifpack"); -#endif -#if !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Ifpack2"); #endif out << "version: " << MueLu::Version() << std::endl; RCP > comm = Teuchos::DefaultComm::getComm(); @@ -189,9 +186,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(GenericRFactory, GenericRSetup, Scalar, LocalO MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); #if !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Ifpack"); -#endif -#if !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Ifpack2"); #endif out << "version: " << MueLu::Version() << std::endl; diff --git a/packages/muelu/test/unit_tests/Hierarchy.cpp b/packages/muelu/test/unit_tests/Hierarchy.cpp index 8ccea6f393d0..8f0257a3c881 100644 --- a/packages/muelu/test/unit_tests/Hierarchy.cpp +++ b/packages/muelu/test/unit_tests/Hierarchy.cpp @@ -66,9 +66,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, DescriptionCaching, Scalar, LocalOr */ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef typename Teuchos::ScalarTraits::magnitudeType real_type; @@ -196,12 +193,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, Iterate, Scalar, LocalOrdinal, Glob using real_type = typename Teuchos::ScalarTraits::coordinateType; using RealValuedMultiVector = Xpetra::MultiVector; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; @@ -301,12 +293,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, IterateWithFusedProlongationUpdate, using real_type = typename Teuchos::ScalarTraits::coordinateType; using RealValuedMultiVector = Xpetra::MultiVector; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; @@ -402,12 +389,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, IterateWithImplicitRestriction, Sca MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif using TST = Teuchos::ScalarTraits; using magnitude_type = typename Teuchos::ScalarTraits::magnitudeType; using TMT = Teuchos::ScalarTraits; @@ -509,10 +491,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy1level, Scalar, Local MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif - RCP > comm = TestHelpers::Parameters::getDefaultComm(); RCP A = TestHelpers::TestFactory::Build1DPoisson(299 * comm->getSize()); @@ -553,12 +531,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy1levelv2, Scalar, Loc #include MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); MUELU_TESTING_SET_OSTREAM; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); RCP A = TestHelpers::TestFactory::Build1DPoisson(299 * comm->getSize()); @@ -599,80 +572,12 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy2level, Scalar, Local MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) - RCP > comm = TestHelpers::Parameters::getDefaultComm(); - RCP A = TestHelpers::TestFactory::Build1DPoisson(299 * comm->getSize()); - - // Multigrid Hierarchy - Hierarchy H(A); - H.setVerbLevel(Teuchos::VERB_HIGH); - H.SetMaxCoarseSize(50); - - // Multigrid setup phase (using default parameters) - FactoryManager M0; // how to build aggregates and smoother of the first level - M0.SetKokkosRefactor(false); - - FactoryManager M1; // first coarse level (Plain aggregation) - M1.SetKokkosRefactor(false); - M1.SetFactory("A", rcp(new RAPFactory())); - M1.SetFactory("P", rcp(new TentativePFactory())); - - FactoryManager M2; // last level (SA) - M2.SetKokkosRefactor(false); - M2.SetFactory("A", rcp(new RAPFactory())); - M2.SetFactory("P", rcp(new SaPFactory())); - - bool r; // cf. Teuchos Bug 5214 - r = H.Setup(0, Teuchos::null, rcpFromRef(M0), rcpFromRef(M1)); - TEST_EQUALITY(r, false); - r = H.Setup(1, rcpFromRef(M0), rcpFromRef(M1), Teuchos::null); - TEST_EQUALITY(r, true); - - RCP l0 = H.GetLevel(0); - RCP l1 = H.GetLevel(1); - - /*RCP stdout = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - l0->print(*stdout,Teuchos::VERB_EXTREME); - l1->print(*stdout,Teuchos::VERB_EXTREME);*/ - - TEST_EQUALITY(l0->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l1->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l0->IsAvailable("PostSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l1->IsAvailable("PostSmoother", MueLu::NoFactory::get()), false); // direct solve - TEST_EQUALITY(l1->IsAvailable("P", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l1->IsAvailable("R", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l0->IsAvailable("A", MueLu::NoFactory::get()), true); - TEST_EQUALITY(l1->IsAvailable("A", MueLu::NoFactory::get()), true); - - TEST_EQUALITY(l0->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::UserData); - TEST_EQUALITY(l0->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(l0->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), MueLu::Final); - - TEST_EQUALITY(l1->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(l1->GetKeepFlag("P", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(l1->GetKeepFlag("R", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(l1->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - // TEST_EQUALITY(l1->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), MueLu::Final); // direct solve - - RCP RHS = MultiVectorFactory::Build(A->getRowMap(), 1); - RCP X = MultiVectorFactory::Build(A->getRowMap(), 1); - RHS->setSeed(846930886); - RHS->randomize(); - - X->putScalar((Scalar)0.0); - - int iterations = 10; - H.Iterate(*RHS, *X, iterations); -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy2level_AggregateSmooth, Scalar, LocalOrdinal, GlobalOrdinal, Node) { #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); RCP A = TestHelpers::TestFactory::Build1DPoisson(299 * comm->getSize()); @@ -746,9 +651,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy2level_AggregateSmoot #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); Teuchos::ParameterList matrixParams; @@ -826,10 +728,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy3level_BlockTriDi_3PD MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif - RCP > comm = TestHelpers::Parameters::getDefaultComm(); Teuchos::ParameterList matrixParams; matrixParams.set("matrixType", "Laplace1D"); @@ -930,12 +828,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy3level, Scalar, Local typedef typename Teuchos::ScalarTraits::magnitudeType real_type; typedef typename Xpetra::MultiVector RealValuedMultiVector; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); GO nx = 299 * comm->getSize(); @@ -1030,12 +923,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy3level_BlockSmooth, S MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); MUELU_TESTING_SET_OSTREAM; MUELU_TEST_ONLY_FOR(Xpetra::UseTpetra) { -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); GO nx = 10 * comm->getSize(); @@ -1130,12 +1018,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy3level_NoPreSmooth, S typedef typename Teuchos::ScalarTraits::magnitudeType real_type; typedef typename Xpetra::MultiVector RealValuedMultiVector; -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif RCP > comm = TestHelpers::Parameters::getDefaultComm(); GO nx = 299 * comm->getSize(); @@ -1235,12 +1118,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchy3levelFacManagers, Sc #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef typename Teuchos::ScalarTraits::magnitudeType real_type; typedef typename Xpetra::MultiVector RealValuedMultiVector; @@ -1357,12 +1235,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, SetupHierarchyTestBreakCondition, S #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef typename Teuchos::ScalarTraits::magnitudeType real_type; typedef typename Xpetra::MultiVector RealValuedMultiVector; @@ -1494,9 +1367,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, Write, Scalar, LocalOrdinal, Global MUELU_TESTING_SET_OSTREAM; Teuchos::RCP allOut = Teuchos::rcp(new Teuchos::FancyOStream(Teuchos::rcpFromRef(std::cout))); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif using TST = Teuchos::ScalarTraits; using magnitude_type = typename Teuchos::ScalarTraits::magnitudeType; using TMT = Teuchos::ScalarTraits; @@ -1648,7 +1518,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, Write, Scalar, LocalOrdinal, Global TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, BlockCrs_Mixed, Scalar, LocalOrdinal, GlobalOrdinal, Node) { #include MUELU_TESTING_SET_OSTREAM; -#if defined(HAVE_MUELU_IFPACK2) && defined(HAVE_MUELU_AMESOS2) MUELU_TEST_ONLY_FOR(Xpetra::UseTpetra); typedef typename Teuchos::ScalarTraits::magnitudeType real_type; @@ -1758,7 +1627,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Hierarchy, BlockCrs_Mixed, Scalar, LocalOrdina real_type tol = 1.0e-10; H.IsPreconditioner(false); H.Iterate(*RHS, *X, std::pair(iterations, tol)); -#endif TEST_EQUALITY(0, 0); } diff --git a/packages/muelu/test/unit_tests/IntrepidPCoarsenFactory.cpp b/packages/muelu/test/unit_tests/IntrepidPCoarsenFactory.cpp index 44bd442d6d27..4a86a22e19b6 100644 --- a/packages/muelu/test/unit_tests/IntrepidPCoarsenFactory.cpp +++ b/packages/muelu/test/unit_tests/IntrepidPCoarsenFactory.cpp @@ -1423,12 +1423,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -1488,12 +1483,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -1552,12 +1542,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2324,12 +2309,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2388,12 +2368,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2452,12 +2427,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2516,12 +2486,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2596,12 +2561,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2667,12 +2627,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; @@ -2740,12 +2695,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(IntrepidPCoarsenFactory, CreatePreconditioner_ MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode); MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, NO); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif typedef Scalar SC; typedef GlobalOrdinal GO; diff --git a/packages/muelu/test/unit_tests/MueLu_TestHelpers.hpp b/packages/muelu/test/unit_tests/MueLu_TestHelpers.hpp index 4e5ed08971d5..d9d099bf60e2 100644 --- a/packages/muelu/test/unit_tests/MueLu_TestHelpers.hpp +++ b/packages/muelu/test/unit_tests/MueLu_TestHelpers.hpp @@ -21,10 +21,6 @@ #include "Teuchos_OrdinalTraits.hpp" #include "Teuchos_ScalarTraits.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "Epetra_config.h" -#endif - // Xpetra #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_DefaultPlatform.hpp" @@ -853,54 +849,6 @@ class TpetraTestFactory { // TAW: 3/14/2016: If both Epetra and Tpetra are enabled we need partial specializations // on GO=int/long long as well as NO=EpetraNode to disable BuildBlockMatrix -#ifdef HAVE_MUELU_EPETRA -// partial specializations (GO=int not enabled with Tpetra) -#if !defined(HAVE_TPETRA_INST_INT_INT) -template -class TpetraTestFactory { - typedef int GlobalOrdinal; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - static RCP BuildBlockMatrixAsPoint(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif - -// partial specializations (GO=long long not enabled with Tpetra) -#if !defined(HAVE_TPETRA_INST_INT_LONG_LONG) -template -class TpetraTestFactory { - typedef long long GlobalOrdinal; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - static RCP BuildBlockMatrixAsPoint(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif - -// partial specializations (NO=EpetraNode not enabled with Tpetra) -#if ((defined(EPETRA_HAVE_OMP) && !(defined(HAVE_TPETRA_INST_OPENMP))) || \ - (!defined(EPETRA_HAVE_OMP) && !(defined(HAVE_TPETRA_INST_SERIAL)))) - -template -class TpetraTestFactory { - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - static RCP BuildBlockMatrixAsPoint(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif -#endif // endif HAVE_MUELU_EPETRA //! Return the list of files in the directory. Only files that are matching '*filter*' are returned. ArrayRCP GetFileList(const std::string& dirPath, const std::string& filter); diff --git a/packages/muelu/test/unit_tests/MueLu_TestHelpers_Common.hpp b/packages/muelu/test/unit_tests/MueLu_TestHelpers_Common.hpp index 7dd1c35338c9..002430a62e4b 100644 --- a/packages/muelu/test/unit_tests/MueLu_TestHelpers_Common.hpp +++ b/packages/muelu/test/unit_tests/MueLu_TestHelpers_Common.hpp @@ -25,82 +25,9 @@ #define TYPE_EQUAL(TYPE1, TYPE2) \ (typeid(TYPE1).name() == typeid(TYPE2).name()) -#ifdef HAVE_MUELU_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -// : run Epetra, do not run Tpetra -#define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) \ - MUELU_DEBUGGER_MACRO \ - if (TestHelpers::Parameters::getLib() == Xpetra::UseEpetra) { \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } \ - } else if (TestHelpers::Parameters::getLib() == Xpetra::UseTpetra) { \ - if (TYPE_EQUAL(SC, double) && TYPE_EQUAL(GO, int) && TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Tpetra for " << std::endl; \ - return; \ - } \ - } - -#define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) \ - { \ - out << "Skipping as we cannot run Epetra and Tpetra for the same combination of template args" << std::endl; \ - return; \ - } - -#else - -#define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) \ - MUELU_DEBUGGER_MACRO \ - if (TestHelpers::Parameters::getLib() == Xpetra::UseEpetra) { \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } \ - } - -// If linAlgebra==Tpetra, but the test also requires Epetra, this macro will cause the test -// to return early if SC!=double, GO!={int}, or NO!=Serial. -#define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } -#endif - -#else // HAVE_MUELU_EPETRA - #define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) #define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) -#endif // HAVE_MUELU_EPETRA - // Macro to set MueLu's internal oh-so FancyOStream to be the same as the one used by Teuchos' unit testing framework. // This prevents MueLu's output from intermingling with with the unit test pass/fail summary lines. #define MUELU_TESTING_SET_OSTREAM \ diff --git a/packages/muelu/test/unit_tests/MueLu_TestHelpers_HO.hpp b/packages/muelu/test/unit_tests/MueLu_TestHelpers_HO.hpp index 437749bda702..77f108dd147c 100644 --- a/packages/muelu/test/unit_tests/MueLu_TestHelpers_HO.hpp +++ b/packages/muelu/test/unit_tests/MueLu_TestHelpers_HO.hpp @@ -17,10 +17,6 @@ #include "MueLu_TestHelpers.hpp" -#ifdef HAVE_MUELU_EPETRA -#include "Epetra_FECrsMatrix.h" -#endif - #include "MueLu_Utilities_def.hpp" namespace MueLuTests { diff --git a/packages/muelu/test/unit_tests/MueLu_Test_ETI.hpp b/packages/muelu/test/unit_tests/MueLu_Test_ETI.hpp index 3de1815e0745..bf76b89034ce 100644 --- a/packages/muelu/test/unit_tests/MueLu_Test_ETI.hpp +++ b/packages/muelu/test/unit_tests/MueLu_Test_ETI.hpp @@ -117,21 +117,7 @@ bool Automatic_Test_ETI(int argc, char *argv[]) { auto lib = xpetraParameters.GetLib(); if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - // TAW: we might want to simplify the following logic block. - // In fact, there are examples/tests which only run with Tpetra - // We might need a feature that allows to run Epetra/Tpetra only - // We still need to make sure that the test compiles (i.e., we - // need some preprocessor flags/macros RUN_WITH_EPETRA and RUN_WITH_TPETRA -#if defined(HAVE_MUELU_INST_DOUBLE_INT_INT) || defined(HAVE_TPETRA_INST_DOUBLE) && defined(HAVE_TPETRA_INST_INT_INT) - // Both Epetra and Tpetra (with double, int, int) enabled - return MUELU_AUTOMATIC_TEST_ETI_NAME(clp, lib, argc, argv); -#else - *out << "Skip running with Epetra since both Epetra and Tpetra are enabled but Tpetra is not instantiated on double, int, int." << std::endl; -#endif // end Tpetra instantiated on double, int, int -#else throw RuntimeError("Epetra is not available"); -#endif } if (lib == Xpetra::UseTpetra) { diff --git a/packages/muelu/test/unit_tests/MultiVectorTransferFactory.cpp b/packages/muelu/test/unit_tests/MultiVectorTransferFactory.cpp index 84afe6fed818..ae5bb355d069 100644 --- a/packages/muelu/test/unit_tests/MultiVectorTransferFactory.cpp +++ b/packages/muelu/test/unit_tests/MultiVectorTransferFactory.cpp @@ -108,9 +108,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(MultiVectorTransferFactory, ThreeLevels, Scala MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); #if !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Ifpack"); -#endif -#if !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Ifpack2"); #endif out << "version: " << MueLu::Version() << std::endl; diff --git a/packages/muelu/test/unit_tests/ParameterList/CreateSublists.cpp b/packages/muelu/test/unit_tests/ParameterList/CreateSublists.cpp index e820fd9b70f2..230fa1af56dc 100644 --- a/packages/muelu/test/unit_tests/ParameterList/CreateSublists.cpp +++ b/packages/muelu/test/unit_tests/ParameterList/CreateSublists.cpp @@ -12,10 +12,6 @@ #include #include -#ifdef HAVE_MUELU_ML -#include -#endif - #include "MueLu_TestHelpers.hpp" #include "MueLu_Exceptions.hpp" #include "MueLu_UseDefaultTypes.hpp" @@ -44,25 +40,4 @@ TEUCHOS_UNIT_TEST(MueLu_CreateSublists, SetParameterList) { } } -#ifdef HAVE_MUELU_ML -TEUCHOS_UNIT_TEST(ML_CreateSublists, SetParameterList) { - std::string dir("ParameterList/CreateSublists/"); - - ArrayRCP fileList = TestHelpers::GetFileList(dir, std::string(".xml")); - - for (int i = 0; i < fileList.size(); i++) { - out << "Processing file: " << fileList[i] << std::endl; - - Teuchos::RCP inputList = Teuchos::getParametersFromXmlFile(dir + fileList[i]); - Teuchos::ParameterList outputList; - - ML_CreateSublists(*inputList, outputList); - - // Test against reference output (replace '.xml' by '.output' to get the filename) - Teuchos::RCP refOutputList = Teuchos::getParametersFromXmlFile(dir + fileList[i].substr(0, fileList[i].find_last_of(".")) + ".output"); - TEST_EQUALITY(outputList, *refOutputList); - } -} -#endif - } // namespace MueLuTests diff --git a/packages/muelu/test/unit_tests/ParameterList/FactoryFactory.cpp b/packages/muelu/test/unit_tests/ParameterList/FactoryFactory.cpp index ae34730ae71e..7bc7050ab5cf 100644 --- a/packages/muelu/test/unit_tests/ParameterList/FactoryFactory.cpp +++ b/packages/muelu/test/unit_tests/ParameterList/FactoryFactory.cpp @@ -14,12 +14,7 @@ #include -#if defined(HAVE_MUELU_AMESOS) -#include -#endif -#if defined(HAVE_MUELU_AMESOS2) #include -#endif #include @@ -139,11 +134,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(FactoryFactory, BuildFactory, Scalar, LocalOrd TEST_THROW(RUN, MueLu::Exceptions::RuntimeError); #endif } else if (lib == Xpetra::UseTpetra) { -#if defined(HAVE_MUELU_IFPACK2) RUN; -#else - TEST_THROW(RUN, MueLu::Exceptions::RuntimeError); -#endif } } else { RUN; diff --git a/packages/muelu/test/unit_tests/ParameterList/ParameterListInterpreter.cpp b/packages/muelu/test/unit_tests/ParameterList/ParameterListInterpreter.cpp index 2e4b8da1073f..7ec85125aeff 100644 --- a/packages/muelu/test/unit_tests/ParameterList/ParameterListInterpreter.cpp +++ b/packages/muelu/test/unit_tests/ParameterList/ParameterListInterpreter.cpp @@ -28,37 +28,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(ParameterListInterpreter, SetParameterList, Sc #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) && defined(HAVE_MUELU_AMESOS) && defined(HAVE_MUELU_AMESOS2) - - RCP A = TestHelpers::TestFactory::Build1DPoisson(99); - RCP > comm = TestHelpers::Parameters::getDefaultComm(); - - ArrayRCP fileList = TestHelpers::GetFileList(std::string("ParameterList/ParameterListInterpreter/"), std::string(".xml")); - - for (int i = 0; i < fileList.size(); i++) { - // Ignore files with "BlockCrs" in their name - auto found = fileList[i].find("BlockCrs"); - if (found != std::string::npos) continue; - - // Ignore files with "Comparison" in their name - found = fileList[i].find("Comparison"); - if (found != std::string::npos) continue; - - out << "Processing file: " << fileList[i] << std::endl; - ParameterListInterpreter mueluFactory("ParameterList/ParameterListInterpreter/" + fileList[i], *comm); - - RCP H = mueluFactory.CreateHierarchy(); - H->GetLevel(0)->Set("A", A); - - mueluFactory.SetupHierarchy(*H); - - // TODO: check no unused parameters - // TODO: check results of Iterate() - } - -#else out << "Skipping test because some required packages are not enabled (Tpetra, Epetra, EpetraExt, Ifpack, Ifpack2, Amesos, Amesos2)." << std::endl; -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(ParameterListInterpreter, BlockCrs, Scalar, LocalOrdinal, GlobalOrdinal, Node) { @@ -136,9 +106,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(ParameterListInterpreter, PointCrs_vs_BlockCrs #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif MUELU_TEST_ONLY_FOR(Xpetra::UseTpetra) { Teuchos::ParameterList matrixParams; matrixParams.set("matrixType", "Laplace1D"); diff --git a/packages/muelu/test/unit_tests/PgPFactory.cpp b/packages/muelu/test/unit_tests/PgPFactory.cpp index fa5bdcd1f008..6b4442baac01 100644 --- a/packages/muelu/test/unit_tests/PgPFactory.cpp +++ b/packages/muelu/test/unit_tests/PgPFactory.cpp @@ -610,9 +610,6 @@ void ReUseOmegasInternal(Teuchos::FancyOStream &out, bool &success, MueLu::Minim #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; out << "Test PgPFactory (reuse row based omegas for restriction operator)" << std::endl; @@ -800,9 +797,6 @@ void ReUseOmegasTransPInternal(Teuchos::FancyOStream &out, bool &success, MueLu: #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; out << "Test PgPFactory (reuse row based omegas for restriction operator)" << std::endl; @@ -983,209 +977,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PgPFactory, ReUseOmegasTransP, Scalar, LocalOr } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(PgPFactory, EpetraVsTpetra, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) -#include - MUELU_TESTING_SET_OSTREAM; - out << "version: " << MueLu::Version() << std::endl; - out << "Compare results of Epetra and Tpetra" << std::endl; - out << "for 3 level AMG solver using Petrov Galerkin smoothed aggregation with" << std::endl; - out << "one SGS sweep on each multigrid level as pre- and postsmoother" << std::endl; - - typedef typename Teuchos::ScalarTraits::magnitudeType real_type; - typedef typename Xpetra::MultiVector RealValuedMultiVector; - - MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(Scalar, GlobalOrdinal, Node); - - typedef typename Teuchos::ScalarTraits::magnitudeType magnitude_type; - - RCP > comm = Teuchos::DefaultComm::getComm(); - - Teuchos::Array results(2); - - // run test only on 1 procs - // then we can check shape of transfer operators - // furthermore slightly different results in parallel for Epetra and Tpetra (due to smoothers?) - if (comm->getSize() == 1) { - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // run Epetra and Tpetra test - for (int run = 0; run < 2; run++) // TODO: create a subfunction instead or Tuple of UnderlyingLib - { - if (run == 0) - lib = Xpetra::UseEpetra; - else - lib = Xpetra::UseTpetra; - - // generate problem - LocalOrdinal maxLevels = 3; - LocalOrdinal its = 10; - GlobalOrdinal nEle = 63; - const RCP map = MapFactory::Build(lib, nEle, 0, comm); - Teuchos::ParameterList matrixParameters; - matrixParameters.set("nx", nEle); - - RCP > Pr = - Galeri::Xpetra::BuildProblem("Laplace1D", map, matrixParameters); - RCP Op = Pr->BuildMatrix(); - RCP coordinates = Pr->BuildCoords(); - - // build nullspace - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar((SC)1.0); - Teuchos::Array norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - out << "||NS|| = " << norms[0] << std::endl; - - // fill hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); // set fine level matrix - Finest->Set("Nullspace", nullSpace); // set null space information for finest level - // Finest->Set("Coordinates", coordinates); // set coordinates for finest level - - // define transfer operators - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP Ptentfact = rcp(new TentativePFactory()); - RCP Pfact = rcp(new PgPFactory()); - RCP Rfact = rcp(new GenericRFactory()); - RCP Acfact = rcp(new RAPFactory()); - H->SetMaxCoarseSize(1); - - // setup smoothers - Teuchos::ParameterList smootherParamList; - smootherParamList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smootherParamList.set("relaxation: sweeps", (LocalOrdinal)1); - smootherParamList.set("relaxation: damping factor", (SC)1.0); - RCP smooProto = rcp(new TrilinosSmoother("RELAXATION", smootherParamList)); - RCP SmooFact = rcp(new SmootherFactory(smooProto)); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - RCP coarseSolveFact = rcp(new SmootherFactory(smooProto, Teuchos::null)); - - FactoryManager M; - M.SetKokkosRefactor(false); - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - M.SetFactory("Ptent", Ptentfact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarseSolveFact); - - H->Setup(M, 0, maxLevels); - - // test some basic multigrid data - RCP coarseLevel = H->GetLevel(1); - TEST_EQUALITY(coarseLevel->IsRequested("A", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("P", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("A", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("P", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("R", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsRequested("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("R", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->IsRequested("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("R", Rfact.get()), false); - RCP P1 = coarseLevel->Get >("P"); - RCP R1 = coarseLevel->Get >("R"); - TEST_EQUALITY(P1->getGlobalNumRows(), 63); - TEST_EQUALITY(P1->getGlobalNumCols(), 21); - TEST_EQUALITY(R1->getGlobalNumRows(), 21); - TEST_EQUALITY(R1->getGlobalNumCols(), 63); - RCP coarseLevel2 = H->GetLevel(2); - TEST_EQUALITY(coarseLevel2->IsRequested("A", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PreSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("A", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->IsRequested("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", Pfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", Ptentfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R", Rfact.get()), 0); - RCP P2 = coarseLevel2->Get >("P"); - RCP R2 = coarseLevel2->Get >("R"); - TEST_EQUALITY(P2->getGlobalNumRows(), 21); - TEST_EQUALITY(P2->getGlobalNumCols(), 7); - TEST_EQUALITY(R2->getGlobalNumRows(), 7); - TEST_EQUALITY(R2->getGlobalNumCols(), 21); - - Teuchos::RCP > PtentTPtent = Xpetra::MatrixMatrix::Multiply(*P1, true, *P1, false, out); - TEST_EQUALITY(PtentTPtent->getGlobalMaxNumRowEntries() - 3 < 1e-12, true); - TEST_EQUALITY(P1->getGlobalMaxNumRowEntries() - 2 < 1e-12, true); - TEST_EQUALITY(P2->getGlobalMaxNumRowEntries() - 2 < 1e-12, true); - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->putScalar(1.0); - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (SC)1.0, (SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((SC)0.0); - - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - results[run] = norms[0]; - } - } - - std::cout << results[0] << " VS " << results[1] << std::endl; - TEST_EQUALITY(results[0] - results[1] < 1e-10, true); // check results of EPETRA vs TPETRA - } // comm->getSize == 1 -#else out << "Skipping test because some required packages are not enabled (Tpetra, Epetra, EpetraExt, Ifpack, Ifpack2)." << std::endl; -#endif } // EpetraVsTpetra diff --git a/packages/muelu/test/unit_tests/RAPShiftFactory.cpp b/packages/muelu/test/unit_tests/RAPShiftFactory.cpp index 346d3f269078..0bdc4fba829e 100644 --- a/packages/muelu/test/unit_tests/RAPShiftFactory.cpp +++ b/packages/muelu/test/unit_tests/RAPShiftFactory.cpp @@ -238,9 +238,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Factory, #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; @@ -348,9 +345,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Easy, Sc #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; @@ -426,9 +420,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Easy_Dia #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; @@ -515,9 +506,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Low_Stor #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; @@ -606,9 +594,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Low_Stor #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; @@ -699,9 +684,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(RAPShiftFactory, CreatePreconditioner_Low_Stor #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2"); -#endif out << "version: " << MueLu::Version() << std::endl; typedef Scalar SC; typedef GlobalOrdinal GO; diff --git a/packages/muelu/test/unit_tests/Repartition.cpp b/packages/muelu/test/unit_tests/Repartition.cpp index 49a14ffe931b..2cdd713e06eb 100644 --- a/packages/muelu/test/unit_tests/Repartition.cpp +++ b/packages/muelu/test/unit_tests/Repartition.cpp @@ -867,12 +867,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Repartition, CoordinateMap, Scalar, LocalOrdin #include MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; out << "Tests that repartitioning is invariant to map specified in coordinates." << std::endl; @@ -977,12 +972,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Repartition, NodePartition, Scalar, LocalOrdin MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); -#if !defined(HAVE_MUELU_AMESOS) || !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Amesos, Ifpack"); -#endif -#if !defined(HAVE_MUELU_AMESOS2) || !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Amesos2, Ifpack2"); -#endif out << "version: " << MueLu::Version() << std::endl; out << "Tests that node repartitioning works " << std::endl; diff --git a/packages/muelu/test/unit_tests/SaPFactory.cpp b/packages/muelu/test/unit_tests/SaPFactory.cpp index 05f46b25d4a0..45f9b805d7b3 100644 --- a/packages/muelu/test/unit_tests/SaPFactory.cpp +++ b/packages/muelu/test/unit_tests/SaPFactory.cpp @@ -41,210 +41,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory, Test0, Scalar, LocalOrdinal, Globa } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory, EpetraVsTpetra, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) -#include "MueLu_UseShortNames.hpp" - MUELU_TESTING_SET_OSTREAM; - out << "version: " << MueLu::Version() << std::endl; - out << "Compare results of Epetra and Tpetra" << std::endl; - out << "for 3 level AMG solver using smoothed aggregation with" << std::endl; - out << "one SGS sweep on each multigrid level as pre- and postsmoother" << std::endl; - - typedef typename Teuchos::ScalarTraits::magnitudeType magnitude_type; - - MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(Scalar, GlobalOrdinal, Node); - - RCP > comm = Teuchos::DefaultComm::getComm(); - - Teuchos::Array results(2); - - // run test only on 1 proc - if (comm->getSize() == 1) { - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // run Epetra and Tpetra test - for (int run = 0; run < 2; run++) // TODO: create a subfunction instead or Tuple of UnderlyingLib - { - if (run == 0) - lib = Xpetra::UseEpetra; - else - lib = Xpetra::UseTpetra; - - // generate problem - LocalOrdinal maxLevels = 3; - LocalOrdinal its = 10; - GlobalOrdinal nEle = 63; - const RCP map = MapFactory::Build(lib, nEle, 0, comm); - Teuchos::ParameterList matrixParameters; - matrixParameters.set("nx", nEle); - - RCP > Pr = - Galeri::Xpetra::BuildProblem("Laplace1D", map, matrixParameters); - RCP Op = Pr->BuildMatrix(); - - // build nullspace - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar((Scalar)1.0); - Teuchos::Array norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - out << "||NS|| = " << norms[0] << std::endl; - - // fill hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); // set fine level matrix - Finest->Set("Nullspace", nullSpace); // set null space information for finest level - - // define transfer operators - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP Ptentfact = rcp(new TentativePFactory()); - RCP Pfact = rcp(new SaPFactory()); - RCP Rfact = rcp(new TransPFactory()); - RCP Acfact = rcp(new RAPFactory()); - H->SetMaxCoarseSize(1); - - // setup smoothers - Teuchos::ParameterList smootherParamList; - smootherParamList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smootherParamList.set("relaxation: sweeps", (LocalOrdinal)1); - smootherParamList.set("relaxation: damping factor", (Scalar)1.0); - RCP smooProto = rcp(new TrilinosSmoother("RELAXATION", smootherParamList)); - RCP SmooFact = rcp(new SmootherFactory(smooProto)); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - RCP coarseSolveFact = rcp(new SmootherFactory(smooProto, Teuchos::null)); - - FactoryManager M; - M.SetKokkosRefactor(false); - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - M.SetFactory("Ptent", Ptentfact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarseSolveFact); - - H->Setup(M, 0, maxLevels); - - // test some basic multigrid data - RCP coarseLevel = H->GetLevel(1); - TEST_EQUALITY(coarseLevel->IsRequested("A", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("P", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("A", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("P", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("R", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("R", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->IsRequested("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("A", Acfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("A", Acfact.get()), false); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P", Pfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P", Ptentfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PreSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PostSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("R", Rfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("A", Acfact.get()), 0); - RCP P1 = coarseLevel->Get >("P"); - RCP R1 = coarseLevel->Get >("R"); - TEST_EQUALITY(P1->getGlobalNumRows(), 63); - TEST_EQUALITY(P1->getGlobalNumCols(), 21); - TEST_EQUALITY(R1->getGlobalNumRows(), 21); - TEST_EQUALITY(R1->getGlobalNumCols(), 63); - RCP coarseLevel2 = H->GetLevel(2); - TEST_EQUALITY(coarseLevel2->IsRequested("A", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PreSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("A", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother", MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R", MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("A", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother", MueLu::NoFactory::get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R", MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->IsRequested("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P", Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother", SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R", Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", Pfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P", Ptentfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother", SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R", Rfact.get()), 0); - RCP P2 = coarseLevel2->Get >("P"); - RCP R2 = coarseLevel2->Get >("R"); - TEST_EQUALITY(P2->getGlobalNumRows(), 21); - TEST_EQUALITY(P2->getGlobalNumCols(), 7); - TEST_EQUALITY(R2->getGlobalNumRows(), 7); - TEST_EQUALITY(R2->getGlobalNumCols(), 21); - - Teuchos::RCP > PtentTPtent = Xpetra::MatrixMatrix::Multiply(*P1, true, *P1, false, out); - - if (PtentTPtent->haveGlobalConstants()) TEST_EQUALITY(PtentTPtent->getGlobalMaxNumRowEntries() - 3 < 1e-12, true); - if (P1->haveGlobalConstants()) TEST_EQUALITY(P1->getGlobalMaxNumRowEntries() - 2 < 1e-12, true); - if (P2->haveGlobalConstants()) TEST_EQUALITY(P2->getGlobalMaxNumRowEntries() - 2 < 1e-12, true); - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->putScalar(1.0); - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((Scalar)0.0); - - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - results[run] = norms[0]; - } - } - - TEST_EQUALITY(results[0] - results[1] < 1e-10, true); // check results of EPETRA vs TPETRA - } // comm->getSize == 1 -#else out << "Skipping test because some required packages are not enabled (Tpetra, Epetra, EpetraExt, Ifpack, Ifpack2)." << std::endl; -#endif } // SaPFactory_EpetraVsTpetra diff --git a/packages/muelu/test/unit_tests/TentativePFactory.cpp b/packages/muelu/test/unit_tests/TentativePFactory.cpp index 79277b2ee671..5a7f3ed363fa 100644 --- a/packages/muelu/test/unit_tests/TentativePFactory.cpp +++ b/packages/muelu/test/unit_tests/TentativePFactory.cpp @@ -496,9 +496,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TentativePFactory, NonStandardMaps, Scalar, Lo #if !defined(HAVE_MUELU_IFPACK) MUELU_TESTING_DO_NOT_TEST(Xpetra::UseEpetra, "Ifpack"); #endif -#if !defined(HAVE_MUELU_IFPACK2) - MUELU_TESTING_DO_NOT_TEST(Xpetra::UseTpetra, "Ifpack2"); -#endif RCP > comm = Teuchos::DefaultComm::getComm(); Xpetra::UnderlyingLib lib = MueLuTests::TestHelpers::Parameters::getLib(); @@ -670,151 +667,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TentativePFactory, PtentEpetraVsTpetra, Scalar #include "MueLu_UseShortNames.hpp" MUELU_TESTING_SET_OSTREAM; MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(Scalar, GlobalOrdinal, Node); -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) - - using TST = Teuchos::ScalarTraits; - using magnitude_type = typename Teuchos::ScalarTraits::magnitudeType; - using TMT = Teuchos::ScalarTraits; - using real = typename TST::coordinateType; - typedef Xpetra::MultiVector RealValuedMultiVector; - - out << "version: " << MueLu::Version() << std::endl; - out << "Test QR when nullspace isn't supplied by user" << std::endl; - - RCP > comm = Teuchos::DefaultComm::getComm(); - - Teuchos::Array results(2); - - // run test only on 1 proc - if (comm->getSize() == 1) { - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // run Epetra and Tpetra test - for (int run = 0; run < 2; run++) { - if (run == 0) - lib = Xpetra::UseEpetra; - else - lib = Xpetra::UseTpetra; - - // generate problem - LocalOrdinal maxLevels = 3; - LocalOrdinal its = 10; - GlobalOrdinal nEle = 63; - const RCP map = MapFactory::Build(lib, nEle, 0, comm); - Teuchos::ParameterList matrixParameters; - matrixParameters.set("nx", nEle); - RCP > Pr = - Galeri::Xpetra::BuildProblem("Laplace1D", map, matrixParameters); - RCP Op = Pr->BuildMatrix(); - RCP coordinates = Pr->BuildCoords(); - - // build nullspace - RCP nullSpace = MultiVectorFactory::Build(map, 1); - nullSpace->putScalar(TST::one()); - Teuchos::Array norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - out << "||NS|| = " << norms[0] << std::endl; - - // fill hierarchy - RCP H = rcp(new Hierarchy()); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - RCP Finest = H->GetLevel(); // first associate level with hierarchy (for defaultFactoryHandler!) - - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A", Op); // set fine level matrix - Finest->Set("Nullspace", nullSpace); // set null space information for finest level - // Finest->Set("Coordinates", coordinates); // set coordinates for finest level - - // define transfer operators - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP Pfact = rcp(new TentativePFactory()); - RCP Rfact = rcp(new TransPFactory()); - RCP Acfact = rcp(new RAPFactory()); - H->SetMaxCoarseSize(1); - - // setup smoothers - Teuchos::ParameterList smootherParamList; - smootherParamList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smootherParamList.set("relaxation: sweeps", (LocalOrdinal)1); - smootherParamList.set("relaxation: damping factor", TST::one()); - RCP smooProto = rcp(new TrilinosSmoother("RELAXATION", smootherParamList)); - RCP SmooFact = rcp(new SmootherFactory(smooProto)); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - RCP coarseSolveFact = rcp(new SmootherFactory(smooProto, Teuchos::null)); - - FactoryManager M; - M.SetKokkosRefactor(false); - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - M.SetFactory("Ptent", Pfact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarseSolveFact); - // M.SetFactory("Coordinates", Pfact); - - H->Setup(M, 0, maxLevels); - - // test some basic multgrid data - RCP coarseLevel = H->GetLevel(1); - RCP P1 = coarseLevel->Get >("P"); - RCP R1 = coarseLevel->Get >("R"); - TEST_EQUALITY(P1->getGlobalNumRows(), 63); - TEST_EQUALITY(P1->getGlobalNumCols(), 21); - TEST_EQUALITY(R1->getGlobalNumRows(), 21); - TEST_EQUALITY(R1->getGlobalNumCols(), 63); - RCP coarseLevel2 = H->GetLevel(2); - RCP P2 = coarseLevel2->Get >("P"); - RCP R2 = coarseLevel2->Get >("R"); - TEST_EQUALITY(P2->getGlobalNumRows(), 21); - TEST_EQUALITY(P2->getGlobalNumCols(), 7); - TEST_EQUALITY(R2->getGlobalNumRows(), 7); - TEST_EQUALITY(R2->getGlobalNumCols(), 21); - - Teuchos::RCP > PtentTPtent = Xpetra::MatrixMatrix::Multiply(*P1, true, *P1, false, out); - Teuchos::RCP > diagVec = Xpetra::VectorFactory::Build(PtentTPtent->getRowMap()); - PtentTPtent->getLocalDiagCopy(*diagVec); - TEST_EQUALITY(diagVec->norm1() - diagVec->getGlobalLength() < 100 * TMT::eps(), true); - TEST_EQUALITY(diagVec->normInf() - TMT::one() < 100 * TMT::eps(), true); - TEST_EQUALITY(TST::magnitude(diagVec->meanValue()) - TMT::one() < 100 * TMT::eps(), true); - TEST_EQUALITY(PtentTPtent->getGlobalNumEntries(), diagVec->getGlobalLength()); - - // Define RHS - RCP X = MultiVectorFactory::Build(map, 1); - RCP RHS = MultiVectorFactory::Build(map, 1); - - X->putScalar(1.0); - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X, *RHS, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar((Scalar)0.0); - - H->Iterate(*RHS, *X, its); - - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - results[run] = norms[0]; - } - } - - TEST_FLOATING_EQUALITY(results[0], results[1], 100 * TMT::eps()); // check results of EPETRA vs TPETRA - } // comm->getSize == 1 - -#else out << "Skipping test because some required packages are not enabled (Tpetra, Epetra, EpetraExt, Ifpack, Ifpack2)." << std::endl; -#endif } // TentativePFactory_EpetraVsTpetra diff --git a/packages/muelu/test/unit_tests/UserData/CreateXpetraPreconditioner.cpp b/packages/muelu/test/unit_tests/UserData/CreateXpetraPreconditioner.cpp index 4073bd19b6b7..a7fe2da61838 100644 --- a/packages/muelu/test/unit_tests/UserData/CreateXpetraPreconditioner.cpp +++ b/packages/muelu/test/unit_tests/UserData/CreateXpetraPreconditioner.cpp @@ -34,127 +34,3 @@ #include "MueLu_CreateXpetraPreconditioner.hpp" -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_SERIAL) - -#include "MueLu_UseDefaultTypes.hpp" - -namespace MueLuTests { - -TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(UserData, CreateXpetraPreconditioner, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#include "MueLu_UseShortNames.hpp" - MUELU_TESTING_SET_OSTREAM; - MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); - out << "version: " << MueLu::Version() << std::endl; - - using Teuchos::RCP; - - Xpetra::UnderlyingLib lib = TestHelpers::Parameters::getLib(); - RCP > comm = TestHelpers::Parameters::getDefaultComm(); - - GO nx = 1000; - - std::string xmlFileName = "UserData/test.xml"; - Teuchos::RCP inParamList = Teuchos::getParametersFromXmlFile(xmlFileName); - if (lib == Xpetra::UseEpetra) { - inParamList->sublist("Hierarchy").set("use kokkos refactor", false); - } - - typedef typename Teuchos::ScalarTraits::magnitudeType magnitude_type; - - // Matrix - RCP Op = TestHelpers::TestFactory::Build1DPoisson(nx * comm->getSize(), lib); - RCP map = Op->getRowMap(); - - // Normalized RHS - RCP RHS1 = MultiVectorFactory::Build(map, 1); - RHS1->setSeed(846930886); - RHS1->randomize(); - Teuchos::Array norms(1); - RHS1->norm2(norms); - RHS1->scale(1 / norms[0]); - - // Zero initial guess - RCP X1 = MultiVectorFactory::Build(Op->getRowMap(), 1); - X1->putScalar(Teuchos::ScalarTraits::zero()); - - Teuchos::ParameterList galeriList; - galeriList.set("nx", nx); - RCP coordinates = Galeri::Xpetra::Utils::CreateCartesianCoordinates("1D", Op->getRowMap(), galeriList); - RCP nullspace = Xpetra::MultiVectorFactory::Build(Op->getDomainMap(), 1); - nullspace->putScalar(Teuchos::ScalarTraits::one()); - - // Add sublist "user data" to MueLu's parameter list - const std::string userName = "user data"; - Teuchos::ParameterList& userParamList = inParamList->sublist(userName); - - // Create test variables to be stored on Level 0 of the Hierarchy - SC myScalar = 3.14; - userParamList.set("Scalar myScalar", myScalar); - double myDouble = 2.71; - userParamList.set("Double myDouble", myDouble); - int myInt = 42; - userParamList.set("int myInt", myInt); - std::string myString = "Test string"; - userParamList.set("String myString", myString); - Array myArrayGO(4); - myArrayGO[0] = 1; - myArrayGO[1] = 4; - myArrayGO[2] = 5; - myArrayGO[3] = 0; - userParamList.set >("Array myArray", myArrayGO); - Array myArrayLO(5); - myArrayLO[0] = 8; - myArrayLO[1] = 7; - myArrayLO[2] = 1; - myArrayLO[3] = 2; - myArrayLO[4] = 3; - userParamList.set >("Array myArray", myArrayLO); - - RCP xH = MueLu::CreateXpetraPreconditioner(Op, *inParamList); - - // Extract variables on level 0 and check that they are unchanged. - RCP level0 = xH->GetLevel(); - bool result = true; - std::string errorMsg = ""; - - if (!(level0->Get("myScalar") == myScalar)) { - errorMsg += "myScalar does not have correct value on level 0.\n"; - result = false; - } - - if (!(level0->Get("myDouble") == myDouble)) { - errorMsg += "myDouble does not have correct value on level 0.\n"; - result = false; - } - - if (!(level0->Get("myInt") == myInt)) { - errorMsg += "myInt does not have correct value on level 0.\n"; - result = false; - } - - if (!(level0->Get("myString") == myString)) { - errorMsg += "myString does not have correct value on level 0.\n"; - result = false; - } - - if (!(level0->Get >("myArray") == myArrayGO)) { - errorMsg += "myArray does not have correct value on level 0.\n"; - result = false; - } - - if (!(level0->Get >("myArray") == myArrayLO)) { - errorMsg += "myArray does not have correct value on level 0.\n"; - result = false; - } - - TEST_EQUALITY(result, true); -} // CreatePreconditioner - -#define MUELU_ETI_GROUP(Scalar, LocalOrdinal, GlobalOrdinal, Node) \ - TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(UserData, CreateXpetraPreconditioner, Scalar, LocalOrdinal, GlobalOrdinal, Node) - -#include - -} // namespace MueLuTests - -#endif // HAVE_MUELU_EPETRA && HAVE_MUELU_SERIAL diff --git a/packages/muelu/test/unit_tests/Utilities.cpp b/packages/muelu/test/unit_tests/Utilities.cpp index 97842d36f208..970e0ce359f8 100644 --- a/packages/muelu/test/unit_tests/Utilities.cpp +++ b/packages/muelu/test/unit_tests/Utilities.cpp @@ -29,70 +29,7 @@ namespace MueLuTests { TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Utilities, MatMatMult_EpetraVsTpetra, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) -#include - MUELU_TESTING_SET_OSTREAM; - out << "version: " << MueLu::Version() << std::endl; - out << "This test compares the matrix matrix multiply between Tpetra and Epetra" << std::endl; - - MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(Scalar, GlobalOrdinal, Node); - - RCP> comm = Parameters::getDefaultComm(); - - typedef typename Teuchos::ScalarTraits::magnitudeType magnitude_type; - - // Calculate result = (Op*Op)*X for Epetra - GO nx = 37 * comm->getSize(); - GO ny = nx; - RCP Op = TestHelpers::TestFactory::Build2DPoisson(nx, ny, Xpetra::UseEpetra); - RCP OpOp = Xpetra::MatrixMatrix::Multiply(*Op, false, *Op, false, out); - RCP result = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - RCP X_epetra = MultiVectorFactory::Build(OpOp->getDomainMap(), 1); - Teuchos::Array xnorm(1); - X_epetra->setSeed(8675309); - X_epetra->randomize(true); - X_epetra->norm2(xnorm); - OpOp->apply(*X_epetra, *result, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Teuchos::Array normEpetra(1); - result->norm2(normEpetra); - - // aid debugging by calculating Op*(Op*X) - RCP workVec = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - RCP check1 = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - Op->apply(*X_epetra, *workVec, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Op->apply(*workVec, *check1, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Teuchos::Array normCheck1(1); - check1->norm2(normCheck1); - - // Calculate result = (Op*Op)*X for Tpetra - Op = TestHelpers::TestFactory::Build2DPoisson(nx, ny, Xpetra::UseTpetra); - OpOp = Xpetra::MatrixMatrix::Multiply(*Op, false, *Op, false, out); - result = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - RCP X_tpetra = MultiVectorFactory::Build(OpOp->getDomainMap(), 1); - { - auto lcl_X_epetra = X_epetra->getHostLocalView(Xpetra::Access::ReadOnly); - auto lcl_X_tpetra = X_tpetra->getHostLocalView(Xpetra::Access::OverwriteAll); - Kokkos::deep_copy(lcl_X_tpetra, lcl_X_epetra); - } - X_tpetra->norm2(xnorm); - OpOp->apply(*X_tpetra, *result, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Teuchos::Array normTpetra(1); - result->norm2(normTpetra); - - // aid debugging by calculating Op*(Op*X) - workVec = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - RCP check2 = MultiVectorFactory::Build(OpOp->getRangeMap(), 1); - Op->apply(*X_tpetra, *workVec, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Op->apply(*workVec, *check2, Teuchos::NO_TRANS, (Scalar)1.0, (Scalar)0.0); - Teuchos::Array normCheck2(1); - check2->norm2(normCheck2); - - TEST_FLOATING_EQUALITY(normEpetra[0], normTpetra[0], 1e-12); - out << "Epetra ||A*(A*x)|| = " << normCheck1[0] << std::endl; - out << "Tpetra ||A*(A*x)|| = " << normCheck2[0] << std::endl; -#else out << "Skipping test because some required packages are not enabled (Tpetra, EpetraExt)." << std::endl; -#endif } // EpetraVersusTpetra diff --git a/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_Common_kokkos.hpp b/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_Common_kokkos.hpp index d44caf48b604..a32f5469da56 100644 --- a/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_Common_kokkos.hpp +++ b/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_Common_kokkos.hpp @@ -25,82 +25,9 @@ #define TYPE_EQUAL(TYPE1, TYPE2) \ (typeid(TYPE1).name() == typeid(TYPE2).name()) -#ifdef HAVE_MUELU_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -// : run Epetra, do not run Tpetra -#define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) \ - MUELU_DEBUGGER_MACRO \ - if (TestHelpers_kokkos::Parameters::getLib() == Xpetra::UseEpetra) { \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } \ - } else if (TestHelpers_kokkos::Parameters::getLib() == Xpetra::UseTpetra) { \ - if (TYPE_EQUAL(SC, double) && TYPE_EQUAL(GO, int) && TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Tpetra for " << std::endl; \ - return; \ - } \ - } - -#define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) \ - { \ - out << "Skipping as we cannot run Epetra and Tpetra for the same combination of template args" << std::endl; \ - return; \ - } - -#else - -#define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) \ - MUELU_DEBUGGER_MACRO \ - if (TestHelpers_kokkos::Parameters::getLib() == Xpetra::UseEpetra) { \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } \ - } - -// If linAlgebra==Tpetra, but the test also requires Epetra, this macro will cause the test -// to return early if SC!=double, GO!={int}, or NO!=Serial. -#define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) \ - if (!TYPE_EQUAL(SC, double)) { \ - out << "Skipping Epetra for SC != double" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(GO, int)) { \ - out << "Skipping Epetra for GO != int" << std::endl; \ - return; \ - } \ - if (!TYPE_EQUAL(NO, Xpetra::EpetraNode)) { \ - out << "Skipping Epetra for NO != EpetraNode" << std::endl; \ - return; \ - } -#endif - -#else // HAVE_MUELU_EPETRA - #define MUELU_TESTING_LIMIT_SCOPE(SC, GO, NO) #define MUELU_TESTING_LIMIT_EPETRA_SCOPE_TPETRA_IS_DEFAULT(SC, GO, NO) -#endif // HAVE_MUELU_EPETRA - // Macro to set MueLu's internal oh-so FancyOStream to be the same as the one used by Teuchos' unit testing framework. // This prevents MueLu's output from intermingling with with the unit test pass/fail summary lines. #define MUELU_TESTING_SET_OSTREAM \ diff --git a/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_kokkos.hpp b/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_kokkos.hpp index ff400f9ca3cb..e8a9efc224e6 100644 --- a/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_kokkos.hpp +++ b/packages/muelu/test/unit_tests_kokkos/MueLu_TestHelpers_kokkos.hpp @@ -664,15 +664,6 @@ class TestFactory { } #if 0 -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) - static RCP createSmootherPrototype(const std::string& type="Gauss-Seidel", LO sweeps=1) { - Teuchos::ParameterList ifpackList; - ifpackList.set("relaxation: type", type); - ifpackList.set("relaxation: sweeps", (LO) sweeps); - ifpackList.set("relaxation: damping factor", (SC) 1.0); - return rcp( new IfpackSmoother("point relaxation stand-alone",ifpackList) ); - } -#endif #endif }; // class TestFactory @@ -744,51 +735,6 @@ class TpetraTestFactory { // TAW: 3/14/2016: If both Epetra and Tpetra are enabled we need partial specializations // on GO=int/long long as well as NO=EpetraNode to disable BuildBlockMatrix -#ifdef HAVE_MUELU_EPETRA -// partial specializations (GO=int not enabled with Tpetra) -#if !defined(HAVE_TPETRA_INST_INT_INT) -template -class TpetraTestFactory { - typedef int GlobalOrdinal; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif - -// partial specializations (GO=long long not enabled with Tpetra) -#if !defined(HAVE_TPETRA_INST_INT_LONG_LONG) -template -class TpetraTestFactory { - typedef long long GlobalOrdinal; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif - -// partial specializations (NO=EpetraNode not enabled with Tpetra) -#if ((defined(EPETRA_HAVE_OMP) && !(defined(HAVE_TPETRA_INST_OPENMP))) || \ - (!defined(EPETRA_HAVE_OMP) && !(defined(HAVE_TPETRA_INST_SERIAL)))) - -template -class TpetraTestFactory { - typedef Xpetra::EpetraNode Node; -#include "MueLu_UseShortNames.hpp" - public: - static RCP BuildBlockMatrix(Teuchos::ParameterList& matrixList, Xpetra::UnderlyingLib lib) { return Teuchos::null; } - - private: - TpetraTestFactory() {} // static class -}; // class TpetraTestFactory -#endif -#endif // endif HAVE_MUELU_EPETRA //! Return the list of files in the directory. Only files that are matching '*filter*' are returned. ArrayRCP GetFileList(const std::string& dirPath, const std::string& filter); diff --git a/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp b/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp index aa99a21bc93a..a63275a23ae0 100644 --- a/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp +++ b/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp @@ -249,207 +249,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory_kokkos, ConstrainRowOptimalScalarPD // FIXME_KOKKOS: uncomment the test when we get all corresponding factories ported to kokkos #if 0 -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) - TEUCHOS_UNIT_TEST(SaPFactory_kokkos, EpetraVsTpetra) - { -#include "MueLu_UseShortNames.hpp" - MueLu::VerboseObject::SetMueLuOStream(Teuchos::rcpFromRef(out)); - - out << "version: " << MueLu::Version() << std::endl; - out << "Compare results of Epetra and Tpetra" << std::endl; - out << "for 3 level AMG solver using smoothed aggregation with" << std::endl; - out << "one SGS sweep on each multigrid level as pre- and postsmoother" << std::endl; - - RCP > comm = Teuchos::DefaultComm::getComm(); - - typedef Teuchos::ScalarTraits STS; - SC zero = STS::zero(), one = STS::one(); - - Array results(2); - - // run test only on 1 proc - if(comm->getSize() == 1) { - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // run Epetra and Tpetra test - for (int run = 0; run < 2; run++) { //TODO: create a subfunction instead or Tuple of UnderlyingLib - if (run == 0) lib = Xpetra::UseEpetra; - else lib = Xpetra::UseTpetra; - - // generate problem - LO maxLevels = 3; - LO its = 10; - GO nEle = 63; - const RCP map = MapFactory::Build(lib, nEle, 0, comm); - Teuchos::ParameterList matrixParameters; - matrixParameters.set("nx", nEle); - - RCP > Pr = - Galeri::Xpetra::BuildProblem("Laplace1D", map, matrixParameters); - RCP Op = Pr->BuildMatrix(); - - // build nullspace - RCP nullSpace = MultiVectorFactory::Build(map,1); - nullSpace->putScalar(one); - Array norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - out << "||NS|| = " << norms[0] << std::endl; - - // fill hierarchy - RCP H = rcp( new Hierarchy() ); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - - RCP Finest = H->GetLevel(); - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A",Op); // set fine level matrix - Finest->Set("Nullspace",nullSpace); // set null space information for finest level - - // define transfer operators - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP Ptentfact = rcp(new TentativePFactory()); - RCP Pfact = rcp( new SaPFactory()); - RCP Rfact = rcp( new TransPFactory() ); - RCP Acfact = rcp( new RAPFactory() ); - H->SetMaxCoarseSize(1); - - // setup smoothers - Teuchos::ParameterList smootherParamList; - smootherParamList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smootherParamList.set("relaxation: sweeps", (LO) 1); - smootherParamList.set("relaxation: damping factor", (SC) 1.0); - RCP smooProto = rcp( new TrilinosSmoother("RELAXATION", smootherParamList) ); - RCP SmooFact = rcp( new SmootherFactory(smooProto) ); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - RCP coarseSolveFact = rcp(new SmootherFactory(smooProto, Teuchos::null)); - - FactoryManager M; - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - M.SetFactory("Ptent", Ptentfact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarseSolveFact); - - H->Setup(M, 0, maxLevels); - - // test some basic multigrid data - RCP coarseLevel = H->GetLevel(1); - TEST_EQUALITY(coarseLevel->IsRequested("A",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("P",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("A",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("P",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->IsAvailable("R",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel->GetKeepFlag("A",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PreSmoother",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PostSmoother",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->GetKeepFlag("R",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel->IsRequested("P",Pfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("P",Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PreSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("PostSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("R",Rfact.get()), false); - TEST_EQUALITY(coarseLevel->IsRequested("A",Acfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P",Pfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("P",Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PreSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("PostSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("R",Rfact.get()), false); - TEST_EQUALITY(coarseLevel->IsAvailable("A",Acfact.get()), false); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P",Pfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("P",Ptentfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PreSmoother",SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("PostSmoother",SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("R",Rfact.get()), 0); - TEST_EQUALITY(coarseLevel->GetKeepFlag("A",Acfact.get()), 0); - RCP P1 = coarseLevel->Get< RCP >("P"); - RCP R1 = coarseLevel->Get< RCP >("R"); - TEST_EQUALITY(P1->getGlobalNumRows(), 63); - TEST_EQUALITY(P1->getGlobalNumCols(), 21); - TEST_EQUALITY(R1->getGlobalNumRows(), 21); - TEST_EQUALITY(R1->getGlobalNumCols(), 63); - RCP coarseLevel2 = H->GetLevel(2); - TEST_EQUALITY(coarseLevel2->IsRequested("A",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PreSmoother",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("PostSmoother",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("A",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("P",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother",MueLu::NoFactory::get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R",MueLu::NoFactory::get()), true); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("A",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother",MueLu::NoFactory::get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R",MueLu::NoFactory::get()), MueLu::Final); - TEST_EQUALITY(coarseLevel2->IsRequested("P",Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("P",Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsRequested("R",Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P",Pfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("P",Ptentfact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PreSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("PostSmoother",SmooFact.get()), false); - TEST_EQUALITY(coarseLevel2->IsAvailable("R",Rfact.get()), false); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P",Pfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("P",Ptentfact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PreSmoother",SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("PostSmoother",SmooFact.get()), 0); - TEST_EQUALITY(coarseLevel2->GetKeepFlag("R",Rfact.get()), 0); - RCP P2 = coarseLevel2->Get< RCP >("P"); - RCP R2 = coarseLevel2->Get< RCP >("R"); - TEST_EQUALITY(P2->getGlobalNumRows(), 21); - TEST_EQUALITY(P2->getGlobalNumCols(), 7); - TEST_EQUALITY(R2->getGlobalNumRows(), 7); - TEST_EQUALITY(R2->getGlobalNumCols(), 21); - - Teuchos::RCP > PtentTPtent = Xpetra::MatrixMatrix::Multiply(*P1,true,*P1,false,out); - TEST_EQUALITY(PtentTPtent->getGlobalMaxNumRowEntries()-3<1e-12, true); - TEST_EQUALITY(P1->getGlobalMaxNumRowEntries()-2<1e-12, true); - TEST_EQUALITY(P2->getGlobalMaxNumRowEntries()-2<1e-12, true); - - // Define RHS - RCP X = MultiVectorFactory::Build(map,1); - RCP RHS = MultiVectorFactory::Build(map,1); - - X->putScalar(1.0); - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X,*RHS,Teuchos::NO_TRANS,(SC)1.0,(SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar( (SC) 0.0); - - H->Iterate(*RHS,*X,its); - - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - results[run] = norms[0]; - } - } - - TEST_EQUALITY(results[0] - results[1] < 1e-10, true); // check results of EPETRA vs TPETRA - } // comm->getSize == 1 - - } //SaPFactory_EpetraVsTpetra -#endif #endif #define MUELU_ETI_GROUP(SC, LO, GO, NO) \ diff --git a/packages/muelu/test/unit_tests_kokkos/TentativePFactory_kokkos.cpp b/packages/muelu/test/unit_tests_kokkos/TentativePFactory_kokkos.cpp index 2864e357ac6d..b301a85bb266 100644 --- a/packages/muelu/test/unit_tests_kokkos/TentativePFactory_kokkos.cpp +++ b/packages/muelu/test/unit_tests_kokkos/TentativePFactory_kokkos.cpp @@ -587,145 +587,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(TentativePFactory_kokkos, MakeTentativeUsingDe } -#if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_EPETRAEXT) && defined(HAVE_MUELU_IFPACK) && defined(HAVE_MUELU_IFPACK2) - TEUCHOS_UNIT_TEST(TentativePFactory, EpetraVsTpetra) - { - out << "version: " << MueLu::Version() << std::endl; - out << "Test QR when nullspace isn't supplied by user" << std::endl; - - RCP > comm = Teuchos::DefaultComm::getComm(); - - using TST = Teuchos::ScalarTraits; - using magnitude_type = typename TST::magnitudeType; - using TMT = Teuchos::ScalarTraits; - - Teuchos::Array results(2); - - // run test only on 1 proc - if(comm->getSize() == 1) - { - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // run Epetra and Tpetra test - for (int run = 0; run < 2; run++) - { - if (run == 0) lib = Xpetra::UseEpetra; - else lib = Xpetra::UseTpetra; - - // generate problem - LO maxLevels = 3; - LO its=10; - LO nEle = 63; - const RCP map = MapFactory::Build(lib, nEle, 0, comm); - Teuchos::ParameterList matrixParameters; - matrixParameters.set("nx", Teuchos::as(nEle)); - RCP > Pr = - Galeri::Xpetra::BuildProblem("Laplace1D", map, matrixParameters); - RCP Op = Pr->BuildMatrix(); - - // build nullspace - RCP nullSpace = MultiVectorFactory::Build(map,1); - nullSpace->putScalar( (SC) 1.0); - Teuchos::Array norms(1); - nullSpace->norm1(norms); - if (comm->getRank() == 0) - out << "||NS|| = " << norms[0] << std::endl; - - // fill hierarchy - RCP H = rcp( new Hierarchy() ); - H->setDefaultVerbLevel(Teuchos::VERB_HIGH); - RCP Finest = H->GetLevel(); // first associate level with hierarchy (for defaultFactoryHandler!) - - Finest->setDefaultVerbLevel(Teuchos::VERB_HIGH); - Finest->Set("A",Op); // set fine level matrix - Finest->Set("Nullspace",nullSpace); // set null space information for finest level - - // define transfer operators - RCP UncoupledAggFact = rcp(new UncoupledAggregationFactory()); - UncoupledAggFact->SetMinNodesPerAggregate(3); - UncoupledAggFact->SetMaxNeighAlreadySelected(0); - UncoupledAggFact->SetOrdering("natural"); - - RCP Pfact = rcp(new TentativePFactory()); - RCP Rfact = rcp( new TransPFactory() ); - RCP Acfact = rcp( new RAPFactory() ); - H->SetMaxCoarseSize(1); - - // setup smoothers - Teuchos::ParameterList smootherParamList; - smootherParamList.set("relaxation: type", "Symmetric Gauss-Seidel"); - smootherParamList.set("relaxation: sweeps", (LO) 1); - smootherParamList.set("relaxation: damping factor", (SC) 1.0); - RCP smooProto = rcp( new TrilinosSmoother("RELAXATION", smootherParamList) ); - RCP SmooFact = rcp( new SmootherFactory(smooProto) ); - Acfact->setVerbLevel(Teuchos::VERB_HIGH); - - RCP coarseSolveFact = rcp(new SmootherFactory(smooProto, Teuchos::null)); - - FactoryManager M; - M.SetFactory("P", Pfact); - M.SetFactory("R", Rfact); - M.SetFactory("A", Acfact); - M.SetFactory("Ptent", Pfact); - M.SetFactory("Aggregates", UncoupledAggFact); - M.SetFactory("Smoother", SmooFact); - M.SetFactory("CoarseSolver", coarseSolveFact); - - H->Setup(M, 0, maxLevels); - - // test some basic multgrid data - RCP coarseLevel = H->GetLevel(1); - RCP P1 = coarseLevel->Get< RCP >("P"); - RCP R1 = coarseLevel->Get< RCP >("R"); - TEST_EQUALITY(P1->getGlobalNumRows(), 63); - TEST_EQUALITY(P1->getGlobalNumCols(), 21); - TEST_EQUALITY(R1->getGlobalNumRows(), 21); - TEST_EQUALITY(R1->getGlobalNumCols(), 63); - RCP coarseLevel2 = H->GetLevel(2); - RCP P2 = coarseLevel2->Get< RCP >("P"); - RCP R2 = coarseLevel2->Get< RCP >("R"); - TEST_EQUALITY(P2->getGlobalNumRows(), 21); - TEST_EQUALITY(P2->getGlobalNumCols(), 7); - TEST_EQUALITY(R2->getGlobalNumRows(), 7); - TEST_EQUALITY(R2->getGlobalNumCols(), 21); - - Teuchos::RCP > PtentTPtent = Xpetra::MatrixMatrix::Multiply(*P1,true,*P1,false,out); - Teuchos::RCP > diagVec = Xpetra::VectorFactory::Build(PtentTPtent->getRowMap()); - PtentTPtent->getLocalDiagCopy(*diagVec); - TEST_FLOATING_EQUALITY(diagVec->norm1(), TST::magnitude(diagVec->getGlobalLength()), 100*TMT:eps()); - TEST_FLOATING_EQUALITY(diagVec->normInf(), TMT::one(), 100*TMT:eps()); - TEST_FLOATING_EQUALITY(diagVec->meanValue(), TMT::one(), 100*TMT:eps()); - TEST_EQUALITY(PtentTPtent->getGlobalNumEntries(), diagVec->getGlobalLength()); - - // Define RHS - RCP X = MultiVectorFactory::Build(map,1); - RCP RHS = MultiVectorFactory::Build(map,1); - - X->putScalar(1.0); - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_true|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - - Op->apply(*X,*RHS,Teuchos::NO_TRANS,(SC)1.0,(SC)0.0); - - // Use AMG directly as an iterative method - { - X->putScalar( (SC) 0.0); - - H->Iterate(*RHS,*X,its); - - X->norm2(norms); - if (comm->getRank() == 0) - out << "||X_" << std::setprecision(2) << its << "|| = " << std::setiosflags(std::ios::fixed) << std::setprecision(10) << norms[0] << std::endl; - results[run] = norms[0]; - } - } - - TEST_FLOATING_EQUALITY(results[0], results[1], 100*TMT::eps()); // check results of EPETRA vs TPETRA - } // comm->getSize == 1 - - } // TentativePFactory_EpetraVsTpetra -#endif #endif #define MUELU_ETI_GROUP(SC, LO, GO, NO) \ diff --git a/packages/muelu/test/vardofpernode/VarDofDriver.cpp b/packages/muelu/test/vardofpernode/VarDofDriver.cpp index 736509df1610..7222cf9b0f94 100644 --- a/packages/muelu/test/vardofpernode/VarDofDriver.cpp +++ b/packages/muelu/test/vardofpernode/VarDofDriver.cpp @@ -437,11 +437,7 @@ int main(int argc, char* argv[]) { Xpetra::UnderlyingLib lib = xpetraParameters.GetLib(); if (lib == Xpetra::UseEpetra) { -#ifdef HAVE_MUELU_EPETRA - return main_(clp, lib, argc, argv); -#else throw MueLu::Exceptions::RuntimeError("Epetra is not available"); -#endif } if (lib == Xpetra::UseTpetra) { diff --git a/packages/muelu/test/viz/CMakeLists.txt b/packages/muelu/test/viz/CMakeLists.txt index 572cc5972964..ca5186f45e4e 100644 --- a/packages/muelu/test/viz/CMakeLists.txt +++ b/packages/muelu/test/viz/CMakeLists.txt @@ -1,9 +1,7 @@ # Ensure that these cmake boolean variables are defined ASSERT_DEFINED( - ${PACKAGE_NAME}_ENABLE_Amesos ${PACKAGE_NAME}_ENABLE_Amesos2 ${PACKAGE_NAME}_ENABLE_Belos - ${PACKAGE_NAME}_ENABLE_Epetra ) # @@ -91,27 +89,6 @@ IF (${PACKAGE_NAME}_ENABLE_Ifpack2 AND ${PACKAGE_NAME}_ENABLE_Amesos2) COMM serial mpi ) - # Test Epetra variant, too. - IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PACKAGE_NAME}_ENABLE_EpetraExt AND ${PACKAGE_NAME}_ENABLE_Ifpack AND ${PACKAGE_NAME}_ENABLE_Amesos AND (NOT Xpetra_INT_LONG_LONG)) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Viz - NAME "Viz3DEpetra" - ARGS "--matrixType=Laplace3D --nx=20 --ny=20 --nz=20 --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - MUELU_ADD_SERIAL_AND_MPI_TEST( - Viz - NAME "Viz2DEpetra" - ARGS "--matrixType=Laplace2D --nx=40 --ny=40 --linAlgebra=Epetra" - NUM_MPI_PROCS 4 - COMM serial mpi - ) - - ENDIF() #endif Epetra - ENDIF() ENDIF() diff --git a/packages/xpetra/example/MueLu_MatrixDriverTests.cpp b/packages/xpetra/example/MueLu_MatrixDriverTests.cpp index c124d2d77d26..2fd673e6642b 100644 --- a/packages/xpetra/example/MueLu_MatrixDriverTests.cpp +++ b/packages/xpetra/example/MueLu_MatrixDriverTests.cpp @@ -27,17 +27,10 @@ #include "Xpetra_Map.hpp" #include "Xpetra_CrsMatrix.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" #include "Xpetra_TpetraCrsMatrix.hpp" #include "Tpetra_Map.hpp" #include "Tpetra_CrsMatrix.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif // Define data types typedef double SC; @@ -69,68 +62,33 @@ int main(int argc, char* argv[]) { RCP out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); -#ifdef HAVE_XPETRA_TPETRA // Tpetra::CrsMatrix { RCP > map = rcp(new Tpetra::Map(numGlobalElements, indexBase, comm)); RCP > A = MueLu::Gallery::CreateCrsMatrix, Tpetra::CrsMatrix >(matrixType, map, matrixList); A->describe(*out, Teuchos::VERB_EXTREME); } -#endif -#ifdef HAVE_XPETRA_TPETRA // Xpetra::TpetraCrsMatrix { RCP > map = rcp(new Xpetra::TpetraMap(numGlobalElements, indexBase, comm)); RCP > A = MueLu::Gallery::CreateCrsMatrix, Xpetra::TpetraCrsMatrix >(matrixType, map, matrixList); A->describe(*out, Teuchos::VERB_EXTREME); } -#endif - -#ifdef HAVE_XPETRA_EPETRA - // Xpetra::EpetraCrsMatrix - { - RCP map = rcp(new Xpetra::EpetraMap(numGlobalElements, indexBase, comm)); - RCP A = MueLu::Gallery::CreateCrsMatrix(matrixType, map, matrixList); - A->describe(*out, Teuchos::VERB_EXTREME); - } -#endif -#ifdef HAVE_XPETRA_TPETRA // Xpetra::CrsMatrix (Tpetra) { RCP > map = rcp(new Xpetra::TpetraMap(numGlobalElements, indexBase, comm)); RCP > A = MueLu::Gallery::CreateCrsMatrix, Xpetra::CrsMatrix >(matrixType, map, matrixList); A->describe(*out, Teuchos::VERB_EXTREME); } -#endif -#ifdef HAVE_XPETRA_EPETRA - // Xpetra::CrsMatrix (Epetra) - { - RCP > map = rcp(new Xpetra::EpetraMap(numGlobalElements, indexBase, comm)); - RCP > A = MueLu::Gallery::CreateCrsMatrix, Xpetra::CrsMatrix >(matrixType, map, matrixList); - A->describe(*out, Teuchos::VERB_EXTREME); - } -#endif - -#ifdef HAVE_XPETRA_TPETRA // Xpetra::Matrix (Tpetra) { RCP > map = rcp(new Xpetra::TpetraMap(numGlobalElements, indexBase, comm)); RCP > A = MueLu::Gallery::CreateCrsMatrix, Xpetra::Matrix >(matrixType, map, matrixList); A->describe(*out, Teuchos::VERB_EXTREME); } -#endif - -#ifdef HAVE_XPETRA_EPETRA - // Xpetra::Matrix (Epetra) - { - RCP > map = rcp(new Xpetra::EpetraMap(numGlobalElements, indexBase, comm)); - RCP > A = MueLu::Gallery::CreateCrsMatrix, Xpetra::Matrix >(matrixType, map, matrixList); - A->describe(*out, Teuchos::VERB_EXTREME); - } -#endif return EXIT_SUCCESS; } diff --git a/packages/xpetra/example/Simple/Laplace1D-Xpetra.cpp b/packages/xpetra/example/Simple/Laplace1D-Xpetra.cpp index 45dc67b673a4..13b54c0b584c 100644 --- a/packages/xpetra/example/Simple/Laplace1D-Xpetra.cpp +++ b/packages/xpetra/example/Simple/Laplace1D-Xpetra.cpp @@ -19,8 +19,6 @@ #include #include -#ifdef HAVE_XPETRA_TPETRA - #include #if ((defined(HAVE_TPETRA_INST_OPENMP) || defined(HAVE_TPETRA_INST_SERIAL)) && \ @@ -93,9 +91,3 @@ int main(int argc, char *argv[]) { return EXIT_SUCCESS; } #endif // Tpetra instantiated on SC=double, GO=int/long long and Node=Serial/OpenMP -#else -int main(int argc, char *argv[]) { - std::cout << "Xpetra has been compiled without Tpetra support. Skip example." << std::endl; - return EXIT_SUCCESS; -} -#endif // HAVE_XPETRA_TPETRA diff --git a/packages/xpetra/example/Xpetra_Example_Comm.cpp b/packages/xpetra/example/Xpetra_Example_Comm.cpp deleted file mode 100644 index fda115e48938..000000000000 --- a/packages/xpetra/example/Xpetra_Example_Comm.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include - -#include -#include -#include - -#include - -#include "Teuchos_DefaultSerialComm.hpp" -#include "Tpetra_Core.hpp" - -// This driver simply tests Teuchos2Epetra_Comm - -int main(int argc, char** argv) { - typedef int Ordinal; - typedef double Scalar; - - using namespace Teuchos; - - oblackholestream blackhole; - GlobalMPISession mpiSession(&argc, &argv, &blackhole); - - { - RCP > serialTeuchosComm = rcp(new SerialComm); - RCP > teuchosComm = rcp_implicit_cast >(serialTeuchosComm); - RCP epetraComm = Teuchos2Epetra_Comm(teuchosComm); - - assert(epetraComm != Teuchos::null); - } - - { - RCP > teuchosComm = Tpetra::getDefaultComm(); - RCP epetraComm = Teuchos2Epetra_Comm(teuchosComm); - - assert(epetraComm != Teuchos::null); - } - - return (0); -} // main diff --git a/packages/xpetra/src/BlockedMap/Xpetra_BlockedMap_decl.hpp b/packages/xpetra/src/BlockedMap/Xpetra_BlockedMap_decl.hpp index c56685221392..ba6f7a52008d 100644 --- a/packages/xpetra/src/BlockedMap/Xpetra_BlockedMap_decl.hpp +++ b/packages/xpetra/src/BlockedMap/Xpetra_BlockedMap_decl.hpp @@ -231,18 +231,11 @@ class BlockedMap : public Map { /// returns map index in map extractor which contains GID size_t getMapIndexForGID(GlobalOrdinal gid) const; -#ifdef HAVE_XPETRA_TPETRA using local_map_type = typename Xpetra::Map::local_map_type; /// \brief Get the local Map for Kokkos kernels. local_map_type getLocalMap() const { return fullmap_->getLocalMap(); } -#else // HAVE_XPETRA_TPETRA -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif // __GNUC__ -#endif // #else !HAVE_XPETRA_TPETRA - //@} //! @name Overridden from Teuchos::Describable diff --git a/packages/xpetra/src/CrsGraph/Xpetra_CrsGraph.hpp b/packages/xpetra/src/CrsGraph/Xpetra_CrsGraph.hpp index c32b38cedf9a..361f43ec6371 100644 --- a/packages/xpetra/src/CrsGraph/Xpetra_CrsGraph.hpp +++ b/packages/xpetra/src/CrsGraph/Xpetra_CrsGraph.hpp @@ -20,9 +20,7 @@ #include "Xpetra_Map.hpp" -#ifdef HAVE_XPETRA_TPETRA #include -#endif namespace Xpetra { @@ -191,7 +189,6 @@ class CrsGraph //! @name Tpetra-specific routines //@{ -#ifdef HAVE_XPETRA_TPETRA typedef typename node_type::execution_space execution_space; typedef typename node_type::device_type device_type; typedef Kokkos::StaticCrsGraph local_graph_type; @@ -209,12 +206,6 @@ class CrsGraph //! Get offsets of the diagonal entries in the matrix. virtual void getLocalDiagOffsets(const Kokkos::View &offsets) const = 0; -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - //@} //! @name Overridden from Teuchos::Describable diff --git a/packages/xpetra/src/CrsGraph/Xpetra_CrsGraphFactory.hpp b/packages/xpetra/src/CrsGraph/Xpetra_CrsGraphFactory.hpp index 68b1d76adfa5..00a7ff5fa087 100644 --- a/packages/xpetra/src/CrsGraph/Xpetra_CrsGraphFactory.hpp +++ b/packages/xpetra/src/CrsGraph/Xpetra_CrsGraphFactory.hpp @@ -14,13 +14,7 @@ #include "Xpetra_CrsGraph.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraCrsGraph.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsGraph.hpp" -#endif #include "Xpetra_Exceptions.hpp" @@ -40,10 +34,8 @@ class CrsGraphFactory { Build(const RCP>& rowMap) { TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() == UseEpetra, std::logic_error, "Can't create Xpetra::EpetraCrsMatrix with these scalar/LO/GO types"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsGraph(rowMap, 0)); -#endif XPETRA_FACTORY_END; } @@ -53,10 +45,8 @@ class CrsGraphFactory { Build(const Teuchos::RCP>& map, size_t maxNumEntriesPerRow) { XPETRA_MONITOR("CrsGraphFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (map->lib() == UseTpetra) return rcp(new TpetraCrsGraph(map, maxNumEntriesPerRow)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(map->lib()); XPETRA_FACTORY_END; @@ -71,10 +61,8 @@ class CrsGraphFactory { const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsGraphFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsGraph(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -89,10 +77,8 @@ class CrsGraphFactory { const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsGraphFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsGraph(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -106,17 +92,14 @@ class CrsGraphFactory { const RCP>& domainMap = Teuchos::null, const RCP>& rangeMap = Teuchos::null, const RCP& params = Teuchos::null) { -#ifdef HAVE_XPETRA_TPETRA if (sourceGraph->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsGraph(sourceGraph, importer, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(sourceGraph()->getRowMap()->lib()); XPETRA_FACTORY_END; TEUCHOS_UNREACHABLE_RETURN(null); } -#ifdef HAVE_XPETRA_TPETRA /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. /// /// @@ -231,7 +214,6 @@ class CrsGraphFactory { XPETRA_FACTORY_END; } -#endif /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. /// @@ -272,512 +254,8 @@ class CrsGraphFactory { }; // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)) - -template <> -class CrsGraphFactory { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - CrsGraphFactory() {} - - public: - //! Constructor for empty graph (intended use is an import/export target - can't insert entries directly) - static RCP> - Build(const RCP>& rowMap) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, 0)); -#endif -#ifdef HAVE_XPETRA_EPETRA - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap)); -#endif - XPETRA_FACTORY_END; - } - - static RCP> - Build(const Teuchos::RCP>& map, size_t maxNumEntriesPerRow) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(map, maxNumEntriesPerRow)); -#endif - - if (map->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(map, maxNumEntriesPerRow)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - //! Constructor specifying column Map and number of entries per row - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - size_t maxNumEntriesPerRow, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap, colMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - //! Constructor using fused import - static Teuchos::RCP> - Build(const RCP>& sourceGraph, - const Import& importer, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const RCP& params = Teuchos::null) { -#ifdef HAVE_XPETRA_TPETRA - if (sourceGraph->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(sourceGraph, importer, domainMap, rangeMap, params)); -#endif - if (sourceGraph->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(sourceGraph, importer, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsGraph::local_graph_type::row_map_type& rowPointers, - const typename Xpetra::CrsGraph::local_graph_type::entries_type::non_const_type& columnIndices, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - rowPointers, - columnIndices, - plist)); - - XPETRA_FACTORY_END; - } - - /// \brief Constructor specifying column Map and a local (sorted) - /// graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsGraph::local_graph_type& lclGraph, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - lclGraph, - params)); - - XPETRA_FACTORY_END; - } - - /// \brief Constructor specifying column, domain and range maps, and a - /// local (sorted) graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param domainMap [in] The graph's domain Map. MUST be one to - /// one! - /// - /// \param rangeMap [in] The graph's range Map. MUST be one to - /// one! May be, but need not be, the same as the domain Map. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const typename Xpetra::CrsGraph::local_graph_type& lclGraph, - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::RCP>& domainMap = Teuchos::null, - const Teuchos::RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(lclGraph, - rowMap, - colMap, - domainMap, - rangeMap, - params)); - - XPETRA_FACTORY_END; - } -#endif - - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::ArrayRCP& rowPointers, - const Teuchos::ArrayRCP& columnIndices, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - rowPointers, - columnIndices, - plist)); - - XPETRA_FACTORY_END; - } -}; -#endif // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)) - -template <> -class CrsGraphFactory { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - CrsGraphFactory() {} - - public: - //! Constructor for empty graph (intended use is an import/export target - can't insert entries directly) - static RCP> - Build(const RCP>& rowMap) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, 0)); -#endif -#ifdef HAVE_XPETRA_EPETRA - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap)); -#endif - XPETRA_FACTORY_END; - } - - static RCP> - Build(const Teuchos::RCP>& map, size_t maxNumEntriesPerRow) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(map, maxNumEntriesPerRow)); -#endif - - if (map->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(map, maxNumEntriesPerRow)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - //! Constructor specifying column Map and number of entries per row - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - size_t maxNumEntriesPerRow, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsGraphFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsGraphT(rowMap, colMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - - //! Constructor using fused import - static Teuchos::RCP> - Build(const RCP>& sourceGraph, - const Import& importer, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const RCP& params = Teuchos::null) { -#ifdef HAVE_XPETRA_TPETRA - if (sourceGraph->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(sourceGraph, importer, domainMap, rangeMap, params)); -#endif - if (sourceGraph->getRowMap()->lib() == UseTpetra) - return rcp(new EpetraCrsGraphT(sourceGraph, importer, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - TEUCHOS_UNREACHABLE_RETURN(null); - } - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsGraph::local_graph_type::row_map_type& rowPointers, - const typename Xpetra::CrsGraph::local_graph_type::entries_type::non_const_type& columnIndices, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - rowPointers, - columnIndices, - plist)); - - XPETRA_FACTORY_END; - } - - /// \brief Constructor specifying column Map and a local (sorted) - /// graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsGraph::local_graph_type& lclGraph, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - lclGraph, - params)); - - XPETRA_FACTORY_END; - } - - /// \brief Constructor specifying column, domain and range maps, and a - /// local (sorted) graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param domainMap [in] The graph's domain Map. MUST be one to - /// one! - /// - /// \param rangeMap [in] The graph's range Map. MUST be one to - /// one! May be, but need not be, the same as the domain Map. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const typename Xpetra::CrsGraph::local_graph_type& lclGraph, - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::RCP>& domainMap = Teuchos::null, - const Teuchos::RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(lclGraph, - rowMap, - colMap, - domainMap, - rangeMap, - params)); - - XPETRA_FACTORY_END; - } -#endif - - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - static Teuchos::RCP> - Build(const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::ArrayRCP& rowPointers, - const Teuchos::ArrayRCP& columnIndices, - const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsGraph(rowMap, - colMap, - rowPointers, - columnIndices, - plist)); - - XPETRA_FACTORY_END; - } -}; -#endif } // namespace Xpetra #define XPETRA_CRSGRAPHFACTORY_SHORT diff --git a/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.cpp b/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.cpp deleted file mode 100644 index c2458d244625..000000000000 --- a/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.cpp +++ /dev/null @@ -1,126 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraCrsGraph.hpp" - -#include "Xpetra_Exceptions.hpp" -#include "Xpetra_Utils.hpp" -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_EpetraImport.hpp" - -namespace Xpetra { - -// TODO: move that elsewhere -template -const Epetra_CrsGraph &toEpetra(const RCP > &graph) { - XPETRA_RCP_DYNAMIC_CAST(const EpetraCrsGraphT, graph, epetraGraph, "toEpetra"); - return *(epetraGraph->getEpetra_CrsGraph()); -} - -// TODO: move that elsewhere -template -RCP > -toXpetra(const Epetra_CrsGraph &g) { - RCP const_graph = rcp(new Epetra_CrsGraph(g)); - RCP graph = - Teuchos::rcp_const_cast(const_graph); - return rcp(new Xpetra::EpetraCrsGraphT(graph)); -} - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraCrsGraphT; -template RCP > toXpetra(const Epetra_CrsGraph &g); -template const Epetra_CrsGraph &toEpetra(const RCP > &graph); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.hpp b/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.hpp deleted file mode 100644 index 738fc85e61a9..000000000000 --- a/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.hpp +++ /dev/null @@ -1,1505 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRACRSGRAPH_HPP -#define XPETRA_EPETRACRSGRAPH_HPP - -/* this file is automatically generated - do not edit (see script/epetra.py) */ - -#include "Xpetra_EpetraConfigDefs.hpp" -#include "Xpetra_Exceptions.hpp" - -#include "Xpetra_CrsGraph.hpp" - -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraUtils.hpp" - -#include - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/CrsGraph/Xpetra_EpetraCrsGraph.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED RCP> -toXpetra(const Epetra_CrsGraph &graph); - -template -XPETRA_DEPRECATED const Epetra_CrsGraph & -toEpetra(const RCP> &graph); - -template -class XPETRA_DEPRECATED EpetraCrsGraphT - : public CrsGraph { - typedef int LocalOrdinal; - - //! The specialization of Map used by this class. - typedef Map map_type; - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsGraph::local_graph_type local_graph_type; - typedef typename Xpetra::CrsGraph::node_type node_type; - typedef typename node_type::execution_space execution_space; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - //! Constructor for empty DynamicProfile graph (no space is preallocated). - EpetraCrsGraphT(const RCP &rowMap, const RCP &plist = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor specifying fixed number of entries for each row. - EpetraCrsGraphT(const RCP &rowMap, size_t maxNumEntriesPerRow, const RCP &plist = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP &plist = null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - ////! Constructor specifying column Map and number of entries in each row. - // Definition not in cpp, so comment out - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP ¶ms = null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - // Constructor for fused import - EpetraCrsGraphT(const RCP> &sourceGraph, - const Import &importer, - const RCP> &domainMap = Teuchos::null, - const RCP> &rangeMap = Teuchos::null, - const RCP ¶ms = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - -#ifdef HAVE_XPETRA_TPETRA - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> &rowMap, - const RCP> &colMap, - const typename local_graph_type::row_map_type &rowPointers, - const typename local_graph_type::entries_type::non_const_type &columnIndices, - const RCP &plist = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> &rowMap, - const RCP> &colMap, - const local_graph_type &lclGraph, - const RCP &plist = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const local_graph_type &lclGraph, - const RCP> &rowMap, - const RCP> &colMap, - const Teuchos::RCP &domainMap = Teuchos::null, - const Teuchos::RCP &rangeMap = Teuchos::null, - const RCP &plist = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } -#endif - - //! Destructor. - virtual ~EpetraCrsGraphT() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert global indices into the graph. - void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView &indices) {} - - //! Insert local indices into the graph. - void insertLocalIndices(const LocalOrdinal localRow, const ArrayView &indices) {} - - //! Remove all graph indices from the specified local row. - void removeLocalIndices(LocalOrdinal localRow) {} - - //! Allocates the 1D pointer arrays of the graph - void allocateAllIndices(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind) {} - - //! Sets the 1D pointer arrays of the graph. - void setAllIndices(const ArrayRCP &rowptr, const ArrayRCP &colind) {} - - //! Gets the 1D pointer arrays of the graph. - void getAllIndices(ArrayRCP &rowptr, ArrayRCP &colind) const {} - - //@} - - //! @name Transformational Methods - //@{ - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP> &domainMap, const RCP> &rangeMap, const RCP ¶ms = null) {} - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) {} - - //! Expert version of fillComplete - void - expertStaticFillComplete(const Teuchos::RCP> &domainMap, - const Teuchos::RCP> &rangeMap, - const Teuchos::RCP> &importer = - Teuchos::null, - const Teuchos::RCP> &exporter = - Teuchos::null, - const Teuchos::RCP ¶ms = - Teuchos::null) {} - - //@} - - //! @name Methods implementing RowGraph. - //@{ - - //! Returns the communicator. - RCP> getComm() const { - return Teuchos::null; - } - - //! Returns the Map that describes the row distribution in this graph. - RCP> getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this graph. - RCP> getColMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP> getDomainMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP> getRangeMap() const { return Teuchos::null; } - - //! Returns the importer associated with this graph. - RCP> getImporter() const { return Teuchos::null; } - - //! Returns the exporter associated with this graph. - RCP> getExporter() const { return Teuchos::null; } - - //! Returns the number of global rows in the graph. - global_size_t getGlobalNumRows() const { return 0; } - - //! Returns the number of global columns in the graph. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of graph rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this graph. - size_t getLocalNumCols() const { return 0; } - - //! Returns the index base for global indices for this graph. - GlobalOrdinal getIndexBase() const { return 0; } - - //! Returns the global number of entries in the graph. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in the graph. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of allocated entries for this node in the specified global row . - size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of allocated entries on this node in the specified local row. - size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Maximum number of entries in all rows over all processes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Maximum number of entries in all rows owned by the calling process. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! Whether the graph has a column Map. - bool hasColMap() const { return false; } - - //! Whether column indices are stored using local indices on the calling process. - bool isLocallyIndexed() const { return false; } - - //! Whether column indices are stored using global indices on the calling process. - bool isGloballyIndexed() const { return false; } - - //! Whether fillComplete() has been called and the graph is in compute mode. - bool isFillComplete() const { return false; } - - //! Returns true if storage has been optimized. - bool isStorageOptimized() const { return false; } - - //! Return a const, nonpersisting view of global indices in the given row. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &Indices) const {} - - //! Return a const, nonpersisting view of local indices in the given row. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices) const {} - -#ifdef HAVE_XPETRA_TPETRA - typename local_graph_type::HostMirror getLocalGraphHost() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - TEUCHOS_UNREACHABLE_RETURN((typename local_graph_type::HostMirror())); - } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - -#ifdef HAVE_XPETRA_TPETRA - local_graph_type getLocalGraphDevice() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - TEUCHOS_UNREACHABLE_RETURN((local_graph_type())); - } - - void getLocalDiagOffsets(const Kokkos::View &offsets) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support getLocalDiagOffsets!"); - } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif - -#endif - - //! Force the computation of global constants if we don't have them - void computeGlobalConstants() {} - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP> getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object - EpetraCrsGraphT(const Teuchos::RCP &graph) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Get the underlying Epetra graph - RCP getEpetra_CrsGraph() const { return Teuchos::null; } - - //@} - - private: -}; // EpetraCrsGraphT class - -// specialization on GO=int and Node=EpetraNode -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraCrsGraphT - : public virtual CrsGraph { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsGraph::local_graph_type local_graph_type; - typedef typename Xpetra::CrsGraph::node_type node_type; - typedef typename node_type::execution_space execution_space; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor for empty DynamicProfile graph (no space is preallocated). - EpetraCrsGraphT(const Teuchos::RCP> &rowMap) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), 0, false))) {} - - //! Constructor specifying fixed number of entries for each row. - EpetraCrsGraphT(const RCP &rowMap, size_t maxNumEntriesPerRow, const RCP & /* plist */ = Teuchos::null) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), maxNumEntriesPerRow, true))) {} - - ////! Constructor specifying (possibly different) number of entries in each row. - // Definition not in cpp, so comment out - // EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const RCP< ParameterList > ¶ms=null); - - //! Constructor specifying column Map and fixed number of entries for each row. - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = null) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), toEpetra(colMap), maxNumEntriesPerRow, true))) {} - - ////! Constructor specifying column Map and number of entries in each row. - // Definition not in cpp, so comment out - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP & /* params */ = null) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - graph_ = Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - - // Constructor for fused import - EpetraCrsGraphT(const RCP> &sourceGraph, - const Import &importer, - const RCP> &domainMap = Teuchos::null, - const RCP> &rangeMap = Teuchos::null, - const RCP ¶ms = Teuchos::null) { - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, *sourceGraph, tSourceGraph, "Xpetra::EpetraCrsGraphT() only accepts Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - RCP eSourceGraph = tSourceGraph.getEpetra_CrsGraph(); - - // NOTE: Unlike Tpetra, Epetra does not have a FusedTransfer for Graphs. So we do this the slow way - graph_ = Teuchos::rcp(new Epetra_CrsGraph(Copy, eSourceGraph->RowMap(), 0, false)); - graph_->Import(*eSourceGraph, *tImporter.getEpetra_Import(), Insert); - - const Epetra_BlockMap &myDomainMap = domainMap != Teuchos::null ? toEpetra(domainMap) : eSourceGraph->ColMap(); - const Epetra_BlockMap &myRangeMap = rangeMap != Teuchos::null ? toEpetra(rangeMap) : toEpetra(importer.getTargetMap()); - - graph_->FillComplete(myDomainMap, myRangeMap); - } - -#ifdef HAVE_XPETRA_TPETRA - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const typename local_graph_type::row_map_type & /* rowPointers */, - const typename local_graph_type::entries_type::non_const_type & /* columnIndices */, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using Kokkos Views!"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const local_graph_type & /* lclGraph */, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using a local graph!"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const local_graph_type & /* lclGraph */, - const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const Teuchos::RCP & /* domainMap */ = Teuchos::null, - const Teuchos::RCP & /* rangeMap */ = Teuchos::null, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using a local graph!"); - } -#endif - - //! Destructor. - virtual ~EpetraCrsGraphT() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert global indices into the graph. - void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView &indices) { - XPETRA_MONITOR("EpetraCrsGraphT::insertGlobalIndices"); - - GlobalOrdinal *indices_rawPtr = const_cast(indices.getRawPtr()); // there is no const in the Epetra interface :( - XPETRA_ERR_CHECK(graph_->InsertGlobalIndices(globalRow, indices.size(), indices_rawPtr)); - } - - //! Insert local indices into the graph. - void insertLocalIndices(const LocalOrdinal localRow, const ArrayView &indices) { - XPETRA_MONITOR("EpetraCrsGraphT::insertLocalIndices"); - - int *indices_rawPtr = const_cast(indices.getRawPtr()); // there is no const in the Epetra interface :( - XPETRA_ERR_CHECK(graph_->InsertMyIndices(localRow, indices.size(), indices_rawPtr)); - } - - //! Remove all graph indices from the specified local row. - void removeLocalIndices(LocalOrdinal localRow) { - XPETRA_MONITOR("EpetraCrsGraphT::removeLocalIndices"); - graph_->RemoveMyIndices(localRow); - } - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllIndices(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind) { - XPETRA_MONITOR("EpetraCrsGraphT::allocateAllIndies"); - - // Row offsets - // Unfortunately, we cannot do this in the same manner as column indices - // and values (see below). The problem is that Tpetra insists on using - // size_t, and Epetra uses int internally. So we only resize here, and - // will need to copy in setAllValues - rowptr.resize(getLocalNumRows() + 1); - - int lowerOffset = 0; - bool ownMemory = false; - - // Column indices - // Extract, resize, set colind - Epetra_IntSerialDenseVector &myColind = graph_->ExpertExtractIndices(); - myColind.Resize(numNonZeros); - colind = Teuchos::arcp(myColind.Values(), lowerOffset, numNonZeros, ownMemory); - } - - //! Sets the 1D pointer arrays of the graph. - void setAllIndices(const ArrayRCP &rowptr, const ArrayRCP &colind) { - XPETRA_MONITOR("EpetraCrsGraphT::setAllIndices"); - - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(rowptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - if (colind.size() > 0) { - TEUCHOS_TEST_FOR_EXCEPTION(colind.getRawPtr() != graph_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllIndices - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = graph_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(rowptr[i]); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllIndices(ArrayRCP &rowptr, ArrayRCP &colind) const { - XPETRA_MONITOR("EpetraCrsGraphT::getAllIndices"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t n = getLocalNumRows(); - const size_t nnz = getLocalNumEntries(); - - // Row offsets - // We have to make a copy here, it is unavoidable (see comments in allocateAllValues) - Epetra_IntSerialDenseVector &myRowptr = graph_->ExpertExtractIndexOffset(); - rowptr.resize(n + 1); - for (size_t i = 0; i < n + 1; i++) - (*const_cast(&rowptr[i])) = Teuchos::as(myRowptr[i]); - - // Column indices - colind = Teuchos::arcp(graph_->ExpertExtractIndices().Values(), lowerOffset, nnz, ownMemory); - } - - //@} - - //! @name Transformational Methods - //@{ - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP> &domainMap, const RCP> &rangeMap, const RCP ¶ms = null) { - XPETRA_MONITOR("EpetraCrsGraphT::fillComplete"); - - graph_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap)); - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - if (doOptimizeStorage) graph_->OptimizeStorage(); - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) { - XPETRA_MONITOR("EpetraCrsGraphT::fillComplete"); - - graph_->FillComplete(); - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - if (doOptimizeStorage) graph_->OptimizeStorage(); - } - - //! Expert version of fillComplete - void - expertStaticFillComplete(const Teuchos::RCP> &domainMap, - const Teuchos::RCP> &rangeMap, - const Teuchos::RCP> &importer = - Teuchos::null, - const Teuchos::RCP> &exporter = - Teuchos::null, - const Teuchos::RCP ¶ms = - Teuchos::null) { - // Not optimized - graph_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap)); - graph_->OptimizeStorage(); - } - - //@} - - //! @name Methods implementing RowGraph. - //@{ - - //! Returns the communicator. - RCP> getComm() const { - XPETRA_MONITOR("EpetraCrsGraphT::getComm"); - return toXpetra(graph_->Comm()); - } - - //! Returns the Map that describes the row distribution in this graph. - RCP> getRowMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getRowMap"); - return toXpetra(graph_->RowMap()); - } - - //! Returns the Map that describes the column distribution in this graph. - RCP> getColMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getColMap"); - return toXpetra(graph_->ColMap()); - } - - //! Returns the Map associated with the domain of this graph. - RCP> getDomainMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getDomainMap"); - return toXpetra(graph_->DomainMap()); - } - - //! Returns the Map associated with the domain of this graph. - RCP> getRangeMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getRangeMap"); - return toXpetra(graph_->RangeMap()); - } - - //! Returns the importer associated with this graph. - RCP> getImporter() const { - XPETRA_MONITOR("EpetraCrsGraphT::getImporter"); - return toXpetra(graph_->Importer()); - } - - //! Returns the exporter associated with this graph. - RCP> getExporter() const { - XPETRA_MONITOR("EpetraCrsGraphT::getExporter"); - return toXpetra(graph_->Exporter()); - } - - //! Returns the number of global rows in the graph. - global_size_t getGlobalNumRows() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumRows"); - return graph_->NumGlobalRows64(); - } - - //! Returns the number of global columns in the graph. - global_size_t getGlobalNumCols() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumCols"); - return graph_->NumGlobalCols64(); - } - - //! Returns the number of graph rows owned on the calling node. - size_t getLocalNumRows() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumRows"); - return graph_->NumMyRows(); - } - - //! Returns the number of columns connected to the locally owned rows of this graph. - size_t getLocalNumCols() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumCols"); - return graph_->NumMyCols(); - } - - //! Returns the index base for global indices for this graph. - GlobalOrdinal getIndexBase() const { - XPETRA_MONITOR("EpetraCrsGraphT::getIndexBase"); - return (GlobalOrdinal)graph_->IndexBase64(); - } - - //! Returns the global number of entries in the graph. - global_size_t getGlobalNumEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumEntries"); - return graph_->NumGlobalEntries64(); - } - - //! Returns the local number of entries in the graph. - size_t getLocalNumEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumEntries"); - return graph_->NumMyEntries(); - } - - //! Returns the current number of entries on this node in the specified global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInGlobalRow"); - return graph_->NumGlobalIndices(globalRow); - } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInLocalRow"); - return graph_->NumMyIndices(localRow); - } - - //! Returns the current number of allocated entries for this node in the specified global row . - size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInGlobalRow"); - return graph_->NumAllocatedGlobalIndices(globalRow); - } - - //! Returns the current number of allocated entries on this node in the specified local row. - size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInLocalRow"); - return graph_->NumAllocatedMyIndices(localRow); - } - - //! Maximum number of entries in all rows over all processes. - size_t getGlobalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalMaxNumRowEntries"); - return graph_->GlobalMaxNumIndices(); - } - - //! Maximum number of entries in all rows owned by the calling process. - size_t getLocalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalMaxNumRowEntries"); - return graph_->MaxNumIndices(); - } - - //! Whether the graph has a column Map. - bool hasColMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::hasColMap"); - return graph_->HaveColMap(); - } - - //! Whether column indices are stored using local indices on the calling process. - bool isLocallyIndexed() const { - XPETRA_MONITOR("EpetraCrsGraphT::isLocallyIndexed"); - return graph_->IndicesAreLocal(); - } - - //! Whether column indices are stored using global indices on the calling process. - bool isGloballyIndexed() const { - XPETRA_MONITOR("EpetraCrsGraphT::isGloballyIndexed"); - return graph_->IndicesAreGlobal(); - } - - //! Whether fillComplete() has been called and the graph is in compute mode. - bool isFillComplete() const { - XPETRA_MONITOR("EpetraCrsGraphT::isFillComplete"); - return graph_->Filled(); - } - - //! Returns true if storage has been optimized. - bool isStorageOptimized() const { - XPETRA_MONITOR("EpetraCrsGraphT::isStorageOptimized"); - return graph_->StorageOptimized(); - } - - //! Return a const, nonpersisting view of global indices in the given row. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &Indices) const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalRowView"); - - int numEntries; - GlobalOrdinal *eIndices; - - XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices)); - if (numEntries == 0) { - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - Indices = ArrayView(eIndices, numEntries); - } - - //! Return a const, nonpersisting view of local indices in the given row. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices) const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalRowView"); - - int numEntries; - int *eIndices; - - XPETRA_ERR_CHECK(graph_->ExtractMyRowView(LocalRow, numEntries, eIndices)); - if (numEntries == 0) { - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - } - -#ifdef HAVE_XPETRA_TPETRA - typename local_graph_type::HostMirror getLocalGraphHost() const { - RCP graph = Teuchos::rcp_const_cast(getEpetra_CrsGraph()); - - using local_graph_type_host = typename local_graph_type::HostMirror; - - const int numRows = graph->NumMyRows(); - const int nnz = graph->NumMyNonzeros(); - - TEUCHOS_TEST_FOR_EXCEPTION(!graph->StorageOptimized(), std::runtime_error, "Xpetra::CrsGraph<>::getLocalGraph: Epetra_CrsGraph not StorageOptimized"); - const int *rowptr = graph->ExpertExtractIndexOffset().Values(); - int *colind = graph->ExpertExtractIndices().Values(); - - // Transform int* rowptr array to size_type* array - typename local_graph_type_host::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_graph_type_host::entries_type kokkosColind(colind, nnz); - - local_graph_type_host localGraph = local_graph_type_host(kokkosColind, kokkosRowPtr); - - return localGraph; - } - - local_graph_type getLocalGraphDevice() const { - RCP graph = Teuchos::rcp_const_cast(getEpetra_CrsGraph()); - - const int numRows = graph->NumMyRows(); - const int nnz = graph->NumMyNonzeros(); - - TEUCHOS_TEST_FOR_EXCEPTION(!graph->StorageOptimized(), std::runtime_error, "Xpetra::CrsGraph<>::getLocalGraph: Epetra_CrsGraph not StorageOptimized"); - const int *rowptr = graph->ExpertExtractIndexOffset().Values(); - int *colind = graph->ExpertExtractIndices().Values(); - - // Transform int* rowptr array to size_type* array - typename local_graph_type::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_graph_type::entries_type kokkosColind(colind, nnz); - - local_graph_type localGraph = local_graph_type(kokkosColind, kokkosRowPtr); - - return localGraph; - } - - void getLocalDiagOffsets(const Kokkos::View &offsets) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support getLocalDiagOffsets!"); - } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - //! Force the computation of global constants if we don't have them - void computeGlobalConstants() {} - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraCrsGraphT::description"); - return "NotImplemented"; - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel /* verbLevel */ = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraCrsGraphT::describe"); - - out << "EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl; - const Epetra_BlockMap rowmap = graph_->RowMap(); - if (rowmap.Comm().MyPID() == 0) out << "** EpetraCrsGraphT **\n\nrowmap" << std::endl; - rowmap.Print(out); - graph_->Print(out); - } - - //@} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP> getMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getMap"); - return toXpetra(graph_->Map()); - } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsGraph(); - int err = graph_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsGraph(); - int err = graph_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsGraph(); - int err = graph_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsGraph(); - int err = graph_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object - EpetraCrsGraphT(const Teuchos::RCP &graph) - : graph_(graph) { - TEUCHOS_TEST_FOR_EXCEPTION(!graph->RowMap().GlobalIndicesIsType(), std::runtime_error, "Xpetra::EpetraCrsGraphT: GlobalOrdinal mismatch."); - } - - //! Get the underlying Epetra graph - RCP getEpetra_CrsGraph() const { return graph_; } - - //@} - - private: - RCP graph_; -}; - -#endif // specialization on Node=EpetraNode and GO=int - -// specialization on GO=long long and Node=EpetraNode -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraCrsGraphT - : public virtual CrsGraph { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsGraph::local_graph_type local_graph_type; - typedef typename Xpetra::CrsGraph::node_type node_type; - typedef typename node_type::execution_space execution_space; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor for empty DynamicProfile graph (no space is preallocated). - EpetraCrsGraphT(const Teuchos::RCP> &rowMap) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), 0, false))) {} - - //! Constructor specifying fixed number of entries for each row. - EpetraCrsGraphT(const RCP &rowMap, size_t maxNumEntriesPerRow, const RCP & /* plist */ = Teuchos::null) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), maxNumEntriesPerRow, true))) {} - - ////! Constructor specifying (possibly different) number of entries in each row. - // Definition not in cpp, so comment out - // EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const RCP< ParameterList > ¶ms=null); - - //! Constructor specifying column Map and fixed number of entries for each row. - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = null) - : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), toEpetra(colMap), maxNumEntriesPerRow, true))) {} - - ////! Constructor specifying column Map and number of entries in each row. - // Definition not in cpp, so comment out - EpetraCrsGraphT(const RCP> &rowMap, const RCP> &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP & /* params */ = null) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - graph_ = Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - -#ifdef HAVE_XPETRA_TPETRA - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const typename local_graph_type::row_map_type & /* rowPointers */, - const typename local_graph_type::entries_type::non_const_type & /* columnIndices */, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using Kokkos Views!"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const local_graph_type & /* lclGraph */, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using a local graph!"); - } - - //! Constructor specifying column Map, number of entries in each row and column indices in each row. - EpetraCrsGraphT(const local_graph_type & /* lclGraph */, - const RCP> & /* rowMap */, - const RCP> & /* colMap */, - const Teuchos::RCP & /* domainMap */ = Teuchos::null, - const Teuchos::RCP & /* rangeMap */ = Teuchos::null, - const RCP & /* plist */ = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Epetra does not support CrsGraph constructors using a local graph!"); - } -#endif - - //! Destructor. - virtual ~EpetraCrsGraphT() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert global indices into the graph. - void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView &indices) { - XPETRA_MONITOR("EpetraCrsGraphT::insertGlobalIndices"); - - GlobalOrdinal *indices_rawPtr = const_cast(indices.getRawPtr()); // there is no const in the Epetra interface :( - XPETRA_ERR_CHECK(graph_->InsertGlobalIndices(globalRow, indices.size(), indices_rawPtr)); - } - - //! Insert local indices into the graph. - void insertLocalIndices(const LocalOrdinal localRow, const ArrayView &indices) { - XPETRA_MONITOR("EpetraCrsGraphT::insertLocalIndices"); - - int *indices_rawPtr = const_cast(indices.getRawPtr()); // there is no const in the Epetra interface :( - XPETRA_ERR_CHECK(graph_->InsertMyIndices(localRow, indices.size(), indices_rawPtr)); - } - - //! Remove all graph indices from the specified local row. - void removeLocalIndices(LocalOrdinal localRow) { - XPETRA_MONITOR("EpetraCrsGraphT::removeLocalIndices"); - graph_->RemoveMyIndices(localRow); - } - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllIndices(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind) { - XPETRA_MONITOR("EpetraCrsGraphT::allocateAllIndies"); - - // Row offsets - // Unfortunately, we cannot do this in the same manner as column indices - // and values (see below). The problem is that Tpetra insists on using - // size_t, and Epetra uses int internally. So we only resize here, and - // will need to copy in setAllValues - rowptr.resize(getLocalNumRows() + 1); - - int lowerOffset = 0; - bool ownMemory = false; - - // Column indices - // Extract, resize, set colind - Epetra_IntSerialDenseVector &myColind = graph_->ExpertExtractIndices(); - myColind.Resize(numNonZeros); - colind = Teuchos::arcp(myColind.Values(), lowerOffset, numNonZeros, ownMemory); - } - - //! Sets the 1D pointer arrays of the graph. - void setAllIndices(const ArrayRCP &rowptr, const ArrayRCP &colind) { - XPETRA_MONITOR("EpetraCrsGraphT::setAllIndices"); - - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(rowptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - if (colind.size() > 0) { - TEUCHOS_TEST_FOR_EXCEPTION(colind.getRawPtr() != graph_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllIndices - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = graph_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(rowptr[i]); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllIndices(ArrayRCP &rowptr, ArrayRCP &colind) const { - XPETRA_MONITOR("EpetraCrsGraphT::getAllIndices"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t n = getLocalNumRows(); - const size_t nnz = getLocalNumEntries(); - - // Row offsets - // We have to make a copy here, it is unavoidable (see comments in allocateAllValues) - Epetra_IntSerialDenseVector &myRowptr = graph_->ExpertExtractIndexOffset(); - rowptr.resize(n + 1); - for (size_t i = 0; i < n + 1; i++) - (*const_cast(&rowptr[i])) = Teuchos::as(myRowptr[i]); - - // Column indices - colind = Teuchos::arcp(graph_->ExpertExtractIndices().Values(), lowerOffset, nnz, ownMemory); - } - - //@} - - //! @name Transformational Methods - //@{ - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP> &domainMap, const RCP> &rangeMap, const RCP ¶ms = null) { - XPETRA_MONITOR("EpetraCrsGraphT::fillComplete"); - - graph_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap)); - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - if (doOptimizeStorage) graph_->OptimizeStorage(); - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) { - XPETRA_MONITOR("EpetraCrsGraphT::fillComplete"); - - graph_->FillComplete(); - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - if (doOptimizeStorage) graph_->OptimizeStorage(); - } - - //! Expert version of fillComplete - void - expertStaticFillComplete(const Teuchos::RCP> &domainMap, - const Teuchos::RCP> &rangeMap, - const Teuchos::RCP> &importer = - Teuchos::null, - const Teuchos::RCP> &exporter = - Teuchos::null, - const Teuchos::RCP ¶ms = - Teuchos::null) { - // Not optimized - graph_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap)); - graph_->OptimizeStorage(); - } - - //@} - - //! @name Methods implementing RowGraph. - //@{ - - //! Returns the communicator. - RCP> getComm() const { - XPETRA_MONITOR("EpetraCrsGraphT::getComm"); - return toXpetra(graph_->Comm()); - } - - //! Returns the Map that describes the row distribution in this graph. - RCP> getRowMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getRowMap"); - return toXpetra(graph_->RowMap()); - } - - //! Returns the Map that describes the column distribution in this graph. - RCP> getColMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getColMap"); - return toXpetra(graph_->ColMap()); - } - - //! Returns the Map associated with the domain of this graph. - RCP> getDomainMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getDomainMap"); - return toXpetra(graph_->DomainMap()); - } - - //! Returns the Map associated with the domain of this graph. - RCP> getRangeMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getRangeMap"); - return toXpetra(graph_->RangeMap()); - } - - //! Returns the importer associated with this graph. - RCP> getImporter() const { - XPETRA_MONITOR("EpetraCrsGraphT::getImporter"); - return toXpetra(graph_->Importer()); - } - - //! Returns the exporter associated with this graph. - RCP> getExporter() const { - XPETRA_MONITOR("EpetraCrsGraphT::getExporter"); - return toXpetra(graph_->Exporter()); - } - - //! Returns the number of global rows in the graph. - global_size_t getGlobalNumRows() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumRows"); - return graph_->NumGlobalRows64(); - } - - //! Returns the number of global columns in the graph. - global_size_t getGlobalNumCols() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumCols"); - return graph_->NumGlobalCols64(); - } - - //! Returns the number of graph rows owned on the calling node. - size_t getLocalNumRows() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumRows"); - return graph_->NumMyRows(); - } - - //! Returns the number of columns connected to the locally owned rows of this graph. - size_t getLocalNumCols() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumCols"); - return graph_->NumMyCols(); - } - - //! Returns the index base for global indices for this graph. - GlobalOrdinal getIndexBase() const { - XPETRA_MONITOR("EpetraCrsGraphT::getIndexBase"); - return (GlobalOrdinal)graph_->IndexBase64(); - } - - //! Returns the global number of entries in the graph. - global_size_t getGlobalNumEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumEntries"); - return graph_->NumGlobalEntries64(); - } - - //! Returns the local number of entries in the graph. - size_t getLocalNumEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalNumEntries"); - return graph_->NumMyEntries(); - } - - //! Returns the current number of entries on this node in the specified global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInGlobalRow"); - return graph_->NumGlobalIndices(globalRow); - } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInLocalRow"); - return graph_->NumMyIndices(localRow); - } - - //! Returns the current number of allocated entries for this node in the specified global row . - size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInGlobalRow"); - return graph_->NumAllocatedGlobalIndices(globalRow); - } - - //! Returns the current number of allocated entries on this node in the specified local row. - size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInLocalRow"); - return graph_->NumAllocatedMyIndices(localRow); - } - - //! Maximum number of entries in all rows over all processes. - size_t getGlobalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalMaxNumRowEntries"); - return graph_->GlobalMaxNumIndices(); - } - - //! Maximum number of entries in all rows owned by the calling process. - size_t getLocalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalMaxNumRowEntries"); - return graph_->MaxNumIndices(); - } - - //! Whether the graph has a column Map. - bool hasColMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::hasColMap"); - return graph_->HaveColMap(); - } - - //! Whether column indices are stored using local indices on the calling process. - bool isLocallyIndexed() const { - XPETRA_MONITOR("EpetraCrsGraphT::isLocallyIndexed"); - return graph_->IndicesAreLocal(); - } - - //! Whether column indices are stored using global indices on the calling process. - bool isGloballyIndexed() const { - XPETRA_MONITOR("EpetraCrsGraphT::isGloballyIndexed"); - return graph_->IndicesAreGlobal(); - } - - //! Whether fillComplete() has been called and the graph is in compute mode. - bool isFillComplete() const { - XPETRA_MONITOR("EpetraCrsGraphT::isFillComplete"); - return graph_->Filled(); - } - - //! Returns true if storage has been optimized. - bool isStorageOptimized() const { - XPETRA_MONITOR("EpetraCrsGraphT::isStorageOptimized"); - return graph_->StorageOptimized(); - } - - //! Return a const, nonpersisting view of global indices in the given row. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &Indices) const { - XPETRA_MONITOR("EpetraCrsGraphT::getGlobalRowView"); - - int numEntries; - GlobalOrdinal *eIndices; - - XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices)); - if (numEntries == 0) { - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - Indices = ArrayView(eIndices, numEntries); - } - - //! Return a const, nonpersisting view of local indices in the given row. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices) const { - XPETRA_MONITOR("EpetraCrsGraphT::getLocalRowView"); - - int numEntries; - int *eIndices; - - XPETRA_ERR_CHECK(graph_->ExtractMyRowView(LocalRow, numEntries, eIndices)); - if (numEntries == 0) { - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - } - -#ifdef HAVE_XPETRA_TPETRA - typename local_graph_type::HostMirror getLocalGraphHost() const { - RCP graph = Teuchos::rcp_const_cast(getEpetra_CrsGraph()); - - using local_graph_type_host = typename local_graph_type::HostMirror; - - const int numRows = graph->NumMyRows(); - const int nnz = graph->NumMyNonzeros(); - - TEUCHOS_TEST_FOR_EXCEPTION(!graph->StorageOptimized(), std::runtime_error, "Xpetra::CrsGraph<>::getLocalGraph: Epetra_CrsGraph not StorageOptimized"); - const int *rowptr = graph->ExpertExtractIndexOffset().Values(); - int *colind = graph->ExpertExtractIndices().Values(); - - // Transform int* rowptr array to size_type* array - typename local_graph_type_host::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_graph_type_host::entries_type kokkosColind(colind, nnz); - - local_graph_type_host localGraph = local_graph_type_host(kokkosColind, kokkosRowPtr); - - return localGraph; - } - - local_graph_type getLocalGraphDevice() const { - RCP graph = Teuchos::rcp_const_cast(getEpetra_CrsGraph()); - - const int numRows = graph->NumMyRows(); - const int nnz = graph->NumMyNonzeros(); - - TEUCHOS_TEST_FOR_EXCEPTION(!graph->StorageOptimized(), std::runtime_error, "Xpetra::CrsGraph<>::getLocalGraph: Epetra_CrsGraph not StorageOptimized"); - const int *rowptr = graph->ExpertExtractIndexOffset().Values(); - int *colind = graph->ExpertExtractIndices().Values(); - - // Transform int* rowptr array to size_type* array - typename local_graph_type::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_graph_type::entries_type kokkosColind(colind, nnz); - - local_graph_type localGraph = local_graph_type(kokkosColind, kokkosRowPtr); - - return localGraph; - } - - void getLocalDiagOffsets(const Kokkos::View &offsets) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support getLocalDiagOffsets!"); - } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - //! Force the computation of global constants if we don't have them - void computeGlobalConstants() {} - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraCrsGraphT::description"); - return "NotImplemented"; - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel /* verbLevel */ = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraCrsGraphT::describe"); - - out << "EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl; - const Epetra_BlockMap rowmap = graph_->RowMap(); - if (rowmap.Comm().MyPID() == 0) out << "** EpetraCrsGraphT **\n\nrowmap" << std::endl; - rowmap.Print(out); - graph_->Print(out); - } - - //@} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP> getMap() const { - XPETRA_MONITOR("EpetraCrsGraphT::getMap"); - return toXpetra(graph_->Map()); - } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsGraph(); - int err = graph_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsGraph(); - int err = graph_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsGraph(); - int err = graph_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsGraphT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsGraph(); - int err = graph_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object - EpetraCrsGraphT(const Teuchos::RCP &graph) - : graph_(graph) { - TEUCHOS_TEST_FOR_EXCEPTION(!graph->RowMap().GlobalIndicesIsType(), std::runtime_error, "Xpetra::EpetraCrsGraphT: GlobalOrdinal mismatch."); - } - - //! Get the underlying Epetra graph - RCP getEpetra_CrsGraph() const { return graph_; } - - //@} - - private: - RCP graph_; -}; -#endif // specialization on Node=EpetraNode and GO=int - -} // namespace Xpetra - -#endif // XPETRA_EPETRACRSGRAPH_HPP diff --git a/packages/xpetra/src/CrsGraph/Xpetra_TpetraCrsGraph_def.hpp b/packages/xpetra/src/CrsGraph/Xpetra_TpetraCrsGraph_def.hpp index 4e7eb0a697bc..b88f9a023d61 100644 --- a/packages/xpetra/src/CrsGraph/Xpetra_TpetraCrsGraph_def.hpp +++ b/packages/xpetra/src/CrsGraph/Xpetra_TpetraCrsGraph_def.hpp @@ -432,715 +432,5 @@ TpetraCrsGraph::TpetraCrsGraph(const Teuchos: template RCP > TpetraCrsGraph::getTpetra_CrsGraph() const { return graph_; } -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization of TpetraCrsGraph for GO=LO=int -template <> -class TpetraCrsGraph - : public CrsGraph { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - // The following typedef is used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraCrsGraph TpetraCrsGraphClass; - typedef Map map_type; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor specifying fixed number of entries for each row. - TpetraCrsGraph(const RCP &rowMap, size_t maxNumEntriesPerRow, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying (possibly different) number of entries in each row. - TpetraCrsGraph(const RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - TpetraCrsGraph(const RCP > &rowMap, const RCP > &colMap, size_t maxNumEntriesPerRow, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and number of entries in each row. - TpetraCrsGraph(const RCP > &rowMap, const RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "int", typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const typename local_graph_type::row_map_type &rowPointers, - const typename local_graph_type::entries_type::non_const_type &columnIndices, - const Teuchos::RCP &plist = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column Map and a local (sorted) - /// graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const Teuchos::RCP &rowMap, - const Teuchos::RCP &colMap, - const local_graph_type &lclGraph, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column, domain and range maps, and a - /// local (sorted) graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param domainMap [in] The graph's domain Map. MUST be one to - /// one! - /// - /// \param rangeMap [in] The graph's range Map. MUST be one to - /// one! May be, but need not be, the same as the domain Map. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const local_graph_type &lclGraph, - const Teuchos::RCP &rowMap, - const Teuchos::RCP &colMap, - const Teuchos::RCP &domainMap = Teuchos::null, - const Teuchos::RCP &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Destructor. - virtual ~TpetraCrsGraph() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert global indices into the graph. - void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView &indices) {} - - //! Insert local indices into the graph. - void insertLocalIndices(const LocalOrdinal localRow, const ArrayView &indices) {} - - //! Remove all graph indices from the specified local row. - void removeLocalIndices(LocalOrdinal localRow) {} - - //! Allocates the 1D pointer arrays of the graph - void allocateAllIndices(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind) {} - - //! Sets the 1D pointer arrays of the graph. - void setAllIndices(const ArrayRCP &rowptr, const ArrayRCP &colind) {} - - //! Gets the 1D pointer arrays of the graph. - void getAllIndices(ArrayRCP &rowptr, ArrayRCP &colind) const {} - - //@} - - //! @name Transformational Methods - //@{ - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) {} - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) {} - - //! Expert version of fillComplete - void expertStaticFillComplete(const Teuchos::RCP &domainMap, - const Teuchos::RCP &rangeMap, - const Teuchos::RCP > &importer = null, - const Teuchos::RCP > &exporter = null, - const Teuchos::RCP ¶ms = null) {} - - //@} - - //! @name Methods implementing RowGraph. - //@{ - - //! Returns the communicator. - RCP > getComm() const { return Teuchos::null; } - - //! Returns the Map that describes the row distribution in this graph. - RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this graph. - RCP > getColMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP > getDomainMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP > getRangeMap() const { return Teuchos::null; } - - //! Returns the importer associated with this graph. - RCP > getImporter() const { return Teuchos::null; } - - //! Returns the exporter associated with this graph. - RCP > getExporter() const { return Teuchos::null; } - - //! Returns the number of global rows in the graph. - global_size_t getGlobalNumRows() const { return 0; } - - //! Returns the number of global columns in the graph. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of graph rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this graph. - size_t getLocalNumCols() const { return 0; } - - //! Returns the index base for global indices for this graph. - GlobalOrdinal getIndexBase() const { return 0; } - - //! Returns the global number of entries in the graph. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in the graph. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of allocated entries for this node in the specified global row . - size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of allocated entries on this node in the specified local row. - size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Maximum number of entries in all rows over all processes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Maximum number of entries in all rows owned by the calling process. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! Whether the graph has a column Map. - bool hasColMap() const { return false; } - - //! Whether column indices are stored using local indices on the calling process. - bool isLocallyIndexed() const { return false; } - - //! Whether column indices are stored using global indices on the calling process. - bool isGloballyIndexed() const { return false; } - - //! Whether fillComplete() has been called and the graph is in compute mode. - bool isFillComplete() const { return false; } - - //! Returns true if storage has been optimized. - bool isStorageOptimized() const { return false; } - - //! Return a const, nonpersisting view of global indices in the given row. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &Indices) const {} - - //! Return a const, nonpersisting view of local indices in the given row. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices) const {} - - /// \brief Access the local KokkosSparse::StaticCrsGraph data - local_graph_type getLocalGraph() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support Kokkos::StaticCrsGraph!"); - TEUCHOS_UNREACHABLE_RETURN((local_graph_type())); - } - - //! Dummy implementation for computeGlobalConstants - void computeGlobalConstants() {} - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Advanced methods, at increased risk of deprecation. - //@{ - - //! Get an ArrayRCP of the row-offsets. - ArrayRCP getNodeRowPtrs() const { return Teuchos::ArrayRCP(); } - - //@} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - // @} - - //! @name Xpetra specific - //@{ - - //! TpetraCrsGraph constructor to wrap a Tpetra::CrsGraph object - TpetraCrsGraph(const Teuchos::RCP > &graph) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "int", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra graph - RCP > getTpetra_CrsGraph() const { return Teuchos::null; } - - //@} -}; // TpetraCrsGraph class (specialization for LO=GO=int and NO=EpetraNode) -#endif - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// specialization of TpetraCrsGraph for GO=long long and NO=EpetraNode -template <> -class TpetraCrsGraph - : public CrsGraph { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - // The following typedef is used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraCrsGraph TpetraCrsGraphClass; - typedef Map map_type; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor specifying fixed number of entries for each row. - TpetraCrsGraph(const RCP &rowMap, size_t maxNumEntriesPerRow, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying (possibly different) number of entries in each row. - TpetraCrsGraph(const RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - TpetraCrsGraph(const RCP > &rowMap, const RCP > &colMap, size_t maxNumEntriesPerRow, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and number of entries in each row. - TpetraCrsGraph(const RCP > &rowMap, const RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "long long", typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const typename local_graph_type::row_map_type &rowPointers, - const typename local_graph_type::entries_type::non_const_type &columnIndices, - const Teuchos::RCP &plist = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column Map and a local (sorted) - /// graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const Teuchos::RCP &rowMap, - const Teuchos::RCP &colMap, - const local_graph_type &lclGraph, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column, domain and range maps, and a - /// local (sorted) graph, which the resulting CrsGraph views. - /// - /// Unlike most other CrsGraph constructors, successful completion - /// of this constructor will result in a fill-complete graph. - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param domainMap [in] The graph's domain Map. MUST be one to - /// one! - /// - /// \param rangeMap [in] The graph's range Map. MUST be one to - /// one! May be, but need not be, the same as the domain Map. - /// - /// \param lclGraph [in] A locally indexed Kokkos::StaticCrsGraph - /// whose local row indices come from the specified row Map, and - /// whose local column indices come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const local_graph_type &lclGraph, - const Teuchos::RCP &rowMap, - const Teuchos::RCP &colMap, - const Teuchos::RCP &domainMap = Teuchos::null, - const Teuchos::RCP &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying column Map and arrays containing the graph in sorted, local ids. - /// - /// - /// \param rowMap [in] Distribution of rows of the graph. - /// - /// \param colMap [in] Distribution of columns of the graph. - /// - /// \param rowPointers [in] The beginning of each row in the graph, - /// as in a CSR "rowptr" array. The length of this vector should be - /// equal to the number of rows in the graph, plus one. This last - /// entry should store the nunber of nonzeros in the graph. - /// - /// \param columnIndices [in] The local indices of the columns, - /// as in a CSR "colind" array. The length of this vector - /// should be equal to the number of unknowns in the graph. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsGraph(const Teuchos::RCP &rowMap, - const Teuchos::RCP &colMap, - const Teuchos::ArrayRCP &rowPointers, - const Teuchos::ArrayRCP &columnIndices, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), - typeid(TpetraCrsGraph).name(), - "int", - typeid(EpetraNode).name()) - } - - //! Destructor. - virtual ~TpetraCrsGraph() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert global indices into the graph. - void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView &indices) {} - - //! Insert local indices into the graph. - void insertLocalIndices(const LocalOrdinal localRow, const ArrayView &indices) {} - - //! Remove all graph indices from the specified local row. - void removeLocalIndices(LocalOrdinal localRow) {} - - //! Allocates the 1D pointer arrays of the graph - void allocateAllIndices(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind) {} - - //! Sets the 1D pointer arrays of the graph. - void setAllIndices(const ArrayRCP &rowptr, const ArrayRCP &colind) {} - - //! Gets the 1D pointer arrays of the graph. - void getAllIndices(ArrayRCP &rowptr, ArrayRCP &colind) const {} - - //@} - - //! @name Transformational Methods - //@{ - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) {} - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) {} - - //! Expert version of fillComplete - void expertStaticFillComplete(const Teuchos::RCP &domainMap, - const Teuchos::RCP &rangeMap, - const Teuchos::RCP > &importer = null, - const Teuchos::RCP > &exporter = null, - const Teuchos::RCP ¶ms = null) {} - - //@} - - //! @name Methods implementing RowGraph. - //@{ - - //! Returns the communicator. - RCP > getComm() const { return Teuchos::null; } - - //! Returns the Map that describes the row distribution in this graph. - RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this graph. - RCP > getColMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP > getDomainMap() const { return Teuchos::null; } - - //! Returns the Map associated with the domain of this graph. - RCP > getRangeMap() const { return Teuchos::null; } - - //! Returns the importer associated with this graph. - RCP > getImporter() const { return Teuchos::null; } - - //! Returns the exporter associated with this graph. - RCP > getExporter() const { return Teuchos::null; } - - //! Returns the number of global rows in the graph. - global_size_t getGlobalNumRows() const { return 0; } - - //! Returns the number of global columns in the graph. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of graph rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this graph. - size_t getLocalNumCols() const { return 0; } - - //! Returns the index base for global indices for this graph. - GlobalOrdinal getIndexBase() const { return 0; } - - //! Returns the global number of entries in the graph. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in the graph. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of allocated entries for this node in the specified global row . - size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the current number of allocated entries on this node in the specified local row. - size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Maximum number of entries in all rows over all processes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Maximum number of entries in all rows owned by the calling process. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! Whether the graph has a column Map. - bool hasColMap() const { return false; } - - //! Whether column indices are stored using local indices on the calling process. - bool isLocallyIndexed() const { return false; } - - //! Whether column indices are stored using global indices on the calling process. - bool isGloballyIndexed() const { return false; } - - //! Whether fillComplete() has been called and the graph is in compute mode. - bool isFillComplete() const { return false; } - - //! Returns true if storage has been optimized. - bool isStorageOptimized() const { return false; } - - //! Return a const, nonpersisting view of global indices in the given row. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &Indices) const {} - - //! Return a const, nonpersisting view of local indices in the given row. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices) const {} - - local_graph_type getLocalGraphDevice() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support Kokkos::StaticCrsGraph!"); - TEUCHOS_UNREACHABLE_RETURN((local_graph_type())); - } - - void getLocalDiagOffsets(const Kokkos::View &offsets) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support getLocalDiagOffsets!"); - } - - typename local_graph_type::HostMirror getLocalGraphHost() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Epetra does not support Kokkos::StaticCrsGraph!"); - TEUCHOS_UNREACHABLE_RETURN((local_graph_type::HostMirror())); - } - - //! Dummy implementation for computeGlobalConstants - void computeGlobalConstants() {} - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Advanced methods, at increased risk of deprecation. - //@{ - - //! Get an ArrayRCP of the row-offsets. - ArrayRCP getNodeRowPtrs() const { return Teuchos::ArrayRCP(); } - - //@} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - // @} - - //! @name Xpetra specific - //@{ - - //! TpetraCrsGraph constructor to wrap a Tpetra::CrsGraph object - TpetraCrsGraph(const Teuchos::RCP > &graph) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsGraph).name(), typeid(TpetraCrsGraph).name(), "long long", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra graph - RCP > getTpetra_CrsGraph() const { return Teuchos::null; } - - //@} -}; // TpetraCrsGraph class (specialization for GO=long long and NO=EpetraNode) -#endif - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #endif // XPETRA_TPETRACRSGRAPH_DEF_HPP diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrix.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrix.hpp index 6269ca9bb38c..175314ea220b 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrix.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrix.hpp @@ -19,10 +19,8 @@ #include "Xpetra_CrsGraph.hpp" #include "Xpetra_Vector.hpp" -#ifdef HAVE_XPETRA_TPETRA #include #include -#endif namespace Xpetra { @@ -272,7 +270,6 @@ class CrsMatrix //! @name Xpetra-specific routines //@{ -#ifdef HAVE_XPETRA_TPETRA using impl_scalar_type = typename Kokkos::ArithTraits::val_type; using execution_space = typename node_type::device_type; @@ -294,11 +291,6 @@ class CrsMatrix virtual void setAllValues(const typename local_matrix_type::row_map_type &ptr, const typename local_graph_type::entries_type::non_const_type &ind, const typename local_matrix_type::values_type &val) = 0; -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif //@} diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrixFactory.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrixFactory.hpp index 06e1e14aec57..1f664b4a6ad0 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrixFactory.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_CrsMatrixFactory.hpp @@ -14,14 +14,8 @@ #include "Xpetra_CrsMatrix.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraCrsMatrix.hpp" #include "Xpetra_TpetraBlockCrsMatrix.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif #include "Xpetra_Exceptions.hpp" @@ -42,10 +36,8 @@ class CrsMatrixFactory { Build(const RCP>& rowMap) { TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() == UseEpetra, std::logic_error, "Can't create Xpetra::EpetraCrsMatrix with these scalar/LO/GO types"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(rowMap, 0)); -#endif XPETRA_FACTORY_END; } @@ -57,10 +49,8 @@ class CrsMatrixFactory { const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return Teuchos::rcp(new TpetraCrsMatrix(rowMap, maxNumEntriesPerRow, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -71,10 +61,8 @@ class CrsMatrixFactory { Build(const Teuchos::RCP>& rowMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return Teuchos::rcp(new TpetraCrsMatrix(rowMap, NumEntriesPerRowToAlloc, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -88,10 +76,8 @@ class CrsMatrixFactory { const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -101,10 +87,8 @@ class CrsMatrixFactory { static RCP> Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -114,10 +98,8 @@ class CrsMatrixFactory { static RCP> Build(const Teuchos::RCP>& graph, const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (graph->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(graph, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(graph->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -127,10 +109,8 @@ class CrsMatrixFactory { static RCP> Build(const Teuchos::RCP>& graph, typename Xpetra::CrsMatrix::local_matrix_type::values_type& values, const Teuchos::RCP& plist = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (graph->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(graph, values, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(graph->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -144,10 +124,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (sourceMatrix->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(sourceMatrix, importer, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(sourceMatrix->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -161,10 +139,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params = Teuchos::null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (sourceMatrix->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(sourceMatrix, exporter, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(sourceMatrix->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -179,10 +155,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (sourceMatrix->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(sourceMatrix, RowImporter, DomainImporter, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(sourceMatrix->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -197,10 +171,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (sourceMatrix->getRowMap()->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(sourceMatrix, RowExporter, DomainExporter, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(sourceMatrix->getRowMap()->lib()); XPETRA_FACTORY_END; @@ -213,10 +185,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params = null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(rowMap, colMap, lclMatrix, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -231,10 +201,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params = null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(lclMatrix, rowMap, colMap, domainMap, rangeMap, params)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(rowMap->lib()); XPETRA_FACTORY_END; @@ -251,10 +219,8 @@ class CrsMatrixFactory { const Teuchos::RCP& params = null) { XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (rowMap->lib() == UseTpetra) return rcp(new TpetraCrsMatrix(lclMatrix, rowMap, colMap, domainMap, rangeMap, importer, exporter, params)); -#endif TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() == UseEpetra, std::logic_error, "Epetra doesn't support this matrix constructor"); @@ -269,11 +235,9 @@ class CrsMatrixFactory { LocalOrdinal blockSize) { XPETRA_MONITOR("CrsMatrixFactory::BuildBlock"); -#ifdef HAVE_XPETRA_TPETRA if (domainMap->lib() == UseTpetra) { return rcp(new Xpetra::TpetraBlockCrsMatrix(blockGraph, domainMap, rangeMap, blockSize)); } -#endif TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() == UseEpetra, std::logic_error, "Epetra doesn't support this matrix constructor"); XPETRA_FACTORY_END; @@ -281,536 +245,8 @@ class CrsMatrixFactory { }; // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)) - -// Specializtion for SC=double, LO=int, GO=int and Node=EpetraNode -// Used both for Epetra and Tpetra -template <> -class CrsMatrixFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - CrsMatrixFactory() {} - - public: - //! Constructor for empty matrix (intended use is an import/export target - can't insert entries directly) - static RCP> - Build(const RCP>& rowMap) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, 0)); -#endif - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap)); - - XPETRA_FACTORY_END; - } - - static RCP> Build(const RCP>& rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, maxNumEntriesPerRow, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - } - - static RCP> Build(const Teuchos::RCP>& rowMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying column Map and fixed number of entries for each row. - static RCP> Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying column Map and number of entries in each row. - static RCP> Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying a previously constructed graph. - static RCP> Build(const Teuchos::RCP>& graph, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (graph->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(graph, plist)); -#endif - - if (graph->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(graph, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying a previously constructed graph and values array - static RCP> Build(const Teuchos::RCP>& graph, typename Xpetra::CrsMatrix::local_matrix_type::values_type& values, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (graph->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(graph, values, plist)); -#endif - - XPETRA_FACTORY_ERROR_IF_EPETRA(graph->getRowMap()->lib()); - XPETRA_FACTORY_END; - } - - //! Constructor using FusedImport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Import& importer, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, importer, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, importer, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedExport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Export& exporter, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, exporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, exporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedImport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Import& RowImporter, - const RCP> DomainImporter, - const RCP>& domainMap, - const RCP>& rangeMap, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, RowImporter, DomainImporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, RowImporter, DomainImporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedExport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Export& RowExporter, - const RCP> DomainExporter, - const RCP>& domainMap, - const RCP>& rangeMap, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, RowExporter, DomainExporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, RowExporter, DomainExporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - static RCP> Build( - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsMatrix::local_matrix_type& lclMatrix, - const Teuchos::RCP& params = null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, lclMatrix, params)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, lclMatrix, params)); - - XPETRA_FACTORY_END; - } - - static RCP> Build( - const typename Xpetra::CrsMatrix::local_matrix_type& lclMatrix, - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::RCP>& domainMap = Teuchos::null, - const Teuchos::RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(lclMatrix, rowMap, colMap, domainMap, rangeMap, params)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(lclMatrix, rowMap, colMap, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - static RCP> Build( - const typename Xpetra::CrsMatrix::local_matrix_type& lclMatrix, - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::RCP>& domainMap, - const Teuchos::RCP>& rangeMap, - const Teuchos::RCP>& importer, - const Teuchos::RCP>& exporter, - const Teuchos::RCP& params = null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(lclMatrix, rowMap, colMap, domainMap, rangeMap, importer, exporter, params)); -#endif - - TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() == UseEpetra, std::logic_error, "Epetra doesn't support this matrix constructor"); - - XPETRA_FACTORY_END; - } - - //! Build a BlockCrsMatrix - static RCP> BuildBlock( - const Teuchos::RCP>& blockGraph, - const Teuchos::RCP>& domainMap, - const Teuchos::RCP>& rangeMap, - LocalOrdinal blockSize) { - XPETRA_MONITOR("CrsMatrixFactory::BuildBlock"); -#ifdef HAVE_XPETRA_TPETRA - if (domainMap->lib() == UseTpetra) - return rcp(new Xpetra::TpetraBlockCrsMatrix(blockGraph, domainMap, rangeMap, blockSize)); -#endif - TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() == UseEpetra, std::logic_error, "Epetra doesn't support this matrix constructor"); - - XPETRA_FACTORY_END; - } -}; -#endif // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)) - -template <> -class CrsMatrixFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - CrsMatrixFactory() {} - - public: - //! Constructor for empty matrix (intended use is an import/export target - can't insert entries directly) - static RCP> - Build(const RCP>& rowMap) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, 0)); -#endif -#ifdef HAVE_XPETRA_EPETRA - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, 0)); -#endif - XPETRA_FACTORY_END; - } - - static RCP> Build(const RCP>& rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, maxNumEntriesPerRow, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - } - - static RCP> Build(const Teuchos::RCP>& rowMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying column Map and fixed number of entries for each row. - static RCP> Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, maxNumEntriesPerRow, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, maxNumEntriesPerRow, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying column Map and number of entries in each row. - static RCP> Build(const Teuchos::RCP>& rowMap, const Teuchos::RCP>& colMap, const ArrayRCP& NumEntriesPerRowToAlloc, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, NumEntriesPerRowToAlloc, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying a previously constructed graph. - static RCP> Build(const Teuchos::RCP>& graph, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (graph->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(graph, plist)); -#endif - - if (graph->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(graph, plist)); - - XPETRA_FACTORY_END; - } - - //! Constructor specifying a previously constructed graph and values array - static RCP> Build(const Teuchos::RCP>& graph, typename Xpetra::CrsMatrix::local_matrix_type::values_type& values, const Teuchos::RCP& plist = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (graph->getRowMap()->lib() == UseTpetra) { - return rcp(new TpetraCrsMatrix(graph, values, plist)); - } -#endif - - XPETRA_FACTORY_ERROR_IF_EPETRA(graph->getRowMap()->lib()); - XPETRA_FACTORY_END; - } - - //! Constructor using FusedImport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Import& importer, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, importer, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, importer, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedExport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Export& exporter, - const RCP>& domainMap = Teuchos::null, - const RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = Teuchos::null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, exporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, exporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedImport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Import& RowImporter, - const RCP> DomainImporter, - const RCP>& domainMap, - const RCP>& rangeMap, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, RowImporter, DomainImporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, RowImporter, DomainImporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Constructor using FusedExport - static RCP> Build( - const Teuchos::RCP>& sourceMatrix, - const Export& RowExporter, - const RCP> DomainExporter, - const RCP>& domainMap, - const RCP>& rangeMap, - const Teuchos::RCP& params) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (sourceMatrix->getRowMap()->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(sourceMatrix, RowExporter, DomainExporter, domainMap, rangeMap, params)); -#endif - - if (sourceMatrix->getRowMap()->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(sourceMatrix, RowExporter, DomainExporter, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - static RCP> Build( - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const typename Xpetra::CrsMatrix::local_matrix_type& lclMatrix, - const Teuchos::RCP& params = null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(rowMap, colMap, lclMatrix, params)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(rowMap, colMap, lclMatrix, params)); - - XPETRA_FACTORY_END; - } - static RCP> Build( - const typename Xpetra::CrsMatrix::local_matrix_type& lclMatrix, - const Teuchos::RCP>& rowMap, - const Teuchos::RCP>& colMap, - const Teuchos::RCP>& domainMap = Teuchos::null, - const Teuchos::RCP>& rangeMap = Teuchos::null, - const Teuchos::RCP& params = null) { - XPETRA_MONITOR("CrsMatrixFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (rowMap->lib() == UseTpetra) - return rcp(new TpetraCrsMatrix(lclMatrix, rowMap, colMap, domainMap, rangeMap, params)); -#endif - - if (rowMap->lib() == UseEpetra) - return rcp(new EpetraCrsMatrixT(lclMatrix, rowMap, colMap, domainMap, rangeMap, params)); - - XPETRA_FACTORY_END; - } - - //! Build a BlockCrsMatrix - static RCP> BuildBlock( - const Teuchos::RCP>& blockGraph, - const Teuchos::RCP>& domainMap, - const Teuchos::RCP>& rangeMap, - LocalOrdinal blockSize) { - XPETRA_MONITOR("CrsMatrixFactory::BuildBlock"); - -#ifdef HAVE_XPETRA_TPETRA - if (domainMap->lib() == UseTpetra) { - return rcp(new Xpetra::TpetraBlockCrsMatrix(blockGraph, domainMap, rangemap, blockSize)); - } -#endif - TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() == UseEpetra, std::logic_error, "Epetra doesn't support this matrix constructor"); - - XPETRA_FACTORY_END; - } -}; -#endif } // namespace Xpetra diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.cpp b/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.cpp deleted file mode 100644 index 666055e8a218..000000000000 --- a/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include "Xpetra_EpetraCrsMatrix.hpp" - -namespace Xpetra { - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraCrsMatrixT; -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraCrsMatrixT; -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraCrsMatrixT; -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraCrsMatrixT; -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraCrsMatrixT; -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraCrsMatrixT; -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraCrsMatrixT; -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.hpp deleted file mode 100644 index 432aabdf338d..000000000000 --- a/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.hpp +++ /dev/null @@ -1,2447 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRACRSMATRIX_HPP -#define XPETRA_EPETRACRSMATRIX_HPP - -/* this file is automatically generated - do not edit (see script/epetra.py) */ - -#ifdef HAVE_XPETRA_TPETRA -#include -#endif - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_CrsMatrix.hpp" - -#include -#include - -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraVector.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraCrsGraph.hpp" - -#include "Xpetra_MapFactory.hpp" - -#include "Xpetra_Utils.hpp" -#include "Xpetra_Exceptions.hpp" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/CrsMatrix/Xpetra_EpetraCrsMatrix.hpp is deprecated." -#endif - -namespace Xpetra { - -// general implementation: empty stub -template -class XPETRA_DEPRECATED EpetraCrsMatrixT - : public CrsMatrix { - typedef EpetraGlobalOrdinal GlobalOrdinal; - typedef typename CrsMatrix::scalar_type Scalar; - typedef typename CrsMatrix::local_ordinal_type LocalOrdinal; - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; - typedef typename Xpetra::CrsMatrix::node_type node_type; -#endif - - public: - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with Node=Tpetra::KokkosCompat::KokkosSerialWrapperNode."); } - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with Node=Tpetra::KokkosCompat::KokkosSerialWrapperNode."); } - EpetraCrsMatrixT(const Teuchos::RCP > &graph, const Teuchos::RCP ¶ms = Teuchos::null) { TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with Node=Tpetra::KokkosCompat::KokkosSerialWrapperNode."); } - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } -#ifdef HAVE_XPETRA_TPETRA - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const local_matrix_type &lclMatrix, - const Teuchos::RCP ¶ms = null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - EpetraCrsMatrixT( - const local_matrix_type &lclMatrix, - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP ¶ms = null) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } -#endif - virtual ~EpetraCrsMatrixT() {} - - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - void replaceLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - void setAllToScalar(const Scalar &alpha) {} - void scale(const Scalar &alpha) {} - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) {} - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) {} - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const {} - void getAllValues(ArrayRCP &values) {} - bool haveGlobalConstants() const { return true; } - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP ¶ms = Teuchos::null) {} - - void resumeFill(const RCP ¶ms = null) {} - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) {} - void fillComplete(const RCP ¶ms = null) {} - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) {} - const RCP > getComm() const { return Teuchos::null; } - const RCP > getRowMap() const { return Teuchos::null; } - const RCP > getColMap() const { return Teuchos::null; } - RCP > getCrsGraph() const { return Teuchos::null; } - global_size_t getGlobalNumRows() const { return 0; } - global_size_t getGlobalNumCols() const { return 0; } - size_t getLocalNumRows() const { return 0; } - size_t getLocalNumCols() const { return 0; } - global_size_t getGlobalNumEntries() const { return 0; } - size_t getLocalNumEntries() const { return 0; } - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - size_t getGlobalMaxNumRowEntries() const { return 0; } - size_t getLocalMaxNumRowEntries() const { return 0; } - bool isLocallyIndexed() const { return false; } - bool isGloballyIndexed() const { return false; } - bool isFillComplete() const { return false; } - bool isFillActive() const { return false; } - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { return ScalarTraits::magnitude(ScalarTraits::zero()); } - bool supportsRowViews() const { return false; } - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const {} - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const {} - void getLocalDiagCopy(Vector &diag) const {} - void getLocalDiagOffsets(Teuchos::ArrayRCP &offsets) const {} - void getLocalDiagCopy(Vector &diag, const Teuchos::ArrayView &offsets) const {} - void getLocalDiagCopy(Vector &diag, const Kokkos::View &offsets) const {} - void replaceDiag(const Vector &diag) {} - void leftScale(const Vector &x){}; - void rightScale(const Vector &x){}; - - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const {} - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP > ®ionInterfaceImporter, const Teuchos::ArrayRCP ®ionInterfaceLIDs) const {} - const RCP > getDomainMap() const { return Teuchos::null; } - const RCP > getRangeMap() const { return Teuchos::null; } - - std::string description() const { return std::string(""); } - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - void setObjectLabel(const std::string &objectLabel) {} - - EpetraCrsMatrixT(const EpetraCrsMatrixT &matrix) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - Teuchos::RCP > getMap() const { return Teuchos::null; } - void doImport(const DistObject &source, const Import &importer, CombineMode CM) {} - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) {} - - bool hasMatrix() const { return false; } - EpetraCrsMatrixT(const Teuchos::RCP &mtx) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - RCP getEpetra_CrsMatrix() const { return Teuchos::null; } - RCP getEpetra_CrsMatrixNonConst() const { return Teuchos::null; } // TODO: remove -#ifdef HAVE_XPETRA_TPETRA - local_matrix_type getLocalMatrixDevice() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - typename local_matrix_type::HostMirror getLocalMatrixHost() const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrix only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - LocalOrdinal GetStorageBlockSize() const { return 1; } - -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const { - Scalar one = Teuchos::ScalarTraits::one(), negone = -one; - apply(X, R); - R.update(one, B, negone); - } - -}; // EpetraCrsMatrixT class (specialization on GO=long, empty stub implementation) - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraCrsMatrixT - : public CrsMatrix { - typedef int GlobalOrdinal; - typedef EpetraNode Node; - typedef CrsMatrix::scalar_type Scalar; - typedef CrsMatrix::local_ordinal_type LocalOrdinal; - - // The following typedefs are used by the Kokkos interface -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; - typedef typename Xpetra::CrsMatrix::node_type node_type; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor for empty DynamicProfile matrix (no space is preallocated). - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), 0, false))) - , isFillResumed_(false) {} - - //! Constructor specifying fixed number of entries for each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), maxNumEntriesPerRow, true))) - , isFillResumed_(false) {} - - //! Constructor specifying (possibly different) number of entries in each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP & /* plist */ = Teuchos::null) - : isFillResumed_(false) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), maxNumEntriesPerRow, true))) - , isFillResumed_(false) {} - - //! Constructor specifying row and column Maps and number of entries in each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP & /* plist */ = Teuchos::null) - : isFillResumed_(false) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - - //! Constructor specifying a previously constructed graph. - EpetraCrsMatrixT(const Teuchos::RCP > &graph, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(graph)))) - , isFillResumed_(false) {} - - //! Constructor for a fused import - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tImporter.getEpetra_Import(), myDomainMap, myRangeMap, restrictComm)); - if (restrictComm && mtx_->NumMyRows() == 0) - mtx_ = Teuchos::null; - } - - //! Constructor for a fused export - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tExporter.getEpetra_Export(), myDomainMap, myRangeMap, restrictComm)); - } - - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, RowImporter, tImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - XPETRA_RCP_DYNAMIC_CAST(const EpetraImportT, DomainImporter, tdImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tImporter.getEpetra_Import(), tdImporter->getEpetra_Import().get(), myDomainMap, myRangeMap, restrictComm)); - if (restrictComm && mtx_->NumMyRows() == 0) - mtx_ = Teuchos::null; - } - - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, RowExporter, tExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - XPETRA_RCP_DYNAMIC_CAST(const EpetraExportT, DomainExporter, tdExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tExporter.getEpetra_Export(), tdExporter->getEpetra_Export().get(), myDomainMap, myRangeMap, restrictComm)); - } - -#ifdef HAVE_XPETRA_TPETRA - // NOTE: TPETRA means we can use C++11 here - - /// \brief Constructor specifying column Map and a local matrix, - /// which the resulting CrsMatrix views. - /// - /// Unlike most other CrsMatrix constructors, successful - /// completion of this constructor will result in a fill-complete - /// matrix. - /// - /// \param rowMap [in] Distribution of rows of the matrix. - /// - /// \param colMap [in] Distribution of columns of the matrix. - /// - /// \param lclMatrix [in] A local CrsMatrix containing all local - /// matrix values as well as a local graph. The graph's local - /// row indices must come from the specified row Map, and its - /// local column indices must come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - EpetraCrsMatrixT( - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const local_matrix_type &lclMatrix, - const Teuchos::RCP ¶ms = null) - : EpetraCrsMatrixT(lclMatrix, rowMap, colMap, Teuchos::null, Teuchos::null, params) {} - - EpetraCrsMatrixT( - const local_matrix_type &lclMatrix, - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = null) { - // local typedefs from local_matrix_type - // typedef typename local_matrix_type::size_type size_type; - typedef typename local_matrix_type::value_type value_type; - typedef typename local_matrix_type::ordinal_type ordinal_type; - - // The number of rows in the sparse matrix. - ordinal_type lclNumRows = lclMatrix.numRows(); - ordinal_type lclNumCols = lclMatrix.numCols(); // do we need this? - - // plausibility checks - TEUCHOS_TEST_FOR_EXCEPTION(lclNumRows != Teuchos::as(rowMap->getLocalNumElements()), Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrixT: number of rows in local matrix and number of local entries in row map do not match!"); - TEUCHOS_TEST_FOR_EXCEPTION(lclNumCols != Teuchos::as(colMap->getLocalNumElements()), Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrixT: number of columns in local matrix and number of local entries in column map do not match!"); - - Teuchos::ArrayRCP NumEntriesPerRowToAlloc(lclNumRows); - for (ordinal_type r = 0; r < lclNumRows; ++r) { - // extract data from current row r - auto rowview = lclMatrix.row(r); - NumEntriesPerRowToAlloc[r] = rowview.length; - } - - // setup matrix - isFillResumed_ = false; - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - - // loop over all rows and colums of local matrix and fill matrix - for (ordinal_type r = 0; r < lclNumRows; ++r) { - // extract data from current row r - auto rowview = lclMatrix.row(r); - - // arrays for current row data - Teuchos::ArrayRCP indout(rowview.length, Teuchos::ScalarTraits::zero()); - Teuchos::ArrayRCP valout(rowview.length, Teuchos::ScalarTraits::zero()); - - for (ordinal_type c = 0; c < rowview.length; c++) { - value_type value = rowview.value(c); - ordinal_type colidx = rowview.colidx(c); - - TEUCHOS_TEST_FOR_EXCEPTION(colMap->isNodeLocalElement(colidx) == false, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrixT: local matrix contains column elements which are not in the provided column map!"); - - indout[c] = colidx; - valout[c] = value; - } - insertLocalValues(r, indout.view(0, indout.size()), valout.view(0, valout.size())); - } - - // call fill complete - if (!domainMap.is_null() && !rangeMap.is_null()) - this->fillComplete(domainMap, rowMap, params); - else - this->fillComplete(rowMap, rowMap, params); - } -#endif - - //! Destructor. - virtual ~EpetraCrsMatrixT() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert matrix entries, using global IDs. - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) { - XPETRA_MONITOR("EpetraCrsMatrixT::insertGlobalValues"); - XPETRA_ERR_CHECK(mtx_->InsertGlobalValues(globalRow, vals.size(), vals.getRawPtr(), cols.getRawPtr())); - } - - //! Insert matrix entries, using local IDs. - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) { - XPETRA_MONITOR("EpetraCrsMatrixT::insertLocalValues"); - XPETRA_ERR_CHECK(mtx_->InsertMyValues(localRow, vals.size(), vals.getRawPtr(), cols.getRawPtr())); - } - - //! Replace matrix entries, using global IDs. - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &indices, const ArrayView &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceGlobalValues"); - - { - const std::string tfecfFuncName("replaceGlobalValues"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(!isFillActive(), std::runtime_error, - ": Fill must be active in order to call this method. If you have already " - "called fillComplete(), you need to call resumeFill() before you can " - "replace values."); - - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(values.size() != indices.size(), - std::runtime_error, ": values.size() must equal indices.size()."); - } - - XPETRA_ERR_CHECK(mtx_->ReplaceGlobalValues(globalRow, indices.size(), values.getRawPtr(), indices.getRawPtr())); - } - - //! Replace matrix entries, using local IDs. - void replaceLocalValues(LocalOrdinal localRow, const ArrayView &indices, const ArrayView &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceLocalValues"); - - { - const std::string tfecfFuncName("replaceLocalValues"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(!isFillActive(), std::runtime_error, - ": Fill must be active in order to call this method. If you have already " - "called fillComplete(), you need to call resumeFill() before you can " - "replace values."); - - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(values.size() != indices.size(), - std::runtime_error, ": values.size() must equal indices.size()."); - } - - XPETRA_ERR_CHECK(mtx_->ReplaceMyValues(localRow, indices.size(), values.getRawPtr(), indices.getRawPtr())); - } - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) { - XPETRA_MONITOR("EpetraCrsMatrixT::setAllToScalar"); - mtx_->PutScalar(alpha); - } - - //! Scale the current values of a matrix, this = alpha*this. - void scale(const Scalar &alpha) { - XPETRA_MONITOR("EpetraCrsMatrixT::scale"); - mtx_->Scale(alpha); - } - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::allocateAllValues"); - - // Row offsets - // Unfortunately, we cannot do this in the same manner as column indices - // and values (see below). The problem is that Tpetra insists on using - // size_t, and Epetra uses int internally. So we only resize here, and - // will need to copy in setAllValues - rowptr.resize(getLocalNumRows() + 1); - - int lowerOffset = 0; - bool ownMemory = false; - - // Column indices - // Extract, resize, set colind - Epetra_IntSerialDenseVector &myColind = mtx_->ExpertExtractIndices(); - myColind.Resize(numNonZeros); - colind = Teuchos::arcp(myColind.Values(), lowerOffset, numNonZeros, ownMemory); - - // Values - // Extract, reallocate, set values - double *&myValues = mtx_->ExpertExtractValues(); - delete[] myValues; - myValues = new double[numNonZeros]; - values = Teuchos::arcp(myValues, lowerOffset, numNonZeros, ownMemory); - } - - //! Sets the 1D pointer arrays of the graph. - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::setAllValues"); - - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(rowptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - TEUCHOS_TEST_FOR_EXCEPTION(values.size() != colind.size(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - - // Check pointers - if (values.size() > 0) { - TEUCHOS_TEST_FOR_EXCEPTION(colind.getRawPtr() != mtx_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - TEUCHOS_TEST_FOR_EXCEPTION(values.getRawPtr() != mtx_->ExpertExtractValues(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllValues - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(rowptr[i]); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getAllValues"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t n = getLocalNumRows(); - const size_t nnz = getLocalNumEntries(); - - // Row offsets - // We have to make a copy here, it is unavoidable (see comments in allocateAllValues) - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - rowptr.resize(n + 1); - for (size_t i = 0; i < n + 1; i++) - (*const_cast(&rowptr[i])) = Teuchos::as(myRowptr[i]); - - // Column indices - colind = Teuchos::arcp(mtx_->ExpertExtractIndices().Values(), lowerOffset, nnz, ownMemory); - - // Values - values = Teuchos::arcp(mtx_->ExpertExtractValues(), lowerOffset, nnz, ownMemory); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::getAllValues"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t nnz = getLocalNumEntries(); - // Values - values = Teuchos::arcp(mtx_->ExpertExtractValues(), lowerOffset, nnz, ownMemory); - } - - // Epetra always has global constants - bool haveGlobalConstants() const { return true; } - //! Expert static fill complete - //** \warning This is an expert-only routine and should not be called from user code. */ - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP & /* params */ = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::expertStaticFillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. - isFillResumed_ = false; - - int rv = 0; - const Epetra_Import *myimport = 0; - const Epetra_Export *myexport = 0; - - if (!importer.is_null()) { - XPETRA_DYNAMIC_CAST(const EpetraImportT, *importer, eImporter, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete only accepts Xpetra::EpetraImportT."); - myimport = eImporter.getEpetra_Import().getRawPtr(); - } - if (!exporter.is_null()) { - XPETRA_DYNAMIC_CAST(const EpetraExportT, *exporter, eExporter, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete only accepts Xpetra::EpetraImportT."); - myexport = eExporter.getEpetra_Export().getRawPtr(); - } - - rv = mtx_->ExpertStaticFillComplete(toEpetra(domainMap), toEpetra(rangeMap), myimport, myexport); - - TEUCHOS_TEST_FOR_EXCEPTION(rv != 0, std::runtime_error, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete FAILED!"); - } - //@} - - //! @name Transformational Methods - //@{ - - //! - void resumeFill(const RCP & /* params */ = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::resumeFill"); - - // According to Tpetra documentation, resumeFill() may be called repeatedly. - isFillResumed_ = true; - } - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::fillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. - isFillResumed_ = false; - - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - mtx_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap), doOptimizeStorage); - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::fillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. There is no need for a fillComplete after some resumeFill() operations. - if (isFillResumed_ == true) { - isFillResumed_ = false; - return; - } - - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - mtx_->FillComplete(doOptimizeStorage); - } - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceDomainMapAndImporter"); - XPETRA_DYNAMIC_CAST(const EpetraImportT, *newImporter, eImporter, "Xpetra::EpetraCrsMatrixT::replaceDomainMapAndImporter only accepts Xpetra::EpetraImportT."); - - const RCP &myImport = eImporter.getEpetra_Import(); - int rv = 0; - if (myImport == Teuchos::null) - rv = mtx_->ReplaceDomainMapAndImporter(toEpetra(newDomainMap), 0); - else - rv = mtx_->ReplaceDomainMapAndImporter(toEpetra(newDomainMap), &*myImport); - TEUCHOS_TEST_FOR_EXCEPTION(rv != 0, std::runtime_error, "Xpetra::EpetraCrsMatrixT::replaceDomainMapAndImporter FAILED!"); - } - - //@} - - //! @name Methods implementing RowMatrix - //@{ - - //! Returns the communicator. - const RCP > getComm() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getComm"); - return toXpetra(mtx_->Comm()); - } - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getRowMap"); - return toXpetra(mtx_->RowMap()); - } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getColMap"); - return toXpetra(mtx_->ColMap()); - } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getCrsGraph"); - return toXpetra(mtx_->Graph()); - } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumRows"); - return mtx_->NumGlobalRows64(); - } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumCols"); - return mtx_->NumGlobalCols64(); - } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumRows"); - return mtx_->NumMyRows(); - } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumCols"); - return mtx_->NumMyCols(); - } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumEntries"); - return mtx_->NumGlobalNonzeros64(); - } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumEntries"); - return mtx_->NumMyNonzeros(); - } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getNumEntriesInLocalRow"); - return mtx_->NumMyEntries(localRow); - } - - //! Returns the current number of entries on this node in the specified (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getNumEntriesInGlobalRow"); - return mtx_->NumGlobalEntries(globalRow); - } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalMaxNumRowEntries"); - return mtx_->GlobalMaxNumEntries(); - } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalMaxNumRowEntries"); - return mtx_->MaxNumEntries(); - } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isLocallyIndexed"); - return mtx_->IndicesAreLocal(); - } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isGloballyIndexed"); - return mtx_->IndicesAreGlobal(); - } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isFillComplete"); - if (isFillResumed_) - return false; - else - return mtx_->Filled(); - } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isFillActive"); - return !isFillComplete(); - } - - //! Returns the Frobenius norm of the matrix. - ScalarTraits::magnitudeType getFrobeniusNorm() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getFrobeniusNorm"); - return mtx_->NormFrobenius(); - } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { - XPETRA_MONITOR("EpetraCrsMatrixT::supportsRowViews"); - return true; - } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalRowCopy"); - - int numEntries = -1; - XPETRA_ERR_CHECK(mtx_->ExtractMyRowCopy(LocalRow, Indices.size(), numEntries, Values.getRawPtr(), Indices.getRawPtr())); - NumEntries = numEntries; - } - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalRowCopy"); - - int numEntries = -1; - XPETRA_ERR_CHECK(mtx_->ExtractGlobalRowCopy(GlobalRow, Indices.size(), numEntries, Values.getRawPtr(), Indices.getRawPtr())); - NumEntries = numEntries; - } - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalRowView"); - - int numEntries; - double *eValues; - GlobalOrdinal *eIndices; - - XPETRA_ERR_CHECK(mtx_->ExtractGlobalRowView(GlobalRow, numEntries, eValues, eIndices)); - if (numEntries == 0) { - eValues = NULL; - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - values = ArrayView(eValues, numEntries); - } - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalRowView"); - - int numEntries; - double *eValues; - int *eIndices; - - XPETRA_ERR_CHECK(mtx_->ExtractMyRowView(LocalRow, numEntries, eValues, eIndices)); - if (numEntries == 0) { - eValues = NULL; - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - values = ArrayView(eValues, numEntries); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalDiagCopy"); - XPETRA_ERR_CHECK(mtx_->ExtractDiagonalCopy(toEpetra(diag))); - } - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagOffsets() is not implemented or supported."); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. - void getLocalDiagCopy(Vector & /* diag */, const Teuchos::ArrayView & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagCopy using offsets is not implemented or supported."); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. - void getLocalDiagCopy(Vector & /* diag */, const Kokkos::View & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagCopy using offsets is not implemented or supported."); - } - - //! Replace the diagonal entries of the matrix - void replaceDiag(const Vector &diag) { - mtx_->ReplaceDiagonalValues(toEpetra(diag)); - } - - void leftScale(const Vector &x) { - XPETRA_ERR_CHECK(mtx_->LeftScale(toEpetra(x))); - }; - void rightScale(const Vector &x) { - XPETRA_ERR_CHECK(mtx_->RightScale(toEpetra(x))); - }; - - //@} - - //! @name Methods implementing Operator - //@{ - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const { - XPETRA_MONITOR("EpetraCrsMatrixT::apply"); - - // TEUCHOS_TEST_FOR_EXCEPTION((alpha != 1) || (beta != 0), Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.multiply() only accept alpha==1 and beta==0"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, X, eX, "Xpetra::EpetraCrsMatrixT->apply() only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(EpetraMultiVectorT, Y, eY, "Xpetra::EpetraCrsMatrixT->apply() only accept Xpetra::EpetraMultiVectorT as input arguments."); - - TEUCHOS_TEST_FOR_EXCEPTION((mode != Teuchos::NO_TRANS) && (mode != Teuchos::TRANS), Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT->apply() only accept mode == NO_TRANS or mode == TRANS"); - bool eTrans = toEpetra(mode); - - // /!\ UseTranspose value - TEUCHOS_TEST_FOR_EXCEPTION(mtx_->UseTranspose(), Xpetra::Exceptions::NotImplemented, "An exception is throw to let you know that Xpetra::EpetraCrsMatrixT->apply() do not take into account the UseTranspose() parameter of Epetra_CrsMatrix."); - - RCP epY = eY.getEpetra_MultiVector(); - - // helper vector: tmp = A*x - RCP tmp = Teuchos::rcp(new Epetra_MultiVector(*epY)); - tmp->PutScalar(0.0); - XPETRA_ERR_CHECK(mtx_->Multiply(eTrans, *eX.getEpetra_MultiVector(), *tmp)); - - // calculate alpha * A * x + beta * y - XPETRA_ERR_CHECK(eY.getEpetra_MultiVector()->Update(alpha, *tmp, beta)); - } - - //! - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP > ®ionInterfaceImporter, const Teuchos::ArrayRCP ®ionInterfaceLIDs) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.apply() is not implemented for region matricies."); - } - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getDomainMap"); - return toXpetra(mtx_->DomainMap()); - } - - //! - const RCP > getRangeMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getRangeMap"); - return toXpetra(mtx_->RangeMap()); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraCrsMatrixT::description"); - - // This implementation come from Tpetra_CrsMatrix_def.hpp (without modification) - std::ostringstream oss; - // TODO: oss << DistObject::description(); - if (isFillComplete()) { - oss << "{status = fill complete" - << ", global rows = " << getGlobalNumRows() - << ", global cols = " << getGlobalNumCols() - << ", global num entries = " << getGlobalNumEntries() - << "}"; - } else { - oss << "{status = fill not complete" - << ", global rows = " << getGlobalNumRows() - << "}"; - } - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraCrsMatrixT::describe"); - - // This implementation come from Tpetra_CrsMatrix_def.hpp (without modification) - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - Teuchos::EVerbosityLevel vl = verbLevel; - if (vl == VERB_DEFAULT) vl = VERB_LOW; - RCP > comm = this->getComm(); - const int myImageID = comm->getRank(), - numImages = comm->getSize(); - size_t width = 1; - for (size_t dec = 10; dec < getGlobalNumRows(); dec *= 10) { - ++width; - } - width = std::max(width, 11) + 2; - Teuchos::OSTab tab(out); - // none: print nothing - // low: print O(1) info from node 0 - // medium: print O(P) info, num entries per node - // high: print O(N) info, num entries per row - // extreme: print O(NNZ) info: print indices and values - // - // for medium and higher, print constituent objects at specified verbLevel - if (vl != VERB_NONE) { - if (myImageID == 0) out << this->description() << std::endl; - // O(1) globals, minus what was already printed by description() - if (isFillComplete() && myImageID == 0) { - out << "Global max number of entries = " << getGlobalMaxNumRowEntries() << std::endl; - } - // constituent objects - if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) { - if (myImageID == 0) out << "\nRow map: " << std::endl; - getRowMap()->describe(out, vl); - // - if (getColMap() != null) { - if (getColMap() == getRowMap()) { - if (myImageID == 0) out << "\nColumn map is row map."; - } else { - if (myImageID == 0) out << "\nColumn map: " << std::endl; - getColMap()->describe(out, vl); - } - } - if (getDomainMap() != null) { - if (getDomainMap() == getRowMap()) { - if (myImageID == 0) out << "\nDomain map is row map."; - } else if (getDomainMap() == getColMap()) { - if (myImageID == 0) out << "\nDomain map is row map."; - } else { - if (myImageID == 0) out << "\nDomain map: " << std::endl; - getDomainMap()->describe(out, vl); - } - } - if (getRangeMap() != null) { - if (getRangeMap() == getDomainMap()) { - if (myImageID == 0) out << "\nRange map is domain map." << std::endl; - } else if (getRangeMap() == getRowMap()) { - if (myImageID == 0) out << "\nRange map is row map." << std::endl; - } else { - if (myImageID == 0) out << "\nRange map: " << std::endl; - getRangeMap()->describe(out, vl); - } - } - if (myImageID == 0) out << std::endl; - } - // O(P) data - if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) { - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - out << "Node ID = " << imageCtr << std::endl; - // TODO: need a graph - // if (staticGraph_->indicesAreAllocated() == false) { - // out << "Node not allocated" << std::endl; - // } - // else { - // out << "Node number of allocated entries = " << staticGraph_->getLocalAllocationSize() << std::endl; - // } - - // TMP: - // const Epetra_CrsGraph & staticGraph_ = mtx_->Graph(); - // End of TMP - - out << "Node number of entries = " << getLocalNumEntries() << std::endl; - out << "Node max number of entries = " << getLocalMaxNumRowEntries() << std::endl; - } - comm->barrier(); - comm->barrier(); - comm->barrier(); - } - } - // O(N) and O(NNZ) data - if (vl == VERB_HIGH || vl == VERB_EXTREME) { - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - out << std::setw(width) << "Node ID" - << std::setw(width) << "Global Row" - << std::setw(width) << "Num Entries"; - if (vl == VERB_EXTREME) { - out << std::setw(width) << "(Index,Value)"; - } - out << std::endl; - for (size_t r = 0; r < getLocalNumRows(); ++r) { - const size_t nE = getNumEntriesInLocalRow(r); - GlobalOrdinal gid = getRowMap()->getGlobalElement(r); - out << std::setw(width) << myImageID - << std::setw(width) << gid - << std::setw(width) << nE; - if (vl == VERB_EXTREME) { - if (isGloballyIndexed()) { - ArrayView rowinds; - ArrayView rowvals; - getGlobalRowView(gid, rowinds, rowvals); - for (size_t j = 0; j < nE; ++j) { - out << " (" << rowinds[j] - << ", " << rowvals[j] - << ") "; - } - } else if (isLocallyIndexed()) { - ArrayView rowinds; - ArrayView rowvals; - getLocalRowView(r, rowinds, rowvals); - for (size_t j = 0; j < nE; ++j) { - out << " (" << getColMap()->getGlobalElement(rowinds[j]) - << ", " << rowvals[j] - << ") "; - } - } - } - out << std::endl; - } - } - comm->barrier(); - comm->barrier(); - comm->barrier(); - } - } - } - } - - void setObjectLabel(const std::string &objectLabel) { - Teuchos::LabeledObject::setObjectLabel(objectLabel); - mtx_->SetLabel(objectLabel.c_str()); - } - //@} - - //! Deep copy constructor - EpetraCrsMatrixT(const EpetraCrsMatrixT &matrix) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(*(matrix.mtx_)))) - , isFillResumed_(false) {} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getMap"); - return toXpetra(mtx_->Map()); - } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, source, tSource, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsMatrix(); - int err = mtx_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, dest, tDest, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsMatrix(); - int err = mtx_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, source, tSource, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsMatrix(); - int err = mtx_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, dest, tDest, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsMatrix(); - int err = mtx_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Caught nonzero error code " + std::to_string(err) + " returned by Epetra."); - } - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) { - XPETRA_MONITOR("EpetraCrsMatrixT::removeEmptyProcessesInPlace"); - const Epetra_Map *newMapEpetra = (!newMap.is_null()) ? &toEpetra(newMap) : 0; - int err = mtx_->RemoveEmptyProcessesInPlace(newMapEpetra); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Caught nonzero error code " + std::to_string(err) + " returned by Epetra."); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! Does this have an underlying matrix - bool hasMatrix() const { return !mtx_.is_null(); } - - //! EpetraCrsMatrixT constructor to wrap a Epetra_CrsMatrix object - EpetraCrsMatrixT(const Teuchos::RCP &mtx) - : mtx_(mtx) - , isFillResumed_(false) {} - - //! Get the underlying Epetra matrix - RCP getEpetra_CrsMatrix() const { return mtx_; } - - //! Get the underlying Epetra matrix - RCP getEpetra_CrsMatrixNonConst() const { return mtx_; } // TODO: remove - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Compatibility layer for accessing the matrix data through a Kokkos interface - - local_matrix_type getLocalMatrixDevice() const { -#if 0 - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraCrsMatrx only available on host for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - TEUCHOS_UNREACHABLE_RETURN((local_matrix_type())); -#endif - return getLocalMatrixHost(); - } - - typename local_matrix_type::HostMirror getLocalMatrixHost() const { - RCP matrix = getEpetra_CrsMatrixNonConst(); - - const int numRows = matrix->NumMyRows(); - const int numCols = matrix->NumMyCols(); - const int nnz = matrix->NumMyNonzeros(); - - int *rowptr; - int *colind; - double *vals; - int rv = matrix->ExtractCrsDataPointers(rowptr, colind, vals); - TEUCHOS_TEST_FOR_EXCEPTION(rv, std::runtime_error, "Xpetra::CrsMatrix<>::getLocalMatrix: failed in ExtractCrsDataPointers"); - - // Transform int* rowptr array to size_type* array - typename local_matrix_type::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_matrix_type::index_type kokkosColind(colind, nnz); - typename local_matrix_type::values_type kokkosVals(vals, nnz); - - local_matrix_type localMatrix = local_matrix_type("LocalMatrix", numRows, numCols, nnz, kokkosVals, kokkosRowPtr, kokkosColind); - - return localMatrix; - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) { - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(ptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - TEUCHOS_TEST_FOR_EXCEPTION(val.size() != ind.size(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - - // Check pointers - if (val.size() > 0) { - std::cout << ind.data() << " " << mtx_->ExpertExtractIndices().Values() << std::endl; - TEUCHOS_TEST_FOR_EXCEPTION(ind.data() != mtx_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - TEUCHOS_TEST_FOR_EXCEPTION(val.data() != mtx_->ExpertExtractValues(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllValues - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(ptr(i)); - } - - LocalOrdinal GetStorageBlockSize() const { return 1; } - - private: -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - //@} - - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const { - Scalar one = Teuchos::ScalarTraits::one(), negone = -one; - - apply(X, R); - R.update(one, B, negone); - } - - private: - //! The underlying actual matrix object - RCP mtx_; - - /*! - \brief Flag to keep track of fill status - - For Epetra, fillResume() is a fictitious operation but we need to keep track of it. - This boolean is true only is resumeFill() have been called and fillComplete() have not been called afterward. - */ - bool isFillResumed_; - -}; // EpetraCrsMatrixT class - -#endif //#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraCrsMatrixT - : public CrsMatrix { - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - typedef typename CrsMatrix::scalar_type Scalar; - typedef typename CrsMatrix::local_ordinal_type LocalOrdinal; - - // The following typedefs are used by the Kokkos interface -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; - typedef typename Xpetra::CrsMatrix::node_type node_type; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor specifying fixed number of entries for each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), maxNumEntriesPerRow, true))) - , isFillResumed_(false) {} - - //! Constructor specifying (possibly different) number of entries in each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP & /* plist */ = Teuchos::null) - : isFillResumed_(false) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), maxNumEntriesPerRow, true))) - , isFillResumed_(false) {} - - //! Constructor specifying column Map and number of entries in each row. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP & /* plist */ = Teuchos::null) - : isFillResumed_(false) { - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - } - - //! Constructor specifying a previously constructed graph. - EpetraCrsMatrixT(const Teuchos::RCP > &graph, const Teuchos::RCP & /* plist */ = Teuchos::null) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(graph)))) - , isFillResumed_(false) {} - - //! Constructor for a fused import - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tImporter.getEpetra_Import(), myDomainMap, myRangeMap, restrictComm)); - if (restrictComm && mtx_->NumMyRows() == 0) - mtx_ = Teuchos::null; - } - - //! Constructor for a fused export - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tExporter.getEpetra_Export(), myDomainMap, myRangeMap, restrictComm)); - } - - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, RowImporter, tImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - XPETRA_RCP_DYNAMIC_CAST(const EpetraImportT, DomainImporter, tdImporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraImportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tImporter.getEpetra_Import(), tdImporter->getEpetra_Import().get(), myDomainMap, myRangeMap, restrictComm)); - if (restrictComm && mtx_->NumMyRows() == 0) - mtx_ = Teuchos::null; - } - - EpetraCrsMatrixT(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) - : isFillResumed_(false) { - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, *sourceMatrix, tSourceMatrix, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraCrsMatrixT as an input argument."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, RowExporter, tExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - XPETRA_RCP_DYNAMIC_CAST(const EpetraExportT, DomainExporter, tdExporter, "Xpetra::EpetraCrsMatrixT constructor only accepts Xpetra::EpetraExportT as an input argument."); - - const Epetra_Map *myDomainMap = (domainMap != Teuchos::null) ? &toEpetra(domainMap) : 0; - const Epetra_Map *myRangeMap = (rangeMap != Teuchos::null) ? &toEpetra(rangeMap) : 0; - - // Follows the Tpetra parameters - bool restrictComm = false; - if (!params.is_null()) restrictComm = params->get("Restrict Communicator", restrictComm); - - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(*tSourceMatrix.getEpetra_CrsMatrix(), *tExporter.getEpetra_Export(), tdExporter->getEpetra_Export().get(), myDomainMap, myRangeMap, restrictComm)); - } - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Constructor specifying column Map and a local matrix, - /// which the resulting CrsMatrix views. - /// - /// Unlike most other CrsMatrix constructors, successful - /// completion of this constructor will result in a fill-complete - /// matrix. - /// - /// \param rowMap [in] Distribution of rows of the matrix. - /// - /// \param colMap [in] Distribution of columns of the matrix. - /// - /// \param lclMatrix [in] A local CrsMatrix containing all local - /// matrix values as well as a local graph. The graph's local - /// row indices must come from the specified row Map, and its - /// local column indices must come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - EpetraCrsMatrixT(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const local_matrix_type &lclMatrix, - const Teuchos::RCP ¶ms = null) - : EpetraCrsMatrixT(lclMatrix, rowMap, colMap, Teuchos::null, Teuchos::null, params) {} - - EpetraCrsMatrixT( - const local_matrix_type &lclMatrix, - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = null) { - // local typedefs from local_matrix_type - // typedef typename local_matrix_type::size_type size_type; - typedef typename local_matrix_type::value_type value_type; - typedef typename local_matrix_type::ordinal_type ordinal_type; - - // The number of rows in the sparse matrix. - ordinal_type lclNumRows = lclMatrix.numRows(); - ordinal_type lclNumCols = lclMatrix.numCols(); // do we need this? - - // plausibility checks - TEUCHOS_TEST_FOR_EXCEPTION(lclNumRows != Teuchos::as(rowMap->getLocalNumElements()), Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrixT: number of rows in local matrix and number of local entries in row map do not match!"); - TEUCHOS_TEST_FOR_EXCEPTION(lclNumCols != Teuchos::as(colMap->getLocalNumElements()), Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraCrsMatrixT: number of columns in local matrix and number of local entries in column map do not match!"); - - Teuchos::ArrayRCP NumEntriesPerRowToAlloc(lclNumRows); - for (ordinal_type r = 0; r < lclNumRows; ++r) { - // extract data from current row r - auto rowview = lclMatrix.row(r); - NumEntriesPerRowToAlloc[r] = rowview.length; - } - - // setup matrix - isFillResumed_ = false; - Teuchos::Array numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int" - mtx_ = Teuchos::rcp(new Epetra_CrsMatrix(Copy, toEpetra(rowMap), toEpetra(colMap), numEntriesPerRowToAlloc.getRawPtr(), true)); - - // loop over all rows and colums of local matrix and fill matrix - for (ordinal_type r = 0; r < lclNumRows; ++r) { - // extract data from current row r - auto rowview = lclMatrix.row(r); - - // arrays for current row data - Teuchos::ArrayRCP indout(rowview.length, Teuchos::ScalarTraits::zero()); - Teuchos::ArrayRCP valout(rowview.length, Teuchos::ScalarTraits::zero()); - - for (ordinal_type c = 0; c < rowview.length; c++) { - value_type value = rowview.value(c); - ordinal_type colidx = rowview.colidx(c); - - TEUCHOS_TEST_FOR_EXCEPTION(colMap->isNodeLocalElement(colidx) == false, Xpetra::Exceptions::RuntimeError, "Xpetra::EpetraCrsMatrixT: local matrix contains column elements which are not in the provided column map!"); - - indout[c] = colidx; - valout[c] = value; - } - insertLocalValues(r, indout.view(0, indout.size()), valout.view(0, valout.size())); - } - - // call fill complete - if (!domainMap.is_null() && !rangeMap.is_null()) - this->fillComplete(domainMap, rowMap, params); - else - this->fillComplete(rowMap, rowMap, params); - } -#endif - - //! Destructor. - virtual ~EpetraCrsMatrixT() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert matrix entries, using global IDs. - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) { - XPETRA_MONITOR("EpetraCrsMatrixT::insertGlobalValues"); - XPETRA_ERR_CHECK(mtx_->InsertGlobalValues(globalRow, vals.size(), vals.getRawPtr(), cols.getRawPtr())); - } - - //! Insert matrix entries, using local IDs. - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) { - XPETRA_MONITOR("EpetraCrsMatrixT::insertLocalValues"); - XPETRA_ERR_CHECK(mtx_->InsertMyValues(localRow, vals.size(), vals.getRawPtr(), cols.getRawPtr())); - } - - //! Replace matrix entries, using global IDs. - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &indices, const ArrayView &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceGlobalValues"); - - { - const std::string tfecfFuncName("replaceGlobalValues"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(!isFillActive(), std::runtime_error, - ": Fill must be active in order to call this method. If you have already " - "called fillComplete(), you need to call resumeFill() before you can " - "replace values."); - - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(values.size() != indices.size(), - std::runtime_error, ": values.size() must equal indices.size()."); - } - - XPETRA_ERR_CHECK(mtx_->ReplaceGlobalValues(globalRow, indices.size(), values.getRawPtr(), indices.getRawPtr())); - } - - //! Replace matrix entries, using local IDs. - void replaceLocalValues(LocalOrdinal localRow, const ArrayView &indices, const ArrayView &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceLocalValues"); - - { - const std::string tfecfFuncName("replaceLocalValues"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(!isFillActive(), std::runtime_error, - ": Fill must be active in order to call this method. If you have already " - "called fillComplete(), you need to call resumeFill() before you can " - "replace values."); - - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(values.size() != indices.size(), - std::runtime_error, ": values.size() must equal indices.size()."); - } - - XPETRA_ERR_CHECK(mtx_->ReplaceMyValues(localRow, indices.size(), values.getRawPtr(), indices.getRawPtr())); - } - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) { - XPETRA_MONITOR("EpetraCrsMatrixT::setAllToScalar"); - mtx_->PutScalar(alpha); - } - - //! Scale the current values of a matrix, this = alpha*this. - void scale(const Scalar &alpha) { - XPETRA_MONITOR("EpetraCrsMatrixT::scale"); - mtx_->Scale(alpha); - } - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::allocateAllValues"); - - // Row offsets - // Unfortunately, we cannot do this in the same manner as column indices - // and values (see below). The problem is that Tpetra insists on using - // size_t, and Epetra uses int internally. So we only resize here, and - // will need to copy in setAllValues - rowptr.resize(getLocalNumRows() + 1); - - int lowerOffset = 0; - bool ownMemory = false; - - // Column indices - // Extract, resize, set colind - Epetra_IntSerialDenseVector &myColind = mtx_->ExpertExtractIndices(); - myColind.Resize(numNonZeros); - colind = Teuchos::arcp(myColind.Values(), lowerOffset, numNonZeros, ownMemory); - - // Values - // Extract, reallocate, set values - double *&myValues = mtx_->ExpertExtractValues(); - delete[] myValues; - myValues = new double[numNonZeros]; - values = Teuchos::arcp(myValues, lowerOffset, numNonZeros, ownMemory); - } - - //! Sets the 1D pointer arrays of the graph. - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::setAllValues"); - - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(rowptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - TEUCHOS_TEST_FOR_EXCEPTION(values.size() != colind.size(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - - // Check pointers - if (values.size() > 0) { - TEUCHOS_TEST_FOR_EXCEPTION(colind.getRawPtr() != mtx_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - TEUCHOS_TEST_FOR_EXCEPTION(values.getRawPtr() != mtx_->ExpertExtractValues(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllValues - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(rowptr[i]); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getAllValues"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t n = getLocalNumRows(); - const size_t nnz = getLocalNumEntries(); - - // Row offsets - // We have to make a copy here, it is unavoidable (see comments in allocateAllValues) - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - rowptr.resize(n + 1); - for (size_t i = 0; i < n + 1; i++) - (*const_cast(&rowptr[i])) = Teuchos::as(myRowptr[i]); - - // Column indices - colind = Teuchos::arcp(mtx_->ExpertExtractIndices().Values(), lowerOffset, nnz, ownMemory); - - // Values - values = Teuchos::arcp(mtx_->ExpertExtractValues(), lowerOffset, nnz, ownMemory); - } - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &values) { - XPETRA_MONITOR("EpetraCrsMatrixT::getAllValues"); - - int lowerOffset = 0; - bool ownMemory = false; - - const size_t nnz = getLocalNumEntries(); - // Values - values = Teuchos::arcp(mtx_->ExpertExtractValues(), lowerOffset, nnz, ownMemory); - } - - // Epetra always has global constants - bool haveGlobalConstants() const { return true; } - - //! Expert static fill complete - //** \warning This is an expert-only routine and should not be called from user code. */ - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP & /* params */ = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::expertStaticFillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. - isFillResumed_ = false; - - int rv = 0; - const Epetra_Import *myimport = 0; - const Epetra_Export *myexport = 0; - - if (!importer.is_null()) { - XPETRA_DYNAMIC_CAST(const EpetraImportT, *importer, eImporter, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete only accepts Xpetra::EpetraImportT."); - myimport = eImporter.getEpetra_Import().getRawPtr(); - } - if (!exporter.is_null()) { - XPETRA_DYNAMIC_CAST(const EpetraExportT, *exporter, eExporter, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete only accepts Xpetra::EpetraImportT."); - myexport = eExporter.getEpetra_Export().getRawPtr(); - } - - rv = mtx_->ExpertStaticFillComplete(toEpetra(domainMap), toEpetra(rangeMap), myimport, myexport); - - TEUCHOS_TEST_FOR_EXCEPTION(rv != 0, std::runtime_error, "Xpetra::EpetraCrsMatrixT::expertStaticFillComplete FAILED!"); - } - //@} - - //! @name Transformational Methods - //@{ - - //! - void resumeFill(const RCP & /* params */ = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::resumeFill"); - - // According to Tpetra documentation, resumeFill() may be called repeatedly. - isFillResumed_ = true; - } - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::fillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. There is no need for a fillComplete after some resumeFill() operations. - if (isFillResumed_ == true) { - isFillResumed_ = false; - return; - } - - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - mtx_->FillComplete(toEpetra(domainMap), toEpetra(rangeMap), doOptimizeStorage); - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = Teuchos::null) { - XPETRA_MONITOR("EpetraCrsMatrixT::fillComplete"); - - // For Epetra matrices, resumeFill() is a fictive operation. There is no need for a fillComplete after some resumeFill() operations. - if (isFillResumed_ == true) { - isFillResumed_ = false; - return; - } - - bool doOptimizeStorage = true; - if (params != null && params->get("Optimize Storage", true) == false) doOptimizeStorage = false; - mtx_->FillComplete(doOptimizeStorage); - } - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) { - XPETRA_MONITOR("EpetraCrsMatrixT::replaceDomainMapAndImporter"); - XPETRA_DYNAMIC_CAST(const EpetraImportT, *newImporter, eImporter, "Xpetra::EpetraCrsMatrixT::replaceDomainMapAndImporter only accepts Xpetra::EpetraImportT."); - - const RCP &myImport = eImporter.getEpetra_Import(); - int rv = 0; - if (myImport == Teuchos::null) - rv = mtx_->ReplaceDomainMapAndImporter(toEpetra(newDomainMap), 0); - else - rv = mtx_->ReplaceDomainMapAndImporter(toEpetra(newDomainMap), &*myImport); - TEUCHOS_TEST_FOR_EXCEPTION(rv != 0, std::runtime_error, "Xpetra::EpetraCrsMatrixT::replaceDomainMapAndImporter FAILED!"); - } - - //@} - - //! @name Methods implementing RowMatrix - //@{ - - //! Returns the communicator. - const RCP > getComm() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getComm"); - return toXpetra(mtx_->Comm()); - } - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getRowMap"); - return toXpetra(mtx_->RowMap()); - } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getColMap"); - return toXpetra(mtx_->ColMap()); - } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getCrsGraph"); - return toXpetra(mtx_->Graph()); - } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumRows"); - return mtx_->NumGlobalRows64(); - } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumCols"); - return mtx_->NumGlobalCols64(); - } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumRows"); - return mtx_->NumMyRows(); - } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumCols"); - return mtx_->NumMyCols(); - } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalNumEntries"); - return mtx_->NumGlobalNonzeros64(); - } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalNumEntries"); - return mtx_->NumMyNonzeros(); - } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getNumEntriesInLocalRow"); - return mtx_->NumMyEntries(localRow); - } - - //! Returns the current number of entries on this node in the specified (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getNumEntriesInGlobalRow"); - return mtx_->NumGlobalEntries(globalRow); - } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalMaxNumRowEntries"); - return mtx_->GlobalMaxNumEntries(); - } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalMaxNumRowEntries"); - return mtx_->MaxNumEntries(); - } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isLocallyIndexed"); - return mtx_->IndicesAreLocal(); - } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isGloballyIndexed"); - return mtx_->IndicesAreGlobal(); - } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isFillComplete"); - if (isFillResumed_) - return false; - else - return mtx_->Filled(); - } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { - XPETRA_MONITOR("EpetraCrsMatrixT::isFillActive"); - return !isFillComplete(); - } - - //! Returns the Frobenius norm of the matrix. - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getFrobeniusNorm"); - return mtx_->NormFrobenius(); - } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { - XPETRA_MONITOR("EpetraCrsMatrixT::supportsRowViews"); - return true; - } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalRowCopy"); - - int numEntries = -1; - XPETRA_ERR_CHECK(mtx_->ExtractMyRowCopy(LocalRow, Indices.size(), numEntries, Values.getRawPtr(), Indices.getRawPtr())); - NumEntries = numEntries; - } - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalRowCopy"); - - int numEntries = -1; - XPETRA_ERR_CHECK(mtx_->ExtractGlobalRowCopy(GlobalRow, Indices.size(), numEntries, Values.getRawPtr(), Indices.getRawPtr())); - NumEntries = numEntries; - } - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getGlobalRowView"); - - int numEntries; - double *eValues; - GlobalOrdinal *eIndices; - - XPETRA_ERR_CHECK(mtx_->ExtractGlobalRowView(GlobalRow, numEntries, eValues, eIndices)); - if (numEntries == 0) { - eValues = NULL; - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - values = ArrayView(eValues, numEntries); - } - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalRowView"); - - int numEntries; - double *eValues; - int *eIndices; - - XPETRA_ERR_CHECK(mtx_->ExtractMyRowView(LocalRow, numEntries, eValues, eIndices)); - if (numEntries == 0) { - eValues = NULL; - eIndices = NULL; - } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor. - - indices = ArrayView(eIndices, numEntries); - values = ArrayView(eValues, numEntries); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag) const { - XPETRA_MONITOR("EpetraCrsMatrixT::getLocalDiagCopy"); - mtx_->ExtractDiagonalCopy(toEpetra(diag)); - } - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagOffsets() is not implemented or supported."); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. - void getLocalDiagCopy(Vector & /* diag */, const Teuchos::ArrayView & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagCopy using offsets is not implemented or supported."); - } - - //! Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. - void getLocalDiagCopy(Vector & /* diag */, const Kokkos::View & /* offsets */) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.getLocalDiagCopy using offsets is not implemented or supported."); - } - - //! Replace the diagonal entries of the matrix - void replaceDiag(const Vector &diag) { - mtx_->ReplaceDiagonalValues(toEpetra(diag)); - } - - void leftScale(const Vector &x) { - XPETRA_ERR_CHECK(mtx_->LeftScale(toEpetra(x))); - }; - void rightScale(const Vector &x) { - XPETRA_ERR_CHECK(mtx_->RightScale(toEpetra(x))); - }; - - //@} - - //! @name Methods implementing Operator - //@{ - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const { - XPETRA_MONITOR("EpetraCrsMatrixT::apply"); - - // TEUCHOS_TEST_FOR_EXCEPTION((alpha != 1) || (beta != 0), Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.multiply() only accept alpha==1 and beta==0"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, X, eX, "Xpetra::EpetraCrsMatrixT->apply() only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(EpetraMultiVectorT, Y, eY, "Xpetra::EpetraCrsMatrixT->apply() only accept Xpetra::EpetraMultiVectorT as input arguments."); - - TEUCHOS_TEST_FOR_EXCEPTION((mode != Teuchos::NO_TRANS) && (mode != Teuchos::TRANS), Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT->apply() only accept mode == NO_TRANS or mode == TRANS"); - bool eTrans = toEpetra(mode); - - // /!\ UseTranspose value - TEUCHOS_TEST_FOR_EXCEPTION(mtx_->UseTranspose(), Xpetra::Exceptions::NotImplemented, "An exception is throw to let you know that Xpetra::EpetraCrsMatrixT->apply() do not take into account the UseTranspose() parameter of Epetra_CrsMatrix."); - - RCP epY = eY.getEpetra_MultiVector(); - - // helper vector: tmp = A*x - RCP tmp = Teuchos::rcp(new Epetra_MultiVector(*epY)); - tmp->PutScalar(0.0); - XPETRA_ERR_CHECK(mtx_->Multiply(eTrans, *eX.getEpetra_MultiVector(), *tmp)); - - // calculate alpha * A * x + beta * y - XPETRA_ERR_CHECK(eY.getEpetra_MultiVector()->Update(alpha, *tmp, beta)); - } - - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP > ®ionInterfaceImporter, const Teuchos::ArrayRCP ®ionInterfaceLIDs) const { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraCrsMatrixT.apply() is not implemented for region matricies."); - } - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getDomainMap"); - return toXpetra(mtx_->DomainMap()); - } - - //! - const RCP > getRangeMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getRangeMap"); - return toXpetra(mtx_->RangeMap()); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraCrsMatrixT::description"); - - // This implementation come from Tpetra_CrsMatrix_def.hpp (without modification) - std::ostringstream oss; - // TODO: oss << DistObject::description(); - if (isFillComplete()) { - oss << "{status = fill complete" - << ", global rows = " << getGlobalNumRows() - << ", global cols = " << getGlobalNumCols() - << ", global num entries = " << getGlobalNumEntries() - << "}"; - } else { - oss << "{status = fill not complete" - << ", global rows = " << getGlobalNumRows() - << "}"; - } - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraCrsMatrixT::describe"); - - // This implementation come from Tpetra_CrsMatrix_def.hpp (without modification) - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - Teuchos::EVerbosityLevel vl = verbLevel; - if (vl == VERB_DEFAULT) vl = VERB_LOW; - RCP > comm = this->getComm(); - const int myImageID = comm->getRank(), - numImages = comm->getSize(); - size_t width = 1; - for (size_t dec = 10; dec < getGlobalNumRows(); dec *= 10) { - ++width; - } - width = std::max(width, 11) + 2; - Teuchos::OSTab tab(out); - // none: print nothing - // low: print O(1) info from node 0 - // medium: print O(P) info, num entries per node - // high: print O(N) info, num entries per row - // extreme: print O(NNZ) info: print indices and values - // - // for medium and higher, print constituent objects at specified verbLevel - if (vl != VERB_NONE) { - if (myImageID == 0) out << this->description() << std::endl; - // O(1) globals, minus what was already printed by description() - if (isFillComplete() && myImageID == 0) { - out << "Global max number of entries = " << getGlobalMaxNumRowEntries() << std::endl; - } - // constituent objects - if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) { - if (myImageID == 0) out << "\nRow map: " << std::endl; - getRowMap()->describe(out, vl); - // - if (getColMap() != null) { - if (getColMap() == getRowMap()) { - if (myImageID == 0) out << "\nColumn map is row map."; - } else { - if (myImageID == 0) out << "\nColumn map: " << std::endl; - getColMap()->describe(out, vl); - } - } - if (getDomainMap() != null) { - if (getDomainMap() == getRowMap()) { - if (myImageID == 0) out << "\nDomain map is row map."; - } else if (getDomainMap() == getColMap()) { - if (myImageID == 0) out << "\nDomain map is row map."; - } else { - if (myImageID == 0) out << "\nDomain map: " << std::endl; - getDomainMap()->describe(out, vl); - } - } - if (getRangeMap() != null) { - if (getRangeMap() == getDomainMap()) { - if (myImageID == 0) out << "\nRange map is domain map." << std::endl; - } else if (getRangeMap() == getRowMap()) { - if (myImageID == 0) out << "\nRange map is row map." << std::endl; - } else { - if (myImageID == 0) out << "\nRange map: " << std::endl; - getRangeMap()->describe(out, vl); - } - } - if (myImageID == 0) out << std::endl; - } - // O(P) data - if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) { - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - out << "Node ID = " << imageCtr << std::endl; - // TODO: need a graph - // if (staticGraph_->indicesAreAllocated() == false) { - // out << "Node not allocated" << std::endl; - // } - // else { - // out << "Node number of allocated entries = " << staticGraph_->getLocalAllocationSize() << std::endl; - // } - - // TMP: - // const Epetra_CrsGraph & staticGraph_ = mtx_->Graph(); - // End of TMP - - out << "Node number of entries = " << getLocalNumEntries() << std::endl; - out << "Node max number of entries = " << getLocalMaxNumRowEntries() << std::endl; - } - comm->barrier(); - comm->barrier(); - comm->barrier(); - } - } - // O(N) and O(NNZ) data - if (vl == VERB_HIGH || vl == VERB_EXTREME) { - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - out << std::setw(width) << "Node ID" - << std::setw(width) << "Global Row" - << std::setw(width) << "Num Entries"; - if (vl == VERB_EXTREME) { - out << std::setw(width) << "(Index,Value)"; - } - out << std::endl; - for (size_t r = 0; r < getLocalNumRows(); ++r) { - const size_t nE = getNumEntriesInLocalRow(r); - GlobalOrdinal gid = getRowMap()->getGlobalElement(r); - out << std::setw(width) << myImageID - << std::setw(width) << gid - << std::setw(width) << nE; - if (vl == VERB_EXTREME) { - if (isGloballyIndexed()) { - ArrayView rowinds; - ArrayView rowvals; - getGlobalRowView(gid, rowinds, rowvals); - for (size_t j = 0; j < nE; ++j) { - out << " (" << rowinds[j] - << ", " << rowvals[j] - << ") "; - } - } else if (isLocallyIndexed()) { - ArrayView rowinds; - ArrayView rowvals; - getLocalRowView(r, rowinds, rowvals); - for (size_t j = 0; j < nE; ++j) { - out << " (" << getColMap()->getGlobalElement(rowinds[j]) - << ", " << rowvals[j] - << ") "; - } - } - } - out << std::endl; - } - } - comm->barrier(); - comm->barrier(); - comm->barrier(); - } - } - } - } - - void setObjectLabel(const std::string &objectLabel) { - Teuchos::LabeledObject::setObjectLabel(objectLabel); - mtx_->SetLabel(objectLabel.c_str()); - } - //@} - - //! Deep copy constructor - EpetraCrsMatrixT(const EpetraCrsMatrixT &matrix) - : mtx_(Teuchos::rcp(new Epetra_CrsMatrix(*(matrix.mtx_)))) - , isFillResumed_(false) {} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { - XPETRA_MONITOR("EpetraCrsMatrixT::getMap"); - return toXpetra(mtx_->Map()); - } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, source, tSource, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsMatrix(); - int err = mtx_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, dest, tDest, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsMatrix(); - int err = mtx_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, source, tSource, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_CrsMatrix(); - int err = mtx_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraCrsMatrixT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraCrsMatrixT, dest, tDest, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraCrsMatrixT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraCrsMatrixT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_CrsMatrix(); - int err = mtx_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) { - XPETRA_MONITOR("EpetraCrsMatrixT::removeEmptyProcessesInPlace"); - const Epetra_Map *newMapEpetra = (!newMap.is_null()) ? &toEpetra(newMap) : 0; - int err = mtx_->RemoveEmptyProcessesInPlace(newMapEpetra); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Caught nonzero error code " + std::to_string(err) + " returned by Epetra."); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! Does this have an underlying matrix - bool hasMatrix() const { return !mtx_.is_null(); } - - //! EpetraCrsMatrixT constructor to wrap a Epetra_CrsMatrix object - EpetraCrsMatrixT(const Teuchos::RCP &mtx) - : mtx_(mtx) - , isFillResumed_(false) {} - - //! Get the underlying Epetra matrix - RCP getEpetra_CrsMatrix() const { return mtx_; } - - //! Get the underlying Epetra matrix - RCP getEpetra_CrsMatrixNonConst() const { return mtx_; } // TODO: remove - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Compatibility layer for accessing the matrix data through a Kokkos interface - local_matrix_type getLocalMatrix() const { - RCP matrix = getEpetra_CrsMatrixNonConst(); - - const int numRows = matrix->NumMyRows(); - const int numCols = matrix->NumMyCols(); - const int nnz = matrix->NumMyNonzeros(); - - int *rowptr; - int *colind; - double *vals; - int rv = matrix->ExtractCrsDataPointers(rowptr, colind, vals); - TEUCHOS_TEST_FOR_EXCEPTION(rv, std::runtime_error, "Xpetra::CrsMatrix<>::getLocalMatrix: failed in ExtractCrsDataPointers"); - - // Transform int* rowptr array to size_type* array - typename local_matrix_type::row_map_type::non_const_type kokkosRowPtr(Kokkos::ViewAllocateWithoutInitializing("local row map"), numRows + 1); - for (size_t i = 0; i < kokkosRowPtr.size(); i++) - kokkosRowPtr(i) = Teuchos::asSafe(rowptr[i]); - - // create Kokkos::Views - typename local_matrix_type::index_type kokkosColind(colind, nnz); - typename local_matrix_type::values_type kokkosVals(vals, nnz); - - local_matrix_type localMatrix = local_matrix_type("LocalMatrix", numRows, numCols, nnz, kokkosVals, kokkosRowPtr, kokkosColind); - - return localMatrix; - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) { - // Check sizes - TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as(ptr.size()) != getLocalNumRows() + 1, Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that the size of your rowptr array is incorrect."); - TEUCHOS_TEST_FOR_EXCEPTION(val.size() != ind.size(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - - // Check pointers - if (val.size() > 0) { - TEUCHOS_TEST_FOR_EXCEPTION(ind.data() != mtx_->ExpertExtractIndices().Values(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - TEUCHOS_TEST_FOR_EXCEPTION(val.data() != mtx_->ExpertExtractValues(), Xpetra::Exceptions::RuntimeError, - "An exception is thrown to let you know that you mismatched your pointers."); - } - - // We have to make a copy here, it is unavoidable - // See comments in allocateAllValues - const size_t N = getLocalNumRows(); - - Epetra_IntSerialDenseVector &myRowptr = mtx_->ExpertExtractIndexOffset(); - myRowptr.Resize(N + 1); - for (size_t i = 0; i < N + 1; i++) - myRowptr[i] = Teuchos::as(ptr(i)); - } - - LocalOrdinal GetStorageBlockSize() const { return 1; } - - private: -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - //@} - - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const { - Scalar one = Teuchos::ScalarTraits::one(), negone = -one; - apply(X, R); - R.update(one, B, negone); - } - - private: - RCP mtx_; - - bool isFillResumed_; //< For Epetra, fillResume() is a fictive operation but we need to keep track of it. This boolean is true only is resumeFill() have been called and fillComplete() have not been called afterward. - -}; // EpetraCrsMatrixT class - -#endif // #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -} // namespace Xpetra - -#define XPETRA_EPETRACRSMATRIX_SHORT -#endif // XPETRA_EPETRACRSMATRIX_HPP diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_decl.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_decl.hpp index aa5afb701896..d197001eed5a 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_decl.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_decl.hpp @@ -335,7 +335,6 @@ class TpetraBlockCrsMatrix //! Get the underlying Tpetra matrix RCP > getTpetra_BlockCrsMatrixNonConst() const; -#ifdef HAVE_XPETRA_TPETRA // using local_matrix_type = typename Xpetra::CrsMatrix::local_matrix_type; using local_matrix_type = typename CrsMatrix::local_matrix_type; @@ -345,7 +344,6 @@ class TpetraBlockCrsMatrix void setAllValues(const typename local_matrix_type::row_map_type &ptr, const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, const typename local_matrix_type::values_type &val); -#endif // HAVE_XPETRA_TPETRA //! Returns the block size of the storage mechanism LocalOrdinal GetStorageBlockSize() const { return mtx_->getBlockSize(); } diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_def.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_def.hpp index 1fd843f06b60..97dd74886c53 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_def.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraBlockCrsMatrix_def.hpp @@ -674,8 +674,6 @@ TpetraBlockCrsMatrix:: return mtx_; } -#ifdef HAVE_XPETRA_TPETRA - // was: typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; // using local_matrix_type = typename CrsMatrix::local_matrix_type; @@ -713,626 +711,6 @@ void TpetraBlockCrsMatrix:: throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); } -#endif // HAVE_XPETRA_TPETRA - -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization of TpetraBlockCrsMatrix for GO=LO=int and Node=EpetraNode -template -class TpetraBlockCrsMatrix - : public CrsMatrix //, public TpetraRowMatrix -{ - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - typedef TpetraBlockCrsMatrix TpetraBlockCrsMatrixClass; - typedef TpetraVector TpetraVectorClass; - typedef TpetraImport TpetraImportClass; - typedef TpetraExport TpetraExportClass; - - public: - //! @name Constructor/Destructor Methods - - //! Constructor specifying fixed number of entries for each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying (possibly different) number of entries in each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and fixed number of entries for each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and number of entries in each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying a previously constructed graph ( not implemented ) - TpetraBlockCrsMatrix(const Teuchos::RCP > &graph, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying a previously constructed graph & blocksize - TpetraBlockCrsMatrix(const Teuchos::RCP > &graph, const LocalOrdinal blockSize) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor for a fused import ( not implemented ) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); } - - //! Constructor for a fused export (not implemented( - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); } - - //! Constructor for a fused import ( not implemented ) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); } - - //! Constructor for a fused export (not implemented( - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraBlockCrsMatrix() {} - - //! @name Insertion/Removal Methods - - //! Insert matrix entries, using global IDs (not implemented) - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Insert matrix entries, using local IDs (not implemented) - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using global IDs (not implemented) - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using local IDs. - void replaceLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) {} - - //! Scale the current values of a matrix, this = alpha*this (not implemented) - void scale(const Scalar &alpha) {} - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. (not implemented) - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) {} - - //! Sets the 1D pointer arrays of the graph (not impelmented) - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) {} - - //! Gets the 1D pointer arrays of the graph (not implemented) - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const {} - - //! Gets the 1D pointer arrays of the graph (not implemented) - void getAllValues(ArrayRCP &values) {} - - //! @name Transformational Methods - - //! - void resumeFill(const RCP ¶ms = null) { /*noop*/ - } - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) { /*noop*/ - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) { /*noop*/ - } - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) {} - - //! Expert static fill complete - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP ¶ms = Teuchos::null) {} - - //! @name Methods implementing RowMatrix - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { return Teuchos::null; } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { return Teuchos::null; } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { return 0; } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { return 0; } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of entries in the (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { return false; } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { return false; } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { return false; } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { return false; } - - //! Returns the Frobenius norm of the matrix. - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { return false; } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const {} - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &indices, const ArrayView &values, size_t &numEntries) const {} - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const {} - - //! Returns true if globalConstants have been computed; false otherwise - bool haveGlobalConstants() const { return false; } - - //! @name Methods implementing Operator - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const {} - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { return Teuchos::null; } - - //! - const RCP > getRangeMap() const { return Teuchos::null; } - - //! @name Overridden from Teuchos::Describable - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //! Deep copy constructor - TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix) {} - - //! Get a copy of the diagonal entries owned by this node, with local row idices - void getLocalDiagCopy(Vector &diag) const {} - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Teuchos::ArrayView &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Kokkos::View &offsets) const {} - - void replaceDiag(const Vector &diag) {} - - void leftScale(const Vector &x) {} - void rightScale(const Vector &x) {} - - //! Implements DistObject interface - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) {} - - //! @name Xpetra specific - - //! Does this have an underlying matrix - bool hasMatrix() const { return false; } - - //! TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object - TpetraBlockCrsMatrix(const Teuchos::RCP > &mtx) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_BlockCrsMatrix() const { return Teuchos::null; } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_BlockCrsMatrixNonConst() const { return Teuchos::null; } - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; - - local_matrix_type getLocalMatrix() const { - throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - local_matrix_type ret; - return ret; // make compiler happy - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) { - throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - } -#endif // HAVE_XPETRA_TPETRA - -}; // TpetraBlockCrsMatrix class - -#endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// specialization of TpetraBlockCrsMatrix for GO=long long and Node=EpetraNode -template -class TpetraBlockCrsMatrix - : public CrsMatrix //, public TpetraRowMatrix -{ - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - typedef TpetraBlockCrsMatrix TpetraBlockCrsMatrixClass; - typedef TpetraVector TpetraVectorClass; - typedef TpetraImport TpetraImportClass; - typedef TpetraExport TpetraExportClass; - - public: - //! @name Constructor/Destructor Methods - - //! Constructor specifying fixed number of entries for each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor specifying (possibly different) number of entries in each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor specifying column Map and fixed number of entries for each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor specifying column Map and number of entries in each row (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor specifying a previously constructed graph ( not implemented ) - TpetraBlockCrsMatrix(const Teuchos::RCP > &graph, const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor specifying a previously constructed graph & blocksize - TpetraBlockCrsMatrix(const Teuchos::RCP > &graph, const LocalOrdinal blockSize) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor for a fused import (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor for a fused export (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor for a fused import (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Constructor for a fused export (not implemented) - TpetraBlockCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); } - - //! Destructor. - ~TpetraBlockCrsMatrix() {} - - //! @name Insertion/Removal Methods - - //! Insert matrix entries, using global IDs (not implemented) - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Insert matrix entries, using local IDs (not implemented) - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using global IDs (not implemented) - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using local IDs. - void replaceLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) {} - - //! Scale the current values of a matrix, this = alpha*this (not implemented) - void scale(const Scalar &alpha) {} - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. (not implemented) - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) {} - - //! Sets the 1D pointer arrays of the graph (not impelmented) - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) {} - - //! Gets the 1D pointer arrays of the graph (not implemented) - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const {} - - //! Gets the 1D pointer arrays of the graph (not implemented) - void getAllValues(ArrayRCP &values) {} - - //! @name Transformational Methods - - //! - void resumeFill(const RCP ¶ms = null) { /*noop*/ - } - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) { /*noop*/ - } - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) { /*noop*/ - } - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) {} - - //! Expert static fill complete - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP ¶ms = Teuchos::null) {} - - //! @name Methods implementing RowMatrix - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { return Teuchos::null; } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { return Teuchos::null; } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { return 0; } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { return 0; } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of entries in the (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { return false; } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { return false; } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { return false; } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { return false; } - - //! Returns the Frobenius norm of the matrix. - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { return false; } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const {} - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &indices, const ArrayView &values, size_t &numEntries) const {} - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const {} - - //! Returns true if globalConstants have been computed; false otherwise - bool haveGlobalConstants() const { return true; } - - //! @name Methods implementing Operator - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const {} - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { return Teuchos::null; } - - //! - const RCP > getRangeMap() const { return Teuchos::null; } - - //! @name Overridden from Teuchos::Describable - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //! Deep copy constructor - TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix) {} - - //! Get a copy of the diagonal entries owned by this node, with local row idices - void getLocalDiagCopy(Vector &diag) const {} - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Teuchos::ArrayView &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Kokkos::View &offsets) const {} - - void replaceDiag(Vector &diag) const {} - - void leftScale(const Vector &x) {} - void rightScale(const Vector &x) {} - - //! Implements DistObject interface - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) {} - - //! @name Xpetra specific - - //! Does this have an underlying matrix - bool hasMatrix() const { return false; } - - //! TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object - TpetraBlockCrsMatrix(const Teuchos::RCP > &mtx) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraBlockCrsMatrix).name(), typeid(TpetraBlockCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_BlockCrsMatrix() const { return Teuchos::null; } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_BlockCrsMatrixNonConst() const { return Teuchos::null; } - -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; - - local_matrix_type getLocalMatrix() const { - throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - local_matrix_type ret; - TEUCHOS_UNREACHABLE_RETURN(ret); - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) { - throw std::runtime_error("Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - } -#endif // HAVE_XPETRA_TPETRA - -}; // TpetraBlockCrsMatrix class - -#endif // IF ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #endif // XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_decl.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_decl.hpp index a8f38f64e871..3e85cb2592c7 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_decl.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_decl.hpp @@ -49,9 +49,7 @@ class TpetraCrsMatrix typedef TpetraExport TpetraExportClass; // The following typedefs are used by the Kokkos interface -#ifdef HAVE_XPETRA_TPETRA typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; -#endif public: //! @name Constructor/Destructor Methods @@ -105,7 +103,6 @@ class TpetraCrsMatrix const Teuchos::RCP > &rangeMap, const Teuchos::RCP ¶ms); -#ifdef HAVE_XPETRA_TPETRA /// \brief Constructor specifying column Map and a local matrix, /// which the resulting CrsMatrix views. /// @@ -150,7 +147,6 @@ class TpetraCrsMatrix const Teuchos::RCP > &importer, const Teuchos::RCP > &exporter, const Teuchos::RCP ¶ms = null); -#endif //! Destructor. virtual ~TpetraCrsMatrix(); @@ -393,7 +389,6 @@ class TpetraCrsMatrix //! Get the underlying Tpetra matrix RCP > getTpetra_CrsMatrixNonConst() const; // TODO: remove -#ifdef HAVE_XPETRA_TPETRA /// \brief Access the local Kokkos::CrsMatrix data typename local_matrix_type::HostMirror getLocalMatrixHost() const { return getTpetra_CrsMatrixNonConst()->getLocalMatrixHost(); @@ -408,7 +403,6 @@ class TpetraCrsMatrix const typename local_matrix_type::values_type &val) { getTpetra_CrsMatrixNonConst()->setAllValues(ptr, ind, val); } -#endif //! Returns the block size of the storage mechanism, which is usually 1, except for Tpetra::BlockCrsMatrix LocalOrdinal GetStorageBlockSize() const { return 1; } @@ -424,803 +418,6 @@ class TpetraCrsMatrix RCP > mtx_; }; // TpetraCrsMatrix class -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization of TpetraCrsMatrix for GO=LO=int -template -class TpetraCrsMatrix - : public CrsMatrix //, public TpetraRowMatrix -{ - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraCrsMatrix TpetraCrsMatrixClass; - typedef TpetraVector TpetraVectorClass; - typedef TpetraImport TpetraImportClass; - typedef TpetraExport TpetraExportClass; - - // The following typedefs are used by the Kokkos interface -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor specifying fixed number of entries for each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying (possibly different) number of entries in each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and number of entries in each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor specifying a previously constructed graph. - TpetraCrsMatrix(const Teuchos::RCP > &graph, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor for a fused import - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor for a fused export - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor for a fused import - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor for a fused export - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Constructor specifying column Map and a local matrix, - /// which the resulting CrsMatrix views. - /// - /// Unlike most other CrsMatrix constructors, successful - /// completion of this constructor will result in a fill-complete - /// matrix. - /// - /// \param rowMap [in] Distribution of rows of the matrix. - /// - /// \param colMap [in] Distribution of columns of the matrix. - /// - /// \param lclMatrix [in] A local CrsMatrix containing all local - /// matrix values as well as a local graph. The graph's local - /// row indices must come from the specified row Map, and its - /// local column indices must come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const local_matrix_type &lclMatrix, - const Teuchos::RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), "TpetraCrsMatrix", "int", typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying local matrix and 4 maps - TpetraCrsMatrix( - const local_matrix_type &lclMatrix, - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), "TpetraCrsMatrix", "int", typeid(EpetraNode).name()); - } -#endif - - //! Destructor. - virtual ~TpetraCrsMatrix() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert matrix entries, using global IDs. - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Insert matrix entries, using local IDs. - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using global IDs. - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using local IDs. - void - replaceLocalValues(LocalOrdinal localRow, - const ArrayView &cols, - const ArrayView &vals) {} - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) {} - - //! Scale the current values of a matrix, this = alpha*this. - void scale(const Scalar &alpha) {} - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) {} - - //! Sets the 1D pointer arrays of the graph. - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) {} - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const {} - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &values) {} - - bool haveGlobalConstants() const { return false; } - - //@} - - //! @name Transformational Methods - //@{ - - //! - void resumeFill(const RCP ¶ms = null) {} - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) {} - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) {} - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) {} - - //! Expert static fill complete - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP ¶ms = Teuchos::null) {} - - //@} - - //! @name Methods implementing RowMatrix - //@{ - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { return Teuchos::null; } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { return Teuchos::null; } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { return 0; } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { return 0; } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of entries in the (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { return false; } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { return false; } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { return false; } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { return false; } - - //! Returns the Frobenius norm of the matrix. - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { return ScalarTraits::magnitude(ScalarTraits::zero()); } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { return false; } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const {} - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &indices, const ArrayView &values, size_t &numEntries) const {} - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const {} - - //@} - - //! @name Methods implementing Operator - //@{ - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const {} - - //! Computes the matrix-multivector multiplication for region layout matrices - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP > ®ionInterfaceImporter, const Teuchos::ArrayRCP ®ionInterfaceLIDs) const {} - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { return Teuchos::null; } - - //! - const RCP > getRangeMap() const { return Teuchos::null; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Overridden from Teuchos::LabeledObject - //@{ - void setObjectLabel(const std::string &objectLabel) {} - //@} - - //! Deep copy constructor - TpetraCrsMatrix(const TpetraCrsMatrix &matrix) {} - - //! Get a copy of the diagonal entries owned by this node, with local row idices. - void getLocalDiagCopy(Vector &diag) const {} - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Teuchos::ArrayView &offsets) const {} - - //! Replace the diagonal entries of the matrix - void replaceDiag(const Vector &diag) {} - - //! Left scale operator with given vector values - void leftScale(const Vector &x) {} - - //! Right scale operator with given vector values - void rightScale(const Vector &x) {} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) {} - - // @} - //! @name Xpetra specific - //@{ - - //! Does this have an underlying matrix - bool hasMatrix() const { return false; } - - //! TpetraCrsMatrix constructor to wrap a Tpetra::CrsMatrix object - TpetraCrsMatrix(const Teuchos::RCP > &mtx) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "int", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_CrsMatrix() const { return Teuchos::null; } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_CrsMatrixNonConst() const { return Teuchos::null; } // TODO: remove - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Access the local Kokkos::CrsMatrix data - local_matrix_type getLocalMatrix() const { - TEUCHOS_UNREACHABLE_RETURN(local_matrix_type()); - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) {} -#endif - - //! Returns the block size of the storage mechanism, which is usually 1, except for Tpetra::BlockCrsMatrix - LocalOrdinal GetStorageBlockSize() const { return 1; } - - //! Compute a residual R = B - (*this) * X - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const {} - - //@} -}; // TpetraCrsMatrix class (specialization for GO=int, NO=EpetraNode) -#endif - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// specialization of TpetraCrsMatrix for GO=long long, NO=EpetraNode -template -class TpetraCrsMatrix - : public CrsMatrix //, public TpetraRowMatrix -{ - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraCrsMatrix TpetraCrsMatrixClass; - typedef TpetraVector TpetraVectorClass; - typedef TpetraImport TpetraImportClass; - typedef TpetraExport TpetraExportClass; - - // The following typedefs are used by the Kokkos interface -#ifdef HAVE_XPETRA_TPETRA - typedef typename Xpetra::CrsMatrix::local_matrix_type local_matrix_type; -#endif - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Constructor specifying fixed number of entries for each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying (possibly different) number of entries in each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and fixed number of entries for each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying column Map and number of entries in each row. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, const Teuchos::RCP > &colMap, const ArrayRCP &NumEntriesPerRowToAlloc, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor specifying a previously constructed graph. - TpetraCrsMatrix(const Teuchos::RCP > &graph, const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor for a fused import - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &importer, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor for a fused export - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &exporter, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = Teuchos::null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor for a fused import - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Import &RowImporter, - const Teuchos::RCP > DomainImporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor for a fused export - TpetraCrsMatrix(const Teuchos::RCP > &sourceMatrix, - const Export &RowExporter, - const Teuchos::RCP > DomainExporter, - const Teuchos::RCP > &domainMap, - const Teuchos::RCP > &rangeMap, - const Teuchos::RCP ¶ms) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Constructor specifying column Map and a local matrix, - /// which the resulting CrsMatrix views. - /// - /// Unlike most other CrsMatrix constructors, successful - /// completion of this constructor will result in a fill-complete - /// matrix. - /// - /// \param rowMap [in] Distribution of rows of the matrix. - /// - /// \param colMap [in] Distribution of columns of the matrix. - /// - /// \param lclMatrix [in] A local CrsMatrix containing all local - /// matrix values as well as a local graph. The graph's local - /// row indices must come from the specified row Map, and its - /// local column indices must come from the specified column - /// Map. - /// - /// \param params [in/out] Optional list of parameters. If not - /// null, any missing parameters will be filled in with their - /// default values. - TpetraCrsMatrix(const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const local_matrix_type &lclMatrix, - const Teuchos::RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - /// \brief Constructor specifying local matrix and 4 maps - TpetraCrsMatrix( - const local_matrix_type &lclMatrix, - const Teuchos::RCP > &rowMap, - const Teuchos::RCP > &colMap, - const Teuchos::RCP > &domainMap = Teuchos::null, - const Teuchos::RCP > &rangeMap = Teuchos::null, - const Teuchos::RCP ¶ms = null) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } -#endif - - //! Destructor. - virtual ~TpetraCrsMatrix() {} - - //@} - - //! @name Insertion/Removal Methods - //@{ - - //! Insert matrix entries, using global IDs. - void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Insert matrix entries, using local IDs. - void insertLocalValues(LocalOrdinal localRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using global IDs. - void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView &cols, const ArrayView &vals) {} - - //! Replace matrix entries, using local IDs. - void - replaceLocalValues(LocalOrdinal localRow, - const ArrayView &cols, - const ArrayView &vals) {} - - //! Set all matrix entries equal to scalarThis. - void setAllToScalar(const Scalar &alpha) {} - - //! Scale the current values of a matrix, this = alpha*this. - void scale(const Scalar &alpha) {} - - //! Allocates and returns ArrayRCPs of the Crs arrays --- This is an Xpetra-only routine. - //** \warning This is an expert-only routine and should not be called from user code. */ - void allocateAllValues(size_t numNonZeros, ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) {} - - //! Sets the 1D pointer arrays of the graph. - void setAllValues(const ArrayRCP &rowptr, const ArrayRCP &colind, const ArrayRCP &values) {} - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &rowptr, ArrayRCP &colind, ArrayRCP &values) const {} - - //! Gets the 1D pointer arrays of the graph. - void getAllValues(ArrayRCP &values) {} - - bool haveGlobalConstants() const { return false; } - - //@} - - //! @name Transformational Methods - //@{ - - //! - void resumeFill(const RCP ¶ms = null) {} - - //! Signal that data entry is complete, specifying domain and range maps. - void fillComplete(const RCP > &domainMap, const RCP > &rangeMap, const RCP ¶ms = null) {} - - //! Signal that data entry is complete. - void fillComplete(const RCP ¶ms = null) {} - - //! Replaces the current domainMap and importer with the user-specified objects. - void replaceDomainMapAndImporter(const Teuchos::RCP > &newDomainMap, Teuchos::RCP > &newImporter) {} - - //! Expert static fill complete - void expertStaticFillComplete(const RCP > &domainMap, - const RCP > &rangeMap, - const RCP > &importer = Teuchos::null, - const RCP > &exporter = Teuchos::null, - const RCP ¶ms = Teuchos::null) {} - - //@} - - //! @name Methods implementing RowMatrix - //@{ - - //! Returns the Map that describes the row distribution in this matrix. - const RCP > getRowMap() const { return Teuchos::null; } - - //! Returns the Map that describes the column distribution in this matrix. - const RCP > getColMap() const { return Teuchos::null; } - - //! Returns the CrsGraph associated with this matrix. - RCP > getCrsGraph() const { return Teuchos::null; } - - //! Number of global elements in the row map of this matrix. - global_size_t getGlobalNumRows() const { return 0; } - - //! Number of global columns in the matrix. - global_size_t getGlobalNumCols() const { return 0; } - - //! Returns the number of matrix rows owned on the calling node. - size_t getLocalNumRows() const { return 0; } - - //! Returns the number of columns connected to the locally owned rows of this matrix. - size_t getLocalNumCols() const { return 0; } - - //! Returns the global number of entries in this matrix. - global_size_t getGlobalNumEntries() const { return 0; } - - //! Returns the local number of entries in this matrix. - size_t getLocalNumEntries() const { return 0; } - - //! Returns the current number of entries on this node in the specified local row. - size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; } - - //! Returns the current number of entries in the (locally owned) global row. - size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on all nodes. - size_t getGlobalMaxNumRowEntries() const { return 0; } - - //! Returns the maximum number of entries across all rows/columns on this node. - size_t getLocalMaxNumRowEntries() const { return 0; } - - //! If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. - bool isLocallyIndexed() const { return false; } - - //! If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. - bool isGloballyIndexed() const { return false; } - - //! Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. - bool isFillComplete() const { return false; } - - //! Returns true if the matrix is in edit mode. - bool isFillActive() const { return false; } - - //! Returns the Frobenius norm of the matrix. - typename ScalarTraits::magnitudeType getFrobeniusNorm() const { return ScalarTraits::magnitude(ScalarTraits::zero()); } - - //! Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. - bool supportsRowViews() const { return false; } - - //! Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. - void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView &Indices, const ArrayView &Values, size_t &NumEntries) const {} - - //! Extract a const, non-persisting view of global indices in a specified row of the matrix. - void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const {} - - //! Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. - void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView &indices, const ArrayView &values, size_t &numEntries) const {} - - //! Extract a const, non-persisting view of local indices in a specified row of the matrix. - void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const {} - - //@} - - //! @name Methods implementing Operator - //@{ - - //! Computes the sparse matrix-multivector multiplication. - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = ScalarTraits::one(), Scalar beta = ScalarTraits::zero()) const {} - - //! Computes the matrix-multivector multiplication for region layout matrices - void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP > ®ionInterfaceImporter, const Teuchos::ArrayRCP ®ionInterfaceLIDs) const {} - - //! Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. - const RCP > getDomainMap() const { return Teuchos::null; } - - //! - const RCP > getRangeMap() const { return Teuchos::null; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Overridden from Teuchos::LabeledObject - //@{ - void setObjectLabel(const std::string &objectLabel) {} - //@} - - //! Deep copy constructor - TpetraCrsMatrix(const TpetraCrsMatrix &matrix) {} - - //! Get a copy of the diagonal entries owned by this node, with local row idices. - void getLocalDiagCopy(Vector &diag) const {} - - //! Get offsets of the diagonal entries in the matrix. - void getLocalDiagOffsets(Teuchos::ArrayRCP &offsets) const {} - - //! Get a copy of the diagonal entries owned by this node, with local row indices. - void getLocalDiagCopy(Vector &diag, const Teuchos::ArrayView &offsets) const {} - - //! Replace the diagonal entries of the matrix - void replaceDiag(const Vector &diag) {} - - //! Left scale operator with given vector values - void leftScale(const Vector &x) {} - - //! Right scale operator with given vector values - void rightScale(const Vector &x) {} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void removeEmptyProcessesInPlace(const Teuchos::RCP > &newMap) {} - - // @} - //! @name Xpetra specific - //@{ - - //! Does this have an underlying matrix - bool hasMatrix() const { return false; } - - //! TpetraCrsMatrix constructor to wrap a Tpetra::CrsMatrix object - TpetraCrsMatrix(const Teuchos::RCP > &mtx) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraCrsMatrix).name(), typeid(TpetraCrsMatrix).name(), "long long", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_CrsMatrix() const { return Teuchos::null; } - - //! Get the underlying Tpetra matrix - RCP > getTpetra_CrsMatrixNonConst() const { return Teuchos::null; } // TODO: remove - -#ifdef HAVE_XPETRA_TPETRA - /// \brief Access the local Kokkos::CrsMatrix data - local_matrix_type getLocalMatrix() const { - TEUCHOS_UNREACHABLE_RETURN(local_matrix_type()); - } - - /// \brief Access the local Kokkos::CrsMatrix data - typename local_matrix_type::HostMirror getLocalMatrixHost() const { - TEUCHOS_UNREACHABLE_RETURN(typename local_matrix_type::HostMirror()); - } - /// \brief Access the local Kokkos::CrsMatrix data - local_matrix_type getLocalMatrixDevice() const { - TEUCHOS_UNREACHABLE_RETURN(local_matrix_type()); - } - - void setAllValues(const typename local_matrix_type::row_map_type &ptr, - const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, - const typename local_matrix_type::values_type &val) {} -#endif - - //! Returns the block size of the storage mechanism, which is usually 1, except for Tpetra::BlockCrsMatrix - LocalOrdinal GetStorageBlockSize() const { return 1; } - - //! Compute a residual R = B - (*this) * X - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const {} - - //@} -}; // TpetraCrsMatrix class (specialization for GO=long long, NO=EpetraNode) -#endif - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #define XPETRA_TPETRACRSMATRIX_SHORT diff --git a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_def.hpp b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_def.hpp index ae22f4e946ca..6526f69e1e94 100644 --- a/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_def.hpp +++ b/packages/xpetra/src/CrsMatrix/Xpetra_TpetraCrsMatrix_def.hpp @@ -112,7 +112,6 @@ TpetraCrsMatrix::TpetraCrsMatrix(cons /////////////////////////////////////////////////////////////////////////////////////// -#ifdef HAVE_XPETRA_TPETRA template TpetraCrsMatrix::TpetraCrsMatrix(const Teuchos::RCP> &rowMap, const Teuchos::RCP> &colMap, @@ -141,7 +140,6 @@ TpetraCrsMatrix::TpetraCrsMatrix( const Teuchos::RCP> &exporter, const Teuchos::RCP ¶ms) : mtx_(Teuchos::rcp(new Tpetra::CrsMatrix(lclMatrix, toTpetra(rowMap), toTpetra(colMap), toTpetra(domainMap), toTpetra(rangeMap), toTpetra(importer), toTpetra(exporter), params))) {} -#endif template TpetraCrsMatrix::~TpetraCrsMatrix() {} diff --git a/packages/xpetra/src/Export/Xpetra_EpetraExport.cpp b/packages/xpetra/src/Export/Xpetra_EpetraExport.cpp deleted file mode 100644 index eafe67b62f88..000000000000 --- a/packages/xpetra/src/Export/Xpetra_EpetraExport.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_Exceptions.hpp" - -namespace Xpetra { - -template -RCP > toXpetra(const Epetra_Export *exp) { - if (exp != NULL) { - RCP eexp = rcp(new Epetra_Export(*exp)); // NOTE: non consitent: return pointer, take ref - return rcp(new Xpetra::EpetraExportT(eexp)); - } - - return Teuchos::null; -} - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraExportT; -template RCP > toXpetra(const Epetra_Export *); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/Export/Xpetra_EpetraExport.hpp b/packages/xpetra/src/Export/Xpetra_EpetraExport.hpp deleted file mode 100644 index 7a08c27edd4d..000000000000 --- a/packages/xpetra/src/Export/Xpetra_EpetraExport.hpp +++ /dev/null @@ -1,174 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAEXPORT_HPP -#define XPETRA_EPETRAEXPORT_HPP - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_Export.hpp" - -#include "Xpetra_EpetraMap.hpp" //TMP - -#include "Epetra_Export.h" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Export/Xpetra_EpetraExport.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Export/Xpetra_EpetraExport.hpp is deprecated." -#endif - -// Note: 'export' is a reserved keyword in C++. Do not use 'export' as a variable name. - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED const Epetra_Export &toEpetra(const Export &); -template -XPETRA_DEPRECATED RCP > toXpetra(const Epetra_Export *exp); - -template -class XPETRA_DEPRECATED EpetraExportT - : public Export { - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - //! The specialization of Map used by this class. - typedef Map map_type; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Construct a Export object from the source and target Map. - EpetraExportT(const Teuchos::RCP &source, const Teuchos::RCP &target) - : export_(rcp(new Epetra_Export(toEpetra(source), toEpetra(target)))) {} // Warning: Epetra(Target, Source) vs. Tpetra(Source, Target) - - ////! Constructor (with list of parameters). - // Definition not in cpp, so comment out - // EpetraExportT(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist); - - ////! Copy constructor. - // Definition not in cpp, so comment out - // EpetraExportT(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs); - - //! Destructor. - ~EpetraExportT() {} - - //@} - - //! @name Export Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { - XPETRA_MONITOR("EpetraExportT::getNumSameIDs"); - return export_->NumSameIDs(); - } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { - XPETRA_MONITOR("EpetraExportT::getNumPermuteIDs"); - return export_->NumPermuteIDs(); - } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { - XPETRA_MONITOR("EpetraExportT::getPermuteFromLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getExportImageIDs not implemented"); - } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { - XPETRA_MONITOR("EpetraExportT::getPermuteToLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getPermuteToLIDs not implemented"); - } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { - XPETRA_MONITOR("EpetraExportT::getNumRemoteIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getNumRemoteIDs not implemented"); - } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { - XPETRA_MONITOR("EpetraExportT::getRemoteLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getRemoteLIDs not implemented"); - } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { - XPETRA_MONITOR("EpetraExportT::getNumExportIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getNumExportIDs not implemented"); - } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { - XPETRA_MONITOR("EpetraExportT::getExportLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraExportT::getExportLIDs not implemented"); - } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { - XPETRA_MONITOR("EpetraExportT::getExportImageIDs"); - return ArrayView(export_->ExportPIDs(), export_->NumExportIDs()); - } - - //! The source Map used to construct this Export. - Teuchos::RCP > getSourceMap() const { - XPETRA_MONITOR("EpetraExportT::getSourceMap"); - return toXpetra(export_->SourceMap()); - } - - //! The target Map used to construct this Export. - Teuchos::RCP > getTargetMap() const { - XPETRA_MONITOR("EpetraExportT::getTargetMap"); - return toXpetra(export_->TargetMap()); - } - - //! Set parameters on the underlying object - void setDistributorParameters(const Teuchos::RCP params) const { XPETRA_MONITOR("EpetraExportT::setDistributorParameters"); } - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Export's data to the given output stream. - void print(std::ostream &os) const { - XPETRA_MONITOR("EpetraExportT::"); - export_->Print(os); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraExportT constructor to wrap a Epetra_Export object - EpetraExportT(const RCP &exp) - : export_(exp) {} - - //! Get the underlying Epetra export - RCP getEpetra_Export() const { return export_; } - - //@} - - private: - RCP export_; - -}; // EpetraExportT class - -} // namespace Xpetra - -#endif // XPETRA_EPETRAEXPORT_HPP diff --git a/packages/xpetra/src/Export/Xpetra_ExportFactory.hpp b/packages/xpetra/src/Export/Xpetra_ExportFactory.hpp index 2de1c0bb6fc5..4311a40203c7 100644 --- a/packages/xpetra/src/Export/Xpetra_ExportFactory.hpp +++ b/packages/xpetra/src/Export/Xpetra_ExportFactory.hpp @@ -14,12 +14,7 @@ #include "Xpetra_Export.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraExport.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraExport.hpp" -#endif #include "Xpetra_Exceptions.hpp" @@ -39,10 +34,8 @@ class ExportFactory { XPETRA_MONITOR("ExportFactory::Build"); TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); -#ifdef HAVE_XPETRA_TPETRA if (source->lib() == UseTpetra) return rcp(new TpetraExport(source, target)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(source->lib()); XPETRA_FACTORY_END; @@ -50,66 +43,8 @@ class ExportFactory { }; // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)) -template <> -class ExportFactory { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - ExportFactory() {} - - public: - static RCP > Build(const RCP > &source, const RCP > &target) { - XPETRA_MONITOR("ExportFactory::Build"); - - TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); - -#ifdef HAVE_XPETRA_TPETRA - if (source->lib() == UseTpetra) - return rcp(new TpetraExport(source, target)); -#endif - - if (source->lib() == UseEpetra) - return rcp(new EpetraExportT(source, target)); - - XPETRA_FACTORY_END; - } -}; -#endif // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)) -template <> -class ExportFactory { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - ExportFactory() {} - - public: - static RCP > Build(const RCP > &source, const RCP > &target) { - XPETRA_MONITOR("ExportFactory::Build"); - - TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); - -#ifdef HAVE_XPETRA_TPETRA - if (source->lib() == UseTpetra) - return rcp(new TpetraExport(source, target)); -#endif - - if (source->lib() == UseEpetra) - return rcp(new EpetraExportT(source, target)); - - XPETRA_FACTORY_END; - } -}; -#endif } // namespace Xpetra diff --git a/packages/xpetra/src/Export/Xpetra_TpetraExport_def.hpp b/packages/xpetra/src/Export/Xpetra_TpetraExport_def.hpp index b43bff8435a0..4c38f93d2981 100644 --- a/packages/xpetra/src/Export/Xpetra_TpetraExport_def.hpp +++ b/packages/xpetra/src/Export/Xpetra_TpetraExport_def.hpp @@ -160,242 +160,6 @@ TpetraExport:: return export_; } -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// stub implementation for GO=int and NO=EpetraNode -template <> -class TpetraExport - : public Export { - public: - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - - //! @name Constructor/Destructor Methods - //@{ - - //! Construct a Export object from the source and target Map. - TpetraExport(const Teuchos::RCP& source, const Teuchos::RCP& target) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Constructor (with list of parameters). - TpetraExport(const Teuchos::RCP& source, - const Teuchos::RCP& target, - const Teuchos::RCP& plist) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Copy constructor. - TpetraExport(const Export& rhs) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraExport() {} - - //@} - - //! @name Export Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { return 0; } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { return 0; } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { return Teuchos::ArrayView(); } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { return 0; } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { return 0; } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { return Teuchos::ArrayView(); } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { return Teuchos::ArrayView(); } - - //! The source Map used to construct this Export. - Teuchos::RCP> getSourceMap() const { return Teuchos::null; } - - //! The target Map used to construct this Export. - Teuchos::RCP> getTargetMap() const { return Teuchos::null; } - - //! Set parameters on the underlying object - void setDistributorParameters(const Teuchos::RCP params) const {}; - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Export's data to the given output stream. - void print(std::ostream& os) const { /* noop */ - } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraExport constructor to wrap a Tpetra::Export object - TpetraExport(const RCP>& exp) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "int", - typeid(EpetraNode).name()); - } - - RCP> getTpetra_Export() const { return Teuchos::null; } - - //@} - -}; // TpetraExport class (specialization for LO=GO=int) -#endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// stub implementation for GO=long long and NO=EpetraNode -template <> -class TpetraExport - : public Export { - public: - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - - //! @name Constructor/Destructor Methods - //@{ - - //! Construct a Export object from the source and target Map. - TpetraExport(const Teuchos::RCP& source, const Teuchos::RCP& target) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Constructor (with list of parameters). - TpetraExport(const Teuchos::RCP& source, - const Teuchos::RCP& target, - const Teuchos::RCP& plist) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Copy constructor. - TpetraExport(const Export& rhs) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraExport() {} - - //@} - - //! @name Export Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { return 0; } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { return 0; } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { return Teuchos::ArrayView(); } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { return 0; } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { return 0; } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { return Teuchos::ArrayView(); } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { return Teuchos::ArrayView(); } - - //! The source Map used to construct this Export. - Teuchos::RCP> getSourceMap() const { return Teuchos::null; } - - //! The target Map used to construct this Export. - Teuchos::RCP> getTargetMap() const { return Teuchos::null; } - - //! Set parameters on the underlying object - void setDistributorParameters(const Teuchos::RCP params) const {}; - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Export's data to the given output stream. - void print(std::ostream& os) const { /* noop */ - } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraExport constructor to wrap a Tpetra::Export object - TpetraExport(const RCP>& exp) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraExport).name(), - typeid(TpetraExport).name(), - "long long", - typeid(EpetraNode).name()); - } - - RCP> getTpetra_Export() const { return Teuchos::null; } - - //@} - -}; // TpetraExport class (specialization for GO=long long, NO=EpetraNode) -#endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #endif // XPETRA_TPETRAEXPORT_DEF_HPP diff --git a/packages/xpetra/src/Headers/Xpetra_ConfigDefs.hpp b/packages/xpetra/src/Headers/Xpetra_ConfigDefs.hpp index cf3fd2b6ec62..9de258427e98 100644 --- a/packages/xpetra/src/Headers/Xpetra_ConfigDefs.hpp +++ b/packages/xpetra/src/Headers/Xpetra_ConfigDefs.hpp @@ -50,9 +50,7 @@ #include #include -#if defined(HAVE_XPETRA_TPETRA) #include -#endif //! %Xpetra namespace namespace Xpetra { diff --git a/packages/xpetra/src/Headers/Xpetra_EpetraConfigDefs.hpp b/packages/xpetra/src/Headers/Xpetra_EpetraConfigDefs.hpp deleted file mode 100644 index c090eeb81bd7..000000000000 --- a/packages/xpetra/src/Headers/Xpetra_EpetraConfigDefs.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRACONFIGDEFS_HPP -#define XPETRA_EPETRACONFIGDEFS_HPP - -#include "Xpetra_ConfigDefs.hpp" - -#ifndef HAVE_XPETRA_EPETRA -#error This file should be included only if HAVE_XPETRA_EPETRA is defined. -#endif - -#endif // XPETRA_EPETRACONFIGDEFS_HPP diff --git a/packages/xpetra/src/Headers/Xpetra_TpetraConfigDefs.hpp b/packages/xpetra/src/Headers/Xpetra_TpetraConfigDefs.hpp index e8832a091fd5..908839a9a159 100644 --- a/packages/xpetra/src/Headers/Xpetra_TpetraConfigDefs.hpp +++ b/packages/xpetra/src/Headers/Xpetra_TpetraConfigDefs.hpp @@ -12,8 +12,4 @@ #include "Xpetra_ConfigDefs.hpp" -#ifndef HAVE_XPETRA_TPETRA -#error This file should be included only if HAVE_XPETRA_TPETRA is defined. -#endif - #endif // XPETRA_TPETRACONFIGDEFS_HPP diff --git a/packages/xpetra/src/Import/Xpetra_EpetraImport.cpp b/packages/xpetra/src/Import/Xpetra_EpetraImport.cpp deleted file mode 100644 index 26a4aaca4cbc..000000000000 --- a/packages/xpetra/src/Import/Xpetra_EpetraImport.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_Exceptions.hpp" - -namespace Xpetra { - -template -RCP > toXpetra(const Epetra_Import *import) { - if (import != NULL) { - RCP imp = rcp(new Epetra_Import(*import)); // NOTE: non consitent: return pointer, take ref - return rcp(new Xpetra::EpetraImportT(imp)); - } - - return Teuchos::null; -} -// - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif // HAVE_XPETRA_TPETRA -#endif // XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraImportT; -template RCP > toXpetra(const Epetra_Import *); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp b/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp deleted file mode 100644 index 3923ff943305..000000000000 --- a/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp +++ /dev/null @@ -1,181 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAIMPORT_HPP -#define XPETRA_EPETRAIMPORT_HPP - -/* this file is automatically generated - do not edit (see script/epetra.py) */ - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_Import.hpp" - -#include "Xpetra_EpetraMap.hpp" //TMP - -#include "Epetra_Import.h" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp is deprecated." -#endif - -namespace Xpetra { - -template -XPETRA_DEPRECATED RCP > toXpetra(const Epetra_Import *import); -// - -template -class XPETRA_DEPRECATED EpetraImportT - : public Import { - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - //! The specialization of Map used by this class. - typedef Map map_type; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Construct an Import from the source and target Maps. - EpetraImportT(const Teuchos::RCP &source, const Teuchos::RCP &target) - : import_(rcp(new Epetra_Import(toEpetra(target), toEpetra(source)))) {} // Warning: Epetra(Target, Source) vs. Tpetra(Source, Target) - - ////! Constructor (with list of parameters). - // Definition not in cpp, so comment out - // EpetraImportT(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist); - - ////! Copy constructor. - // Definition commented out in cpp - // EpetraImportT(const Import< LocalOrdinal, GlobalOrdinal, Node > &import); - - //! Destructor. - ~EpetraImportT() {} - - //! Special "constructor" - Teuchos::RCP > - createRemoteOnlyImport(const Teuchos::RCP &remoteTarget) const { TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::createRemoteOnlyImport not implemented"); } - - //@} - - //! @name Import Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { - XPETRA_MONITOR("EpetraImportT::getNumSameIDs"); - return import_->NumSameIDs(); - } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { - XPETRA_MONITOR("EpetraImportT::getNumPermuteIDs"); - return import_->NumPermuteIDs(); - } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { - XPETRA_MONITOR("EpetraImportT::getPermuteFromLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::getExportImageIDs not implemented"); - } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { - XPETRA_MONITOR("EpetraImportT::getPermuteToLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::getPermuteToLIDs not implemented"); - } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { - XPETRA_MONITOR("EpetraImportT::getNumRemoteIDs"); - return import_->NumRemoteIDs(); - } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { - XPETRA_MONITOR("EpetraImportT::getRemoteLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::getRemoteLIDs not implemented"); - } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemotePIDs() const { - XPETRA_MONITOR("EpetraImportT::getRemotePIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::getRemotePIDs not implemented"); - } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { - XPETRA_MONITOR("EpetraImportT::getNumExportIDs"); - return import_->NumExportIDs(); - } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { - XPETRA_MONITOR("EpetraImportT::getExportLIDs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO EpetraImportT::getExportLIDs not implemented"); - } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { - XPETRA_MONITOR("EpetraImportT::getExportImageIDs"); - return ArrayView(import_->ExportPIDs(), import_->NumExportIDs()); - } - - //! The Source Map used to construct this Import object. - Teuchos::RCP > getSourceMap() const { - XPETRA_MONITOR("EpetraImportT::getSourceMap"); - return toXpetra(import_->SourceMap()); - } - - //! The Target Map used to construct this Import object. - Teuchos::RCP > getTargetMap() const { - XPETRA_MONITOR("EpetraImportT::getTargetMap"); - return toXpetra(import_->TargetMap()); - } - - void setDistributorParameters(const Teuchos::RCP params) const { XPETRA_MONITOR("EpetraImportT::setDistributorParameters"); } - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Import's data to the given output stream. - void print(std::ostream &os) const { - XPETRA_MONITOR("EpetraImportT::print"); - import_->Print(os); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraImportT constructor to wrap a Epetra_Import object - EpetraImportT(const RCP &import) - : import_(import) {} - - //! Get the underlying Epetra import - RCP getEpetra_Import() const { return import_; } - - //@} - - private: - RCP import_; - -}; // EpetraImportT class - -} // namespace Xpetra - -#endif // XPETRA_EPETRAIMPORT_HPP diff --git a/packages/xpetra/src/Import/Xpetra_ImportFactory.hpp b/packages/xpetra/src/Import/Xpetra_ImportFactory.hpp index 620e22da1249..71bbb18f5a88 100644 --- a/packages/xpetra/src/Import/Xpetra_ImportFactory.hpp +++ b/packages/xpetra/src/Import/Xpetra_ImportFactory.hpp @@ -14,12 +14,7 @@ #include "Xpetra_Import.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraImport.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraImport.hpp" -#endif #include "Xpetra_Exceptions.hpp" @@ -42,10 +37,8 @@ class ImportFactory { TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); -#ifdef HAVE_XPETRA_TPETRA if (source->lib() == UseTpetra) return rcp(new TpetraImport(source, target, plist)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(source->lib()); XPETRA_FACTORY_END; @@ -53,72 +46,8 @@ class ImportFactory { }; // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)) - -// Specialization on LO=GO=int with serial node. -// Used for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only -template <> -class ImportFactory { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - ImportFactory() {} - - public: - static RCP > Build(const RCP > &source, - const RCP > &target, - const Teuchos::RCP &plist = Teuchos::null) { - XPETRA_MONITOR("ImportFactory::Build"); - TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); - -#ifdef HAVE_XPETRA_TPETRA - if (source->lib() == UseTpetra) - return rcp(new TpetraImport(source, target, plist)); -#endif - - if (source->lib() == UseEpetra) - return rcp(new EpetraImportT(source, target)); - - XPETRA_FACTORY_END; - } -}; -#endif // we need the Epetra specialization only if Epetra is enabled -#if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)) -template <> -class ImportFactory { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - ImportFactory() {} - - public: - static RCP > Build(const RCP > &source, - const RCP > &target, - const Teuchos::RCP &plist = Teuchos::null) { - XPETRA_MONITOR("ImportFactory::Build"); - TEUCHOS_TEST_FOR_EXCEPTION(source->lib() != target->lib(), Xpetra::Exceptions::RuntimeError, ""); - -#ifdef HAVE_XPETRA_TPETRA - if (source->lib() == UseTpetra) - return rcp(new TpetraImport(source, target, plist)); -#endif - - if (source->lib() == UseEpetra) - return rcp(new EpetraImportT(source, target)); - - XPETRA_FACTORY_END; - } -}; -#endif } // namespace Xpetra #define XPETRA_IMPORTFACTORY_SHORT diff --git a/packages/xpetra/src/Import/Xpetra_TpetraImport_def.hpp b/packages/xpetra/src/Import/Xpetra_TpetraImport_def.hpp index 4a53e66ea5b8..b2aea6660d37 100644 --- a/packages/xpetra/src/Import/Xpetra_TpetraImport_def.hpp +++ b/packages/xpetra/src/Import/Xpetra_TpetraImport_def.hpp @@ -131,226 +131,6 @@ TpetraImport::TpetraImport(const RCP RCP > TpetraImport::getTpetra_Import() const { return import_; } -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// stub implementation for GO=int and NO=EpetraNode -template <> -class TpetraImport : public Import { - public: - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - - //! @name Constructor/Destructor Methods - //@{ - - //! Construct an Import from the source and target Maps. - TpetraImport(const Teuchos::RCP &source, const Teuchos::RCP &target) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor (with list of parameters). - TpetraImport(const Teuchos::RCP &source, const Teuchos::RCP &target, const Teuchos::RCP &plist) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "int", typeid(EpetraNode).name()); - } - - //! Copy constructor. - TpetraImport(const Import &import) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "int", typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraImport() {} - - //! Special "constructor" - Teuchos::RCP > - createRemoteOnlyImport(const Teuchos::RCP &remoteTarget) const { - return Teuchos::null; - } - - //@} - - //! @name Import Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { return 0; } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { return 0; } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { return Teuchos::ArrayView(); } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { return 0; } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { return 0; } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { return Teuchos::ArrayView(); } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { return Teuchos::ArrayView(); } - - //! The Source Map used to construct this Import object. - Teuchos::RCP > getSourceMap() const { return Teuchos::null; } - - //! The Target Map used to construct this Import object. - Teuchos::RCP > getTargetMap() const { return Teuchos::null; } - - //! Set parameters on the underlying object - void setDistributorParameters(const Teuchos::RCP params) const {} - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Import's data to the given output stream. - void print(std::ostream &os) const { /* noop */ - } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraImport constructor to wrap a Tpetra::Import object - TpetraImport(const RCP > &import) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "int", typeid(EpetraNode).name()); - } - - RCP > getTpetra_Import() const { return Teuchos::null; } - - //@} - -}; // TpetraImport class (stub implementation for GO=int, NO=EpetraNode) -#endif - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// stub implementation for GO=long long and NO=EpetraNode -template <> -class TpetraImport : public Import { - public: - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - //! The specialization of Map used by this class. - typedef Map map_type; - - //! @name Constructor/Destructor Methods - //@{ - - //! Construct an Import from the source and target Maps. - TpetraImport(const Teuchos::RCP &source, const Teuchos::RCP &target) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor (with list of parameters). - TpetraImport(const Teuchos::RCP &source, const Teuchos::RCP &target, const Teuchos::RCP &plist) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "long long", typeid(EpetraNode).name()); - } - - //! Copy constructor. - TpetraImport(const Import &import) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "long long", typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraImport() {} - - //! Special "constructor" - Teuchos::RCP > - createRemoteOnlyImport(const Teuchos::RCP &remoteTarget) const { - return Teuchos::null; - } - - //@} - - //! @name Import Attribute Methods - //@{ - - //! Number of initial identical IDs. - size_t getNumSameIDs() const { return 0; } - - //! Number of IDs to permute but not to communicate. - size_t getNumPermuteIDs() const { return 0; } - - //! List of local IDs in the source Map that are permuted. - ArrayView getPermuteFromLIDs() const { return Teuchos::ArrayView(); } - - //! List of local IDs in the target Map that are permuted. - ArrayView getPermuteToLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries not on the calling process. - size_t getNumRemoteIDs() const { return 0; } - - //! List of entries in the target Map to receive from other processes. - ArrayView getRemoteLIDs() const { return Teuchos::ArrayView(); } - - //! Number of entries that must be sent by the calling process to other processes. - size_t getNumExportIDs() const { return 0; } - - //! List of entries in the source Map that will be sent to other processes. - ArrayView getExportLIDs() const { return Teuchos::ArrayView(); } - - //! List of processes to which entries will be sent. - ArrayView getExportPIDs() const { return Teuchos::ArrayView(); } - - //! The Source Map used to construct this Import object. - Teuchos::RCP > getSourceMap() const { return Teuchos::null; } - - //! The Target Map used to construct this Import object. - Teuchos::RCP > getTargetMap() const { return Teuchos::null; } - - //! Set parameters on the underlying object - void setDistributorParameters(const Teuchos::RCP params) const {} - - //@} - - //! @name I/O Methods - //@{ - - //! Print the Import's data to the given output stream. - void print(std::ostream &os) const { /* noop */ - } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraImport constructor to wrap a Tpetra::Import object - TpetraImport(const RCP > &import) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraImport).name(), typeid(TpetraImport).name(), "long long", typeid(EpetraNode).name()); - } - - RCP > getTpetra_Import() const { return Teuchos::null; } - - //@} - -}; // TpetraImport class (stub implementation for GO=long long, NO=EpetraNode) -#endif - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #endif diff --git a/packages/xpetra/src/Map/Xpetra_EpetraMap.cpp b/packages/xpetra/src/Map/Xpetra_EpetraMap.cpp deleted file mode 100644 index 083c5cf5ab17..000000000000 --- a/packages/xpetra/src/Map/Xpetra_EpetraMap.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_ConfigDefs.hpp" - -#ifdef HAVE_XPETRA_EPETRA - -#include "Xpetra_EpetraMap.hpp" - -namespace Xpetra { - -template -const Epetra_Map &toEpetra(const Map &map) { - const EpetraMapT &epetraMap = dynamic_cast &>(*map.getMap()); - return epetraMap.getEpetra_Map(); -} - -template -const Epetra_Map &toEpetra(const RCP > &map) { - XPETRA_RCP_DYNAMIC_CAST(const EpetraMapT, map->getMap(), epetraMap, "toEpetra"); - return epetraMap->getEpetra_Map(); -} - -template -const RCP > toXpetra(const Epetra_BlockMap &map) { - RCP m = rcp(new Epetra_BlockMap(map)); - return rcp(new EpetraMapT(m)); -} - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif // HAVE_XPETRA_TPETRA - -#endif // XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#ifdef HAVE_TPETRA_INST_PTHREAD -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#ifdef HAVE_TPETRA_INST_OPENMP -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -// template class EpetraMapT; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif - -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template const RCP > toXpetra(const Epetra_BlockMap &map); -template const Epetra_Map &toEpetra(const RCP > &map); -template const Epetra_Map &toEpetra(const Map &map); -#endif // HAVE_XPETRA_TPETRA - -#endif // HAVE_XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -} // namespace Xpetra - -#endif // HAVE_XPETRA_EPETRA diff --git a/packages/xpetra/src/Map/Xpetra_EpetraMap.hpp b/packages/xpetra/src/Map/Xpetra_EpetraMap.hpp deleted file mode 100644 index 732b387175e8..000000000000 --- a/packages/xpetra/src/Map/Xpetra_EpetraMap.hpp +++ /dev/null @@ -1,1223 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAMAP_HPP -#define XPETRA_EPETRAMAP_HPP - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_Map.hpp" - -#include -#include - -#include "Xpetra_Utils.hpp" -#include "Xpetra_EpetraUtils.hpp" -#include "Xpetra_EpetraExceptions.hpp" - -#include "Xpetra_ConfigDefs.hpp" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Map/Xpetra_EpetraMap.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Map/Xpetra_EpetraMap.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED const Epetra_Map &toEpetra(const Map &); - -template -XPETRA_DEPRECATED const Epetra_Map &toEpetra(const RCP > &); - -// template -// const RCP< const Map > toXpetra(const RCP< const Epetra_Map > &); - -template -XPETRA_DEPRECATED const RCP > toXpetra(const Epetra_BlockMap &); - -// stub implementation for EpetraMapT -template -class XPETRA_DEPRECATED EpetraMapT - : public virtual Map { - typedef int LocalOrdinal; - - public: - typedef int local_ordinal_type; - typedef GlobalOrdinal global_ordinal_type; - typedef Node node_type; - typedef typename Map::global_indices_array_device_type global_indices_array_device_type; - - //! @name Constructors and destructor - //@{ - - //! Constructor with Tpetra-defined contiguous uniform distribution. - EpetraMapT(global_size_t numGlobalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm, - LocalGlobal lg = GloballyDistributed) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor with a user-defined contiguous distribution. - EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP > &comm) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution. - EpetraMapT(global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //@} - - //! @name Attributes - //@{ - - //! The number of elements in this Map. - global_size_t getGlobalNumElements() const { return 0; } - - //! The number of elements belonging to the calling process. - size_t getLocalNumElements() const { return 0; } - - //! The index base for this Map. - GlobalOrdinal getIndexBase() const { return 0; } - - //! The minimum local index. - LocalOrdinal getMinLocalIndex() const { return 0; } - - //! The maximum local index on the calling process. - LocalOrdinal getMaxLocalIndex() const { return 0; } - - //! The minimum global index owned by the calling process. - GlobalOrdinal getMinGlobalIndex() const { return 0; } - - //! The maximum global index owned by the calling process. - GlobalOrdinal getMaxGlobalIndex() const { return 0; } - - //! The minimum global index over all processes in the communicator. - GlobalOrdinal getMinAllGlobalIndex() const { return 0; } - - //! The maximum global index over all processes in the communicator. - GlobalOrdinal getMaxAllGlobalIndex() const { return 0; } - - //! The local index corresponding to the given global index. - LocalOrdinal getLocalElement(GlobalOrdinal /* globalIndex */) const { return 0; } - - //! Return the process ranks and corresponding local indices for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView & /* GIDList */, const Teuchos::ArrayView & /* nodeIDList */, const Teuchos::ArrayView & /* LIDList */) const { return Xpetra::IDNotPresent; } - - //! Return the process ranks for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView & /* GIDList */, const Teuchos::ArrayView & /* nodeIDList */) const { return Xpetra::IDNotPresent; } - - //! Return a view of the global indices owned by this process. - Teuchos::ArrayView getLocalElementList() const { return ArrayView(); } - - //! Return a view of the global indices owned by this process. - global_indices_array_device_type getMyGlobalIndicesDevice() const { return global_indices_array_device_type(); } - - //@} - - //! @name Boolean tests - //@{ - - //! Whether the given local index is valid for this Map on this process. - bool isNodeLocalElement(LocalOrdinal /* localIndex */) const { return false; } - - //! Whether the given global index is valid for this Map on this process. - bool isNodeGlobalElement(GlobalOrdinal /* globalIndex */) const { return false; } - - //! True if this Map is distributed contiguously, else false. - bool isContiguous() const { return false; } - - //! Whether this Map is globally distributed or locally replicated. - bool isDistributed() const { return false; } - - //! True if and only if map is compatible with this Map. - bool isCompatible(const Map & /* map */) const { return false; } - - //! True if and only if map is identical to this Map. - bool isSameAs(const Map & /* map */) const { return false; } - - //@} - - //! @name - //@{ - - //! Get this Map's Comm object. - Teuchos::RCP > getComm() const { return Teuchos::null; } - - //@} - - //! @name - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print this object with the given verbosity level to the given Teuchos::FancyOStream. - void describe(Teuchos::FancyOStream & /* out */, const Teuchos::EVerbosityLevel /* verbLevel */ = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name - //@{ - - //! Return a new Map with processes with zero elements removed. - RCP > removeEmptyProcesses() const { return Teuchos::null; } - - //! Replace this Map's communicator with a subset communicator. - RCP > replaceCommWithSubset(const Teuchos::RCP > & /* newComm */) const { return Teuchos::null; } - - //@} - - //! Return the global index for a given local index. Note that this returns -1 if not found on this processor. (This is different than Epetra's behavior!) - GlobalOrdinal getGlobalElement(LocalOrdinal /* localIndex */) const { return -1; } - - //! @name Xpetra specific - //@{ - - //! Destructor. - virtual ~EpetraMapT() {} - - //! EpetraMapT constructor to wrap a Epetra_Map object - EpetraMapT(const Teuchos::RCP &map) - : map_(map) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Get the library used by this object (Epetra or Epetra?) - UnderlyingLib lib() const { return Xpetra::UseEpetra; } - - //! Get the underlying Epetra map - const RCP &getEpetra_MapRCP() const { return Teuchos::rcp_static_cast(map_); } - const Epetra_BlockMap &getEpetra_BlockMap() const { return *map_; } - const Epetra_Map &getEpetra_Map() const { return (Epetra_Map &)*map_; } // Ugly, but the same is done in Epetra_CrsMatrix.h to get the map. - -#ifdef HAVE_XPETRA_TPETRA - using local_map_type = typename Map::local_map_type; - /// \brief Get the local Map for Kokkos kernels. - local_map_type getLocalMap() const { - throw std::runtime_error("Xpetra::EpetraMap::getLocalMap is not implemented in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - //@} - - protected: - RCP map_; -}; // EpetraMapT class - -// specialization on GO=int and EpetraNode -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraMapT - : public virtual Map { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - public: - typedef LocalOrdinal local_ordinal_type; - typedef GlobalOrdinal global_ordinal_type; - typedef Node node_type; - typedef typename Map::global_indices_array_device_type global_indices_array_device_type; - - //! @name Constructors and destructor - //@{ - - //! Constructor with Tpetra-defined contiguous uniform distribution. - EpetraMapT(global_size_t numGlobalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm, - LocalGlobal lg = GloballyDistributed) { - // This test come from Tpetra (Epetra doesn't check if numGlobalElements,indexBase are equivalent across images). - // In addition, for the test TEST_THROW(M map((myImageID == 0 ? GSTI : 0),0,comm), std::invalid_argument), only one node throw an exception and there is a dead lock. - std::string errPrefix; - errPrefix = Teuchos::typeName(*this) + "::constructor(numGlobal,indexBase,comm,lOrG): "; - - if (lg == GloballyDistributed) { - const int myImageID = comm->getRank(); - - // check that numGlobalElements,indexBase is equivalent across images - global_size_t rootNGE = numGlobalElements; - GlobalOrdinal rootIB = indexBase; - Teuchos::broadcast(*comm, 0, &rootNGE); - Teuchos::broadcast(*comm, 0, &rootIB); - int localChecks[2], globalChecks[2]; - localChecks[0] = -1; // fail or pass - localChecks[1] = 0; // fail reason - if (numGlobalElements != rootNGE) { - localChecks[0] = myImageID; - localChecks[1] = 1; - } else if (indexBase != rootIB) { - localChecks[0] = myImageID; - localChecks[1] = 2; - } - // REDUCE_MAX will give us the image ID of the highest rank proc that DID NOT pass, as well as the reason - // these will be -1 and 0 if all procs passed - Teuchos::reduceAll(*comm, Teuchos::REDUCE_MAX, 2, localChecks, globalChecks); - if (globalChecks[0] != -1) { - if (globalChecks[1] == 1) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal must be the same on all nodes (examine node " << globalChecks[0] << ")."); - } else if (globalChecks[1] == 2) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "indexBase must be the same on all nodes (examine node " << globalChecks[0] << ")."); - } else { - // logic error on our part - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, - errPrefix << "logic error. Please contact the Tpetra team."); - } - } - } - - // Note: validity of numGlobalElements checked by Epetra. - - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(static_cast(numGlobalElements), 1, indexBase, *toEpetra(comm)))))); - } - - //! Constructor with a user-defined contiguous distribution. - EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP > &comm) { - // This test come from Tpetra - using Teuchos::outArg; - - const size_t L0 = Teuchos::OrdinalTraits::zero(); - const size_t L1 = Teuchos::OrdinalTraits::one(); - const global_size_t GST0 = Teuchos::OrdinalTraits::zero(); - const global_size_t GST1 = Teuchos::OrdinalTraits::one(); - const global_size_t GSTI = Teuchos::OrdinalTraits::invalid(); - - std::string errPrefix; - errPrefix = Teuchos::typeName(*this) + "::constructor(numGlobal,numLocal,indexBase,platform): "; - - // get a internodal communicator from the Platform - const int myImageID = comm->getRank(); - - global_size_t global_sum; - { // begin scoping block - // for communicating failures - int localChecks[2], globalChecks[2]; - /* compute the global size - we are computing the number of global elements because exactly ONE of the following is true: - - the user didn't specify it, and we need it - - the user did specify it, but we need to - + validate it against the sum of the local sizes, and - + ensure that it is the same on all nodes - */ - Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, - Teuchos::as(numLocalElements), outArg(global_sum)); - /* there are three errors we should be detecting: - - numGlobalElements != invalid() and it is incorrect/invalid - - numLocalElements invalid (<0) - */ - localChecks[0] = -1; - localChecks[1] = 0; - if (numLocalElements < L1 && numLocalElements != L0) { - // invalid - localChecks[0] = myImageID; - localChecks[1] = 1; - } else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) { - // invalid - localChecks[0] = myImageID; - localChecks[1] = 2; - } else if (numGlobalElements != GSTI && numGlobalElements != global_sum) { - // incorrect - localChecks[0] = myImageID; - localChecks[1] = 3; - } - // now check that indexBase is equivalent across images - GlobalOrdinal rootIB = indexBase; - Teuchos::broadcast(*comm, 0, &rootIB); // broadcast one ordinal from node 0 - if (indexBase != rootIB) { - localChecks[0] = myImageID; - localChecks[1] = 4; - } - // REDUCE_MAX will give us the image ID of the highest rank proc that DID NOT pass - // this will be -1 if all procs passed - Teuchos::reduceAll(*comm, Teuchos::REDUCE_MAX, 2, localChecks, globalChecks); - if (globalChecks[0] != -1) { - if (globalChecks[1] == 1) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numLocal is not valid on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 2) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal is not valid on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 3) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal doesn't match sum of numLocal (== " - << global_sum << ") on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 4) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "indexBase is not the same on all nodes (examine node " - << globalChecks[0] << ")."); - } else { - // logic error on my part - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, - errPrefix << "logic error. Please contact the Tpetra team."); - } - } - } - - // set numGlobalElements - if (numGlobalElements == GSTI) { - numGlobalElements = global_sum; - } - - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(static_cast(numGlobalElements), static_cast(numLocalElements), 1, indexBase, *toEpetra(comm)))))); - } - - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution. - EpetraMapT(global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - if (numGlobalElements == Teuchos::OrdinalTraits::invalid()) { - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(-1, static_cast(elementList.size()), elementList.getRawPtr(), 1, indexBase, *toEpetra(comm)))))); - } else { - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(static_cast(numGlobalElements), static_cast(elementList.size()), elementList.getRawPtr(), 1, indexBase, *toEpetra(comm)))))); - } - } - - //@} - - //! @name Attributes - //@{ - - //! The number of elements in this Map. - global_size_t getGlobalNumElements() const { - XPETRA_MONITOR("EpetraMapT::getGlobalNumElements"); - return map_->NumGlobalElements64(); - } - - //! The number of elements belonging to the calling process. - size_t getLocalNumElements() const { - XPETRA_MONITOR("EpetraMapT::getLocalNumElements"); - return map_->NumMyElements(); - } - - //! The index base for this Map. - GlobalOrdinal getIndexBase() const { - XPETRA_MONITOR("EpetraMapT::getIndexBase"); - return (GlobalOrdinal)map_->IndexBase64(); - } - - //! The minimum local index. - LocalOrdinal getMinLocalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinLocalIndex"); - return map_->MinLID(); - } - - //! The maximum local index on the calling process. - LocalOrdinal getMaxLocalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxLocalIndex"); - return map_->MaxLID(); - } - - //! The minimum global index owned by the calling process. - GlobalOrdinal getMinGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinGlobalIndex"); - return (GlobalOrdinal)map_->MinMyGID64(); - } - - //! The maximum global index owned by the calling process. - GlobalOrdinal getMaxGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxGlobalIndex"); - return (GlobalOrdinal)map_->MaxMyGID64(); - } - - //! The minimum global index over all processes in the communicator. - GlobalOrdinal getMinAllGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinAllGlobalIndex"); - return (GlobalOrdinal)map_->MinAllGID64(); - } - - //! The maximum global index over all processes in the communicator. - GlobalOrdinal getMaxAllGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxAllGlobalIndex"); - return (GlobalOrdinal)map_->MaxAllGID64(); - } - - //! The local index corresponding to the given global index. - LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { - XPETRA_MONITOR("EpetraMapT::getLocalElement"); - return map_->LID(globalIndex); - } - - //! Return the process ranks and corresponding local indices for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, - const Teuchos::ArrayView &nodeIDList, - const Teuchos::ArrayView &LIDList) const { - XPETRA_MONITOR("EpetraMapT::getRemoteIndexList"); - return toXpetra(map_->RemoteIDList(static_cast(GIDList.size()), GIDList.getRawPtr(), nodeIDList.getRawPtr(), LIDList.getRawPtr())); - } - - //! Return the process ranks for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, - const Teuchos::ArrayView &nodeIDList) const { - XPETRA_MONITOR("EpetraMapT::getRemoteIndexList"); - return toXpetra(map_->RemoteIDList(static_cast(GIDList.size()), GIDList.getRawPtr(), nodeIDList.getRawPtr(), 0)); - } - - //! Return a view of the global indices owned by this process. - Teuchos::ArrayView getLocalElementList() const { - XPETRA_MONITOR("EpetraMapT::getLocalElementList"); - return ArrayView(map_->MyGlobalElements(), map_->NumMyElements()); - } - - //! Return a view of the global indices owned by this process. - global_indices_array_device_type getMyGlobalIndicesDevice() const { - XPETRA_MONITOR("EpetraMapT::getMyGlobalIndicesDevice"); - Teuchos::ArrayView view = getLocalElementList(); - if (view.size() == 0) - return global_indices_array_device_type(); - else - return Kokkos::View(view.data(), view.size()); - } - - //@} - - //! @name Boolean tests - //@{ - - //! Whether the given local index is valid for this Map on this process. - bool isNodeLocalElement(LocalOrdinal localIndex) const { - XPETRA_MONITOR("EpetraMapT::isNodeLocalElement"); - return map_->MyLID(localIndex); - } - - //! Whether the given global index is valid for this Map on this process. - bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { - XPETRA_MONITOR("EpetraMapT::isNodeGlobalElement"); - return map_->MyGID(globalIndex); - } - - //! True if this Map is distributed contiguously, else false. - bool isContiguous() const { - XPETRA_MONITOR("EpetraMapT::isContiguous"); - return map_->LinearMap(); - } - - //! Whether this Map is globally distributed or locally replicated. - bool isDistributed() const { - XPETRA_MONITOR("EpetraMapT::isDistributed"); - return map_->DistributedGlobal(); - } - - //! True if and only if map is compatible with this Map. - bool isCompatible(const Map &map) const { - XPETRA_MONITOR("EpetraMapT::isCompatible"); - return map_->PointSameAs(toEpetra(map)); - } - - //! True if and only if map is identical to this Map. - bool isSameAs(const Map &map) const { - XPETRA_MONITOR("EpetraMapT::isSameAs"); - return map_->SameAs(toEpetra(map)); - } - - //@} - - //! @name - //@{ - - //! Get this Map's Comm object. - Teuchos::RCP > getComm() const { - XPETRA_MONITOR("EpetraMapT::getComm"); - return toXpetra(map_->Comm()); - } - - //@} - - //! @name - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraMapT::description"); - - // This implementation come from Tpetra_Map_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{getGlobalNumElements() = " << getGlobalNumElements() - << ", getLocalNumElements() = " << getLocalNumElements() - << ", isContiguous() = " << isContiguous() - << ", isDistributed() = " << isDistributed() - << "}"; - return oss.str(); - } - - //! Print this object with the given verbosity level to the given Teuchos::FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraMapT::describe"); - - const Teuchos::RCP > comm_ = getComm(); - - // This implementation come from Tpetra_Map_def.hpp (without modification) - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - const size_t nME = getLocalNumElements(); - Teuchos::ArrayView myEntries = getLocalElementList(); - int myImageID = comm_->getRank(); - int numImages = comm_->getSize(); - - Teuchos::EVerbosityLevel vl = verbLevel; - if (vl == VERB_DEFAULT) vl = VERB_LOW; - - size_t width = 1; - for (size_t dec = 10; dec < getGlobalNumElements(); dec *= 10) { - ++width; - } - width = ::std::max(width, (size_t)12) + 2; // casting to size_t to avoid ambiguity error when compiling Sacado. - - Teuchos::OSTab tab(out); - - if (vl == VERB_NONE) { - // do nothing - } else if (vl == VERB_LOW) { - out << this->description() << endl; - } else { // MEDIUM, HIGH or EXTREME - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - if (myImageID == 0) { // this is the root node (only output this info once) - out << endl - << "Number of Global Entries = " << getGlobalNumElements() << endl - << "Maximum of all GIDs = " << getMaxAllGlobalIndex() << endl - << "Minimum of all GIDs = " << getMinAllGlobalIndex() << endl - << "Index Base = " << getIndexBase() << endl; - } - out << endl; - if (vl == VERB_HIGH || vl == VERB_EXTREME) { - out << "Number of Local Elements = " << nME << endl - << "Maximum of my GIDs = " << getMaxGlobalIndex() << endl - << "Minimum of my GIDs = " << getMinGlobalIndex() << endl; - out << endl; - } - if (vl == VERB_EXTREME) { - out << std::setw(width) << "Node ID" - << std::setw(width) << "Local Index" - << std::setw(width) << "Global Index" - << endl; - for (size_t i = 0; i < nME; i++) { - out << std::setw(width) << myImageID - << std::setw(width) << i - << std::setw(width) << myEntries[i] - << endl; - } - out << std::flush; - } - } - // Do a few global ops to give I/O a chance to complete - comm_->barrier(); - comm_->barrier(); - comm_->barrier(); - } - } - } - - //@} - - //! @name - //@{ - - //! Return a new Map with processes with zero elements removed. - RCP > removeEmptyProcesses() const { - const Epetra_BlockMap *NewMap = map_->RemoveEmptyProcesses(); - if (!NewMap) { - return Teuchos::null; - } else { - const RCP > NewMapX = toXpetra(*NewMap); - delete NewMap; // NOTE: toXpetra *copys* the epetra map rather than wrapping it, so we have to delete NewMap to avoid a memory leak. - return NewMapX; - } - } - - //! Replace this Map's communicator with a subset communicator. - RCP > replaceCommWithSubset(const Teuchos::RCP > & /* newComm */) const { - throw std::runtime_error("Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - //@} - - //! Return the global index for a given local index. Note that this returns -1 if not found on this processor. (This is different than Epetra's behavior!) - GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { - XPETRA_MONITOR("EpetraMapT::getGlobalElement"); - - GlobalOrdinal gid = (GlobalOrdinal)map_->GID64(localIndex); - if (gid == map_->IndexBase64() - 1) - return (-1); - else - return (gid); - } - - //! @name Xpetra specific - //@{ - - //! Destructor. - virtual ~EpetraMapT() {} - - //! EpetraMapT constructor to wrap a Epetra_Map object - EpetraMapT(const Teuchos::RCP &map) - : map_(map) { - TEUCHOS_TEST_FOR_EXCEPTION(!map->GlobalIndicesIsType(), std::runtime_error, "Xpetra::EpetraMapT: GlobalOrdinal mismatch."); - } - - //! Get the library used by this object (Epetra or Epetra?) - UnderlyingLib lib() const { return Xpetra::UseEpetra; } - - //! Get the underlying Epetra map - const RCP getEpetra_MapRCP() const { return Teuchos::rcp_static_cast(map_); } - const Epetra_BlockMap &getEpetra_BlockMap() const { return *map_; } - const Epetra_Map &getEpetra_Map() const { return (Epetra_Map &)*map_; } // Ugly, but the same is done in Epetra_CrsMatrix.h to get the map. - - //@} - -#ifdef HAVE_XPETRA_TPETRA - using local_map_type = typename Map::local_map_type; - /// \brief Get the local Map for Kokkos kernels. - local_map_type getLocalMap() const { - throw std::runtime_error("Xpetra::EpetraMap::getLocalMap is not implemented in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - } - - private: - mutable local_map_type localMap_; -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - protected: - RCP map_; -}; // EpetraMapT class -#endif // #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -// specialization on GO=long long and EpetraNode -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraMapT - : public virtual Map { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - public: - typedef LocalOrdinal local_ordinal_type; - typedef GlobalOrdinal global_ordinal_type; - typedef Node node_type; - typedef typename Map::global_indices_array_type global_indices_array_type; - - //! @name Constructors and destructor - //@{ - - //! Constructor with Tpetra-defined contiguous uniform distribution. - EpetraMapT(global_size_t numGlobalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm, - LocalGlobal lg = GloballyDistributed) { - // This test come from Tpetra (Epetra doesn't check if numGlobalElements,indexBase are equivalent across images). - // In addition, for the test TEST_THROW(M map((myImageID == 0 ? GSTI : 0),0,comm), std::invalid_argument), only one node throw an exception and there is a dead lock. - std::string errPrefix; - errPrefix = Teuchos::typeName(*this) + "::constructor(numGlobal,indexBase,comm,lOrG): "; - - if (lg == GloballyDistributed) { - const int myImageID = comm->getRank(); - - // check that numGlobalElements,indexBase is equivalent across images - global_size_t rootNGE = numGlobalElements; - GlobalOrdinal rootIB = indexBase; - Teuchos::broadcast(*comm, 0, &rootNGE); - Teuchos::broadcast(*comm, 0, &rootIB); - int localChecks[2], globalChecks[2]; - localChecks[0] = -1; // fail or pass - localChecks[1] = 0; // fail reason - if (numGlobalElements != rootNGE) { - localChecks[0] = myImageID; - localChecks[1] = 1; - } else if (indexBase != rootIB) { - localChecks[0] = myImageID; - localChecks[1] = 2; - } - // REDUCE_MAX will give us the image ID of the highest rank proc that DID NOT pass, as well as the reason - // these will be -1 and 0 if all procs passed - Teuchos::reduceAll(*comm, Teuchos::REDUCE_MAX, 2, localChecks, globalChecks); - if (globalChecks[0] != -1) { - if (globalChecks[1] == 1) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal must be the same on all nodes (examine node " << globalChecks[0] << ")."); - } else if (globalChecks[1] == 2) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "indexBase must be the same on all nodes (examine node " << globalChecks[0] << ")."); - } else { - // logic error on our part - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, - errPrefix << "logic error. Please contact the Tpetra team."); - } - } - } - - // Note: validity of numGlobalElements checked by Epetra. - - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(static_cast(numGlobalElements), 1, indexBase, *toEpetra(comm)))))); - } - - //! Constructor with a user-defined contiguous distribution. - EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP > &comm) { - // This test come from Tpetra - using Teuchos::outArg; - - const size_t L0 = Teuchos::OrdinalTraits::zero(); - const size_t L1 = Teuchos::OrdinalTraits::one(); - const global_size_t GST0 = Teuchos::OrdinalTraits::zero(); - const global_size_t GST1 = Teuchos::OrdinalTraits::one(); - const global_size_t GSTI = Teuchos::OrdinalTraits::invalid(); - - std::string errPrefix; - errPrefix = Teuchos::typeName(*this) + "::constructor(numGlobal,numLocal,indexBase,platform): "; - - // get a internodal communicator from the Platform - const int myImageID = comm->getRank(); - - global_size_t global_sum; - { // begin scoping block - // for communicating failures - int localChecks[2], globalChecks[2]; - /* compute the global size - we are computing the number of global elements because exactly ONE of the following is true: - - the user didn't specify it, and we need it - - the user did specify it, but we need to - + validate it against the sum of the local sizes, and - + ensure that it is the same on all nodes - */ - Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, - Teuchos::as(numLocalElements), outArg(global_sum)); - /* there are three errors we should be detecting: - - numGlobalElements != invalid() and it is incorrect/invalid - - numLocalElements invalid (<0) - */ - localChecks[0] = -1; - localChecks[1] = 0; - if (numLocalElements < L1 && numLocalElements != L0) { - // invalid - localChecks[0] = myImageID; - localChecks[1] = 1; - } else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) { - // invalid - localChecks[0] = myImageID; - localChecks[1] = 2; - } else if (numGlobalElements != GSTI && numGlobalElements != global_sum) { - // incorrect - localChecks[0] = myImageID; - localChecks[1] = 3; - } - // now check that indexBase is equivalent across images - GlobalOrdinal rootIB = indexBase; - Teuchos::broadcast(*comm, 0, &rootIB); // broadcast one ordinal from node 0 - if (indexBase != rootIB) { - localChecks[0] = myImageID; - localChecks[1] = 4; - } - // REDUCE_MAX will give us the image ID of the highest rank proc that DID NOT pass - // this will be -1 if all procs passed - Teuchos::reduceAll(*comm, Teuchos::REDUCE_MAX, 2, localChecks, globalChecks); - if (globalChecks[0] != -1) { - if (globalChecks[1] == 1) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numLocal is not valid on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 2) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal is not valid on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 3) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "numGlobal doesn't match sum of numLocal (== " - << global_sum << ") on at least one node (possibly node " - << globalChecks[0] << ")."); - } else if (globalChecks[1] == 4) { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, - errPrefix << "indexBase is not the same on all nodes (examine node " - << globalChecks[0] << ")."); - } else { - // logic error on my part - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, - errPrefix << "logic error. Please contact the Tpetra team."); - } - } - } - - // set numGlobalElements - if (numGlobalElements == GSTI) { - numGlobalElements = global_sum; - } - - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(static_cast(numGlobalElements), numLocalElements, 1, indexBase, *toEpetra(comm)))))); - } - - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution. - EpetraMapT(global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - if (numGlobalElements == Teuchos::OrdinalTraits::invalid()) { - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(-1, elementList.size(), elementList.getRawPtr(), 1, indexBase, *toEpetra(comm)))))); - } else { - IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG((map_ = (rcp(new Epetra_BlockMap(numGlobalElements, elementList.size(), elementList.getRawPtr(), 1, indexBase, *toEpetra(comm)))))); - } - } - - //@} - - //! @name Attributes - //@{ - - //! The number of elements in this Map. - global_size_t getGlobalNumElements() const { - XPETRA_MONITOR("EpetraMapT::getGlobalNumElements"); - return map_->NumGlobalElements64(); - } - - //! The number of elements belonging to the calling process. - size_t getLocalNumElements() const { - XPETRA_MONITOR("EpetraMapT::getLocalNumElements"); - return map_->NumMyElements(); - } - - //! The index base for this Map. - GlobalOrdinal getIndexBase() const { - XPETRA_MONITOR("EpetraMapT::getIndexBase"); - return (GlobalOrdinal)map_->IndexBase64(); - } - - //! The minimum local index. - LocalOrdinal getMinLocalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinLocalIndex"); - return map_->MinLID(); - } - - //! The maximum local index on the calling process. - LocalOrdinal getMaxLocalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxLocalIndex"); - return map_->MaxLID(); - } - - //! The minimum global index owned by the calling process. - GlobalOrdinal getMinGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinGlobalIndex"); - return (GlobalOrdinal)map_->MinMyGID64(); - } - - //! The maximum global index owned by the calling process. - GlobalOrdinal getMaxGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxGlobalIndex"); - return (GlobalOrdinal)map_->MaxMyGID64(); - } - - //! The minimum global index over all processes in the communicator. - GlobalOrdinal getMinAllGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMinAllGlobalIndex"); - return (GlobalOrdinal)map_->MinAllGID64(); - } - - //! The maximum global index over all processes in the communicator. - GlobalOrdinal getMaxAllGlobalIndex() const { - XPETRA_MONITOR("EpetraMapT::getMaxAllGlobalIndex"); - return (GlobalOrdinal)map_->MaxAllGID64(); - } - - //! The local index corresponding to the given global index. - LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { - XPETRA_MONITOR("EpetraMapT::getLocalElement"); - return map_->LID(globalIndex); - } - - //! Return the process ranks and corresponding local indices for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList, const Teuchos::ArrayView &LIDList) const { - XPETRA_MONITOR("EpetraMapT::getRemoteIndexList"); - return toXpetra(map_->RemoteIDList(GIDList.size(), GIDList.getRawPtr(), nodeIDList.getRawPtr(), LIDList.getRawPtr())); - } - - //! Return the process ranks for the given global indices. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList) const { - XPETRA_MONITOR("EpetraMapT::getRemoteIndexList"); - return toXpetra(map_->RemoteIDList(GIDList.size(), GIDList.getRawPtr(), nodeIDList.getRawPtr(), 0)); - } - - //! Return a view of the global indices owned by this process. - Teuchos::ArrayView getLocalElementList() const { - XPETRA_MONITOR("EpetraMapT::getLocalElementList"); - return ArrayView(map_->MyGlobalElements64(), map_->NumMyElements()); - } - - //! Return a view of the global indices owned by this process. - global_indices_array_device_type getMyGlobalIndicesDevice() const { - XPETRA_MONITOR("EpetraMapT::getMyGlobalIndicesDevice"); - Teuchos::ArrayView view = getLocalElementList(); - if (view.size() == 0) - return global_indices_array_device_type(); - else - return Kokkos::View(view.data(), view.size()); - } - - //@} - - //! @name Boolean tests - //@{ - - //! Whether the given local index is valid for this Map on this process. - bool isNodeLocalElement(LocalOrdinal localIndex) const { - XPETRA_MONITOR("EpetraMapT::isNodeLocalElement"); - return map_->MyLID(localIndex); - } - - //! Whether the given global index is valid for this Map on this process. - bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { - XPETRA_MONITOR("EpetraMapT::isNodeGlobalElement"); - return map_->MyGID(globalIndex); - } - - //! True if this Map is distributed contiguously, else false. - bool isContiguous() const { - XPETRA_MONITOR("EpetraMapT::isContiguous"); - return map_->LinearMap(); - } - - //! Whether this Map is globally distributed or locally replicated. - bool isDistributed() const { - XPETRA_MONITOR("EpetraMapT::isDistributed"); - return map_->DistributedGlobal(); - } - - //! True if and only if map is compatible with this Map. - bool isCompatible(const Map &map) const { - XPETRA_MONITOR("EpetraMapT::isCompatible"); - return map_->PointSameAs(toEpetra(map)); - } - - //! True if and only if map is identical to this Map. - bool isSameAs(const Map &map) const { - XPETRA_MONITOR("EpetraMapT::isSameAs"); - return map_->SameAs(toEpetra(map)); - } - - //@} - - //! @name - //@{ - - //! Get this Map's Comm object. - Teuchos::RCP > getComm() const { - XPETRA_MONITOR("EpetraMapT::getComm"); - return toXpetra(map_->Comm()); - } - - //@} - - //! @name - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraMapT::description"); - - // This implementation come from Tpetra_Map_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{getGlobalNumElements() = " << getGlobalNumElements() - << ", getLocalNumElements() = " << getLocalNumElements() - << ", isContiguous() = " << isContiguous() - << ", isDistributed() = " << isDistributed() - << "}"; - return oss.str(); - } - - //! Print this object with the given verbosity level to the given Teuchos::FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraMapT::describe"); - - const Teuchos::RCP > comm_ = getComm(); - - // This implementation come from Tpetra_Map_def.hpp (without modification) - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - const size_t nME = getLocalNumElements(); - Teuchos::ArrayView myEntries = getLocalElementList(); - int myImageID = comm_->getRank(); - int numImages = comm_->getSize(); - - Teuchos::EVerbosityLevel vl = verbLevel; - if (vl == VERB_DEFAULT) vl = VERB_LOW; - - size_t width = 1; - for (size_t dec = 10; dec < getGlobalNumElements(); dec *= 10) { - ++width; - } - width = ::std::max(width, (size_t)12) + 2; // casting to size_t to avoid ambiguity error when compiling Sacado. - - Teuchos::OSTab tab(out); - - if (vl == VERB_NONE) { - // do nothing - } else if (vl == VERB_LOW) { - out << this->description() << endl; - } else { // MEDIUM, HIGH or EXTREME - for (int imageCtr = 0; imageCtr < numImages; ++imageCtr) { - if (myImageID == imageCtr) { - if (myImageID == 0) { // this is the root node (only output this info once) - out << endl - << "Number of Global Entries = " << getGlobalNumElements() << endl - << "Maximum of all GIDs = " << getMaxAllGlobalIndex() << endl - << "Minimum of all GIDs = " << getMinAllGlobalIndex() << endl - << "Index Base = " << getIndexBase() << endl; - } - out << endl; - if (vl == VERB_HIGH || vl == VERB_EXTREME) { - out << "Number of Local Elements = " << nME << endl - << "Maximum of my GIDs = " << getMaxGlobalIndex() << endl - << "Minimum of my GIDs = " << getMinGlobalIndex() << endl; - out << endl; - } - if (vl == VERB_EXTREME) { - out << std::setw(width) << "Node ID" - << std::setw(width) << "Local Index" - << std::setw(width) << "Global Index" - << endl; - for (size_t i = 0; i < nME; i++) { - out << std::setw(width) << myImageID - << std::setw(width) << i - << std::setw(width) << myEntries[i] - << endl; - } - out << std::flush; - } - } - // Do a few global ops to give I/O a chance to complete - comm_->barrier(); - comm_->barrier(); - comm_->barrier(); - } - } - } - - //@} - - //! @name - //@{ - - //! Return a new Map with processes with zero elements removed. - RCP > removeEmptyProcesses() const { - const Epetra_BlockMap *NewMap = map_->RemoveEmptyProcesses(); - if (!NewMap) { - return Teuchos::null; - } else { - const RCP > NewMapX = toXpetra(*NewMap); - delete NewMap; // NOTE: toXpetra *copys* the epetra map rather than wrapping it, so we have to delete NewMap to avoid a memory leak. - return NewMapX; - } - } - - //! Replace this Map's communicator with a subset communicator. - RCP > replaceCommWithSubset(const Teuchos::RCP > & /* newComm */) const { - throw std::runtime_error("Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - // return Teuchos::null; // unreachable - } - - //@} - - //! Return the global index for a given local index. Note that this returns -1 if not found on this processor. (This is different than Epetra's behavior!) - GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { - XPETRA_MONITOR("EpetraMapT::getGlobalElement"); - - GlobalOrdinal gid = (GlobalOrdinal)map_->GID64(localIndex); - if (gid == map_->IndexBase64() - 1) - return (-1); - else - return (gid); - } - - //! @name Xpetra specific - //@{ - - //! Destructor. - virtual ~EpetraMapT() {} - - //! EpetraMapT constructor to wrap a Epetra_Map object - EpetraMapT(const Teuchos::RCP &map) - : map_(map) { - TEUCHOS_TEST_FOR_EXCEPTION(!map->GlobalIndicesIsType(), std::runtime_error, "Xpetra::EpetraMapT: GlobalOrdinal mismatch."); - } - - //! Get the library used by this object (Epetra or Epetra?) - UnderlyingLib lib() const { return Xpetra::UseEpetra; } - - //! Get the underlying Epetra map - const RCP &getEpetra_MapRCP() const { return Teuchos::rcp_static_cast(map_); } - const Epetra_BlockMap &getEpetra_BlockMap() const { return *map_; } - const Epetra_Map &getEpetra_Map() const { return (Epetra_Map &)*map_; } // Ugly, but the same is done in Epetra_CrsMatrix.h to get the map. - -#ifdef HAVE_XPETRA_TPETRA - using local_map_type = typename Map::local_map_type; - /// \brief Get the local Map for Kokkos kernels. - local_map_type getLocalMap() const { - throw std::runtime_error("Xpetra::EpetraMap::getLocalMap is not implemented in " + std::string(__FILE__) + ":" + std::to_string(__LINE__)); - } - - private: - mutable local_map_type localMap_; -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif - - //@} - - protected: - RCP map_; -}; // EpetraMapT class -#endif // #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -} // namespace Xpetra - -#endif // XPETRA_EPETRAMAP_HPP diff --git a/packages/xpetra/src/Map/Xpetra_EpetraMapFactory.cpp b/packages/xpetra/src/Map/Xpetra_EpetraMapFactory.cpp deleted file mode 100644 index 99c2259e7661..000000000000 --- a/packages/xpetra/src/Map/Xpetra_EpetraMapFactory.cpp +++ /dev/null @@ -1,665 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_MapFactory.hpp" - -#include "Xpetra_BlockedMap.hpp" -#include "Xpetra_EpetraMap.hpp" -#ifdef HAVE_XPETRA_TPETRA -#include "Xpetra_TpetraMap.hpp" -#endif - -namespace Xpetra { - -#if defined(HAVE_XPETRA_EPETRA) - -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -MapFactory:: - MapFactory() { -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - int indexBase, - const Teuchos::RCP> &comm, - LocalGlobal lg) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new Xpetra::TpetraMap(numGlobalElements, indexBase, comm, lg)); -#endif - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, indexBase, comm, lg)); - - XPETRA_FACTORY_END; -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - size_t numLocalElements, - int indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, numLocalElements, indexBase, comm)); -#endif - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)); - - XPETRA_FACTORY_END; -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - int indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, elementList, indexBase, comm)); -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, elementList, indexBase, comm)); - - XPETRA_FACTORY_END; -} - -//! Map constructor transforming degrees of freedom -//! for numDofPerNode this acts like a deep copy -Teuchos::RCP> -MapFactory:: - Build(const Teuchos::RCP> &map, - const int numDofPerNode, const int gidOffset) { - XPETRA_MONITOR("MapFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - if (!bmap.is_null()) { - TEUCHOS_TEST_FOR_EXCEPTION(numDofPerNode != 1, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::Build: When provided a BlockedMap numDofPerNode must set to be one. It is set to " << numDofPerNode << "."); - return rcp(new BlockedMap(*bmap)); - } - - LocalOrdinal N = Teuchos::as(map->getLocalNumElements()); - Teuchos::ArrayView oldElements = map->getLocalElementList(); - Teuchos::Array newElements(map->getLocalNumElements() * numDofPerNode); - for (LocalOrdinal i = 0; i < N; i++) { - for (LocalOrdinal j = 0; j < numDofPerNode; j++) { - newElements[i * numDofPerNode + j] = oldElements[i] * numDofPerNode + j + gidOffset; - } - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMap(map->getGlobalNumElements() * numDofPerNode, newElements, map->getIndexBase(), map->getComm())); - } -#endif // HAVE_XPETRA_TPETRA - - if (map->lib() == UseEpetra) { - return rcp(new EpetraMapT(map->getGlobalNumElements() * numDofPerNode, newElements, map->getIndexBase(), map->getComm())); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createLocalMap(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createLocalMap: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT((Xpetra::global_size_t)numElements, // num elements, global and local - 0, // index base is zero - comm, LocallyReplicated)); - return map.getConst(); - } - - XPETRA_FACTORY_END; -} - -// TODO remove this - -#ifdef HAVE_XPETRA_TPETRA -Teuchos::RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Kokkos::View &indexList, - int indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, indexList, indexBase, comm)); - if (lib == UseEpetra) { - Teuchos::ArrayView v(indexList.data(), indexList.size()); - return rcp(new EpetraMapT(numGlobalElements, v, indexBase, comm)); - } - XPETRA_FACTORY_END; -} -#endif // HAVE_XPETRA_TPETRA - -Teuchos::RCP> -MapFactory:: - createLocalMapWithNode(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createLocalMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT((Xpetra::global_size_t)numElements, // num elements, global and local - 0, // index base is zero - comm, LocallyReplicated)); - return map.getConst(); - } - - XPETRA_FACTORY_END; -} - -// TODO remove this - -Teuchos::RCP> -MapFactory:: - createUniformContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createUniformContigMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createUniformContigMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT(numElements, // num elements, global and local - 0, // index base is zero - comm, GloballyDistributed)); - return map.getConst(); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createUniformContigMap(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createUniformContigMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createUniformContigMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT(numElements, // num elements, global and local - 0, // index base is zero - comm, GloballyDistributed)); - return map.getConst(); - } - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createContigMap(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createContigMap: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif - - if (lib == UseEpetra) { - return MapFactory::createContigMapWithNode(lib, numElements, localNumElements, comm); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT)))) - return rcp(new TpetraMap(Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createContigMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=int"); -#endif -#endif - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT(numElements, localNumElements, - 0, // index base is zero - comm)); - return map.getConst(); - } - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory::copyMapWithNewComm(const Teuchos::RCP> &oldmap, - const Teuchos::RCP> &newComm) { - XPETRA_MONITOR("MapFactory::Build"); - using XMF = Xpetra::MapFactory; - global_size_t INVALID = Teuchos::OrdinalTraits::invalid(); - - size_t Nlocal = oldmap->getLocalNumElements(); - global_size_t Nglobal = oldmap->getGlobalNumElements(); - - // Sanity check -- if there's no comm, we can't keep elements on the map (vice versa is OK) - TEUCHOS_TEST_FOR_EXCEPTION(Nlocal && newComm.is_null(), - std::logic_error, "MapFactory::copyMapWithNewComm needs the comm to match the map."); - - // We'll return null if we don't have a Comm on this rank - RCP> newMap; - if (!newComm.is_null()) { - if (oldmap->isContiguous()) { - newMap = XMF::Build(oldmap->lib(), INVALID, Nlocal, oldmap->getIndexBase(), newComm); - } else { - newMap = XMF::Build(oldmap->lib(), Nglobal, oldmap->getLocalElementList(), oldmap->getIndexBase(), newComm); - } - } - - return newMap; - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -//! Private constructor. This is a static class. -MapFactory:: - MapFactory() { -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - int indexBase, - const Teuchos::RCP> &comm, - LocalGlobal lg) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, indexBase, comm, lg)); -#endif - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, indexBase, comm, lg)); - - XPETRA_FACTORY_END; -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - size_t numLocalElements, - int indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, numLocalElements, indexBase, comm)); -#endif - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)); - - XPETRA_FACTORY_END; -} - -RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - int indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, elementList, indexBase, comm)); -#endif - - if (lib == UseEpetra) - return rcp(new EpetraMapT(numGlobalElements, elementList, indexBase, comm)); - - XPETRA_FACTORY_END; -} - -//! Map constructor transforming degrees of freedom -//! for numDofPerNode this acts like a deep copy -Teuchos::RCP> -MapFactory:: - Build(const Teuchos::RCP> &map, - int numDofPerNode) { - XPETRA_MONITOR("MapFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - if (!bmap.is_null()) { - TEUCHOS_TEST_FOR_EXCEPTION(numDofPerNode != 1, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::Build: When provided a BlockedMap numDofPerNode must set to be one. It is set to " << numDofPerNode << "."); - return rcp(new Xpetra::BlockedMap(*bmap)); - } - - LocalOrdinal N = map->getLocalNumElements(); - Teuchos::ArrayView oldElements = map->getLocalElementList(); - Teuchos::Array newElements(map->getLocalNumElements() * numDofPerNode); - for (LocalOrdinal i = 0; i < N; i++) - for (LocalOrdinal j = 0; j < numDofPerNode; j++) - newElements[i * numDofPerNode + j] = oldElements[i] * numDofPerNode + j; - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) - return rcp(new TpetraMap(map->getGlobalNumElements() * numDofPerNode, newElements, map->getIndexBase(), map->getComm())); -#endif - - if (map->lib() == UseEpetra) - return rcp(new EpetraMapT(map->getGlobalNumElements() * numDofPerNode, newElements, map->getIndexBase(), map->getComm())); - - XPETRA_FACTORY_END; -} - -#ifdef HAVE_XPETRA_TPETRA -Teuchos::RCP> -MapFactory:: - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Kokkos::View &indexList, - long long indexBase, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - if (lib == UseTpetra) - return rcp(new TpetraMap(numGlobalElements, indexList, indexBase, comm)); - if (lib == UseEpetra) { - Teuchos::ArrayView v(indexList.data(), indexList.size()); - return rcp(new EpetraMapT(numGlobalElements, v, indexBase, comm)); - } - XPETRA_FACTORY_ERROR_IF_EPETRA(lib); - XPETRA_FACTORY_END; -} -#endif // HAVE_XPETRA_TPETRA - -Teuchos::RCP> -MapFactory:: - createLocalMap(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createLocalMap: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif - - if (lib == UseEpetra) - return MapFactory::createLocalMapWithNode(lib, numElements, comm); - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createLocalMapWithNode(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createLocalMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT((Xpetra::global_size_t)numElements, // num elements, global and local - 0, // index base is zero - comm, LocallyReplicated)); - return map.getConst(); - } - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createUniformContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap(Tpetra::createUniformContigMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createUniformContigMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT(numElements, // num elements, global and local - 0, // index base is zero - comm, GloballyDistributed)); - return map.getConst(); - } - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createUniformContigMap(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap(Tpetra::createUniformContigMapWithNode(numElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createUniformContigMap: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif - - if (lib == UseEpetra) - return MapFactory::createUniformContigMapWithNode(lib, numElements, comm); - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory::createContigMap(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap( - Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, - Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createContigMap: Cannot create Xpetra::TpetraMap, since Tpetra is not instantiated on " - "EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif - - if (lib == UseEpetra) - return MapFactory::createContigMapWithNode(lib, numElements, localNumElements, comm); - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory:: - createContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP> &comm) { - XPETRA_MONITOR("MapFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (lib == UseTpetra) -#if ((defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || (!defined(EPETRA_HAVE_OMP) && (defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - return rcp(new TpetraMap( - Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, - Xpetra::Exceptions::RuntimeError, - "Xpetra::MapFactory::createContigMapWithNode: Cannot create Xpetra::TpetraMap, since Tpetra is not " - "instantiated on EpetraNode (Serial or OpenMP, depending on configuration) and/or GO=long long"); -#endif -#endif // HAVE_XPETRA_TPETRA - - if (lib == UseEpetra) { - Teuchos::RCP> map; - map = Teuchos::rcp(new EpetraMapT(numElements, - localNumElements, - 0, // index base is zero - comm)); - return map.getConst(); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MapFactory::copyMapWithNewComm(const Teuchos::RCP> &oldmap, - const Teuchos::RCP> &newComm) { - XPETRA_MONITOR("MapFactory::Build"); - using XMF = Xpetra::MapFactory; - global_size_t INVALID = Teuchos::OrdinalTraits::invalid(); - - size_t Nlocal = oldmap->getLocalNumElements(); - global_size_t Nglobal = oldmap->getGlobalNumElements(); - - // Sanity check -- if there's no comm, we can't keep elements on the map (vice versa is OK) - TEUCHOS_TEST_FOR_EXCEPTION(Nlocal && newComm.is_null(), - std::logic_error, "MapFactory::copyMapWithNewComm needs the comm to match the map."); - - // We'll return null if we don't have a Comm on this rank - RCP> newMap; - if (!newComm.is_null()) { - if (oldmap->isContiguous()) { - newMap = XMF::Build(oldmap->lib(), INVALID, Nlocal, oldmap->getIndexBase(), newComm); - } else { - newMap = XMF::Build(oldmap->lib(), Nglobal, oldmap->getLocalElementList(), oldmap->getIndexBase(), newComm); - } - } - - return newMap; - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // #if defined(HAVE_XPETRA_EPETRA) - -} // namespace Xpetra - -// EOF diff --git a/packages/xpetra/src/Map/Xpetra_MapFactory_decl.hpp b/packages/xpetra/src/Map/Xpetra_MapFactory_decl.hpp index 64a1015651bc..c842ed8ec055 100644 --- a/packages/xpetra/src/Map/Xpetra_MapFactory_decl.hpp +++ b/packages/xpetra/src/Map/Xpetra_MapFactory_decl.hpp @@ -73,14 +73,12 @@ class MapFactory { const LocalOrdinal numDofPerNode, const GlobalOrdinal gidOffset = Teuchos::ScalarTraits::zero()); -#ifdef HAVE_XPETRA_TPETRA static Teuchos::RCP> Build(UnderlyingLib lib, global_size_t numGlobalElements, const Kokkos::View& indexList, GlobalOrdinal indexBase, const Teuchos::RCP>& comm); -#endif //! Create a locally replicated Map with the default node. static Teuchos::RCP> @@ -135,200 +133,6 @@ class MapFactory { /// X P E T R A E P E T R A S P E C I A L I Z A T I O N ////////////////////////////////////////////////////////////// -#if defined(HAVE_XPETRA_EPETRA) - -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -template <> -class MapFactory { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MapFactory(); - - public: - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - int indexBase, - const Teuchos::RCP>& comm, - LocalGlobal lg = GloballyDistributed); - - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - size_t numLocalElements, - int indexBase, - const Teuchos::RCP>& comm); - - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Teuchos::ArrayView& elementList, - int indexBase, - const Teuchos::RCP>& comm); - - /*! - @brief Map constructor transforming degrees of freedom for numDofPerNode - - @param[in] map Existing (node) map - @param[in] numDofPerNode Number of DOFs per node for output map - @param[in] gidOffset GID offset for output map - @return Map - - \note This acts like a deep copy. - */ - static Teuchos::RCP> - Build(const Teuchos::RCP>& map, - const LocalOrdinal numDofPerNode, - const GlobalOrdinal gidOffset = Teuchos::ScalarTraits::zero()); - -#ifdef HAVE_XPETRA_TPETRA - static Teuchos::RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Kokkos::View& indexList, - GlobalOrdinal indexBase, - const Teuchos::RCP>& comm); -#endif - - static Teuchos::RCP> - createLocalMap(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP>& comm); - - // TODO remove this - - static Teuchos::RCP> - createLocalMapWithNode(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP>& comm); - - // TODO remove this - - static Teuchos::RCP> - createUniformContigMapWithNode(UnderlyingLib lib, global_size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createUniformContigMap(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createContigMap(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - copyMapWithNewComm(const Teuchos::RCP>& oldmap, - const Teuchos::RCP>& newComm); - -}; // class MapFactory specialization - -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -template <> -class MapFactory { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MapFactory(); - - public: - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - int indexBase, - const Teuchos::RCP>& comm, - LocalGlobal lg = GloballyDistributed); - - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - size_t numLocalElements, - int indexBase, - const Teuchos::RCP>& comm); - - static RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Teuchos::ArrayView& elementList, - int indexBase, - const Teuchos::RCP>& comm); - - //! Map constructor transforming degrees of freedom - //! for numDofPerNode this acts like a deep copy - static Teuchos::RCP> - Build(const Teuchos::RCP>& map, - LocalOrdinal numDofPerNode); - -#ifdef HAVE_XPETRA_TPETRA - static Teuchos::RCP> - Build(UnderlyingLib lib, - global_size_t numGlobalElements, - const Kokkos::View& indexList, - GlobalOrdinal indexBase, - const Teuchos::RCP>& comm); -#endif - - static Teuchos::RCP> - createLocalMap(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createLocalMapWithNode(UnderlyingLib lib, - size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createUniformContigMapWithNode(UnderlyingLib lib, global_size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createUniformContigMap(UnderlyingLib lib, - global_size_t numElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createContigMap(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - createContigMapWithNode(UnderlyingLib lib, - global_size_t numElements, - size_t localNumElements, - const Teuchos::RCP>& comm); - - static Teuchos::RCP> - copyMapWithNewComm(const Teuchos::RCP>& oldmap, - const Teuchos::RCP>& newComm); - -}; // class MapFactory specialization - -#endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // #if defined(HAVE_XPETRA_EPETRA) - } // namespace Xpetra #define XPETRA_MAPFACTORY_SHORT diff --git a/packages/xpetra/src/Map/Xpetra_MapFactory_def.hpp b/packages/xpetra/src/Map/Xpetra_MapFactory_def.hpp index 2e276dac2a14..d401effcb963 100644 --- a/packages/xpetra/src/Map/Xpetra_MapFactory_def.hpp +++ b/packages/xpetra/src/Map/Xpetra_MapFactory_def.hpp @@ -12,12 +12,7 @@ #include "Xpetra_MapFactory_decl.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif #include "Xpetra_BlockedMap.hpp" @@ -33,10 +28,8 @@ MapFactory:: LocalGlobal lg) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return Teuchos::rcp(new TpetraMap(numGlobalElements, indexBase, comm, lg)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -52,10 +45,8 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return rcp(new TpetraMap(numGlobalElements, numLocalElements, indexBase, comm)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -71,10 +62,8 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return rcp(new TpetraMap(numGlobalElements, elementList, indexBase, comm)); -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -97,7 +86,6 @@ MapFactory:: return rcp(new Xpetra::BlockedMap(*bmap)); } -#ifdef HAVE_XPETRA_TPETRA LocalOrdinal numLocalElements = nodeMap->getLocalNumElements(); Teuchos::ArrayView oldElements = nodeMap->getLocalElementList(); Teuchos::Array newElements(nodeMap->getLocalNumElements() * numDofPerNode); @@ -109,13 +97,11 @@ MapFactory:: if (nodeMap->lib() == UseTpetra) { return rcp(new TpetraMap(nodeMap->getGlobalNumElements() * numDofPerNode, newElements, nodeMap->getIndexBase(), nodeMap->getComm())); } -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(nodeMap->lib()); XPETRA_FACTORY_END; } -#ifdef HAVE_XPETRA_TPETRA template Teuchos::RCP> MapFactory:: @@ -130,7 +116,6 @@ MapFactory:: XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; } -#endif // HAVE_XPETRA_TPETRA template Teuchos::RCP> @@ -140,7 +125,6 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) { // Pre-ETI code called Tpetra::createLocalMap() but this can result in compile erros // when Trilinos is built with multiple node-types, specifically the GCC 4.8.4 PR @@ -150,7 +134,6 @@ MapFactory:: // return rcp(new Xpetra::TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); // (old version) return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); } -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -164,11 +147,9 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) { return rcp(new TpetraMap(Tpetra::createLocalMapWithNode(numElements, comm))); } -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -182,11 +163,9 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return rcp(new TpetraMap( Tpetra::createUniformContigMapWithNode(numElements, comm))); -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -200,11 +179,9 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return rcp(new Xpetra::TpetraMap( Tpetra::createUniformContigMapWithNode(numElements, comm))); -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -219,11 +196,9 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) return rcp(new Xpetra::TpetraMap( Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; @@ -238,12 +213,10 @@ MapFactory:: const Teuchos::RCP>& comm) { XPETRA_MONITOR("MapFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (lib == UseTpetra) { return rcp(new TpetraMap( Tpetra::createContigMapWithNode(numElements, localNumElements, comm))); } -#endif // HAVE_XPETRA_TPETRA XPETRA_FACTORY_ERROR_IF_EPETRA(lib); XPETRA_FACTORY_END; diff --git a/packages/xpetra/src/Map/Xpetra_Map_decl.hpp b/packages/xpetra/src/Map/Xpetra_Map_decl.hpp index 6c8ece856c99..4c79e85be055 100644 --- a/packages/xpetra/src/Map/Xpetra_Map_decl.hpp +++ b/packages/xpetra/src/Map/Xpetra_Map_decl.hpp @@ -15,26 +15,13 @@ #include #include -#ifdef HAVE_XPETRA_EPETRA -#include "Epetra_config.h" -#endif - -#ifdef HAVE_XPETRA_TPETRA #include -#endif namespace Xpetra { // TODO move this typedef to another place // Node which is used for Epetra. This can be either the // Serial node or OpenMP node (but not both) -#ifdef HAVE_XPETRA_EPETRA -#ifdef EPETRA_HAVE_OMP -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#else -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif -#endif enum UnderlyingLib { UseEpetra, @@ -183,12 +170,10 @@ class Map // it to return the base map. virtual RCP > getMap() const; -#ifdef HAVE_XPETRA_TPETRA typedef typename Tpetra::Map::local_map_type local_map_type; /// \brief Get the local Map for Kokkos kernels. virtual local_map_type getLocalMap() const = 0; -#endif //@} diff --git a/packages/xpetra/src/Map/Xpetra_TpetraMap_decl.hpp b/packages/xpetra/src/Map/Xpetra_TpetraMap_decl.hpp index 7986e239f0eb..71eb9edc7cf3 100644 --- a/packages/xpetra/src/Map/Xpetra_TpetraMap_decl.hpp +++ b/packages/xpetra/src/Map/Xpetra_TpetraMap_decl.hpp @@ -58,13 +58,11 @@ class TpetraMap GlobalOrdinal indexBase, const Teuchos::RCP > &comm); -#ifdef HAVE_XPETRA_TPETRA //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution passed as a Kokkos::View. TpetraMap(global_size_t numGlobalElements, const Kokkos::View &indexList, GlobalOrdinal indexBase, const Teuchos::RCP > &comm); -#endif //! Destructor ~TpetraMap(); @@ -176,11 +174,9 @@ class TpetraMap //! Get the underlying Tpetra map RCP > getTpetra_Map() const; -#ifdef HAVE_XPETRA_TPETRA using local_map_type = typename Map::local_map_type; /// \brief Get the local Map for Kokkos kernels. local_map_type getLocalMap() const; -#endif //@} diff --git a/packages/xpetra/src/Map/Xpetra_TpetraMap_def.hpp b/packages/xpetra/src/Map/Xpetra_TpetraMap_def.hpp index 3bfbc9ad57bb..238d5ef8f49f 100644 --- a/packages/xpetra/src/Map/Xpetra_TpetraMap_def.hpp +++ b/packages/xpetra/src/Map/Xpetra_TpetraMap_def.hpp @@ -52,8 +52,6 @@ TpetraMap:: indexBase, comm))) {} -#ifdef HAVE_XPETRA_TPETRA - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution passed as a Kokkos::View. template TpetraMap:: @@ -65,7 +63,6 @@ TpetraMap:: indexList, indexBase, comm))) {} -#endif //! Destructor. template @@ -237,345 +234,10 @@ UnderlyingLib TpetraMap::lib() const { return template RCP > TpetraMap::getTpetra_Map() const { return map_; } -#ifdef HAVE_XPETRA_TPETRA - template typename Map::local_map_type TpetraMap::getLocalMap() const { return map_->getLocalMap(); } -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization for Tpetra Map on EpetraNode and GO=int -template <> -class TpetraMap - : public virtual Map { - public: - typedef int GlobalOrdinal; - typedef int LocalOrdinal; - typedef EpetraNode Node; - - //! @name Constructors and destructor - //@{ - - //! Constructor with Tpetra-defined contiguous uniform distribution. - - TpetraMap(global_size_t numGlobalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm, - LocalGlobal lg = GloballyDistributed) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor with a user-defined contiguous distribution. - - TpetraMap(global_size_t numGlobalElements, - size_t numLocalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "int", typeid(EpetraNode).name()); - } - - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution. - - TpetraMap(global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "int", typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraMap() {} - - //@} - - //! @name Attributes - //@{ - - //! The number of elements in this Map. - global_size_t getGlobalNumElements() const { return 0; } - - //! The number of elements belonging to the calling node. - size_t getLocalNumElements() const { return 0; } - - //! The index base for this Map. - GlobalOrdinal getIndexBase() const { return 0; } - - //! The minimum local index. - LocalOrdinal getMinLocalIndex() const { return 0; } - - //! The maximum local index on the calling process. - LocalOrdinal getMaxLocalIndex() const { return 0; } - - //! The minimum global index owned by the calling process. - GlobalOrdinal getMinGlobalIndex() const { return 0; } - - //! The maximum global index owned by the calling process. - GlobalOrdinal getMaxGlobalIndex() const { return 0; } - - //! The minimum global index over all processes in the communicator. - GlobalOrdinal getMinAllGlobalIndex() const { return 0; } - - //! The maximum global index over all processes in the communicator. - GlobalOrdinal getMaxAllGlobalIndex() const { return 0; } - - //! The local index corresponding to the given global index. - LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; } - - //! The global index corresponding to the given local index. - GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; } - - //! Return the process IDs and corresponding local IDs for the given global IDs. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList, const Teuchos::ArrayView &LIDList) const { return Xpetra::IDNotPresent; } - - //! Return the process IDs for the given global IDs. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList) const { return Xpetra::IDNotPresent; } - - //! Return a view of the global indices owned by this node. - Teuchos::ArrayView getLocalElementList() const { return Teuchos::ArrayView(); } - - //@} - - //! @name Boolean tests - //@{ - - //! True if the local index is valid for this Map on this node, else false. - bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; } - - //! True if the global index is found in this Map on this node, else false. - bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; } - - //! True if this Map is distributed contiguously, else false. - bool isContiguous() const { return false; } - - //! Whether this Map is globally distributed or locally replicated. - bool isDistributed() const { return false; } - - //! True if and only if map is compatible with this Map. - bool isCompatible(const Map &map) const { return false; } - - //! True if and only if map is identical to this Map. - bool isSameAs(const Map &map) const { return false; } - - //@} - - //! @name - //@{ - - //! Get this Map's Comm object. - Teuchos::RCP > getComm() const { return Teuchos::null; } - - //@} - - //! @name - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print this object with the given verbosity level to the given FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - RCP > removeEmptyProcesses() const { return Teuchos::null; } - RCP > replaceCommWithSubset(const Teuchos::RCP > &newComm) const { return Teuchos::null; } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraMap constructor to wrap a Tpetra::Map object - TpetraMap(const Teuchos::RCP > &map) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "int", typeid(EpetraNode).name()); - } - - //! Get the library used by this object (Tpetra or Epetra?) - UnderlyingLib lib() const { return UseTpetra; } - - //! Get the underlying Tpetra map - RCP > getTpetra_Map() const { return Teuchos::null; } - -#ifdef HAVE_XPETRA_TPETRA - using local_map_type = typename Map::local_map_type; - /// \brief Get the local Map for Kokkos kernels. - local_map_type getLocalMap() const { - return local_map_type(); - } -#endif - - //@} - -}; // TpetraMap class (specialization for GO=int and NO=EpetraNode) -#endif - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) -// specialization for Tpetra Map on EpetraNode and GO=int -template <> -class TpetraMap - : public virtual Map { - public: - typedef long long GlobalOrdinal; - typedef int LocalOrdinal; - typedef EpetraNode Node; - - //! @name Constructors and destructor - //@{ - - //! Constructor with Tpetra-defined contiguous uniform distribution. - TpetraMap(global_size_t numGlobalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm, - LocalGlobal lg = GloballyDistributed) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor with a user-defined contiguous distribution. - TpetraMap(global_size_t numGlobalElements, - size_t numLocalElements, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "long long", typeid(EpetraNode).name()); - } - - //! Constructor with user-defined arbitrary (possibly noncontiguous) distribution. - TpetraMap(global_size_t numGlobalElements, - const Teuchos::ArrayView &elementList, - GlobalOrdinal indexBase, - const Teuchos::RCP > &comm) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "long long", typeid(EpetraNode).name()); - } - - //! Destructor. - ~TpetraMap() {} - - //@} - - //! @name Attributes - //@{ - - //! The number of elements in this Map. - global_size_t getGlobalNumElements() const { return 0; } - - //! The number of elements belonging to the calling node. - size_t getLocalNumElements() const { return 0; } - - //! The index base for this Map. - GlobalOrdinal getIndexBase() const { return 0; } - - //! The minimum local index. - LocalOrdinal getMinLocalIndex() const { return 0; } - - //! The maximum local index on the calling process. - LocalOrdinal getMaxLocalIndex() const { return 0; } - - //! The minimum global index owned by the calling process. - GlobalOrdinal getMinGlobalIndex() const { return 0; } - - //! The maximum global index owned by the calling process. - GlobalOrdinal getMaxGlobalIndex() const { return 0; } - - //! The minimum global index over all processes in the communicator. - GlobalOrdinal getMinAllGlobalIndex() const { return 0; } - - //! The maximum global index over all processes in the communicator. - GlobalOrdinal getMaxAllGlobalIndex() const { return 0; } - - //! The local index corresponding to the given global index. - LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; } - - //! The global index corresponding to the given local index. - GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; } - - //! Return the process IDs and corresponding local IDs for the given global IDs. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList, const Teuchos::ArrayView &LIDList) const { return Xpetra::IDNotPresent; } - - //! Return the process IDs for the given global IDs. - LookupStatus getRemoteIndexList(const Teuchos::ArrayView &GIDList, const Teuchos::ArrayView &nodeIDList) const { return Xpetra::IDNotPresent; } - - //! Return a view of the global indices owned by this node. - Teuchos::ArrayView getLocalElementList() const { return Teuchos::ArrayView(); } - - //@} - - //! @name Boolean tests - //@{ - - //! True if the local index is valid for this Map on this node, else false. - bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; } - - //! True if the global index is found in this Map on this node, else false. - bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; } - - //! True if this Map is distributed contiguously, else false. - bool isContiguous() const { return false; } - - //! Whether this Map is globally distributed or locally replicated. - bool isDistributed() const { return false; } - - //! True if and only if map is compatible with this Map. - bool isCompatible(const Map &map) const { return false; } - - //! True if and only if map is identical to this Map. - bool isSameAs(const Map &map) const { return false; } - - //@} - - //! @name - //@{ - - //! Get this Map's Comm object. - Teuchos::RCP > getComm() const { return Teuchos::null; } - - //@} - - //! @name - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print this object with the given verbosity level to the given FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - RCP > removeEmptyProcesses() const { return Teuchos::null; } - RCP > replaceCommWithSubset(const Teuchos::RCP > &newComm) const { return Teuchos::null; } - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraMap constructor to wrap a Tpetra::Map object - TpetraMap(const Teuchos::RCP > &map) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMap).name(), typeid(TpetraMap).name(), "long long", typeid(EpetraNode).name()); - } - - //! Get the library used by this object (Tpetra or Epetra?) - UnderlyingLib lib() const { return UseTpetra; } - - //! Get the underlying Tpetra map - RCP > getTpetra_Map() const { return Teuchos::null; } - -#ifdef HAVE_XPETRA_TPETRA - using local_map_type = typename Map::local_map_type; - /// \brief Get the local Map for Kokkos kernels. - local_map_type getLocalMap() const { - // We will never be here, this is a stub class - return local_map_type(); - } -#endif - - //@} -}; // TpetraMap class (specialization for GO=int and NO=EpetraNode) -#endif - -#endif // HAVE_XPETRA_EPETRA } // namespace Xpetra diff --git a/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_decl.hpp b/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_decl.hpp index e92212017b20..86ca44a91195 100644 --- a/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_decl.hpp +++ b/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_decl.hpp @@ -48,14 +48,10 @@ class CrsMatrixWrap : public Matrix { typedef Xpetra::CrsMatrix CrsMatrix; typedef Xpetra::Matrix Matrix; typedef Xpetra::CrsGraph CrsGraph; -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::TpetraCrsMatrix TpetraCrsMatrix; -#endif typedef Xpetra::CrsMatrixFactory CrsMatrixFactory; typedef Xpetra::MatrixView MatrixView; -#ifdef HAVE_XPETRA_TPETRA typedef typename CrsMatrix::local_matrix_type local_matrix_type; -#endif public: //! @name Constructor/Destructor Methods @@ -78,7 +74,6 @@ class CrsMatrixWrap : public Matrix { //! Constructor specifying fixed number of entries for each row and column map CrsMatrixWrap(const RCP &rowMap, const RCP &colMap, const ArrayRCP &NumEntriesPerRowToAlloc); -#ifdef HAVE_XPETRA_TPETRA //! Constructor specifying fixed number of entries for each row and column map CrsMatrixWrap(const RCP &rowMap, const RCP &colMap, const local_matrix_type &lclMatrix, const Teuchos::RCP ¶ms = null); @@ -86,11 +81,6 @@ class CrsMatrixWrap : public Matrix { CrsMatrixWrap(const local_matrix_type &lclMatrix, const RCP &rowMap, const RCP &colMap, const RCP &domainMap = Teuchos::null, const RCP &rangeMap = Teuchos::null, const Teuchos::RCP ¶ms = null); -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif CrsMatrixWrap(RCP matrix); @@ -415,14 +405,8 @@ class CrsMatrixWrap : public Matrix { void setObjectLabel(const std::string &objectLabel); //@} -#ifdef HAVE_XPETRA_TPETRA virtual local_matrix_type getLocalMatrixDevice() const; virtual typename local_matrix_type::HostMirror getLocalMatrixHost() const; -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif // JG: Added: diff --git a/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_def.hpp b/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_def.hpp index 0a88ed85d2a1..c6b044a6bcb5 100644 --- a/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_def.hpp +++ b/packages/xpetra/src/Matrix/Xpetra_CrsMatrixWrap_def.hpp @@ -73,7 +73,6 @@ CrsMatrixWrap::CrsMatrixWrap(const RC CreateDefaultView(); } -#ifdef HAVE_XPETRA_TPETRA template CrsMatrixWrap::CrsMatrixWrap(const RCP &rowMap, const RCP &colMap, const local_matrix_type &lclMatrix, const Teuchos::RCP ¶ms) : finalDefaultView_(false) { @@ -95,11 +94,6 @@ CrsMatrixWrap::CrsMatrixWrap(const lo // Default view CreateDefaultView(); } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif template CrsMatrixWrap::CrsMatrixWrap(RCP matrix) @@ -406,7 +400,6 @@ void CrsMatrixWrap::setObjectLabel(co matrixData_->setObjectLabel(objectLabel); } -#ifdef HAVE_XPETRA_TPETRA template typename Xpetra::CrsMatrix::local_matrix_type::HostMirror CrsMatrixWrap::getLocalMatrixHost() const { @@ -417,11 +410,6 @@ typename Xpetra::CrsMatrix::local_mat CrsMatrixWrap::getLocalMatrixDevice() const { return matrixData_->getLocalMatrixDevice(); } -#else -#ifdef __GNUC__ -#warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif -#endif template bool CrsMatrixWrap::hasCrsGraph() const { return true; } diff --git a/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_decl.hpp b/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_decl.hpp index 384046030aea..959676779cc5 100644 --- a/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_decl.hpp +++ b/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_decl.hpp @@ -53,21 +53,6 @@ class MatrixFactory2 { RCP oldCrsOp = oldOp->getCrsMatrix(); -#ifdef HAVE_XPETRA_EPETRA -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - RCP > oldECrsOp = Teuchos::rcp_dynamic_cast >(oldCrsOp); - if (oldECrsOp != Teuchos::null) { - // Underlying matrix is Epetra - RCP newECrsOp(new EpetraCrsMatrixT(*oldECrsOp)); - RCP newOp(new CrsMatrixWrap(newECrsOp)); - if (setFixedBlockSize) - newOp->SetFixedBlockSize(A->GetFixedBlockSize()); - return newOp; - } -#endif -#endif - -#ifdef HAVE_XPETRA_TPETRA // Underlying matrix is Tpetra RCP oldTCrsOp = Teuchos::rcp_dynamic_cast(oldCrsOp); if (oldTCrsOp != Teuchos::null) { @@ -78,10 +63,6 @@ class MatrixFactory2 { return newOp; } return Teuchos::null; -#else - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::EpetraCrsMatrix or Xpetra::TpetraCrsMatrix failed"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); // make compiler happy -#endif } // BuildCopy }; @@ -105,21 +86,6 @@ class MatrixFactory2 { RCP oldCrsOp = oldOp->getCrsMatrix(); -#ifdef HAVE_XPETRA_EPETRA -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - RCP > oldECrsOp = Teuchos::rcp_dynamic_cast >(oldCrsOp); - if (oldECrsOp != Teuchos::null) { - // Underlying matrix is Epetra - RCP newECrsOp(new EpetraCrsMatrixT(*oldECrsOp)); - RCP newOp(new CrsMatrixWrap(newECrsOp)); - if (setFixedBlockSize) - newOp->SetFixedBlockSize(A->GetFixedBlockSize()); - return newOp; - } -#endif -#endif - -#ifdef HAVE_XPETRA_TPETRA // Underlying matrix is Tpetra RCP oldTCrsOp = Teuchos::rcp_dynamic_cast(oldCrsOp); if (oldTCrsOp != Teuchos::null) { @@ -129,9 +95,6 @@ class MatrixFactory2 { newOp->SetFixedBlockSize(A->GetFixedBlockSize()); return newOp; } -#else - throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::EpetraCrsMatrix or Xpetra::TpetraCrsMatrix failed"); -#endif return Teuchos::null; // make compiler happy } diff --git a/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_def.hpp b/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_def.hpp index 1e3b15de0342..25bf3491d9b5 100644 --- a/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_def.hpp +++ b/packages/xpetra/src/Matrix/Xpetra_MatrixFactory2_def.hpp @@ -30,14 +30,6 @@ RCP> MatrixFactory2 oldTCrsOp = Teuchos::rcp_dynamic_cast(oldCrsOp); @@ -53,7 +45,6 @@ RCP> MatrixFactory2 -Epetra_IntMultiVector &toEpetra(MultiVector &x) { - XPETRA_DYNAMIC_CAST(EpetraIntMultiVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_IntMultiVector(); -} - -template -const Epetra_IntMultiVector &toEpetra(const MultiVector &x) { - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_IntMultiVector(); -} -// - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraIntMultiVectorT; -template Epetra_IntMultiVector &toEpetra(MultiVector &); -template const Epetra_IntMultiVector &toEpetra(const MultiVector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/MultiVector/Xpetra_EpetraIntMultiVector.hpp b/packages/xpetra/src/MultiVector/Xpetra_EpetraIntMultiVector.hpp deleted file mode 100644 index 3b8e995f0709..000000000000 --- a/packages/xpetra/src/MultiVector/Xpetra_EpetraIntMultiVector.hpp +++ /dev/null @@ -1,1188 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAINTMULTIVECTOR_HPP -#define XPETRA_EPETRAINTMULTIVECTOR_HPP - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_ConfigDefs.hpp" -#include "Xpetra_MultiVector.hpp" -#include "Xpetra_Exceptions.hpp" - -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Epetra_IntMultiVector.h" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/MultiVector/Xpetra_EpetraIntMultiVector.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/MultiVector/Xpetra_EpetraIntMultiVector.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED Epetra_IntMultiVector &toEpetra(MultiVector &); - -template -XPETRA_DEPRECATED const Epetra_IntMultiVector &toEpetra(const MultiVector &); -// - -// stub implementation for EpetraIntMultiVectorT -template -class XPETRA_DEPRECATED EpetraIntMultiVectorT - : public MultiVector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - EpetraIntMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraIntMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! MultiVector copy constructor. - EpetraIntMultiVectorT(const MultiVector &source, const Teuchos::DataAccess copyOrView = Teuchos::Copy) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraIntMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraIntMultiVectorT(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraIntMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Destructor. - ~EpetraIntMultiVectorT(){}; - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) {} - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int seed) { - XPETRA_MONITOR("EpetraIntMultiVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::setSeed(): Functionnality not available in Epetra"); - } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const { - return Teuchos::null; - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j) { - return Teuchos::null; - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t j) const { - return Teuchos::ArrayRCP(); - } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - return Teuchos::ArrayRCP(); - } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector &A, - const Teuchos::ArrayView &dots) const { - TEUCHOS_TEST_FOR_EXCEPTION(-1, Xpetra::Exceptions::NotImplemented, - "This function is not implemented in Epetra_IntMultiVector"); - } - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector &A) {} - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) { - TEUCHOS_TEST_FOR_EXCEPTION(-1, Xpetra::Exceptions::NotImplemented, - "This function is not implemented in Epetra_IntMultiVector"); - } - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int &alpha) {} - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) { - XPETRA_MONITOR("EpetraIntMultiVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::scale(): Functionnality not available in Epetra"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int &alpha, const MultiVector &A, const int &beta) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::update(): Functionnality not available in Epetra"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int &alpha, const MultiVector &A, const int &beta, const MultiVector &B, const int &gamma) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::update(): Functionnality not available in Epetra"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::norm1(): Functionnality not available in Epetra"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::norm2(): Functionnality not available in Epetra"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::normInf(): Functionnality not available in Epetra"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView &means) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::meanValue(): Functionnality not available in Epetra"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView &maxs) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::maxValue(): Functionnality not available in Epetra"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector &A, const MultiVector &B, const int &beta) { - XPETRA_MONITOR("EpetraIntMultiVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra::EpetraIntMultiVectorT::multiply(): Functionnality not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int scalarAB, const Vector &A, const MultiVector &B, int scalarThis) { - XPETRA_MONITOR("EpetraIntMultiVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "Xpetra_EpetraIntMultiVector: elementWiseMultiply not implemented because Epetra_IntMultiVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntMultiVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntMultiVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntMultiVectorT::replaceLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntMultiVectorT::sumIntoLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraIntMultiVectorT::getNumVectors"); - return 1; - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { return 0; } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return 0; } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - return std::string(""); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - RCP getEpetra_IntMultiVector() const { return Teuchos::null; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - return Teuchos::null; - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void replaceMap(const RCP > &map) { - // do nothing - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) {} - - private: - //! The Epetra_IntMultiVector which this class wraps. - // RCP< Epetra_IntMultiVector > vec_; - -}; // class EpetraIntMultiVectorT - -// specialization on GO=int and Node=Serial -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraIntMultiVectorT - : public virtual MultiVector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - EpetraIntMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - vec_ = rcp(new Epetra_IntMultiVector(toEpetra(map), NumVectors, zeroOut)); - } - - //! MultiVector copy constructor. - EpetraIntMultiVectorT(const MultiVector &source, const Teuchos::DataAccess copyOrView = Teuchos::Copy) { - if (copyOrView == Teuchos::Copy) - vec_ = rcp(new Epetra_IntMultiVector(toEpetra(source))); - else { - int *indices = new int[getNumVectors()]; - for (size_t i = 0; i < getNumVectors(); i++) - indices[i] = i; - vec_ = Teuchos::rcp(new Epetra_IntMultiVector(View, toEpetra(source), indices, getNumVectors())); - delete[] indices; - } - } - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraIntMultiVectorT(const Teuchos::RCP > & /* map */, const Teuchos::ArrayView > & /* ArrayOfPtrs */, size_t /* NumVectors */) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraIntMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Destructor. - ~EpetraIntMultiVectorT(){}; - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) { - int ierr = 0; - ierr = vec_->PutScalar(value); - TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, Xpetra::Exceptions::RuntimeError, "Epetra_IntMultiVector::PutScalar returned an error.") - } - - //! Set multi-vector values to random numbers. - void randomize(bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int /* seed */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::setSeed(): Functionnality not available in Epetra"); - } - - typedef typename Xpetra::MultiVector::dual_view_type dual_view_type; - - typename dual_view_type::t_host_const_um getHostLocalView(Access::ReadOnlyStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_const_um getDeviceLocalView(Access::ReadOnlyStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::OverwriteAllStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::OverwriteAllStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::ReadWriteStruct) const override { - typedef Kokkos::View - epetra_view_type; - // access Epetra multivector data - Scalar *data = NULL; - int myLDA; - vec_->ExtractView(&data, &myLDA); - int localLength = vec_->MyLength(); - int numVectors = getNumVectors(); - - // create view - epetra_view_type test = epetra_view_type(data, localLength, numVectors); - typename dual_view_type::t_host_um ret = subview(test, Kokkos::ALL(), Kokkos::ALL()); - - return ret; - } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::ReadWriteStruct) const override { return getHostLocalView(Access::ReadWrite); } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t /* j */) const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t /* j */) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t j) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::getData"); - - int **arrayOfPointers; - vec_->ExtractView(&arrayOfPointers); - int *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - XPETRA_MONITOR("EpetraIntMultiVectorT::getDataNonConst"); - - int **arrayOfPointers; - vec_->ExtractView(&arrayOfPointers); - int *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector & /* A */, - const Teuchos::ArrayView & /* dots */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::dot"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "This function is not implemented in Epetra_IntMultiVector"); - } - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::abs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "This function is not available in Epetra_IntMultiVector"); - } - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::reciprocal"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::RuntimeError, "The reciprocal of an IntMultiVector is not defined!"); - } - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int & /* alpha */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView /* alpha */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */, const MultiVector & /* B */, const int & /* gamma */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, B, eB, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView & /* means */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView & /* maxs */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp /* transA */, Teuchos::ETransp /* transB */, const int & /* alpha */, const MultiVector & /* A */, const MultiVector & /* B */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int /* scalarAB */, const Vector & /* A */, const MultiVector & /* B */, int /* scalarThis */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra_EpetraIntMultiVector: elementWiseMultiply not implemented because Epetra_IntMultiVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - vec_->ReplaceGlobalValue(globalRow, vectorIndex, value); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - vec_->SumIntoGlobalValue(globalRow, vectorIndex, value); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - vec_->ReplaceMyValue(myRow, vectorIndex, value); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - vec_->SumIntoMyValue(myRow, vectorIndex, value); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - return vec_->NumVectors(); - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { - return vec_->MyLength(); - } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return vec_->GlobalLength64(); } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::isSameSize"); - auto vv = toEpetra(vec); - return ((getLocalLength() == Teuchos::as(vv.MyLength())) && - (getNumVectors() == Teuchos::as(vv.NumVectors()))); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraIntMultiVectorT::description"); - - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::describe"); - - // This implementation come from Tpetra_Vector_def.hpp (without modification) // JG: true? - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - if (verbLevel > Teuchos::VERB_NONE) - vec_->Print(out); - } - - //@} - - RCP getEpetra_IntMultiVector() const { return vec_; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - RCP map = rcp(new Epetra_BlockMap(vec_->Map())); - return rcp(new Xpetra::EpetraMapT(map)); - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, source, tSource, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tSource.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, dest, tDest, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tDest.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, source, tSource, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tSource.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, dest, tDest, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tDest.getEpetra_IntMultiVector(); - int err = vec_->Export(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void replaceMap(const RCP > &map) { - XPETRA_MONITOR("EpetraIntMultiVectorT::replaceMap"); - int err = 0; - if (!map.is_null()) { - err = this->getEpetra_IntMultiVector()->ReplaceMap(toEpetra(map)); - - } else { - // Replace map with a dummy map to avoid potential hangs later - Epetra_SerialComm SComm; - Epetra_Map NewMap((GlobalOrdinal)vec_->MyLength(), (GlobalOrdinal)vec_->Map().IndexBase64(), SComm); - err = this->getEpetra_IntMultiVector()->ReplaceMap(NewMap); - } - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraIntMultiVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntMultiVectorT " - "(which means it wraps an Epetra_IntMultiVector), but the RHS has some " - "other type. This probably means that the RHS wraps either an " - "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " - "does not currently implement assignment from a Tpetra object to an " - "Epetra object, though this could be added with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_IntMultiVector(); - RCP lhsImpl = this->getEpetra_IntMultiVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntMultiVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntMultiVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_IntMultiVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_IntMultiVector which this class wraps. - RCP vec_; -}; -#endif - -// specialization on GO=long long and Node=Serial -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraIntMultiVectorT - : public virtual MultiVector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - EpetraIntMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - vec_ = rcp(new Epetra_IntMultiVector(toEpetra(map), NumVectors, zeroOut)); - } - - //! MultiVector copy constructor. - EpetraIntMultiVectorT(const MultiVector &source) { - vec_ = rcp(new Epetra_IntMultiVector(toEpetra(source))); - } - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraIntMultiVectorT(const Teuchos::RCP > & /* map */, const Teuchos::ArrayView > & /* ArrayOfPtrs */, size_t /* NumVectors */) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraIntMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Destructor. - ~EpetraIntMultiVectorT(){}; - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) { - int ierr = 0; - ierr = vec_->PutScalar(value); - TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, Xpetra::Exceptions::RuntimeError, "Epetra_IntMultiVector::PutScalar returns a non zero error."); - } - - //! Set multi-vector values to random numbers. - void randomize(bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntMultiVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int /* seed */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntMultiVectorT::setSeed(): Functionnality not available in Epetra"); - } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t /* j */) const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t /* j */) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t j) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::getData"); - - int **arrayOfPointers; - vec_->ExtractView(&arrayOfPointers); - int *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - XPETRA_MONITOR("EpetraIntMultiVectorT::getDataNonConst"); - - int **arrayOfPointers; - vec_->ExtractView(&arrayOfPointers); - int *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector & /* A */, - const Teuchos::ArrayView & /* dots */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::dot"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::abs"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "This function is not available in Epetra_IntMultiVector"); - } - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::reciprocal"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, - "This function is not implemented in Epetra_IntMultiVector"); - } - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int & /* alpha */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView /* alpha */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */, const MultiVector & /* B */, const int & /* gamma */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, B, eB, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView & /* means */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView & /* maxs */) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp /* transA */, Teuchos::ETransp /* transB */, const int & /* alpha */, const MultiVector & /* A */, const MultiVector & /* B */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int /* scalarAB */, const Vector & /* A */, const MultiVector & /* B */, int /* scalarThis */) { - XPETRA_MONITOR("EpetraIntMultiVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra_EpetraIntMultiVector: elementWiseMultiply not implemented because Epetra_IntMultiVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - vec_->ReplaceGlobalValue(globalRow, vectorIndex, value); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - vec_->SumIntoGlobalValue(globalRow, vectorIndex, value); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - vec_->ReplaceMyValue(myRow, vectorIndex, value); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - vec_->SumIntoMyValue(myRow, vectorIndex, value); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - return vec_->NumVectors(); - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { return vec_->MyLength(); } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return vec_->GlobalLength64(); } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::isSameSize"); - auto vv = toEpetra(vec); - return ((getLocalLength() == Teuchos::as(vv.MyLength())) && - (getNumVectors() == Teuchos::as(vv.NumVectors()))); - } - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraIntMultiVectorT::description"); - - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraIntMultiVectorT::describe"); - - // This implementation come from Tpetra_Vector_def.hpp (without modification) // JG: true? - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - if (verbLevel > Teuchos::VERB_NONE) - vec_->Print(out); - } - - //@} - - RCP getEpetra_IntMultiVector() const { return vec_; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - RCP map = rcp(new Epetra_BlockMap(vec_->Map())); - return rcp(new Xpetra::EpetraMapT(map)); - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, source, tSource, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tSource.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, dest, tDest, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tDest.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, source, tSource, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tSource.getEpetra_IntMultiVector(); - int err = vec_->Import(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntMultiVectorT, dest, tDest, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraIntMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntMultiVector &v = *tDest.getEpetra_IntMultiVector(); - int err = vec_->Export(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void replaceMap(const RCP > &map) { - XPETRA_MONITOR("EpetraIntMultiVectorT::replaceMap"); - int err = 0; - if (!map.is_null()) { - err = this->getEpetra_IntMultiVector()->ReplaceMap(toEpetra(map)); - - } else { - // Replace map with a dummy map to avoid potential hangs later - Epetra_SerialComm SComm; - Epetra_Map NewMap((GlobalOrdinal)vec_->MyLength(), (GlobalOrdinal)vec_->Map().IndexBase64(), SComm); - err = this->getEpetra_IntMultiVector()->ReplaceMap(NewMap); - } - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraIntMultiVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntMultiVectorT " - "(which means it wraps an Epetra_IntMultiVector), but the RHS has some " - "other type. This probably means that the RHS wraps either an " - "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " - "does not currently implement assignment from a Tpetra object to an " - "Epetra object, though this could be added with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_IntMultiVector(); - RCP lhsImpl = this->getEpetra_IntMultiVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntMultiVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntMultiVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_IntMultiVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_IntMultiVector which this class wraps. - RCP vec_; -}; -#endif - -} // namespace Xpetra - -#endif // XPETRA_EPETRAINTMULTIVECTOR_HPP diff --git a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.cpp b/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.cpp deleted file mode 100644 index 673449366fa0..000000000000 --- a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.cpp +++ /dev/null @@ -1,172 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraMultiVector.hpp" - -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_Exceptions.hpp" - -#include "Xpetra_EpetraVector.hpp" - -#include "Epetra_SerialComm.h" - -namespace Xpetra { - -// specialization for GO=int and NO=EpetraNode -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -Teuchos::RCP > EpetraMultiVectorT::getVector(size_t j) const { - XPETRA_MONITOR("EpetraMultiVectorT::getVector"); - return rcp(new Xpetra::EpetraVectorT(vec_, j)); // See constructor EpetraVectorT(const RCP &mv, size_t j) for more info -} - -//! Return a Vector which is a nonconst view of column j. -Teuchos::RCP > EpetraMultiVectorT::getVectorNonConst(size_t j) { - XPETRA_MONITOR("EpetraMultiVectorT::getVector"); - return rcp(new EpetraVectorT(vec_, j)); // See constructor EpetraVectorT(const RCP &mv, size_t j) for more info -} -#endif - -// specialization for GO=long long and NO=EpetraNode -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -Teuchos::RCP > EpetraMultiVectorT::getVector(size_t j) const { - XPETRA_MONITOR("EpetraMultiVectorT::getVector"); - return rcp(new Xpetra::EpetraVectorT(vec_, j)); // See constructor EpetraVectorT(const RCP &mv, size_t j) for more info -} - -//! Return a Vector which is a nonconst view of column j. -Teuchos::RCP > EpetraMultiVectorT::getVectorNonConst(size_t j) { - XPETRA_MONITOR("EpetraMultiVectorT::getVector"); - return rcp(new EpetraVectorT(vec_, j)); // See constructor EpetraVectorT(const RCP &mv, size_t j) for more info -} -#endif - -// TODO: move that elsewhere -template -const Epetra_MultiVector &toEpetra(const MultiVector &x) { - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_MultiVector(); -} - -template -Epetra_MultiVector &toEpetra(MultiVector &x) { - XPETRA_DYNAMIC_CAST(EpetraMultiVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_MultiVector(); -} -// - -template -RCP > toXpetra(RCP vec) { - if (!vec.is_null()) - return rcp(new EpetraMultiVectorT(vec)); - - return Teuchos::null; -} - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#else // Tpetra is disabled -typedef Xpetra::EpetraNode default_node_type; -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#else // Tpetra is disabled -typedef Xpetra::EpetraNode default_node_type; -template class EpetraMultiVectorT; -template RCP > toXpetra(RCP); -template Epetra_MultiVector &toEpetra(MultiVector &); -template const Epetra_MultiVector &toEpetra(const MultiVector &); -#endif -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.hpp b/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.hpp deleted file mode 100644 index e0d8ee0aa502..000000000000 --- a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.hpp +++ /dev/null @@ -1,1189 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAMULTIVECTOR_HPP -#define XPETRA_EPETRAMULTIVECTOR_HPP - -/* this file is automatically generated - do not edit (see script/epetra.py) */ - -#include -#include - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_MultiVector.hpp" -#include "Xpetra_Vector.hpp" - -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_Utils.hpp" -#include "Xpetra_EpetraUtils.hpp" -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_Exceptions.hpp" -#include "Epetra_SerialComm.h" - -#include -#include - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVector.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED const Epetra_MultiVector &toEpetra(const MultiVector &); -template -XPETRA_DEPRECATED Epetra_MultiVector &toEpetra(MultiVector &); -template -XPETRA_DEPRECATED RCP > toXpetra(RCP vec); - -// we need this forward declaration -#ifndef DOXYGEN_SHOULD_SKIP_THIS -template -class EpetraVectorT; -#endif - -template -class XPETRA_DEPRECATED EpetraMultiVectorT - : public virtual MultiVector { - typedef double Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Basic MultiVector constuctor. - EpetraMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! MultiVector copy constructor. - EpetraMultiVectorT(const MultiVector &source, const Teuchos::DataAccess copyOrView = Teuchos::Copy) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraMultiVectorT(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! MultiVector destructor. - virtual ~EpetraMultiVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Set all values in the multivector with the given value. - void putScalar(const Scalar &value) {} - - //@} - - //! @name Data copy and view methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const { - return Teuchos::null; - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j) { - return Teuchos::null; - } - - //! Const view of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getData(size_t j) const { - return ArrayRCP(); - } - - //! View of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - return ArrayRCP(); - } - - //@} - - //! @name Mathematical methods - //@{ - - //! Compute the dot product of each corresponding pair of vectors (columns) in A and B. - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const {} - - //! Put element-wise absolute values of input Multi-vector in target: A = abs(this). - void abs(const MultiVector &A) {} - - //! Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) {} - - //! Scale in place: this = alpha*this. - void scale(const Scalar &alpha) {} - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) {} - - //! Update: this = beta*this + alpha*A. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta) {} - - //! Update: this = gamma*this + alpha*A + beta*B. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma) {} - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const {} - - //! Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector &A, const MultiVector &B, const Scalar &beta) {} - - //! Multiply a Vector A elementwise by a MultiVector B. - void elementWiseMultiply(Scalar scalarAB, const Vector &A, const MultiVector &B, Scalar scalarThis) {} - - //@} - - //! @name Attribute access functions - //@{ - - //! Number of columns in the multivector. - size_t getNumVectors() const { return 0; } - - //! Local number of rows on the calling process. - size_t getLocalLength() const { return 0; } - - //! Global number of rows in the multivector. - global_size_t getGlobalLength() const { return 0; } - - // \brief Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = false) {} - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = false) {} - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { return Teuchos::null; } - - //! Import. - void doImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - //! Export. - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - //! Import (using an Exporter). - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - //! Export (using an Importer). - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - //! Replace the underlying Map in place. - void replaceMap(const Teuchos::RCP > &map) {} - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_MultiVector object - EpetraMultiVectorT(const RCP &vec) { // TODO removed const - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraMultiVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Get the underlying Epetra multivector - RCP getEpetra_MultiVector() const { return Teuchos::null; } - - //! Set seed for Random function. - void setSeed(unsigned int seed) {} - - //@} - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) {} - -}; // EpetraMultiVectorT class - -// specialization on GO=int and Node=EpetraNode -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraMultiVectorT - : public virtual MultiVector { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Basic MultiVector constuctor. - EpetraMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) - : vec_(Teuchos::rcp(new Epetra_MultiVector(toEpetra(map), Teuchos::as(NumVectors), zeroOut))) {} - - //! MultiVector copy constructor. - EpetraMultiVectorT(const MultiVector &source, const Teuchos::DataAccess copyOrView = Teuchos::Copy) { - if (copyOrView == Teuchos::Copy) - vec_ = Teuchos::rcp(new Epetra_MultiVector(toEpetra(source))); - else { - int *indices = new int[source.getNumVectors()]; - for (size_t i = 0; i < source.getNumVectors(); i++) - indices[i] = i; - vec_ = Teuchos::rcp(new Epetra_MultiVector(View, toEpetra(source), indices, source.getNumVectors())); - delete[] indices; - } - } - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraMultiVectorT(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - // TODO: input argument 'NumVectors' is not necessary in both Xpetra and Tpetra interface. Should it be removed? - - const std::string tfecfFuncName("MultiVector(ArrayOfPtrs)"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(NumVectors < 1 || NumVectors != Teuchos::as(ArrayOfPtrs.size()), std::runtime_error, - ": ArrayOfPtrs.size() must be strictly positive and as large as ArrayOfPtrs."); - -#ifdef HAVE_XPETRA_DEBUG - // This cannot be tested by Epetra itself - { - size_t localLength = map->getLocalNumElements(); - for (int j = 0; j < ArrayOfPtrs.size(); j++) { - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(Teuchos::as(ArrayOfPtrs[j].size()) != localLength, std::runtime_error, - ": ArrayOfPtrs[" << j << "].size() (== " << ArrayOfPtrs[j].size() << ") is not equal to getLocalLength() (== " << localLength); - } - } -#endif - - // Convert Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > to double** - Array arrayOfRawPtrs(ArrayOfPtrs.size()); - for (int i = 0; i < ArrayOfPtrs.size(); i++) { - arrayOfRawPtrs[i] = ArrayOfPtrs[i].getRawPtr(); - } - double **rawArrayOfRawPtrs = const_cast(arrayOfRawPtrs.getRawPtr()); // This const_cast should be fine, because Epetra_DataAccess=Copy. - - vec_ = Teuchos::rcp(new Epetra_MultiVector(Copy, toEpetra(map), rawArrayOfRawPtrs, static_cast(NumVectors))); - } - - //! MultiVector destructor. - virtual ~EpetraMultiVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceGlobalValue"); - vec_->ReplaceGlobalValue(globalRow, Teuchos::as(vectorIndex), value); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::sumIntoGlobalValue"); - vec_->SumIntoGlobalValue(globalRow, Teuchos::as(vectorIndex), value); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceLocalValue"); - vec_->ReplaceMyValue(myRow, Teuchos::as(vectorIndex), value); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::sumIntoLocalValue"); - vec_->SumIntoMyValue(myRow, Teuchos::as(vectorIndex), value); - } - - //! Set all values in the multivector with the given value. - void putScalar(const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::putScalar"); - vec_->PutScalar(value); - } - - //@} - - //! @name Data copy and view methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const; - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j); - - //! Const view of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getData(size_t j) const { - XPETRA_MONITOR("EpetraMultiVectorT::getData"); - - double **arrayOfPointers; - - vec_->ExtractView(&arrayOfPointers); - - double *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // no ownership - } - - //! View of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - XPETRA_MONITOR("EpetraMultiVectorT::getDataNonConst"); - - double **arrayOfPointers; - - vec_->ExtractView(&arrayOfPointers); - - double *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // no ownership - } - - //@} - - //! @name Mathematical methods - //@{ - - //! Compute the dot product of each corresponding pair of vectors (columns) in A and B. - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const { - XPETRA_MONITOR("EpetraMultiVectorT::dot"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - vec_->Dot(*eA.getEpetra_MultiVector(), dots.getRawPtr()); - } - - //! Put element-wise absolute values of input Multi-vector in target: A = abs(this). - void abs(const MultiVector &A) { - XPETRA_MONITOR("EpetraMultiVectorT::abs"); - vec_->Abs(toEpetra(A)); - } - - //! Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) { - XPETRA_MONITOR("EpetraMultiVectorT::reciprocal"); - vec_->Reciprocal(toEpetra(A)); - } - - //! Scale in place: this = alpha*this. - void scale(const Scalar &alpha) { - XPETRA_MONITOR("EpetraMultiVectorT::scale"); - vec_->Scale(alpha); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) { - XPETRA_MONITOR("EpetraMultiVectorT::scale"); - // Epetra, unlike Tpetra, doesn't implement this version of - // scale(). Deal with this by scaling one column at a time. - const size_t numVecs = this->getNumVectors(); - for (size_t j = 0; j < numVecs; ++j) { - Epetra_Vector *v = (*vec_)(j); - v->Scale(alpha[j]); - } - } - - //! Update: this = beta*this + alpha*A. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta) { - XPETRA_MONITOR("EpetraMultiVectorT::update"); - vec_->Update(alpha, toEpetra(A), beta); - } - - //! Update: this = gamma*this + alpha*A + beta*B. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma) { - XPETRA_MONITOR("EpetraMultiVectorT::update"); - vec_->Update(alpha, toEpetra(A), beta, toEpetra(B), gamma); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::norm1"); - vec_->Norm1(norms.getRawPtr()); - } - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::norm2"); - vec_->Norm2(norms.getRawPtr()); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::normInf"); - vec_->NormInf(norms.getRawPtr()); - } - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const { - XPETRA_MONITOR("EpetraMultiVectorT::meanValue"); - vec_->MeanValue(means.getRawPtr()); - } // TODO: modify ArrayView size ?? - - //! Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector &A, const MultiVector &B, const Scalar &beta) { - XPETRA_MONITOR("EpetraMultiVectorT::multiply"); - vec_->Multiply(toEpetra(transA), toEpetra(transB), alpha, toEpetra(A), toEpetra(B), beta); - } - - //! Multiply a Vector A elementwise by a MultiVector B. - void elementWiseMultiply(Scalar scalarAB, const Vector &A, const MultiVector &B, Scalar scalarThis) { - XPETRA_MONITOR("EpetraMultiVectorT::elementWiseMultiply"); - vec_->Multiply(scalarAB, toEpetra(A), toEpetra(B), scalarThis); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Number of columns in the multivector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraMultiVectorT::getNumVectors"); - return vec_->NumVectors(); - } - - //! Local number of rows on the calling process. - size_t getLocalLength() const { - XPETRA_MONITOR("EpetraMultiVectorT::getLocalLength"); - return vec_->MyLength(); - } - - //! Global number of rows in the multivector. - global_size_t getGlobalLength() const { - XPETRA_MONITOR("EpetraMultiVectorT::getGlobalLength"); - return vec_->GlobalLength64(); - } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraMultiVectorT::isSameSize"); - auto vv = toEpetra(vec); - return ((vec_->MyLength() == vv.MyLength()) && (vec_->NumVectors() == vv.NumVectors())); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraMultiVectorT::description"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN("TODO"); - } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel /* verbLevel */ = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraMultiVectorT::describe"); - vec_->Print(out); - } - - //@} - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = false) { - XPETRA_MONITOR("EpetraMultiVectorT::randomize"); - - if (bUseXpetraImplementation) - Xpetra::MultiVector::Xpetra_randomize(); - else - vec_->Random(); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = false) { - XPETRA_MONITOR("EpetraMultiVectorT::randomize"); - - if (bUseXpetraImplementation) - Xpetra::MultiVector::Xpetra_randomize(minVal, maxVal); - else { - vec_->Random(); - const size_t numVectors = getNumVectors(); - for (size_t i = 0; i < numVectors; i++) { - Teuchos::ArrayRCP datai = getDataNonConst(i); - - const size_t myLength = getLocalLength(); - for (size_t j = 0; j < myLength; j++) { - datai[j] = 0.5 * (maxVal - minVal) * datai[j] + 0.5 * (maxVal + minVal); - } - } - } - } - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { - XPETRA_MONITOR("EpetraMultiVectorT::getMap"); - return toXpetra(vec_->Map()); - } - - //! Import. - void doImport(const DistObject &source, const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, source, tSource, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra is " << err); - } - - //! Export. - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, dest, tDest, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, source, tSource, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, dest, tDest, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Replace the underlying Map in place. - void replaceMap(const Teuchos::RCP > &map) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceMap"); - int err = 0; - if (!map.is_null()) { - err = this->getEpetra_MultiVector()->ReplaceMap(toEpetra(map)); - - } else { - // Replace map with a dummy map to avoid potential hangs later - Epetra_SerialComm SComm; - Epetra_Map NewMap((GlobalOrdinal)vec_->MyLength(), (GlobalOrdinal)vec_->Map().IndexBase64(), SComm); - err = this->getEpetra_MultiVector()->ReplaceMap(NewMap); - } - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_MultiVector object - EpetraMultiVectorT(const RCP &vec) - : vec_(vec) {} // TODO removed const - - //! Get the underlying Epetra multivector - RCP getEpetra_MultiVector() const { return vec_; } - - //! Set seed for Random function. - void setSeed(unsigned int seed) { - XPETRA_MONITOR("EpetraMultiVectorT::seedrandom"); - - Teuchos::ScalarTraits::seedrandom(seed); - vec_->SetSeed(seed); - } - - typedef typename Xpetra::MultiVector::dual_view_type dual_view_type; - - typename dual_view_type::t_host_const_um getHostLocalView(Access::ReadOnlyStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_const_um getDeviceLocalView(Access::ReadOnlyStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::OverwriteAllStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::OverwriteAllStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::ReadWriteStruct) const override { - typedef Kokkos::View - epetra_view_type; - - // access Epetra multivector data - double *data = NULL; - int myLDA; - vec_->ExtractView(&data, &myLDA); - int localLength = vec_->MyLength(); - int numVectors = getNumVectors(); - - // create view - epetra_view_type test = epetra_view_type(data, localLength, numVectors); - typename dual_view_type::t_host_um ret = subview(test, Kokkos::ALL(), Kokkos::ALL()); - - return ret; - } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::ReadWriteStruct) const override { return getHostLocalView(Access::ReadWrite); } - - //@} - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraMultiVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraMultiVectorT " - "(which means it wraps an Epetra_MultiVector), but the RHS has some " - "other type. This probably means that the RHS wraps a Tpetra::Multi" - "Vector. Xpetra::MultiVector does not currently implement assignment " - "from a Tpetra object to an Epetra object, though this could be added " - "with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_MultiVector(); - RCP lhsImpl = this->getEpetra_MultiVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraMultiVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraMultiVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_MultiVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_MultiVector which this class wraps. - RCP vec_; - -}; // EpetraMultiVectorT class (specialization on GO=int, NO=EpetraNode -#endif - -// specialization on GO=long long and EpetraNode -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraMultiVectorT - : public virtual MultiVector { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Basic MultiVector constuctor. - EpetraMultiVectorT(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) - : vec_(Teuchos::rcp(new Epetra_MultiVector(toEpetra(map), Teuchos::as(NumVectors), zeroOut))) {} - - //! MultiVector copy constructor. - EpetraMultiVectorT(const MultiVector &source) - : vec_(Teuchos::rcp(new Epetra_MultiVector(toEpetra(source)))) {} - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - EpetraMultiVectorT(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - // TODO: input argument 'NumVectors' is not necessary in both Xpetra and Tpetra interface. Should it be removed? - - const std::string tfecfFuncName("MultiVector(ArrayOfPtrs)"); - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(NumVectors < 1 || NumVectors != Teuchos::as(ArrayOfPtrs.size()), std::runtime_error, - ": ArrayOfPtrs.size() must be strictly positive and as large as ArrayOfPtrs."); - -#ifdef HAVE_XPETRA_DEBUG - // This cannot be tested by Epetra itself - { - size_t localLength = map->getLocalNumElements(); - for (int j = 0; j < ArrayOfPtrs.size(); j++) { - TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(Teuchos::as(ArrayOfPtrs[j].size()) != localLength, std::runtime_error, - ": ArrayOfPtrs[" << j << "].size() (== " << ArrayOfPtrs[j].size() << ") is not equal to getLocalLength() (== " << localLength); - } - } -#endif - - // Convert Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > to double** - Array arrayOfRawPtrs(ArrayOfPtrs.size()); - for (int i = 0; i < ArrayOfPtrs.size(); i++) { - arrayOfRawPtrs[i] = ArrayOfPtrs[i].getRawPtr(); - } - double **rawArrayOfRawPtrs = const_cast(arrayOfRawPtrs.getRawPtr()); // This const_cast should be fine, because Epetra_DataAccess=Copy. - - vec_ = Teuchos::rcp(new Epetra_MultiVector(Copy, toEpetra(map), rawArrayOfRawPtrs, NumVectors)); - } - - //! MultiVector destructor. - virtual ~EpetraMultiVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceGlobalValue"); - vec_->ReplaceGlobalValue(globalRow, Teuchos::as(vectorIndex), value); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::sumIntoGlobalValue"); - vec_->SumIntoGlobalValue(globalRow, Teuchos::as(vectorIndex), value); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceLocalValue"); - vec_->ReplaceMyValue(myRow, Teuchos::as(vectorIndex), value); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::sumIntoLocalValue"); - vec_->SumIntoMyValue(myRow, Teuchos::as(vectorIndex), value); - } - - //! Set all values in the multivector with the given value. - void putScalar(const Scalar &value) { - XPETRA_MONITOR("EpetraMultiVectorT::putScalar"); - vec_->PutScalar(value); - } - - //@} - - //! @name Data copy and view methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const; - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j); - - //! Const view of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getData(size_t j) const { - XPETRA_MONITOR("EpetraMultiVectorT::getData"); - - double **arrayOfPointers; - - vec_->ExtractView(&arrayOfPointers); - - double *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // no ownership - } - - //! View of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { - XPETRA_MONITOR("EpetraMultiVectorT::getDataNonConst"); - - double **arrayOfPointers; - - vec_->ExtractView(&arrayOfPointers); - - double *data = arrayOfPointers[j]; - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // no ownership - } - - //@} - - //! @name Mathematical methods - //@{ - - //! Compute the dot product of each corresponding pair of vectors (columns) in A and B. - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const { - XPETRA_MONITOR("EpetraMultiVectorT::dot"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - vec_->Dot(*eA.getEpetra_MultiVector(), dots.getRawPtr()); - } - - //! Put element-wise absolute values of input Multi-vector in target: A = abs(this). - void abs(const MultiVector &A) { - XPETRA_MONITOR("EpetraMultiVectorT::abs"); - vec_->Abs(toEpetra(A)); - } - - //! Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) { - XPETRA_MONITOR("EpetraMultiVectorT::reciprocal"); - vec_->Reciprocal(toEpetra(A)); - } - - //! Scale in place: this = alpha*this. - void scale(const Scalar &alpha) { - XPETRA_MONITOR("EpetraMultiVectorT::scale"); - vec_->Scale(alpha); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) { - XPETRA_MONITOR("EpetraMultiVectorT::scale"); - // Epetra, unlike Tpetra, doesn't implement this version of - // scale(). Deal with this by scaling one column at a time. - const size_t numVecs = this->getNumVectors(); - for (size_t j = 0; j < numVecs; ++j) { - Epetra_Vector *v = (*vec_)(j); - v->Scale(alpha[j]); - } - } - - //! Update: this = beta*this + alpha*A. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta) { - XPETRA_MONITOR("EpetraMultiVectorT::update"); - vec_->Update(alpha, toEpetra(A), beta); - } - - //! Update: this = gamma*this + alpha*A + beta*B. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma) { - XPETRA_MONITOR("EpetraMultiVectorT::update"); - vec_->Update(alpha, toEpetra(A), beta, toEpetra(B), gamma); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::norm1"); - vec_->Norm1(norms.getRawPtr()); - } - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::norm2"); - vec_->Norm2(norms.getRawPtr()); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraMultiVectorT::normInf"); - vec_->NormInf(norms.getRawPtr()); - } - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const { - XPETRA_MONITOR("EpetraMultiVectorT::meanValue"); - vec_->MeanValue(means.getRawPtr()); - } // TODO: modify ArrayView size ?? - - //! Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector &A, const MultiVector &B, const Scalar &beta) { - XPETRA_MONITOR("EpetraMultiVectorT::multiply"); - vec_->Multiply(toEpetra(transA), toEpetra(transB), alpha, toEpetra(A), toEpetra(B), beta); - } - - //! Multiply a Vector A elementwise by a MultiVector B. - void elementWiseMultiply(Scalar scalarAB, const Vector &A, const MultiVector &B, Scalar scalarThis) { - XPETRA_MONITOR("EpetraMultiVectorT::elementWiseMultiply"); - vec_->Multiply(scalarAB, toEpetra(A), toEpetra(B), scalarThis); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Number of columns in the multivector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraMultiVectorT::getNumVectors"); - return vec_->NumVectors(); - } - - //! Local number of rows on the calling process. - size_t getLocalLength() const { - XPETRA_MONITOR("EpetraMultiVectorT::getLocalLength"); - return vec_->MyLength(); - } - - //! Global number of rows in the multivector. - global_size_t getGlobalLength() const { - XPETRA_MONITOR("EpetraMultiVectorT::getGlobalLength"); - return vec_->GlobalLength64(); - } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraMultiVectorT::isSameSize"); - auto vv = toEpetra(vec); - return ((vec_->MyLength() == vv.MyLength()) && (vec_->NumVectors() == vv.NumVectors())); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraMultiVectorT::description"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); - // return "TODO"; // unreachable - } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel /* verbLevel */ = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraMultiVectorT::describe"); - vec_->Print(out); - } - - //@} - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = false) { - XPETRA_MONITOR("EpetraMultiVectorT::randomize"); - - if (bUseXpetraImplementation) - Xpetra::MultiVector::Xpetra_randomize(); - else - vec_->Random(); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = false) { - XPETRA_MONITOR("EpetraMultiVectorT::randomize"); - - if (bUseXpetraImplementation) - Xpetra::MultiVector::Xpetra_randomize(minVal, maxVal); - else { - vec_->Random(); - const size_t numVectors = getNumVectors(); - for (size_t i = 0; i < numVectors; i++) { - Teuchos::ArrayRCP datai = getDataNonConst(i); - - const size_t myLength = getLocalLength(); - for (size_t j = 0; j < myLength; j++) { - datai[j] = 0.5 * (maxVal - minVal) * datai[j] + 0.5 * (maxVal + minVal); - } - } - } - } - - //! Implements DistObject interface - //{@ - - //! Access function for the Tpetra::Map this DistObject was constructed with. - Teuchos::RCP > getMap() const { - XPETRA_MONITOR("EpetraMultiVectorT::getMap"); - return toXpetra(vec_->Map()); - } - - //! Import. - void doImport(const DistObject &source, const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, source, tSource, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra is " << err); - } - - //! Export. - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, dest, tDest, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Import (using an Exporter). - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, source, tSource, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tSource.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Export (using an Importer). - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraMultiVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, dest, tDest, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraMultiVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraMultiVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - RCP v = tDest.getEpetra_MultiVector(); - int err = this->getEpetra_MultiVector()->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //! Replace the underlying Map in place. - void replaceMap(const Teuchos::RCP > &map) { - XPETRA_MONITOR("EpetraMultiVectorT::replaceMap"); - int err = 0; - if (!map.is_null()) { - err = this->getEpetra_MultiVector()->ReplaceMap(toEpetra(map)); - - } else { - // Replace map with a dummy map to avoid potential hangs later - Epetra_SerialComm SComm; - Epetra_Map NewMap((GlobalOrdinal)vec_->MyLength(), (GlobalOrdinal)vec_->Map().IndexBase64(), SComm); - err = this->getEpetra_MultiVector()->ReplaceMap(NewMap); - } - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_MultiVector object - EpetraMultiVectorT(const RCP &vec) - : vec_(vec) {} // TODO removed const - - //! Get the underlying Epetra multivector - RCP getEpetra_MultiVector() const { return vec_; } - - //! Set seed for Random function. - void setSeed(unsigned int seed) { - XPETRA_MONITOR("EpetraMultiVectorT::seedrandom"); - - Teuchos::ScalarTraits::seedrandom(seed); - vec_->SetSeed(seed); - } - - //@} - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraMultiVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraMultiVectorT " - "(which means it wraps an Epetra_MultiVector), but the RHS has some " - "other type. This probably means that the RHS wraps a Tpetra::Multi" - "Vector. Xpetra::MultiVector does not currently implement assignment " - "from a Tpetra object to an Epetra object, though this could be added " - "with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_MultiVector(); - RCP lhsImpl = this->getEpetra_MultiVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraMultiVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraMultiVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_MultiVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_MultiVector which this class wraps. - RCP vec_; - -}; // EpetraMultiVectorT class (specialization on GO=long long, NO=EpetraNode -#endif - -} // namespace Xpetra - -#include "Xpetra_EpetraVector.hpp" // to avoid incomplete type instantiated above in out-of-body functions. - -#endif // XPETRA_EPETRAMULTIVECTOR_HPP diff --git a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVectorFactory.cpp b/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVectorFactory.cpp deleted file mode 100644 index 09e31ccbb4ec..000000000000 --- a/packages/xpetra/src/MultiVector/Xpetra_EpetraMultiVectorFactory.cpp +++ /dev/null @@ -1,301 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_MultiVectorFactory_decl.hpp" -#include "Xpetra_BlockedMultiVector.hpp" - -namespace Xpetra { - -// we need the Epetra specialization only if Epetra is enabled -#if defined(HAVE_XPETRA_EPETRA) - -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -MultiVectorFactory:: - MultiVectorFactory() { -} - -RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, size_t NumVectors, bool zeroOut) { - using BlockedMultiVector = Xpetra::BlockedMultiVector - - XPETRA_MONITOR("MultiVectorFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new BlockedMultiVector(bmap, NumVectors, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, NumVectors, zeroOut)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(map, NumVectors, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - const Teuchos::ArrayView>& ArrayOfPtrs, - size_t NumVectors) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, ArrayOfPtrs, NumVectors)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(map, ArrayOfPtrs, NumVectors)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& source, - Teuchos::DataAccess copyOrView) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (source->getMap()->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(*source, copyOrView)); - } -#endif - - if (source->getMap()->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(*source, copyOrView)); - } - - XPETRA_FACTORY_END; -} - -MultiVectorFactory:: - MultiVectorFactory() { -} - -RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, size_t NumVectors, bool zeroOut) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new BlockedMultiVector(bmap, NumVectors, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, NumVectors, zeroOut)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(map, NumVectors, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - const Teuchos::ArrayView>& ArrayOfPtrs, - size_t NumVectors) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, ArrayOfPtrs, NumVectors)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(map, ArrayOfPtrs, NumVectors)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& source, - Teuchos::DataAccess copyOrView) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (source->getMap()->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(*source, copyOrView)); - } -#endif - - if (source->getMap()->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(*source, copyOrView)); - } - - XPETRA_FACTORY_END; -} - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -MultiVectorFactory::MultiVectorFactory() {} - -RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - size_t NumVectors, - bool zeroOut) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new BlockedMultiVector(bmap, NumVectors, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, NumVectors, zeroOut)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(map, NumVectors, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - const Teuchos::ArrayView>& ArrayOfPtrs, - size_t NumVectors) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, ArrayOfPtrs, NumVectors)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(map, ArrayOfPtrs, NumVectors)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& source, - Teuchos::DataAccess copyOrView) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (source->getMap()->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(*source, copyOrView)); - } -#endif - - if (source->getMap()->lib() == UseEpetra) { - return rcp(new EpetraMultiVectorT(*source, copyOrView)); - } - - XPETRA_FACTORY_END; -} - -MultiVectorFactory:: - MultiVectorFactory() { -} - -RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - size_t NumVectors, - bool zeroOut) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - - RCP> bmap = Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new BlockedMultiVector(bmap, NumVectors, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, NumVectors, zeroOut)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(map, NumVectors, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& map, - const Teuchos::ArrayView>& ArrayOfPtrs, - size_t NumVectors) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(map, ArrayOfPtrs, NumVectors)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(map, ArrayOfPtrs, NumVectors)); - } - - XPETRA_FACTORY_END; -} - -Teuchos::RCP> -MultiVectorFactory:: - Build(const Teuchos::RCP>& source, - Teuchos::DataAccess copyOrView) { - XPETRA_MONITOR("MultiVectorFactory::Build"); - -#ifdef HAVE_XPETRA_TPETRA - if (source->getMap()->lib() == UseTpetra) { - return rcp(new TpetraMultiVector(*source, copyOrView)); - } -#endif - - if (source->getMap()->lib() == UseEpetra) { - return rcp(new EpetraIntMultiVectorT(*source, copyOrView)); - } - - XPETRA_FACTORY_END; -} - -#endif // END !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // END !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -#endif // END HAVE_XPETRA_EPETRA - -} // namespace Xpetra diff --git a/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_decl.hpp b/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_decl.hpp index 6d9764d3fd21..aff2cbcd4e48 100644 --- a/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_decl.hpp +++ b/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_decl.hpp @@ -13,14 +13,7 @@ #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_MultiVector_decl.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMultiVector.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraIntMultiVector.hpp" -#endif // #include "Xpetra_BlockedMap.hpp" #include "Xpetra_Exceptions.hpp" @@ -69,129 +62,6 @@ class MultiVectorFactory { }; // we need the Epetra specialization only if Epetra is enabled -#if defined(HAVE_XPETRA_EPETRA) - -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// Specialization for Scalar=double, LO=GO=int and Serial node -// Used both for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only -template <> -class MultiVectorFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MultiVectorFactory(); - - public: - static RCP> - Build(const Teuchos::RCP> &map, size_t NumVectors, bool zeroOut = true); - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - static Teuchos::RCP> - Build(const Teuchos::RCP> &map, - const Teuchos::ArrayView> &ArrayOfPtrs, - size_t NumVectors); - - static Teuchos::RCP> - Build(const Teuchos::RCP> &source, - Teuchos::DataAccess copyOrView); -}; - -template <> -class MultiVectorFactory { - typedef int Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MultiVectorFactory(); - - public: - static RCP> - Build(const Teuchos::RCP> &map, size_t NumVectors, bool zeroOut = true); - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - static Teuchos::RCP> - Build(const Teuchos::RCP> &map, - const Teuchos::ArrayView> &ArrayOfPtrs, - size_t NumVectors); - - static Teuchos::RCP> - Build(const Teuchos::RCP> &source, - Teuchos::DataAccess copyOrView); -}; - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -template <> -class MultiVectorFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MultiVectorFactory(); - - public: - static RCP> - Build(const Teuchos::RCP> &map, - size_t NumVectors, - bool zeroOut = true); - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - static Teuchos::RCP> - Build(const Teuchos::RCP> &map, - const Teuchos::ArrayView> &ArrayOfPtrs, - size_t NumVectors); - - static Teuchos::RCP> - Build(const Teuchos::RCP> &source, - Teuchos::DataAccess copyOrView); -}; - -template <> -class MultiVectorFactory { - typedef int Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: - //! Private constructor. This is a static class. - MultiVectorFactory(); - - public: - static RCP> - Build(const Teuchos::RCP> &map, - size_t NumVectors, - bool zeroOut = true); - - //! Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). - static Teuchos::RCP> - Build(const Teuchos::RCP> &map, - const Teuchos::ArrayView> &ArrayOfPtrs, - size_t NumVectors); - - static Teuchos::RCP> - Build(const Teuchos::RCP> &source, - Teuchos::DataAccess copyOrView); -}; - -#endif // END !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // END !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -#endif // END HAVE_XPETRA_EPETRA } // namespace Xpetra diff --git a/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_def.hpp b/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_def.hpp index 7e77a9fa31b8..af3a3c33484b 100644 --- a/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_def.hpp +++ b/packages/xpetra/src/MultiVector/Xpetra_MultiVectorFactory_def.hpp @@ -33,11 +33,9 @@ MultiVectorFactory:: return rcp(new Xpetra::BlockedMultiVector(bmap, NumVectors, zeroOut)); } -#ifdef HAVE_XPETRA_TPETRA if (map->lib() == UseTpetra) { return rcp(new TpetraMultiVector(map, NumVectors, zeroOut)); } -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(map->lib()); XPETRA_FACTORY_END; @@ -51,11 +49,9 @@ MultiVectorFactory:: size_t NumVectors) { XPETRA_MONITOR("MultiVectorFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (map->lib() == UseTpetra) { return rcp(new TpetraMultiVector(map, ArrayOfPtrs, NumVectors)); } -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(map->lib()); XPETRA_FACTORY_END; @@ -68,11 +64,9 @@ MultiVectorFactory:: Teuchos::DataAccess copyOrView) { XPETRA_MONITOR("MultiVectorFactory::Build"); -#ifdef HAVE_XPETRA_TPETRA if (source->getMap()->lib() == UseTpetra) { return rcp(new TpetraMultiVector(*source, copyOrView)); } -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(source->getMap()->lib()); XPETRA_FACTORY_END; diff --git a/packages/xpetra/src/MultiVector/Xpetra_TpetraMultiVector_def.hpp b/packages/xpetra/src/MultiVector/Xpetra_TpetraMultiVector_def.hpp index 94c8a2f14dcd..07f269626ac3 100644 --- a/packages/xpetra/src/MultiVector/Xpetra_TpetraMultiVector_def.hpp +++ b/packages/xpetra/src/MultiVector/Xpetra_TpetraMultiVector_def.hpp @@ -608,494 +608,6 @@ void TpetraMultiVector:: Tpetra::deep_copy(*lhsImpl, *rhsImpl); } -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization for TpetraMultiVector on EpetraNode and GO=int -template -class TpetraMultiVector - : public virtual MultiVector { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraMultiVector TpetraMultiVectorClass; - - public: - //! @name Constructors and destructor - //@{ - - //! Default constructor - TpetraMultiVector() { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Basic constuctor. - TpetraMultiVector(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Copy constructor (performs a deep copy). - TpetraMultiVector(const MultiVector &source, const Teuchos::DataAccess copyOrView) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Create multivector by copying two-dimensional array of local data. - TpetraMultiVector(const Teuchos::RCP > &map, const Teuchos::ArrayView &A, size_t LDA, size_t NumVectors) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Create multivector by copying array of views of local data. - TpetraMultiVector(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Destructor (virtual for memory safety of derived classes). - virtual ~TpetraMultiVector() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Set all values in the multivector with the given value. - void putScalar(const Scalar &value) {} - - //! Sum values of a locally replicated multivector across all processes. - void reduce() {} - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const { return Teuchos::null; } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j) { return Teuchos::null; } - - //! Const view of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getData(size_t j) const { return Teuchos::ArrayRCP(); } - - //! View of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { return Teuchos::ArrayRCP(); } - - //! Fill the given array with a copy of this multivector's local values. - void get1dCopy(Teuchos::ArrayView A, size_t LDA) const {} - - //! Fill the given array with a copy of this multivector's local values. - void get2dCopy(Teuchos::ArrayView > ArrayOfPtrs) const {} - - //! Const persisting (1-D) view of this multivector's local values. - Teuchos::ArrayRCP get1dView() const { return Teuchos::ArrayRCP(); } - - //! Return const persisting pointers to values. - Teuchos::ArrayRCP > get2dView() const { return Teuchos::ArrayRCP >(); } - - //! Nonconst persisting (1-D) view of this multivector's local values. - Teuchos::ArrayRCP get1dViewNonConst() { return Teuchos::ArrayRCP(); } - - //! Return non-const persisting pointers to values. - Teuchos::ArrayRCP > get2dViewNonConst() { return Teuchos::ArrayRCP >(); } - - //@} - - //! @name Mathematical methods - //@{ - - //! Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const {} - - //! Put element-wise absolute values of input Multi-vector in target: A = abs(this). - void abs(const MultiVector &A) {} - - //! Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) {} - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const Scalar &alpha) {} - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) {} - - //! Replace multi-vector values with scaled values of A, this = alpha*A. - void scale(const Scalar &alpha, const MultiVector &A) {} - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta) {} - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma) {} - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const {} - - //! Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector &A, const MultiVector &B, const Scalar &beta) {} - - //@} - - //! @name Attribute access functions - //@{ - - //! Number of columns in the multivector. - size_t getNumVectors() const { return 0; } - - //! Local number of rows on the calling process. - size_t getLocalLength() const { return 0; } - - //! Global number of rows in the multivector. - global_size_t getGlobalLength() const { return 0; } - - // \! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Element-wise multiply of a Vector A with a TpetraMultiVector B. - void elementWiseMultiply(Scalar scalarAB, const Vector &A, const MultiVector &B, Scalar scalarThis){}; - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = false) {} - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = false) {} - - //{@ - // Implements DistObject interface - - Teuchos::RCP > getMap() const { return Teuchos::null; } - - void doImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void beginImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void endImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void beginExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void endExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void beginImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void endImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void beginExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void endExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void replaceMap(const RCP > &map) {} - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraMultiVector constructor to wrap a Tpetra::MultiVector object - TpetraMultiVector(const Teuchos::RCP > &vec) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "int", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra multivector - RCP > getTpetra_MultiVector() const { return Teuchos::null; } - - //! Set seed for Random function. - void setSeed(unsigned int seed) {} - - //@} - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) {} -}; // TpetraMultiVector class (specialization GO=int, NO=EpetraNode) -#endif - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// specialization for TpetraMultiVector on EpetraNode and GO=long long -template -class TpetraMultiVector - : public virtual MultiVector { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - // The following typedef are used by the XPETRA_DYNAMIC_CAST() macro. - typedef TpetraMultiVector TpetraMultiVectorClass; - - public: - //! @name Constructors and destructor - //@{ - - //! Basic constuctor. - TpetraMultiVector(const Teuchos::RCP > &map, size_t NumVectors, bool zeroOut = true) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "long long", typeid(EpetraNode).name()); - } - - //! Copy constructor (performs a deep copy). - TpetraMultiVector(const MultiVector &source, const Teuchos::DataAccess copyOrView) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "long long", typeid(EpetraNode).name()); - } - - //! Create multivector by copying two-dimensional array of local data. - TpetraMultiVector(const Teuchos::RCP > &map, const Teuchos::ArrayView &A, size_t LDA, size_t NumVectors) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "long long", typeid(EpetraNode).name()); - } - - //! Create multivector by copying array of views of local data. - TpetraMultiVector(const Teuchos::RCP > &map, const Teuchos::ArrayView > &ArrayOfPtrs, size_t NumVectors) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "long long", typeid(EpetraNode).name()); - } - - //! Destructor (virtual for memory safety of derived classes). - virtual ~TpetraMultiVector() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Set all values in the multivector with the given value. - void putScalar(const Scalar &value) {} - - //! Sum values of a locally replicated multivector across all processes. - void reduce() {} - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const { return Teuchos::null; } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j) { return Teuchos::null; } - - //! Const view of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getData(size_t j) const { return Teuchos::ArrayRCP(); } - - //! View of the local values in a particular vector of this multivector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { return Teuchos::ArrayRCP(); } - - //! Fill the given array with a copy of this multivector's local values. - void get1dCopy(Teuchos::ArrayView A, size_t LDA) const {} - - //! Fill the given array with a copy of this multivector's local values. - void get2dCopy(Teuchos::ArrayView > ArrayOfPtrs) const {} - - //! Const persisting (1-D) view of this multivector's local values. - Teuchos::ArrayRCP get1dView() const { return Teuchos::ArrayRCP(); } - - //! Return const persisting pointers to values. - Teuchos::ArrayRCP > get2dView() const { return Teuchos::ArrayRCP >(); } - - //! Nonconst persisting (1-D) view of this multivector's local values. - Teuchos::ArrayRCP get1dViewNonConst() { return Teuchos::ArrayRCP(); } - - //! Return non-const persisting pointers to values. - Teuchos::ArrayRCP > get2dViewNonConst() { return Teuchos::ArrayRCP >(); } - - //@} - - //! @name Mathematical methods - //@{ - - //! Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const {} - - //! Put element-wise absolute values of input Multi-vector in target: A = abs(this). - void abs(const MultiVector &A) {} - - //! Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) {} - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const Scalar &alpha) {} - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) {} - - //! Replace multi-vector values with scaled values of A, this = alpha*A. - void scale(const Scalar &alpha, const MultiVector &A) {} - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta) {} - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const Scalar &alpha, const MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma) {} - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const {} - - //! Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector &A, const MultiVector &B, const Scalar &beta) {} - - //@} - - //! @name Attribute access functions - //@{ - - //! Number of columns in the multivector. - size_t getNumVectors() const { return 0; } - - //! Local number of rows on the calling process. - size_t getLocalLength() const { return 0; } - - //! Global number of rows in the multivector. - global_size_t getGlobalLength() const { return 0; } - - // \! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Element-wise multiply of a Vector A with a TpetraMultiVector B. - void elementWiseMultiply(Scalar scalarAB, const Vector &A, const MultiVector &B, Scalar scalarThis){}; - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = false) {} - - //! Set multi-vector values to random numbers. - void randomize(const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation = false) {} - - //{@ - // Implements DistObject interface - - Teuchos::RCP > getMap() const { return Teuchos::null; } - - void doImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void beginImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void endImport(const DistObject &source, const Import &importer, CombineMode CM) {} - - void doExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void beginExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void endExport(const DistObject &dest, const Import &importer, CombineMode CM) {} - - void doImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void beginImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void endImport(const DistObject &source, const Export &exporter, CombineMode CM) {} - - void doExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void beginExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void endExport(const DistObject &dest, const Export &exporter, CombineMode CM) {} - - void replaceMap(const RCP > &map) {} - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraMultiVector constructor to wrap a Tpetra::MultiVector object - TpetraMultiVector(const Teuchos::RCP > &vec) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraMultiVector).name(), typeid(TpetraMultiVector).name(), "long long", typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra multivector - RCP > getTpetra_MultiVector() const { return Teuchos::null; } - - //! Set seed for Random function. - void setSeed(unsigned int seed) {} - - //@} - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) {} -}; // TpetraMultiVector class (specialization GO=int, NO=EpetraNode) - -#endif // TpetraMultiVector class (specialization GO=long long, NO=EpetraNode) - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra // Following header file inculsion is needed for the dynamic_cast to TpetraVector in diff --git a/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp b/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp deleted file mode 100644 index 411c33cb176f..000000000000 --- a/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAOPERATOR_HPP -#define XPETRA_EPETRAOPERATOR_HPP - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include -#include - -#include "Xpetra_Map.hpp" -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_MultiVector.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_Operator.hpp" - -#include "Xpetra_Utils.hpp" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp is deprecated." -#endif - -namespace Xpetra { - -template -class XPETRA_DEPRECATED EpetraOperator : public Operator { - typedef double Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //@{ - - //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual const Teuchos::RCP > getDomainMap() const { - XPETRA_MONITOR("EpetraOperator::getDomainMap()"); - return toXpetra(op_->OperatorDomainMap()); - } - - //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual const Teuchos::RCP > getRangeMap() const { - XPETRA_MONITOR("EpetraOperator::getRangeMap()"); - return toXpetra(op_->OperatorRangeMap()); - } - - //! \brief Computes the operator-multivector application. - /*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation - vary according to the values of \c alpha and \c beta. Specifically - - if beta == 0, apply() must overwrite \c Y, so that any values in \c Y (including NaNs) are ignored. - - if alpha == 0, apply() may short-circuit the operator, so that any values in \c X (including NaNs) are ignored. - */ - virtual void - apply(const MultiVector &X, - MultiVector &Y, - Teuchos::ETransp mode = Teuchos::NO_TRANS, - Scalar alpha = Teuchos::ScalarTraits::one(), - Scalar beta = Teuchos::ScalarTraits::zero()) const { - XPETRA_MONITOR("EpetraOperator::apply"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, X, eX, "Xpetra::EpetraOperator->apply(): cannot cast input to Xpetra::EpetraMultiVectorT"); - XPETRA_DYNAMIC_CAST(EpetraMultiVectorT, Y, eY, "Xpetra::EpetraOperator->apply(): cannot cast input to Xpetra::EpetraMultiVectorT"); - - TEUCHOS_TEST_FOR_EXCEPTION((mode != Teuchos::NO_TRANS) && (mode != Teuchos::TRANS), Exceptions::NotImplemented, - "Xpetra::EpetraOperator->apply(): can only accept mode == NO_TRANS or mode == TRANS"); - TEUCHOS_TEST_FOR_EXCEPTION(mode == Teuchos::TRANS && !hasTransposeApply(), Exceptions::RuntimeError, - "Xpetra::EpetraOperator->apply(): cannot apply transpose as underlying Epetra operator does not support it"); - - // Helper vector for string A*X - RCP epY = eY.getEpetra_MultiVector(); - RCP tmp = Teuchos::rcp(new Epetra_MultiVector(*epY)); - tmp->PutScalar(0.0); - - op_->SetUseTranspose(mode == Teuchos::TRANS); - XPETRA_ERR_CHECK(op_->Apply(*eX.getEpetra_MultiVector(), *tmp)); - - // calculate alpha * A * x + beta * y - XPETRA_ERR_CHECK(eY.getEpetra_MultiVector()->Update(alpha, *tmp, beta)); - } - - /// \brief Whether this operator supports applying the transpose or conjugate transpose. - virtual bool hasTransposeApply() const { - // We do not currently use transpose, try setting it - int err = op_->SetUseTranspose(true); - op_->SetUseTranspose(false); - return (err == 0); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraOperator::description"); - return "Epetra_Operator"; - } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraOperator::describe"); - out << "Epetra_Operator" << std::endl; - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraOperator constructor to wrap a Epetra_Operator object - EpetraOperator(const Teuchos::RCP &op) - : op_(op) {} // TODO removed const - - //! Compute a residual R = B - (*this) * X - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const { - using STS = Teuchos::ScalarTraits; - R.update(STS::one(), B, STS::zero()); - this->apply(X, R, Teuchos::NO_TRANS, -STS::one(), STS::one()); - } - - //@} - - private: - //! The Tpetra::Operator which this class wraps. - RCP op_; - -}; // EpetraOperator class - -template -class EpetraInverseOperator : public Operator { - typedef double Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //@{ - - //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual Teuchos::RCP > getDomainMap() const { - XPETRA_MONITOR("EpetraOperator::getDomainMap()"); - return toXpetra(op_->OperatorDomainMap()); - } - - //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP > getRangeMap() const { - XPETRA_MONITOR("EpetraOperator::getRangeMap()"); - return toXpetra(op_->OperatorRangeMap()); - } - - //! \brief Computes the operator-multivector application. - /*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation - vary according to the values of \c alpha and \c beta. Specifically - - if beta == 0, apply() must overwrite \c Y, so that any values in \c Y (including NaNs) are ignored. - - if alpha == 0, apply() may short-circuit the operator, so that any values in \c X (including NaNs) are ignored. - */ - virtual void - apply(const MultiVector &X, - MultiVector &Y, - Teuchos::ETransp mode = Teuchos::NO_TRANS, - Scalar alpha = Teuchos::ScalarTraits::one(), - Scalar beta = Teuchos::ScalarTraits::zero()) const { - XPETRA_MONITOR("EpetraOperator::apply"); - - XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, X, eX, "Xpetra::EpetraOperator->apply(): cannot cast input to Xpetra::EpetraMultiVectorT"); - XPETRA_DYNAMIC_CAST(EpetraMultiVectorT, Y, eY, "Xpetra::EpetraOperator->apply(): cannot cast input to Xpetra::EpetraMultiVectorT"); - - TEUCHOS_TEST_FOR_EXCEPTION((mode != Teuchos::NO_TRANS) && (mode != Teuchos::TRANS), Exceptions::NotImplemented, - "Xpetra::EpetraOperator->apply(): can only accept mode == NO_TRANS or mode == TRANS"); - TEUCHOS_TEST_FOR_EXCEPTION(mode == Teuchos::TRANS && !hasTransposeApply(), Exceptions::RuntimeError, - "Xpetra::EpetraOperator->apply(): cannot apply transpose as underlying Epetra operator does not support it"); - - // Helper vector for string A*X - RCP epY = eY.getEpetra_MultiVector(); - RCP tmp = Teuchos::rcp(new Epetra_MultiVector(*epY)); - tmp->PutScalar(0.0); - - op_->SetUseTranspose(mode == Teuchos::TRANS); - XPETRA_ERR_CHECK(op_->ApplyInverse(*eX.getEpetra_MultiVector(), *tmp)); - - // calculate alpha * A * x + beta * y - XPETRA_ERR_CHECK(eY.getEpetra_MultiVector()->Update(alpha, *tmp, beta)); - } - - /// \brief Whether this operator supports applying the transpose or conjugate transpose. - virtual bool hasTransposeApply() const { - // We do not currently use transpose, try setting it - int err = op_->SetUseTranspose(true); - op_->SetUseTranspose(false); - return (err == 0); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraOperator::description"); - return "Epetra_Operator"; - } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraOperator::describe"); - out << "Epetra_Operator" << std::endl; - } - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraOperator constructor to wrap a Epetra_Operator object - EpetraInverseOperator(const Teuchos::RCP &op) - : op_(op) {} // TODO removed const - - //! Compute a residual R = B - (*this) * X - void residual(const MultiVector &X, - const MultiVector &B, - MultiVector &R) const { - using STS = Teuchos::ScalarTraits; - R.update(STS::one(), B, STS::zero()); - this->apply(X, R, Teuchos::NO_TRANS, -STS::one(), STS::one()); - } - - //@} - - private: - //! The Tpetra::Operator which this class wraps. - RCP op_; -}; - -} // namespace Xpetra - -#endif // XPETRA_EPETRAOPERATOR_HPP diff --git a/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp b/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp index f279c037d15c..5d8852365438 100644 --- a/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp +++ b/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp @@ -114,147 +114,6 @@ class TpetraOperator : public Operator -class TpetraOperator - : public Operator { - public: - typedef double Scalar; - typedef int GlobalOrdinal; - typedef int LocalOrdinal; - typedef EpetraNode Node; - - //@{ - - //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual Teuchos::RCP > getDomainMap() const { - return Teuchos::null; - } - - //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP > getRangeMap() const { - return Teuchos::null; - } - - //! \brief Computes the operator-multivector application. - /*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation - vary according to the values of \c alpha and \c beta. Specifically - - if beta == 0, apply() must overwrite \c Y, so that any values in \c Y (including NaNs) are ignored. - - if alpha == 0, apply() may short-circuit the operator, so that any values in \c X (including NaNs) are ignored. - */ - virtual void - apply(const Xpetra::MultiVector &X, - Xpetra::MultiVector &Y, - Teuchos::ETransp mode = Teuchos::NO_TRANS, - Scalar alpha = Teuchos::ScalarTraits::one(), - Scalar beta = Teuchos::ScalarTraits::zero()) const {} - - /// \brief Whether this operator supports applying the transpose or conjugate transpose. - virtual bool hasTransposeApply() const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraOperator constructor to wrap a Tpetra::Operator object - TpetraOperator(const Teuchos::RCP > &op) {} - - //! Gets the operator out - RCP > getOperator() { return Teuchos::null; } - - void residual(const Xpetra::MultiVector &X, - const Xpetra::MultiVector &B, - Xpetra::MultiVector &R) const { - } - - //@} - -}; // TpetraOperator class -#endif - -#if ((!defined(HAVE_TPETRA_INST_SERIAL)) && (!defined(HAVE_TPETRA_INST_INT_LONG_LONG)) && defined(HAVE_XPETRA_EPETRA)) -// specialization for Tpetra Map on EpetraNode and GO=int -template <> -class TpetraOperator - : public Operator { - public: - typedef double Scalar; - typedef long long GlobalOrdinal; - typedef int LocalOrdinal; - typedef EpetraNode Node; - - //@{ - - //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual Teuchos::RCP > getDomainMap() const { - return Teuchos::null; - } - - //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP > getRangeMap() const { - return Teuchos::null; - } - - //! \brief Computes the operator-multivector application. - /*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation - vary according to the values of \c alpha and \c beta. Specifically - - if beta == 0, apply() must overwrite \c Y, so that any values in \c Y (including NaNs) are ignored. - - if alpha == 0, apply() may short-circuit the operator, so that any values in \c X (including NaNs) are ignored. - */ - virtual void - apply(const Xpetra::MultiVector &X, - Xpetra::MultiVector &Y, - Teuchos::ETransp mode = Teuchos::NO_TRANS, - Scalar alpha = Teuchos::ScalarTraits::one(), - Scalar beta = Teuchos::ScalarTraits::zero()) const {} - - /// \brief Whether this operator supports applying the transpose or conjugate transpose. - virtual bool hasTransposeApply() const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! A simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with the given verbosity level to a FancyOStream. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! @name Xpetra specific - //@{ - - //! TpetraOperator constructor to wrap a Tpetra::Operator object - TpetraOperator(const Teuchos::RCP > &op) {} - - //! Gets the operator out - RCP > getOperator() { return Teuchos::null; } - - void residual(const Xpetra::MultiVector &X, - const Xpetra::MultiVector &B, - Xpetra::MultiVector &R) const { - } - //@} - -}; // TpetraOperator class -#endif - } // namespace Xpetra #define XPETRA_TPETRAOPERATOR_SHORT diff --git a/packages/xpetra/src/StridedMap/Xpetra_StridedMap_decl.hpp b/packages/xpetra/src/StridedMap/Xpetra_StridedMap_decl.hpp index 3632a3b86778..cf17f3e55284 100644 --- a/packages/xpetra/src/StridedMap/Xpetra_StridedMap_decl.hpp +++ b/packages/xpetra/src/StridedMap/Xpetra_StridedMap_decl.hpp @@ -198,19 +198,12 @@ class StridedMap : public virtual Map { RCP> getMap() const; -#ifdef HAVE_XPETRA_TPETRA using local_map_type = typename Xpetra::Map::local_map_type; /// \brief Get the local Map for Kokkos kernels. local_map_type getLocalMap() const { return map_->getLocalMap(); } -#else // HAVE_XPETRA_TPETRA -#ifdef __GNUC__ -#warning \ - "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too." -#endif // __GNUC__ -#endif // HAVE_XPETRA_TPETRA ELSE //@} diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsGraph_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsGraph_fwd.hpp deleted file mode 100644 index cc0e1f40cd67..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsGraph_fwd.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRACRSGRAPH_FWD_HPP -#define XPETRA_EPETRACRSGRAPH_FWD_HPP - -namespace Xpetra { -template -class EpetraCrsGraphT; -} - -#ifndef XPETRA_EPETRACRSGRAPH_SHORT -#define XPETRA_EPETRACRSGRAPH_SHORT -#endif - -#endif // XPETRA_EPETRACRSGRAPH_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsMatrix_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsMatrix_fwd.hpp deleted file mode 100644 index 375daa3e5379..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraCrsMatrix_fwd.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRACRSMATRIX_FWD_HPP -#define XPETRA_EPETRACRSMATRIX_FWD_HPP - -#include - -namespace Xpetra { -template -class EpetraCrsMatrixT; -} - -#ifndef XPETRA_EPETRACRSMATRIX_SHORT -#define XPETRA_EPETRACRSMATRIX_SHORT -#endif - -#endif // XPETRA_EPETRACRSMATRIX_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraExport_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraExport_fwd.hpp deleted file mode 100644 index 2ac68522f711..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraExport_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAEXPORT_FWD_HPP -#define XPETRA_EPETRAEXPORT_FWD_HPP - -namespace Xpetra { -template -class EpetraExportT; -typedef EpetraExportT EpetraExport; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAEXPORT_SHORT -#define XPETRA_EPETRAEXPORT_SHORT -#endif - -#endif // XPETRA_EPETRAEXPORT_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraImport_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraImport_fwd.hpp deleted file mode 100644 index 738a0e510ec8..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraImport_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAIMPORT_FWD_HPP -#define XPETRA_EPETRAIMPORT_FWD_HPP - -namespace Xpetra { -template -class EpetraImportT; -typedef EpetraImportT EpetraImport; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAIMPORT_SHORT -#define XPETRA_EPETRAIMPORT_SHORT -#endif - -#endif // XPETRA_EPETRAIMPORT_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraIntVector_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraIntVector_fwd.hpp deleted file mode 100644 index 8e5781e9f4e1..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraIntVector_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAINTVECTOR_FWD_HPP -#define XPETRA_EPETRAINTVECTOR_FWD_HPP - -namespace Xpetra { -template -class EpetraIntVectorT; -typedef EpetraIntVectorT EpetraIntVector; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAINTVECTOR_SHORT -#define XPETRA_EPETRAINTVECTOR_SHORT -#endif - -#endif // XPETRA_EPETRAINTVECTOR_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMap_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMap_fwd.hpp deleted file mode 100644 index 5fb017acb81c..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMap_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAMAP_FWD_HPP -#define XPETRA_EPETRAMAP_FWD_HPP - -namespace Xpetra { -template -class EpetraMapT; -typedef EpetraMapT EpetraMap; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAMAP_SHORT -#define XPETRA_EPETRAMAP_SHORT -#endif - -#endif // XPETRA_EPETRAMAP_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMultiVector_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMultiVector_fwd.hpp deleted file mode 100644 index 1772e89f83d6..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraMultiVector_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAMULTIVECTOR_FWD_HPP -#define XPETRA_EPETRAMULTIVECTOR_FWD_HPP - -namespace Xpetra { -template -class EpetraMultiVectorT; -typedef EpetraMultiVectorT EpetraMultiVector; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAMULTIVECTOR_SHORT -#define XPETRA_EPETRAMULTIVECTOR_SHORT -#endif - -#endif // XPETRA_EPETRAMULTIVECTOR_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraOperator_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraOperator_fwd.hpp deleted file mode 100644 index c6c29809939d..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraOperator_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAOPERATOR_FWD_HPP -#define XPETRA_EPETRAOPERATOR_FWD_HPP - -#include - -namespace Xpetra { -template -class EpetraOperatorT; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -typedef EpetraOperatorT EpetraOperator; -#endif -} // namespace Xpetra - -#ifndef XPETRA_EPETRAOPERATOR_SHORT -#define XPETRA_EPETRAOPERATOR_SHORT -#endif - -#endif // XPETRA_EPETRAOPERATOR_FWD_HPP diff --git a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraVector_fwd.hpp b/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraVector_fwd.hpp deleted file mode 100644 index 98804d2b41fe..000000000000 --- a/packages/xpetra/src/Utils/ForwardDeclaration/Xpetra_EpetraVector_fwd.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAVECTOR_FWD_HPP -#define XPETRA_EPETRAVECTOR_FWD_HPP - -namespace Xpetra { -template -class EpetraVectorT; -typedef EpetraVectorT EpetraVector; -} // namespace Xpetra - -#ifndef XPETRA_EPETRAVECTOR_SHORT -#define XPETRA_EPETRAVECTOR_SHORT -#endif - -#endif // XPETRA_EPETRAVECTOR_FWD_HPP diff --git a/packages/xpetra/src/Utils/Xpetra_CrsMatrixUtils.hpp b/packages/xpetra/src/Utils/Xpetra_CrsMatrixUtils.hpp index 7b046bef2b63..e0b584c0beb4 100644 --- a/packages/xpetra/src/Utils/Xpetra_CrsMatrixUtils.hpp +++ b/packages/xpetra/src/Utils/Xpetra_CrsMatrixUtils.hpp @@ -14,13 +14,7 @@ #include "Xpetra_Exceptions.hpp" #include "Xpetra_Map.hpp" // definition of UnderlyingLib -#ifdef HAVE_XPETRA_EPETRA -#include "Epetra_Util.h" -#endif - -#ifdef HAVE_XPETRA_TPETRA #include "Tpetra_Import_Util2.hpp" -#endif namespace Xpetra { @@ -46,70 +40,8 @@ class CrsMatrixUtils { const Teuchos::ArrayView& CRS_vals, const UnderlyingLib lib) { if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::CrsMatrixUtils::sortCrsEntries only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::sortCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA - } - - return; - } - - /// \brief Sort and merge the entries of the (raw CSR) matrix by column index - /// within each row. - static void sortAndMergeCrsEntries(const Teuchos::ArrayView& CRS_rowptr, - const Teuchos::ArrayView& CRS_colind, - const Teuchos::ArrayView& CRS_vals, - const UnderlyingLib lib) { - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::CrsMatrixUtils::sortAndMergeCrsEntries only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::sortAndMergeCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA - } - - return; - } - -}; // end class CrsMatrixUtils - -#ifdef HAVE_XPETRA_EPETRA -// Specialization for double, int, int, EpetraNode -template <> -class CrsMatrixUtils { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; -#undef XPETRA_CRSMATRIXUTILS_SHORT - - public: - /// \brief Sort the entries of the (raw CSR) matrix by column index - /// within each row. - static void sortCrsEntries(const Teuchos::ArrayView& CRS_rowptr, - const Teuchos::ArrayView& CRS_colind, - const Teuchos::ArrayView& CRS_vals, - const UnderlyingLib lib) { - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - int rv = Epetra_Util::SortCrsEntries(Teuchos::as(CRS_rowptr.size() - 1), - CRS_rowptr.getRawPtr(), - CRS_colind.getRawPtr(), - CRS_vals.getRawPtr()); - if (rv != 0) { - throw Exceptions::RuntimeError("Epetra_Util::SortCrsEntries() return value of " + Teuchos::toString(rv)); - } -#endif // HAVE_XPETRA_EPETRA } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::sortCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA } return; @@ -122,19 +54,8 @@ class CrsMatrixUtils { const Teuchos::ArrayView& CRS_vals, const UnderlyingLib lib) { if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - int rv = Epetra_Util::SortAndMergeCrsEntries(Teuchos::as(CRS_rowptr.size() - 1), - CRS_rowptr.getRawPtr(), - CRS_colind.getRawPtr(), - CRS_vals.getRawPtr()); - if (rv != 0) { - throw Exceptions::RuntimeError("Epetra_Util::SortCrsEntries() return value of " + Teuchos::toString(rv)); - } -#endif // HAVE_XPETRA_EPETRA } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::sortAndMergeCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA } return; @@ -142,69 +63,6 @@ class CrsMatrixUtils { }; // end class CrsMatrixUtils -// Specialization for double, int, long long, EpetraNode -template <> -class CrsMatrixUtils { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; -#undef XPETRA_CRSMATRIXUTILS_SHORT - - public: - /// \brief Sort the entries of the (raw CSR) matrix by column index - /// within each row. - static void sortCrsEntries(const Teuchos::ArrayView& CRS_rowptr, - const Teuchos::ArrayView& CRS_colind, - const Teuchos::ArrayView& CRS_vals, - const UnderlyingLib lib) { - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - int rv = Epetra_Util::SortCrsEntries(Teuchos::as(CRS_rowptr.size() - 1), - CRS_rowptr.getRawPtr(), - CRS_colind.getRawPtr(), - CRS_vals.getRawPtr()); - if (rv != 0) { - throw Exceptions::RuntimeError("Epetra_Util::SortCrsEntries() return value of " + Teuchos::toString(rv)); - } -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::sortCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA - } - - return; - } - - /// \brief Sort and merge the entries of the (raw CSR) matrix by column index - /// within each row. - static void sortAndMergeCrsEntries(const Teuchos::ArrayView& CRS_rowptr, - const Teuchos::ArrayView& CRS_colind, - const Teuchos::ArrayView& CRS_vals, - const UnderlyingLib lib) { - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - int rv = Epetra_Util::SortAndMergeCrsEntries(Teuchos::as(CRS_rowptr.size() - 1), - CRS_rowptr.getRawPtr(), - CRS_colind.getRawPtr(), - CRS_vals.getRawPtr()); - if (rv != 0) { - throw Exceptions::RuntimeError("Epetra_Util::SortCrsEntries() return value of " + Teuchos::toString(rv)); - } -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::sortAndMergeCrsEntries(CRS_rowptr, CRS_colind, CRS_vals); -#endif // HAVE_XPETRA_TPETRA - } - - return; - } - -}; // end class CrsMatrixUtils -#endif // HAVE_XPETRA_EPETRA for Epetra scpecialization - } // end namespace Xpetra #define XPETRA_CRSMATRIXUTILS_SHORT diff --git a/packages/xpetra/src/Utils/Xpetra_ETI_3arg.hpp b/packages/xpetra/src/Utils/Xpetra_ETI_3arg.hpp index b2968fde52ca..dbe307129039 100644 --- a/packages/xpetra/src/Utils/Xpetra_ETI_3arg.hpp +++ b/packages/xpetra/src/Utils/Xpetra_ETI_3arg.hpp @@ -14,41 +14,15 @@ // We need to define these typedefs as it is not possible to properly expand // macros with colons in them -#if defined(HAVE_XPETRA_TPETRA) #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#endif -#if defined(HAVE_XPETRA_EPETRA) -#include -#endif - -#if (defined(HAVE_XPETRA_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_XPETRA_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = off -#if defined(HAVE_XPETRA_EPETRA) && !defined(HAVE_XPETRA_TPETRA) -XPETRA_ETI_GROUP(int, int, EpetraNode) -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) -TPETRA_INSTANTIATE_LGN(XPETRA_ETI_GROUP) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -XPETRA_ETI_GROUP(int, int, EpetraNode) -#endif - -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) TPETRA_INSTANTIATE_LGN(XPETRA_ETI_GROUP) -#endif #endif // ifndef XPETRA_ETI_3ARGUMENT_HPP diff --git a/packages/xpetra/src/Utils/Xpetra_ETI_4arg.hpp b/packages/xpetra/src/Utils/Xpetra_ETI_4arg.hpp index 15ed4ed589ac..5c8556377200 100644 --- a/packages/xpetra/src/Utils/Xpetra_ETI_4arg.hpp +++ b/packages/xpetra/src/Utils/Xpetra_ETI_4arg.hpp @@ -14,41 +14,15 @@ // We need to define these typedefs as it is not possible to properly expand // macros with colons in them -#if defined(HAVE_XPETRA_TPETRA) #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#endif -#if defined(HAVE_XPETRA_EPETRA) -#include -#endif - -#if (defined(HAVE_XPETRA_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_XPETRA_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = off -#if defined(HAVE_XPETRA_EPETRA) && !defined(HAVE_XPETRA_TPETRA) -XPETRA_ETI_GROUP(double, int, int, EpetraNode) -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_ETI_GROUP) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -XPETRA_ETI_GROUP(double, int, int, EpetraNode) -#endif - -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_ETI_GROUP) -#endif #endif // ifndef XPETRA_ETI_4ARGUMENT_HPP diff --git a/packages/xpetra/src/Utils/Xpetra_ETI_4arg_mv.hpp b/packages/xpetra/src/Utils/Xpetra_ETI_4arg_mv.hpp index 622fd37acbf7..dbbead13c62c 100644 --- a/packages/xpetra/src/Utils/Xpetra_ETI_4arg_mv.hpp +++ b/packages/xpetra/src/Utils/Xpetra_ETI_4arg_mv.hpp @@ -14,41 +14,15 @@ // We need to define these typedefs as it is not possible to properly expand // macros with colons in them -#if defined(HAVE_XPETRA_TPETRA) #include #include TPETRA_ETI_MANGLING_TYPEDEFS() -#endif -#if defined(HAVE_XPETRA_EPETRA) -#include -#endif - -#if (defined(HAVE_XPETRA_EPETRA) && defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with OpenMP node, but Tpetra is a) not enabled, or b) is not instantiated on OpenMP, or c) is not instantiated on OpenMP with -typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode EpetraNode; -#elif (defined(HAVE_XPETRA_EPETRA) && !defined(EPETRA_HAVE_OMP) && (!defined(HAVE_XPETRA_TPETRA) || !defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))) -// Epetra is enabled with Serial node, but Tpetra is a) not enabled, or b) is not instantiated on Serial, or c) is not instantiated on Serial with -typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode; -#endif // Epetra = on, Tpetra = off -#if defined(HAVE_XPETRA_EPETRA) && !defined(HAVE_XPETRA_TPETRA) -XPETRA_ETI_GROUP(double, int, int, EpetraNode) -#endif // Epetra = on, Tpetra = on -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) -TPETRA_INSTANTIATE_MULTIVECTOR(XPETRA_ETI_GROUP) -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) -XPETRA_ETI_GROUP(double, int, int, EpetraNode) -#endif - -#endif // Epetra = off, Tpetra = on -#if !defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_TPETRA) TPETRA_INSTANTIATE_MULTIVECTOR(XPETRA_ETI_GROUP) -#endif #endif // ifndef XPETRA_ETI_4ARG_MV_HPP diff --git a/packages/xpetra/src/Utils/Xpetra_EpetraExceptions.hpp b/packages/xpetra/src/Utils/Xpetra_EpetraExceptions.hpp deleted file mode 100644 index ecea98cefc31..000000000000 --- a/packages/xpetra/src/Utils/Xpetra_EpetraExceptions.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAEXCEPTIONS_HPP -#define XPETRA_EPETRAEXCEPTIONS_HPP - -#include "Xpetra_ConfigDefs.hpp" - -#ifndef HAVE_XPETRA_EPETRA -#error This file should be included only if HAVE_XPETRA_EPETRA is defined. -#endif - -#include "Xpetra_Exceptions.hpp" - -// This macro takes in argument a source code line. -// It catchs exceptions that could be throwed by 'sourceCode' -// If an exception is throw in any node, then all the node throws -// an std::invalid_argument exceptions. -#define IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG(sourceCode) \ - { \ - int localFailure = 0; /* 0 == success */ \ - try { \ - sourceCode; \ - } catch (int /*epetraErrCode*/) { \ - localFailure = 1; /* 1 == failure */ \ - } \ - \ - { \ - int globalFailure = 0; /* 0 == success */ \ - Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, localFailure, Teuchos::outArg(globalFailure)); \ - TEUCHOS_TEST_FOR_EXCEPTION(globalFailure != 0, std::invalid_argument, "Epetra threw exception"); \ - } \ - } -#endif diff --git a/packages/xpetra/src/Utils/Xpetra_EpetraUtils.cpp b/packages/xpetra/src/Utils/Xpetra_EpetraUtils.cpp deleted file mode 100644 index 7527133be840..000000000000 --- a/packages/xpetra/src/Utils/Xpetra_EpetraUtils.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_ConfigDefs.hpp" - -#ifdef HAVE_XPETRA_EPETRA - -#include "Xpetra_EpetraUtils.hpp" - -// header files for comm objects conversion -#ifdef HAVE_MPI -#include -#include -#include -#endif -#include -#ifdef HAVE_MPI -#include -#endif -#include - -#include "Xpetra_Exceptions.hpp" - -namespace Xpetra { - -using Teuchos::RCP; - -const RCP toEpetra(const RCP >& comm) { -#ifdef HAVE_MPI - const RCP > mpiComm = Teuchos::rcp_dynamic_cast >(comm); - if (mpiComm != Teuchos::null) { - return Teuchos::rcp(new Epetra_MpiComm(*mpiComm->getRawMpiComm())); - } else -#endif - if ((Teuchos::rcp_dynamic_cast >(comm) != Teuchos::null)) - return Teuchos::rcp(new Epetra_SerialComm()); - else - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::BadCast, "Cannot convert a Teuchos::Comm to an Epetra_Comm: The exact type of the Teuchos::Comm object is unknown"); -} - -const RCP > toXpetra(const Epetra_Comm& comm) { -#ifdef HAVE_MPI - try { - const Epetra_MpiComm& mpiComm = dynamic_cast(comm); - // We need to pass some tag to the Teuchos::MpiComm constructor. We - // cannot use Epetra's GetMpiTag() as that increases the tag counter. - const int MAGIC_TAG = 26077; - return Teuchos::rcp(new Teuchos::MpiComm(Teuchos::opaqueWrapper(mpiComm.Comm()), MAGIC_TAG)); - } catch (std::bad_cast& /*b*/) { - } -#endif - try { - const Epetra_SerialComm& serialComm = dynamic_cast(comm); - serialComm.NumProc(); // avoid compilation warning - return Teuchos::rcp(new Teuchos::SerialComm()); - } catch (std::bad_cast& /*b*/) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::BadCast, "Cannot convert an Epetra_Comm to a Teuchos::Comm: The exact type of the Epetra_Comm object is unknown"); - } -} - -bool toEpetra(Teuchos::ETransp trans) { - if (trans == Teuchos::NO_TRANS) - return false; - else if (trans == Teuchos::TRANS) - return true; - else { - TEUCHOS_TEST_FOR_EXCEPTION((trans != Teuchos::NO_TRANS) && (trans == Teuchos::TRANS), Xpetra::Exceptions::NotImplemented, "Cannot convert Teuchos::ETransp to a boolean."); - } - - return false; // to skip a compilation warning msg. -} - -} // namespace Xpetra - -#endif diff --git a/packages/xpetra/src/Utils/Xpetra_EpetraUtils.hpp b/packages/xpetra/src/Utils/Xpetra_EpetraUtils.hpp deleted file mode 100644 index e761fcbc798d..000000000000 --- a/packages/xpetra/src/Utils/Xpetra_EpetraUtils.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_COMM_HPP -#define XPETRA_COMM_HPP - -//! Conversion between Epetra and Teuchos objects - -#include "Xpetra_ConfigDefs.hpp" - -#ifdef HAVE_XPETRA_EPETRA - -// header files for comm objects conversion -#include -#include - -// header file for Teuchos::ETransp -#include - -namespace Xpetra { - -using Teuchos::RCP; - -//! Convert a Teuchos_Comm to an Epetra_Comm. -const RCP toEpetra(const RCP >& comm); - -//! Convert an Epetra_Comm.to a Teuchos_Comm. -const RCP > toXpetra(const Epetra_Comm& comm); - -//! Convert a Teuchos::ETransp to an Epetra boolean. -bool toEpetra(Teuchos::ETransp); - -} // namespace Xpetra -#endif // HAVE_XPETRA_EPETRA - -#endif // XPETRA_EPETRACOMM_HPP - -// TODO: remove return RCP for toEpetra? diff --git a/packages/xpetra/src/Utils/Xpetra_Exceptions.hpp b/packages/xpetra/src/Utils/Xpetra_Exceptions.hpp index a3a18d16b6c2..254637f6e671 100644 --- a/packages/xpetra/src/Utils/Xpetra_Exceptions.hpp +++ b/packages/xpetra/src/Utils/Xpetra_Exceptions.hpp @@ -30,13 +30,7 @@ const RCP& newObj = Teuchos::rcp_dynamic_cast(obj); \ TEUCHOS_TEST_FOR_EXCEPTION(newObj == Teuchos::null, Xpetra::Exceptions::BadCast, "Cannot cast '" #obj "' to a " #type ". " #exceptionMsg); -#ifdef HAVE_XPETRA_EPETRA -#define XPETRA_FACTORY_ERROR_IF_EPETRA(lib) \ - if ((lib) == ::Xpetra::UseEpetra) \ - TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Epetra can only be used with Scalar=double and LocalOrdinal=GlobalOrdinal=int on a serial node"); -#else #define XPETRA_FACTORY_ERROR_IF_EPETRA(lib) -#endif #define XPETRA_FACTORY_END TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Unknown map->lib() type. Did you compile with Epetra and Tpetra support?"); diff --git a/packages/xpetra/src/Utils/Xpetra_Helpers_decl.hpp b/packages/xpetra/src/Utils/Xpetra_Helpers_decl.hpp index 1633f738d413..a3c8aac06ae5 100644 --- a/packages/xpetra/src/Utils/Xpetra_Helpers_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_Helpers_decl.hpp @@ -18,17 +18,6 @@ #include "Xpetra_Map.hpp" #include "Xpetra_Matrix.hpp" -#ifdef HAVE_XPETRA_EPETRA -#include -#endif - -#ifdef HAVE_XPETRA_EPETRAEXT -#include -#include -#include -#endif // HAVE_XPETRA_EPETRAEXT - -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -39,7 +28,6 @@ #include #include #include -#endif // HAVE_XPETRA_TPETRA namespace Xpetra { @@ -57,17 +45,7 @@ class Helpers { #include "Xpetra_UseShortNames.hpp" public: -#ifdef HAVE_XPETRA_EPETRA - static RCP Op2EpetraCrs(RCP Op); - - static RCP Op2NonConstEpetraCrs(RCP Op); - - static const Epetra_CrsMatrix& Op2EpetraCrs(const Matrix& Op); - - static Epetra_CrsMatrix& Op2NonConstEpetraCrs(const Matrix& Op); -#endif // HAVE_XPETRA_EPETRA -#ifdef HAVE_XPETRA_TPETRA static RCP > Op2TpetraCrs(RCP Op); static RCP > Op2NonConstTpetraCrs(RCP Op); @@ -90,24 +68,13 @@ class Helpers { static bool isTpetraBlockCrs(RCP Op); - static bool isTpetraBlockCrs(const Matrix& Op); -#else // HAVE_XPETRA_TPETRA - static bool isTpetraCrs(const Matrix& Op); - static bool isTpetraBlockCrs(const Matrix& Op); -#endif // HAVE_XPETRA_TPETRA - -#ifdef HAVE_XPETRA_TPETRA using tcrs_matrix_type = Tpetra::CrsMatrix; static Teuchos::RCP tpetraAdd( const tcrs_matrix_type& A, bool transposeA, const typename tcrs_matrix_type::scalar_type alpha, const tcrs_matrix_type& B, bool transposeB, const typename tcrs_matrix_type::scalar_type beta); -#endif -#ifdef HAVE_XPETRA_EPETRAEXT - static void epetraExtMult(const Matrix& A, bool transposeA, const Matrix& B, bool transposeB, Matrix& C, bool fillCompleteResult); -#endif }; } // namespace Xpetra diff --git a/packages/xpetra/src/Utils/Xpetra_Helpers_def.hpp b/packages/xpetra/src/Utils/Xpetra_Helpers_def.hpp index 5ae82730ad00..98a6d3442a9b 100644 --- a/packages/xpetra/src/Utils/Xpetra_Helpers_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_Helpers_def.hpp @@ -14,73 +14,6 @@ namespace Xpetra { -#ifdef HAVE_XPETRA_EPETRA -template -RCP Helpers::Op2EpetraCrs(RCP Op) { - // Get the underlying Epetra Mtx - RCP crsOp = Teuchos::rcp_dynamic_cast(Op); - TEUCHOS_TEST_FOR_EXCEPTION(crsOp == Teuchos::null, Xpetra::Exceptions::BadCast, - "Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - - RCP tmp_CrsMtx = crsOp->getCrsMatrix(); - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - TEUCHOS_TEST_FOR_EXCEPTION(tmp_ECrsMtx == Teuchos::null, Exceptions::BadCast, - "Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - - return tmp_ECrsMtx->getEpetra_CrsMatrix(); -} - -template -RCP Helpers::Op2NonConstEpetraCrs(RCP Op) { - RCP A; - // Get the underlying Epetra Mtx - RCP crsOp = Teuchos::rcp_dynamic_cast(Op); - TEUCHOS_TEST_FOR_EXCEPTION(crsOp == Teuchos::null, Exceptions::BadCast, - "Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed"); - - RCP tmp_CrsMtx = crsOp->getCrsMatrix(); - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - TEUCHOS_TEST_FOR_EXCEPTION(tmp_ECrsMtx == Teuchos::null, Exceptions::BadCast, "Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - - return tmp_ECrsMtx->getEpetra_CrsMatrixNonConst(); -} - -template -const Epetra_CrsMatrix& Helpers::Op2EpetraCrs(const Matrix& Op) { - // Get the underlying Epetra Mtx - try { - const CrsMatrixWrap& crsOp = dynamic_cast(Op); - RCP tmp_CrsMtx = crsOp.getCrsMatrix(); - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - TEUCHOS_TEST_FOR_EXCEPTION(tmp_ECrsMtx == Teuchos::null, Xpetra::Exceptions::BadCast, - "Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - - return *tmp_ECrsMtx->getEpetra_CrsMatrix(); - - } catch (...) { - throw(Xpetra::Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed")); - } -} - -template -Epetra_CrsMatrix& Helpers::Op2NonConstEpetraCrs(const Matrix& Op) { - RCP A; - // Get the underlying Epetra Mtx - try { - const CrsMatrixWrap& crsOp = dynamic_cast(Op); - RCP tmp_CrsMtx = crsOp.getCrsMatrix(); - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - TEUCHOS_TEST_FOR_EXCEPTION(tmp_ECrsMtx == Teuchos::null, Xpetra::Exceptions::BadCast, "Cast from Xpetra::CrsMatrix to Xpetra::EpetraCrsMatrix failed"); - - return *Teuchos::rcp_const_cast(tmp_ECrsMtx->getEpetra_CrsMatrix()); - - } catch (...) { - throw(Xpetra::Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::CrsMatrixWrap failed")); - } -} -#endif // HAVE_XPETRA_EPETRA - -#ifdef HAVE_XPETRA_TPETRA template RCP> Helpers::Op2TpetraCrs(RCP Op) { // Get the underlying Tpetra Mtx @@ -239,20 +172,7 @@ bool Helpers::isTpetraBlockCrs(const return false; } } -#else // HAVE_XPETRA_TPETRA -template -bool Helpers::isTpetraCrs(const Matrix& Op) { - return false; -} - -template -bool Helpers::isTpetraBlockCrs(const Matrix& Op) { - return false; -} - -#endif // HAVE_XPETRA_TPETRA -#ifdef HAVE_XPETRA_TPETRA template Teuchos::RCP> Helpers::tpetraAdd( const tcrs_matrix_type& A, bool transposeA, const typename tcrs_matrix_type::scalar_type alpha, @@ -309,55 +229,6 @@ Teuchos::RCP> Helpers< return rcp(new CrsWrap(rcp_implicit_cast(rcp(new XTCrsType(C))))); } } -#endif - -#ifdef HAVE_XPETRA_EPETRAEXT -template -void Helpers::epetraExtMult(const Matrix& A, bool transposeA, const Matrix& B, bool transposeB, Matrix& C, bool fillCompleteResult) { - Epetra_CrsMatrix& epA = Op2NonConstEpetraCrs(A); - Epetra_CrsMatrix& epB = Op2NonConstEpetraCrs(B); - Epetra_CrsMatrix& epC = Op2NonConstEpetraCrs(C); - // Want a static profile (possibly fill complete) matrix as the result. - // But, EpetraExt Multiply needs C to be dynamic profile, so compute the product in a temporary DynamicProfile matrix. - const Epetra_Map& Crowmap = epC.RowMap(); - int errCode = 0; - Epetra_CrsMatrix Ctemp(::Copy, Crowmap, 0, false); - if (fillCompleteResult) { - errCode = EpetraExt::MatrixMatrix::Multiply(epA, transposeA, epB, transposeB, Ctemp, true); - if (!errCode) { - epC = Ctemp; - C.fillComplete(); - } - } else { - errCode = EpetraExt::MatrixMatrix::Multiply(epA, transposeA, epB, transposeB, Ctemp, false); - if (!errCode) { - int numLocalRows = Crowmap.NumMyElements(); - long long* globalElementList = nullptr; - Crowmap.MyGlobalElementsPtr(globalElementList); - Teuchos::Array entriesPerRow(numLocalRows, 0); - for (int i = 0; i < numLocalRows; i++) { - entriesPerRow[i] = Ctemp.NumGlobalEntries(globalElementList[i]); - } - // know how many entries to allocate in epC (which must be static profile) - epC = Epetra_CrsMatrix(::Copy, Crowmap, entriesPerRow.data(), true); - for (int i = 0; i < numLocalRows; i++) { - int gid = globalElementList[i]; - int numEntries; - double* values; - int* inds; - Ctemp.ExtractGlobalRowView(gid, numEntries, values, inds); - epC.InsertGlobalValues(gid, numEntries, values, inds); - } - } - } - if (errCode) { - std::ostringstream buf; - buf << errCode; - std::string msg = "EpetraExt::MatrixMatrix::Multiply returned nonzero error code " + buf.str(); - throw(Exceptions::RuntimeError(msg)); - } -} -#endif } // namespace Xpetra diff --git a/packages/xpetra/src/Utils/Xpetra_IO_decl.hpp b/packages/xpetra/src/Utils/Xpetra_IO_decl.hpp index 9be2f1ead59a..cf2a14e7e3d6 100644 --- a/packages/xpetra/src/Utils/Xpetra_IO_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_IO_decl.hpp @@ -13,25 +13,6 @@ #include #include "Xpetra_ConfigDefs.hpp" -#ifdef HAVE_XPETRA_EPETRA -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#endif -#endif - -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -40,11 +21,6 @@ #include #include #include "Tpetra_Util.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include -#endif #include "Xpetra_Matrix.hpp" #include "Xpetra_MatrixMatrix.hpp" @@ -66,53 +42,6 @@ namespace Xpetra { -#ifdef HAVE_XPETRA_EPETRA -// This non-member templated function exists so that the matrix-matrix multiply will compile if Epetra, Tpetra, and ML are enabled. -template -RCP> -Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(RCP& /* epAB */) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, - "Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -} - -// specialization for the case of ScalarType=double and LocalOrdinal=GlobalOrdinal=int -template <> -inline RCP> Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(RCP& epAB) { - typedef double SC; - typedef int LO; - typedef int GO; - typedef Xpetra::EpetraNode NO; - - RCP> tmpC1 = rcp(new Xpetra::EpetraCrsMatrixT(epAB)); - RCP> tmpC2 = Teuchos::rcp_implicit_cast>(tmpC1); - RCP> tmpC3 = rcp(new Xpetra::CrsMatrixWrap(tmpC2)); - - return tmpC3; -} - -template -RCP> -Convert_Epetra_MultiVector_ToXpetra_MultiVector(RCP& epX) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, - "Convert_Epetra_MultiVector_ToXpetra_MultiVector cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -} - -// specialization for the case of ScalarType=double and LocalOrdinal=GlobalOrdinal=int -template <> -inline RCP> Convert_Epetra_MultiVector_ToXpetra_MultiVector(RCP& epX) { - typedef double SC; - typedef int LO; - typedef int GO; - typedef Xpetra::EpetraNode NO; - - RCP> tmp = Xpetra::toXpetra(epX); - return tmp; -} - -#endif - /*! @class IO @brief Xpetra utility class containing IO routines to read/write vectors, matrices etc... @@ -127,26 +56,7 @@ class IO { #include "Xpetra_UseShortNames.hpp" public: -#ifdef HAVE_XPETRA_EPETRA - //! Helper utility to pull out the underlying Epetra objects from an Xpetra object - // @{ - /*static RCP MV2EpetraMV(RCP const vec); - static RCP< Epetra_MultiVector> MV2NonConstEpetraMV(RCP vec); - - static const Epetra_MultiVector& MV2EpetraMV(const MultiVector& vec); - static Epetra_MultiVector& MV2NonConstEpetraMV(MultiVector& vec); - - static RCP Op2EpetraCrs(RCP Op); - static RCP< Epetra_CrsMatrix> Op2NonConstEpetraCrs(RCP Op); - - static const Epetra_CrsMatrix& Op2EpetraCrs(const Matrix& Op); - static Epetra_CrsMatrix& Op2NonConstEpetraCrs(Matrix& Op);*/ - static const Epetra_Map& Map2EpetraMap(const Xpetra::Map& map); - // @} -#endif - -#ifdef HAVE_XPETRA_TPETRA //! Helper utility to pull out the underlying Tpetra objects from an Xpetra object // @{ /*static RCP > MV2TpetraMV(RCP const vec); @@ -166,7 +76,6 @@ class IO { static RCP< Tpetra::RowMatrix > Op2NonConstTpetraRow(RCP Op);*/ static const RCP> Map2TpetraMap(const Xpetra::Map& map); -#endif //! Read/Write methods //@{ @@ -280,848 +189,6 @@ class IO { static std::string toString(const T& what); }; -#ifdef HAVE_XPETRA_EPETRA -/*! - @class IO - @brief Xpetra utility class containing IO routines to read/write vectors, matrices. - - Specialization for LO=GO=int - - TODO: do we need specialization for SC=double and std::complex<>??? - TODO: need specialization for -*/ -template -class IO { - public: - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - -#ifdef HAVE_XPETRA_EPETRA - //! Helper utility to pull out the underlying Epetra objects from an Xpetra object - // @{ - static const Epetra_Map& Map2EpetraMap(const Xpetra::Map& map) { - RCP> xeMap = Teuchos::rcp_dynamic_cast>(Teuchos::rcpFromRef(map)); - if (xeMap == Teuchos::null) - throw Exceptions::BadCast("IO::Map2EpetraMap : Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - return xeMap->getEpetra_Map(); - } - // @} -#endif - -#ifdef HAVE_XPETRA_TPETRA - //! Helper utility to pull out the underlying Tpetra objects from an Xpetra object - // @{ - static const RCP> Map2TpetraMap(const Xpetra::Map& map) { - const RCP>& tmp_TMap = Teuchos::rcp_dynamic_cast>(rcpFromRef(map)); - if (tmp_TMap == Teuchos::null) - throw Exceptions::BadCast("IO::Map2TpetraMap : Cast from Xpetra::Map to Xpetra::TpetraMap failed"); - return tmp_TMap->getTpetra_Map(); - } -#endif - - //! Read/Write methods - //@{ - /*! @brief Save map to file. */ - static void Write(const std::string& fileName, const Xpetra::Map& M) { - RCP> tmp_Map = rcpFromRef(M); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_EMap = Teuchos::rcp_dynamic_cast>(tmp_Map); - if (tmp_EMap != Teuchos::null) { - int rv = EpetraExt::BlockMapToMatrixMarketFile(fileName.c_str(), tmp_EMap->getEpetra_Map()); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::BlockMapToMatrixMarketFile() return value of " + Teuchos::toString(rv)); - return; - } -#endif // HAVE_XPETRA_EPETRA - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - // do nothing -#else - const RCP>& tmp_TMap = - Teuchos::rcp_dynamic_cast>(tmp_Map); - if (tmp_TMap != Teuchos::null) { - RCP> TMap = tmp_TMap->getTpetra_Map(); - Tpetra::MatrixMarket::Writer>::writeMapFile(fileName, *TMap); - return; - } -#endif -#endif // HAVE_XPETRA_TPETRA - throw Exceptions::BadCast("Could not cast to EpetraMap or TpetraMap in map writing"); - } - - static void Write(const std::string& fileName, const Xpetra::MultiVector& vec) { - std::string mapfile = "map_" + fileName; - Write(mapfile, *(vec.getMap())); - - RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_EVec = Teuchos::rcp_dynamic_cast>(tmp_Vec); - if (tmp_EVec != Teuchos::null) { - int rv = EpetraExt::MultiVectorToMatrixMarketFile(fileName.c_str(), *(tmp_EVec->getEpetra_MultiVector())); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::RowMatrixToMatrixMarketFile return value of " + Teuchos::toString(rv)); - return; - } -#endif // HAVE_XPETRA_EPETRAEXT - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - // do nothin -#else - const RCP>& tmp_TVec = - Teuchos::rcp_dynamic_cast>(tmp_Vec); - if (tmp_TVec != Teuchos::null) { - RCP> TVec = tmp_TVec->getTpetra_MultiVector(); - Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); - return; - } -#endif -#endif // HAVE_XPETRA_TPETRA - - throw Exceptions::BadCast("Could not cast to EpetraMultiVector or TpetraMultiVector in multivector writing"); - } - - static void WriteLOMV(const std::string& fileName, const Xpetra::MultiVector& vec) { - std::string mapfile = "map_" + fileName; - Write(mapfile, *(vec.getMap())); - - RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#ifdef HAVE_XPETRA_TPETRA - const RCP>& tmp_TVec = - Teuchos::rcp_dynamic_cast>(tmp_Vec); - if (tmp_TVec != Teuchos::null) { - RCP> TVec = tmp_TVec->getTpetra_MultiVector(); - Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); - return; - } else -#endif // HAVE_XPETRA_TPETRA - { - throw Exceptions::RuntimeError("Xpetra cannot write MV when the underlying library is Epetra."); - } - - throw Exceptions::BadCast("Could not cast to EpetraMultiVector or TpetraMultiVector in multivector writing"); - } - - static void WriteGOMV(const std::string& fileName, const Xpetra::MultiVector& vec) { - std::string mapfile = "map_" + fileName; - Write(mapfile, *(vec.getMap())); - - RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#ifdef HAVE_XPETRA_TPETRA - const RCP>& tmp_TVec = - Teuchos::rcp_dynamic_cast>(tmp_Vec); - if (tmp_TVec != Teuchos::null) { - RCP> TVec = tmp_TVec->getTpetra_MultiVector(); - Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); - return; - } else -#endif // HAVE_XPETRA_TPETRA - { - throw Exceptions::RuntimeError("Xpetra cannot write MV when the underlying library is Epetra."); - } - - throw Exceptions::BadCast("Could not cast to EpetraMultiVector or TpetraMultiVector in multivector writing"); - } - - static void Write(const std::string& fileName, const Xpetra::Matrix& Op, const bool& writeAllMaps = false) { - Write("rowmap_" + fileName, *(Op.getRowMap())); - if (!Op.getDomainMap()->isSameAs(*(Op.getRowMap())) || writeAllMaps) - Write("domainmap_" + fileName, *(Op.getDomainMap())); - if (!Op.getRangeMap()->isSameAs(*(Op.getRowMap())) || writeAllMaps) - Write("rangemap_" + fileName, *(Op.getRangeMap())); - if (!Op.getColMap()->isSameAs(*(Op.getDomainMap())) || writeAllMaps) - Write("colmap_" + fileName, *(Op.getColMap())); - - const Xpetra::CrsMatrixWrap& crsOp = - dynamic_cast&>(Op); - RCP> tmp_CrsMtx = crsOp.getCrsMatrix(); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - if (tmp_ECrsMtx != Teuchos::null) { - RCP A = tmp_ECrsMtx->getEpetra_CrsMatrix(); - int rv = EpetraExt::RowMatrixToMatrixMarketFile(fileName.c_str(), *A); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::RowMatrixToMatrixMarketFile return value of " + Teuchos::toString(rv)); - return; - } -#endif // endif HAVE_XPETRA_EPETRA - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - // do nothin -#else - const RCP>& tmp_TCrsMtx = - Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - if (tmp_TCrsMtx != Teuchos::null) { - RCP> A = tmp_TCrsMtx->getTpetra_CrsMatrix(); - Tpetra::MatrixMarket::Writer>::writeSparseFile(fileName, A); - return; - } - const RCP>& tmp_BlockCrs = - Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - if (tmp_BlockCrs != Teuchos::null) { - std::ofstream outstream(fileName, std::ofstream::out); - Teuchos::FancyOStream ofs(Teuchos::rcpFromRef(outstream)); - tmp_BlockCrs->getTpetra_BlockCrsMatrix()->describe(ofs, Teuchos::VERB_EXTREME); - return; - } - -#endif -#endif // HAVE_XPETRA_TPETRA - - throw Exceptions::BadCast("Could not cast to EpetraCrsMatrix or TpetraCrsMatrix in matrix writing"); - } - - static void Write(const std::string& fileName, const Xpetra::CrsGraph& graph, const bool& writeAllMaps = false) { - Write("rowmap_" + fileName, *(graph.getRowMap())); - if (!graph.getDomainMap()->isSameAs(*(graph.getRowMap())) || writeAllMaps) - Write("domainmap_" + fileName, *(graph.getDomainMap())); - if (!graph.getRangeMap()->isSameAs(*(graph.getRowMap())) || writeAllMaps) - Write("rangemap_" + fileName, *(graph.getRangeMap())); - if (!graph.getColMap()->isSameAs(*(graph.getDomainMap())) || writeAllMaps) - Write("colmap_" + fileName, *(graph.getColMap())); - - RCP> tmp_Graph = rcpFromRef(graph); - -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_ECrsGraph = Teuchos::rcp_dynamic_cast>(tmp_Graph); - if (tmp_ECrsGraph != Teuchos::null) { - throw Exceptions::BadCast("Writing not implemented for EpetraCrsGraphT"); - } -#endif // endif HAVE_XPETRA_EPETRA - -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - // do nothin -#else - RCP> tmp_TCrsGraph = - Teuchos::rcp_dynamic_cast>(tmp_Graph); - if (tmp_TCrsGraph != Teuchos::null) { - RCP> G = tmp_TCrsGraph->getTpetra_CrsGraph(); - Tpetra::MatrixMarket::Writer>::writeSparseGraphFile(fileName, G); - return; - } -#endif -#endif // HAVE_XPETRA_TPETRA - - throw Exceptions::BadCast("Could not cast to EpetraCrsMatrix or TpetraCrsMatrix in matrix writing"); - } - - static void WriteLocal(const std::string& fileName, const Xpetra::Matrix& Op) { - const Xpetra::CrsMatrixWrap& crsOp = - dynamic_cast&>(Op); - RCP> tmp_CrsMtx = crsOp.getCrsMatrix(); - - ArrayRCP rowptr_RCP; - ArrayRCP rowptr2_RCP; - ArrayRCP colind_RCP; - ArrayRCP vals_RCP; - tmp_CrsMtx->getAllValues(rowptr_RCP, colind_RCP, vals_RCP); - - ArrayView rowptr = rowptr_RCP(); - ArrayView colind = colind_RCP(); - ArrayView vals = vals_RCP(); - - rowptr2_RCP.resize(rowptr.size()); - ArrayView rowptr2 = rowptr2_RCP(); - for (size_t j = 0; j < Teuchos::as(rowptr.size()); j++) - rowptr2[j] = rowptr[j]; - - Teuchos::MatrixMarket::Raw::Writer writer; - writer.writeFile(fileName + "." + std::to_string(Op.getRowMap()->getComm()->getSize()) + "." + std::to_string(Op.getRowMap()->getComm()->getRank()), - rowptr2, colind, vals, - rowptr.size() - 1, Op.getColMap()->getLocalNumElements()); - } - - static void WriteBlockedCrsMatrix(const std::string& fileName, const Xpetra::BlockedCrsMatrix& Op, const bool& writeAllMaps = false) { - // write all matrices with their maps - for (size_t row = 0; row < Op.Rows(); ++row) { - for (size_t col = 0; col < Op.Cols(); ++col) { - auto m = Op.getMatrix(row, col); - if (m != Teuchos::null) { // skip empty blocks - const bool cond = Teuchos::rcp_dynamic_cast>(m) == Teuchos::null; - TEUCHOS_TEST_FOR_EXCEPTION(cond, - Exceptions::BadCast, - "Sub block matrix (" << row << "," << col << ") is not of type CrsMatrixWrap."); - Write(fileName + toString(row) + toString(col) + ".m", *m, writeAllMaps); - } - } - } - - // write map information of map extractors - auto rangeMapExtractor = Op.getRangeMapExtractor(); - auto domainMapExtractor = Op.getDomainMapExtractor(); - - for (size_t row = 0; row < rangeMapExtractor->NumMaps(); ++row) { - auto map = rangeMapExtractor->getMap(row); - Write("subRangeMap_" + fileName + toString(row) + ".m", *map); - } - Write("fullRangeMap_" + fileName + ".m", *(rangeMapExtractor->getFullMap())); - - for (size_t col = 0; col < domainMapExtractor->NumMaps(); ++col) { - auto map = domainMapExtractor->getMap(col); - Write("subDomainMap_" + fileName + toString(col) + ".m", *map); - } - Write("fullDomainMap_" + fileName + ".m", *(domainMapExtractor->getFullMap())); - } - - static Teuchos::RCP> Read(const std::string& fileName, Xpetra::UnderlyingLib lib, const RCP>& comm, bool binary = false) { - if (!binary) { - // Matrix Market file format (ASCII) - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - Epetra_CrsMatrix* eA; - const RCP epcomm = Xpetra::toEpetra(comm); - int rv = EpetraExt::MatrixMarketFileToCrsMatrix(fileName.c_str(), *epcomm, eA); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMarketFileToCrsMatrix return value of " + Teuchos::toString(rv)); - - RCP tmpA = rcp(eA); - - RCP> A = - Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(tmpA); - return A; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra GO=int enabled."); -#else - typedef Tpetra::CrsMatrix sparse_matrix_type; - - typedef Tpetra::MatrixMarket::Reader reader_type; - - bool callFillComplete = true; - - RCP tA = reader_type::readSparseFile(fileName, comm, callFillComplete); - - if (tA.is_null()) - throw Exceptions::RuntimeError("The Tpetra::CrsMatrix returned from readSparseFile() is null."); - - RCP> tmpA1 = rcp(new Xpetra::TpetraCrsMatrix(tA)); - RCP> tmpA2 = Teuchos::rcp_implicit_cast>(tmpA1); - RCP> A = rcp(new Xpetra::CrsMatrixWrap(tmpA2)); - - return A; -#endif -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif - } else { - throw Exceptions::RuntimeError("Xpetra:IO: you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); - } - } else { - // Custom file format (binary) - std::ifstream ifs(fileName.c_str(), std::ios::binary); - TEUCHOS_TEST_FOR_EXCEPTION(!ifs.good(), Exceptions::RuntimeError, "Can not read \"" << fileName << "\""); - int m, n, nnz; - ifs.read(reinterpret_cast(&m), sizeof(m)); - ifs.read(reinterpret_cast(&n), sizeof(n)); - ifs.read(reinterpret_cast(&nnz), sizeof(nnz)); - - int myRank = comm->getRank(); - - GlobalOrdinal indexBase = 0; - RCP> rowMap = Xpetra::MapFactory::Build(lib, m, (myRank == 0 ? m : 0), indexBase, comm), rangeMap = rowMap; - RCP> colMap = Xpetra::MapFactory::Build(lib, n, (myRank == 0 ? n : 0), indexBase, comm), domainMap = colMap; - - RCP> A; - - if (myRank == 0) { - Teuchos::Array inds; - Teuchos::Array vals; - // Scan matrix to determine the exact nnz per row. - Teuchos::ArrayRCP numEntriesPerRow(m); - for (int i = 0; i < m; i++) { - int row, rownnz; - ifs.read(reinterpret_cast(&row), sizeof(row)); - ifs.read(reinterpret_cast(&rownnz), sizeof(rownnz)); - numEntriesPerRow[i] = rownnz; - for (int j = 0; j < rownnz; j++) { - int index; - ifs.read(reinterpret_cast(&index), sizeof(index)); - } - for (int j = 0; j < rownnz; j++) { - double value; - ifs.read(reinterpret_cast(&value), sizeof(value)); - } - } - - A = Xpetra::MatrixFactory::Build(rowMap, colMap, numEntriesPerRow); - - // Now that nnz per row are known, reread and store the matrix. - ifs.seekg(0, ifs.beg); // rewind to beginning of file - int junk; // skip header info - ifs.read(reinterpret_cast(&m), sizeof(junk)); - ifs.read(reinterpret_cast(&n), sizeof(junk)); - ifs.read(reinterpret_cast(&nnz), sizeof(junk)); - for (int i = 0; i < m; i++) { - int row, rownnz; - ifs.read(reinterpret_cast(&row), sizeof(row)); - ifs.read(reinterpret_cast(&rownnz), sizeof(rownnz)); - inds.resize(rownnz); - vals.resize(rownnz); - for (int j = 0; j < rownnz; j++) { - int index; - ifs.read(reinterpret_cast(&index), sizeof(index)); - inds[j] = Teuchos::as(index); - } - for (int j = 0; j < rownnz; j++) { - double value; - ifs.read(reinterpret_cast(&value), sizeof(value)); - vals[j] = Teuchos::as(value); - } - A->insertGlobalValues(row, inds, vals); - } - } // if (myRank == 0) - else { - Teuchos::ArrayRCP numEntriesPerRow(0); - A = Xpetra::MatrixFactory::Build(rowMap, colMap, numEntriesPerRow); - } - - A->fillComplete(domainMap, rangeMap); - - return A; - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static Teuchos::RCP> Read(const std::string& filename, - const RCP> rowMap, - RCP> colMap = Teuchos::null, - const RCP> domainMap = Teuchos::null, - const RCP> rangeMap = Teuchos::null, - const bool callFillComplete = true, - const bool binary = false, - const bool tolerant = false, - const bool debug = false) { - TEUCHOS_TEST_FOR_EXCEPTION(rowMap.is_null(), Exceptions::RuntimeError, "Utils::Read() : rowMap cannot be null"); - - RCP> domain = (domainMap.is_null() ? rowMap : domainMap); - RCP> range = (rangeMap.is_null() ? rowMap : rangeMap); - - const Xpetra::UnderlyingLib lib = rowMap->lib(); - if (binary == false) { - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - Epetra_CrsMatrix* eA; - const RCP epcomm = Xpetra::toEpetra(rowMap->getComm()); - const Epetra_Map& epetraRowMap = Xpetra::IO::Map2EpetraMap(*rowMap); - const Epetra_Map& epetraDomainMap = (domainMap.is_null() ? epetraRowMap : Xpetra::IO::Map2EpetraMap(*domainMap)); - const Epetra_Map& epetraRangeMap = (rangeMap.is_null() ? epetraRowMap : Xpetra::IO::Map2EpetraMap(*rangeMap)); - int rv; - if (colMap.is_null()) { - rv = EpetraExt::MatrixMarketFileToCrsMatrix(filename.c_str(), epetraRowMap, epetraRangeMap, epetraDomainMap, eA); - - } else { - const Epetra_Map& epetraColMap = Map2EpetraMap(*colMap); - rv = EpetraExt::MatrixMarketFileToCrsMatrix(filename.c_str(), epetraRowMap, epetraColMap, epetraRangeMap, epetraDomainMap, eA); - } - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMarketFileToCrsMatrix return value of " + Teuchos::toString(rv)); - - RCP tmpA = rcp(eA); - RCP> A = - Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(tmpA); - - return A; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra GO=int support."); -#else - typedef Tpetra::CrsMatrix sparse_matrix_type; - typedef Tpetra::MatrixMarket::Reader reader_type; - typedef Tpetra::Map map_type; - - const RCP tpetraRowMap = Map2TpetraMap(*rowMap); - RCP tpetraColMap = (colMap.is_null() ? Teuchos::null : Map2TpetraMap(*colMap)); - const RCP tpetraRangeMap = (rangeMap.is_null() ? tpetraRowMap : Map2TpetraMap(*rangeMap)); - const RCP tpetraDomainMap = (domainMap.is_null() ? tpetraRowMap : Map2TpetraMap(*domainMap)); - - RCP tA = reader_type::readSparseFile(filename, tpetraRowMap, tpetraColMap, tpetraDomainMap, tpetraRangeMap, - callFillComplete, tolerant, debug); - if (tA.is_null()) - throw Exceptions::RuntimeError("The Tpetra::CrsMatrix returned from readSparseFile() is null."); - - RCP> tmpA1 = rcp(new Xpetra::TpetraCrsMatrix(tA)); - RCP> tmpA2 = Teuchos::rcp_implicit_cast>(tmpA1); - RCP> A = rcp(new Xpetra::CrsMatrixWrap(tmpA2)); - - return A; -#endif -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif - } else { - throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); - } - } else { - // Read in on rank 0. - auto tempA = Read(filename, lib, rowMap->getComm(), binary); - - auto A = Xpetra::MatrixFactory::Build(rowMap, colMap, 0); - auto importer = Xpetra::ImportFactory::Build(tempA->getRowMap(), rowMap); - A->doImport(*tempA, *importer, Xpetra::INSERT); - if (callFillComplete) - A->fillComplete(domainMap, rangeMap); - - return A; - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static Teuchos::RCP> ReadLocal(const std::string& filename, - const RCP> rowMap, - RCP> colMap, - const RCP> domainMap = Teuchos::null, - const RCP> rangeMap = Teuchos::null, - const bool callFillComplete = true, - const bool binary = false, - const bool tolerant = false, - const bool debug = false) { - TEUCHOS_TEST_FOR_EXCEPTION(rowMap.is_null(), Exceptions::RuntimeError, "Utils::ReadLocal() : rowMap cannot be null"); - TEUCHOS_TEST_FOR_EXCEPTION(colMap.is_null(), Exceptions::RuntimeError, "Utils::ReadLocal() : colMap cannot be null"); - - using matrix_type = Xpetra::Matrix; - using crs_wrap_type = Xpetra::CrsMatrixWrap; - using crs_type = Xpetra::CrsMatrix; - - RCP> domain = (domainMap.is_null() ? rowMap : domainMap); - RCP> range = (rangeMap.is_null() ? rowMap : rangeMap); - - std::string rankFilename = filename + "." + std::to_string(rowMap->getComm()->getSize()) + "." + std::to_string(rowMap->getComm()->getRank()); - RCP A = rcp(new crs_wrap_type(rowMap, colMap, 0)); - - if (binary == false) { - RCP params = rcp(new Teuchos::ParameterList()); - params->set("Parse tolerantly", tolerant); - params->set("Debug mode", debug); - - LocalOrdinal numRows = rowMap->getLocalNumElements(); - LocalOrdinal numCols = colMap->getLocalNumElements(); - - ArrayRCP rowptr2_RCP; - ArrayRCP colind2_RCP; - ArrayRCP vals2_RCP; - - Teuchos::MatrixMarket::Raw::Reader reader; - reader.readFile(rowptr2_RCP, colind2_RCP, vals2_RCP, - numRows, numCols, - rankFilename); - - RCP ACrs = Teuchos::rcp_dynamic_cast(A)->getCrsMatrix(); - - ArrayRCP rowptr_RCP; - ArrayRCP colind_RCP; - ArrayRCP vals_RCP; - ACrs->allocateAllValues(colind2_RCP.size(), rowptr_RCP, colind_RCP, vals_RCP); - - rowptr_RCP.assign(rowptr2_RCP.begin(), rowptr2_RCP.end()); - colind_RCP = colind2_RCP; - vals_RCP = vals2_RCP; - - ACrs->setAllValues(rowptr_RCP, colind_RCP, vals_RCP); - } else { - // Custom file format (binary) - std::ifstream ifs = std::ifstream(rankFilename.c_str(), std::ios::binary); - TEUCHOS_TEST_FOR_EXCEPTION(!ifs.good(), Exceptions::RuntimeError, "Can not read \"" << filename << "\""); - - int m, n, nnz; - ifs.read(reinterpret_cast(&m), sizeof(m)); - ifs.read(reinterpret_cast(&n), sizeof(n)); - ifs.read(reinterpret_cast(&nnz), sizeof(nnz)); - - TEUCHOS_ASSERT_EQUALITY(Teuchos::as(rowMap->getLocalNumElements()), m); - - Teuchos::ArrayRCP rowptrRCP; - Teuchos::ArrayRCP indicesRCP; - Teuchos::ArrayRCP valuesRCP; - - RCP ACrs = Teuchos::rcp_dynamic_cast(A)->getCrsMatrix(); - - ACrs->allocateAllValues(nnz, rowptrRCP, indicesRCP, valuesRCP); - - Teuchos::ArrayView rowptr = rowptrRCP(); - Teuchos::ArrayView indices = indicesRCP(); - Teuchos::ArrayView values = valuesRCP(); - - bool sorted = true; - - // Read in rowptr - for (int i = 0; i < m; i++) { - int row, rownnz; - ifs.read(reinterpret_cast(&row), sizeof(row)); - ifs.read(reinterpret_cast(&rownnz), sizeof(rownnz)); - - rowptr[row + 1] += rownnz; - ifs.seekg(sizeof(int) * rownnz + sizeof(double) * rownnz, ifs.cur); - } - for (int i = 0; i < m; i++) - rowptr[i + 1] += rowptr[i]; - TEUCHOS_ASSERT(Teuchos::as(rowptr[m]) == nnz); - - // reset to where the data starts - ifs.seekg(sizeof(int) * 3, ifs.beg); - - // read in entries - for (int i = 0; i < m; i++) { - int row, rownnz; - ifs.read(reinterpret_cast(&row), sizeof(row)); - ifs.read(reinterpret_cast(&rownnz), sizeof(rownnz)); - size_t ptr = rowptr[row]; - for (int j = 0; j < rownnz; j++) { - int index; - ifs.read(reinterpret_cast(&index), sizeof(index)); - indices[ptr] = Teuchos::as(index); - if (j > 0) - sorted = sorted & (indices[ptr - 1] < indices[ptr]); - ++ptr; - } - ptr = rowptr[row]; - for (int j = 0; j < rownnz; j++) { - double value; - ifs.read(reinterpret_cast(&value), sizeof(value)); - values[ptr] = Teuchos::as(value); - ++ptr; - } - rowptr[row] += rownnz; - } - for (int i = m; i > 0; i--) - rowptr[i] = rowptr[i - 1]; - rowptr[0] = 0; - -#ifdef HAVE_XPETRA_TPETRA - if (!sorted) { - for (LocalOrdinal lclRow = 0; lclRow < m; lclRow++) { - size_t rowBegin = rowptr[lclRow]; - size_t rowEnd = rowptr[lclRow + 1]; - Tpetra::sort2(&indices[rowBegin], &indices[rowEnd], &values[rowBegin]); - } - } -#else - TEUCHOS_ASSERT(sorted); -#endif - - ACrs->setAllValues(rowptrRCP, indicesRCP, valuesRCP); - } - - if (callFillComplete) - A->fillComplete(domainMap, rangeMap); - return A; - } - - static RCP> ReadMultiVector(const std::string& fileName, - const RCP>& map, - const bool binary = false) { - Xpetra::UnderlyingLib lib = map->lib(); - - if (lib == Xpetra::UseEpetra) { - // taw: Oct 9 2015: do we need a specialization for ?? - // TEUCHOS_TEST_FOR_EXCEPTION(true, ::Xpetra::Exceptions::BadCast, "Epetra can only be used with Scalar=double and Ordinal=int"); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - TEUCHOS_ASSERT(!binary); - Epetra_MultiVector* MV; - int rv = EpetraExt::MatrixMarketFileToMultiVector(fileName.c_str(), toEpetra(map), MV); - if (rv != 0) throw Exceptions::RuntimeError("EpetraExt::MatrixMarketFileToMultiVector failed"); - RCP MVrcp = rcp(MV); - return Convert_Epetra_MultiVector_ToXpetra_MultiVector(MVrcp); -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra GO=int support."); -#else - typedef Tpetra::CrsMatrix sparse_matrix_type; - typedef Tpetra::MatrixMarket::Reader reader_type; - typedef Tpetra::Map map_type; - typedef Tpetra::MultiVector multivector_type; - - RCP temp = toTpetra(map); - RCP TMV = reader_type::readDenseFile(fileName, map->getComm(), temp, false, false, binary); - RCP> rmv = Xpetra::toXpetra(TMV); - return rmv; -#endif -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif - } else { - throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static RCP> ReadMultiVectorLO(const std::string& fileName, - const RCP>& map, - const bool binary = false) { - Xpetra::UnderlyingLib lib = map->lib(); - - if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - typedef Tpetra::CrsMatrix sparse_matrix_type; - typedef Tpetra::MatrixMarket::Reader reader_type; - typedef Tpetra::Map map_type; - typedef Tpetra::MultiVector multivector_type; - - RCP temp = toTpetra(map); - RCP TMV = reader_type::readDenseFile(fileName, map->getComm(), temp, false, false, binary); - RCP> rmv = Xpetra::toXpetra(TMV); - return rmv; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif - } else { - throw Exceptions::RuntimeError("Utils::ReadMultiVectorLO : only implemented for Tpetra"); - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static RCP> ReadMap(const std::string& fileName, - Xpetra::UnderlyingLib lib, - const RCP>& comm, - const bool binary = false) { - if (lib == Xpetra::UseEpetra) { - // do we need another specialization for ?? - // TEUCHOS_TEST_FOR_EXCEPTION(true, ::Xpetra::Exceptions::BadCast, "Epetra can only be used with Scalar=double and Ordinal=int"); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - TEUCHOS_ASSERT(!binary); - Epetra_Map* eMap; - int rv = EpetraExt::MatrixMarketFileToMap(fileName.c_str(), *(Xpetra::toEpetra(comm)), eMap); - if (rv != 0) - throw Exceptions::RuntimeError("Error reading map from file " + fileName + " with EpetraExt::MatrixMarketToMap (returned " + Teuchos::toString(rv) + ")"); - - RCP eMap1 = rcp(new Epetra_Map(*eMap)); - return Xpetra::toXpetra(*eMap1); -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra GO=int support."); -#else - typedef Tpetra::CrsMatrix sparse_matrix_type; - typedef Tpetra::MatrixMarket::Reader reader_type; - - RCP> tMap = reader_type::readMapFile(fileName, comm, false, false, binary); - if (tMap.is_null()) - throw Exceptions::RuntimeError("The Tpetra::Map returned from readSparseFile() is null."); - - return Xpetra::toXpetra(tMap); -#endif -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif - } else { - throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); - } - - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } - - static RCP> ReadBlockedCrsMatrix(const std::string& fileName, Xpetra::UnderlyingLib lib, const RCP>& comm) { - size_t numBlocks = 2; // TODO user parameter? - - std::vector>> rangeMapVec; - for (size_t row = 0; row < numBlocks; ++row) { - auto map = ReadMap("subRangeMap_" + fileName + toString(row) + ".m", lib, comm); - rangeMapVec.push_back(map); - } - auto fullRangeMap = ReadMap("fullRangeMap_" + fileName + ".m", lib, comm); - - std::vector>> domainMapVec; - for (size_t col = 0; col < numBlocks; ++col) { - auto map = ReadMap("subDomainMap_" + fileName + toString(col) + ".m", lib, comm); - domainMapVec.push_back(map); - } - auto fullDomainMap = ReadMap("fullDomainMap_" + fileName + ".m", lib, comm); - - /*std::vector > testRgMapVec; - for(size_t r = 0; r < numBlocks; ++r) { - RCP map = ReadMap("rangemap_" + fileName + XpIO::toString(r) + "0.m", lib, comm); - testRgMapVec.push_back(map); - } - std::vector > testDoMapVec; - for(size_t c = 0; c < numBlocks; ++c) { - RCP map = ReadMap("domainmap_" + fileName + "0" + XpIO::toString(c) + ".m", lib, comm); - testDoMapVec.push_back(map); - }*/ - - // create map extractors - - // range map extractor - bool bRangeUseThyraStyleNumbering = false; - /* - GlobalOrdinal gMinGids = 0; - for(size_t v = 0; v < testRgMapVec.size(); ++v) { - gMinGids += testRgMapVec[v]->getMinAllGlobalIndex(); - } - if ( gMinGids==0 && testRgMapVec.size() > 1 ) bRangeUseThyraStyleNumbering = true;*/ - RCP> rangeMapExtractor = - rcp(new Xpetra::MapExtractor(fullRangeMap, rangeMapVec, bRangeUseThyraStyleNumbering)); - - // domain map extractor - bool bDomainUseThyraStyleNumbering = false; - /*gMinGids = 0; - for(size_t v = 0; v < testDoMapVec.size(); ++v) { - gMinGids += testDoMapVec[v]->getMinAllGlobalIndex(); - } - if ( gMinGids==0 && testDoMapVec.size() > 1) bDomainUseThyraStyleNumbering = true;*/ - RCP> domainMapExtractor = - rcp(new Xpetra::MapExtractor(fullDomainMap, domainMapVec, bDomainUseThyraStyleNumbering)); - - auto bOp = Teuchos::rcp(new Xpetra::BlockedCrsMatrix(rangeMapExtractor, domainMapExtractor, 33)); - - // Read all matrices with their maps and create the BlockedCrsMatrix - for (size_t row = 0; row < numBlocks; ++row) { - for (size_t col = 0; col < numBlocks; ++col) { - auto rowSubMap = ReadMap("rowmap_" + fileName + toString(row) + toString(col) + ".m", lib, comm); - auto colSubMap = ReadMap("colmap_" + fileName + toString(row) + toString(col) + ".m", lib, comm); - auto domSubMap = ReadMap("domainmap_" + fileName + toString(row) + toString(col) + ".m", lib, comm); - auto ranSubMap = ReadMap("rangemap_" + fileName + toString(row) + toString(col) + ".m", lib, comm); - auto mat = Read(fileName + toString(row) + toString(col) + ".m", rowSubMap, colSubMap, domSubMap, ranSubMap); - bOp->setMatrix(row, col, mat); - } - } - - bOp->fillComplete(); - - return bOp; - } - - //! Little helper function to convert non-string types to strings - template - static std::string toString(const T& what) { - std::ostringstream buf; - buf << what; - return buf.str(); - } -}; - -#endif // HAVE_XPETRA_EPETRA - } // end namespace Xpetra #define XPETRA_IO_SHORT diff --git a/packages/xpetra/src/Utils/Xpetra_IO_def.hpp b/packages/xpetra/src/Utils/Xpetra_IO_def.hpp index 5fae712ea5b2..961f645c106a 100644 --- a/packages/xpetra/src/Utils/Xpetra_IO_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_IO_def.hpp @@ -11,25 +11,6 @@ #include #include "Xpetra_ConfigDefs.hpp" -#ifdef HAVE_XPETRA_EPETRA -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#endif -#endif - -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -38,11 +19,6 @@ #include #include #include "Tpetra_Util.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include -#endif #include "Xpetra_Matrix.hpp" #include "Xpetra_MatrixMatrix.hpp" @@ -62,17 +38,6 @@ namespace Xpetra { -#ifdef HAVE_XPETRA_EPETRA -template -const Epetra_Map& IO::Map2EpetraMap(const Xpetra::Map& map) { - RCP> xeMap = Teuchos::rcp_dynamic_cast>(Teuchos::rcpFromRef(map)); - if (xeMap == Teuchos::null) - throw Exceptions::BadCast("Utils::Map2EpetraMap : Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - return xeMap->getEpetra_Map(); -} -#endif - -#ifdef HAVE_XPETRA_TPETRA template const RCP> IO::Map2TpetraMap(const Xpetra::Map& map) { const RCP>& tmp_TMap = Teuchos::rcp_dynamic_cast>(rcpFromRef(map)); @@ -80,22 +45,11 @@ const RCP> IOgetTpetra_Map(); } -#endif template void IO::Write(const std::string& fileName, const Xpetra::Map& M) { RCP> tmp_Map = rcpFromRef(M); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_EMap = Teuchos::rcp_dynamic_cast>(tmp_Map); - if (tmp_EMap != Teuchos::null) { - int rv = EpetraExt::BlockMapToMatrixMarketFile(fileName.c_str(), tmp_EMap->getEpetra_Map()); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::BlockMapToMatrixMarketFile() return value of " + Teuchos::toString(rv)); - return; - } -#endif // HAVE_XPETRA_EPETRAEXT -#ifdef HAVE_XPETRA_TPETRA const RCP>& tmp_TMap = Teuchos::rcp_dynamic_cast>(tmp_Map); if (tmp_TMap != Teuchos::null) { @@ -103,7 +57,6 @@ void IO::Write(const std::string& fil Tpetra::MatrixMarket::Writer>::writeMapFile(fileName, *TMap); return; } -#endif // HAVE_XPETRA_TPETRA throw Exceptions::BadCast("Could not cast to EpetraMap or TpetraMap in map writing"); } @@ -114,17 +67,7 @@ void IO::Write(const std::string& fil Write(mapfile, *(vec.getMap())); RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_EVec = Teuchos::rcp_dynamic_cast>(tmp_Vec); - if (tmp_EVec != Teuchos::null) { - int rv = EpetraExt::MultiVectorToMatrixMarketFile(fileName.c_str(), *(tmp_EVec->getEpetra_MultiVector())); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::RowMatrixToMatrixMarketFile return value of " + Teuchos::toString(rv)); - return; - } -#endif // HAVE_XPETRA_EPETRA -#ifdef HAVE_XPETRA_TPETRA const RCP>& tmp_TVec = Teuchos::rcp_dynamic_cast>(tmp_Vec); if (tmp_TVec != Teuchos::null) { @@ -132,7 +75,6 @@ void IO::Write(const std::string& fil Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); return; } -#endif // HAVE_XPETRA_TPETRA throw Exceptions::BadCast("Could not cast to EpetraMultiVector or TpetraMultiVector in multivector writing"); } @@ -143,7 +85,6 @@ void IO::WriteLOMV(const std::string& Write(mapfile, *(vec.getMap())); RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#ifdef HAVE_XPETRA_TPETRA const RCP>& tmp_TVec = Teuchos::rcp_dynamic_cast>(tmp_Vec); if (tmp_TVec != Teuchos::null) { @@ -151,7 +92,6 @@ void IO::WriteLOMV(const std::string& Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); return; } else -#endif // HAVE_XPETRA_TPETRA { throw Exceptions::RuntimeError("Xpetra cannot write MV when the underlying library is Epetra."); } @@ -165,7 +105,6 @@ void IO::WriteGOMV(const std::string& Write(mapfile, *(vec.getMap())); RCP> tmp_Vec = Teuchos::rcpFromRef(vec); -#ifdef HAVE_XPETRA_TPETRA const RCP>& tmp_TVec = Teuchos::rcp_dynamic_cast>(tmp_Vec); if (tmp_TVec != Teuchos::null) { @@ -173,7 +112,6 @@ void IO::WriteGOMV(const std::string& Tpetra::MatrixMarket::Writer>::writeDenseFile(fileName, TVec); return; } else -#endif // HAVE_XPETRA_TPETRA { throw Exceptions::RuntimeError("Xpetra cannot write MV when the underlying library is Epetra."); } @@ -194,18 +132,7 @@ void IO::Write(const std::string& fil const Xpetra::CrsMatrixWrap& crsOp = dynamic_cast&>(Op); RCP> tmp_CrsMtx = crsOp.getCrsMatrix(); -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const RCP>& tmp_ECrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); - if (tmp_ECrsMtx != Teuchos::null) { - RCP A = tmp_ECrsMtx->getEpetra_CrsMatrix(); - int rv = EpetraExt::RowMatrixToMatrixMarketFile(fileName.c_str(), *A); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::RowMatrixToMatrixMarketFile return value of " + Teuchos::toString(rv)); - return; - } -#endif -#ifdef HAVE_XPETRA_TPETRA const RCP>& tmp_TCrsMtx = Teuchos::rcp_dynamic_cast>(tmp_CrsMtx); if (tmp_TCrsMtx != Teuchos::null) { @@ -222,8 +149,6 @@ void IO::Write(const std::string& fil return; } -#endif // HAVE_XPETRA_TPETRA - throw Exceptions::BadCast("Could not cast to EpetraCrsMatrix or TpetraCrsMatrix in matrix writing"); } @@ -290,23 +215,8 @@ Teuchos::RCP> IO epcomm = Xpetra::toEpetra(comm); - int rv = EpetraExt::MatrixMarketFileToCrsMatrix(fileName.c_str(), *epcomm, eA); - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMarketFileToCrsMatrix return value of " + Teuchos::toString(rv)); - - RCP tmpA = rcp(eA); - - RCP> A = - Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(tmpA); - return A; -#else throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA typedef Tpetra::CrsMatrix sparse_matrix_type; typedef Tpetra::MatrixMarket::Reader reader_type; @@ -323,9 +233,6 @@ Teuchos::RCP> IO> A = rcp(new Xpetra::CrsMatrixWrap(tmpA2)); return A; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif } else { throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); } @@ -424,34 +331,8 @@ IO::Read(const std::string& filename, const Xpetra::UnderlyingLib lib = rowMap->lib(); if (binary == false) { if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - Epetra_CrsMatrix* eA; - const RCP epcomm = Xpetra::toEpetra(rowMap->getComm()); - const Epetra_Map& epetraRowMap = Xpetra::IO::Map2EpetraMap(*rowMap); - const Epetra_Map& epetraDomainMap = (domainMap.is_null() ? epetraRowMap : Xpetra::IO::Map2EpetraMap(*domainMap)); - const Epetra_Map& epetraRangeMap = (rangeMap.is_null() ? epetraRowMap : Xpetra::IO::Map2EpetraMap(*rangeMap)); - int rv; - if (colMap.is_null()) { - rv = EpetraExt::MatrixMarketFileToCrsMatrix(filename.c_str(), epetraRowMap, epetraRangeMap, epetraDomainMap, eA); - - } else { - const Epetra_Map& epetraColMap = Map2EpetraMap(*colMap); - rv = EpetraExt::MatrixMarketFileToCrsMatrix(filename.c_str(), epetraRowMap, epetraColMap, epetraRangeMap, epetraDomainMap, eA); - } - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMarketFileToCrsMatrix return value of " + Teuchos::toString(rv)); - - RCP tmpA = rcp(eA); - RCP> A = - Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(tmpA); - - return A; -#else throw Exceptions::RuntimeError("Xpetra has not been compiled with Epetra and EpetraExt support."); -#endif } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA typedef Tpetra::CrsMatrix sparse_matrix_type; typedef Tpetra::MatrixMarket::Reader reader_type; typedef Tpetra::Map map_type; @@ -471,9 +352,6 @@ IO::Read(const std::string& filename, RCP> A = rcp(new Xpetra::CrsMatrixWrap(tmpA2)); return A; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif } else { throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); } @@ -614,7 +492,6 @@ Teuchos::RCP> IO> IOsetAllValues(rowptrRCP, indicesRCP, valuesRCP); } @@ -644,7 +518,6 @@ RCP> IO sparse_matrix_type; typedef Tpetra::MatrixMarket::Reader reader_type; typedef Tpetra::Map map_type; @@ -654,9 +527,6 @@ RCP> IO TMV = reader_type::readDenseFile(fileName, map->getComm(), temp, false, false, binary); RCP rmv = Xpetra::toXpetra(TMV); return rmv; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif } else { throw Exceptions::RuntimeError("Utils::Read : you must specify Xpetra::UseEpetra or Xpetra::UseTpetra."); } @@ -671,7 +541,6 @@ RCP> IOlib(); if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA typedef Tpetra::CrsMatrix sparse_matrix_type; typedef Tpetra::MatrixMarket::Reader reader_type; typedef Tpetra::Map map_type; @@ -681,9 +550,6 @@ RCP> IO TMV = reader_type::readDenseFile(fileName, map->getComm(), temp, false, false, binary); RCP> rmv = Xpetra::toXpetra(TMV); return rmv; -#else - throw Exceptions::RuntimeError("Xpetra has not been compiled with Tpetra support."); -#endif } else { throw Exceptions::RuntimeError("Utils::ReadMultiVectorLO : only implemented for Tpetra"); } @@ -699,7 +565,6 @@ RCP> IO sparse_matrix_type; typedef Tpetra::MatrixMarket::Reader reader_type; @@ -708,9 +573,6 @@ RCP> IO -#ifdef HAVE_XPETRA_EPETRA -#include "Epetra_Util.h" -#include "Xpetra_EpetraImport.hpp" -#endif - -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraImport.hpp" #include "Tpetra_Import_Util.hpp" -#endif namespace Xpetra { @@ -57,94 +50,8 @@ class ImportUtils { bool use_minus_one_for_local) { UnderlyingLib lib = Importer.getSourceMap()->lib(); if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::ImportUtils only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPidGidPairs(Xpetra::toTpetra(Importer), gpids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - //! Like getPidGidPairs, but just gets the PIDs, ordered by the column Map. - void - getPids(const Import& Importer, - Teuchos::Array& pids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::ImportUtils only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - //! Like getPidGidPairs, but just gets the PIDs, ordered by the column Map. - // Like the above, but without the resize - void - getPids(const Import& Importer, - Teuchos::ArrayView& pids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::ImportUtils only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - /// \brief Get a list of remote PIDs from an importer in the order - /// corresponding to the remote LIDs. - void - getRemotePIDs(const Import& Importer, - Teuchos::Array& RemotePIDs) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::ImportUtils only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#endif // HAVE_XPETRA_EPETRA - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getRemotePIDs(Xpetra::toTpetra(Importer), RemotePIDs); -#endif // HAVE_XPETRA_TPETRA - } - } - -}; // end class ImportUtils - -#ifdef HAVE_XPETRA_EPETRA -// Specialization for int, int, EpetraNode -template <> -class ImportUtils { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; -#undef XPETRA_IMPORTUTILS_SHORT - - public: - void - getPidGidPairs(const Import& Importer, - Teuchos::Array >& gpids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector > gpids_v(gpids.size()); - Epetra_Util::GetPidGidPairs(*e_Importer, gpids_v, use_minus_one_for_local); - std::copy(gpids_v.begin(), gpids_v.end(), gpids.begin()); } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::getPidGidPairs(Xpetra::toTpetra(Importer), gpids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA } } @@ -155,14 +62,8 @@ class ImportUtils { bool use_minus_one_for_local) { UnderlyingLib lib = Importer.getSourceMap()->lib(); if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(pids.size()); - Epetra_Util::GetPids(*e_Importer, pids_v, use_minus_one_for_local); - std::copy(pids_v.begin(), pids_v.end(), pids.begin()); } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA } } @@ -174,13 +75,8 @@ class ImportUtils { bool use_minus_one_for_local) { UnderlyingLib lib = Importer.getSourceMap()->lib(); if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(pids.begin(), pids.end()); - Epetra_Util::GetPids(*e_Importer, pids_v, use_minus_one_for_local); } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA } } @@ -191,104 +87,13 @@ class ImportUtils { Teuchos::Array& RemotePIDs) { UnderlyingLib lib = Importer.getSourceMap()->lib(); if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(RemotePIDs.size()); - Epetra_Util::GetRemotePIDs(*e_Importer, pids_v); - std::copy(pids_v.begin(), pids_v.end(), RemotePIDs.begin()); } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::Import_Util::getRemotePIDs(Xpetra::toTpetra(Importer), RemotePIDs); -#endif // HAVE_XPETRA_TPETRA } } }; // end class ImportUtils -// Specialization for double, int, long long, EpetraNode -template <> -class ImportUtils { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; -#undef XPETRA_IMPORTUTILS_SHORT - - public: - void - getPidGidPairs(const Import& Importer, - Teuchos::Array >& gpids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector > gpids_v(gpids.size()); - Epetra_Util::GetPidGidPairs(*e_Importer, gpids_v, use_minus_one_for_local); - std::copy(gpids_v.begin(), gpids_v.end(), gpids.begin()); - - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPidGidPairs(Xpetra::toTpetra(Importer), gpids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - //! Like getPidGidPairs, but just gets the PIDs, ordered by the column Map. - void - getPids(const Import& Importer, - Teuchos::Array& pids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(pids.size()); - Epetra_Util::GetPids(*e_Importer, pids_v, use_minus_one_for_local); - std::copy(pids_v.begin(), pids_v.end(), pids.begin()); - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - //! Like getPidGidPairs, but just gets the PIDs, ordered by the column Map. - // Like the above, but without the resize - void - getPids(const Import& Importer, - Teuchos::ArrayView& pids, - bool use_minus_one_for_local) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(pids.size()); - Epetra_Util::GetPids(*e_Importer, pids_v, use_minus_one_for_local); - std::copy(pids_v.begin(), pids_v.end(), pids.begin()); - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getPids(Xpetra::toTpetra(Importer), pids, use_minus_one_for_local); -#endif // HAVE_XPETRA_TPETRA - } - } - - /// \brief Get a list of remote PIDs from an importer in the order - /// corresponding to the remote LIDs. - void - getRemotePIDs(const Import& Importer, - Teuchos::Array& RemotePIDs) { - UnderlyingLib lib = Importer.getSourceMap()->lib(); - if (lib == Xpetra::UseEpetra) { - RCP e_Importer = dynamic_cast*>(&Importer)->getEpetra_Import(); - std::vector pids_v(RemotePIDs.size()); - Epetra_Util::GetRemotePIDs(*e_Importer, pids_v); - std::copy(pids_v.begin(), pids_v.end(), RemotePIDs.begin()); - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA - Tpetra::Import_Util::getRemotePIDs(Xpetra::toTpetra(Importer), RemotePIDs); -#endif // HAVE_XPETRA_TPETRA - } - } - -}; // end class ImportUtils -#endif // HAVE_XPETRA_EPETRA for Epetra scpecialization - } // end namespace Xpetra #define XPETRA_IMPORTUTILS_SHORT diff --git a/packages/xpetra/src/Utils/Xpetra_IteratorOps.cpp b/packages/xpetra/src/Utils/Xpetra_IteratorOps.cpp index cb04f18d29e2..93ec3ef4e942 100644 --- a/packages/xpetra/src/Utils/Xpetra_IteratorOps.cpp +++ b/packages/xpetra/src/Utils/Xpetra_IteratorOps.cpp @@ -11,170 +11,4 @@ namespace Xpetra { -#if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) -template <> -void Jacobi(double omega, - const Xpetra::Vector& Dinv, - const Xpetra::Matrix& A, - const Xpetra::Matrix& B, - Xpetra::Matrix& C, - bool call_FillComplete_on_result, - bool doOptimizeStorage, - const std::string& label, - const Teuchos::RCP& params) { - typedef double SC; - typedef int LO; - typedef int GO; - typedef EpetraNode NO; - - TEUCHOS_TEST_FOR_EXCEPTION(C.getRowMap()->isSameAs(*A.getRowMap()) == false, Exceptions::RuntimeError, - "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A") - TEUCHOS_TEST_FOR_EXCEPTION(C.getRowMap()->isSameAs(*B.getRowMap()) == false, Exceptions::RuntimeError, - "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B"); - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#ifndef HAVE_XPETRA_EPETRAEXT - throw(Xpetra::Exceptions::RuntimeError("Xpetra::IteratorOps::Jacobi requires EpetraExt to be compiled.")); -#else - Epetra_CrsMatrix& epA = Xpetra::Helpers::Op2NonConstEpetraCrs(A); - Epetra_CrsMatrix& epB = Xpetra::Helpers::Op2NonConstEpetraCrs(B); - Epetra_CrsMatrix& epC = Xpetra::Helpers::Op2NonConstEpetraCrs(C); - // FIXME - XPETRA_DYNAMIC_CAST(const EpetraVectorT, Dinv, epD, "Xpetra::IteratorOps::Jacobi() only accepts Xpetra::EpetraVector as input argument."); - - int i = EpetraExt::MatrixMatrix::Jacobi(omega, *epD.getEpetra_Vector(), epA, epB, epC, haveMultiplyDoFillComplete); - if (haveMultiplyDoFillComplete) { - // Due to Epetra wrapper intricacies, we need to explicitly call - // fillComplete on Xpetra matrix here. Specifically, EpetraCrsMatrix - // only keeps an internal variable to check whether we are in resumed - // state or not, but never touches the underlying Epetra object. As - // such, we need to explicitly update the state of Xpetra matrix to - // that of Epetra one afterwords - C.fillComplete(); - } - - if (i != 0) { - std::ostringstream buf; - buf << i; - std::string msg = "EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str(); - throw(Exceptions::RuntimeError(msg)); - } -#endif - } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO= enabled.")); -#else - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2TpetraCrs(B); - Tpetra::CrsMatrix& tpC = Xpetra::Helpers::Op2NonConstTpetraCrs(C); - const RCP >& tpD = toTpetra(Dinv); - Tpetra::MatrixMatrix::Jacobi(omega, *tpD, tpA, tpB, tpC, haveMultiplyDoFillComplete, label, params); -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - } - - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP ppp = rcp(new Teuchos::ParameterList()); - ppp->set("Optimize Storage", doOptimizeStorage); - C.fillComplete(B.getDomainMap(), B.getRangeMap(), ppp); - } - - // transfer striding information - Teuchos::RCP > rcpA = Teuchos::rcp_const_cast >(Teuchos::rcpFromRef(A)); - Teuchos::RCP > rcpB = Teuchos::rcp_const_cast >(Teuchos::rcpFromRef(B)); - C.CreateView("stridedMaps", rcpA, false, rcpB, false); // TODO use references instead of RCPs -} -#endif - -#if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) -template <> -void Jacobi(double omega, - const Xpetra::Vector& Dinv, - const Xpetra::Matrix& A, - const Xpetra::Matrix& B, - Xpetra::Matrix& C, - bool call_FillComplete_on_result, - bool doOptimizeStorage, - const std::string& label, - const Teuchos::RCP& params) { - typedef double SC; - typedef int LO; - typedef long long GO; - typedef EpetraNode NO; - - TEUCHOS_TEST_FOR_EXCEPTION(C.getRowMap()->isSameAs(*A.getRowMap()) == false, Exceptions::RuntimeError, - "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of A") - TEUCHOS_TEST_FOR_EXCEPTION(C.getRowMap()->isSameAs(*B.getRowMap()) == false, Exceptions::RuntimeError, - "XpetraExt::MatrixMatrix::Jacobi: row map of C is not same as row map of B"); - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#ifndef HAVE_XPETRA_EPETRAEXT - throw(Xpetra::Exceptions::RuntimeError("Xpetra::IteratorOps::Jacobi requires EpetraExt to be compiled.")); -#else - Epetra_CrsMatrix& epA = Xpetra::Helpers::Op2NonConstEpetraCrs(A); - Epetra_CrsMatrix& epB = Xpetra::Helpers::Op2NonConstEpetraCrs(B); - Epetra_CrsMatrix& epC = Xpetra::Helpers::Op2NonConstEpetraCrs(C); - // FIXME - XPETRA_DYNAMIC_CAST(const EpetraVectorT, Dinv, epD, "Xpetra::IteratorOps::Jacobi() only accepts Xpetra::EpetraVector as input argument."); - - int i = EpetraExt::MatrixMatrix::Jacobi(omega, *epD.getEpetra_Vector(), epA, epB, epC, haveMultiplyDoFillComplete); - if (haveMultiplyDoFillComplete) { - // Due to Epetra wrapper intricacies, we need to explicitly call - // fillComplete on Xpetra matrix here. Specifically, EpetraCrsMatrix - // only keeps an internal variable to check whether we are in resumed - // state or not, but never touches the underlying Epetra object. As - // such, we need to explicitly update the state of Xpetra matrix to - // that of Epetra one afterwords - C.fillComplete(); - } - - if (i != 0) { - std::ostringstream buf; - buf << i; - std::string msg = "EpetraExt::MatrixMatrix::Jacobi return value of " + buf.str(); - throw(Exceptions::RuntimeError(msg)); - } -#endif - } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO= enabled.")); -#else - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2TpetraCrs(B); - Tpetra::CrsMatrix& tpC = Xpetra::Helpers::Op2NonConstTpetraCrs(C); - const RCP >& tpD = toTpetra(Dinv); - Tpetra::MatrixMatrix::Jacobi(omega, *tpD, tpA, tpB, tpC, haveMultiplyDoFillComplete, label, params); -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - } - - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP ppp = rcp(new Teuchos::ParameterList()); - ppp->set("Optimize Storage", doOptimizeStorage); - C.fillComplete(B.getDomainMap(), B.getRangeMap(), ppp); - } - - // transfer striding information - Teuchos::RCP > rcpA = Teuchos::rcp_const_cast >(Teuchos::rcpFromRef(A)); - Teuchos::RCP > rcpB = Teuchos::rcp_const_cast >(Teuchos::rcpFromRef(B)); - C.CreateView("stridedMaps", rcpA, false, rcpB, false); // TODO use references instead of RCPs -} -#endif - } // namespace Xpetra diff --git a/packages/xpetra/src/Utils/Xpetra_IteratorOps.hpp b/packages/xpetra/src/Utils/Xpetra_IteratorOps.hpp index 66c7ea0d88e0..818271cb47c0 100644 --- a/packages/xpetra/src/Utils/Xpetra_IteratorOps.hpp +++ b/packages/xpetra/src/Utils/Xpetra_IteratorOps.hpp @@ -53,21 +53,13 @@ void Jacobi( bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#ifndef HAVE_XPETRA_EPETRAEXT throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Jacobi requires EpetraExt to be compiled.")); -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Jacobi requires you to use an Epetra-compatible data type.")); -#endif } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); const Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2TpetraCrs(B); Tpetra::CrsMatrix& tpC = Xpetra::Helpers::Op2NonConstTpetraCrs(C); const RCP >& tpD = toTpetra(Dinv); Tpetra::MatrixMatrix::Jacobi(omega, *tpD, tpA, tpB, tpC, haveMultiplyDoFillComplete, label, params); -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif } if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { @@ -82,32 +74,6 @@ void Jacobi( C.CreateView("stridedMaps", rcpA, false, rcpB, false); // TODO use references instead of RCPs } // end Jacobi -#if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) -template <> -void Jacobi(double omega, - const Xpetra::Vector& Dinv, - const Xpetra::Matrix& A, - const Xpetra::Matrix& B, - Xpetra::Matrix& C, - bool call_FillComplete_on_result, - bool doOptimizeStorage, - const std::string& label, - const Teuchos::RCP& params); -#endif - -#if defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) -template <> -void Jacobi(double omega, - const Xpetra::Vector& Dinv, - const Xpetra::Matrix& A, - const Xpetra::Matrix& B, - Xpetra::Matrix& C, - bool call_FillComplete_on_result, - bool doOptimizeStorage, - const std::string& label, - const Teuchos::RCP& params); -#endif - /*! @class IteratorOps @brief Xpetra utility class containing iteration operators. diff --git a/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_decl.hpp b/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_decl.hpp index 723e2a697ec6..e4e47b5eafac 100644 --- a/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_decl.hpp @@ -23,17 +23,6 @@ #include "Xpetra_Helpers.hpp" -#ifdef HAVE_XPETRA_EPETRA -#include -#endif - -#ifdef HAVE_XPETRA_EPETRAEXT -#include -#include -#include -#endif // HAVE_XPETRA_EPETRAEXT - -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -42,7 +31,6 @@ #include #include #include -#endif // HAVE_XPETRA_TPETRA namespace Xpetra { @@ -130,13 +118,6 @@ class MatrixMatrix { bool callFillCompleteOnResult = true, bool doOptimizeStorage = true, const std::string& label = std::string(), const RCP& params = null); -#ifdef HAVE_XPETRA_EPETRAEXT - // Michael Gee's MLMultiply - static RCP MLTwoMatrixMultiply(const Epetra_CrsMatrix& epA, - const Epetra_CrsMatrix& epB, - Teuchos::FancyOStream& fos); -#endif // ifdef HAVE_XPETRA_EPETRAEXT - /*! @brief Helper function to do matrix-matrix multiply "in-place" Returns RCP to non-constant Xpetra::BlockedCrsMatrix. @@ -187,1426 +168,6 @@ class MatrixMatrix { }; // class MatrixMatrix -#ifdef HAVE_XPETRA_EPETRA -// specialization MatrixMatrix for SC=double, LO=GO=int -template <> -class MatrixMatrix { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; -#include "Xpetra_UseShortNames.hpp" - - public: - /** Given CrsMatrix objects A, B and C, form the product C = A*B. - In a parallel setting, A and B need not have matching distributions, - but C needs to have the same row-map as A (if transposeA is false). - At this time C=AT*B and C=A*BT are known to not work. However, - C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011 - - @param A Input, must already have had 'FillComplete()' called. - @param transposeA Input, whether to use transpose of matrix A. - @param B Input, must already have had 'FillComplete()' called. - @param transposeB Input, whether to use transpose of matrix B. - @param C Result. On entry to this method, it doesn't matter whether - FillComplete() has already been called on C or not. If it has, - then C's graph must already contain all nonzero locations that - will be produced when forming the product A*B. On exit, - C.FillComplete() will have been called, unless the last argument - to this function is specified to be false. - @param call_FillComplete_on_result Optional argument, defaults to true. - Power users may specify this argument to be false if they *DON'T* - want this function to call C.FillComplete. (It is often useful - to allow this function to call C.FillComplete, in cases where - one or both of the input matrices are rectangular and it is not - trivial to know which maps to use for the domain- and range-maps.) - -*/ - static void Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - Matrix& C, - bool call_FillComplete_on_result = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - TEUCHOS_TEST_FOR_EXCEPTION(transposeA == false && C.getRowMap()->isSameAs(*A.getRowMap()) == false, - Xpetra::Exceptions::RuntimeError, "XpetraExt::MatrixMatrix::Multiply: row map of C is not same as row map of A"); - TEUCHOS_TEST_FOR_EXCEPTION(transposeA == true && C.getRowMap()->isSameAs(*A.getDomainMap()) == false, - Xpetra::Exceptions::RuntimeError, "XpetraExt::MatrixMatrix::Multiply: row map of C is not same as domain map of A"); - - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Xpetra::Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Xpetra::Exceptions::RuntimeError, "B is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - using helpers = Xpetra::Helpers; - - if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - helpers::epetraExtMult(A, transposeA, B, transposeB, C, haveMultiplyDoFillComplete); -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Multiply requires EpetraExt to be compiled.")); -#endif - } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra ETI enabled.")); -#else - if (helpers::isTpetraCrs(A) && helpers::isTpetraCrs(B) && helpers::isTpetraCrs(C)) { - // All matrices are Crs - const Tpetra::CrsMatrix& tpA = helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpB = helpers::Op2TpetraCrs(B); - Tpetra::CrsMatrix& tpC = helpers::Op2NonConstTpetraCrs(C); - - // 18Feb2013 JJH I'm reenabling the code that allows the matrix matrix multiply to do the fillComplete. - // Previously, Tpetra's matrix matrix multiply did not support fillComplete. - Tpetra::MatrixMatrix::Multiply(tpA, transposeA, tpB, transposeB, tpC, haveMultiplyDoFillComplete, label, params); - } else if (helpers::isTpetraBlockCrs(A) && helpers::isTpetraBlockCrs(B)) { - // All matrices are BlockCrs (except maybe Ac) - // FIXME: For the moment we're just going to clobber the innards of Ac, so no reuse. Once we have a reuse kernel, - // we'll need to think about refactoring BlockCrs so we can do something smarter here. - - if (!A.getRowMap()->getComm()->getRank()) - std::cout << "WARNING: Using inefficient BlockCrs Multiply Placeholder" << std::endl; - - const Tpetra::BlockCrsMatrix& tpA = Xpetra::Helpers::Op2TpetraBlockCrs(A); - const Tpetra::BlockCrsMatrix& tpB = Xpetra::Helpers::Op2TpetraBlockCrs(B); - using CRS = Tpetra::CrsMatrix; - RCP Acrs = Tpetra::convertToCrsMatrix(tpA); - RCP Bcrs = Tpetra::convertToCrsMatrix(tpB); - - // We need the global constants to do the copy back to BlockCrs - RCP new_params; - if (!params.is_null()) { - new_params = rcp(new Teuchos::ParameterList(*params)); - new_params->set("compute global constants", true); - } - - // FIXME: The lines below only works because we're assuming Ac is Point - RCP tempAc = Teuchos::rcp(new CRS(Acrs->getRowMap(), 0)); - Tpetra::MatrixMatrix::Multiply(*Acrs, transposeA, *Bcrs, transposeB, *tempAc, haveMultiplyDoFillComplete, label, new_params); - - // Temporary output matrix - RCP > Ac_t = Tpetra::convertToBlockCrsMatrix(*tempAc, A.GetStorageBlockSize()); - RCP > Ac_x = Teuchos::rcp(new Xpetra::TpetraBlockCrsMatrix(Ac_t)); - RCP > Ac_p = Ac_x; - - // We can now cheat and replace the innards of Ac - RCP > Ac_w = Teuchos::rcp_dynamic_cast >(Teuchos::rcpFromRef(C)); - Ac_w->replaceCrsMatrix(Ac_p); - } else { - // Mix and match - TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); - } -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - } - - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP fillParams = rcp(new Teuchos::ParameterList()); - fillParams->set("Optimize Storage", doOptimizeStorage); - C.fillComplete((transposeB) ? B.getRangeMap() : B.getDomainMap(), - (transposeA) ? A.getDomainMap() : A.getRangeMap(), - fillParams); - } - - // transfer striding information - RCP rcpA = Teuchos::rcp_const_cast(Teuchos::rcpFromRef(A)); - RCP rcpB = Teuchos::rcp_const_cast(Teuchos::rcpFromRef(B)); - C.CreateView("stridedMaps", rcpA, transposeA, rcpB, transposeB); // TODO use references instead of RCPs - } // end Multiply - - /** - @brief Helper function to do matrix-matrix multiply - - Given CrsMatrix objects A, B and C, form the product C = A*B. - In a parallel setting, A and B need not have matching distributions, - but C needs to have the same row-map as A (if transposeA is false). - At this time C=AT*B and C=A*BT are known to not work. However, - C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011 - - @param A Input, must already have had 'FillComplete()' called. - @param transposeA Input, whether to use transpose of matrix A. - @param B Input, must already have had 'FillComplete()' called. - @param transposeB Input, whether to use transpose of matrix B. - @param C Result. If Teuchos::null, a new CrsMatrix is created with optimal number of nnz per row. - @param call_FillComplete_on_result Optional argument, defaults to true. - Power users may specify this argument to be false if they *DON'T* - want this function to call C.FillComplete. (It is often useful - to allow this function to call C.FillComplete, in cases where - one or both of the input matrices are rectangular and it is not - trivial to know which maps to use for the domain- and range-maps.) - -*/ - static RCP Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - RCP C_in, - Teuchos::FancyOStream& fos, - bool doFillComplete = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - // Optimization using ML Multiply when available and requested - // This feature is currently not supported. We would have to introduce the HAVE_XPETRA_ML_MMM flag -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) && defined(HAVE_XPETRA_ML_MMM) - if (B.getDomainMap()->lib() == Xpetra::UseEpetra && !transposeA && !transposeB) { - RCP epA = Xpetra::Helpers::Op2EpetraCrs(rcpFromRef(A)); - RCP epB = Xpetra::Helpers::Op2EpetraCrs(rcpFromRef(B)); - RCP epC = MLTwoMatrixMultiply(*epA, *epB, fos); - - RCP C = Convert_Epetra_CrsMatrix_ToXpetra_CrsMatrixWrap(epC); - if (doFillComplete) { - RCP fillParams = rcp(new Teuchos::ParameterList()); - fillParams->set("Optimize Storage", doOptimizeStorage); - C->fillComplete(B.getDomainMap(), A.getRangeMap(), fillParams); - } - - // Fill strided maps information - // This is necessary since the ML matrix matrix multiplication routine has no handling for this - // TODO: move this call to MLMultiply... - C->CreateView("stridedMaps", rcpFromRef(A), transposeA, rcpFromRef(B), transposeB); - - return C; - } -#endif // EPETRA + EPETRAEXT + ML - - // Default case: Xpetra Multiply - RCP C = C_in; - - if (C == Teuchos::null) { - double nnzPerRow = Teuchos::as(0); - -#if 0 - if (A.getDomainMap()->lib() == Xpetra::UseTpetra) { - // For now, follow what ML and Epetra do. - GO numRowsA = A.getGlobalNumRows(); - GO numRowsB = B.getGlobalNumRows(); - nnzPerRow = sqrt(Teuchos::as(A.getGlobalNumEntries())/numRowsA) + - sqrt(Teuchos::as(B.getGlobalNumEntries())/numRowsB) - 1; - nnzPerRow *= nnzPerRow; - double totalNnz = nnzPerRow * A.getGlobalNumRows() * 0.75 + 100; - double minNnz = Teuchos::as(1.2 * A.getGlobalNumEntries()); - if (totalNnz < minNnz) - totalNnz = minNnz; - nnzPerRow = totalNnz / A.getGlobalNumRows(); - - fos << "Matrix product nnz per row estimate = " << Teuchos::as(nnzPerRow) << std::endl; - } -#endif - - if (transposeA) - C = MatrixFactory::Build(A.getDomainMap(), Teuchos::as(nnzPerRow)); - else - C = MatrixFactory::Build(A.getRowMap(), Teuchos::as(nnzPerRow)); - - } else { - C->resumeFill(); // why this is not done inside of Tpetra MxM? - fos << "Reuse C pattern" << std::endl; - } - - Multiply(A, transposeA, B, transposeB, *C, doFillComplete, doOptimizeStorage, label, params); // call Multiply routine from above - - return C; - } - - /*! @brief Helper function to do matrix-matrix multiply - - Returns C = AB. - - @param A left matrix - @param transposeA if true, use the transpose of A - @param B right matrix - @param transposeB if true, use the transpose of B - @param callFillCompleteOnResult if true, the resulting matrix should be fillComplete'd - */ - static RCP Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - Teuchos::FancyOStream& fos, - bool callFillCompleteOnResult = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - return Multiply(A, transposeA, B, transposeB, Teuchos::null, fos, callFillCompleteOnResult, doOptimizeStorage, label, params); - } - -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - // Michael Gee's MLMultiply - static RCP MLTwoMatrixMultiply(const Epetra_CrsMatrix& epA, - const Epetra_CrsMatrix& epB, - Teuchos::FancyOStream& fos) { -#if defined(HAVE_XPETRA_ML_MMM) // Note: this is currently not supported - ML_Comm* comm; - ML_Comm_Create(&comm); - fos << "****** USING ML's MATRIX MATRIX MULTIPLY ******" << std::endl; -#ifdef HAVE_MPI - // ML_Comm uses MPI_COMM_WORLD, so try to use the same communicator as epA. - const Epetra_MpiComm* Mcomm = dynamic_cast(&(epA.Comm())); - if (Mcomm) - ML_Comm_Set_UsrComm(comm, Mcomm->GetMpiComm()); -#endif - // in order to use ML, there must be no indices missing from the matrix column maps. - EpetraExt::CrsMatrix_SolverMap Atransform; - EpetraExt::CrsMatrix_SolverMap Btransform; - const Epetra_CrsMatrix& A = Atransform(const_cast(epA)); - const Epetra_CrsMatrix& B = Btransform(const_cast(epB)); - - if (!A.Filled()) throw Exceptions::RuntimeError("A has to be FillCompleted"); - if (!B.Filled()) throw Exceptions::RuntimeError("B has to be FillCompleted"); - - // create ML operators from EpetraCrsMatrix - ML_Operator* ml_As = ML_Operator_Create(comm); - ML_Operator* ml_Bs = ML_Operator_Create(comm); - ML_Operator_WrapEpetraCrsMatrix(const_cast(&A), ml_As); // Should we test if the lightweight wrapper is actually used or if WrapEpetraCrsMatrix fall backs to the heavy one? - ML_Operator_WrapEpetraCrsMatrix(const_cast(&B), ml_Bs); - ML_Operator* ml_AtimesB = ML_Operator_Create(comm); - { - Teuchos::TimeMonitor tm(*Teuchos::TimeMonitor::getNewTimer("ML_2matmult kernel")); - ML_2matmult(ml_As, ml_Bs, ml_AtimesB, ML_CSR_MATRIX); // do NOT use ML_EpetraCRS_MATRIX!!! - } - ML_Operator_Destroy(&ml_As); - ML_Operator_Destroy(&ml_Bs); - - // For ml_AtimesB we have to reconstruct the column map in global indexing, - // The following is going down to the salt-mines of ML ... - // note: we use integers, since ML only works for Epetra... - int N_local = ml_AtimesB->invec_leng; - ML_CommInfoOP* getrow_comm = ml_AtimesB->getrow->pre_comm; - if (!getrow_comm) throw(Exceptions::RuntimeError("ML_Operator does not have a CommInfo")); - ML_Comm* comm_AB = ml_AtimesB->comm; // get comm object - if (N_local != B.DomainMap().NumMyElements()) - throw(Exceptions::RuntimeError("Mismatch in local row dimension between ML and Epetra")); - int N_rcvd = 0; - int N_send = 0; - int flag = 0; - for (int i = 0; i < getrow_comm->N_neighbors; i++) { - N_rcvd += (getrow_comm->neighbors)[i].N_rcv; - N_send += (getrow_comm->neighbors)[i].N_send; - if (((getrow_comm->neighbors)[i].N_rcv != 0) && - ((getrow_comm->neighbors)[i].rcv_list != NULL)) flag = 1; - } - // For some unknown reason, ML likes to have stuff one larger than - // neccessary... - std::vector dtemp(N_local + N_rcvd + 1); // "double" vector for comm function - std::vector cmap(N_local + N_rcvd + 1); // vector for gids - for (int i = 0; i < N_local; ++i) { - cmap[i] = B.DomainMap().GID(i); - dtemp[i] = (double)cmap[i]; - } - ML_cheap_exchange_bdry(&dtemp[0], getrow_comm, N_local, N_send, comm_AB); // do communication - if (flag) { // process received data - int count = N_local; - const int neighbors = getrow_comm->N_neighbors; - for (int i = 0; i < neighbors; i++) { - const int nrcv = getrow_comm->neighbors[i].N_rcv; - for (int j = 0; j < nrcv; j++) - cmap[getrow_comm->neighbors[i].rcv_list[j]] = (int)dtemp[count++]; - } - } else { - for (int i = 0; i < N_local + N_rcvd; ++i) - cmap[i] = (int)dtemp[i]; - } - dtemp.clear(); // free double array - - // we can now determine a matching column map for the result - Epetra_Map gcmap(-1, N_local + N_rcvd, &cmap[0], B.ColMap().IndexBase(), A.Comm()); - - int allocated = 0; - int rowlength; - double* val = NULL; - int* bindx = NULL; - - const int myrowlength = A.RowMap().NumMyElements(); - const Epetra_Map& rowmap = A.RowMap(); - - // Determine the maximum bandwith for the result matrix. - // replaces the old, very(!) memory-consuming guess: - // int guessnpr = A.MaxNumEntries()*B.MaxNumEntries(); - int educatedguess = 0; - for (int i = 0; i < myrowlength; ++i) { - // get local row - ML_get_matrix_row(ml_AtimesB, 1, &i, &allocated, &bindx, &val, &rowlength, 0); - if (rowlength > educatedguess) - educatedguess = rowlength; - } - - // allocate our result matrix and fill it - RCP result = rcp(new Epetra_CrsMatrix(::Copy, A.RangeMap(), gcmap, educatedguess, false)); - - std::vector gcid(educatedguess); - for (int i = 0; i < myrowlength; ++i) { - const int grid = rowmap.GID(i); - // get local row - ML_get_matrix_row(ml_AtimesB, 1, &i, &allocated, &bindx, &val, &rowlength, 0); - if (!rowlength) continue; - if ((int)gcid.size() < rowlength) gcid.resize(rowlength); - for (int j = 0; j < rowlength; ++j) { - gcid[j] = gcmap.GID(bindx[j]); - if (gcid[j] < 0) - throw Exceptions::RuntimeError("Error: cannot find gcid!"); - } - int err = result->InsertGlobalValues(grid, rowlength, val, &gcid[0]); - if (err != 0 && err != 1) { - std::ostringstream errStr; - errStr << "Epetra_CrsMatrix::InsertGlobalValues returned err=" << err; - throw Exceptions::RuntimeError(errStr.str()); - } - } - // free memory - if (bindx) ML_free(bindx); - if (val) ML_free(val); - ML_Operator_Destroy(&ml_AtimesB); - ML_Comm_Destroy(&comm); - - return result; -#else // no MUELU_ML - (void)epA; - (void)epB; - (void)fos; - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "No ML multiplication available. This feature is currently not supported by Xpetra."); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -#endif - } -#endif // ifdef HAVE_XPETRA_EPETRAEXT - - /*! @brief Helper function to do matrix-matrix multiply "in-place" - - Returns RCP to non-constant Xpetra::BlockedCrsMatrix. - - @param A left matrix - @param transposeA if true, use the transpose of A - @param B right matrix - @param transposeB if true, use the transpose of B - @param doOptimizeStorage if true, the resulting matrix should be fillComplete'd - */ - static RCP TwoMatrixMultiplyBlock(const BlockedCrsMatrix& A, bool transposeA, - const BlockedCrsMatrix& B, bool transposeB, - Teuchos::FancyOStream& fos, - bool doFillComplete = true, - bool doOptimizeStorage = true) { - TEUCHOS_TEST_FOR_EXCEPTION(transposeA || transposeB, Exceptions::RuntimeError, - "TwoMatrixMultiply for BlockedCrsMatrix not implemented for transposeA==true or transposeB==true"); - - // Preconditions - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - RCP rgmapextractor = A.getRangeMapExtractor(); - RCP domapextractor = B.getDomainMapExtractor(); - - RCP C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - - for (size_t i = 0; i < A.Rows(); ++i) { // loop over all block rows of A - for (size_t j = 0; j < B.Cols(); ++j) { // loop over all block columns of B - RCP Cij; - - for (size_t l = 0; l < B.Rows(); ++l) { // loop for calculating entry C_{ij} - RCP crmat1 = A.getMatrix(i, l); - RCP crmat2 = B.getMatrix(l, j); - - if (crmat1.is_null() || crmat2.is_null()) - continue; - - // try unwrapping 1x1 blocked matrix - { - auto unwrap1 = Teuchos::rcp_dynamic_cast(crmat1); - auto unwrap2 = Teuchos::rcp_dynamic_cast(crmat2); - - if (unwrap1.is_null() != unwrap2.is_null()) { - if (unwrap1 != Teuchos::null && unwrap1->Rows() == 1 && unwrap1->Cols() == 1) - crmat1 = unwrap1->getCrsMatrix(); - if (unwrap2 != Teuchos::null && unwrap2->Rows() == 1 && unwrap2->Cols() == 1) - crmat2 = unwrap2->getCrsMatrix(); - } - } - - RCP crop1 = Teuchos::rcp_dynamic_cast(crmat1); - RCP crop2 = Teuchos::rcp_dynamic_cast(crmat2); - TEUCHOS_TEST_FOR_EXCEPTION(crop1.is_null() != crop2.is_null(), Xpetra::Exceptions::RuntimeError, - "A and B must be either both (compatible) BlockedCrsMatrix objects or both CrsMatrixWrap objects."); - - // Forcibly compute the global constants if we don't have them (only works for real CrsMatrices, not nested blocks) - if (!crop1.is_null()) - Teuchos::rcp_const_cast(crmat1->getCrsGraph())->computeGlobalConstants(); - if (!crop2.is_null()) - Teuchos::rcp_const_cast(crmat2->getCrsGraph())->computeGlobalConstants(); - - TEUCHOS_TEST_FOR_EXCEPTION(!crmat1->haveGlobalConstants(), Exceptions::RuntimeError, - "crmat1 does not have global constants"); - TEUCHOS_TEST_FOR_EXCEPTION(!crmat2->haveGlobalConstants(), Exceptions::RuntimeError, - "crmat2 does not have global constants"); - - if (crmat1->getGlobalNumEntries() == 0 || crmat2->getGlobalNumEntries() == 0) - continue; - - // temporary matrix containing result of local block multiplication - RCP temp = Teuchos::null; - - if (crop1 != Teuchos::null && crop2 != Teuchos::null) - temp = Multiply(*crop1, false, *crop2, false, fos); - else { - RCP bop1 = Teuchos::rcp_dynamic_cast(crmat1); - RCP bop2 = Teuchos::rcp_dynamic_cast(crmat2); - TEUCHOS_TEST_FOR_EXCEPTION(bop1.is_null() == true, Xpetra::Exceptions::BadCast, "A is not a BlockedCrsMatrix. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop2.is_null() == true, Xpetra::Exceptions::BadCast, "B is not a BlockedCrsMatrix. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop1->Cols() != bop2->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << bop1->Cols() << " columns and B has " << bop2->Rows() << " rows. Matrices are not compatible! (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop1->getDomainMap()->isSameAs(*(bop2->getRangeMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of A is not the same as range map of B. Matrices are not compatible! (TwoMatrixMultiplyBlock)"); - - // recursive multiplication call - temp = TwoMatrixMultiplyBlock(*bop1, transposeA, *bop2, transposeB, fos, doFillComplete, doOptimizeStorage); - - RCP btemp = Teuchos::rcp_dynamic_cast(temp); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->Rows() != bop1->Rows(), Xpetra::Exceptions::RuntimeError, "Number of block rows of local blocked operator is " << btemp->Rows() << " but should be " << bop1->Rows() << ". (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->Cols() != bop2->Cols(), Xpetra::Exceptions::RuntimeError, "Number of block cols of local blocked operator is " << btemp->Cols() << " but should be " << bop2->Cols() << ". (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getRangeMapExtractor()->getFullMap()->isSameAs(*(bop1->getRangeMapExtractor()->getFullMap())) == false, Xpetra::Exceptions::RuntimeError, "Range map of local blocked operator should be same as first operator. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getDomainMapExtractor()->getFullMap()->isSameAs(*(bop2->getDomainMapExtractor()->getFullMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of local blocked operator should be same as second operator. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getRangeMapExtractor()->getThyraMode() != bop1->getRangeMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Thyra mode of local range map extractor incompatible with range map extractor of A (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getDomainMapExtractor()->getThyraMode() != bop2->getDomainMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Thyra mode of local domain map extractor incompatible with domain map extractor of B (TwoMatrixMultiplyBlock)"); - } - - TEUCHOS_TEST_FOR_EXCEPTION(temp->isFillComplete() == false, Xpetra::Exceptions::RuntimeError, "Local block is not filled. (TwoMatrixMultiplyBlock)"); - - RCP addRes = null; - if (Cij.is_null()) - Cij = temp; - else { - MatrixMatrix::TwoMatrixAdd(*temp, false, 1.0, *Cij, false, 1.0, addRes, fos); - Cij = addRes; - } - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(B.getDomainMap(j), A.getRangeMap(i)); - C->setMatrix(i, j, Cij); - } else { - C->setMatrix(i, j, Teuchos::null); - } - } - } - - if (doFillComplete) - C->fillComplete(); // call default fillComplete for BlockCrsMatrixWrap objects - - return C; - } // TwoMatrixMultiplyBlock - - /*! @brief Helper function to calculate B = alpha*A + beta*B. - - @param A left matrix operand - @param transposeA indicate whether to use transpose of A - @param alpha scalar multiplier for A - @param B right matrix operand - @param beta scalar multiplier for B - - @return sum in B. - - Note that B does not have to be fill-completed. - */ - static void TwoMatrixAdd(const Matrix& A, bool transposeA, SC alpha, Matrix& B, SC beta) { - TEUCHOS_TEST_FOR_EXCEPTION(!(A.getRowMap()->isSameAs(*B.getRowMap())), Exceptions::Incompatible, - "TwoMatrixAdd: matrix row maps are not the same."); - - if (A.getRowMap()->lib() == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const Epetra_CrsMatrix& epA = Xpetra::Helpers::Op2EpetraCrs(A); - Epetra_CrsMatrix& epB = Xpetra::Helpers::Op2NonConstEpetraCrs(B); - - // FIXME is there a bug if beta=0? - int rv = EpetraExt::MatrixMatrix::Add(epA, transposeA, alpha, epB, beta); - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMatrix::Add return value " + Teuchos::toString(rv)); - std::ostringstream buf; -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with EpetraExt."); -#endif - } else if (A.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO=int enabled.")); -#else - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2NonConstTpetraCrs(B); - - Tpetra::MatrixMatrix::Add(tpA, transposeA, alpha, tpB, beta); -#endif -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with Tpetra."); -#endif - } - } // MatrixMatrix::TwoMatrixAdd() - - /*! @brief Helper function to calculate C = alpha*A + beta*B. - - @param A left matrix operand - @param transposeA indicate whether to use transpose of A - @param alpha scalar multiplier for A, defaults to 1.0 - @param B right matrix operand - @param transposeB indicate whether to use transpose of B - @param beta scalar multiplier for B, defaults to 1.0 - @param C resulting sum - @param fos output stream for printing to screen - @param AHasFixedNnzPerRow - - It is up to the caller to ensure that the resulting matrix sum is fillComplete'd. - */ - static void TwoMatrixAdd(const Matrix& A, bool transposeA, const SC& alpha, - const Matrix& B, bool transposeB, const SC& beta, - RCP& C, Teuchos::FancyOStream& fos, bool AHasFixedNnzPerRow = false) { - using helpers = Xpetra::Helpers; - RCP rcpA = Teuchos::rcpFromRef(A); - RCP rcpB = Teuchos::rcpFromRef(B); - RCP rcpBopA = Teuchos::rcp_dynamic_cast(rcpA); - RCP rcpBopB = Teuchos::rcp_dynamic_cast(rcpB); - - if (rcpBopA == Teuchos::null && rcpBopB == Teuchos::null) { - if (!(A.getRowMap()->isSameAs(*(B.getRowMap())))) - throw Exceptions::Incompatible("TwoMatrixAdd: matrix row maps are not the same."); - - auto lib = A.getRowMap()->lib(); - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const Epetra_CrsMatrix& epA = helpers::Op2EpetraCrs(A); - const Epetra_CrsMatrix& epB = helpers::Op2EpetraCrs(B); - if (C.is_null()) { - size_t maxNzInA = 0; - size_t maxNzInB = 0; - size_t numLocalRows = 0; - if (A.isFillComplete() && B.isFillComplete()) { - maxNzInA = A.getLocalMaxNumRowEntries(); - maxNzInB = B.getLocalMaxNumRowEntries(); - numLocalRows = A.getLocalNumRows(); - } - - if (maxNzInA == 1 || maxNzInB == 1 || AHasFixedNnzPerRow) { - // first check if either A or B has at most 1 nonzero per row - // the case of both having at most 1 nz per row is handled by the ``else'' - Teuchos::ArrayRCP exactNnzPerRow(numLocalRows); - - if ((maxNzInA == 1 && maxNzInB > 1) || AHasFixedNnzPerRow) { - for (size_t i = 0; i < numLocalRows; ++i) - exactNnzPerRow[i] = B.getNumEntriesInLocalRow(Teuchos::as(i)) + maxNzInA; - - } else { - for (size_t i = 0; i < numLocalRows; ++i) - exactNnzPerRow[i] = A.getNumEntriesInLocalRow(Teuchos::as(i)) + maxNzInB; - } - - fos << "MatrixMatrix::TwoMatrixAdd : special case detected (one matrix has a fixed nnz per row)" - << ", using static profiling" << std::endl; - C = rcp(new Xpetra::CrsMatrixWrap(A.getRowMap(), exactNnzPerRow)); - - } else { - // general case - LO maxPossibleNNZ = A.getLocalMaxNumRowEntries() + B.getLocalMaxNumRowEntries(); - C = rcp(new Xpetra::CrsMatrixWrap(A.getRowMap(), maxPossibleNNZ)); - } - if (transposeB) - fos << "MatrixMatrix::TwoMatrixAdd : ** WARNING ** estimate could be badly wrong because second summand is transposed" << std::endl; - } - RCP epC = helpers::Op2NonConstEpetraCrs(C); - Epetra_CrsMatrix* ref2epC = &*epC; // to avoid a compiler error... - - // FIXME is there a bug if beta=0? - int rv = EpetraExt::MatrixMatrix::Add(epA, transposeA, alpha, epB, transposeB, beta, ref2epC); - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMatrix::Add return value of " + Teuchos::toString(rv)); -#else - throw Exceptions::RuntimeError("MueLu must be compile with EpetraExt."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO=int enabled.")); -#else - using tcrs_matrix_type = Tpetra::CrsMatrix; - const tcrs_matrix_type& tpA = helpers::Op2TpetraCrs(A); - const tcrs_matrix_type& tpB = helpers::Op2TpetraCrs(B); - C = helpers::tpetraAdd(tpA, transposeA, alpha, tpB, transposeB, beta); -#endif -#else - throw Exceptions::RuntimeError("Xpetra must be compile with Tpetra."); -#endif - } - - ///////////////////////// EXPERIMENTAL - if (A.IsView("stridedMaps")) C->CreateView("stridedMaps", rcpFromRef(A)); - if (B.IsView("stridedMaps")) C->CreateView("stridedMaps", rcpFromRef(B)); - ///////////////////////// EXPERIMENTAL - } - // the first matrix is of type CrsMatrixWrap, the second is a blocked operator - else if (rcpBopA == Teuchos::null && rcpBopB != Teuchos::null) { - RCP rgmapextractor = rcpBopB->getRangeMapExtractor(); - RCP domapextractor = rcpBopB->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - size_t i = 0; - for (size_t j = 0; j < rcpBopB->Cols(); ++j) { // loop over all block columns of B - RCP Cij = Teuchos::null; - if (rcpA != Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - // recursive call - TwoMatrixAdd(*rcpA, transposeA, alpha, - *(rcpBopB->getMatrix(i, j)), transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpA == Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - Cij = rcpBopB->getMatrix(i, j); - } else if (rcpA != Teuchos::null && - rcpBopB->getMatrix(i, j) == Teuchos::null) { - Cij = Teuchos::rcp_const_cast(rcpA); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over columns j - } - // the second matrix is of type CrsMatrixWrap, the first is a blocked operator - else if (rcpBopA != Teuchos::null && rcpBopB == Teuchos::null) { - RCP rgmapextractor = rcpBopA->getRangeMapExtractor(); - RCP domapextractor = rcpBopA->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - size_t j = 0; - for (size_t i = 0; i < rcpBopA->Rows(); ++i) { // loop over all block rows of A - RCP Cij = Teuchos::null; - if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpB != Teuchos::null) { - // recursive call - TwoMatrixAdd(*(rcpBopA->getMatrix(i, j)), transposeA, alpha, - *rcpB, transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpBopA->getMatrix(i, j) == Teuchos::null && - rcpB != Teuchos::null) { - Cij = Teuchos::rcp_const_cast(rcpB); - } else if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpB == Teuchos::null) { - Cij = rcpBopA->getMatrix(i, j); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over rows i - } else { - // This is the version for blocked matrices - - // check the compatibility of the blocked operators - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA.is_null() == true, Xpetra::Exceptions::BadCast, "A is not a BlockedCrsMatrix. (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopB.is_null() == true, Xpetra::Exceptions::BadCast, "B is not a BlockedCrsMatrix. (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->Rows() != rcpBopB->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << rcpBopA->Rows() << " rows and B has " << rcpBopA->Rows() << " rows. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->Rows() != rcpBopB->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << rcpBopA->Cols() << " cols and B has " << rcpBopA->Cols() << " cols. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getRangeMap()->isSameAs(*(rcpBopB->getRangeMap())) == false, Xpetra::Exceptions::RuntimeError, "Range map of A is not the same as range map of B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getDomainMap()->isSameAs(*(rcpBopB->getDomainMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of A is not the same as domain map of B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getRangeMapExtractor()->getThyraMode() != rcpBopB->getRangeMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Different Thyra/Xpetra style gids in RangeMapExtractor of A and B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getDomainMapExtractor()->getThyraMode() != rcpBopB->getDomainMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Different Thyra/Xpetra style gids in DomainMapExtractor of A and B. Matrices are not compatible! (TwoMatrixAdd)"); - - RCP rgmapextractor = rcpBopA->getRangeMapExtractor(); - RCP domapextractor = rcpBopB->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - for (size_t i = 0; i < rcpBopA->Rows(); ++i) { // loop over all block rows of A - for (size_t j = 0; j < rcpBopB->Cols(); ++j) { // loop over all block columns of B - - RCP Cij = Teuchos::null; - if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - // recursive call - - TwoMatrixAdd(*(rcpBopA->getMatrix(i, j)), transposeA, alpha, - *(rcpBopB->getMatrix(i, j)), transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpBopA->getMatrix(i, j) == Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - Cij = rcpBopB->getMatrix(i, j); - } else if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpBopB->getMatrix(i, j) == Teuchos::null) { - Cij = rcpBopA->getMatrix(i, j); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - // Cij->fillComplete(rcpBopA->getDomainMap(j), rcpBopA->getRangeMap(i)); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over columns j - } // loop over rows i - - } // end blocked recursive algorithm - } // MatrixMatrix::TwoMatrixAdd() -}; // end specialization on SC=double, GO=int and NO=EpetraNode - -// specialization MatrixMatrix for SC=double, GO=long long and NO=EptraNode -template <> -class MatrixMatrix { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; -#include "Xpetra_UseShortNames.hpp" - - public: - /** Given CrsMatrix objects A, B and C, form the product C = A*B. - In a parallel setting, A and B need not have matching distributions, - but C needs to have the same row-map as A (if transposeA is false). - At this time C=AT*B and C=A*BT are known to not work. However, - C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011 - - @param A Input, must already have had 'FillComplete()' called. - @param transposeA Input, whether to use transpose of matrix A. - @param B Input, must already have had 'FillComplete()' called. - @param transposeB Input, whether to use transpose of matrix B. - @param C Result. On entry to this method, it doesn't matter whether - FillComplete() has already been called on C or not. If it has, - then C's graph must already contain all nonzero locations that - will be produced when forming the product A*B. On exit, - C.FillComplete() will have been called, unless the last argument - to this function is specified to be false. - @param call_FillComplete_on_result Optional argument, defaults to true. - Power users may specify this argument to be false if they *DON'T* - want this function to call C.FillComplete. (It is often useful - to allow this function to call C.FillComplete, in cases where - one or both of the input matrices are rectangular and it is not - trivial to know which maps to use for the domain- and range-maps.) - -*/ - static void Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - Matrix& C, - bool call_FillComplete_on_result = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - using helpers = Xpetra::Helpers; - TEUCHOS_TEST_FOR_EXCEPTION(transposeA == false && C.getRowMap()->isSameAs(*A.getRowMap()) == false, - Xpetra::Exceptions::RuntimeError, "XpetraExt::MatrixMatrix::Multiply: row map of C is not same as row map of A"); - TEUCHOS_TEST_FOR_EXCEPTION(transposeA == true && C.getRowMap()->isSameAs(*A.getDomainMap()) == false, - Xpetra::Exceptions::RuntimeError, "XpetraExt::MatrixMatrix::Multiply: row map of C is not same as domain map of A"); - - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Xpetra::Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Xpetra::Exceptions::RuntimeError, "B is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - helpers::epetraExtMult(A, transposeA, B, transposeB, C, haveMultiplyDoFillComplete); -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Multiply requires EpetraExt to be compiled.")); -#endif - } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra ETI enabled.")); -#else - if (helpers::isTpetraCrs(A) && helpers::isTpetraCrs(B) && helpers::isTpetraCrs(C)) { - // All matrices are Crs - const Tpetra::CrsMatrix& tpA = helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpB = helpers::Op2TpetraCrs(B); - Tpetra::CrsMatrix& tpC = helpers::Op2NonConstTpetraCrs(C); - - // 18Feb2013 JJH I'm reenabling the code that allows the matrix matrix multiply to do the fillComplete. - // Previously, Tpetra's matrix matrix multiply did not support fillComplete. - Tpetra::MatrixMatrix::Multiply(tpA, transposeA, tpB, transposeB, tpC, haveMultiplyDoFillComplete, label, params); - } else if (helpers::isTpetraBlockCrs(A) && helpers::isTpetraBlockCrs(B)) { - // All matrices are BlockCrs (except maybe Ac) - // FIXME: For the moment we're just going to clobber the innards of Ac, so no reuse. Once we have a reuse kernel, - // we'll need to think about refactoring BlockCrs so we can do something smarter here. - - if (!A.getRowMap()->getComm()->getRank()) - std::cout << "WARNING: Using inefficient BlockCrs Multiply Placeholder" << std::endl; - - const Tpetra::BlockCrsMatrix& tpA = Xpetra::Helpers::Op2TpetraBlockCrs(A); - const Tpetra::BlockCrsMatrix& tpB = Xpetra::Helpers::Op2TpetraBlockCrs(B); - using CRS = Tpetra::CrsMatrix; - RCP Acrs = Tpetra::convertToCrsMatrix(tpA); - RCP Bcrs = Tpetra::convertToCrsMatrix(tpB); - - // We need the global constants to do the copy back to BlockCrs - RCP new_params; - if (!params.is_null()) { - new_params = rcp(new Teuchos::ParameterList(*params)); - new_params->set("compute global constants", true); - } - - // FIXME: The lines below only works because we're assuming Ac is Point - RCP tempAc = Teuchos::rcp(new CRS(Acrs->getRowMap(), 0)); - Tpetra::MatrixMatrix::Multiply(*Acrs, transposeA, *Bcrs, transposeB, *tempAc, haveMultiplyDoFillComplete, label, new_params); - - // Temporary output matrix - RCP > Ac_t = Tpetra::convertToBlockCrsMatrix(*tempAc, A.GetStorageBlockSize()); - RCP > Ac_x = Teuchos::rcp(new Xpetra::TpetraBlockCrsMatrix(Ac_t)); - RCP > Ac_p = Ac_x; - - // We can now cheat and replace the innards of Ac - RCP > Ac_w = Teuchos::rcp_dynamic_cast >(Teuchos::rcpFromRef(C)); - Ac_w->replaceCrsMatrix(Ac_p); - } else { - // Mix and match - TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); - } - -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - } - - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP fillParams = rcp(new Teuchos::ParameterList()); - fillParams->set("Optimize Storage", doOptimizeStorage); - C.fillComplete((transposeB) ? B.getRangeMap() : B.getDomainMap(), - (transposeA) ? A.getDomainMap() : A.getRangeMap(), - fillParams); - } - - // transfer striding information - RCP rcpA = Teuchos::rcp_const_cast(Teuchos::rcpFromRef(A)); - RCP rcpB = Teuchos::rcp_const_cast(Teuchos::rcpFromRef(B)); - C.CreateView("stridedMaps", rcpA, transposeA, rcpB, transposeB); // TODO use references instead of RCPs - } // end Multiply - - /** - @brief Helper function to do matrix-matrix multiply - - Given CrsMatrix objects A, B and C, form the product C = A*B. - In a parallel setting, A and B need not have matching distributions, - but C needs to have the same row-map as A (if transposeA is false). - At this time C=AT*B and C=A*BT are known to not work. However, - C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011 - - @param A Input, must already have had 'FillComplete()' called. - @param transposeA Input, whether to use transpose of matrix A. - @param B Input, must already have had 'FillComplete()' called. - @param transposeB Input, whether to use transpose of matrix B. - @param C Result. If Teuchos::null, a new CrsMatrix is created with optimal number of nnz per row. - @param call_FillComplete_on_result Optional argument, defaults to true. - Power users may specify this argument to be false if they *DON'T* - want this function to call C.FillComplete. (It is often useful - to allow this function to call C.FillComplete, in cases where - one or both of the input matrices are rectangular and it is not - trivial to know which maps to use for the domain- and range-maps.) - -*/ - static RCP Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - RCP C_in, - Teuchos::FancyOStream& fos, - bool doFillComplete = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - // Default case: Xpetra Multiply - RCP C = C_in; - - if (C == Teuchos::null) { - double nnzPerRow = Teuchos::as(0); - -#if 0 - if (A.getDomainMap()->lib() == Xpetra::UseTpetra) { - // For now, follow what ML and Epetra do. - GO numRowsA = A.getGlobalNumRows(); - GO numRowsB = B.getGlobalNumRows(); - nnzPerRow = sqrt(Teuchos::as(A.getGlobalNumEntries())/numRowsA) + - sqrt(Teuchos::as(B.getGlobalNumEntries())/numRowsB) - 1; - nnzPerRow *= nnzPerRow; - double totalNnz = nnzPerRow * A.getGlobalNumRows() * 0.75 + 100; - double minNnz = Teuchos::as(1.2 * A.getGlobalNumEntries()); - if (totalNnz < minNnz) - totalNnz = minNnz; - nnzPerRow = totalNnz / A.getGlobalNumRows(); - - fos << "Matrix product nnz per row estimate = " << Teuchos::as(nnzPerRow) << std::endl; - } -#endif - if (transposeA) - C = MatrixFactory::Build(A.getDomainMap(), Teuchos::as(nnzPerRow)); - else - C = MatrixFactory::Build(A.getRowMap(), Teuchos::as(nnzPerRow)); - - } else { - C->resumeFill(); // why this is not done inside of Tpetra MxM? - fos << "Reuse C pattern" << std::endl; - } - - Multiply(A, transposeA, B, transposeB, *C, doFillComplete, doOptimizeStorage, label, params); // call Multiply routine from above - - return C; - } - - /*! @brief Helper function to do matrix-matrix multiply - - Returns C = AB. - - @param A left matrix - @param transposeA if true, use the transpose of A - @param B right matrix - @param transposeB if true, use the transpose of B - @param callFillCompleteOnResult if true, the resulting matrix should be fillComplete'd - */ - static RCP Multiply(const Matrix& A, bool transposeA, - const Matrix& B, bool transposeB, - Teuchos::FancyOStream& fos, - bool callFillCompleteOnResult = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - return Multiply(A, transposeA, B, transposeB, Teuchos::null, fos, callFillCompleteOnResult, doOptimizeStorage, label, params); - } - -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - // Michael Gee's MLMultiply - static RCP MLTwoMatrixMultiply(const Epetra_CrsMatrix& /* epA */, - const Epetra_CrsMatrix& /* epB */, - Teuchos::FancyOStream& /* fos */) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "No ML multiplication available. This feature is currently not supported by Xpetra."); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); - } -#endif // ifdef HAVE_XPETRA_EPETRAEXT - - /*! @brief Helper function to do matrix-matrix multiply "in-place" - - Returns RCP to non-constant Xpetra::BlockedCrsMatrix. - - @param A left matrix - @param transposeA if true, use the transpose of A - @param B right matrix - @param transposeB if true, use the transpose of B - @param doOptimizeStorage if true, the resulting matrix should be fillComplete'd - */ - static RCP TwoMatrixMultiplyBlock(const BlockedCrsMatrix& A, bool transposeA, - const BlockedCrsMatrix& B, bool transposeB, - Teuchos::FancyOStream& fos, - bool doFillComplete = true, - bool doOptimizeStorage = true) { - TEUCHOS_TEST_FOR_EXCEPTION(transposeA || transposeB, Exceptions::RuntimeError, - "TwoMatrixMultiply for BlockedCrsMatrix not implemented for transposeA==true or transposeB==true"); - - // Preconditions - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!B.isFillComplete(), Exceptions::RuntimeError, "B is not fill-completed"); - - RCP rgmapextractor = A.getRangeMapExtractor(); - RCP domapextractor = B.getDomainMapExtractor(); - - RCP C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - - for (size_t i = 0; i < A.Rows(); ++i) { // loop over all block rows of A - for (size_t j = 0; j < B.Cols(); ++j) { // loop over all block columns of B - RCP Cij; - - for (size_t l = 0; l < B.Rows(); ++l) { // loop for calculating entry C_{ij} - RCP crmat1 = A.getMatrix(i, l); - RCP crmat2 = B.getMatrix(l, j); - - if (crmat1.is_null() || crmat2.is_null()) - continue; - - // try unwrapping 1x1 blocked matrix - { - auto unwrap1 = Teuchos::rcp_dynamic_cast(crmat1); - auto unwrap2 = Teuchos::rcp_dynamic_cast(crmat2); - - if (unwrap1.is_null() != unwrap2.is_null()) { - if (unwrap1 != Teuchos::null && unwrap1->Rows() == 1 && unwrap1->Cols() == 1) - crmat1 = unwrap1->getCrsMatrix(); - if (unwrap2 != Teuchos::null && unwrap2->Rows() == 1 && unwrap2->Cols() == 1) - crmat2 = unwrap2->getCrsMatrix(); - } - } - - RCP crop1 = Teuchos::rcp_dynamic_cast(crmat1); - RCP crop2 = Teuchos::rcp_dynamic_cast(crmat2); - TEUCHOS_TEST_FOR_EXCEPTION(crop1.is_null() != crop2.is_null(), Xpetra::Exceptions::RuntimeError, - "A and B must be either both (compatible) BlockedCrsMatrix objects or both CrsMatrixWrap objects."); - - // Forcibly compute the global constants if we don't have them (only works for real CrsMatrices, not nested blocks) - if (!crop1.is_null()) - Teuchos::rcp_const_cast(crmat1->getCrsGraph())->computeGlobalConstants(); - if (!crop2.is_null()) - Teuchos::rcp_const_cast(crmat2->getCrsGraph())->computeGlobalConstants(); - - TEUCHOS_TEST_FOR_EXCEPTION(!crmat1->haveGlobalConstants(), Exceptions::RuntimeError, - "crmat1 does not have global constants"); - TEUCHOS_TEST_FOR_EXCEPTION(!crmat2->haveGlobalConstants(), Exceptions::RuntimeError, - "crmat2 does not have global constants"); - - if (crmat1->getGlobalNumEntries() == 0 || crmat2->getGlobalNumEntries() == 0) - continue; - - // temporary matrix containing result of local block multiplication - RCP temp = Teuchos::null; - - if (crop1 != Teuchos::null && crop2 != Teuchos::null) - temp = Multiply(*crop1, false, *crop2, false, fos); - else { - RCP bop1 = Teuchos::rcp_dynamic_cast(crmat1); - RCP bop2 = Teuchos::rcp_dynamic_cast(crmat2); - TEUCHOS_TEST_FOR_EXCEPTION(bop1.is_null() == true, Xpetra::Exceptions::BadCast, "A is not a BlockedCrsMatrix. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop2.is_null() == true, Xpetra::Exceptions::BadCast, "B is not a BlockedCrsMatrix. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop1->Cols() != bop2->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << bop1->Cols() << " columns and B has " << bop2->Rows() << " rows. Matrices are not compatible! (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(bop1->getDomainMap()->isSameAs(*(bop2->getRangeMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of A is not the same as range map of B. Matrices are not compatible! (TwoMatrixMultiplyBlock)"); - - // recursive multiplication call - temp = TwoMatrixMultiplyBlock(*bop1, transposeA, *bop2, transposeB, fos, doFillComplete, doOptimizeStorage); - - RCP btemp = Teuchos::rcp_dynamic_cast(temp); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->Rows() != bop1->Rows(), Xpetra::Exceptions::RuntimeError, "Number of block rows of local blocked operator is " << btemp->Rows() << " but should be " << bop1->Rows() << ". (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->Cols() != bop2->Cols(), Xpetra::Exceptions::RuntimeError, "Number of block cols of local blocked operator is " << btemp->Cols() << " but should be " << bop2->Cols() << ". (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getRangeMapExtractor()->getFullMap()->isSameAs(*(bop1->getRangeMapExtractor()->getFullMap())) == false, Xpetra::Exceptions::RuntimeError, "Range map of local blocked operator should be same as first operator. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getDomainMapExtractor()->getFullMap()->isSameAs(*(bop2->getDomainMapExtractor()->getFullMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of local blocked operator should be same as second operator. (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getRangeMapExtractor()->getThyraMode() != bop1->getRangeMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Thyra mode of local range map extractor incompatible with range map extractor of A (TwoMatrixMultiplyBlock)"); - TEUCHOS_TEST_FOR_EXCEPTION(btemp->getDomainMapExtractor()->getThyraMode() != bop2->getDomainMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Thyra mode of local domain map extractor incompatible with domain map extractor of B (TwoMatrixMultiplyBlock)"); - } - - TEUCHOS_TEST_FOR_EXCEPTION(temp->isFillComplete() == false, Xpetra::Exceptions::RuntimeError, "Local block is not filled. (TwoMatrixMultiplyBlock)"); - - RCP addRes = null; - if (Cij.is_null()) - Cij = temp; - else { - MatrixMatrix::TwoMatrixAdd(*temp, false, 1.0, *Cij, false, 1.0, addRes, fos); - Cij = addRes; - } - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(B.getDomainMap(j), A.getRangeMap(i)); - C->setMatrix(i, j, Cij); - } else { - C->setMatrix(i, j, Teuchos::null); - } - } - } - - if (doFillComplete) - C->fillComplete(); // call default fillComplete for BlockCrsMatrixWrap objects - - return C; - } // TwoMatrixMultiplyBlock - - /*! @brief Helper function to calculate B = alpha*A + beta*B. - - @param A left matrix operand - @param transposeA indicate whether to use transpose of A - @param alpha scalar multiplier for A - @param B right matrix operand - @param beta scalar multiplier for B - - @return sum in B. - - Note that B does not have to be fill-completed. - */ - static void TwoMatrixAdd(const Matrix& A, bool transposeA, SC alpha, Matrix& B, SC beta) { - TEUCHOS_TEST_FOR_EXCEPTION(!(A.getRowMap()->isSameAs(*(B.getRowMap()))), Exceptions::Incompatible, - "TwoMatrixAdd: matrix row maps are not the same."); - - if (A.getRowMap()->lib() == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const Epetra_CrsMatrix& epA = Xpetra::Helpers::Op2EpetraCrs(A); - Epetra_CrsMatrix& epB = Xpetra::Helpers::Op2NonConstEpetraCrs(B); - - // FIXME is there a bug if beta=0? - int rv = EpetraExt::MatrixMatrix::Add(epA, transposeA, alpha, epB, beta); - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMatrix::Add return value " + Teuchos::toString(rv)); - std::ostringstream buf; -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with EpetraExt."); -#endif - } else if (A.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO=long long enabled.")); -#else - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2NonConstTpetraCrs(B); - - Tpetra::MatrixMatrix::Add(tpA, transposeA, alpha, tpB, beta); -#endif -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with Tpetra."); -#endif - } - } // MatrixMatrix::TwoMatrixAdd() - - /*! @brief Helper function to calculate C = alpha*A + beta*B. - - @param A left matrix operand - @param transposeA indicate whether to use transpose of A - @param alpha scalar multiplier for A, defaults to 1.0 - @param B right matrix operand - @param transposeB indicate whether to use transpose of B - @param beta scalar multiplier for B, defaults to 1.0 - @param C resulting sum - @param fos output stream for printing to screen - @param AHasFixedNnzPerRow - - It is up to the caller to ensure that the resulting matrix sum is fillComplete'd. - */ - static void TwoMatrixAdd(const Matrix& A, bool transposeA, const SC& alpha, - const Matrix& B, bool transposeB, const SC& beta, - RCP& C, Teuchos::FancyOStream& fos, bool AHasFixedNnzPerRow = false) { - RCP rcpA = Teuchos::rcpFromRef(A); - RCP rcpB = Teuchos::rcpFromRef(B); - RCP rcpBopA = Teuchos::rcp_dynamic_cast(rcpA); - RCP rcpBopB = Teuchos::rcp_dynamic_cast(rcpB); - - if (rcpBopA == Teuchos::null && rcpBopB == Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPTION(!(A.getRowMap()->isSameAs(*(B.getRowMap()))), Exceptions::Incompatible, - "TwoMatrixAdd: matrix row maps are not the same."); - auto lib = A.getRowMap()->lib(); - if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - const Epetra_CrsMatrix& epA = Xpetra::Helpers::Op2EpetraCrs(A); - const Epetra_CrsMatrix& epB = Xpetra::Helpers::Op2EpetraCrs(B); - if (C.is_null()) { - size_t maxNzInA = 0; - size_t maxNzInB = 0; - size_t numLocalRows = 0; - if (A.isFillComplete() && B.isFillComplete()) { - maxNzInA = A.getLocalMaxNumRowEntries(); - maxNzInB = B.getLocalMaxNumRowEntries(); - numLocalRows = A.getLocalNumRows(); - } - - if (maxNzInA == 1 || maxNzInB == 1 || AHasFixedNnzPerRow) { - // first check if either A or B has at most 1 nonzero per row - // the case of both having at most 1 nz per row is handled by the ``else'' - Teuchos::ArrayRCP exactNnzPerRow(numLocalRows); - - if ((maxNzInA == 1 && maxNzInB > 1) || AHasFixedNnzPerRow) { - for (size_t i = 0; i < numLocalRows; ++i) - exactNnzPerRow[i] = B.getNumEntriesInLocalRow(Teuchos::as(i)) + maxNzInA; - - } else { - for (size_t i = 0; i < numLocalRows; ++i) - exactNnzPerRow[i] = A.getNumEntriesInLocalRow(Teuchos::as(i)) + maxNzInB; - } - - fos << "MatrixMatrix::TwoMatrixAdd : special case detected (one matrix has a fixed nnz per row)" - << ", using static profiling" << std::endl; - C = rcp(new Xpetra::CrsMatrixWrap(A.getRowMap(), exactNnzPerRow)); - - } else { - // general case - LO maxPossibleNNZ = A.getLocalMaxNumRowEntries() + B.getLocalMaxNumRowEntries(); - C = rcp(new Xpetra::CrsMatrixWrap(A.getRowMap(), maxPossibleNNZ)); - } - if (transposeB) - fos << "MatrixMatrix::TwoMatrixAdd : ** WARNING ** estimate could be badly wrong because second summand is transposed" << std::endl; - } - RCP epC = Xpetra::Helpers::Op2NonConstEpetraCrs(C); - Epetra_CrsMatrix* ref2epC = &*epC; // to avoid a compiler error... - - // FIXME is there a bug if beta=0? - int rv = EpetraExt::MatrixMatrix::Add(epA, transposeA, alpha, epB, transposeB, beta, ref2epC); - - if (rv != 0) - throw Exceptions::RuntimeError("EpetraExt::MatrixMatrix::Add return value of " + Teuchos::toString(rv)); -#else - throw Exceptions::RuntimeError("MueLu must be compile with EpetraExt."); -#endif - } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra GO=long long enabled.")); -#else - using helpers = Xpetra::Helpers; - using tcrs_matrix_type = Tpetra::CrsMatrix; - const tcrs_matrix_type& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - const tcrs_matrix_type& tpB = Xpetra::Helpers::Op2TpetraCrs(B); - C = helpers::tpetraAdd(tpA, transposeA, alpha, tpB, transposeB, beta); -#endif -#else - throw Exceptions::RuntimeError("Xpetra must be compile with Tpetra."); -#endif - } - - ///////////////////////// EXPERIMENTAL - if (A.IsView("stridedMaps")) C->CreateView("stridedMaps", rcpFromRef(A)); - if (B.IsView("stridedMaps")) C->CreateView("stridedMaps", rcpFromRef(B)); - ///////////////////////// EXPERIMENTAL - } - // the first matrix is of type CrsMatrixWrap, the second is a blocked operator - else if (rcpBopA == Teuchos::null && rcpBopB != Teuchos::null) { - RCP rgmapextractor = rcpBopB->getRangeMapExtractor(); - RCP domapextractor = rcpBopB->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - size_t i = 0; - for (size_t j = 0; j < rcpBopB->Cols(); ++j) { // loop over all block columns of B - RCP Cij = Teuchos::null; - if (rcpA != Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - // recursive call - TwoMatrixAdd(*rcpA, transposeA, alpha, - *(rcpBopB->getMatrix(i, j)), transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpA == Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - Cij = rcpBopB->getMatrix(i, j); - } else if (rcpA != Teuchos::null && - rcpBopB->getMatrix(i, j) == Teuchos::null) { - Cij = Teuchos::rcp_const_cast(rcpA); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over columns j - } - // the second matrix is of type CrsMatrixWrap, the first is a blocked operator - else if (rcpBopA != Teuchos::null && rcpBopB == Teuchos::null) { - RCP rgmapextractor = rcpBopA->getRangeMapExtractor(); - RCP domapextractor = rcpBopA->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - size_t j = 0; - for (size_t i = 0; i < rcpBopA->Rows(); ++i) { // loop over all block rows of A - RCP Cij = Teuchos::null; - if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpB != Teuchos::null) { - // recursive call - TwoMatrixAdd(*(rcpBopA->getMatrix(i, j)), transposeA, alpha, - *rcpB, transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpBopA->getMatrix(i, j) == Teuchos::null && - rcpB != Teuchos::null) { - Cij = Teuchos::rcp_const_cast(rcpB); - } else if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpB == Teuchos::null) { - Cij = rcpBopA->getMatrix(i, j); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over rows i - } else { - // This is the version for blocked matrices - - // check the compatibility of the blocked operators - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA.is_null() == true, Xpetra::Exceptions::BadCast, "A is not a BlockedCrsMatrix. (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopB.is_null() == true, Xpetra::Exceptions::BadCast, "B is not a BlockedCrsMatrix. (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->Rows() != rcpBopB->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << rcpBopA->Rows() << " rows and B has " << rcpBopA->Rows() << " rows. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->Rows() != rcpBopB->Rows(), Xpetra::Exceptions::RuntimeError, "A has " << rcpBopA->Cols() << " cols and B has " << rcpBopA->Cols() << " cols. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getRangeMap()->isSameAs(*(rcpBopB->getRangeMap())) == false, Xpetra::Exceptions::RuntimeError, "Range map of A is not the same as range map of B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getDomainMap()->isSameAs(*(rcpBopB->getDomainMap())) == false, Xpetra::Exceptions::RuntimeError, "Domain map of A is not the same as domain map of B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getRangeMapExtractor()->getThyraMode() != rcpBopB->getRangeMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Different Thyra/Xpetra style gids in RangeMapExtractor of A and B. Matrices are not compatible! (TwoMatrixAdd)"); - TEUCHOS_TEST_FOR_EXCEPTION(rcpBopA->getDomainMapExtractor()->getThyraMode() != rcpBopB->getDomainMapExtractor()->getThyraMode(), Xpetra::Exceptions::RuntimeError, "Different Thyra/Xpetra style gids in DomainMapExtractor of A and B. Matrices are not compatible! (TwoMatrixAdd)"); - - RCP rgmapextractor = rcpBopA->getRangeMapExtractor(); - RCP domapextractor = rcpBopB->getDomainMapExtractor(); - - C = rcp(new BlockedCrsMatrix(rgmapextractor, domapextractor, 33 /* TODO fix me */)); - RCP bC = Teuchos::rcp_dynamic_cast(C); - - for (size_t i = 0; i < rcpBopA->Rows(); ++i) { // loop over all block rows of A - for (size_t j = 0; j < rcpBopB->Cols(); ++j) { // loop over all block columns of B - - RCP Cij = Teuchos::null; - if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - // recursive call - - TwoMatrixAdd(*(rcpBopA->getMatrix(i, j)), transposeA, alpha, - *(rcpBopB->getMatrix(i, j)), transposeB, beta, - Cij, fos, AHasFixedNnzPerRow); - } else if (rcpBopA->getMatrix(i, j) == Teuchos::null && - rcpBopB->getMatrix(i, j) != Teuchos::null) { - Cij = rcpBopB->getMatrix(i, j); - } else if (rcpBopA->getMatrix(i, j) != Teuchos::null && - rcpBopB->getMatrix(i, j) == Teuchos::null) { - Cij = rcpBopA->getMatrix(i, j); - } else { - Cij = Teuchos::null; - } - - if (!Cij.is_null()) { - if (Cij->isFillComplete()) - Cij->resumeFill(); - // Cij->fillComplete(rcpBopA->getDomainMap(j), rcpBopA->getRangeMap(i)); - Cij->fillComplete(); - bC->setMatrix(i, j, Cij); - } else { - bC->setMatrix(i, j, Teuchos::null); - } - } // loop over columns j - } // loop over rows i - - } // end blocked recursive algorithm - } // MatrixMatrix::TwoMatrixAdd() -}; // end specialization on GO=long long and NO=EpetraNode - -#endif // HAVE_XPETRA_EPETRA - } // end namespace Xpetra #define XPETRA_MATRIXMATRIX_SHORT diff --git a/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_def.hpp b/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_def.hpp index b5187aa8deed..7a05e7fa96b0 100644 --- a/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_MatrixMatrix_def.hpp @@ -21,17 +21,6 @@ #include "Xpetra_StridedMapFactory.hpp" #include "Xpetra_StridedMap.hpp" -#ifdef HAVE_XPETRA_EPETRA -#include -#endif - -#ifdef HAVE_XPETRA_EPETRAEXT -#include -#include -#include -#endif // HAVE_XPETRA_EPETRAEXT - -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -40,7 +29,6 @@ #include #include #include -#endif // HAVE_XPETRA_TPETRA #include "Xpetra_MatrixMatrix_decl.hpp" @@ -65,14 +53,9 @@ void MatrixMatrix::Multiply(const Mat bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; if (C.getRowMap()->lib() == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Multiply only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); -#else throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixMatrix::Multiply requires EpetraExt to be compiled.")); -#endif } else if (C.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA using helpers = Xpetra::Helpers; if (helpers::isTpetraCrs(A) && helpers::isTpetraCrs(B) && helpers::isTpetraCrs(C)) { // All matrices are Crs @@ -119,9 +102,6 @@ void MatrixMatrix::Multiply(const Mat // Mix and match TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); } -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif } if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { @@ -193,16 +173,6 @@ RCP> MatrixMatrix -RCP MatrixMatrix::MLTwoMatrixMultiply(const Epetra_CrsMatrix& epA, - const Epetra_CrsMatrix& epB, - Teuchos::FancyOStream& fos) { - throw(Xpetra::Exceptions::RuntimeError("MLTwoMatrixMultiply only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)")); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -} -#endif // ifdef HAVE_XPETRA_EPETRAEXT - template RCP> MatrixMatrix::TwoMatrixMultiplyBlock(const BlockedCrsMatrix& A, bool transposeA, const BlockedCrsMatrix& B, bool transposeB, @@ -325,14 +295,10 @@ void MatrixMatrix::TwoMatrixAdd(const if (A.getRowMap()->lib() == Xpetra::UseEpetra) { throw Exceptions::RuntimeError("TwoMatrixAdd for Epetra matrices needs for Scalar, LocalOrdinal and GlobalOrdinal."); } else if (A.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); Tpetra::CrsMatrix& tpB = Xpetra::Helpers::Op2NonConstTpetraCrs(B); Tpetra::MatrixMatrix::Add(tpA, transposeA, alpha, tpB, beta); -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with Tpetra."); -#endif } } // MatrixMatrix::TwoMatrixAdd() @@ -357,15 +323,11 @@ void MatrixMatrix::TwoMatrixAdd(const if (lib == Xpetra::UseEpetra) { throw Exceptions::RuntimeError("MatrixMatrix::Add for Epetra only available with Scalar = double, LO = GO = int."); } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA using tcrs_matrix_type = Tpetra::CrsMatrix; using helpers = Xpetra::Helpers; const tcrs_matrix_type& tpA = helpers::Op2TpetraCrs(A); const tcrs_matrix_type& tpB = helpers::Op2TpetraCrs(B); C = helpers::tpetraAdd(tpA, transposeA, alpha, tpB, transposeB, beta); -#else - throw Exceptions::RuntimeError("Xpetra must be compiled with Tpetra."); -#endif } ///////////////////////// EXPERIMENTAL if (A.IsView("stridedMaps")) C->CreateView("stridedMaps", rcpFromRef(A)); diff --git a/packages/xpetra/src/Utils/Xpetra_MatrixUtils_decl.hpp b/packages/xpetra/src/Utils/Xpetra_MatrixUtils_decl.hpp index 0a03ca36a827..beaeab980d1c 100644 --- a/packages/xpetra/src/Utils/Xpetra_MatrixUtils_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_MatrixUtils_decl.hpp @@ -24,12 +24,10 @@ #include "Xpetra_MatrixMatrix.hpp" #include "Xpetra_Helpers.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMultiVector.hpp" #include #include #include -#endif namespace Xpetra { diff --git a/packages/xpetra/src/Utils/Xpetra_MatrixUtils_def.hpp b/packages/xpetra/src/Utils/Xpetra_MatrixUtils_def.hpp index 6038b1e8950c..70076b406391 100644 --- a/packages/xpetra/src/Utils/Xpetra_MatrixUtils_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_MatrixUtils_def.hpp @@ -23,12 +23,10 @@ #include "Xpetra_BlockedCrsMatrix.hpp" #include "Xpetra_MatrixMatrix.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMultiVector.hpp" #include #include #include -#endif #include "Xpetra_MatrixUtils_decl.hpp" @@ -381,7 +379,6 @@ void MatrixUtils::CheckRepairMainDiag GlobalOrdinal gZeroDiags; bool usedEfficientPath = false; -#ifdef HAVE_MUELU_TPETRA RCP crsWrapAc = rcp_dynamic_cast(Ac); RCP tpCrsAc; if (!crsWrapAc.is_null()) @@ -478,7 +475,6 @@ void MatrixUtils::CheckRepairMainDiag usedEfficientPath = true; } } -#endif if (!usedEfficientPath) { RCP rowMap = Ac->getRowMap(); @@ -631,15 +627,10 @@ void MatrixUtils::extractBlockDiagona const UnderlyingLib lib = A.getRowMap()->lib(); if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixUtils::extractBlockDiagonal not available for Epetra.")); -#endif // HAVE_XPETRA_EPETRA } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA const Tpetra::CrsMatrix& At = Xpetra::Helpers::Op2TpetraCrs(A); Tpetra::MultiVector& Dt = Xpetra::toTpetra(diagonal); Tpetra::Details::extractBlockDiagonal(At, Dt); -#endif // HAVE_XPETRA_TPETRA } } @@ -650,15 +641,10 @@ void MatrixUtils::inverseScaleBlockDi const UnderlyingLib lib = blockDiagonal.getMap()->lib(); if (lib == Xpetra::UseEpetra) { -#if defined(HAVE_XPETRA_EPETRA) - throw(Xpetra::Exceptions::RuntimeError("Xpetra::MatrixUtils::inverseScaleBlockDiagonal not available for Epetra.")); -#endif // HAVE_XPETRA_EPETRA } else if (lib == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA Tpetra::MultiVector& Dt = Xpetra::toTpetra(blockDiagonal); Tpetra::MultiVector& St = Xpetra::toTpetra(toBeScaled); Tpetra::Details::inverseScaleBlockDiagonal(Dt, doTranspose, St); -#endif // HAVE_XPETRA_TPETRA } } diff --git a/packages/xpetra/src/Utils/Xpetra_Parameters.hpp b/packages/xpetra/src/Utils/Xpetra_Parameters.hpp index a31f668398e0..20c0fa881a4d 100644 --- a/packages/xpetra/src/Utils/Xpetra_Parameters.hpp +++ b/packages/xpetra/src/Utils/Xpetra_Parameters.hpp @@ -46,30 +46,16 @@ class Parameters documentation << "linear algebra library ("; // Default is Tpetra if available. If not, default is Epetra -#if defined(HAVE_XPETRA_EPETRA) - documentation << "Epetra"; - lib_ = Xpetra::UseEpetra; // set default (if Tpetra support is missing) - optionValues[nOptions] = Xpetra::UseEpetra; - // optionValues[nOptions] = "epetra"; //TODO: do not break compatibility right now - optionNames[nOptions] = "Epetra"; - nOptions++; -#endif -#if defined(HAVE_XPETRA_TPETRA) -#if defined(HAVE_XPETRA_EPETRA) - documentation << ", "; -#endif documentation << "Tpetra"; lib_ = Xpetra::UseTpetra; // set default optionValues[nOptions] = Xpetra::UseTpetra; // optionsValues[nOptions] = "tpetra"; //TODO: do not break compatibility right now optionNames[nOptions] = "Tpetra"; nOptions++; -#endif documentation << ")"; clp.setOption("linAlgebra", &lib_, nOptions, optionValues, optionNames, documentation.str().c_str()); -#if defined(HAVE_XPETRA_TPETRA) int nInstOptions = 0; // Gives the number of possible option values to select const int maxInstOptions = 5; // No more than 5 instantiations are supported right now Xpetra::Instantiation instOptionValues[maxInstOptions]; // Array that gives the numeric values for each option. @@ -112,7 +98,6 @@ class Parameters instDocumentation << "choice of instantiation"; clp.setOption("instantiation", &inst_, nInstOptions, instOptionValues, instOptionNames, instDocumentation.str().c_str()); -#endif } void check() const { diff --git a/packages/xpetra/src/Utils/Xpetra_ThyraUtils_decl.hpp b/packages/xpetra/src/Utils/Xpetra_ThyraUtils_decl.hpp index 373656d2bceb..64597f98ce75 100644 --- a/packages/xpetra/src/Utils/Xpetra_ThyraUtils_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_ThyraUtils_decl.hpp @@ -15,14 +15,7 @@ #include -#ifdef HAVE_XPETRA_TPETRA #include "Tpetra_ConfigDefs.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Epetra_config.h" -#include "Epetra_CombineMode.h" -#endif #include "Xpetra_Map.hpp" #include "Xpetra_BlockedMap.hpp" @@ -49,7 +42,6 @@ #include #include -#ifdef HAVE_XPETRA_TPETRA #include #include #include @@ -60,18 +52,6 @@ #include #include #include -#endif -#ifdef HAVE_XPETRA_EPETRA -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif namespace Xpetra { @@ -150,1582 +130,6 @@ class ThyraUtils { // full specialization for Epetra support // Note, that Thyra only has support for Epetra (not for Epetra64) -#ifdef HAVE_XPETRA_EPETRA - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class ThyraUtils { - public: - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - private: -#undef XPETRA_THYRAUTILS_SHORT -#include "Xpetra_UseShortNames.hpp" - - public: - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& vectorSpace, const Teuchos::RCP>& comm, std::vector& stridingInfo, LocalOrdinal stridedBlockId = -1, GlobalOrdinal offset = 0) { - Teuchos::RCP> map = ThyraUtils::toXpetra(vectorSpace, comm); - - if (stridedBlockId == -1) { - TEUCHOS_TEST_FOR_EXCEPT(map->getLocalNumElements() % stridingInfo.size() != 0); - } else { - TEUCHOS_TEST_FOR_EXCEPT(map->getLocalNumElements() % stridingInfo[stridedBlockId] != 0); - } - - Teuchos::RCP> ret = Xpetra::StridedMapFactory::Build(map, stridingInfo, stridedBlockId, offset); - return ret; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& vectorSpace, const Teuchos::RCP>& comm) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - typedef Thyra::VectorSpaceBase ThyVecSpaceBase; - typedef Thyra::ProductVectorSpaceBase ThyProdVecSpaceBase; - typedef Xpetra::ThyraUtils ThyUtils; - - RCP resultMap = Teuchos::null; - - RCP prodVectorSpace = rcp_dynamic_cast(vectorSpace); - if (prodVectorSpace != Teuchos::null) { - // SPECIAL CASE: product Vector space - // collect all submaps to store them in a hierarchical BlockedMap object - TEUCHOS_TEST_FOR_EXCEPTION(prodVectorSpace->numBlocks() == 0, std::logic_error, "Found a product vector space with zero blocks."); - std::vector> mapsThyra(prodVectorSpace->numBlocks(), Teuchos::null); - std::vector> mapsXpetra(prodVectorSpace->numBlocks(), Teuchos::null); - for (int b = 0; b < prodVectorSpace->numBlocks(); ++b) { - RCP bv = prodVectorSpace->getBlock(b); - // can be of type Map or BlockedMap (containing Thyra GIDs) - mapsThyra[b] = ThyUtils::toXpetra(bv, comm); // recursive call - } - - // get offsets for submap GIDs - // we need that for the full map (Xpetra GIDs) - std::vector gidOffsets(prodVectorSpace->numBlocks(), 0); - for (int i = 1; i < prodVectorSpace->numBlocks(); ++i) { - gidOffsets[i] = mapsThyra[i - 1]->getMaxAllGlobalIndex() + gidOffsets[i - 1] + 1; - } - - for (int b = 0; b < prodVectorSpace->numBlocks(); ++b) { - RCP bv = prodVectorSpace->getBlock(b); - // map can be of type Map or BlockedMap (containing Xpetra style GIDs) - mapsXpetra[b] = MapUtils::transformThyra2XpetraGIDs(*mapsThyra[b], gidOffsets[b]); - } - - resultMap = Teuchos::rcp(new Xpetra::BlockedMap(mapsXpetra, mapsThyra)); - } else { - // STANDARD CASE: no product map - // Epetra/Tpetra specific code to access the underlying map data - - // check whether we have a Tpetra based Thyra operator - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetra_vsc = Teuchos::rcp_dynamic_cast>(vectorSpace); - bIsTpetra = Teuchos::is_null(tpetra_vsc) ? false : true; -#endif -#endif - - // check whether we have an Epetra based Thyra operator - bool bIsEpetra = !bIsTpetra; // note: this is a little bit fragile! - -#ifdef HAVE_XPETRA_TPETRA - if (bIsTpetra) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - typedef Thyra::VectorBase ThyVecBase; - typedef Tpetra::Map TpMap; - typedef Tpetra::Vector TpVector; - typedef Thyra::TpetraOperatorVectorExtraction TOE; - RCP rgVec = Thyra::createMember(vectorSpace, std::string("label")); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgVec)); - RCP rgTpetraVec = TOE::getTpetraVector(rgVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgTpetraVec)); - RCP rgTpetraMap = rgTpetraVec->getMap(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgTpetraMap)); - - resultMap = Xpetra::toXpetraNonConst(rgTpetraMap); -#else - throw Xpetra::Exceptions::RuntimeError("Problem AAA. Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (bIsEpetra) { - // RCP epMap = Teuchos::null; - RCP - epetra_map = Teuchos::get_extra_data>(vectorSpace, "epetra_map"); - if (!Teuchos::is_null(epetra_map)) { - resultMap = Teuchos::rcp(new Xpetra::EpetraMapT(epetra_map)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(resultMap)); - } else { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "No Epetra_Map data found in Thyra::VectorSpace."); - } - } -#endif - } // end standard case (no product map) - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(resultMap)); - return resultMap; - } - - // const version - static Teuchos::RCP> - toXpetra(Teuchos::RCP> v, const Teuchos::RCP>& comm) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - - using ThyProdMultVecBase = Thyra::ProductMultiVectorBase; - using ThyMultVecBase = Thyra::MultiVectorBase; - using ThyUtils = Xpetra::ThyraUtils; - - // return value - RCP xpMultVec = Teuchos::null; - - // check whether v is a product multi vector - Teuchos::RCP thyProdVec = rcp_dynamic_cast(v); - if (thyProdVec != Teuchos::null) { - // SPECIAL CASE: create a nested BlockedMultiVector - // generate nested BlockedMap (containing Thyra and Xpetra GIDs) - RCP fullMap = ThyUtils::toXpetra(v->range(), comm); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(Teuchos::rcp_dynamic_cast(fullMap))); - - // create new Xpetra::BlockedMultiVector - xpMultVec = MultiVectorFactory::Build(fullMap, as(thyProdVec->domain()->dim())); - - RCP xpBlockedMultVec = Teuchos::rcp_dynamic_cast(xpMultVec, true); - - // loop over all blocks, transform Thyra MultiVectors to Xpetra MultiVectors recursively - for (int b = 0; b < thyProdVec->productSpace()->numBlocks(); ++b) { - RCP thyBlockMV = thyProdVec->getMultiVectorBlock(b); - // xpBlockMV can be of type MultiVector or BlockedMultiVector - RCP xpBlockMV = ThyUtils::toXpetra(thyBlockMV, comm); // recursive call - xpBlockedMultVec->setMultiVector(b, xpBlockMV, true /* Thyra mode */); - } - - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); - return xpMultVec; - } else { - // STANDARD CASE: no product vector - // Epetra/Tpetra specific code to access the underlying map data - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - // typedef Tpetra::Map TpMap; - // typedef Tpetra::Vector TpVector; - typedef Thyra::SpmdMultiVectorBase ThySpmdMultVecBase; - typedef Thyra::TpetraOperatorVectorExtraction ConverterT; - typedef Tpetra::MultiVector TpMultVec; - typedef Xpetra::TpetraMultiVector XpTpMultVec; - typedef Thyra::TpetraMultiVector ThyTpMultVec; - - RCP thyraSpmdMultiVector = rcp_dynamic_cast(v); - RCP thyraTpetraMultiVector = rcp_dynamic_cast(thyraSpmdMultiVector); - if (thyraTpetraMultiVector != Teuchos::null) { - bIsTpetra = true; - const RCP tpMultVec = ConverterT::getConstTpetraMultiVector(v); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpMultVec)); - RCP tpNonConstMultVec = Teuchos::rcp_const_cast(tpMultVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpNonConstMultVec)); - xpMultVec = rcp(new XpTpMultVec(tpNonConstMultVec)); - } -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (bIsTpetra == false) { - // no product vector - Teuchos::RCP map = ThyUtils::toXpetra(v->range(), comm); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(map)); - RCP> xeMap = rcp_dynamic_cast>(map, true); - RCP eMap = xeMap->getEpetra_MapRCP(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(eMap)); - Teuchos::RCP epMultVec = Thyra::get_Epetra_MultiVector(*eMap, v); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epMultVec)); - RCP epNonConstMultVec = Teuchos::rcp_const_cast(epMultVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epNonConstMultVec)); - xpMultVec = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epNonConstMultVec)); - } -#endif - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); - return xpMultVec; - } // end standard case - } - - // non-const version - static Teuchos::RCP> - toXpetra(Teuchos::RCP> v, const Teuchos::RCP>& comm) { - Teuchos::RCP> cv = - Teuchos::rcp_const_cast>(v); - Teuchos::RCP> r = - toXpetra(cv, comm); - return Teuchos::rcp_const_cast>(r); - } - - static bool isTpetra(const Teuchos::RCP>& op) { - // check whether we have a Tpetra based Thyra operator - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> tpetra_op = Teuchos::rcp_dynamic_cast>(op); - bIsTpetra = Teuchos::is_null(tpetra_op) ? false : true; - - // for debugging purposes: find out why dynamic cast failed - if (!bIsTpetra && -#ifdef HAVE_XPETRA_EPETRA - Teuchos::rcp_dynamic_cast(op) == Teuchos::null && -#endif - Teuchos::rcp_dynamic_cast>(op) == Teuchos::null) { - // If op is not blocked and not an Epetra object, it should be in fact an Tpetra object - typedef Thyra::TpetraLinearOp TpetraLinearOp_t; - if (Teuchos::rcp_dynamic_cast(op) == Teuchos::null) { - std::cout << "ATTENTION: The dynamic cast to the TpetraLinearOp failed even though it should be a TpetraLinearOp." << std::endl; - std::cout << " If you are using Panzer or Stratimikos you might check that the template parameters are " << std::endl; - std::cout << " properly set!" << std::endl; - std::cout << Teuchos::rcp_dynamic_cast(op, true) << std::endl; - } - } -#endif -#endif - -#if 0 - // Check whether it is a blocked operator. - // If yes, grab the (0,0) block and check the underlying linear algebra - // Note: we expect that the (0,0) block exists! - if(bIsTpetra == false) { - Teuchos::RCP > ThyBlockedOp = - Teuchos::rcp_dynamic_cast >(op); - if(ThyBlockedOp != Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPT(ThyBlockedOp->blockExists(0,0)==false); - Teuchos::RCP > b00 = - ThyBlockedOp->getBlock(0,0); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(b00)); - bIsTpetra = isTpetra(b00); - } - } -#endif - - return bIsTpetra; - } - - static bool isEpetra(const Teuchos::RCP>& op) { - // check whether we have an Epetra based Thyra operator - bool bIsEpetra = false; - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP epetra_op = Teuchos::rcp_dynamic_cast(op, false); - bIsEpetra = Teuchos::is_null(epetra_op) ? false : true; -#endif - -#if 0 - // Check whether it is a blocked operator. - // If yes, grab the (0,0) block and check the underlying linear algebra - // Note: we expect that the (0,0) block exists! - if(bIsEpetra == false) { - Teuchos::RCP > ThyBlockedOp = - Teuchos::rcp_dynamic_cast >(op,false); - if(ThyBlockedOp != Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPT(ThyBlockedOp->blockExists(0,0)==false); - Teuchos::RCP > b00 = - ThyBlockedOp->getBlock(0,0); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(b00)); - bIsEpetra = isEpetra(b00); - } - } -#endif - - return bIsEpetra; - } - - static bool isBlockedOperator(const Teuchos::RCP>& op) { - // Check whether it is a blocked operator. - Teuchos::RCP> ThyBlockedOp = - Teuchos::rcp_dynamic_cast>(op); - if (ThyBlockedOp != Teuchos::null) { - return true; - } - return false; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getConstTpetraOperator(op); - // we should also add support for the const versions! - // getConstTpetraOperator(const RCP > &op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraOp)); - Teuchos::RCP> TpetraRowMat = Teuchos::rcp_dynamic_cast>(TpetraOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraRowMat)); - Teuchos::RCP> TpetraCrsMat = Teuchos::rcp_dynamic_cast>(TpetraRowMat, true); - Teuchos::RCP> TpetraNcnstCrsMat = Teuchos::rcp_const_cast>(TpetraCrsMat); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraNcnstCrsMat)); - - Teuchos::RCP> xTpetraCrsMat = - Teuchos::rcp(new Xpetra::TpetraCrsMatrix(TpetraNcnstCrsMat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraCrsMat)); - Teuchos::RCP> ret = - Teuchos::rcp_dynamic_cast>(xTpetraCrsMat); - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xTpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; -#else - throw Xpetra::Exceptions::RuntimeError("Problem BBB. Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - Teuchos::RCP epetra_op = Thyra::get_Epetra_Operator(*op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_op)); - Teuchos::RCP epetra_rowmat = Teuchos::rcp_dynamic_cast(epetra_op, true); - Teuchos::RCP epetra_crsmat = Teuchos::rcp_dynamic_cast(epetra_rowmat, true); - Teuchos::RCP epetra_ncnstcrsmat = Teuchos::rcp_const_cast(epetra_crsmat); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_ncnstcrsmat)); - - Teuchos::RCP> xEpetraCrsMat = - Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epetra_ncnstcrsmat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xEpetraCrsMat)); - - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xEpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getTpetraOperator(op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraOp)); - Teuchos::RCP> TpetraRowMat = Teuchos::rcp_dynamic_cast>(TpetraOp, true); - Teuchos::RCP> TpetraCrsMat = Teuchos::rcp_dynamic_cast>(TpetraRowMat, true); - - Teuchos::RCP> xTpetraCrsMat = - Teuchos::rcp(new Xpetra::TpetraCrsMatrix(TpetraCrsMat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraCrsMat)); - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xTpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; -#else - throw Xpetra::Exceptions::RuntimeError("Problem CCC. Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - Teuchos::RCP epetra_op = Thyra::get_Epetra_Operator(*op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_op)); - Teuchos::RCP epetra_rowmat = Teuchos::rcp_dynamic_cast(epetra_op, true); - Teuchos::RCP epetra_crsmat = Teuchos::rcp_dynamic_cast(epetra_rowmat, true); - - Teuchos::RCP> xEpetraCrsMat = - Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epetra_crsmat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xEpetraCrsMat)); - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xEpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetraOperator(const Teuchos::RCP>& op) { - return toXpetraOperator(Teuchos::rcp_const_cast>(op)); - - // #ifdef HAVE_XPETRA_TPETRA - // if(isTpetra(op)) { - // typedef Thyra::TpetraOperatorVectorExtraction TOE; - // Teuchos::RCP > TpetraOp = TOE::getConstTpetraOperator(op); - - // Teuchos::RCP > nonConstTpetraOp = - // Teuchos::rcp_const_cast >(TpetraOp); - - // Teuchos::RCP > xTpetraOp = - // Teuchos::rcp(new Xpetra::TpetraOperator(nonConstTpetraOp)); - // TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraOp)); - - // Teuchos::RCP > xpOp = - // Teuchos::rcp_dynamic_cast >(xTpetraOp, true); - // return xpOp; - // } - // #endif - - // #ifdef HAVE_XPETRA_EPETRA - // if(isEpetra(op)) { - // TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - // } - // #endif - // return Teuchos::null; - } - - static Teuchos::RCP> - toXpetraOperator(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getTpetraOperator(op); - - Teuchos::RCP> xTpetraOp = - Teuchos::rcp(new Xpetra::TpetraOperator(TpetraOp)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraOp)); - - Teuchos::RCP> xpOp = - Teuchos::rcp_dynamic_cast>(xTpetraOp, true); - return xpOp; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { - using Teuchos::rcp_const_cast; - using Teuchos::rcp_dynamic_cast; - - RCP> diag = op->getDiag(); - - RCP> xpDiag; -#ifdef HAVE_XPETRA_TPETRA - using thyTpV = Thyra::TpetraVector; - using tV = Tpetra::Vector; - if (!rcp_dynamic_cast(diag).is_null()) { - RCP tDiag = Thyra::TpetraOperatorVectorExtraction::getConstTpetraVector(diag); - if (!tDiag.is_null()) - xpDiag = Xpetra::toXpetra(tDiag); - } -#endif -#ifdef HAVE_XPETRA_EPETRA - using ThyVSBase = Thyra::SpmdVectorSpaceBase; - if (xpDiag.is_null()) { - RCP comm = Thyra::get_Epetra_Comm(*rcp_dynamic_cast(op->range())->getComm()); - RCP map = Thyra::get_Epetra_Map(*(op->range()), comm); - if (!map.is_null()) { - RCP eDiag = Thyra::get_Epetra_Vector(*map, diag); - RCP nceDiag = rcp_const_cast(eDiag); - RCP> xpEpDiag = rcp(new Xpetra::EpetraVectorT(nceDiag)); - xpDiag = rcp_dynamic_cast>(xpEpDiag, true); - } - } -#endif - TEUCHOS_ASSERT(!xpDiag.is_null()); - RCP> M = Xpetra::MatrixFactory::Build(xpDiag); - return M; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { - return toXpetra(Teuchos::rcp_const_cast>(op)); - } - - static Teuchos::RCP> - toThyra(Teuchos::RCP> map) { - Teuchos::RCP> thyraMap = Teuchos::null; - - // check whether map is of type BlockedMap - RCP bmap = Teuchos::rcp_dynamic_cast(map); - if (bmap.is_null() == false) { - Teuchos::Array>> vecSpaces(bmap->getNumMaps()); - for (size_t i = 0; i < bmap->getNumMaps(); i++) { - // we need Thyra GIDs for all the submaps - Teuchos::RCP> vs = - Xpetra::ThyraUtils::toThyra(bmap->getMap(i, true)); - vecSpaces[i] = vs; - } - - thyraMap = Thyra::productVectorSpace(vecSpaces()); - return thyraMap; - } - - // standard case -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == Xpetra::UseTpetra) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetraMap = Teuchos::rcp_dynamic_cast>(map); - if (tpetraMap == Teuchos::null) - throw Exceptions::BadCast("Xpetra::ThyraUtils::toThyra: Cast from Xpetra::Map to Xpetra::TpetraMap failed"); - RCP> tpMap = tpetraMap->getTpetra_Map(); - RCP> thyraTpetraMap = Thyra::tpetraVectorSpace(tpMap); - thyraMap = thyraTpetraMap; -#else - throw Xpetra::Exceptions::RuntimeError("Problem DDD. Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (map->lib() == Xpetra::UseEpetra) { - Teuchos::RCP> epetraMap = Teuchos::rcp_dynamic_cast>(map); - if (epetraMap == Teuchos::null) - throw Exceptions::BadCast("Xpetra::ThyraUtils::toThyra: Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - RCP> thyraEpetraMap = Thyra::create_VectorSpace(epetraMap->getEpetra_MapRCP()); - thyraMap = thyraEpetraMap; - } -#endif - - return thyraMap; - } - - static Teuchos::RCP> - toThyraMultiVector(Teuchos::RCP> vec) { - // create Thyra MultiVector -#ifdef HAVE_XPETRA_TPETRA - if (vec->getMap()->lib() == Xpetra::UseTpetra) { - auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); - RCP> tpMV = Teuchos::rcp_dynamic_cast(vec)->getTpetra_MultiVector(); - auto thyDomMap = Thyra::tpetraVectorSpace(Tpetra::createLocalMapWithNode(vec->getNumVectors(), vec->getMap()->getComm())); - auto thyMV = rcp(new Thyra::TpetraMultiVector()); - thyMV->initialize(thyTpMap, thyDomMap, tpMV); - return thyMV; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - auto thyEpMap = Thyra::create_VectorSpace(Teuchos::rcp_dynamic_cast>(vec->getMap())->getEpetra_MapRCP()); - auto epMV = Teuchos::rcp_dynamic_cast>(vec)->getEpetra_MultiVector(); - auto thyMV = Thyra::create_MultiVector(epMV, thyEpMap); - return thyMV; - } -#endif - - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "MultiVector cannot be converted to Thyra."); - } - - static Teuchos::RCP> - toThyraVector(Teuchos::RCP> vec) { - // create Thyra Vector -#ifdef HAVE_XPETRA_TPETRA - if (vec->getMap()->lib() == Xpetra::UseTpetra) { - auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); - RCP> tpVec = Teuchos::rcp_dynamic_cast(vec)->getTpetra_Vector(); - auto thyVec = rcp(new Thyra::TpetraVector()); - thyVec->initialize(thyTpMap, tpVec); - return thyVec; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - auto thyEpMap = Thyra::create_VectorSpace(Teuchos::rcp_dynamic_cast>(vec->getMap())->getEpetra_MapRCP()); - auto epVec = rcp(Teuchos::rcp_dynamic_cast>(vec)->getEpetra_Vector(), false); - auto thyVec = Thyra::create_Vector(epVec, thyEpMap); - return thyVec; - } -#endif - - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Vector cannot be converted to Thyra."); - } - - static void updateThyra(Teuchos::RCP> source, Teuchos::RCP> mapExtractor, const Teuchos::RCP>& target) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - typedef Thyra::VectorSpaceBase ThyVecSpaceBase; - typedef Thyra::SpmdVectorSpaceBase ThySpmdVecSpaceBase; - typedef Thyra::MultiVectorBase ThyMultVecBase; - // typedef Thyra::SpmdMultiVectorBase ThySpmdMultVecBase; - // typedef Thyra::ProductVectorSpaceBase ThyProdVecSpaceBase; - typedef Thyra::ProductMultiVectorBase ThyProdMultVecBase; - - // copy data from tY_inout to Y_inout - RCP prodTarget = rcp_dynamic_cast(target); - if (prodTarget != Teuchos::null) { - RCP bSourceVec = rcp_dynamic_cast(source); - if (bSourceVec.is_null() == true) { - // SPECIAL CASE: target vector is product vector: - // update Thyra product multi vector with data from a merged Xpetra multi vector - - TEUCHOS_TEST_FOR_EXCEPTION(mapExtractor == Teuchos::null, std::logic_error, "Found a Thyra product vector, but user did not provide an Xpetra::MapExtractor."); - TEUCHOS_TEST_FOR_EXCEPTION(prodTarget->productSpace()->numBlocks() != as(mapExtractor->NumMaps()), std::logic_error, "Inconsistent numbers of sub maps in Thyra::ProductVectorSpace and Xpetra::MapExtractor."); - - for (int bbb = 0; bbb < prodTarget->productSpace()->numBlocks(); ++bbb) { - // access Xpetra data - RCP xpSubBlock = mapExtractor->ExtractVector(source, bbb, false); // use Xpetra ordering (doesn't really matter) - - // access Thyra data - Teuchos::RCP thySubBlock = prodTarget->getNonconstMultiVectorBlock(bbb); - RCP vs = thySubBlock->range(); - RCP mpi_vs = rcp_dynamic_cast(vs); - const LocalOrdinal localOffset = (mpi_vs != Teuchos::null ? mpi_vs->localOffset() : 0); - const LocalOrdinal localSubDim = (mpi_vs != Teuchos::null ? mpi_vs->localSubDim() : vs->dim()); - RCP> thyData = - Teuchos::rcp(new Thyra::DetachedMultiVectorView(*thySubBlock, Teuchos::Range1D(localOffset, localOffset + localSubDim - 1))); - - // loop over all vectors in multivector - for (size_t j = 0; j < xpSubBlock->getNumVectors(); ++j) { - Teuchos::ArrayRCP xpData = xpSubBlock->getData(j); // access const data from Xpetra object - - // loop over all local rows - for (LocalOrdinal i = 0; i < localSubDim; ++i) { - (*thyData)(i, j) = xpData[i]; - } - } - } - } else { - // source vector is a blocked multivector - // TODO test me - TEUCHOS_TEST_FOR_EXCEPTION(prodTarget->productSpace()->numBlocks() != as(bSourceVec->getBlockedMap()->getNumMaps()), std::logic_error, "Inconsistent numbers of sub maps in Thyra::ProductVectorSpace and Xpetra::BlockedMultiVector."); - - for (int bbb = 0; bbb < prodTarget->productSpace()->numBlocks(); ++bbb) { - // access Thyra data - RCP xpSubBlock = bSourceVec->getMultiVector(bbb, true); // use Thyra ordering - - Teuchos::RCP thyXpSubBlock = toThyraMultiVector(xpSubBlock); - - // access Thyra data - Teuchos::RCP thySubBlock = prodTarget->getNonconstMultiVectorBlock(bbb); - Thyra::assign(thySubBlock.ptr(), *thyXpSubBlock); - } - } - } else { - // STANDARD case: - // update Thyra::MultiVector with data from an Xpetra::MultiVector - - // access Thyra data - RCP mpi_vs = rcp_dynamic_cast(target->range()); - TEUCHOS_TEST_FOR_EXCEPTION(mpi_vs == Teuchos::null, std::logic_error, "Failed to cast Thyra::VectorSpaceBase to Thyra::SpmdVectorSpaceBase."); - const LocalOrdinal localOffset = (mpi_vs != Teuchos::null ? mpi_vs->localOffset() : 0); - const LocalOrdinal localSubDim = (mpi_vs != Teuchos::null ? mpi_vs->localSubDim() : target->range()->dim()); - RCP> thyData = - Teuchos::rcp(new Thyra::DetachedMultiVectorView(*target, Teuchos::Range1D(localOffset, localOffset + localSubDim - 1))); - - // loop over all vectors in multivector - for (size_t j = 0; j < source->getNumVectors(); ++j) { - Teuchos::ArrayRCP xpData = source->getData(j); // access const data from Xpetra object - // loop over all local rows - for (LocalOrdinal i = 0; i < localSubDim; ++i) { - (*thyData)(i, j) = xpData[i]; - } - } - } - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat) { - // create a Thyra operator from Xpetra::CrsMatrix - Teuchos::RCP> thyraOp = Teuchos::null; - -#ifdef HAVE_XPETRA_TPETRA - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (tpetraMat != Teuchos::null) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> xTpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP> tpCrsMat = xTpCrsMat->getTpetra_CrsMatrix(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpCrsMat)); - - Teuchos::RCP> tpRowMat = Teuchos::rcp_dynamic_cast>(tpCrsMat, true); - Teuchos::RCP> tpOperator = Teuchos::rcp_dynamic_cast>(tpRowMat, true); - - thyraOp = Thyra::createConstLinearOp(tpOperator); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (epetraMat != Teuchos::null) { - Teuchos::RCP> xEpCrsMat = Teuchos::rcp_dynamic_cast>(mat); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xEpCrsMat)); - Teuchos::RCP epCrsMat = xEpCrsMat->getEpetra_CrsMatrix(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epCrsMat)); - - Teuchos::RCP thyraEpOp = Thyra::epetraLinearOp(epCrsMat, "op"); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraEpOp)); - thyraOp = thyraEpOp; - } -#endif - return thyraOp; - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat) { - // create a Thyra operator from Xpetra::CrsMatrix - Teuchos::RCP> thyraOp = Teuchos::null; - -#ifdef HAVE_XPETRA_TPETRA - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (tpetraMat != Teuchos::null) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> xTpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP> tpCrsMat = xTpCrsMat->getTpetra_CrsMatrixNonConst(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpCrsMat)); - - Teuchos::RCP> tpRowMat = Teuchos::rcp_dynamic_cast>(tpCrsMat, true); - Teuchos::RCP> tpOperator = Teuchos::rcp_dynamic_cast>(tpRowMat, true); - - thyraOp = Thyra::createLinearOp(tpOperator); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_INT:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (epetraMat != Teuchos::null) { - Teuchos::RCP> xEpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP epCrsMat = xEpCrsMat->getEpetra_CrsMatrixNonConst(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epCrsMat)); - - Teuchos::RCP thyraEpOp = Thyra::nonconstEpetraLinearOp(epCrsMat, "op"); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraEpOp)); - thyraOp = thyraEpOp; - } -#endif - return thyraOp; - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat); - -}; // specialization on SC=double, LO=GO=int and NO=EpetraNode -#endif // #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class ThyraUtils { - public: - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - private: -#undef XPETRA_THYRAUTILS_SHORT -#include "Xpetra_UseShortNames.hpp" - - public: - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& vectorSpace, const Teuchos::RCP>& comm, std::vector& stridingInfo, LocalOrdinal stridedBlockId = -1, GlobalOrdinal offset = 0) { - Teuchos::RCP> map = ThyraUtils::toXpetra(vectorSpace, comm); - - if (stridedBlockId == -1) { - TEUCHOS_TEST_FOR_EXCEPT(map->getLocalNumElements() % stridingInfo.size() != 0); - } else { - TEUCHOS_TEST_FOR_EXCEPT(map->getLocalNumElements() % stridingInfo[stridedBlockId] != 0); - } - - Teuchos::RCP> ret = Xpetra::StridedMapFactory::Build(map, stridingInfo, stridedBlockId, offset); - return ret; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& vectorSpace, const Teuchos::RCP>& comm) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - typedef Thyra::VectorSpaceBase ThyVecSpaceBase; - typedef Thyra::ProductVectorSpaceBase ThyProdVecSpaceBase; - typedef Xpetra::ThyraUtils ThyUtils; - - RCP prodVectorSpace = rcp_dynamic_cast(vectorSpace); - if (prodVectorSpace != Teuchos::null) { - // SPECIAL CASE: product Vector space - // collect all submaps to store them in a hierarchical BlockedMap object - TEUCHOS_TEST_FOR_EXCEPTION(prodVectorSpace->numBlocks() == 0, std::logic_error, "Found a product vector space with zero blocks."); - std::vector> mapsThyra(prodVectorSpace->numBlocks(), Teuchos::null); - std::vector> mapsXpetra(prodVectorSpace->numBlocks(), Teuchos::null); - for (int b = 0; b < prodVectorSpace->numBlocks(); ++b) { - RCP bv = prodVectorSpace->getBlock(b); - // can be of type Map or BlockedMap (containing Thyra GIDs) - mapsThyra[b] = ThyUtils::toXpetra(bv, comm); // recursive call - } - - // get offsets for submap GIDs - // we need that for the full map (Xpetra GIDs) - std::vector gidOffsets(prodVectorSpace->numBlocks(), 0); - for (int i = 1; i < prodVectorSpace->numBlocks(); ++i) { - gidOffsets[i] = mapsThyra[i - 1]->getMaxAllGlobalIndex() + gidOffsets[i - 1] + 1; - } - - for (int b = 0; b < prodVectorSpace->numBlocks(); ++b) { - RCP bv = prodVectorSpace->getBlock(b); - // map can be of type Map or BlockedMap (containing Xpetra style GIDs) - mapsXpetra[b] = MapUtils::transformThyra2XpetraGIDs(*mapsThyra[b], gidOffsets[b]); - } - - Teuchos::RCP resultMap = Teuchos::rcp(new Xpetra::BlockedMap(mapsXpetra, mapsThyra)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(resultMap)); - return resultMap; - } else { - // STANDARD CASE: no product map - // Epetra/Tpetra specific code to access the underlying map data - - // check whether we have a Tpetra based Thyra operator - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetra_vsc = Teuchos::rcp_dynamic_cast>(vectorSpace); - bIsTpetra = Teuchos::is_null(tpetra_vsc) ? false : true; -#endif -#endif - - // check whether we have an Epetra based Thyra operator - bool bIsEpetra = !bIsTpetra; // note: this is a little bit fragile! - -#ifdef HAVE_XPETRA_TPETRA - if (bIsTpetra) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - typedef Thyra::VectorBase ThyVecBase; - typedef Tpetra::Map TpMap; - typedef Tpetra::Vector TpVector; - typedef Thyra::TpetraOperatorVectorExtraction TOE; - RCP rgVec = Thyra::createMember(vectorSpace, std::string("label")); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgVec)); - RCP rgTpetraVec = TOE::getTpetraVector(rgVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgTpetraVec)); - RCP rgTpetraMap = rgTpetraVec->getMap(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgTpetraMap)); - - RCP rgXpetraMap = Xpetra::toXpetraNonConst(rgTpetraMap); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgXpetraMap)); - return rgXpetraMap; -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (bIsEpetra) { - // RCP epMap = Teuchos::null; - RCP - epetra_map = Teuchos::get_extra_data>(vectorSpace, "epetra_map"); - if (!Teuchos::is_null(epetra_map)) { - Teuchos::RCP rgXpetraMap = Teuchos::rcp(new Xpetra::EpetraMapT(epetra_map)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgXpetraMap)); - return rgXpetraMap; - } else { - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "No Epetra_Map data found in Thyra::VectorSpace."); - } - } -#endif - } // end standard case (no product map) - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Cannot transform Thyra::VectorSpace to Xpetra::Map."); - // return Teuchos::null; // unreachable - } - - // const version - static Teuchos::RCP> - toXpetra(Teuchos::RCP> v, const Teuchos::RCP>& comm) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - typedef Thyra::ProductMultiVectorBase ThyProdMultVecBase; - typedef Thyra::MultiVectorBase ThyMultVecBase; - typedef Xpetra::ThyraUtils ThyUtils; - - // return value - RCP xpMultVec = Teuchos::null; - - // check whether v is a product multi vector - Teuchos::RCP thyProdVec = rcp_dynamic_cast(v); - if (thyProdVec != Teuchos::null) { - // SPECIAL CASE: create a nested BlockedMultiVector - // generate nested BlockedMap (containing Thyra and Xpetra GIDs) - RCP fullMap = ThyUtils::toXpetra(v->range(), comm); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(Teuchos::rcp_dynamic_cast(fullMap))); - - // create new Xpetra::BlockedMultiVector - xpMultVec = MultiVectorFactory::Build(fullMap, as(thyProdVec->domain()->dim())); - - RCP xpBlockedMultVec = Teuchos::rcp_dynamic_cast(xpMultVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpBlockedMultVec)); - - // loop over all blocks, transform Thyra MultiVectors to Xpetra MultiVectors recursively - for (int b = 0; b < thyProdVec->productSpace()->numBlocks(); ++b) { - RCP thyBlockMV = thyProdVec->getMultiVectorBlock(b); - // xpBlockMV can be of type MultiVector or BlockedMultiVector - RCP xpBlockMV = ThyUtils::toXpetra(thyBlockMV, comm); // recursive call - xpBlockedMultVec->setMultiVector(b, xpBlockMV, true /* Thyra mode */); - } - - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); - return xpMultVec; - } else { - // STANDARD CASE: no product vector - // Epetra/Tpetra specific code to access the underlying map data - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - // typedef Tpetra::Map TpMap; - // typedef Tpetra::Vector TpVector; - typedef Thyra::SpmdMultiVectorBase ThySpmdMultVecBase; - typedef Thyra::TpetraOperatorVectorExtraction ConverterT; - typedef Tpetra::MultiVector TpMultVec; - typedef Xpetra::TpetraMultiVector XpTpMultVec; - typedef Thyra::TpetraMultiVector ThyTpMultVec; - - RCP thyraSpmdMultiVector = rcp_dynamic_cast(v); - RCP thyraTpetraMultiVector = rcp_dynamic_cast(thyraSpmdMultiVector); - if (thyraTpetraMultiVector != Teuchos::null) { - bIsTpetra = true; - const RCP tpMultVec = ConverterT::getConstTpetraMultiVector(v); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpMultVec)); - RCP tpNonConstMultVec = Teuchos::rcp_const_cast(tpMultVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpNonConstMultVec)); - xpMultVec = rcp(new XpTpMultVec(tpNonConstMultVec)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); - return xpMultVec; - } -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (bIsTpetra == false) { - // no product vector - Teuchos::RCP map = ThyUtils::toXpetra(v->range(), comm); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(map)); - RCP> xeMap = rcp_dynamic_cast>(map, true); - RCP eMap = xeMap->getEpetra_MapRCP(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(eMap)); - Teuchos::RCP epMultVec = Thyra::get_Epetra_MultiVector(*eMap, v); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epMultVec)); - RCP epNonConstMultVec = Teuchos::rcp_const_cast(epMultVec); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epNonConstMultVec)); - xpMultVec = Teuchos::rcp(new Xpetra::EpetraMultiVectorT(epNonConstMultVec)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); - return xpMultVec; - } -#endif - } // end standard case - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Cannot transform Thyra::MultiVector to Xpetra::MultiVector."); - // return Teuchos::null; // unreachable - } - - // non-const version - static Teuchos::RCP> - toXpetra(Teuchos::RCP> v, const Teuchos::RCP>& comm) { - Teuchos::RCP> cv = - Teuchos::rcp_const_cast>(v); - Teuchos::RCP> r = - toXpetra(cv, comm); - return Teuchos::rcp_const_cast>(r); - } - - static bool isTpetra(const Teuchos::RCP>& op) { - // check whether we have a Tpetra based Thyra operator - bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> tpetra_op = Teuchos::rcp_dynamic_cast>(op); - bIsTpetra = Teuchos::is_null(tpetra_op) ? false : true; - - // for debugging purposes: find out why dynamic cast failed - if (!bIsTpetra && -#ifdef HAVE_XPETRA_EPETRA - Teuchos::rcp_dynamic_cast(op) == Teuchos::null && -#endif - Teuchos::rcp_dynamic_cast>(op) == Teuchos::null) { - // If op is not blocked and not an Epetra object, it should be in fact an Tpetra object - typedef Thyra::TpetraLinearOp TpetraLinearOp_t; - if (Teuchos::rcp_dynamic_cast(op) == Teuchos::null) { - std::cout << "ATTENTION: The dynamic cast to the TpetraLinearOp failed even though it should be a TpetraLinearOp." << std::endl; - std::cout << " If you are using Panzer or Stratimikos you might check that the template parameters are " << std::endl; - std::cout << " properly set!" << std::endl; - std::cout << Teuchos::rcp_dynamic_cast(op, true) << std::endl; - } - } -#endif -#endif - -#if 0 - // Check whether it is a blocked operator. - // If yes, grab the (0,0) block and check the underlying linear algebra - // Note: we expect that the (0,0) block exists! - if(bIsTpetra == false) { - Teuchos::RCP > ThyBlockedOp = - Teuchos::rcp_dynamic_cast >(op); - if(ThyBlockedOp != Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPT(ThyBlockedOp->blockExists(0,0)==false); - Teuchos::RCP > b00 = - ThyBlockedOp->getBlock(0,0); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(b00)); - bIsTpetra = isTpetra(b00); - } - } -#endif - - return bIsTpetra; - } - - static bool isEpetra(const Teuchos::RCP>& op) { - // check whether we have an Epetra based Thyra operator - bool bIsEpetra = false; - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP epetra_op = Teuchos::rcp_dynamic_cast(op, false); - bIsEpetra = Teuchos::is_null(epetra_op) ? false : true; -#endif - -#if 0 - // Check whether it is a blocked operator. - // If yes, grab the (0,0) block and check the underlying linear algebra - // Note: we expect that the (0,0) block exists! - if(bIsEpetra == false) { - Teuchos::RCP > ThyBlockedOp = - Teuchos::rcp_dynamic_cast >(op,false); - if(ThyBlockedOp != Teuchos::null) { - TEUCHOS_TEST_FOR_EXCEPT(ThyBlockedOp->blockExists(0,0)==false); - Teuchos::RCP > b00 = - ThyBlockedOp->getBlock(0,0); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(b00)); - bIsEpetra = isEpetra(b00); - } - } -#endif - - return bIsEpetra; - } - - static bool isBlockedOperator(const Teuchos::RCP>& op) { - // Check whether it is a blocked operator. - Teuchos::RCP> ThyBlockedOp = - Teuchos::rcp_dynamic_cast>(op); - if (ThyBlockedOp != Teuchos::null) { - return true; - } - return false; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getConstTpetraOperator(op); - // we should also add support for the const versions! - // getConstTpetraOperator(const RCP > &op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraOp)); - Teuchos::RCP> TpetraRowMat = Teuchos::rcp_dynamic_cast>(TpetraOp, true); - Teuchos::RCP> TpetraCrsMat = Teuchos::rcp_dynamic_cast>(TpetraRowMat, true); - Teuchos::RCP> TpetraNcnstCrsMat = Teuchos::rcp_const_cast>(TpetraCrsMat); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraNcnstCrsMat)); - - Teuchos::RCP> xTpetraCrsMat = - Teuchos::rcp(new Xpetra::TpetraCrsMatrix(TpetraNcnstCrsMat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraCrsMat)); - - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xTpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - Teuchos::RCP epetra_op = Thyra::get_Epetra_Operator(*op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_op)); - Teuchos::RCP epetra_rowmat = Teuchos::rcp_dynamic_cast(epetra_op, true); - Teuchos::RCP epetra_crsmat = Teuchos::rcp_dynamic_cast(epetra_rowmat, true); - Teuchos::RCP epetra_ncnstcrsmat = Teuchos::rcp_const_cast(epetra_crsmat); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_ncnstcrsmat)); - - Teuchos::RCP> xEpetraCrsMat = - Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epetra_ncnstcrsmat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xEpetraCrsMat)); - - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xEpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getTpetraOperator(op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(TpetraOp)); - Teuchos::RCP> TpetraRowMat = Teuchos::rcp_dynamic_cast>(TpetraOp, true); - Teuchos::RCP> TpetraCrsMat = Teuchos::rcp_dynamic_cast>(TpetraRowMat, true); - - Teuchos::RCP> xTpetraCrsMat = - Teuchos::rcp(new Xpetra::TpetraCrsMatrix(TpetraCrsMat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraCrsMat)); - - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xTpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - Teuchos::RCP epetra_op = Thyra::get_Epetra_Operator(*op); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epetra_op)); - Teuchos::RCP epetra_rowmat = Teuchos::rcp_dynamic_cast(epetra_op, true); - Teuchos::RCP epetra_crsmat = Teuchos::rcp_dynamic_cast(epetra_rowmat, true); - - Teuchos::RCP> xEpetraCrsMat = - Teuchos::rcp(new Xpetra::EpetraCrsMatrixT(epetra_crsmat)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xEpetraCrsMat)); - - Teuchos::RCP> xpCrsMat = - Teuchos::rcp_dynamic_cast>(xEpetraCrsMat, true); - Teuchos::RCP> xpCrsWrap = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(xpCrsMat)); - Teuchos::RCP> xpMat = - Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); - return xpMat; - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetraOperator(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getConstTpetraOperator(op); - - Teuchos::RCP> xTpetraOp = - Teuchos::rcp(new Xpetra::TpetraOperator(TpetraOp)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraOp)); - - Teuchos::RCP> xpOp = - Teuchos::rcp_dynamic_cast>(xTpetraOp, true); - return xpOp; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetraOperator(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA - if (isTpetra(op)) { - typedef Thyra::TpetraOperatorVectorExtraction TOE; - Teuchos::RCP> TpetraOp = TOE::getTpetraOperator(op); - - Teuchos::RCP> xTpetraOp = - Teuchos::rcp(new Xpetra::TpetraOperator(TpetraOp)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xTpetraOp)); - - Teuchos::RCP> xpOp = - Teuchos::rcp_dynamic_cast>(xTpetraOp, true); - return xpOp; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif - return Teuchos::null; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { - using Teuchos::rcp_const_cast; - using Teuchos::rcp_dynamic_cast; - using ThyVSBase = Thyra::SpmdVectorSpaceBase; - using thyTpV = Thyra::TpetraVector; - using tV = Tpetra::Vector; - - RCP> diag = op->getDiag(); - - RCP> xpDiag; -#ifdef HAVE_XPETRA_TPETRA - if (!rcp_dynamic_cast(diag).is_null()) { - RCP tDiag = Thyra::TpetraOperatorVectorExtraction::getConstTpetraVector(diag); - if (!tDiag.is_null()) - xpDiag = Xpetra::toXpetra(tDiag); - } -#endif -#ifdef HAVE_XPETRA_EPETRA - if (xpDiag.is_null()) { - RCP comm = Thyra::get_Epetra_Comm(*rcp_dynamic_cast(op->range())->getComm()); - RCP map = Thyra::get_Epetra_Map(*(op->range()), comm); - if (!map.is_null()) { - RCP eDiag = Thyra::get_Epetra_Vector(*map, diag); - RCP nceDiag = rcp_const_cast(eDiag); - RCP> xpEpDiag = rcp(new Xpetra::EpetraVectorT(nceDiag)); - xpDiag = rcp_dynamic_cast>(xpEpDiag, true); - } - } -#endif - TEUCHOS_ASSERT(!xpDiag.is_null()); - RCP> M = Xpetra::MatrixFactory::Build(xpDiag); - return M; - } - - static Teuchos::RCP> - toXpetra(const Teuchos::RCP>& op) { - return toXpetra(Teuchos::rcp_const_cast>(op)); - } - - static Teuchos::RCP> - toThyra(Teuchos::RCP> map) { - Teuchos::RCP> thyraMap = Teuchos::null; - - // check whether map is of type BlockedMap - RCP bmap = Teuchos::rcp_dynamic_cast(map); - if (bmap.is_null() == false) { - Teuchos::Array>> vecSpaces(bmap->getNumMaps()); - for (size_t i = 0; i < bmap->getNumMaps(); i++) { - // we need Thyra GIDs for all the submaps - Teuchos::RCP> vs = - Xpetra::ThyraUtils::toThyra(bmap->getMap(i, true)); - vecSpaces[i] = vs; - } - - thyraMap = Thyra::productVectorSpace(vecSpaces()); - return thyraMap; - } - - // standard case -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == Xpetra::UseTpetra) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetraMap = Teuchos::rcp_dynamic_cast>(map); - if (tpetraMap == Teuchos::null) - throw Exceptions::BadCast("Xpetra::ThyraUtils::toThyra: Cast from Xpetra::Map to Xpetra::TpetraMap failed"); - RCP> tpMap = tpetraMap->getTpetra_Map(); - RCP> thyraTpetraMap = Thyra::tpetraVectorSpace(tpMap); - thyraMap = thyraTpetraMap; -#else - throw Xpetra::Exceptions::RuntimeError("Problem DDD. Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (map->lib() == Xpetra::UseEpetra) { - Teuchos::RCP> epetraMap = Teuchos::rcp_dynamic_cast>(map); - if (epetraMap == Teuchos::null) - throw Exceptions::BadCast("Xpetra::ThyraUtils::toThyra: Cast from Xpetra::Map to Xpetra::EpetraMap failed"); - RCP> thyraEpetraMap = Thyra::create_VectorSpace(epetraMap->getEpetra_MapRCP()); - thyraMap = thyraEpetraMap; - } -#endif - - return thyraMap; - } - - static Teuchos::RCP> - toThyraMultiVector(Teuchos::RCP> vec) { - // create Thyra MultiVector -#ifdef HAVE_XPETRA_TPETRA - if (vec->getMap()->lib() == Xpetra::UseTpetra) { - auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); - RCP> tpMV = Teuchos::rcp_dynamic_cast(vec)->getTpetra_MultiVector(); - auto thyDomMap = Thyra::tpetraVectorSpace(Tpetra::createLocalMapWithNode(vec->getNumVectors(), vec->getMap()->getComm())); - auto thyMV = rcp(new Thyra::TpetraMultiVector()); - thyMV->initialize(thyTpMap, thyDomMap, tpMV); - return thyMV; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - auto thyEpMap = Thyra::create_VectorSpace(Teuchos::rcp_dynamic_cast>(vec->getMap())->getEpetra_MapRCP()); - auto epMV = Teuchos::rcp_dynamic_cast>(vec)->getEpetra_MultiVector(); - auto thyMV = Thyra::create_MultiVector(epMV, thyEpMap); - return thyMV; - } -#endif - - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "MultiVector cannot be converted to Thyra."); - } - - static Teuchos::RCP> - toThyraVector(Teuchos::RCP> vec) { - // create Thyra Vector -#ifdef HAVE_XPETRA_TPETRA - if (vec->getMap()->lib() == Xpetra::UseTpetra) { - auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); - RCP> tpVec = Teuchos::rcp_dynamic_cast(vec)->getTpetra_Vector(); - auto thyVec = rcp(new Thyra::TpetraVector()); - thyVec->initialize(thyTpMap, tpVec); - return thyVec; - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - auto thyEpMap = Thyra::create_VectorSpace(Teuchos::rcp_dynamic_cast>(vec->getMap())->getEpetra_MapRCP()); - auto epVec = rcp(Teuchos::rcp_dynamic_cast>(vec)->getEpetra_Vector(), false); - auto thyVec = Thyra::create_Vector(epVec, thyEpMap); - return thyVec; - } -#endif - - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Vector cannot be converted to Thyra."); - } - - static void updateThyra(Teuchos::RCP> source, Teuchos::RCP> mapExtractor, const Teuchos::RCP>& target) { - using Teuchos::as; - using Teuchos::RCP; - using Teuchos::rcp_dynamic_cast; - typedef Thyra::VectorSpaceBase ThyVecSpaceBase; - typedef Thyra::SpmdVectorSpaceBase ThySpmdVecSpaceBase; - typedef Thyra::MultiVectorBase ThyMultVecBase; - // typedef Thyra::SpmdMultiVectorBase ThySpmdMultVecBase; - // typedef Thyra::ProductVectorSpaceBase ThyProdVecSpaceBase; - typedef Thyra::ProductMultiVectorBase ThyProdMultVecBase; - - // copy data from tY_inout to Y_inout - RCP prodTarget = rcp_dynamic_cast(target); - if (prodTarget != Teuchos::null) { - RCP bSourceVec = rcp_dynamic_cast(source); - if (bSourceVec.is_null() == true) { - // SPECIAL CASE: target vector is product vector: - // update Thyra product multi vector with data from a merged Xpetra multi vector - - TEUCHOS_TEST_FOR_EXCEPTION(mapExtractor == Teuchos::null, std::logic_error, "Found a Thyra product vector, but user did not provide an Xpetra::MapExtractor."); - TEUCHOS_TEST_FOR_EXCEPTION(prodTarget->productSpace()->numBlocks() != as(mapExtractor->NumMaps()), std::logic_error, "Inconsistent numbers of sub maps in Thyra::ProductVectorSpace and Xpetra::MapExtractor."); - - for (int bbb = 0; bbb < prodTarget->productSpace()->numBlocks(); ++bbb) { - // access Xpetra data - RCP xpSubBlock = mapExtractor->ExtractVector(source, bbb, false); // use Xpetra ordering (doesn't really matter) - - // access Thyra data - Teuchos::RCP thySubBlock = prodTarget->getNonconstMultiVectorBlock(bbb); - RCP vs = thySubBlock->range(); - RCP mpi_vs = rcp_dynamic_cast(vs); - const LocalOrdinal localOffset = (mpi_vs != Teuchos::null ? mpi_vs->localOffset() : 0); - const LocalOrdinal localSubDim = (mpi_vs != Teuchos::null ? mpi_vs->localSubDim() : vs->dim()); - RCP> thyData = - Teuchos::rcp(new Thyra::DetachedMultiVectorView(*thySubBlock, Teuchos::Range1D(localOffset, localOffset + localSubDim - 1))); - - // loop over all vectors in multivector - for (size_t j = 0; j < xpSubBlock->getNumVectors(); ++j) { - Teuchos::ArrayRCP xpData = xpSubBlock->getData(j); // access const data from Xpetra object - - // loop over all local rows - for (LocalOrdinal i = 0; i < localSubDim; ++i) { - (*thyData)(i, j) = xpData[i]; - } - } - } - } else { - // source vector is a blocked multivector - // TODO test me - TEUCHOS_TEST_FOR_EXCEPTION(prodTarget->productSpace()->numBlocks() != as(bSourceVec->getBlockedMap()->getNumMaps()), std::logic_error, "Inconsistent numbers of sub maps in Thyra::ProductVectorSpace and Xpetra::BlockedMultiVector."); - - for (int bbb = 0; bbb < prodTarget->productSpace()->numBlocks(); ++bbb) { - // access Thyra data - RCP xpSubBlock = bSourceVec->getMultiVector(bbb, true); // use Thyra ordering - - Teuchos::RCP thyXpSubBlock = toThyraMultiVector(xpSubBlock); - - // access Thyra data - Teuchos::RCP thySubBlock = prodTarget->getNonconstMultiVectorBlock(bbb); - Thyra::assign(thySubBlock.ptr(), *thyXpSubBlock); - } - } - } else { - // STANDARD case: - // update Thyra::MultiVector with data from an Xpetra::MultiVector - - // access Thyra data - RCP mpi_vs = rcp_dynamic_cast(target->range()); - TEUCHOS_TEST_FOR_EXCEPTION(mpi_vs == Teuchos::null, std::logic_error, "Failed to cast Thyra::VectorSpaceBase to Thyra::SpmdVectorSpaceBase."); - const LocalOrdinal localOffset = (mpi_vs != Teuchos::null ? mpi_vs->localOffset() : 0); - const LocalOrdinal localSubDim = (mpi_vs != Teuchos::null ? mpi_vs->localSubDim() : target->range()->dim()); - RCP> thyData = - Teuchos::rcp(new Thyra::DetachedMultiVectorView(*target, Teuchos::Range1D(localOffset, localOffset + localSubDim - 1))); - - // loop over all vectors in multivector - for (size_t j = 0; j < source->getNumVectors(); ++j) { - Teuchos::ArrayRCP xpData = source->getData(j); // access const data from Xpetra object - // loop over all local rows - for (LocalOrdinal i = 0; i < localSubDim; ++i) { - (*thyData)(i, j) = xpData[i]; - } - } - } - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat) { - // create a Thyra operator from Xpetra::CrsMatrix - Teuchos::RCP> thyraOp = Teuchos::null; - -#ifdef HAVE_XPETRA_TPETRA - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (tpetraMat != Teuchos::null) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> xTpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP> tpCrsMat = xTpCrsMat->getTpetra_CrsMatrix(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpCrsMat)); - - Teuchos::RCP> tpRowMat = Teuchos::rcp_dynamic_cast>(tpCrsMat, true); - Teuchos::RCP> tpOperator = Teuchos::rcp_dynamic_cast>(tpRowMat, true); - - thyraOp = Thyra::createConstLinearOp(tpOperator); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (epetraMat != Teuchos::null) { - Teuchos::RCP> xEpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP epCrsMat = xEpCrsMat->getEpetra_CrsMatrix(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epCrsMat)); - - Teuchos::RCP thyraEpOp = Thyra::epetraLinearOp(epCrsMat, "op"); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraEpOp)); - thyraOp = thyraEpOp; - } -#endif - return thyraOp; - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat) { - // create a Thyra operator from Xpetra::CrsMatrix - Teuchos::RCP> thyraOp = Teuchos::null; - -#ifdef HAVE_XPETRA_TPETRA - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (tpetraMat != Teuchos::null) { -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - - Teuchos::RCP> xTpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP> tpCrsMat = xTpCrsMat->getTpetra_CrsMatrixNonConst(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpCrsMat)); - - Teuchos::RCP> tpRowMat = Teuchos::rcp_dynamic_cast>(tpCrsMat, true); - Teuchos::RCP> tpOperator = Teuchos::rcp_dynamic_cast>(tpRowMat, true); - - thyraOp = Thyra::createLinearOp(tpOperator); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); -#else - throw Xpetra::Exceptions::RuntimeError("Add TPETRA_INST_INT_LONG_LONG:BOOL=ON in your configuration."); -#endif - } -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(mat); - if (epetraMat != Teuchos::null) { - Teuchos::RCP> xEpCrsMat = Teuchos::rcp_dynamic_cast>(mat, true); - Teuchos::RCP epCrsMat = xEpCrsMat->getEpetra_CrsMatrixNonConst(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(epCrsMat)); - - Teuchos::RCP thyraEpOp = Thyra::nonconstEpetraLinearOp(epCrsMat, "op"); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraEpOp)); - thyraOp = thyraEpOp; - } -#endif - return thyraOp; - } - - static Teuchos::RCP> - toThyra(const Teuchos::RCP>& mat); - -}; // specialization on SC=double, LO=GO=int and NO=EpetraNode -#endif // XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -#endif // HAVE_XPETRA_EPETRA } // end namespace Xpetra diff --git a/packages/xpetra/src/Utils/Xpetra_ThyraUtils_def.hpp b/packages/xpetra/src/Utils/Xpetra_ThyraUtils_def.hpp index 33964d77c3e3..2da433d4dc07 100644 --- a/packages/xpetra/src/Utils/Xpetra_ThyraUtils_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_ThyraUtils_def.hpp @@ -74,7 +74,6 @@ Xpetra::ThyraUtils:: resultMap = Teuchos::rcp(new Xpetra::BlockedMap(mapsXpetra, mapsThyra)); } else { -#ifdef HAVE_XPETRA_TPETRA // STANDARD CASE: no product map // check whether we have a Tpetra based Thyra operator Teuchos::RCP> tpetra_vsc = Teuchos::rcp_dynamic_cast>(vectorSpace); @@ -91,9 +90,6 @@ Xpetra::ThyraUtils:: RCP rgTpetraMap = rgTpetraVec->getMap(); TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(rgTpetraMap)); resultMap = Xpetra::toXpetraNonConst(rgTpetraMap); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Cannot transform Thyra::VectorSpace to Xpetra::Map. This is the general implementation for Tpetra only, but Tpetra is disabled."); -#endif } // end standard case (no product map) TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(resultMap)); return resultMap; @@ -136,7 +132,6 @@ Xpetra::ThyraUtils:: } } else { // STANDARD CASE: no product vector -#ifdef HAVE_XPETRA_TPETRA typedef Thyra::TpetraOperatorVectorExtraction ConverterT; typedef Tpetra::MultiVector TpMultVec; typedef Xpetra::TpetraMultiVector XpTpMultVec; @@ -151,9 +146,6 @@ Xpetra::ThyraUtils:: RCP tpNonConstMultVec = Teuchos::rcp_const_cast(tpMultVec); TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(tpNonConstMultVec)); xpMultVec = rcp(new XpTpMultVec(tpNonConstMultVec)); -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Cannot transform Thyra::MultiVector to Xpetra::MultiVector. This is the general implementation for Tpetra only, but Teptra is disabled."); -#endif } // end standard case TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xpMultVec)); return xpMultVec; @@ -177,15 +169,11 @@ bool Xpetra::ThyraUtils:: // check whether we have a Tpetra based Thyra operator bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA Teuchos::RCP> tpetra_op = Teuchos::rcp_dynamic_cast>(op); bIsTpetra = Teuchos::is_null(tpetra_op) ? false : true; // for debugging purposes: find out why dynamic cast failed if (!bIsTpetra && -#ifdef HAVE_XPETRA_EPETRA - Teuchos::rcp_dynamic_cast(op) == Teuchos::null && -#endif Teuchos::rcp_dynamic_cast>(op) == Teuchos::null) { // If op is not blocked and not an Epetra object, it should be in fact an Tpetra object typedef Thyra::TpetraLinearOp TpetraLinearOp_t; @@ -196,7 +184,6 @@ bool Xpetra::ThyraUtils:: std::cout << Teuchos::rcp_dynamic_cast(op, true) << std::endl; } } -#endif #if 0 // Check whether it is a blocked operator. @@ -240,7 +227,6 @@ template Teuchos::RCP> Xpetra::ThyraUtils:: toXpetra(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA if (isTpetra(op)) { typedef Thyra::TpetraOperatorVectorExtraction TOE; Teuchos::RCP> TpetraOp = TOE::getConstTpetraOperator(op); @@ -264,13 +250,7 @@ Xpetra::ThyraUtils:: Teuchos::rcp_dynamic_cast>(xpCrsWrap, true); return xpMat; } -#endif -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif return Teuchos::null; } @@ -283,7 +263,6 @@ Xpetra::ThyraUtils:: using Teuchos::rcp_const_cast; using Teuchos::rcp_dynamic_cast; -#ifdef HAVE_XPETRA_TPETRA if (isTpetra(op)) { typedef Thyra::TpetraOperatorVectorExtraction TOE; typedef Tpetra::Operator TpetraOperator_t; @@ -306,13 +285,7 @@ Xpetra::ThyraUtils:: rcp_dynamic_cast>(xpCrsWrap, true); return xpMat; } -#endif -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif return Teuchos::null; } @@ -320,7 +293,6 @@ template Teuchos::RCP> Xpetra::ThyraUtils:: toXpetraOperator(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA if (isTpetra(op)) { typedef Thyra::TpetraOperatorVectorExtraction TOE; Teuchos::RCP> TpetraOp = TOE::getConstTpetraOperator(op); @@ -335,13 +307,7 @@ Xpetra::ThyraUtils:: Teuchos::rcp_dynamic_cast>(xTpetraOp, true); return xpOp; } -#endif -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif return Teuchos::null; } @@ -349,7 +315,6 @@ template Teuchos::RCP> Xpetra::ThyraUtils:: toXpetraOperator(const Teuchos::RCP>& op) { -#ifdef HAVE_XPETRA_TPETRA if (isTpetra(op)) { typedef Thyra::TpetraOperatorVectorExtraction TOE; Teuchos::RCP> TpetraOp = TOE::getTpetraOperator(op); @@ -362,13 +327,7 @@ Xpetra::ThyraUtils:: Teuchos::rcp_dynamic_cast>(xTpetraOp, true); return xpOp; } -#endif -#ifdef HAVE_XPETRA_EPETRA - if (isEpetra(op)) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif return Teuchos::null; } @@ -382,7 +341,6 @@ Xpetra::ThyraUtils:: RCP> diag = op->getDiag(); RCP> xpDiag; -#ifdef HAVE_XPETRA_TPETRA using thyTpV = Thyra::TpetraVector; using tV = Tpetra::Vector; if (!rcp_dynamic_cast(diag).is_null()) { @@ -390,7 +348,6 @@ Xpetra::ThyraUtils:: if (!tDiag.is_null()) xpDiag = Xpetra::toXpetra(tDiag); } -#endif TEUCHOS_ASSERT(!xpDiag.is_null()); RCP> M = Xpetra::MatrixFactory::Build(xpDiag); return M; @@ -425,7 +382,6 @@ Xpetra::ThyraUtils:: } // standard case -#ifdef HAVE_XPETRA_TPETRA if (map->lib() == Xpetra::UseTpetra) { Teuchos::RCP> tpetraMap = Teuchos::rcp_dynamic_cast>(map); if (tpetraMap == Teuchos::null) @@ -433,13 +389,6 @@ Xpetra::ThyraUtils:: RCP> thyraTpetraMap = Thyra::tpetraVectorSpace(tpetraMap->getTpetra_Map()); thyraMap = thyraTpetraMap; } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (map->lib() == Xpetra::UseEpetra) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif return thyraMap; } @@ -449,7 +398,6 @@ Teuchos::RCP> Xpetra::ThyraUtils:: toThyraMultiVector(Teuchos::RCP> vec) { // create Thyra MultiVector -#ifdef HAVE_XPETRA_TPETRA if (vec->getMap()->lib() == Xpetra::UseTpetra) { auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); RCP> tpMV = Teuchos::rcp_dynamic_cast(vec)->getTpetra_MultiVector(); @@ -458,13 +406,6 @@ Xpetra::ThyraUtils:: thyMV->initialize(thyTpMap, thyDomMap, tpMV); return thyMV; } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "MultiVector cannot be converted to Thyra."); } @@ -474,7 +415,6 @@ Teuchos::RCP> Xpetra::ThyraUtils:: toThyraVector(Teuchos::RCP> vec) { // create Thyra Vector -#ifdef HAVE_XPETRA_TPETRA if (vec->getMap()->lib() == Xpetra::UseTpetra) { auto thyTpMap = Thyra::tpetraVectorSpace(Teuchos::rcp_dynamic_cast(vec->getMap())->getTpetra_Map()); RCP> tpVec = Teuchos::rcp_dynamic_cast(vec)->getTpetra_Vector(); @@ -482,13 +422,6 @@ Xpetra::ThyraUtils:: thyVec->initialize(thyTpMap, tpVec); return thyVec; } -#endif - -#ifdef HAVE_XPETRA_EPETRA - if (vec->getMap()->lib() == Xpetra::UseEpetra) { - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - } -#endif TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Vector cannot be converted to Thyra."); } @@ -588,7 +521,6 @@ Xpetra::ThyraUtils:: // bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); if (tpetraMat != Teuchos::null) { // bIsTpetra = true; @@ -602,17 +534,9 @@ Xpetra::ThyraUtils:: thyraOp = Thyra::createConstLinearOp(tpOperator); TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); } else { -#ifdef HAVE_XPETRA_EPETRA - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to Tpetra::CrsMatrix failed. Assume matrix should be Epetra then. Epetra needs SC=double, LO=int, and GO=int or GO=long long"); -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to Tpetra::CrsMatrix failed. Assume matrix should be Epetra then. No Epetra available"); -#endif } return thyraOp; -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -#endif } template @@ -624,7 +548,6 @@ Xpetra::ThyraUtils:: // bool bIsTpetra = false; -#ifdef HAVE_XPETRA_TPETRA Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(mat); if (tpetraMat != Teuchos::null) { // bIsTpetra = true; @@ -639,17 +562,9 @@ Xpetra::ThyraUtils:: TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thyraOp)); } else { // cast to TpetraCrsMatrix failed -#ifdef HAVE_XPETRA_EPETRA - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to TpetraCrsMatrix failed. Assuming matrix supposed to be Epetra. Epetra needs SC=double, LO=int, and GO=int or GO=long long"); -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to TpetraCrsMatrix failed. Guess, matrix should be Epetra then, but no Epetra available."); -#endif } return thyraOp; -#else - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -#endif } template @@ -663,7 +578,6 @@ Xpetra::ThyraUtils:: Teuchos::RCP> Ablock_wrap = Teuchos::rcp_dynamic_cast>(Ablock); TEUCHOS_TEST_FOR_EXCEPT(Ablock_wrap.is_null() == true); -#ifdef HAVE_XPETRA_TPETRA Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(Ablock_wrap->getCrsMatrix()); if (tpetraMat != Teuchos::null) { // create new Thyra blocked operator @@ -709,177 +623,14 @@ Xpetra::ThyraUtils:: return blockMat; } else { // tpetraMat == Teuchos::null -#ifdef HAVE_XPETRA_EPETRA - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to TpetraCrsMatrix failed. Assuming matrix supposed to be Epetra. Epetra needs SC=double, LO=int, and GO=int or GO=long long"); -#else TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Cast to TpetraCrsMatrix failed. Guess, matrix should be Epetra then, but no Epetra available."); -#endif TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); } -#endif // endif HAVE_XPETRA_TPETRA // 4-Aug-2017 JJH Added 2nd condition to avoid "warning: dynamic initialization in unreachable code" // If HAVE_XPETRA_TPETRA is defined, then this method will always return or throw in the if-then-else above. -#if defined(HAVE_XPETRA_EPETRA) && !defined(HAVE_XPETRA_TPETRA) - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, "Epetra needs SC=double, LO=int, and GO=int or GO=long long"); - TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); -#endif // endif HAVE_XPETRA_EPETRA } -#ifdef HAVE_XPETRA_EPETRA - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -// implementation of "toThyra" for full specialization on SC=double, LO=GO=int and NO=EpetraNode -// We need the specialization in the cpp file due to a circle dependency in the .hpp files for BlockedCrsMatrix -Teuchos::RCP> -ThyraUtils::toThyra(const Teuchos::RCP>& mat) { - int nRows = mat->Rows(); - int nCols = mat->Cols(); - - Teuchos::RCP> Ablock = mat->getInnermostCrsMatrix(); - Teuchos::RCP> Ablock_wrap = Teuchos::rcp_dynamic_cast>(Ablock); - TEUCHOS_TEST_FOR_EXCEPT(Ablock_wrap.is_null() == true); - - bool bTpetra = false; - bool bEpetra = false; -#ifdef HAVE_XPETRA_TPETRA - // Note: Epetra is enabled -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_INT) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(Ablock_wrap->getCrsMatrix()); - if (tpetraMat != Teuchos::null) bTpetra = true; -#else - bTpetra = false; -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(Ablock_wrap->getCrsMatrix()); - if (epetraMat != Teuchos::null) bEpetra = true; -#endif - - TEUCHOS_TEST_FOR_EXCEPT(bTpetra == bEpetra); // we only allow Epetra OR Tpetra - - // create new Thyra blocked operator - Teuchos::RCP> blockMat = - Thyra::defaultBlockedLinearOp(); - - blockMat->beginBlockFill(nRows, nCols); - - for (int r = 0; r < nRows; ++r) { - for (int c = 0; c < nCols; ++c) { - Teuchos::RCP xpmat = mat->getMatrix(r, c); - - if (xpmat == Teuchos::null) continue; // shortcut for empty blocks - - Teuchos::RCP> thBlock = Teuchos::null; - - // check whether the subblock is again a blocked operator - Teuchos::RCP xpblock = Teuchos::rcp_dynamic_cast(xpmat); - if (xpblock != Teuchos::null) { - if (xpblock->Rows() == 1 && xpblock->Cols() == 1) { - // If it is a single block operator, unwrap it - Teuchos::RCP xpwrap = Teuchos::rcp_dynamic_cast(xpblock->getCrsMatrix()); - TEUCHOS_TEST_FOR_EXCEPT(xpwrap.is_null() == true); - thBlock = Xpetra::ThyraUtils::toThyra(xpwrap->getCrsMatrix()); - } else { - // recursive call for general blocked operators - thBlock = Xpetra::ThyraUtils::toThyra(xpblock); - } - } else { - // check whether it is a CRSMatrix object - Teuchos::RCP xpwrap = Teuchos::rcp_dynamic_cast(xpmat); - TEUCHOS_TEST_FOR_EXCEPT(xpwrap.is_null() == true); - thBlock = Xpetra::ThyraUtils::toThyra(xpwrap->getCrsMatrix()); - } - - blockMat->setBlock(r, c, thBlock); - } - } - - blockMat->endBlockFill(); - - return blockMat; -} -#endif // #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -// implementation of "toThyra" for full specialization on SC=double, LO=int, GO=long long and NO=EpetraNode -// We need the specialization in the cpp file due to a circle dependency in the .hpp files for BlockedCrsMatrix -Teuchos::RCP> -ThyraUtils::toThyra(const Teuchos::RCP>& mat) { - int nRows = mat->Rows(); - int nCols = mat->Cols(); - - Teuchos::RCP> Ablock = mat->getInnermostCrsMatrix(); - Teuchos::RCP> Ablock_wrap = Teuchos::rcp_dynamic_cast>(Ablock); - TEUCHOS_TEST_FOR_EXCEPT(Ablock_wrap.is_null() == true); - - bool bTpetra = false; - bool bEpetra = false; -#ifdef HAVE_XPETRA_TPETRA - // Note: Epetra is enabled -#if ((defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_OPENMP) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE)) || \ - (!defined(EPETRA_HAVE_OMP) && defined(HAVE_TPETRA_INST_SERIAL) && defined(HAVE_TPETRA_INST_INT_LONG_LONG) && defined(HAVE_TPETRA_INST_DOUBLE))) - Teuchos::RCP> tpetraMat = Teuchos::rcp_dynamic_cast>(Ablock_wrap->getCrsMatrix()); - if (tpetraMat != Teuchos::null) bTpetra = true; -#else - bTpetra = false; -#endif -#endif - -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP> epetraMat = Teuchos::rcp_dynamic_cast>(Ablock_wrap->getCrsMatrix()); - if (epetraMat != Teuchos::null) bEpetra = true; -#endif - - TEUCHOS_TEST_FOR_EXCEPT(bTpetra == bEpetra); // we only allow Epetra OR Tpetra - - // create new Thyra blocked operator - Teuchos::RCP> blockMat = - Thyra::defaultBlockedLinearOp(); - - blockMat->beginBlockFill(nRows, nCols); - - for (int r = 0; r < nRows; ++r) { - for (int c = 0; c < nCols; ++c) { - Teuchos::RCP xpmat = mat->getMatrix(r, c); - - if (xpmat == Teuchos::null) continue; // shortcut for empty blocks - - Teuchos::RCP> thBlock = Teuchos::null; - - // check whether the subblock is again a blocked operator - Teuchos::RCP xpblock = Teuchos::rcp_dynamic_cast(xpmat); - if (xpblock != Teuchos::null) { - if (xpblock->Rows() == 1 && xpblock->Cols() == 1) { - // If it is a single block operator, unwrap it - Teuchos::RCP xpwrap = Teuchos::rcp_dynamic_cast(xpblock->getCrsMatrix()); - TEUCHOS_TEST_FOR_EXCEPT(xpwrap.is_null() == true); - thBlock = Xpetra::ThyraUtils::toThyra(xpwrap->getCrsMatrix()); - } else { - // recursive call for general blocked operators - thBlock = Xpetra::ThyraUtils::toThyra(xpblock); - } - } else { - // check whether it is a CRSMatrix object - Teuchos::RCP xpwrap = Teuchos::rcp_dynamic_cast(xpmat); - TEUCHOS_TEST_FOR_EXCEPT(xpwrap.is_null() == true); - thBlock = Xpetra::ThyraUtils::toThyra(xpwrap->getCrsMatrix()); - } - - blockMat->setBlock(r, c, thBlock); - } - } - - blockMat->endBlockFill(); - - return blockMat; -} -#endif // #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES - -#endif - } // namespace Xpetra #endif diff --git a/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_decl.hpp b/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_decl.hpp index e1465be3baee..c011770f723d 100644 --- a/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_decl.hpp +++ b/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_decl.hpp @@ -22,14 +22,12 @@ #include "Xpetra_StridedMap.hpp" #include "Xpetra_IO.hpp" -#ifdef HAVE_XPETRA_TPETRA #include #include #include #include // #include // #include -#endif // HAVE_XPETRA_TPETRA namespace Xpetra { @@ -77,258 +75,6 @@ class TripleMatrixMultiply { }; // class TripleMatrixMultiply -#ifdef HAVE_XPETRA_EPETRA -// specialization TripleMatrixMultiply for SC=double, LO=GO=int -template <> -class TripleMatrixMultiply { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; -#include "Xpetra_UseShortNames.hpp" - - public: - static void MultiplyRAP(const Matrix& R, bool transposeR, - const Matrix& A, bool transposeA, - const Matrix& P, bool transposeP, - Matrix& Ac, - bool call_FillComplete_on_result = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - TEUCHOS_TEST_FOR_EXCEPTION(transposeR == false && Ac.getRowMap()->isSameAs(*R.getRowMap()) == false, - Exceptions::RuntimeError, "XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as row map of R"); - TEUCHOS_TEST_FOR_EXCEPTION(transposeR == true && Ac.getRowMap()->isSameAs(*R.getDomainMap()) == false, - Exceptions::RuntimeError, "XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as domain map of R"); - - TEUCHOS_TEST_FOR_EXCEPTION(!R.isFillComplete(), Exceptions::RuntimeError, "R is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!P.isFillComplete(), Exceptions::RuntimeError, "P is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - if (Ac.getRowMap()->lib() == Xpetra::UseEpetra) { - throw(Xpetra::Exceptions::RuntimeError("Xpetra::TripleMatrixMultiply::MultiplyRAP is only implemented for Tpetra")); - } else if (Ac.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra ETI enabled.")); -#else - using helpers = Xpetra::Helpers; - if (helpers::isTpetraCrs(R) && helpers::isTpetraCrs(A) && helpers::isTpetraCrs(P) && helpers::isTpetraCrs(Ac)) { - // All matrices are Crs - const Tpetra::CrsMatrix& tpR = Xpetra::Helpers::Op2TpetraCrs(R); - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpP = Xpetra::Helpers::Op2TpetraCrs(P); - Tpetra::CrsMatrix& tpAc = Xpetra::Helpers::Op2NonConstTpetraCrs(Ac); - - // 18Feb2013 JJH I'm reenabling the code that allows the matrix matrix multiply to do the fillComplete. - // Previously, Tpetra's matrix matrix multiply did not support fillComplete. - Tpetra::TripleMatrixMultiply::MultiplyRAP(tpR, transposeR, tpA, transposeA, tpP, transposeP, tpAc, haveMultiplyDoFillComplete, label, params); - } else if (helpers::isTpetraBlockCrs(R) && helpers::isTpetraBlockCrs(A) && helpers::isTpetraBlockCrs(P)) { - // All matrices are BlockCrs (except maybe Ac) - // FIXME: For the moment we're just going to clobber the innards of AC, so no reuse. Once we have a reuse kernel, - // we'll need to think about refactoring BlockCrs so we can do something smarter here. - if (!A.getRowMap()->getComm()->getRank()) - std::cout << "WARNING: Using inefficient BlockCrs Multiply Placeholder" << std::endl; - - const Tpetra::BlockCrsMatrix& tpR = Xpetra::Helpers::Op2TpetraBlockCrs(R); - const Tpetra::BlockCrsMatrix& tpA = Xpetra::Helpers::Op2TpetraBlockCrs(A); - const Tpetra::BlockCrsMatrix& tpP = Xpetra::Helpers::Op2TpetraBlockCrs(P); - // Tpetra::BlockCrsMatrix & tpAc = Xpetra::Helpers::Op2NonConstTpetraBlockCrs(Ac); - - using CRS = Tpetra::CrsMatrix; - RCP Rcrs = Tpetra::convertToCrsMatrix(tpR); - RCP Acrs = Tpetra::convertToCrsMatrix(tpA); - RCP Pcrs = Tpetra::convertToCrsMatrix(tpP); - // RCP Accrs = Tpetra::convertToCrsMatrix(tpAc); - - // FIXME: The lines below only works because we're assuming Ac is Point - RCP Accrs = Teuchos::rcp(new CRS(Rcrs->getRowMap(), 0)); - const bool do_fill_complete = true; - Tpetra::TripleMatrixMultiply::MultiplyRAP(*Rcrs, transposeR, *Acrs, transposeA, *Pcrs, transposeP, *Accrs, do_fill_complete, label, params); - - // Temporary output matrix - RCP > Ac_t = Tpetra::convertToBlockCrsMatrix(*Accrs, A.GetStorageBlockSize()); - RCP > Ac_x = Teuchos::rcp(new Xpetra::TpetraBlockCrsMatrix(Ac_t)); - RCP > Ac_p = Ac_x; - - // We can now cheat and replace the innards of Ac - RCP > Ac_w = Teuchos::rcp_dynamic_cast >(Teuchos::rcpFromRef(Ac)); - Ac_w->replaceCrsMatrix(Ac_p); - - } else { - // Mix and match (not supported) - TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); - } -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP fillParams = rcp(new Teuchos::ParameterList()); - fillParams->set("Optimize Storage", doOptimizeStorage); - Ac.fillComplete((transposeP) ? P.getRangeMap() : P.getDomainMap(), - (transposeR) ? R.getDomainMap() : R.getRangeMap(), - fillParams); - } - - // transfer striding information - RCP domainMap = Teuchos::null; - RCP rangeMap = Teuchos::null; - - const std::string stridedViewLabel("stridedMaps"); - const size_t blkSize = 1; - std::vector stridingInfo(1, blkSize); - LocalOrdinal stridedBlockId = -1; - - if (R.IsView(stridedViewLabel)) { - rangeMap = transposeR ? R.getColMap(stridedViewLabel) : R.getRowMap(stridedViewLabel); - } else { - rangeMap = transposeR ? R.getDomainMap() : R.getRangeMap(); - rangeMap = StridedMapFactory::Build(rangeMap, stridingInfo, stridedBlockId); - } - - if (P.IsView(stridedViewLabel)) { - domainMap = transposeP ? P.getRowMap(stridedViewLabel) : P.getColMap(stridedViewLabel); - } else { - domainMap = transposeP ? P.getRangeMap() : P.getDomainMap(); - domainMap = StridedMapFactory::Build(domainMap, stridingInfo, stridedBlockId); - } - Ac.CreateView(stridedViewLabel, rangeMap, domainMap); - } - - } // end Multiply - -}; // end specialization on SC=double, GO=int and NO=EpetraNode - -// specialization TripleMatrixMultiply for SC=double, GO=long long and NO=EpetraNode -template <> -class TripleMatrixMultiply { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; -#include "Xpetra_UseShortNames.hpp" - - public: - static void MultiplyRAP(const Matrix& R, bool transposeR, - const Matrix& A, bool transposeA, - const Matrix& P, bool transposeP, - Matrix& Ac, - bool call_FillComplete_on_result = true, - bool doOptimizeStorage = true, - const std::string& label = std::string(), - const RCP& params = null) { - TEUCHOS_TEST_FOR_EXCEPTION(transposeR == false && Ac.getRowMap()->isSameAs(*R.getRowMap()) == false, - Exceptions::RuntimeError, "XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as row map of R"); - TEUCHOS_TEST_FOR_EXCEPTION(transposeR == true && Ac.getRowMap()->isSameAs(*R.getDomainMap()) == false, - Exceptions::RuntimeError, "XpetraExt::TripleMatrixMultiply::MultiplyRAP: row map of Ac is not same as domain map of R"); - - TEUCHOS_TEST_FOR_EXCEPTION(!R.isFillComplete(), Exceptions::RuntimeError, "R is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!A.isFillComplete(), Exceptions::RuntimeError, "A is not fill-completed"); - TEUCHOS_TEST_FOR_EXCEPTION(!P.isFillComplete(), Exceptions::RuntimeError, "P is not fill-completed"); - - bool haveMultiplyDoFillComplete = call_FillComplete_on_result && doOptimizeStorage; - - if (Ac.getRowMap()->lib() == Xpetra::UseEpetra) { - throw(Xpetra::Exceptions::RuntimeError("Xpetra::TripleMatrixMultiply::MultiplyRAP is only implemented for Tpetra")); - } else if (Ac.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ - (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra ETI enabled.")); -#else - using helpers = Xpetra::Helpers; - if (helpers::isTpetraCrs(R) && helpers::isTpetraCrs(A) && helpers::isTpetraCrs(P)) { - // All matrices are Crs - const Tpetra::CrsMatrix& tpR = Xpetra::Helpers::Op2TpetraCrs(R); - const Tpetra::CrsMatrix& tpA = Xpetra::Helpers::Op2TpetraCrs(A); - const Tpetra::CrsMatrix& tpP = Xpetra::Helpers::Op2TpetraCrs(P); - Tpetra::CrsMatrix& tpAc = Xpetra::Helpers::Op2NonConstTpetraCrs(Ac); - - // 18Feb2013 JJH I'm reenabling the code that allows the matrix matrix multiply to do the fillComplete. - // Previously, Tpetra's matrix matrix multiply did not support fillComplete. - Tpetra::TripleMatrixMultiply::MultiplyRAP(tpR, transposeR, tpA, transposeA, tpP, transposeP, tpAc, haveMultiplyDoFillComplete, label, params); - } else if (helpers::isTpetraBlockCrs(R) && helpers::isTpetraBlockCrs(A) && helpers::isTpetraBlockCrs(P)) { - // All matrices are BlockCrs (except maybe Ac) - // FIXME: For the moment we're just going to clobber the innards of AC, so no reuse. Once we have a reuse kernel, - // we'll need to think about refactoring BlockCrs so we can do something smarter here. - if (!A.getRowMap()->getComm()->getRank()) - std::cout << "WARNING: Using inefficient BlockCrs Multiply Placeholder" << std::endl; - - const Tpetra::BlockCrsMatrix& tpR = Xpetra::Helpers::Op2TpetraBlockCrs(R); - const Tpetra::BlockCrsMatrix& tpA = Xpetra::Helpers::Op2TpetraBlockCrs(A); - const Tpetra::BlockCrsMatrix& tpP = Xpetra::Helpers::Op2TpetraBlockCrs(P); - // Tpetra::BlockCrsMatrix & tpAc = Xpetra::Helpers::Op2NonConstTpetraBlockCrs(Ac); - - using CRS = Tpetra::CrsMatrix; - RCP Rcrs = Tpetra::convertToCrsMatrix(tpR); - RCP Acrs = Tpetra::convertToCrsMatrix(tpA); - RCP Pcrs = Tpetra::convertToCrsMatrix(tpP); - // RCP Accrs = Tpetra::convertToCrsMatrix(tpAc); - - // FIXME: The lines below only works because we're assuming Ac is Point - RCP Accrs = Teuchos::rcp(new CRS(Rcrs->getRowMap(), 0)); - const bool do_fill_complete = true; - Tpetra::TripleMatrixMultiply::MultiplyRAP(*Rcrs, transposeR, *Acrs, transposeA, *Pcrs, transposeP, *Accrs, do_fill_complete, label, params); - - // Temporary output matrix - RCP > Ac_t = Tpetra::convertToBlockCrsMatrix(*Accrs, A.GetStorageBlockSize()); - RCP > Ac_x = Teuchos::rcp(new Xpetra::TpetraBlockCrsMatrix(Ac_t)); - RCP > Ac_p = Ac_x; - - // We can now cheat and replace the innards of Ac - RCP > Ac_w = Teuchos::rcp_dynamic_cast >(Teuchos::rcpFromRef(Ac)); - Ac_w->replaceCrsMatrix(Ac_p); - } else { - // Mix and match - TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); - } - -#endif -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif - if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { - RCP fillParams = rcp(new Teuchos::ParameterList()); - fillParams->set("Optimize Storage", doOptimizeStorage); - Ac.fillComplete((transposeP) ? P.getRangeMap() : P.getDomainMap(), - (transposeR) ? R.getDomainMap() : R.getRangeMap(), - fillParams); - } - - // transfer striding information - RCP domainMap = Teuchos::null; - RCP rangeMap = Teuchos::null; - - const std::string stridedViewLabel("stridedMaps"); - const size_t blkSize = 1; - std::vector stridingInfo(1, blkSize); - LocalOrdinal stridedBlockId = -1; - - if (R.IsView(stridedViewLabel)) { - rangeMap = transposeR ? R.getColMap(stridedViewLabel) : R.getRowMap(stridedViewLabel); - } else { - rangeMap = transposeR ? R.getDomainMap() : R.getRangeMap(); - rangeMap = StridedMapFactory::Build(rangeMap, stridingInfo, stridedBlockId); - } - - if (P.IsView(stridedViewLabel)) { - domainMap = transposeP ? P.getRowMap(stridedViewLabel) : P.getColMap(stridedViewLabel); - } else { - domainMap = transposeP ? P.getRangeMap() : P.getDomainMap(); - domainMap = StridedMapFactory::Build(domainMap, stridingInfo, stridedBlockId); - } - Ac.CreateView(stridedViewLabel, rangeMap, domainMap); - } - - } // end Multiply - -}; // end specialization on GO=long long and NO=EpetraNode -#endif - } // end namespace Xpetra #define XPETRA_TRIPLEMATRIXMULTIPLY_SHORT diff --git a/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_def.hpp b/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_def.hpp index 9c55e58892a4..f668c011f793 100644 --- a/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_def.hpp +++ b/packages/xpetra/src/Utils/Xpetra_TripleMatrixMultiply_def.hpp @@ -37,7 +37,6 @@ void TripleMatrixMultiply::MultiplyRA if (Ac.getRowMap()->lib() == Xpetra::UseEpetra) { throw(Xpetra::Exceptions::RuntimeError("Xpetra::TripleMatrixMultiply::MultiplyRAP is only implemented for Tpetra")); } else if (Ac.getRowMap()->lib() == Xpetra::UseTpetra) { -#ifdef HAVE_XPETRA_TPETRA using helpers = Xpetra::Helpers; if (helpers::isTpetraCrs(R) && helpers::isTpetraCrs(A) && helpers::isTpetraCrs(P)) { // All matrices are Crs @@ -85,9 +84,6 @@ void TripleMatrixMultiply::MultiplyRA // Mix and match TEUCHOS_TEST_FOR_EXCEPTION(1, Exceptions::RuntimeError, "Mix-and-match Crs/BlockCrs Multiply not currently supported"); } -#else - throw(Xpetra::Exceptions::RuntimeError("Xpetra must be compiled with Tpetra.")); -#endif } if (call_FillComplete_on_result && !haveMultiplyDoFillComplete) { diff --git a/packages/xpetra/src/Utils/Xpetra_Utils.cpp b/packages/xpetra/src/Utils/Xpetra_Utils.cpp index a45fffc91b52..9c9acbd554be 100644 --- a/packages/xpetra/src/Utils/Xpetra_Utils.cpp +++ b/packages/xpetra/src/Utils/Xpetra_Utils.cpp @@ -22,8 +22,6 @@ std::string toString(Xpetra::UnderlyingLib lib) { } } -#ifdef HAVE_XPETRA_TPETRA - Xpetra::LookupStatus toXpetra(Tpetra::LookupStatus ls) { if (ls == Tpetra::AllIDsPresent) return Xpetra::AllIDsPresent; @@ -64,46 +62,4 @@ Tpetra::LocalGlobal toTpetra(LocalGlobal lg) { TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::RuntimeError, "Unknown LocalGlobal"); } -#endif // HAVE_XPETRA_TPETRA - -#ifdef HAVE_XPETRA_EPETRA - -Xpetra::LookupStatus toXpetra(int ls) { - // This function is used only to convert the return value of Epetra_BlockMap::RemoteIDList() and Epetra_DirectoryBase::GetDirectoryEntries(). - // In the current implementation of Epetra (01/2012), these functions returns 0 (= success) or 1 (= a GID is not present on any processor). - - if (ls == 0) - return Xpetra::AllIDsPresent; - else if (ls == 1) - return Xpetra::IDNotPresent; - - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::RuntimeError, "Epetra returned the following error code: " << ls << ". Xpetra do not know how to interpret this error code."); -} - -bool toEpetra(Xpetra::OptimizeOption os) { - if (os == Xpetra::DoOptimizeStorage) - return true; - if (os == Xpetra::DoNotOptimizeStorage) - return false; - - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::RuntimeError, "Unknown OptimizeOption"); -} - -Epetra_CombineMode toEpetra(Xpetra::CombineMode cm) { - // Note: all the CombineMode are not supported. - // According to Chris B., the behavior in Tpetra is the same as Epetra but I prefer to limit my tests for now. - // See also the discussion of March 22 on the Tpetra developers mailing list. - - if (cm == Xpetra::ADD) - return Add; - if (cm == Xpetra::INSERT) - return Insert; - if (cm == Xpetra::ABSMAX) - return AbsMax; - - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::RuntimeError, "Cannot convert Xpetra::CombineMode to Epetra_CombineMode: unsupported CombineMode."); -} - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra diff --git a/packages/xpetra/src/Utils/Xpetra_Utils.hpp b/packages/xpetra/src/Utils/Xpetra_Utils.hpp index 614202608e64..3973d9428623 100644 --- a/packages/xpetra/src/Utils/Xpetra_Utils.hpp +++ b/packages/xpetra/src/Utils/Xpetra_Utils.hpp @@ -12,13 +12,7 @@ #include "Xpetra_ConfigDefs.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Tpetra_ConfigDefs.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Epetra_CombineMode.h" -#endif #include "Xpetra_Map.hpp" // definition of UnderlyingLib @@ -27,8 +21,6 @@ namespace Xpetra { //! Convert a Xpetra::UnderlyingLib to a std::string std::string toString(UnderlyingLib lib); -#ifdef HAVE_XPETRA_TPETRA - //! Convert a Tpetra::LookupStatus to a Xpetra::LookupStatus. Xpetra::LookupStatus toXpetra(Tpetra::LookupStatus); @@ -41,21 +33,6 @@ Tpetra::CombineMode toTpetra(Xpetra::CombineMode CM); //! Convert a Xpetra::LocalGlobal to a Tpetra::LocalGlobal. Tpetra::LocalGlobal toTpetra(LocalGlobal lg); -#endif // HAVE_XPETRA_TPETRA - -#ifdef HAVE_XPETRA_EPETRA - -//! Convert a Epetra return value to a Xpetra::LookupStatus. -Xpetra::LookupStatus toXpetra(int); - -//! Convert a Xpetra::OptimizeOption to an Epetra OptimizeDataStorage boolean -bool toEpetra(Xpetra::OptimizeOption); - -//! Convert a Xpetra::CombineMode to an Epetra_CombineMode. -Epetra_CombineMode toEpetra(Xpetra::CombineMode CM); - -#endif // HAVE_XPETRA_EPETRA - } // namespace Xpetra #endif // XPETRA_LOOKUPSTATUS_HPP diff --git a/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.cpp b/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.cpp deleted file mode 100644 index 6982caa21d95..000000000000 --- a/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraIntVector.hpp" -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_EpetraExport.hpp" - -namespace Xpetra { - -// TODO: move that elsewhere -template -Epetra_IntVector &toEpetra(Vector &x) { - XPETRA_DYNAMIC_CAST(EpetraIntVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_IntVector(); -} - -template -const Epetra_IntVector &toEpetra(const Vector &x) { - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_IntVector(); -} -// - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraIntVectorT; -template Epetra_IntVector &toEpetra(Vector &); -template const Epetra_IntVector &toEpetra(const Vector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.hpp b/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.hpp deleted file mode 100644 index d3c4a77b0f88..000000000000 --- a/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.hpp +++ /dev/null @@ -1,1302 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAINTVECTOR_HPP -#define XPETRA_EPETRAINTVECTOR_HPP - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_ConfigDefs.hpp" -#include "Xpetra_MultiVector.hpp" -#include "Xpetra_Vector.hpp" -#include "Xpetra_Exceptions.hpp" - -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Epetra_IntVector.h" - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraIntVector.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED Epetra_IntVector &toEpetra(Vector &); - -template -const XPETRA_DEPRECATED Epetra_IntVector &toEpetra(const Vector &); -// - -// stub implementation for EpetraIntVectorT -template -class XPETRA_DEPRECATED EpetraIntVectorT - : public Vector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraIntVectorT(const Teuchos::RCP > &map, bool zeroOut = true) {} - - //! Destructor. - ~EpetraIntVectorT(){}; - - //@} - - //! @name Mathematical methods - //@{ - - //! TODO missing comment - int dot(const Vector &a) const { - XPETRA_MONITOR("EpetraIntVectorT::dot"); - TEUCHOS_TEST_FOR_EXCEPTION(-1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute mean (average) value of this Vector. - int meanValue() const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute max value of this Vector. - int maxValue() const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) {} - - //! Set multi-vector values to random numbers. - void randomize(bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar & /*minVal*/, const Scalar & /*maxVal*/, bool bUseXpetraImplementation = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int seed) { - XPETRA_MONITOR("EpetraIntVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::setSeed(): Functionnality not available in Epetra"); - } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t j) const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t j) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t j) const { return Teuchos::ArrayRCP(); } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t j) { return Teuchos::ArrayRCP(); } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const {} - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector &A) {} - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector &A) {} - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int &alpha) {} - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView alpha) { - XPETRA_MONITOR("EpetraIntVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int &alpha, const MultiVector &A, const int &beta) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int &alpha, const MultiVector &A, const int &beta, const MultiVector &B, const int &gamma) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, B, eB, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView &means) const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView &maxs) const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector &A, const MultiVector &B, const int &beta) { - XPETRA_MONITOR("EpetraIntVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int scalarAB, const Vector &A, const MultiVector &B, int scalarThis) { - XPETRA_MONITOR("EpetraIntVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra_EpetraIntVector: elementWiseMultiply not implemented because Epetra_IntVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraIntVectorT::getNumVectors"); - return 1; - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { return 0; } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return 0; } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { return false; } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - return std::string(""); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - RCP getEpetra_IntVector() const { return Teuchos::null; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - return Teuchos::null; - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) {} - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) {} - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) {} - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) {} - - void replaceMap(const RCP > &map) { - // do nothing - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) {} - - private: - //! The Epetra_IntVector which this class wraps. - // RCP< Epetra_IntVector > vec_; - -}; // class EpetraIntVectorT - -// specialization on GO=int and Node=Serial -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraIntVectorT - : public virtual Vector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraIntVectorT(const Teuchos::RCP > &map, bool zeroOut = true) { - vec_ = rcp(new Epetra_IntVector(toEpetra(map), zeroOut)); - } - - //! Destructor. - ~EpetraIntVectorT(){}; - - //@} - - //! @name Mathematical methods - //@{ - - //! TODO missing comment - int dot(const Vector & /* a */) const { - XPETRA_MONITOR("EpetraIntVectorT::dot"); - TEUCHOS_TEST_FOR_EXCEPTION(-1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute mean (average) value of this Vector. - int meanValue() const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - TEUCHOS_UNREACHABLE_RETURN(-1); - } - - //! Compute max value of this Vector. - int maxValue() const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - return vec_->MaxValue(); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal /* globalRow */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal /* globalRow */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - (*vec_)[myRow] = value; - } - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - (*vec_)[myRow] += value; - } - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) { vec_->PutValue(value); } - - //! Set multi-vector values to random numbers. - void randomize(bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar & /*minVal*/, const Scalar & /*maxVal*/, bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int /* seed */) { - XPETRA_MONITOR("EpetraIntVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::setSeed(): Functionnality not available in Epetra"); - } - - typedef typename Xpetra::Vector::dual_view_type dual_view_type; - - typename dual_view_type::t_host_const_um getHostLocalView(Access::ReadOnlyStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_const_um getDeviceLocalView(Access::ReadOnlyStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::OverwriteAllStruct) const override { return getHostLocalView(Access::ReadWrite); } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::OverwriteAllStruct) const override { return getDeviceLocalView(Access::ReadWrite); } - - typename dual_view_type::t_host_um getHostLocalView(Access::ReadWriteStruct) const override { - typedef Kokkos::View - epetra_view_type; - // access Epetra vector data - Scalar *data = NULL; - vec_->ExtractView(&data); - int localLength = vec_->MyLength(); - - // create view - epetra_view_type test = epetra_view_type(data, localLength, 1); - typename dual_view_type::t_host_um ret = subview(test, Kokkos::ALL(), Kokkos::ALL()); - return ret; - } - - typename dual_view_type::t_dev_um getDeviceLocalView(Access::ReadWriteStruct) const override { return getHostLocalView(Access::ReadWrite); } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t /* j */) const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t /* j */) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t /* j */) const { - XPETRA_MONITOR("EpetraIntVectorT::getData"); - - int *data = vec_->Values(); - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t /* j */) { - XPETRA_MONITOR("EpetraIntVectorT::getDataNonConst"); - - int *data = vec_->Values(); - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector & /* A */, const Teuchos::ArrayView & /* dots */) const { - XPETRA_MONITOR("EpetraIntVectorT::dot"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntVectorT::abs"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntVectorT::reciprocal"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int & /* alpha */) { - XPETRA_MONITOR("EpetraIntVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView /* alpha */) { - XPETRA_MONITOR("EpetraIntVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */, const MultiVector & /* B */, const int & /* gamma */) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, B, eB, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView & /* means */) const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView & /* maxs */) const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp /* transA */, Teuchos::ETransp /* transB */, const int & /* alpha */, const MultiVector & /* A */, const MultiVector & /* B */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int /* scalarAB */, const Vector & /* A */, const MultiVector & /* B */, int /* scalarThis */) { - XPETRA_MONITOR("EpetraIntVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra_EpetraIntVector: elementWiseMultiply not implemented because Epetra_IntVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal /* globalRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal /* globalRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal /* myRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal /* myRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraIntVectorT::getNumVectors"); - return 1; - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { return vec_->MyLength(); } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return vec_->GlobalLength64(); } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraIntVectorT::isSameSize"); - const Vector *asvec = dynamic_cast *>(&vec); - if (!asvec) return false; - auto vv = toEpetra(*asvec); - return ((vec_->MyLength() == vv.MyLength()) && (getNumVectors() == vec.getNumVectors())); - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraIntVectorT::description"); - - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraIntVectorT::describe"); - - // This implementation come from Tpetra_Vector_def.hpp (without modification) // JG: true? - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - if (verbLevel > Teuchos::VERB_NONE) - vec_->Print(out); - } - - //@} - - RCP getEpetra_IntVector() const { return vec_; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - RCP map = rcp(new Epetra_BlockMap(vec_->Map())); - return rcp(new Xpetra::EpetraMapT(map)); - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, source, tSource, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tSource.getEpetra_IntVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, dest, tDest, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tDest.getEpetra_IntVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, source, tSource, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tSource.getEpetra_IntVector(); - int err = vec_->Import(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, dest, tDest, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tDest.getEpetra_IntVector(); - int err = vec_->Export(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void replaceMap(const RCP > & /* map */) { - // do nothing - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraIntVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT " - "(which means it wraps an Epetra_IntVector), but the RHS has some " - "other type. This probably means that the RHS wraps either an " - "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " - "does not currently implement assignment from a Tpetra object to an " - "Epetra object, though this could be added with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_IntVector(); - RCP lhsImpl = this->getEpetra_IntVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_IntVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_IntVector which this class wraps. - RCP vec_; -}; -#endif - -// specialization on GO=long long and Node=Serial -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraIntVectorT - : public virtual Vector { - typedef int Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - public: - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraIntVectorT(const Teuchos::RCP > &map, bool zeroOut = true) { - vec_ = rcp(new Epetra_IntVector(toEpetra(map), zeroOut)); - } - - //! Destructor. - ~EpetraIntVectorT(){}; - - //@} - - //! @name Mathematical methods - //@{ - - //! TODO missing comment - int dot(const Vector & /* a */) const { - XPETRA_MONITOR("EpetraIntVectorT::dot"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); /* return -1; */ - } - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); /* return -1; */ - } - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); /* return -1; */ - } - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); /* return -1; */ - } - - //! Compute mean (average) value of this Vector. - int meanValue() const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::NotImplemented, "TODO"); /* return -1; */ - } - - //! Compute max value of this Vector. - int maxValue() const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - return Teuchos::as(vec_->MaxValue()); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal /* globalRow */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal /* globalRow */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - (*vec_)[myRow] = value; - } - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - (*vec_)[myRow] += value; - } - - //! Initialize all values in a multi-vector with specified value. - void putScalar(const int &value) { vec_->PutValue(value); } - - //! Set multi-vector values to random numbers. - void randomize(bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set multi-vector values to random numbers. - void randomize(const Scalar & /*minVal*/, const Scalar & /*maxVal*/, bool /* bUseXpetraImplementation */ = true) { - XPETRA_MONITOR("EpetraIntVectorT::randomize"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::randomize(): Functionnality not available in Epetra"); - } - - //! Set seed for Random function. - /** Note: this method does not exist in Tpetra interface. Added for MueLu. */ - void setSeed(unsigned int /* seed */) { - XPETRA_MONITOR("EpetraIntVectorT::setSeed"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra::EpetraIntVectorT::setSeed(): Functionnality not available in Epetra"); - } - - //@} - - //! @name Data Copy and View get methods - //@{ - - //! Return a Vector which is a const view of column j. - Teuchos::RCP > getVector(size_t /* j */) const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Return a Vector which is a nonconst view of column j. - Teuchos::RCP > getVectorNonConst(size_t /* j */) { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Const Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getData(size_t /* j */) const { - XPETRA_MONITOR("EpetraIntVectorT::getData"); - - int *data = vec_->Values(); - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //! Local vector access function. - //! View of the local values in a particular vector of this multi-vector. - Teuchos::ArrayRCP getDataNonConst(size_t /* j */) { - XPETRA_MONITOR("EpetraIntVectorT::getDataNonConst"); - - int *data = vec_->Values(); - int localLength = vec_->MyLength(); - - return ArrayRCP(data, 0, localLength, false); // not ownership - } - - //@} - - //! @name Mathematical methods - //@{ - //! Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) - void dot(const MultiVector & /* A */, const Teuchos::ArrayView & /* dots */) const { - XPETRA_MONITOR("EpetraIntVectorT::dot"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Puts element-wise absolute values of input Multi-vector in target: A = abs(this) - void abs(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntVectorT::abs"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). - void reciprocal(const MultiVector & /* A */) { - XPETRA_MONITOR("EpetraIntVectorT::reciprocal"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this = alpha*this. - void scale(const int & /* alpha */) { - XPETRA_MONITOR("EpetraIntVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. - void scale(Teuchos::ArrayView /* alpha */) { - XPETRA_MONITOR("EpetraIntVectorT::scale"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector values with scaled values of A, this = beta*this + alpha*A. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. - void update(const int & /* alpha */, const MultiVector & /* A */, const int & /* beta */, const MultiVector & /* B */, const int & /* gamma */) { - XPETRA_MONITOR("EpetraIntVectorT::update"); - - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, A, eA, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - // XPETRA_DYNAMIC_CAST(const EpetraMultiVectorT, B, eB, "This Xpetra::EpetraMultiVectorT method only accept Xpetra::EpetraMultiVectorT as input arguments."); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::norm1"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute 2-norm of each vector in multi-vector. - void norm2(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::norm2"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> & /* norms */) const { - XPETRA_MONITOR("EpetraIntVectorT::normInf"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute mean (average) value of each vector in multi-vector. - void meanValue(const Teuchos::ArrayView & /* means */) const { - XPETRA_MONITOR("EpetraIntVectorT::meanValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Compute max value of each vector in multi-vector. - void maxValue(const Teuchos::ArrayView & /* maxs */) const { - XPETRA_MONITOR("EpetraIntVectorT::maxValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). - void multiply(Teuchos::ETransp /* transA */, Teuchos::ETransp /* transB */, const int & /* alpha */, const MultiVector & /* A */, const MultiVector & /* B */, const int & /* beta */) { - XPETRA_MONITOR("EpetraIntVectorT::multiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Not available in Epetra"); - } - - //! Element-wise multiply of a Vector A with a EpetraMultiVector B. - void elementWiseMultiply(int /* scalarAB */, const Vector & /* A */, const MultiVector & /* B */, int /* scalarThis */) { - XPETRA_MONITOR("EpetraIntVectorT::elementWiseMultiply"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "Xpetra_EpetraIntVector: elementWiseMultiply not implemented because Epetra_IntVector does not support this operation"); - } - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal /* globalRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal /* globalRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoGlobalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal /* myRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::replaceLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal /* myRow */, size_t /* vectorIndex */, const Scalar & /* value */) { - XPETRA_MONITOR("EpetraIntVectorT::sumIntoLocalValue"); - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO"); - } - - //@} - - //! @name Attribute access functions - //@{ - - //! Returns the number of vectors in the multi-vector. - size_t getNumVectors() const { - XPETRA_MONITOR("EpetraIntVectorT::getNumVectors"); - return 1; - } - - //! Returns the local vector length on the calling processor of vectors in the multi-vector. - size_t getLocalLength() const { return vec_->MyLength(); } - - //! Returns the global vector length of vectors in the multi-vector. - global_size_t getGlobalLength() const { return vec_->GlobalLength64(); } - - //! Checks to see if the local length, number of vectors and size of Scalar type match - bool isSameSize(const MultiVector &vec) const { - XPETRA_MONITOR("EpetraIntVectorT::isSameSize"); - const Vector *asvec = dynamic_cast *>(&vec); - if (!asvec) return false; - auto vv = toEpetra(*asvec); - return ((vec_->MyLength() == vv.MyLength()) && (getNumVectors() == vec.getNumVectors())); - } - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraIntVectorT::description"); - - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraIntVectorT::describe"); - - // This implementation come from Tpetra_Vector_def.hpp (without modification) // JG: true? - using std::endl; - using std::setw; - using Teuchos::VERB_DEFAULT; - using Teuchos::VERB_EXTREME; - using Teuchos::VERB_HIGH; - using Teuchos::VERB_LOW; - using Teuchos::VERB_MEDIUM; - using Teuchos::VERB_NONE; - - if (verbLevel > Teuchos::VERB_NONE) - vec_->Print(out); - } - - //@} - - RCP getEpetra_IntVector() const { return vec_; } - - const RCP > getComm() const { - TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented, "TODO getComm Epetra MultiVector not implemented"); - } - - // Implementing DistObject - Teuchos::RCP > getMap() const { - RCP map = rcp(new Epetra_BlockMap(vec_->Map())); - return rcp(new Xpetra::EpetraMapT(map)); - } - - void doImport(const DistObject &source, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, source, tSource, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tSource.getEpetra_IntVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Import &importer, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, dest, tDest, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraImportT, importer, tImporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tDest.getEpetra_IntVector(); - int err = vec_->Import(v, *tImporter.getEpetra_Import(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doImport(const DistObject &source, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doImport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, source, tSource, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tSource.getEpetra_IntVector(); - int err = vec_->Import(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void doExport(const DistObject &dest, - const Export &exporter, CombineMode CM) { - XPETRA_MONITOR("EpetraIntVectorT::doExport"); - - XPETRA_DYNAMIC_CAST(const EpetraIntVectorT, dest, tDest, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraIntVectorT as input arguments."); - XPETRA_DYNAMIC_CAST(const EpetraExportT, exporter, tExporter, "Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments."); - - const Epetra_IntVector &v = *tDest.getEpetra_IntVector(); - int err = vec_->Export(v, *tExporter.getEpetra_Export(), toEpetra(CM)); - TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra."); - } - - void replaceMap(const RCP > & /* map */) { - // do nothing - } - - protected: - /// \brief Implementation of the assignment operator (operator=); - /// does a deep copy. - virtual void - assign(const MultiVector &rhs) { - typedef EpetraIntVectorT this_type; - const this_type *rhsPtr = dynamic_cast(&rhs); - TEUCHOS_TEST_FOR_EXCEPTION( - rhsPtr == NULL, std::invalid_argument, - "Xpetra::MultiVector::operator=: " - "The left-hand side (LHS) of the assignment has a different type than " - "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT " - "(which means it wraps an Epetra_IntVector), but the RHS has some " - "other type. This probably means that the RHS wraps either an " - "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " - "does not currently implement assignment from a Tpetra object to an " - "Epetra object, though this could be added with sufficient interest."); - - RCP rhsImpl = rhsPtr->getEpetra_IntVector(); - RCP lhsImpl = this->getEpetra_IntVector(); - - TEUCHOS_TEST_FOR_EXCEPTION( - rhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of " - "the assignment) has a null RCP inside. Please " - "report this bug to the Xpetra developers."); - TEUCHOS_TEST_FOR_EXCEPTION( - lhsImpl.is_null(), std::logic_error, - "Xpetra::MultiVector::operator= " - "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the " - "assignment has a null RCP inside. Please report " - "this bug to the Xpetra developers."); - - // Epetra_IntVector's assignment operator does a deep copy. - *lhsImpl = *rhsImpl; - } - - private: - //! The Epetra_IntVector which this class wraps. - RCP vec_; -}; -#endif - -} // namespace Xpetra - -#endif // XPETRA_EPETRAINTVECTOR_HPP diff --git a/packages/xpetra/src/Vector/Xpetra_EpetraVector.cpp b/packages/xpetra/src/Vector/Xpetra_EpetraVector.cpp deleted file mode 100644 index 8decc5e0f0e1..000000000000 --- a/packages/xpetra/src/Vector/Xpetra_EpetraVector.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_EpetraVector.hpp" - -// TODO: replace double -> Scalar etc. - -namespace Xpetra { - -// TODO: move that elsewhere -template -Epetra_Vector &toEpetra(Vector &x) { - XPETRA_DYNAMIC_CAST(EpetraVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_Vector(); -} - -template -const Epetra_Vector &toEpetra(const Vector &x) { - XPETRA_DYNAMIC_CAST(const EpetraVectorT, x, tX, "toEpetra"); - return *tX.getEpetra_Vector(); -} -// - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -#ifdef HAVE_XPETRA_TPETRA -#include "TpetraCore_config.h" -#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \ - (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL))) -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif - -#ifdef HAVE_TPETRA_INST_SERIAL -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_PTHREAD -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_OPENMP -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_CUDA -typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#ifdef HAVE_TPETRA_INST_HIP -typedef Tpetra::KokkosCompat::KokkosHIPWrapperNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif -#else -// Tpetra is disabled and Kokkos not available: use dummy node type -typedef Xpetra::EpetraNode default_node_type; -template class EpetraVectorT; -template Epetra_Vector &toEpetra(Vector &); -template const Epetra_Vector &toEpetra(const Vector &); -#endif // HAVE_XPETRA_TPETRA -#endif - -} // namespace Xpetra diff --git a/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp b/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp deleted file mode 100644 index 4ce93d1198a6..000000000000 --- a/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp +++ /dev/null @@ -1,531 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#ifndef XPETRA_EPETRAVECTOR_HPP -#define XPETRA_EPETRAVECTOR_HPP - -/* this file is automatically generated - do not edit (see script/epetra.py) */ - -#include "Xpetra_EpetraConfigDefs.hpp" - -#include "Xpetra_Vector.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraMap.hpp" //TMP -#include "Xpetra_Utils.hpp" -#include "Xpetra_EpetraImport.hpp" -#include "Xpetra_EpetraExport.hpp" -#include "Xpetra_Exceptions.hpp" - -#include - -#if defined(XPETRA_ENABLE_DEPRECATED_CODE) -#ifdef __GNUC__ -#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS) -#warning "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp is deprecated." -#endif -#endif -#else -#error "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp is deprecated." -#endif - -namespace Xpetra { - -// TODO: move that elsewhere -template -XPETRA_DEPRECATED Epetra_Vector &toEpetra(Vector &); - -template -XPETRA_DEPRECATED const Epetra_Vector &toEpetra(const Vector &); -// - -template -class XPETRA_DEPRECATED EpetraVectorT - : public virtual Vector, - public EpetraMultiVectorT { - typedef double Scalar; - typedef int LocalOrdinal; - typedef EpetraGlobalOrdinal GlobalOrdinal; - - public: - //! Compute 1-norm of each vector in multi-vector. - void norm1(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! - void norm2(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute Inf-norm of each vector in multi-vector. - void normInf(const Teuchos::ArrayView::magnitudeType> &norms) const {} - - //! Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). - void meanValue(const Teuchos::ArrayView &means) const {} - - //! Replace value, using global (row) index. - void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using global (row) index. - void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {} - - //! Replace value, using local (row) index. - void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Add value to existing value, using local (row) index. - void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {} - - //! Compute the dot product of each corresponding pair of vectors (columns) in A and B. - void dot(const MultiVector &A, const Teuchos::ArrayView &dots) const {} - - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraVectorT(const RCP > &map, bool zeroOut = true) - : EpetraMultiVectorT(map, 1, zeroOut){}; - - // Commenting out since no definition provided in cpp. - //! Vector copy constructor. - // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source); - - //! Destructor. - virtual ~EpetraVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value){}; - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value){}; - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value){}; - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value){}; - - //@} - - //! @name Mathematical methods - //@{ - - //! Computes dot product of this Vector against input Vector x. - Scalar dot(const Vector &a) const { return Teuchos::ScalarTraits::zero(); }; - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); }; - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); }; - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); }; - - //! Compute Weighted 2-norm (RMS Norm) of this Vector. - // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const; - - //! Compute mean (average) value of this Vector. - Scalar meanValue() const { return Teuchos::ScalarTraits::zero(); }; - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {}; - - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_Vector object - EpetraVectorT(const Teuchos::RCP &vec) - : EpetraMultiVectorT(vec) { // TODO: removed const of Epetra::Vector - TEUCHOS_TEST_FOR_EXCEPTION(true, Xpetra::Exceptions::RuntimeError, - "Xpetra::EpetraVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)"); - } - - //! Get the underlying Epetra vector - Epetra_Vector *getEpetra_Vector() const { return NULL; /*return (*this->EpetraMultiVectorT::getEpetra_MultiVector())(0);*/ } - // RCP getEpetra_Vector() const { return this->EpetraMultiVectorT::getEpetra_MultiVector()->getVectorNonConst(0); } - - //! This constructor creates a Vector which is a view of column j of the MultiVector 'mv'. - //! It implements the logic of MultiVector::getVector/getVectorNonConst() for Epetra MultiVector. - //! The newly created Xpetra::EpetraVectorT will remain valid after the disappearance of the references to 'mv' in user code. - EpetraVectorT(const RCP &mv, size_t j) - : EpetraMultiVectorT(mv){}; - - //@} - - private: - // This private member is only used by the constructor EpetraVectorT(const RCP > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT) - // TODO remove this... - const RCP internalRefToBaseMV_; - -}; // EpetraVectorT class - -// specialization on GO=int and Node=Serial -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -template <> -class EpetraVectorT - : public virtual Vector, public EpetraMultiVectorT { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - - public: - using EpetraMultiVectorT::dot; // overloading, not hiding - using EpetraMultiVectorT::norm1; // overloading, not hiding - using EpetraMultiVectorT::norm2; // overloading, not hiding - using EpetraMultiVectorT::normInf; // overloading, not hiding - using EpetraMultiVectorT::meanValue; // overloading, not hiding - using EpetraMultiVectorT::replaceGlobalValue; // overloading, not hiding - using EpetraMultiVectorT::sumIntoGlobalValue; // overloading, not hiding - using EpetraMultiVectorT::replaceLocalValue; // overloading, not hiding - using EpetraMultiVectorT::sumIntoLocalValue; // overloading, not hiding - - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraVectorT(const Teuchos::RCP > &map, bool zeroOut = true) - : EpetraMultiVectorT(map, 1, zeroOut) {} - - // Commenting out since no definition provided in cpp. - //! Vector copy constructor. - // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source); - - //! Destructor. - virtual ~EpetraVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::replaceGlobalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->ReplaceGlobalValue(globalRow, 0, value); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::sumIntoGlobalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->SumIntoGlobalValue(globalRow, 0, value); - } - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::replaceLocalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->ReplaceMyValue(myRow, 0, value); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::sumIntoLocalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->SumIntoMyValue(myRow, 0, value); - } - - //@} - - //! @name Mathematical methods - //@{ - - //! Computes dot product of this Vector against input Vector x. - Scalar dot(const Vector &a) const { - XPETRA_MONITOR("EpetraVectorT::dot"); - - XPETRA_DYNAMIC_CAST(const EpetraVectorT, a, tA, "This Xpetra::EpetraVectorT method only accept Xpetra::EpetraVectorT as input arguments."); - // return getEpetra_Vector()->Dot(*tA.getEpetra_Vector()); - - // other way: use the MultiVector Dot instead of VectorDot: - double r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Epetra_MultiVector::Dot(*tA.getEpetra_MultiVector(), &r); - return r; - } - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { - XPETRA_MONITOR("EpetraVectorT::norm1"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Norm1(&r); - return r; - } - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { - XPETRA_MONITOR("EpetraVectorT::norm2"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Norm2(&r); - return r; - } - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { - XPETRA_MONITOR("EpetraVectorT::normInf"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->NormInf(&r); - return r; - } - - //! Compute Weighted 2-norm (RMS Norm) of this Vector. - // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const; - - //! Compute mean (average) value of this Vector. - Scalar meanValue() const { - XPETRA_MONITOR("EpetraVectorT::meanValue"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->MeanValue(&r); - return r; - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraVectorT::description"); - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraVectorT::describe"); - - if (verbLevel > Teuchos::VERB_NONE) { - getEpetra_Vector()->Print(out); - } - } - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_Vector object - EpetraVectorT(const Teuchos::RCP &vec) - : EpetraMultiVectorT(vec) {} // TODO: removed const of Epetra::Vector - - //! Get the underlying Epetra vector - Epetra_Vector *getEpetra_Vector() const { return (*this->EpetraMultiVectorT::getEpetra_MultiVector())(0); } - // RCP getEpetra_Vector() const { return this->EpetraMultiVectorT::getEpetra_MultiVector()->getVectorNonConst(0); } - - //! This constructor creates a Vector which is a view of column j of the MultiVector 'mv'. - //! It implements the logic of MultiVector::getVector/getVectorNonConst() for Epetra MultiVector. - //! The newly created Xpetra::EpetraVectorT will remain valid after the disappearance of the references to 'mv' in user code. - EpetraVectorT(const RCP &mv, size_t j) - : EpetraMultiVectorT(rcp((*mv)(j), false)) - , // view of the vector number j. false == I do not own the data. - internalRefToBaseMV_(mv) // keep an internal reference to the initial MultiVector to avoid desallocation of the view. - { - // The view of the internal data of 'mv' is only valid until the destruction of 'mv'. - // The new vector hold an internal reference to 'mv' in order to keep the view valid after disappearance of 'mv' references in user code. - // This implements the logic of subArray rcp (as required by the Tpetra interface). - } - - //@} - - private: - // This private member is only used by the constructor EpetraVectorT(const RCP > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT) - const RCP internalRefToBaseMV_; -}; -#endif - -// specialization on GO=long long and Node=Serial -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -template <> -class EpetraVectorT - : public virtual Vector, public EpetraMultiVectorT { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - - public: - using EpetraMultiVectorT::dot; // overloading, not hiding - using EpetraMultiVectorT::norm1; // overloading, not hiding - using EpetraMultiVectorT::norm2; // overloading, not hiding - using EpetraMultiVectorT::normInf; // overloading, not hiding - using EpetraMultiVectorT::meanValue; // overloading, not hiding - using EpetraMultiVectorT::replaceGlobalValue; // overloading, not hiding - using EpetraMultiVectorT::sumIntoGlobalValue; // overloading, not hiding - using EpetraMultiVectorT::replaceLocalValue; // overloading, not hiding - using EpetraMultiVectorT::sumIntoLocalValue; // overloading, not hiding - - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - explicit EpetraVectorT(const Teuchos::RCP > &map, bool zeroOut = true) - : EpetraMultiVectorT(map, 1, zeroOut) {} - - // Commenting out since no definition provided in cpp. - //! Vector copy constructor. - // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source); - - //! Destructor. - virtual ~EpetraVectorT() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::replaceGlobalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->ReplaceGlobalValue(globalRow, 0, value); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::sumIntoGlobalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->SumIntoGlobalValue(globalRow, 0, value); - } - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::replaceLocalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->ReplaceMyValue(myRow, 0, value); - } - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) { - XPETRA_MONITOR("EpetraVectorT::sumIntoLocalValue"); - this->EpetraMultiVectorT::getEpetra_MultiVector()->SumIntoMyValue(myRow, 0, value); - } - - //@} - - //! @name Mathematical methods - //@{ - - //! Computes dot product of this Vector against input Vector x. - Scalar dot(const Vector &a) const { - XPETRA_MONITOR("EpetraVectorT::dot"); - - XPETRA_DYNAMIC_CAST(const EpetraVectorT, a, tA, "This Xpetra::EpetraVectorT method only accept Xpetra::EpetraVectorT as input arguments."); - // return getEpetra_Vector()->Dot(*tA.getEpetra_Vector()); - - // other way: use the MultiVector Dot instead of VectorDot: - double r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Epetra_MultiVector::Dot(*tA.getEpetra_MultiVector(), &r); - return r; - } - - //! Return 1-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm1() const { - XPETRA_MONITOR("EpetraVectorT::norm1"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Norm1(&r); - return r; - } - - //! Compute 2-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType norm2() const { - XPETRA_MONITOR("EpetraVectorT::norm2"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->Norm2(&r); - return r; - } - - //! Compute Inf-norm of this Vector. - Teuchos::ScalarTraits::magnitudeType normInf() const { - XPETRA_MONITOR("EpetraVectorT::normInf"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->NormInf(&r); - return r; - } - - //! Compute Weighted 2-norm (RMS Norm) of this Vector. - // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const; - - //! Compute mean (average) value of this Vector. - Scalar meanValue() const { - XPETRA_MONITOR("EpetraVectorT::meanValue"); - Scalar r; - this->EpetraMultiVectorT::getEpetra_MultiVector()->MeanValue(&r); - return r; - } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { - XPETRA_MONITOR("EpetraVectorT::description"); - // This implementation come from Epetra_Vector_def.hpp (without modification) - std::ostringstream oss; - oss << Teuchos::Describable::description(); - oss << "{length=" << this->getGlobalLength() - << "}"; - return oss.str(); - } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const { - XPETRA_MONITOR("EpetraVectorT::describe"); - - if (verbLevel > Teuchos::VERB_NONE) { - getEpetra_Vector()->Print(out); - } - } - //@} - - //! @name Xpetra specific - //@{ - - //! EpetraMultiVectorT constructor to wrap a Epetra_Vector object - EpetraVectorT(const Teuchos::RCP &vec) - : EpetraMultiVectorT(vec) {} // TODO: removed const of Epetra::Vector - - //! Get the underlying Epetra vector - Epetra_Vector *getEpetra_Vector() const { return (*this->EpetraMultiVectorT::getEpetra_MultiVector())(0); } - // RCP getEpetra_Vector() const { return this->EpetraMultiVectorT::getEpetra_MultiVector()->getVectorNonConst(0); } - - //! This constructor creates a Vector which is a view of column j of the MultiVector 'mv'. - //! It implements the logic of MultiVector::getVector/getVectorNonConst() for Epetra MultiVector. - //! The newly created Xpetra::EpetraVectorT will remain valid after the disappearance of the references to 'mv' in user code. - EpetraVectorT(const RCP &mv, size_t j) - : EpetraMultiVectorT(rcp((*mv)(j), false)) - , // view of the vector number j. false == I do not own the data. - internalRefToBaseMV_(mv) // keep an internal reference to the initial MultiVector to avoid desallocation of the view. - { - // The view of the internal data of 'mv' is only valid until the destruction of 'mv'. - // The new vector hold an internal reference to 'mv' in order to keep the view valid after disappearance of 'mv' references in user code. - // This implements the logic of subArray rcp (as required by the Tpetra interface). - } - - //@} - - private: - // This private member is only used by the constructor EpetraVectorT(const RCP > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT) - const RCP internalRefToBaseMV_; -}; -#endif - -} // namespace Xpetra - -#endif // XPETRA_EPETRAVECTOR_HPP diff --git a/packages/xpetra/src/Vector/Xpetra_EpetraVectorFactory.cpp b/packages/xpetra/src/Vector/Xpetra_EpetraVectorFactory.cpp deleted file mode 100644 index 4483425b2b0e..000000000000 --- a/packages/xpetra/src/Vector/Xpetra_EpetraVectorFactory.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include "Xpetra_VectorFactory.hpp" -#include "Xpetra_Vector.hpp" -#include "Xpetra_BlockedVector.hpp" - -namespace Xpetra { - -#if defined(HAVE_XPETRA_EPETRA) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -RCP> -VectorFactory:: - Build(const Teuchos::RCP>& map, bool zeroOut) { - XPETRA_MONITOR("VectorFactory::Build"); - - RCP> - bmap = Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new Xpetra::BlockedVector(bmap, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraVector(map, zeroOut)); - } -#endif // HAVE_XPETRA_TPETRA - - if (map->lib() == UseEpetra) { - return rcp(new EpetraVectorT(map, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -RCP> -VectorFactory:: - Build(const Teuchos::RCP>& map, bool zeroOut) { - XPETRA_MONITOR("VectorFactory::Build"); - - RCP> bmap = - Teuchos::rcp_dynamic_cast>(map); - if (!bmap.is_null()) { - return rcp(new Xpetra::BlockedVector(bmap, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraVector(map, zeroOut)); - } -#endif - - if (map->lib() == UseEpetra) { - return rcp(new EpetraVectorT(map, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -RCP> -VectorFactory:: - Build(const Teuchos::RCP>& map, bool zeroOut) { - XPETRA_MONITOR("VectorFactory::Build"); - - RCP> bmap = - Teuchos::rcp_dynamic_cast>(map); - if (!bmap.is_null()) { - return rcp(new Xpetra::BlockedVector(bmap, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraVector(map, zeroOut)); - } -#endif // HAVE_XPETRA_TPETRA - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntVectorT(map, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -RCP> -VectorFactory:: - Build(const Teuchos::RCP>& map, bool zeroOut) { - XPETRA_MONITOR("VectorFactory::Build"); - - RCP> bmap = - Teuchos::rcp_dynamic_cast>(map); - - if (!bmap.is_null()) { - return rcp(new Xpetra::BlockedVector(bmap, zeroOut)); - } - -#ifdef HAVE_XPETRA_TPETRA - if (map->lib() == UseTpetra) { - return rcp(new TpetraVector(map, zeroOut)); - } -#endif // HAVE_XPETRA_TPETRA - - if (map->lib() == UseEpetra) { - return rcp(new EpetraIntVectorT(map, zeroOut)); - } - - XPETRA_FACTORY_END; -} - -#endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // #if defined(HAVE_XPETRA_EPETRA) - -} // namespace Xpetra diff --git a/packages/xpetra/src/Vector/Xpetra_TpetraVector_def.hpp b/packages/xpetra/src/Vector/Xpetra_TpetraVector_def.hpp index b97c4df627c6..bc1f8986d754 100644 --- a/packages/xpetra/src/Vector/Xpetra_TpetraVector_def.hpp +++ b/packages/xpetra/src/Vector/Xpetra_TpetraVector_def.hpp @@ -128,267 +128,6 @@ TpetraVector:: return this->TpetraMultiVector::getTpetra_MultiVector()->getVectorNonConst(0); } -#ifdef HAVE_XPETRA_EPETRA - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -// specialization of TpetraVector for GO=int and NO=SerialNode -template -class TpetraVector - : public virtual Vector, public TpetraMultiVector { - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_TPETRAMULTIVECTOR_SHORT -#undef XPETRA_TPETRAVECTOR_SHORT -#include "Xpetra_UseShortNames.hpp" -#define XPETRA_TPETRAMULTIVECTOR_SHORT -#define XPETRA_TPETRAVECTOR_SHORT - - public: - using TpetraMultiVector::dot; // overloading, not hiding - using TpetraMultiVector::norm1; // overloading, not hiding - using TpetraMultiVector::norm2; // overloading, not hiding - using TpetraMultiVector::normInf; // overloading, not hiding - using TpetraMultiVector::meanValue; // overloading, not hiding - using TpetraMultiVector::replaceGlobalValue; // overloading, not hiding - using TpetraMultiVector::sumIntoGlobalValue; // overloading, not hiding - using TpetraMultiVector::replaceLocalValue; // overloading, not hiding - using TpetraMultiVector::sumIntoLocalValue; // overloading, not hiding - - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - TpetraVector(const Teuchos::RCP& map, bool zeroOut = true) - : TpetraMultiVector(map, 1, zeroOut) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Set multi-vector values from an array using Teuchos memory management classes. (copy) - TpetraVector(const Teuchos::RCP& map, const Teuchos::ArrayView& A) - : TpetraMultiVector(map, A, map->getLocalNumElements(), 1) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "int", - typeid(EpetraNode).name()); - } - - virtual ~TpetraVector() {} - - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar& value) {} - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar& value) {} - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar& value) {} - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar& value) {} - - //@} - - //! @name Mathematical methods - //@{ - - //! Return 1-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType norm1() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute 2-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType norm2() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute Inf-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType normInf() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute mean (average) value of this Vector. - Scalar meanValue() const { return Teuchos::ScalarTraits::zero(); } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream& out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Computes dot product of this Vector against input Vector x. - Scalar dot(const Vector& a) const { return Teuchos::ScalarTraits::zero(); } - - //! @name Xpetra specific - //@{ - - //! TpetraMultiVector constructor to wrap a Tpetra::MultiVector object - TpetraVector(const Teuchos::RCP>& vec) - : TpetraMultiVector(vec) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "int", - typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra multivector - RCP> - getTpetra_Vector() const { - return Teuchos::null; - } - - //@} - -}; // TpetraVector class (specialization on GO=int, NO=EpetraNode) - -#endif // #if((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) - // || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) - -#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -// specialization of TpetraVector for GO=int and NO=SerialNode -template -class TpetraVector - : public virtual Vector, public TpetraMultiVector { - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_TPETRAMULTIVECTOR_SHORT -#undef XPETRA_TPETRAVECTOR_SHORT -#include "Xpetra_UseShortNames.hpp" -#define XPETRA_TPETRAMULTIVECTOR_SHORT -#define XPETRA_TPETRAVECTOR_SHORT - - public: - using TpetraMultiVector::dot; // overloading, not hiding - using TpetraMultiVector::norm1; // overloading, not hiding - using TpetraMultiVector::norm2; // overloading, not hiding - using TpetraMultiVector::normInf; // overloading, not hiding - using TpetraMultiVector::meanValue; // overloading, not hiding - using TpetraMultiVector::replaceGlobalValue; // overloading, not hiding - using TpetraMultiVector::sumIntoGlobalValue; // overloading, not hiding - using TpetraMultiVector::replaceLocalValue; // overloading, not hiding - using TpetraMultiVector::sumIntoLocalValue; // overloading, not hiding - - //! @name Constructor/Destructor Methods - //@{ - - //! Sets all vector entries to zero. - TpetraVector(const Teuchos::RCP& map, bool zeroOut = true) - : TpetraMultiVector(map, 1, zeroOut) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Set multi-vector values from an array using Teuchos memory management classes. (copy) - TpetraVector(const Teuchos::RCP& map, const Teuchos::ArrayView& A) - : TpetraMultiVector(map, A, map->getLocalNumElements(), 1) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Destructor. - virtual ~TpetraVector() {} - - //@} - - //! @name Post-construction modification routines - //@{ - - //! Replace current value at the specified location with specified value. - void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar& value) {} - - //! Adds specified value to existing value at the specified location. - void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar& value) {} - - //! Replace current value at the specified location with specified values. - void replaceLocalValue(LocalOrdinal myRow, const Scalar& value) {} - - //! Adds specified value to existing value at the specified location. - void sumIntoLocalValue(LocalOrdinal myRow, const Scalar& value) {} - - //@} - - //! @name Mathematical methods - //@{ - - //! Return 1-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType norm1() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute 2-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType norm2() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute Inf-norm of this Vector. - typename Teuchos::ScalarTraits::magnitudeType normInf() const { - return Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero()); - } - - //! Compute mean (average) value of this Vector. - Scalar meanValue() const { return Teuchos::ScalarTraits::zero(); } - - //@} - - //! @name Overridden from Teuchos::Describable - //@{ - - //! Return a simple one-line description of this object. - std::string description() const { return std::string(""); } - - //! Print the object with some verbosity level to an FancyOStream object. - void describe(Teuchos::FancyOStream& out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {} - - //@} - - //! Computes dot product of this Vector against input Vector x. - Scalar dot(const Vector& a) const { return Teuchos::ScalarTraits::zero(); } - - //! Compute Weighted 2-norm (RMS Norm) of this Vector. - - //! @name Xpetra specific - //@{ - - //! TpetraMultiVector constructor to wrap a Tpetra::MultiVector object - TpetraVector(const Teuchos::RCP>& vec) { - XPETRA_TPETRA_ETI_EXCEPTION(typeid(TpetraVector).name(), - typeid(TpetraVector).name(), - "long long", - typeid(EpetraNode).name()); - } - - //! Get the underlying Tpetra multivector - RCP> - getTpetra_Vector() const { - return Teuchos::null; - } - - //@} - -}; // TpetraVector class (specialization on GO=long long, NO=EpetraNode) - -#endif // #if((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) - // || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) - -#endif // HAVE_XPETRA_EPETRA } // namespace Xpetra #endif diff --git a/packages/xpetra/src/Vector/Xpetra_VectorFactory_decl.hpp b/packages/xpetra/src/Vector/Xpetra_VectorFactory_decl.hpp index a8c394451d0a..4c188e891610 100644 --- a/packages/xpetra/src/Vector/Xpetra_VectorFactory_decl.hpp +++ b/packages/xpetra/src/Vector/Xpetra_VectorFactory_decl.hpp @@ -13,13 +13,7 @@ #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_Vector.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraVector_decl.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraVector.hpp" -#include "Xpetra_EpetraIntVector.hpp" -#endif #include "Xpetra_BlockedMap_decl.hpp" #include "Xpetra_BlockedVector_decl.hpp" @@ -52,11 +46,9 @@ class VectorFactory { return rcp(new Xpetra::BlockedVector(bmap, zeroOut)); } -#ifdef HAVE_XPETRA_TPETRA if (map->lib() == UseTpetra) { return rcp(new TpetraVector(map, zeroOut)); } -#endif XPETRA_FACTORY_ERROR_IF_EPETRA(map->lib()); XPETRA_FACTORY_END; @@ -67,119 +59,6 @@ class VectorFactory { #define XPETRA_VECTORFACTORY_SHORT -#if defined(HAVE_XPETRA_EPETRA) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// Specialization for Scalar=double, LO=GO=int and EpetraNode node -// Used both for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only -template <> -class VectorFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_VECTORFACTORY_SHORT -#include "Xpetra_UseShortNames.hpp" - - private: - //! Private constructor. This is a static class. - VectorFactory() = default; - - public: - static RCP> - Build(const Teuchos::RCP>& map, - bool zeroOut = true); -}; -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// Specialization for Scalar=double, LO=int, GO=long long and EpetraNode -// Used both for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -template <> -class VectorFactory { - typedef double Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_VECTORFACTORY_SHORT -#include "Xpetra_UseShortNames.hpp" - - private: - //! Private constructor. This is a static class. - VectorFactory() = default; - - public: - static RCP> - Build(const Teuchos::RCP>& map, - bool zeroOut = true); -}; -#endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) -#define XPETRA_VECTORFACTORY_SHORT - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// Specialization for Scalar=int, LO=GO=int and EpetraNode -// Used both for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only -template <> -class VectorFactory { - typedef int Scalar; - typedef int LocalOrdinal; - typedef int GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_VECTORFACTORY_SHORT -#include "Xpetra_UseShortNames.hpp" - - private: - //! Private constructor. This is a static class. - VectorFactory() = default; - - public: - static RCP> - Build(const Teuchos::RCP>& map, - bool zeroOut = true); -}; -#endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES) - -// we need the Epetra specialization only if Epetra is enabled -#if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -// Specialization for Scalar=int, LO=int, GO=long long and Serial node -// Used both for Epetra and Tpetra -// For any other node definition the general default implementation is used which allows Tpetra only - -template <> -class VectorFactory { - typedef int Scalar; - typedef int LocalOrdinal; - typedef long long GlobalOrdinal; - typedef EpetraNode Node; - -#undef XPETRA_VECTORFACTORY_SHORT -#include "Xpetra_UseShortNames.hpp" - - private: - //! Private constructor. This is a static class. - VectorFactory() = default; - - public: - static RCP> - Build(const Teuchos::RCP>& map, - bool zeroOut = true); -}; -#endif // !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES) - -#endif // #if defined(HAVE_XPETRA_EPETRA) - } // namespace Xpetra #define XPETRA_VECTORFACTORY_SHORT diff --git a/packages/xpetra/test/BlockedCrsMatrix/BlockedCrsMatrix_UnitTests.cpp b/packages/xpetra/test/BlockedCrsMatrix/BlockedCrsMatrix_UnitTests.cpp deleted file mode 100644 index 42e6a0dcd79d..000000000000 --- a/packages/xpetra/test/BlockedCrsMatrix/BlockedCrsMatrix_UnitTests.cpp +++ /dev/null @@ -1,3058 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#include "mpi.h" -#endif -#include "Epetra_SerialComm.h" - -#include - -#ifdef HAVE_XPETRA_EPETRAEXT -// EpetraExt -#include "EpetraExt_CrsMatrixIn.h" -#include "EpetraExt_VectorIn.h" -#include "EpetraExt_VectorOut.h" -#include "EpetraExt_MatrixMatrix.h" -#include "EpetraExt_RowMatrixOut.h" -#endif - -// Epetra routines to split matrix and maps -#include "BlockedMatrixTestHelpers.hpp" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace XpetraBlockMatrixTests { - -bool testMpi = true; -double errorTolSlack = 1e+1; - -Teuchos::RCP> getDefaultComm() { - if (testMpi) { - return Xpetra::DefaultPlatform::getDefaultPlatform().getComm(); - } - return rcp(new Teuchos::SerialComm()); -} - -///////////////////////////////////////////////////// - -TEUCHOS_STATIC_SETUP() { - Teuchos::CommandLineProcessor& clp = Teuchos::UnitTestRepository::getCLP(); - clp.addOutputSetupOptions(true); - clp.setOption( - "test-mpi", "test-serial", &testMpi, - "Test MPI (if available) or force test of serial. In a serial build," - " this option is ignored and a serial comm is always used."); - clp.setOption( - "error-tol-slack", &errorTolSlack, - "Slack off of machine epsilon used to check test results"); -} - -// -// UNIT TESTS -// - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, SplitMatrix, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - // generate problem - GO nEle = 63; - const Teuchos::RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - LO NumMyElements = map->getLocalNumElements(); - GO NumGlobalElements = map->getGlobalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - Teuchos::RCP> A = - Xpetra::CrsMatrixFactory::Build(map, 3); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == true || A->isFillActive() == false, std::runtime_error, ""); - - for (LO i = 0; i < NumMyElements; i++) { - if (MyGlobalElements[i] == 0) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(Teuchos::as(i) * STS::one(), -1.0)); - } else if (MyGlobalElements[i] == NumGlobalElements - 1) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i]), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one())); - } else { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one(), -1.0)); - } - } - - A->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == false || A->isFillActive() == true, std::runtime_error, ""); - - Teuchos::RCP> mat = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(A)); - - Teuchos::Array gids1; - Teuchos::Array gids2; - for (LO i = 0; i < NumMyElements; i++) { - if (i % 3 < 2) - gids1.push_back(map->getGlobalElement(i)); - else - gids2.push_back(map->getGlobalElement(i)); - } - - const Teuchos::RCP map1 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids1.view(0, gids1.size()), - 0, - comm); - const Teuchos::RCP map2 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids2.view(0, gids2.size()), - 0, - comm); - - std::vector> xmaps; - xmaps.push_back(map1); - xmaps.push_back(map2); - - Teuchos::RCP rowMapExtractormap_extractor = MapExtractorFactoryClass::Build(map, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*mat, rowMapExtractormap_extractor, rowMapExtractormap_extractor); - - // build gloabl vector with one entries - Teuchos::RCP ones = VectorFactoryClass::Build(map, true); - Teuchos::RCP exp = VectorFactoryClass::Build(map, true); - Teuchos::RCP res = VectorFactoryClass::Build(map, true); - Teuchos::RCP rnd = VectorFactoryClass::Build(map, true); - ones->putScalar(STS::one()); - rnd->randomize(); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol1 = Teuchos::ScalarTraits::eps(); - magnitudeType tol2 = 500 * tol1; - - A->apply(*ones, *exp); - bOp->apply(*ones, *res); - res->update(-STS::one(), *exp, STS::one()); - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol1, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol1, out, success); - - A->apply(*rnd, *exp); - bOp->apply(*rnd, *res); - res->update(-STS::one(), *exp, STS::one()); - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol2, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol2, out, success); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, CreateBlockedDiagonalOp, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 4; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - GO goNumRows = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(bop->Rows(), 4); - TEST_EQUALITY(bop->Cols(), 4); - TEST_EQUALITY(bop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(bop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 9); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 19); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 20); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 39); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getLocalNumElements(), 10); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getLocalNumElements(), 20); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getMinGlobalIndex(), comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getMinGlobalIndex(), comm->getRank() * 40 + 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 9); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getMinGlobalIndex(), comm->getRank() * 40 + 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 19); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getMinGlobalIndex(), comm->getRank() * 40 + 20); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 39); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getLocalNumElements(), 10); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getLocalNumElements(), 20); - - TEST_EQUALITY(bop->getMatrix(0, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(0, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - TEST_EQUALITY(bop->getMatrix(0, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(0, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - TEST_EQUALITY(bop->getMatrix(0, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(0, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - TEST_EQUALITY(bop->getMatrix(1, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(1, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - // TEST_EQUALITY(bop->getMatrix(1,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(2, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(2, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - // TEST_EQUALITY(bop->getMatrix(2,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 40); - TEST_EQUALITY(bop->getMatrix(3, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(3, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 4); - // TEST_EQUALITY(bop->getMatrix(3,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 40); - - TEST_EQUALITY(bop->getMatrix(2, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 10); - TEST_EQUALITY(bop->getMatrix(2, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 19); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 19); - TEST_EQUALITY(bop->getMatrix(2, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 40 + 10); - TEST_EQUALITY(bop->getMatrix(2, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 19); - - TEST_EQUALITY(bop->getMatrix(0, 0)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(2, 2)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(2, 3)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(1, 0)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(3, 1)->isFillComplete(), true); - - TEST_EQUALITY(bop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bop->getDomainMapExtractor()->getThyraMode(), false); - -#ifdef HAVE_XPETRA_DEBUG - TEST_THROW(bop->getRangeMap(0, true), Xpetra::Exceptions::RuntimeError); -#endif - - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(2)->getMinAllGlobalIndex(), 10); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(2)->getMaxAllGlobalIndex(), (comm->getSize() - 1) * 40 + 19); - - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMinGlobalIndex(), comm->getRank() * 40 + 20); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMaxGlobalIndex(), comm->getRank() * 40 + 39); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMinAllGlobalIndex(), 20); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMaxAllGlobalIndex(), comm->getSize() * 40 - 1); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, CreateBlockedDiagonalOpThyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 4; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - GO goNumRows = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(bop->Rows(), 4); - TEST_EQUALITY(bop->Cols(), 4); - TEST_EQUALITY(bop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(bop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - // Thyra GIDs - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 20); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 20 + 19); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(bop->getMatrix(0, 0)->getRowMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getRowMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getLocalNumElements(), 10); - TEST_EQUALITY(bop->getMatrix(3, 3)->getRowMap()->getLocalNumElements(), 20); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getMinGlobalIndex(), comm->getRank() * 20); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getMaxGlobalIndex(), comm->getRank() * 20 + 19); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(bop->getMatrix(0, 0)->getColMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(1, 1)->getColMap()->getLocalNumElements(), 5); - TEST_EQUALITY(bop->getMatrix(2, 2)->getColMap()->getLocalNumElements(), 10); - TEST_EQUALITY(bop->getMatrix(3, 3)->getColMap()->getLocalNumElements(), 20); - - TEST_EQUALITY(bop->getMatrix(0, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(0, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(0, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(0, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(0, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(0, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getMatrix(1, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(1, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - // TEST_EQUALITY(bop->getMatrix(1,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(2, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(2, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - // TEST_EQUALITY(bop->getMatrix(2,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 5); - TEST_EQUALITY(bop->getMatrix(3, 0)->getColMap()->getMinGlobalIndex(), std::numeric_limits::max()); // TODO - TEST_EQUALITY(bop->getMatrix(3, 0)->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - // TEST_EQUALITY(bop->getMatrix(3,0)->getColMap()->getMaxGlobalIndex(),comm->getRank() * 5); - - TEST_EQUALITY(bop->getMatrix(2, 1)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(bop->getMatrix(2, 1)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(bop->getMatrix(2, 2)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getMatrix(2, 3)->getRowMap()->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(bop->getMatrix(2, 3)->getRowMap()->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - - TEST_EQUALITY(bop->getMatrix(0, 0)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(2, 2)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(2, 3)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(1, 0)->isFillComplete(), true); - TEST_EQUALITY(bop->getMatrix(3, 1)->isFillComplete(), true); - - // check Xpetra replacement maps - TEST_EQUALITY(bop->getRangeMap(0, false)->getMinGlobalIndex(), comm->getRank() * 5 + 0); - TEST_EQUALITY(bop->getRangeMap(0, false)->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getRangeMap(1, false)->getMinGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5); - TEST_EQUALITY(bop->getRangeMap(1, false)->getMaxGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getRangeMap(2, false)->getMinGlobalIndex(), comm->getSize() * 10 + comm->getRank() * 10); - TEST_EQUALITY(bop->getRangeMap(2, false)->getMaxGlobalIndex(), comm->getSize() * 10 + comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getRangeMap(3, false)->getMinGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20); - TEST_EQUALITY(bop->getRangeMap(3, false)->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - - // check Thyra maps - TEST_EQUALITY(bop->getRangeMap(0)->getMinGlobalIndex(), comm->getRank() * 5 + 0); - TEST_EQUALITY(bop->getRangeMap(0)->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getRangeMap(1)->getMinGlobalIndex(), comm->getRank() * 5 + 0); - TEST_EQUALITY(bop->getRangeMap(1)->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(bop->getRangeMap(2)->getMinGlobalIndex(), comm->getRank() * 10 + 0); - TEST_EQUALITY(bop->getRangeMap(2)->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(bop->getRangeMap(3)->getMinGlobalIndex(), comm->getRank() * 20 + 0); - TEST_EQUALITY(bop->getRangeMap(3)->getMaxGlobalIndex(), comm->getRank() * 20 + 19); - - TEST_EQUALITY(bop->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bop->getRangeMap(0)->getMaxAllGlobalIndex(), comm->getSize() * 5 - 1); - TEST_EQUALITY(bop->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bop->getRangeMap(1)->getMaxAllGlobalIndex(), comm->getSize() * 5 - 1); - TEST_EQUALITY(bop->getRangeMap(2)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bop->getRangeMap(2)->getMaxAllGlobalIndex(), comm->getSize() * 10 - 1); - TEST_EQUALITY(bop->getRangeMap(3)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bop->getRangeMap(3)->getMaxAllGlobalIndex(), comm->getSize() * 20 - 1); - - TEST_EQUALITY(bop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bop->getDomainMapExtractor()->getThyraMode(), true); - - // check Xpetra replacement submaps - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMinGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMinAllGlobalIndex(), comm->getSize() * 20); - TEST_EQUALITY(bop->getRangeMapExtractor()->getMap(3, false)->getMaxAllGlobalIndex(), comm->getSize() * 40 - 1); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperator, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ [ 0 [ [1 2] 3] ] 4 [ 5 6 7] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - GO goNumRows = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(brop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - - // block 00 - Teuchos::RCP> brop00 = - Teuchos::rcp_dynamic_cast>(brop->getMatrix(0, 0)); - - GO goNumRows00 = Teuchos::as(Teuchos::ScalarTraits::pow(2, 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(brop00->Rows(), 2); - TEST_EQUALITY(brop00->Cols(), 2); - TEST_EQUALITY(brop00->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows00)); - TEST_EQUALITY(brop00->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows00)); - - // block 11 - Teuchos::RCP> brop11 = brop->getMatrix(1, 1); - - GO goNumRows11 = Teuchos::as(40 * comm->getSize()); - TEST_EQUALITY(brop11->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 40); - TEST_EQUALITY(brop11->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 79); - - Teuchos::RCP> brop11test = - Teuchos::rcp_dynamic_cast>(brop11); - TEST_INEQUALITY(brop11test, Teuchos::null); - - TEST_EQUALITY(brop11test->Rows(), 1); - TEST_EQUALITY(brop11test->Cols(), 1); - TEST_EQUALITY(brop11test->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11test->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11test->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 40); - TEST_EQUALITY(brop11test->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 79); - - // block 22 - Teuchos::RCP> brop22 = - Teuchos::rcp_dynamic_cast>(brop->getMatrix(2, 2)); - - GO goNumRows22 = Teuchos::as(560 * comm->getSize()); - - TEST_EQUALITY(brop22->Rows(), 3); - TEST_EQUALITY(brop22->Cols(), 3); - TEST_EQUALITY(brop22->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows22)); - TEST_EQUALITY(brop22->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows22)); - TEST_EQUALITY(brop22->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 80); - TEST_EQUALITY(brop22->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 639); - TEST_EQUALITY(brop22->getMatrix(0, 0)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 80); - TEST_EQUALITY(brop22->getMatrix(0, 0)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 159); - TEST_EQUALITY(brop22->getMatrix(1, 1)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 160); - TEST_EQUALITY(brop22->getMatrix(1, 1)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 319); - TEST_EQUALITY(brop22->getMatrix(2, 2)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 320); - TEST_EQUALITY(brop22->getMatrix(2, 2)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 639); - - // block 00_11 - Teuchos::RCP> brop00_11 = - Teuchos::rcp_dynamic_cast>(brop00->getMatrix(1, 1)); - - GO goNumRows00_11 = Teuchos::as(35 * comm->getSize()); - - TEST_EQUALITY(brop00_11->Rows(), 2); - TEST_EQUALITY(brop00_11->Cols(), 2); - TEST_EQUALITY(brop00_11->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows00_11)); - TEST_EQUALITY(brop00_11->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows00_11)); - TEST_EQUALITY(brop00_11->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 5); - TEST_EQUALITY(brop00_11->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 39); - TEST_EQUALITY(brop00_11->getMatrix(0, 0)->getRangeMap()->getGlobalNumElements(), Teuchos::as(15 * comm->getSize())); - TEST_EQUALITY(brop00_11->getMatrix(0, 0)->getDomainMap()->getGlobalNumElements(), Teuchos::as(15 * comm->getSize())); - TEST_EQUALITY(brop00_11->getMatrix(0, 0)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 5); - TEST_EQUALITY(brop00_11->getMatrix(0, 0)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 19); - TEST_EQUALITY(brop00_11->getMatrix(1, 1)->getRangeMap()->getGlobalNumElements(), Teuchos::as(20 * comm->getSize())); - TEST_EQUALITY(brop00_11->getMatrix(1, 1)->getDomainMap()->getGlobalNumElements(), Teuchos::as(20 * comm->getSize())); - TEST_EQUALITY(brop00_11->getMatrix(1, 1)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 20); - TEST_EQUALITY(brop00_11->getMatrix(1, 1)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 39); - - // block 01 - Teuchos::RCP> brop01 = - Teuchos::rcp_dynamic_cast>(brop->getMatrix(0, 1)); - - TEST_EQUALITY(brop01->Rows(), 2); - TEST_EQUALITY(brop01->Cols(), 1); - TEST_EQUALITY(brop01->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop01->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop01->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 0); - TEST_EQUALITY(brop01->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 39); - TEST_EQUALITY(brop01->getDomainMap()->getMinGlobalIndex(), comm->getRank() * 640 + 40); - TEST_EQUALITY(brop01->getDomainMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 79); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperator2, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 4 3 1 7 ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 4); - TEST_EQUALITY(brop->Cols(), 4); - TEST_EQUALITY(brop->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 385)); - TEST_EQUALITY(brop->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 385)); - - // block 00 - Teuchos::RCP> brop00 = brop->getMatrix(0, 0); - - TEST_EQUALITY(brop00->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop00->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop00->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 40); - TEST_EQUALITY(brop00->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 79); - - // block 11 - Teuchos::RCP> brop11 = brop->getMatrix(1, 1); - - TEST_EQUALITY(brop11->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(brop11->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(brop11->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 20); - TEST_EQUALITY(brop11->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 39); - - Teuchos::RCP> brop11test = - Teuchos::rcp_dynamic_cast>(brop11); - - TEST_EQUALITY(brop11test->Rows(), 1); - TEST_EQUALITY(brop11test->Cols(), 1); - TEST_EQUALITY(brop11test->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(brop11test->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(brop11test->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 20); - TEST_EQUALITY(brop11test->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 39); - - // block 22 - Teuchos::RCP> brop22 = brop->getMatrix(2, 2); - - TEST_EQUALITY(brop22->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 5); - TEST_EQUALITY(brop22->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 9); - - Teuchos::RCP> brop22test = - Teuchos::rcp_dynamic_cast>(brop22); - - TEST_EQUALITY(brop22test->Rows(), 1); - TEST_EQUALITY(brop22test->Cols(), 1); - TEST_EQUALITY(brop22test->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22test->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22test->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 5); - TEST_EQUALITY(brop22test->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 9); - - // block 33 - Teuchos::RCP> brop33 = brop->getMatrix(3, 3); - - TEST_EQUALITY(brop33->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 320); - TEST_EQUALITY(brop33->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 639); - - Teuchos::RCP> brop33test = - Teuchos::rcp_dynamic_cast>(brop33); - - TEST_EQUALITY(brop33test->Rows(), 1); - TEST_EQUALITY(brop33test->Cols(), 1); - TEST_EQUALITY(brop33test->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33test->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33test->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 640 + 320); - TEST_EQUALITY(brop33test->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 640 + 639); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorThyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Matrix Matrix; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::ReorderedBlockedCrsMatrix ReorderedBlockedCrsMatrix; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ [ 0 [ [1 2] 3] ] 4 [ 5 6 7] ]"); - - Teuchos::RCP brop = - Teuchos::rcp_dynamic_cast(buildReorderedBlockedCrsMatrix(brm, bop)); - - GO goNumRows = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(brop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - // block 00 - Teuchos::RCP brop00 = - Teuchos::rcp_dynamic_cast(brop->getMatrix(0, 0)); - - GO goNumRows00 = Teuchos::as(Teuchos::ScalarTraits::pow(2, 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(brop00->Rows(), 2); - TEST_EQUALITY(brop00->Cols(), 2); - TEST_EQUALITY(brop00->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop00->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop00->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows00)); - TEST_EQUALITY(brop00->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows00)); - TEST_EQUALITY(brop00->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 5 + 0); - TEST_EQUALITY(brop00->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - TEST_EQUALITY(brop00->getRangeMap()->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop00->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 40 - 1); - // Thyra maps (since it is a blocked matrix, they should be unique!) - TEST_EQUALITY(brop00->getRangeMap(0, true)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop00->getRangeMap(0, true)->getMaxAllGlobalIndex(), comm->getSize() * 5 - 1); - TEST_EQUALITY(brop00->getRangeMap(1, true)->getGlobalNumElements(), Teuchos::as(comm->getSize() * 35)); - TEST_EQUALITY(brop00->getRangeMap(1, true)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop00->getRangeMap(1, true)->getMaxAllGlobalIndex(), comm->getSize() * 35 - 1); - // Xpetra maps - TEST_EQUALITY(brop00->getRangeMap(0, false)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop00->getRangeMap(0, false)->getMaxAllGlobalIndex(), comm->getSize() * 5 - 1); - TEST_EQUALITY(brop00->getRangeMap(1, false)->getGlobalNumElements(), Teuchos::as(comm->getSize() * 35)); - TEST_EQUALITY(brop00->getRangeMap(1, false)->getMinAllGlobalIndex(), comm->getSize() * 5); - TEST_EQUALITY(brop00->getRangeMap(1, false)->getMaxAllGlobalIndex(), comm->getSize() * 5 + comm->getSize() * 35 - 1); - - // subblock 11 of block 00 - Teuchos::RCP sbrop11 = - Teuchos::rcp_dynamic_cast(brop00->getMatrix(1, 1)); - - TEST_EQUALITY(sbrop11->Rows(), 2); - TEST_EQUALITY(sbrop11->Cols(), 2); - TEST_EQUALITY(sbrop11->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(sbrop11->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(sbrop11->getRangeMap()->getGlobalNumElements(), Teuchos::as(35 * comm->getSize())); - TEST_EQUALITY(sbrop11->getDomainMap()->getGlobalNumElements(), Teuchos::as(35 * comm->getSize())); - TEST_EQUALITY(sbrop11->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - // Thyra maps (since it is a blocked matrix, they should be unique!) - TEST_EQUALITY(sbrop11->getRangeMap(0, true)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(sbrop11->getRangeMap(0, true)->getMaxAllGlobalIndex(), comm->getSize() * 5 + comm->getSize() * 10 - 1); - TEST_EQUALITY(sbrop11->getRangeMap(1, true)->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(sbrop11->getRangeMap(1, true)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(sbrop11->getRangeMap(1, true)->getMaxAllGlobalIndex(), comm->getSize() * 20 - 1); - // Xpetra maps - TEST_EQUALITY(sbrop11->getRangeMap(0, false)->getMinAllGlobalIndex(), comm->getSize() * 5); - TEST_EQUALITY(sbrop11->getRangeMap(0, false)->getMaxAllGlobalIndex(), comm->getSize() * 20 - 1); - TEST_EQUALITY(sbrop11->getRangeMap(1, false)->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(sbrop11->getRangeMap(1, false)->getMinAllGlobalIndex(), comm->getSize() * 20); - TEST_EQUALITY(sbrop11->getRangeMap(1, false)->getMaxAllGlobalIndex(), comm->getSize() * 40 - 1); - - // block 11 - Teuchos::RCP> brop11 = brop->getMatrix(1, 1); - - // Thyra GIDs for the matrix - GO goNumRows11 = Teuchos::as(40 * comm->getSize()); - TEST_EQUALITY(brop11->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows11)); - TEST_EQUALITY(brop11->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 0); - TEST_EQUALITY(brop11->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 39); - TEST_EQUALITY(brop11->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 40 + 0); - TEST_EQUALITY(brop11->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 40 + comm->getSize() * 40 - 1); - // Xpetra GIDs - TEST_EQUALITY(brop->getRangeMap(1, false)->getMinAllGlobalIndex(), comm->getSize() * 40); - TEST_EQUALITY(brop->getRangeMap(1, false)->getMaxAllGlobalIndex(), 2 * comm->getSize() * 40 - 1); - - Teuchos::RCP brop11test = - Teuchos::rcp_dynamic_cast(brop11); - - TEST_EQUALITY(brop11test->Rows(), 1); - TEST_EQUALITY(brop11test->Cols(), 1); - TEST_EQUALITY(brop11test->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40); - TEST_EQUALITY(brop11test->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 39); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 40 + 0); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 40 + 39); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 40 - 1); - - Teuchos::RCP crsmat11 = Teuchos::rcp_const_cast(brop11test)->getInnermostCrsMatrix(); - TEST_EQUALITY(crsmat11.is_null(), false); - Teuchos::ArrayView inds; - Teuchos::ArrayView vals; - crsmat11->getLocalRowView(0, inds, vals); - TEST_EQUALITY(inds.size(), 1); - TEST_EQUALITY(vals.size(), 1); - TEST_EQUALITY(inds[0], 0); - TEST_EQUALITY(vals[0], Teuchos::as(5.0) * Teuchos::ScalarTraits::one()); - - // block 22 - Teuchos::RCP brop22 = - Teuchos::rcp_dynamic_cast(brop->getMatrix(2, 2)); - - GO goNumRows22 = Teuchos::as(560 * comm->getSize()); - - TEST_EQUALITY(brop22->Rows(), 3); - TEST_EQUALITY(brop22->Cols(), 3); - TEST_EQUALITY(brop22->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows22)); - TEST_EQUALITY(brop22->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows22)); - // Xpetra replacement GIDs - TEST_EQUALITY(brop22->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 80); - TEST_EQUALITY(brop22->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 80 + comm->getSize() * 560 - 1); - TEST_EQUALITY(brop22->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 80 + comm->getSize() * 80); - TEST_EQUALITY(brop22->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 80 + comm->getSize() * 240 + comm->getRank() * 320 + 319); - // Xpetra GIDs - TEST_EQUALITY(brop22->getRangeMap(0, false)->getMinGlobalIndex(), comm->getSize() * 80 + comm->getRank() * 80); - TEST_EQUALITY(brop22->getRangeMap(0, false)->getMaxGlobalIndex(), comm->getSize() * 80 + comm->getRank() * 80 + 79); - TEST_EQUALITY(brop22->getRangeMap(1, false)->getMinGlobalIndex(), comm->getSize() * 160 + comm->getRank() * 160); - TEST_EQUALITY(brop22->getRangeMap(1, false)->getMaxGlobalIndex(), comm->getSize() * 160 + comm->getRank() * 160 + 159); - TEST_EQUALITY(brop22->getRangeMap(2, false)->getMinGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320); - TEST_EQUALITY(brop22->getRangeMap(2, false)->getMaxGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320 + 319); - - // block 00_11 - /*Teuchos::RCP > brop00_11 = - Teuchos::rcp_dynamic_cast >(brop00->getMatrix(1,1)); - - GO goNumRows00_11 = Teuchos::as(35 * comm->getSize()); - - TEST_EQUALITY(brop00_11->Rows(),2); - TEST_EQUALITY(brop00_11->Cols(),2); - TEST_EQUALITY(brop00_11->getRangeMap()->getGlobalNumElements(),goNumRows00_11); - TEST_EQUALITY(brop00_11->getDomainMap()->getGlobalNumElements(),goNumRows00_11); - TEST_EQUALITY(brop00_11->getRangeMap()->getMinGlobalIndex(),comm->getRank() * 640 + 5); - TEST_EQUALITY(brop00_11->getRangeMap()->getMaxGlobalIndex(),comm->getRank() * 640 + 39); - TEST_EQUALITY(brop00_11->getMatrix(0,0)->getRangeMap()->getGlobalNumElements(),15 * comm->getSize()); - TEST_EQUALITY(brop00_11->getMatrix(0,0)->getDomainMap()->getGlobalNumElements(),15 * comm->getSize()); - TEST_EQUALITY(brop00_11->getMatrix(0,0)->getRangeMap()->getMinGlobalIndex(),comm->getRank() * 640 + 5); - TEST_EQUALITY(brop00_11->getMatrix(0,0)->getRangeMap()->getMaxGlobalIndex(),comm->getRank() * 640 + 19); - TEST_EQUALITY(brop00_11->getMatrix(1,1)->getRangeMap()->getGlobalNumElements(),20 * comm->getSize()); - TEST_EQUALITY(brop00_11->getMatrix(1,1)->getDomainMap()->getGlobalNumElements(),20 * comm->getSize()); - TEST_EQUALITY(brop00_11->getMatrix(1,1)->getRangeMap()->getMinGlobalIndex(),comm->getRank() * 640 + 20); - TEST_EQUALITY(brop00_11->getMatrix(1,1)->getRangeMap()->getMaxGlobalIndex(),comm->getRank() * 640 + 39); -*/ - // block 01 - Teuchos::RCP brop01 = - Teuchos::rcp_dynamic_cast(brop->getMatrix(0, 1)); - - // Xpetra like maps - TEST_EQUALITY(brop01->Rows(), 2); - TEST_EQUALITY(brop01->Cols(), 1); - TEST_EQUALITY(brop01->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop01->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop01->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 5 + 0); - TEST_EQUALITY(brop01->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 5 + comm->getSize() * 15 + comm->getRank() * 20 + 19); - TEST_EQUALITY(brop01->getDomainMap()->getMinGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40); - TEST_EQUALITY(brop01->getDomainMap()->getMaxGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 39); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperator2Thyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 4 3 1 7 ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 4); - TEST_EQUALITY(brop->Cols(), 4); - TEST_EQUALITY(brop->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 385)); - TEST_EQUALITY(brop->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 385)); - - // block 00 - Teuchos::RCP> brop00 = brop->getMatrix(0, 0); - - TEST_EQUALITY(brop00->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop00->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - // Thyra GIDs - TEST_EQUALITY(brop00->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40); - TEST_EQUALITY(brop00->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 39); - TEST_EQUALITY(brop00->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 40); - TEST_EQUALITY(brop00->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 40 + comm->getSize() * 40 - 1); - // Xpetra GIDs - TEST_EQUALITY(brop->getDomainMap(0, false)->getMinGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40); - TEST_EQUALITY(brop->getDomainMap(0, false)->getMaxGlobalIndex(), comm->getSize() * 40 + comm->getRank() * 40 + 39); - - // block 11 - Teuchos::RCP> brop11 = brop->getMatrix(1, 1); - - TEST_EQUALITY(brop11->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(brop11->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 20)); - // Thyra GIDs (+ Xpetra shift) - TEST_EQUALITY(brop11->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20); - TEST_EQUALITY(brop11->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - TEST_EQUALITY(brop11->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 20 + 0); - TEST_EQUALITY(brop11->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 20 + comm->getSize() * 20 - 1); - - // Xpetra GIDs - TEST_EQUALITY(brop->getDomainMap(1, false)->getMinGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20); - TEST_EQUALITY(brop->getDomainMap(1, false)->getMaxGlobalIndex(), comm->getSize() * 20 + comm->getRank() * 20 + 19); - - Teuchos::RCP> brop11test = - Teuchos::rcp_dynamic_cast>(brop11); - - TEST_EQUALITY(brop11test->Rows(), 1); - TEST_EQUALITY(brop11test->Cols(), 1); - // Thyra GIDs - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 20); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 20 + 19); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop11test->getMatrix(0, 0)->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 20 - 1); - - // block 22 - Teuchos::RCP> brop22 = brop->getMatrix(2, 2); - - TEST_EQUALITY(brop22->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - TEST_EQUALITY(brop22->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5); - TEST_EQUALITY(brop22->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5 + 4); - TEST_EQUALITY(brop22->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 5 + 0); - TEST_EQUALITY(brop22->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 5 + comm->getSize() * 5 - 1); - // Xpetra GIDs - TEST_EQUALITY(brop->getDomainMap(2, false)->getMinGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5); - TEST_EQUALITY(brop->getDomainMap(2, false)->getMaxGlobalIndex(), comm->getSize() * 5 + comm->getRank() * 5 + 4); - - Teuchos::RCP> brop22test = - Teuchos::rcp_dynamic_cast>(brop22); - TEST_EQUALITY(brop22test->Rows(), 1); - TEST_EQUALITY(brop22test->Cols(), 1); - - // Thyra GIDs - TEST_EQUALITY(brop22test->getMatrix(0, 0)->getRangeMap()->getMinGlobalIndex(), comm->getRank() * 5); - TEST_EQUALITY(brop22test->getMatrix(0, 0)->getRangeMap()->getMaxGlobalIndex(), comm->getRank() * 5 + 4); - TEST_EQUALITY(brop22test->getMatrix(0, 0)->getRangeMap()->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(brop22test->getMatrix(0, 0)->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 5 - 1); - - // block 33 - Teuchos::RCP> brop33 = brop->getMatrix(3, 3); - - TEST_EQUALITY(brop33->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33->getDomainMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 320)); - TEST_EQUALITY(brop33->getRangeMap()->getMinGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320); - TEST_EQUALITY(brop33->getRangeMap()->getMaxGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320 + 319); - TEST_EQUALITY(brop33->getRangeMap()->getMinAllGlobalIndex(), comm->getSize() * 320 + 0); - TEST_EQUALITY(brop33->getRangeMap()->getMaxAllGlobalIndex(), comm->getSize() * 320 + comm->getSize() * 320 - 1); - // Xpetra GIDs - TEST_EQUALITY(brop->getDomainMap(3, false)->getMinGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320); - TEST_EQUALITY(brop->getDomainMap(3, false)->getMaxGlobalIndex(), comm->getSize() * 320 + comm->getRank() * 320 + 319); - - Teuchos::RCP> brop33test = - Teuchos::rcp_dynamic_cast>(brop33); - TEST_EQUALITY(brop33test->Rows(), 1); - TEST_EQUALITY(brop33test->Cols(), 1); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorApply, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map Map; - typedef Xpetra::BlockedMap BlockedMap; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::MultiVector MultiVectorClass; - typedef Xpetra::BlockedMultiVector BlockedMultiVectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MultiVectorFactory MultiVectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [ 1 [ 2 3 4 ] 5 ] [6 7] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - - // build gloabl vector with one entries - // The MultiVector objects "ones" and "exp" are BlockedMultiVectors with 8 sub blocks - // compatible to bop - Teuchos::RCP ones = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP exp = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - ones->putScalar(STS::one()); - bop->apply(*ones, *exp); - - // reorganize "ones" and "res" to be BlockedMultiVectors with 3 sub blocks (nested) - // compatible to brop - // They use and work with the same 8 sub vectors from "ones" and "exp" - Teuchos::RCP cones = Teuchos::rcp_const_cast(ones); - Teuchos::RCP brones = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cones)); - Teuchos::RCP res = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP cres = Teuchos::rcp_const_cast(res); - Teuchos::RCP brcres = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cres)); - Teuchos::RCP brres = Teuchos::rcp_const_cast(brcres); - - brop->apply(*brones, *brres); - - Teuchos::Array nn(res->getNumVectors()); - TEST_NOTHROW(res->norm1(nn)); - TEUCHOS_TEST_COMPARE(nn[0], >, 1e3, out, success); - - // res contains exactly the same data as brres, the only difference is - // that res is a MultiVector with 8 sub blocks and brres a MultiVector with - // 3 nested sub blocks (compatible to brop) - res->update(-STS::one(), *exp, STS::one()); - - nn[0] = STS::magnitude(STS::one()); - TEST_NOTHROW(res->norm1(nn)); - TEST_EQUALITY(nn[0], STS::zero()); - TEST_NOTHROW(res->norm2(nn)); - TEST_EQUALITY(nn[0], STS::zero()); - TEST_NOTHROW(res->normInf(nn)); - TEST_EQUALITY(nn[0], STS::zero()); - - // compatibility with plain maps - Teuchos::RCP map = bop->getRangeMap(); - Teuchos::RCP bmap = Teuchos::rcp_dynamic_cast(map); - Teuchos::RCP rgMap = bmap->getFullMap(); - - Teuchos::RCP vrnd = VectorFactoryClass::Build(rgMap, true); - Teuchos::RCP vexp = VectorFactoryClass::Build(rgMap, true); - Teuchos::RCP vres = VectorFactoryClass::Build(rgMap, true); - vrnd->randomize(); - - // apply with plain blocked operators works with plain vectors - TEST_NOTHROW(bop->apply(*vrnd, *vexp)); - - // nested blocked operators do not work with plain vectors - TEST_NOTHROW(brop->apply(*vrnd, *vres)); - - vres->update(-STS::one(), *vexp, STS::one()); - TEUCHOS_TEST_COMPARE(vres->norm2(), <, 5e-14, out, success); - TEUCHOS_TEST_COMPARE(vres->normInf(), <, 5e-14, out, success); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorApply2, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 6 3 2 ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - - // build gloabl vector with one entries - Teuchos::RCP ones = VectorFactoryClass::Build(brop->getFullRangeMap(), true); - Teuchos::RCP res = VectorFactoryClass::Build(brop->getFullRangeMap(), true); - ones->putScalar(STS::one()); - - brop->apply(*ones, *res); - - TEST_EQUALITY(res->norm1(), STS::magnitude(Teuchos::as(comm->getSize()) * Teuchos::as(1230))); - - // build gloabl vector with one entries (blocked version) - Teuchos::RCP bones = VectorFactoryClass::Build(brop->getDomainMap(), true); - Teuchos::RCP bres = VectorFactoryClass::Build(brop->getRangeMap(), true); - bones->putScalar(STS::one()); - - brop->apply(*bones, *bres); - - TEST_EQUALITY(bres->norm1(), STS::magnitude(Teuchos::as(comm->getSize()) * Teuchos::as(1230))); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorApplyThyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Vector VectorClass; - typedef Xpetra::MultiVector MultiVectorClass; - typedef Xpetra::BlockedMultiVector BlockedMultiVectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MultiVectorFactory MultiVectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [ 1 [ 2 3 4 ] 5 ] [6 7] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - // build gloabl vector with one entries - // The MultiVector objects "ones" and "exp" are BlockedMultiVectors with 8 sub blocks - // compatible to bop - Teuchos::RCP ones = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP exp = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - ones->putScalar(STS::one()); - bop->apply(*ones, *exp); - - // calculate 1-norm of result vector - Teuchos::Array nn(exp->getNumVectors()); - TEST_NOTHROW(exp->norm1(nn)); - TEST_EQUALITY(nn[0], comm->getSize() * 4485 * STS::magnitude(STS::one())); - - // overwrite result vector values - exp->putScalar(STS::magnitude(STS::zero())); - - // reorganize "ones" and "res" to be BlockedMultiVectors with 3 sub blocks (nested) - // compatible to brop - // They use and work with the same 8 sub vectors from "ones" and "exp" - Teuchos::RCP cones = Teuchos::rcp_const_cast(ones); - Teuchos::RCP brones = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cones)); - Teuchos::RCP res = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP cres = Teuchos::rcp_const_cast(res); - Teuchos::RCP brcres = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cres)); - Teuchos::RCP brres = Teuchos::rcp_const_cast(brcres); - - brop->apply(*brones, *brres); - - Teuchos::Array nn2(brres->getNumVectors()); - TEST_NOTHROW(brres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 4485 * STS::magnitude(STS::one())); - TEST_NOTHROW(res->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 4485 * STS::magnitude(STS::one())); - - Teuchos::RCP vones = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - Teuchos::RCP vres = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - vones->putScalar(STS::one()); - bop->apply(*vones, *vres); - - TEST_NOTHROW(vres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 4485 * STS::magnitude(STS::one())); - - // not supported, yet. doImport for BlockedMultiVectors missing - // fix this by checking the input vectors in the apply routine and switch to - // ReorderedBlockedMultiVectors. Does this fix the problem? Do it in a two stage fashion. - TEST_NOTHROW(brop->apply(*vones, *vres)); - TEST_NOTHROW(vres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 4485 * STS::magnitude(STS::one())); - - Teuchos::RCP vrnd2 = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - Teuchos::RCP vexp2 = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - Teuchos::RCP vres2 = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - vrnd2->randomize(); - - // apply with plain blocked operators works with plain vectors - TEST_NOTHROW(bop->apply(*vrnd2, *vexp2)); - - // nested blocked operators do not work with plain vectors - TEST_NOTHROW(brop->apply(*vrnd2, *vres2)); - - vres2->update(-STS::one(), *vexp2, STS::one()); - TEUCHOS_TEST_COMPARE(vres2->norm2(), <, 5e-14, out, success); - TEUCHOS_TEST_COMPARE(vres2->normInf(), <, 5e-14, out, success); - - // build gloabl vector with one entries (blocked version) - Teuchos::RCP bones = VectorFactoryClass::Build(brop->getDomainMap(), true); - Teuchos::RCP bres = VectorFactoryClass::Build(brop->getRangeMap(), true); - bones->putScalar(STS::one()); - - brop->apply(*bones, *bres); - - TEST_EQUALITY(bres->norm1(), STS::magnitude(Teuchos::as(comm->getSize()) * Teuchos::as(4485))); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorApplyThyraSmall, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Vector VectorClass; - typedef Xpetra::MultiVector MultiVectorClass; - typedef Xpetra::BlockedMultiVector BlockedMultiVectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MultiVectorFactory MultiVectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [ 1 2 ] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - // build gloabl vector with one entries - // The MultiVector objects "ones" and "exp" are BlockedMultiVectors with 8 sub blocks - // compatible to bop - Teuchos::RCP ones = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP exp = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - ones->putScalar(STS::one()); - bop->apply(*ones, *exp); - - // calculate 1-norm of result vector - Teuchos::Array nn(exp->getNumVectors()); - TEST_NOTHROW(exp->norm1(nn)); - TEST_EQUALITY(nn[0], comm->getSize() * 45 * STS::magnitude(STS::one())); - - // overwrite result vector values - exp->putScalar(STS::magnitude(STS::zero())); - - // exp->describe(out,Teuchos::VERB_EXTREME); - - // reorganize "ones" and "res" to be BlockedMultiVectors with 2 sub blocks (nested) - // compatible to brop - Teuchos::RCP cones = Teuchos::rcp_const_cast(ones); - Teuchos::RCP brones = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cones)); - Teuchos::RCP res = MultiVectorFactoryClass::Build(bop->getRangeMap(), 1, true); - Teuchos::RCP cres = Teuchos::rcp_const_cast(res); - Teuchos::RCP brcres = - Xpetra::buildReorderedBlockedMultiVector(brm, Teuchos::rcp_dynamic_cast(cres)); - Teuchos::RCP brres = Teuchos::rcp_const_cast(brcres); - - // Note: the result is both contained in res and brres. - // brres uses the same underlying vectors! - brop->apply(*brones, *brres); - - Teuchos::Array nn2(brres->getNumVectors()); - TEST_NOTHROW(brres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 45 * STS::magnitude(STS::one())); - TEST_NOTHROW(res->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 45 * STS::magnitude(STS::one())); - - Teuchos::RCP vones = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - Teuchos::RCP vres = VectorFactoryClass::Build(bop->getFullRangeMap(), true); - vones->putScalar(STS::one()); - bop->apply(*vones, *vres); - - TEST_NOTHROW(vres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 45 * STS::magnitude(STS::one())); - - // not supported, yet. doImport for BlockedMultiVectors missing - // fix this by checking the input vectors in the apply routine and switch to - // ReorderedBlockedMultiVectors. Does this fix the problem? Do it in a two stage fashion. - TEST_NOTHROW(brop->apply(*vones, *vres)); - - TEST_NOTHROW(vres->norm1(nn2)); - TEST_EQUALITY(nn2[0], comm->getSize() * 45 * STS::magnitude(STS::one())); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReorderBlockOperatorApply2Thyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 6 3 2 ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - // build gloabl vector with one entries - Teuchos::RCP ones = VectorFactoryClass::Build(brop->getFullRangeMap(), true); - Teuchos::RCP res = VectorFactoryClass::Build(brop->getFullRangeMap(), true); - ones->putScalar(STS::one()); - - brop->apply(*ones, *res); - - TEST_EQUALITY(res->norm1(), STS::magnitude(Teuchos::as(comm->getSize()) * Teuchos::as(1230))); - - // build gloabl vector with one entries (blocked version) - Teuchos::RCP bones = VectorFactoryClass::Build(brop->getDomainMap(), true); - Teuchos::RCP bres = VectorFactoryClass::Build(brop->getRangeMap(), true); - bones->putScalar(STS::one()); - - brop->apply(*bones, *bres); - - TEST_EQUALITY(bres->norm1(), STS::magnitude(Teuchos::as(comm->getSize()) * Teuchos::as(1230))); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ReadWriteBlockedMatrix, M, MA, Scalar, LO, GO, Node) { - // TODO: it seems that the Tpetra matrix reader is only working for standard maps?? - - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - // generate problem - GO nEle = 63; - const Teuchos::RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - LO NumMyElements = map->getLocalNumElements(); - GO NumGlobalElements = map->getGlobalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - Teuchos::RCP> A = - Xpetra::CrsMatrixFactory::Build(map, 3); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == true || A->isFillActive() == false, std::runtime_error, ""); - - for (LO i = 0; i < NumMyElements; i++) { - if (MyGlobalElements[i] == 0) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(Teuchos::as(i) * STS::one(), -1.0)); - } else if (MyGlobalElements[i] == NumGlobalElements - 1) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i]), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one())); - } else { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one(), -1.0)); - } - } - - A->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == false || A->isFillActive() == true, std::runtime_error, ""); - - Teuchos::RCP> mat = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(A)); - - Teuchos::Array gids1; - Teuchos::Array gids2; - for (LO i = 0; i < NumMyElements; i++) { - if (i % 3 < 2) - gids1.push_back(map->getGlobalElement(i)); - else - gids2.push_back(map->getGlobalElement(i)); - } - - const Teuchos::RCP map1 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids1.view(0, gids1.size()), - 0, - comm); - const Teuchos::RCP map2 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids2.view(0, gids2.size()), - 0, - comm); - - std::vector> xmaps; - xmaps.push_back(map1); - xmaps.push_back(map2); - - Teuchos::RCP rowMapExtractormap_extractor = MapExtractorFactoryClass::Build(map, xmaps); - - Teuchos::RCP> bMat = - Xpetra::MatrixUtils::SplitMatrix(*mat, rowMapExtractormap_extractor, rowMapExtractormap_extractor); - - // Write matrices out, read fine A back in, and check that the read was ok - // by using a matvec with a random vector. - // JJH: 22-Feb-2016 Append scalar type to file name. The theory is that for dashboard - // tests with multiple Scalar instantiations of this test, a test with Scalar type - // A could try to read in the results of the test with Scalar type B, simply because - // the test with type B overwrote A's output matrix file. A better solution would be - // to write to a file stream, but this would involve writing new interfaces to Epetra's - // file I/O capabilities. - std::string tname = "BLOCKEDMATRIX"; - tname = tname + typeid(Scalar).name(); - tname = tname + typeid(LO).name(); - tname = tname + typeid(GO).name(); -#ifdef HAVE_MUELU_KOKKOS - std::string nn = Tpetra::KokkosCompat::KokkosDeviceWrapperNode::name(); - nn.erase(std::remove(nn.begin(), nn.end(), '/'), nn.end()); - tname = tname + nn; -#endif - tname = "_" + tname; - - const bool writeAllMaps = true; - Xpetra::IO::WriteBlockedCrsMatrix(tname, *bMat, writeAllMaps); - Teuchos::RCP> bMat2 = Xpetra::IO::ReadBlockedCrsMatrix(tname, lib, comm); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getGlobalNumEntries(), bMat2->getMatrix(0, 0)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getGlobalNumEntries(), bMat2->getMatrix(0, 1)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getGlobalNumEntries(), bMat2->getMatrix(1, 0)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getGlobalNumEntries(), bMat2->getMatrix(1, 1)->getGlobalNumEntries()); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getLocalNumEntries(), bMat2->getMatrix(0, 0)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getLocalNumEntries(), bMat2->getMatrix(0, 1)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getLocalNumEntries(), bMat2->getMatrix(1, 0)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getLocalNumEntries(), bMat2->getMatrix(1, 1)->getLocalNumEntries()); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getFrobeniusNorm(), bMat2->getMatrix(0, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getFrobeniusNorm(), bMat2->getMatrix(0, 1)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getFrobeniusNorm(), bMat2->getMatrix(1, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getFrobeniusNorm(), bMat2->getMatrix(1, 1)->getFrobeniusNorm()); - - TEST_EQUALITY(bMat->getRangeMapExtractor()->getMap(0)->isSameAs(*(bMat2->getRangeMapExtractor()->getMap(0))), true); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getMap(0)->isSameAs(*(bMat2->getDomainMapExtractor()->getMap(0))), true); - - TEST_EQUALITY(bMat->getRangeMapExtractor()->getFullMap()->isSameAs(*(bMat2->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getFullMap()->isSameAs(*(bMat2->getDomainMapExtractor()->getFullMap())), true); - - // these tests are false with Tpetra? TODO check me: why only in Tpetra? - // bMat2 is always in Xpetra mode so far. This is, since the Read routine and Write routine for the MapExtractor do not really - // consider the Thyra mode so far. - // TEST_EQUALITY(bMat->getRangeMapExtractor()->getMap(1)->isSameAs(*(bMat2->getRangeMapExtractor()->getMap(1))),true); - // TEST_EQUALITY(bMat->getDomainMapExtractor()->getMap(1)->isSameAs(*(bMat2->getDomainMapExtractor()->getMap(1))),true); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getRowMap()->isSameAs(*(bMat2->getMatrix(0, 0)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getRowMap()->isSameAs(*(bMat2->getMatrix(0, 1)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getRowMap()->isSameAs(*(bMat2->getMatrix(1, 0)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getRowMap()->isSameAs(*(bMat2->getMatrix(1, 1)->getRowMap())), true); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getColMap()->isSameAs(*(bMat2->getMatrix(0, 0)->getColMap())), true); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getColMap()->isSameAs(*(bMat2->getMatrix(0, 1)->getColMap())), true); - // the following test fails with Teptra. Why? - // TEST_EQUALITY(bMat->getMatrix(1,0)->getColMap()->isSameAs(*(bMat2->getMatrix(1,0)->getColMap())),true); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getColMap()->isSameAs(*(bMat2->getMatrix(1, 1)->getColMap())), true); - - // build gloabl vector with one entries - Teuchos::RCP ones_A = VectorFactoryClass::Build(bMat->getRangeMap(), true); - Teuchos::RCP exp = VectorFactoryClass::Build(bMat->getRangeMap(), true); - Teuchos::RCP ones_bOp = VectorFactoryClass::Build(bMat2->getRangeMap(), true); - Teuchos::RCP res = VectorFactoryClass::Build(bMat2->getRangeMap(), true); - ones_A->putScalar(STS::one()); - ones_bOp->putScalar(STS::one()); - - bMat->apply(*ones_A, *exp); - bMat2->apply(*ones_bOp, *res); - - TEST_EQUALITY(res->norm2(), exp->norm2()); - TEST_EQUALITY(res->normInf(), exp->normInf()); - TEST_EQUALITY(bMat->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bMat->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat->getDomainMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat->getDomainMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat2->getRangeMapExtractor()->getThyraMode(), false); // thyra mode is not correctly transferred!! - TEST_EQUALITY(bMat2->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bMat2->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat2->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat2->getDomainMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat2->getDomainMap(1)->getMinAllGlobalIndex(), 0); -} - -/// simple test routine for the apply function of BlockedCrsMatrix -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, Apply, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::StridedMap StridedMapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::StridedMapFactory StridedMapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const Teuchos::RCP pointmap = MapFactoryClass::Build(lib, 12, 0, comm); - - // generate local maps for loading matrices - Teuchos::Array velgidvec; // global strided maps - Teuchos::Array pregidvec; - Teuchos::Array fullgidvec; // full global map - for (LO i = 0; i < Teuchos::as(pointmap->getLocalNumElements()); i++) { - // loop over all local ids in pointmap - - // get corresponding global id - GO gid = pointmap->getGlobalElement(i); - - // store global strided gids - velgidvec.push_back(3 * gid); - velgidvec.push_back(3 * gid + 1); - pregidvec.push_back(3 * gid + 2); - - // gid for full map - fullgidvec.push_back(3 * gid); - fullgidvec.push_back(3 * gid + 1); - fullgidvec.push_back(3 * gid + 2); - } - - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - const Teuchos::RCP velmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - velgidvec(), - 0, - stridingInfo, - comm, 0); - const Teuchos::RCP premap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - pregidvec(), - 0, - stridingInfo, - comm, 1); - const Teuchos::RCP fullmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - fullgidvec(), - 0, - stridingInfo, - comm, -1); - - std::string tname = typeid(Scalar).name(); - if (tname.find("complex") != std::string::npos) { - std::cout << "Skip test for scalar=" << tname << std::endl; - return; - } - - Teuchos::RCP A = Xpetra::IO::Read("A.mat", fullmap->getMap()); - - std::vector> xmaps; - xmaps.push_back(velmap); - xmaps.push_back(premap); - - Teuchos::RCP rowMapExtractormap_extractor = MapExtractorFactoryClass::Build(fullmap, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*A, rowMapExtractormap_extractor, rowMapExtractormap_extractor); - - // build gloabl vector with one entries - Teuchos::RCP ones = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP exp = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP res = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP rnd = VectorFactoryClass::Build(fullmap, true); - ones->putScalar(STS::one()); - rnd->randomize(); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol1 = Teuchos::ScalarTraits::eps(); - magnitudeType tol2 = 500 * tol1; - - A->apply(*ones, *exp); - bOp->apply(*ones, *res); - res->update(-STS::one(), *exp, STS::one()); - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol1, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol1, out, success); - - A->apply(*rnd, *exp); - bOp->apply(*rnd, *res); - res->update(-STS::one(), *exp, STS::one()); - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol2, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol2, out, success); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, getLocalDiagCopy, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::BlockedMap BlockedMapClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::MultiVector MultiVectorClass; - typedef Xpetra::BlockedVector BlockedVectorClass; - typedef Xpetra::BlockedMultiVector BlockedMultiVectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 5; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP vorig = VectorFactoryClass::Build(bop->getRangeMap(), true); - - bop->getLocalDiagCopy(*vorig); - - Teuchos::RCP bvorig = Teuchos::rcp_dynamic_cast(vorig); - TEST_EQUALITY(bvorig.is_null(), false); - TEST_EQUALITY(bvorig->getBlockedMap()->getNumMaps(), Teuchos::as(noBlocks)); - - Teuchos::RCP mvorig = bvorig->Merge(); - TEST_EQUALITY(mvorig->getMap()->getMaxAllGlobalIndex(), bvorig->getMap()->getMaxAllGlobalIndex()); - TEST_EQUALITY(mvorig->getNumVectors(), 1); - - Teuchos::ArrayRCP vdataorig = mvorig->getData(0); - bool bCheck = true; - for (int i = 0; i < 5; i++) - if (vdataorig[i] != Teuchos::as(1.0)) bCheck = false; - for (int i = 5; i < 10; i++) - if (vdataorig[i] != Teuchos::as(2.0)) bCheck = false; - for (int i = 10; i < 20; i++) - if (vdataorig[i] != Teuchos::as(3.0)) bCheck = false; - for (int i = 20; i < 40; i++) - if (vdataorig[i] != Teuchos::as(4.0)) bCheck = false; - for (int i = 40; i < 80; i++) - if (vdataorig[i] != Teuchos::as(5.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); - - // reordered blocked operator (Xpetra style) - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 4 [3 2] 1 0]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - GO goNumRows = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10 * comm->getSize(); - - TEST_EQUALITY(brop->Rows(), 4); - TEST_EQUALITY(brop->Cols(), 4); - TEST_EQUALITY(brop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(brop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - - Teuchos::RCP map = brop->getRangeMap(); - Teuchos::RCP bmap = Teuchos::rcp_dynamic_cast(map); - TEST_EQUALITY(bmap.is_null(), false); - TEST_EQUALITY(bmap->getNumMaps(), 4); - Teuchos::RCP v = VectorFactoryClass::Build(brop->getRangeMap(), true); - Teuchos::RCP bv = Teuchos::rcp_dynamic_cast(v); - TEST_EQUALITY(bv.is_null(), false); - - brop->getLocalDiagCopy(*v); - - mvorig = bv->Merge(); - TEST_EQUALITY(mvorig->getMap()->getMaxAllGlobalIndex(), v->getMap()->getMaxAllGlobalIndex()); - TEST_EQUALITY(mvorig->getNumVectors(), 1); - - Teuchos::ArrayRCP vdata = mvorig->getData(0); - bCheck = true; - for (int i = 0; i < 40; i++) - if (vdata[i] != Teuchos::as(5.0)) bCheck = false; - for (int i = 40; i < 60; i++) - if (vdata[i] != Teuchos::as(4.0)) bCheck = false; - for (int i = 60; i < 70; i++) - if (vdata[i] != Teuchos::as(3.0)) bCheck = false; - for (int i = 70; i < 75; i++) - if (vdata[i] != Teuchos::as(2.0)) bCheck = false; - for (int i = 75; i < 80; i++) - if (vdata[i] != Teuchos::as(1.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); - - // Thyra style (reordered) operator - Teuchos::RCP btop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP> brtop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, btop)); - - TEST_EQUALITY(brtop->Rows(), 4); - TEST_EQUALITY(brtop->Cols(), 4); - TEST_EQUALITY(brtop->getRangeMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - TEST_EQUALITY(brtop->getDomainMap()->getGlobalNumElements(), Teuchos::as(goNumRows)); - - Teuchos::RCP v2 = VectorFactoryClass::Build(brtop->getRangeMap(), true); - - brtop->getLocalDiagCopy(*v2); - - Teuchos::RCP bv2 = Teuchos::rcp_dynamic_cast(v2); - TEST_EQUALITY(bv2.is_null(), false); - - bCheck = true; - int expectedResult = 5; - for (int k = 0; k < 4; k++) { - Teuchos::RCP subvec = bv2->getMultiVector(k); - TEST_EQUALITY(subvec.is_null(), false); - TEST_EQUALITY(subvec->getNumVectors(), 1); - TEST_EQUALITY(Teuchos::rcp_dynamic_cast(subvec) != Teuchos::null, true); - Teuchos::RCP bsubvec = Teuchos::rcp_dynamic_cast(subvec); - if (bsubvec == Teuchos::null) { - Teuchos::ArrayRCP vdata2 = subvec->getData(0); - for (size_t l = 0; l < Teuchos::as(vdata2.size()); l++) { - if (vdata2[l] != Teuchos::as(expectedResult)) bCheck = false; - } - expectedResult--; - } else { - for (size_t m = 0; m < bsubvec->getBlockedMap()->getNumMaps(); m++) { - Teuchos::RCP ssubvec = bsubvec->getMultiVector(m); - TEST_EQUALITY(ssubvec->getNumVectors(), 1); - TEST_EQUALITY(Teuchos::rcp_dynamic_cast(ssubvec) == Teuchos::null, true); - Teuchos::ArrayRCP vdata3 = ssubvec->getData(0); - for (size_t l2 = 0; l2 < Teuchos::as(vdata3.size()); l2++) { - if (vdata3[l2] != Teuchos::as(expectedResult)) bCheck = false; - } - expectedResult--; - } - } - } - TEST_EQUALITY(bCheck, true); - - mvorig = bv2->Merge(); - Teuchos::ArrayRCP vdata2 = mvorig->getData(0); - bCheck = true; - for (int i = 0; i < 40; i++) - if (vdata2[i] != Teuchos::as(5.0)) bCheck = false; - for (int i = 40; i < 60; i++) - if (vdata2[i] != Teuchos::as(4.0)) bCheck = false; - for (int i = 60; i < 70; i++) - if (vdata2[i] != Teuchos::as(3.0)) bCheck = false; - for (int i = 70; i < 75; i++) - if (vdata2[i] != Teuchos::as(2.0)) bCheck = false; - for (int i = 75; i < 80; i++) - if (vdata2[i] != Teuchos::as(1.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, leftScale, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP fancy = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout)); - - Teuchos::RCP v1 = VectorFactoryClass::Build(bop->getRangeMap(), true); - bop->getLocalDiagCopy(*v1); - - Teuchos::RCP bop_nonconst = Teuchos::rcp_const_cast(bop); - - Teuchos::RCP s = VectorFactoryClass::Build(bop_nonconst->getRangeMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - bop_nonconst->leftScale(*s); - - Teuchos::RCP v2 = VectorFactoryClass::Build(bop_nonconst->getRangeMap(), true); - bop_nonconst->getLocalDiagCopy(*v2); - - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); - - // reordered Xpetra operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(8, *comm); - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [ 1 [ 2 3 4 ] 5 ] [6 7] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - Teuchos::RCP> brop_nonconst = - Teuchos::rcp_const_cast>(brop); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - - s = VectorFactoryClass::Build(brop->getRangeMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - v1 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v1); - - brop_nonconst->leftScale(*s); - - v2 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v2); - - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); - - // reordered Thyra operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(8, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - brop_nonconst = Teuchos::rcp_const_cast>(brop); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - s = VectorFactoryClass::Build(brop->getRangeMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - v1 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v1); - - brop_nonconst->leftScale(*s); - - v2 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v2); - - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, rightScale, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP v1 = VectorFactoryClass::Build(bop->getRangeMap(), true); - bop->getLocalDiagCopy(*v1); - - Teuchos::RCP bop_nonconst = Teuchos::rcp_const_cast(bop); - - Teuchos::RCP s = VectorFactoryClass::Build(bop_nonconst->getDomainMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - bop_nonconst->rightScale(*s); - - Teuchos::RCP v2 = VectorFactoryClass::Build(bop_nonconst->getRangeMap(), true); - bop_nonconst->getLocalDiagCopy(*v2); - - /*Teuchos::ArrayRCP< const Scalar > v1d = v1->getData(0); - Teuchos::ArrayRCP< const Scalar > v2d = v2->getData(0); - bool bCheck = true; - for(int i=0; i<20; i++) if(v1d[i] * Teuchos::as(2.0) != v2d[i]) bCheck = false; - TEST_EQUALITY(bCheck, true);*/ - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); - - // reordered Xpetra operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(8, *comm); - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [ 1 [ 2 3 4 ] 5 ] [6 7] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - Teuchos::RCP> brop_nonconst = - Teuchos::rcp_const_cast>(brop); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - - s = VectorFactoryClass::Build(brop->getDomainMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - v1 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v1); - - brop_nonconst->rightScale(*s); - - v2 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v2); - - /*v1d = v1->getData(0); - v2d = v2->getData(0); - bCheck = true; - for(int i=0; i<640; i++) if(v1d[i] * Teuchos::as(2.0) != v2d[i]) bCheck = false; - TEST_EQUALITY(bCheck, true);*/ - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); - - // reordered Thyra operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(8, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - brop_nonconst = Teuchos::rcp_const_cast>(brop); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - s = VectorFactoryClass::Build(brop->getDomainMap(), true); - s->putScalar(Teuchos::ScalarTraits::one() * Teuchos::as(2.0)); - - v1 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v1); - - brop_nonconst->rightScale(*s); - - v2 = VectorFactoryClass::Build(brop_nonconst->getRangeMap(), true); - brop_nonconst->getLocalDiagCopy(*v2); - - /*v1d = v1->getData(0); - v2d = v2->getData(0); - bCheck = true; - for(int i=0; i<640; i++) if(v1d[i] * Teuchos::as(2.0) != v2d[i]) bCheck = false; - TEST_EQUALITY(bCheck, true);*/ - TEST_EQUALITY(v1->norm1() * Teuchos::as(2.0), v2->norm1()); - TEST_EQUALITY(v1->norm2() * Teuchos::as(2.0), v2->norm2()); - TEST_EQUALITY(v1->normInf() * Teuchos::as(2.0), v2->normInf()); - v1->update(Teuchos::as(-0.5), *v2, Teuchos::ScalarTraits::one()); - TEST_EQUALITY(v1->norm1(), Teuchos::ScalarTraits::magnitude(Teuchos::ScalarTraits::zero())); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, deepCopy, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - typedef Xpetra::MatrixFactory MatrixFactoryClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 5; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP A2 = MatrixFactoryClass::BuildCopy(bop); - Teuchos::RCP bop2 = Teuchos::rcp_dynamic_cast(A2); - TEST_EQUALITY(bop2->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop2->Cols(), Teuchos::as(noBlocks)); - - TEST_EQUALITY(bop2->getRangeMapExtractor()->NumMaps(), bop->getRangeMapExtractor()->NumMaps()); - TEST_EQUALITY(bop2->getDomainMapExtractor()->NumMaps(), bop->getDomainMapExtractor()->NumMaps()); - TEST_EQUALITY(bop2->getGlobalMaxNumRowEntries(), bop->getGlobalMaxNumRowEntries()); - TEST_EQUALITY(bop2->getGlobalNumEntries(), bop->getGlobalNumEntries()); - TEST_EQUALITY(bop2->getGlobalNumRows(), bop->getGlobalNumRows()); - TEST_EQUALITY(bop2->getGlobalNumCols(), bop->getGlobalNumCols()); - - Teuchos::RCP v1 = VectorFactoryClass::Build(bop->getRangeMap(), true); - Teuchos::RCP v2 = VectorFactoryClass::Build(bop2->getRangeMap(), true); - bop->getLocalDiagCopy(*v1); - bop2->getLocalDiagCopy(*v2); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol = Teuchos::ScalarTraits::eps(); - - v1->update(-Teuchos::ScalarTraits::one(), *v2, Teuchos::ScalarTraits::one()); - TEUCHOS_TEST_COMPARE(v1->norm2(), <, tol, out, success); - TEUCHOS_TEST_COMPARE(v1->normInf(), <, tol, out, success); - - v1 = Teuchos::null; - v2 = Teuchos::null; - - bop = Teuchos::null; - - TEST_EQUALITY(bop2->getRangeMapExtractor()->NumMaps(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop2->getDomainMapExtractor()->NumMaps(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop2->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bop2->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bop2->getGlobalMaxNumRowEntries(), 1); - TEST_EQUALITY(bop2->getGlobalNumRows(), Teuchos::as(comm->getSize() * 80)); - TEST_EQUALITY(bop2->getGlobalNumCols(), Teuchos::as(comm->getSize() * 80)); - TEST_EQUALITY(bop2->getMatrix(0, 0) != Teuchos::null, true); - TEST_EQUALITY(bop2->getMatrix(0, 0)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - - // Thyra blocked operator - Teuchos::RCP bop3 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - TEST_EQUALITY(bop3->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop3->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP A4 = MatrixFactoryClass::BuildCopy(bop3); - Teuchos::RCP bop4 = Teuchos::rcp_dynamic_cast(A4); - TEST_EQUALITY(bop4->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop4->Cols(), Teuchos::as(noBlocks)); - - bop3 = Teuchos::null; - - TEST_EQUALITY(bop4->getRangeMapExtractor()->NumMaps(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop4->getDomainMapExtractor()->NumMaps(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop4->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bop4->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bop4->getGlobalMaxNumRowEntries(), 1); - TEST_EQUALITY(bop4->getGlobalNumRows(), Teuchos::as(comm->getSize() * 80)); - TEST_EQUALITY(bop4->getGlobalNumCols(), Teuchos::as(comm->getSize() * 80)); - TEST_EQUALITY(bop4->getMatrix(0, 0) != Teuchos::null, true); - TEST_EQUALITY(bop4->getMatrix(0, 0)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 5)); - - // Nested Xpetra blocked operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 1 [ [ 2 4 0 ] 3] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - - Teuchos::RCP A = MatrixFactoryClass::BuildCopy(brop); - Teuchos::RCP brop2 = Teuchos::rcp_dynamic_cast(A); - brop = Teuchos::null; - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - Teuchos::RCP brop200 = Teuchos::rcp_dynamic_cast(brop2->getMatrix(0, 0)); - Teuchos::RCP brop211 = Teuchos::rcp_dynamic_cast(brop2->getMatrix(1, 1)); - Teuchos::RCP brop21100 = Teuchos::rcp_dynamic_cast(brop211->getMatrix(0, 0)); - TEST_EQUALITY(brop200->Rows(), 1); - TEST_EQUALITY(brop200->Cols(), 1); - TEST_EQUALITY(brop211->Rows(), 2); - TEST_EQUALITY(brop211->Cols(), 2); - TEST_EQUALITY(brop21100->Rows(), 3); - TEST_EQUALITY(brop21100->Cols(), 3); - TEST_EQUALITY(brop21100->getMatrix(0, 0)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(brop21100->getMatrix(1, 1)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop200->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop200->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop211->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop211->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop21100->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop21100->getDomainMapExtractor()->getThyraMode(), false); - - // Nested Thyra blocked operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - - A = MatrixFactoryClass::BuildCopy(brop); - brop2 = Teuchos::rcp_dynamic_cast(A); - brop = Teuchos::null; - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - brop200 = Teuchos::rcp_dynamic_cast(brop2->getMatrix(0, 0)); - brop211 = Teuchos::rcp_dynamic_cast(brop2->getMatrix(1, 1)); - brop21100 = Teuchos::rcp_dynamic_cast(brop211->getMatrix(0, 0)); - TEST_EQUALITY(brop200->Rows(), 1); - TEST_EQUALITY(brop200->Cols(), 1); - TEST_EQUALITY(brop211->Rows(), 2); - TEST_EQUALITY(brop211->Cols(), 2); - TEST_EQUALITY(brop21100->Rows(), 3); - TEST_EQUALITY(brop21100->Cols(), 3); - TEST_EQUALITY(brop21100->getMatrix(0, 0)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(brop21100->getMatrix(1, 1)->getRangeMap()->getGlobalNumElements(), Teuchos::as(comm->getSize() * 40)); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop200->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop200->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop211->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop211->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop21100->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop21100->getDomainMapExtractor()->getThyraMode(), true); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, transformThyra2XpetraGIDs, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::MapUtils MapUtilsClass; - typedef Xpetra::MapFactory MapFactoryClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - Teuchos::Array ovltGIDs; - Teuchos::Array novltGIDs; - Teuchos::Array novlxGIDs; - - for (int i = 0; i < 10; i++) { - novltGIDs.append(comm->getRank() * 10 + Teuchos::as(i)); - novlxGIDs.append(comm->getRank() * 40 + Teuchos::as(i) * 10 + 111); - ovltGIDs.append(comm->getRank() * 10 + Teuchos::as(i)); - } - if (comm->getRank() > 0) ovltGIDs.append(comm->getRank() * 10 - 1); - if (comm->getRank() < comm->getSize() - 1) ovltGIDs.append(comm->getRank() * 10 + 10); - - Teuchos::RCP ovltMap = MapFactoryClass::Build(lib, Teuchos::OrdinalTraits::invalid(), ovltGIDs(), 0, comm); - Teuchos::RCP novltMap = MapFactoryClass::Build(lib, Teuchos::OrdinalTraits::invalid(), novltGIDs(), 0, comm); - Teuchos::RCP novlxMap = MapFactoryClass::Build(lib, Teuchos::OrdinalTraits::invalid(), novlxGIDs(), 0, comm); - - Teuchos::RCP xmap = MapUtilsClass::transformThyra2XpetraGIDs( - *ovltMap, - *novltMap, - *novlxMap); - - TEST_EQUALITY(xmap->getLocalNumElements(), ovltMap->getLocalNumElements()); - TEST_EQUALITY(xmap->getGlobalNumElements(), ovltMap->getGlobalNumElements()); - for (int i = 0; i < 10; i++) { - GO gid = xmap->getGlobalElement(i); - TEST_EQUALITY(gid, comm->getRank() * 40 + Teuchos::as(i) * 10 + 111); - } - if (comm->getRank() > 0 && comm->getRank() < comm->getSize() - 2) - TEST_EQUALITY(xmap->getGlobalElement(10), (comm->getRank() - 1) * 40 + Teuchos::as(9) * 10 + 111); - ; - if (comm->getRank() > 1 && comm->getRank() < comm->getSize() - 2) - TEST_EQUALITY(xmap->getGlobalElement(11), (comm->getRank() + 1) * 40 + Teuchos::as(0) * 10 + 111); - - TEST_EQUALITY(xmap->getMinAllGlobalIndex(), novlxMap->getMinAllGlobalIndex()); - TEST_EQUALITY(xmap->getMaxAllGlobalIndex(), novlxMap->getMaxAllGlobalIndex()); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, Merge, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 5; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP A2 = bop->Merge(); - - Teuchos::RCP bop2 = Teuchos::rcp_dynamic_cast(A2); - TEST_EQUALITY(bop2, Teuchos::null); - - Teuchos::RCP v1 = VectorFactoryClass::Build(bop->getRangeMap(), true); - Teuchos::RCP v2 = VectorFactoryClass::Build(A2->getRangeMap(), true); - bop->getLocalDiagCopy(*v1); - A2->getLocalDiagCopy(*v2); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol = Teuchos::ScalarTraits::eps(); - - v1->update(-Teuchos::ScalarTraits::one(), *v2, Teuchos::ScalarTraits::one()); - TEUCHOS_TEST_COMPARE(v1->norm2(), <, tol, out, success); - TEUCHOS_TEST_COMPARE(v1->normInf(), <, tol, out, success); - - TEST_EQUALITY(bop->getLocalNumEntries(), A2->getLocalNumEntries()); - TEST_EQUALITY(bop->getGlobalNumEntries(), A2->getGlobalNumEntries()); - TEST_EQUALITY(bop->getFrobeniusNorm(), A2->getFrobeniusNorm()); - - // Thyra blocked operator - Teuchos::RCP bop3 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - TEST_EQUALITY(bop3->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop3->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP A4 = bop3->Merge(); - Teuchos::RCP bop4 = Teuchos::rcp_dynamic_cast(A4); - TEST_EQUALITY(bop4, Teuchos::null); - - v1 = VectorFactoryClass::Build(bop3->getRangeMap(), true); - v2 = VectorFactoryClass::Build(A4->getRangeMap(), true); - bop3->getLocalDiagCopy(*v1); - A4->getLocalDiagCopy(*v2); - - v1->update(-Teuchos::ScalarTraits::one(), *v2, Teuchos::ScalarTraits::one()); - TEUCHOS_TEST_COMPARE(v1->norm2(), <, tol, out, success); - TEUCHOS_TEST_COMPARE(v1->normInf(), <, tol, out, success); - - TEST_EQUALITY(bop3->getLocalNumEntries(), A4->getLocalNumEntries()); - TEST_EQUALITY(bop3->getGlobalNumEntries(), A4->getGlobalNumEntries()); - TEST_EQUALITY(bop3->getFrobeniusNorm(), A4->getFrobeniusNorm()); - - // Nested Xpetra blocked operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 1 [ [ 2 4 0 ] 3] ]"); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - - Teuchos::RCP A = brop->Merge(); - Teuchos::RCP brop2 = Teuchos::rcp_dynamic_cast(A); - TEST_EQUALITY(brop2, Teuchos::null); - - v1 = VectorFactoryClass::Build(brop->getRangeMap(), true); - v2 = VectorFactoryClass::Build(A->getRangeMap(), true); - brop->getLocalDiagCopy(*v1); - A->getLocalDiagCopy(*v2); - - // note that v1 and v2 have a different map here! - // TEST_EQUALITY(v1->norm2(), v2->norm2()); - TEST_EQUALITY(v1->normInf(), v2->normInf()); - TEST_EQUALITY(v1->getMap()->isSameAs(*(v2->getMap())), false); - TEST_EQUALITY(brop->getFullRangeMap()->isSameAs(*(A->getRangeMap())), true); - - TEST_EQUALITY(bop->getLocalNumEntries(), A->getLocalNumEntries()); - TEST_EQUALITY(bop->getGlobalNumEntries(), A->getGlobalNumEntries()); - TEST_EQUALITY(bop->getFrobeniusNorm(), A->getFrobeniusNorm()); - - // Nested Thyra blocked operator - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - - A = brop->Merge(); - brop2 = Teuchos::rcp_dynamic_cast(A); - TEST_EQUALITY(brop2, Teuchos::null); - - v1 = VectorFactoryClass::Build(brop->getRangeMap(), true); - v2 = VectorFactoryClass::Build(A->getRangeMap(), true); - brop->getLocalDiagCopy(*v1); - A->getLocalDiagCopy(*v2); - - // note that v1 and v2 have the same map in thyra mode! - // TEST_EQUALITY(v1->norm2(), v2->norm2()); - TEST_EQUALITY(v1->normInf(), v2->normInf()); - TEST_EQUALITY(v1->getMap()->isSameAs(*(v2->getMap())), false); - TEST_EQUALITY(brop->getFullRangeMap()->isSameAs(*(A->getRangeMap())), true); - - TEST_EQUALITY(brop->getLocalNumEntries(), A->getLocalNumEntries()); - TEST_EQUALITY(brop->getGlobalNumEntries(), A->getGlobalNumEntries()); - TEUCHOS_TEST_COMPARE(Teuchos::ScalarTraits::magnitude(brop->getFrobeniusNorm() - A->getFrobeniusNorm()), <, 1e3 * tol, out, success); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, MatrixMatrixAdd, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Matrix MatrixClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop2->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop2->Cols(), Teuchos::as(noBlocks)); - - // matrix-matrix multiplication of blocked operators - // Teuchos::RCP > bOpbOp = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*bop,false,*bop2,false,out); - Teuchos::RCP bOpOp = Teuchos::null; - - Xpetra::MatrixMatrix::TwoMatrixAdd(*bop, false, STS::one(), *bop2, false, STS::one() * Teuchos::as(3.0), bOpOp, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - Teuchos::RCP bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bOpOp2->Cols(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), bop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), bop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(bop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(bop->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getRangeMap()->isSameAs(*(bop->getMatrix(0, 1)->getRangeMap())), true); - // TEST_EQUALITY(bOpOp2->getMatrix(0,1)->getDomainMap()->isSameAs(*(bop->getMatrix(0,1)->getDomainMap())),true); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getRangeMap()->isSameAs(*(bop->getMatrix(1, 0)->getRangeMap())), true); - // TEST_EQUALITY(bOpOp2->getMatrix(1,0)->getDomainMap()->isSameAs(*(bop->getMatrix(1,0)->getDomainMap())),true); - - bOpOp2->fillComplete(); - - TEST_EQUALITY(bOpOp2->getFrobeniusNorm(), 4.0 * bop->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 1)->getFrobeniusNorm(), 4.0 * bop->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), 4.0 * bop->getMatrix(0, 0)->getFrobeniusNorm()); - - // Nested addition test (Xpetra) - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [1 2] ]"); - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - Teuchos::RCP> brop2 = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop2)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), false); - - bOpOp = Teuchos::null; - - Xpetra::MatrixMatrix::TwoMatrixAdd(*brop, false, STS::one(), *brop2, false, STS::one() * Teuchos::as(3.0), bOpOp, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), 2); - TEST_EQUALITY(bOpOp2->Cols(), 2); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), brop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), brop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(brop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(brop->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getRangeMap()->isSameAs(*(brop->getMatrix(0, 1)->getRangeMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getDomainMap()->isSameAs(*(brop->getMatrix(0, 1)->getDomainMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getRangeMap()->isSameAs(*(brop->getMatrix(1, 0)->getRangeMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getDomainMap()->isSameAs(*(brop->getMatrix(1, 0)->getDomainMap())), true); - - bOpOp2->fillComplete(); - - TEST_EQUALITY(bOpOp2->getFrobeniusNorm(), 4.0 * brop->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 1)->getFrobeniusNorm(), 4.0 * brop2->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), 4.0 * brop2->getMatrix(0, 0)->getFrobeniusNorm()); - - // Nested addition test (Thyra) - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - brop2 = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop2)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), true); - - bOpOp = Teuchos::null; - - Xpetra::MatrixMatrix::TwoMatrixAdd(*brop, false, STS::one(), *brop2, false, STS::one() * Teuchos::as(3.0), bOpOp, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), 2); - TEST_EQUALITY(bOpOp2->Cols(), 2); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), brop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), brop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(brop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(brop->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getRangeMap()->isSameAs(*(brop->getMatrix(0, 1)->getRangeMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getDomainMap()->isSameAs(*(brop->getMatrix(0, 1)->getDomainMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getRangeMap()->isSameAs(*(brop->getMatrix(1, 0)->getRangeMap())), true); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getDomainMap()->isSameAs(*(brop->getMatrix(1, 0)->getDomainMap())), true); - - bOpOp2->fillComplete(); - - TEST_EQUALITY(bOpOp2->getFrobeniusNorm(), 4.0 * brop->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0)->getFrobeniusNorm(), STS::magnitude(STS::zero())); - TEST_EQUALITY(bOpOp2->getMatrix(1, 1)->getFrobeniusNorm(), 4.0 * brop2->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), 4.0 * brop2->getMatrix(0, 0)->getFrobeniusNorm()); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, MatrixMatrixMultDiag, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Matrix MatrixClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - // typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop->Cols(), Teuchos::as(noBlocks)); - - Teuchos::RCP bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - TEST_EQUALITY(bop2->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bop2->Cols(), Teuchos::as(noBlocks)); - - // matrix-matrix multiplication of blocked operators - Teuchos::RCP bOpOp = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*bop, false, *bop2, false, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - Teuchos::RCP bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bOpOp2->Cols(), Teuchos::as(noBlocks)); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), bop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), bop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(bop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(bop2->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getMap(1)->isSameAs(*(bop->getRangeMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getMap(1)->isSameAs(*(bop->getDomainMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(0, 2), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(2, 0), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(2, 1), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(1, 2), Teuchos::null); - - bOpOp2->fillComplete(); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol = 1e6 * Teuchos::ScalarTraits::eps(); - - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), bop->getMatrix(0, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp2->getMatrix(1, 1)->getFrobeniusNorm(), 2.0 * bop->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_COMPARE(bOpOp2->getMatrix(2, 2)->getFrobeniusNorm() - 3.0 * bop->getMatrix(2, 2)->getFrobeniusNorm(), <, tol); - - Teuchos::RCP v = VectorFactoryClass::Build(bOpOp2->getMatrix(2, 2)->getRangeMap(), true); - bOpOp2->getMatrix(2, 2)->getLocalDiagCopy(*v); - - Teuchos::ArrayRCP vdata = v->getData(0); - bool bCheck = true; - for (int i = 0; i < 10; i++) - if (vdata[i] != Teuchos::as(9.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); - - // Nested addition test (Xpetra) - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 0 [1 2] ]"); - Teuchos::RCP> brop = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - Teuchos::RCP> brop2 = - Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop2)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), false); - - // matrix-matrix multiplication of blocked operators - bOpOp = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*brop, false, *brop2, false, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), 2); - TEST_EQUALITY(bOpOp2->Cols(), 2); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), brop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), brop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(brop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(brop2->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getMap(1)->isSameAs(*(brop->getRangeMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getMap(1)->isSameAs(*(brop->getDomainMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0), Teuchos::null); - - Teuchos::RCP bOpOp21 = Teuchos::rcp_dynamic_cast(bOpOp2->getMatrix(1, 1)); - TEST_EQUALITY(bOpOp21->Rows(), 2); - TEST_EQUALITY(bOpOp21->Cols(), 2); - TEST_EQUALITY(bOpOp21->getMatrix(0, 1), Teuchos::null); - TEST_EQUALITY(bOpOp21->getMatrix(1, 0), Teuchos::null); - - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), bop->getMatrix(0, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp21->getMatrix(0, 0)->getFrobeniusNorm(), 2.0 * bop->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_COMPARE(bOpOp21->getMatrix(1, 1)->getFrobeniusNorm() - 3.0 * bop->getMatrix(2, 2)->getFrobeniusNorm(), <, tol); - - v = VectorFactoryClass::Build(bOpOp21->getMatrix(1, 1)->getRangeMap(), true); - bOpOp21->getMatrix(1, 1)->getLocalDiagCopy(*v); - - vdata = v->getData(0); - bCheck = true; - for (int i = 0; i < 10; i++) - if (vdata[i] != Teuchos::as(9.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); - - // Nested addition test (Thyra) - bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - bop2 = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - brop = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop)); - brop2 = Teuchos::rcp_dynamic_cast>(buildReorderedBlockedCrsMatrix(brm, bop2)); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop2->Rows(), 2); - TEST_EQUALITY(brop2->Cols(), 2); - TEST_EQUALITY(brop2->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop2->getDomainMapExtractor()->getThyraMode(), true); - - // matrix-matrix multiplication of blocked operators - bOpOp = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*brop, false, *brop2, false, out); - - TEST_EQUALITY(bOpOp != Teuchos::null, true); - bOpOp2 = Teuchos::rcp_dynamic_cast(bOpOp); - TEST_EQUALITY(bOpOp2 != Teuchos::null, true); - - TEST_EQUALITY(bOpOp2->Rows(), 2); - TEST_EQUALITY(bOpOp2->Cols(), 2); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor(), brop->getRangeMapExtractor()); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor(), brop2->getDomainMapExtractor()); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getFullMap()->isSameAs(*(brop->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getFullMap()->isSameAs(*(brop2->getDomainMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bOpOp2->getRangeMapExtractor()->getMap(1)->isSameAs(*(brop->getRangeMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getDomainMapExtractor()->getMap(1)->isSameAs(*(brop->getDomainMapExtractor()->getMap(1))), true); - TEST_EQUALITY(bOpOp2->getMatrix(0, 1), Teuchos::null); - TEST_EQUALITY(bOpOp2->getMatrix(1, 0), Teuchos::null); - - bOpOp21 = Teuchos::rcp_dynamic_cast(bOpOp2->getMatrix(1, 1)); - TEST_EQUALITY(bOpOp21->Rows(), 2); - TEST_EQUALITY(bOpOp21->Cols(), 2); - TEST_EQUALITY(bOpOp21->getMatrix(0, 1), Teuchos::null); - TEST_EQUALITY(bOpOp21->getMatrix(1, 0), Teuchos::null); - - TEST_EQUALITY(bOpOp2->getMatrix(0, 0)->getFrobeniusNorm(), bop->getMatrix(0, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bOpOp21->getMatrix(0, 0)->getFrobeniusNorm(), 2.0 * bop->getMatrix(1, 1)->getFrobeniusNorm()); - TEST_COMPARE(bOpOp21->getMatrix(1, 1)->getFrobeniusNorm() - 3.0 * bop->getMatrix(2, 2)->getFrobeniusNorm(), <, tol); - - v = VectorFactoryClass::Build(bOpOp21->getMatrix(1, 1)->getRangeMap(), true); - bOpOp21->getMatrix(1, 1)->getLocalDiagCopy(*v); - - vdata = v->getData(0); - bCheck = true; - for (int i = 0; i < 10; i++) - if (vdata[i] != Teuchos::as(9.0)) bCheck = false; - TEST_EQUALITY(bCheck, true); -} - -/// simple test routine for the apply function of BlockedCrsMatrix -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, MatrixMatrixMult, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::StridedMap StridedMapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::StridedMapFactory StridedMapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const Teuchos::RCP pointmap = MapFactoryClass::Build(lib, 12, 0, comm); - - // generate local maps for loading matrices - Teuchos::Array velgidvec; // global strided maps - Teuchos::Array pregidvec; - Teuchos::Array fullgidvec; // full global map - for (LO i = 0; i < Teuchos::as(pointmap->getLocalNumElements()); i++) { - // loop over all local ids in pointmap - - // get corresponding global id - GO gid = pointmap->getGlobalElement(i); - - // store global strided gids - velgidvec.push_back(3 * gid); - velgidvec.push_back(3 * gid + 1); - pregidvec.push_back(3 * gid + 2); - - // gid for full map - fullgidvec.push_back(3 * gid); - fullgidvec.push_back(3 * gid + 1); - fullgidvec.push_back(3 * gid + 2); - } - - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - const Teuchos::RCP velmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - velgidvec(), - 0, - stridingInfo, - comm, 0); - const Teuchos::RCP premap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - pregidvec(), - 0, - stridingInfo, - comm, 1); - const Teuchos::RCP fullmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - fullgidvec(), - 0, - stridingInfo, - comm, -1); - - std::string tname = typeid(Scalar).name(); - if (tname.find("complex") != std::string::npos) { - std::cout << "Skip test for scalar=" << tname << std::endl; - return; - } - - Teuchos::RCP A = Xpetra::IO::Read("A.mat", fullmap->getMap()); - - std::vector> xmaps; - xmaps.push_back(velmap); - xmaps.push_back(premap); - - Teuchos::RCP rowMapExtractormap_extractor = MapExtractorFactoryClass::Build(fullmap, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*A, rowMapExtractormap_extractor, rowMapExtractormap_extractor); - - Teuchos::RCP A2 = Xpetra::IO::Read("A.mat", fullmap->getMap()); - - std::vector> xmaps2; - xmaps2.push_back(velmap); - xmaps2.push_back(premap); - - Teuchos::RCP map_extractor2 = MapExtractorFactoryClass::Build(fullmap, xmaps2); - - Teuchos::RCP> bOp2 = - Xpetra::MatrixUtils::SplitMatrix(*A2, map_extractor2, map_extractor2); - - // matrix-matrix multiplication of standard matrices - Teuchos::RCP> fuAfuA_2 = Xpetra::MatrixMatrix::Multiply(*A, false, *A2, false, out); - fuAfuA_2->describe(out); - - // matrix-matrix multiplication of blocked operators - Teuchos::RCP> bOpbOp_2 = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*bOp, false, *bOp2, false, out); - - // build gloabl vector with one entries - Teuchos::RCP ones = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP exp = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP res = VectorFactoryClass::Build(fullmap, true); - Teuchos::RCP rnd = VectorFactoryClass::Build(fullmap, true); - ones->putScalar(STS::one()); - rnd->randomize(); - - using magnitudeType = typename Teuchos::ScalarTraits::magnitudeType; - magnitudeType tol1 = Teuchos::ScalarTraits::eps(); - magnitudeType tol2 = 500 * tol1; - - fuAfuA_2->apply(*ones, *exp); - bOpbOp_2->apply(*ones, *res); - res->update(-STS::one(), *exp, STS::one()); - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol1, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol1, out, success); - - A->apply(*rnd, *exp); - bOp->apply(*rnd, *res); - res->update(-STS::one(), *exp, STS::one()); - - TEUCHOS_TEST_COMPARE(res->norm2(), <, tol2, out, success); - TEUCHOS_TEST_COMPARE(res->normInf(), <, tol2, out, success); - - TEUCHOS_TEST_EQUALITY(fuAfuA_2->getGlobalNumEntries(), 312, out, success); - TEUCHOS_TEST_EQUALITY(bOpbOp_2->getGlobalNumEntries(), 312, out, success); - - Teuchos::RCP rgMap0 = bOpbOp_2->getRangeMap(0); - Teuchos::RCP strRgMap0 = Teuchos::rcp_dynamic_cast(rgMap0); - TEUCHOS_TEST_EQUALITY(strRgMap0 == Teuchos::null, false, out, success); - std::vector strInfoData = strRgMap0->getStridingData(); - TEUCHOS_TEST_EQUALITY(strInfoData[0], 2, out, success); - TEUCHOS_TEST_EQUALITY(strInfoData[1], 1, out, success); - TEUCHOS_TEST_EQUALITY(strRgMap0->getFixedBlockSize(), 3, out, success); - TEUCHOS_TEST_EQUALITY(strRgMap0->getStridedBlockId(), 0, out, success); - - /* TODO think about this - Teuchos::RCP rgMap = bOpbOp_2->getRangeMap(); - Teuchos::RCP strRgMap = Teuchos::rcp_dynamic_cast(rgMap); - TEUCHOS_TEST_EQUALITY(strRgMap==Teuchos::null, false, out, success ); - strInfoData = strRgMap->getStridingData(); - TEUCHOS_TEST_EQUALITY(strInfoData[0], 2, out, success ); - TEUCHOS_TEST_EQUALITY(strInfoData[1], 1, out, success ); - TEUCHOS_TEST_EQUALITY(strRgMap->getFixedBlockSize(), 3, out, success ); - TEUCHOS_TEST_EQUALITY(strRgMap->getStridedBlockId(), -1, out, success );*/ - - Teuchos::RCP doMap0 = bOpbOp_2->getDomainMap(0); - Teuchos::RCP strDoMap0 = Teuchos::rcp_dynamic_cast(doMap0); - TEUCHOS_TEST_EQUALITY(strDoMap0 == Teuchos::null, false, out, success); - strInfoData = strDoMap0->getStridingData(); - TEUCHOS_TEST_EQUALITY(strInfoData[0], 2, out, success); - TEUCHOS_TEST_EQUALITY(strInfoData[1], 1, out, success); - TEUCHOS_TEST_EQUALITY(strDoMap0->getFixedBlockSize(), 3, out, success); - TEUCHOS_TEST_EQUALITY(strDoMap0->getStridedBlockId(), 0, out, success); - - /* TODO think about this - Teuchos::RCP doMap = bOpbOp_2->getDomainMap(); - Teuchos::RCP strDoMap = Teuchos::rcp_dynamic_cast(doMap); - TEUCHOS_TEST_EQUALITY(strDoMap==Teuchos::null, false, out, success ); - strInfoData = strDoMap->getStridingData(); - TEUCHOS_TEST_EQUALITY(strInfoData[0], 2, out, success ); - TEUCHOS_TEST_EQUALITY(strInfoData[1], 1, out, success ); - TEUCHOS_TEST_EQUALITY(strDoMap->getFixedBlockSize(), 3, out, success ); - TEUCHOS_TEST_EQUALITY(strDoMap->getStridedBlockId(), -1, out, success ); - */ -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, BlockedOperatorApply, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map Map; - typedef Xpetra::BlockedMap BlockedMap; - typedef Xpetra::MapExtractor MapExtractor; - typedef Xpetra::MultiVector MultiVector; - typedef Xpetra::BlockedMultiVector BlockedMultiVector; - typedef Xpetra::MultiVectorFactory MultiVectorFactory; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrix; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 3; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrix(noBlocks, *comm); - - TEST_EQUALITY(bop->Rows(), 3); - TEST_EQUALITY(bop->Cols(), 3); - TEST_EQUALITY(bop->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bop->getDomainMapExtractor()->getThyraMode(), false); - - // build gloabl vector with one entries (build monolithic maps) - Teuchos::RCP rgMap = bop->getRangeMap(); - Teuchos::RCP rgBMap = Teuchos::rcp_dynamic_cast(rgMap); - Teuchos::RCP ones = MultiVectorFactory::Build(rgBMap->getFullMap(), 1, true); - Teuchos::RCP res1 = MultiVectorFactory::Build(rgBMap->getFullMap(), 1, true); - ones->putScalar(STS::one()); - res1->putScalar(STS::zero()); - - Teuchos::RCP meRange = bop->getRangeMapExtractor(); - Teuchos::RCP meDomain = bop->getDomainMapExtractor(); - - // create BlockedMultiVectors - Teuchos::RCP bones = - Teuchos::rcp(new BlockedMultiVector(meDomain, ones)); - Teuchos::RCP res2 = - Teuchos::rcp(new BlockedMultiVector(meRange, res1)); - Teuchos::RCP res3 = - Teuchos::rcp(new BlockedMultiVector(meRange, res1)); - - // input blocked, output standard - TEST_NOTHROW(bop->apply(*bones, *res1)); - // input blocked, output blocked - TEST_NOTHROW(bop->apply(*bones, *res2)); - // input standard, output blocked - TEST_NOTHROW(bop->apply(*ones, *res3)); - - for (size_t r = 0; r < meRange->NumMaps(); r++) { - Teuchos::RCP part2 = meRange->ExtractVector(res2, r); - Teuchos::RCP part3 = meRange->ExtractVector(res3, r); - - Teuchos::ArrayRCP partd2 = part2->getData(0); - Teuchos::ArrayRCP partd3 = part3->getData(0); - for (LO l = 0; l < Teuchos::as(part2->getLocalLength()); l++) { - TEST_EQUALITY(partd2[l], Teuchos::as(r + 1) * STS::one()); - TEST_EQUALITY(partd3[l], Teuchos::as(r + 1) * STS::one()); - } - } - - Teuchos::RCP merged_res2 = res2->Merge(); - Teuchos::ArrayRCP resd1 = res1->getData(0); - Teuchos::ArrayRCP resd2 = merged_res2->getData(0); - - for (LO l = 0; l < Teuchos::as(res1->getLocalLength()); l++) { - TEST_EQUALITY(resd1[l], resd2[l]); - } -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ConstructFromBlockedMap, M, MA, Scalar, LO, GO, Node) { - using Teuchos::Array; - using Teuchos::ArrayView; - using Teuchos::RCP; - using Teuchos::rcp; - - using BlockedCrsMatrix = Xpetra::BlockedCrsMatrix; - using BlockedMap = Xpetra::BlockedMap; - using Map = Xpetra::Map; - using MapFactory = Xpetra::MapFactory; - using MapUtils = Xpetra::MapUtils; - - RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const GO gNumElementsPerBlock = 29; - Array gidsOne; - - RCP map1 = MapFactory::Build(lib, gNumElementsPerBlock, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map1.is_null()); - TEST_EQUALITY_CONST(map1->getGlobalNumElements(), gNumElementsPerBlock); - - ArrayView myGIDs1 = map1->getLocalElementList(); - Array myGIDs2; - for (const auto& gid1 : myGIDs1) - myGIDs2.push_back(gid1 + gNumElementsPerBlock); - RCP map2 = MapFactory::Build(lib, gNumElementsPerBlock, myGIDs2, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map2.is_null()); - TEST_EQUALITY_CONST(map2->getGlobalNumElements(), gNumElementsPerBlock); - - std::vector> maps; - maps.push_back(map1); - maps.push_back(map2); - RCP fullMap = MapUtils::concatenateMaps(maps); - RCP blockedMap = rcp(new BlockedMap(fullMap, maps)); - - TEST_ASSERT(!blockedMap.is_null()); - TEST_EQUALITY(blockedMap->getNumMaps(), 2); - - RCP blockMatrix = rcp(new BlockedCrsMatrix(blockedMap, blockedMap, 1)); - TEST_ASSERT(!blockMatrix.is_null()); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ConstructFromMapExtractor, M, MA, Scalar, LO, GO, Node) { - using Teuchos::Array; - using Teuchos::ArrayView; - using Teuchos::RCP; - using Teuchos::rcp; - - using BlockedCrsMatrix = Xpetra::BlockedCrsMatrix; - using Map = Xpetra::Map; - using MapExtractor = Xpetra::MapExtractor; - using MapExtractorFactory = Xpetra::MapExtractorFactory; - using MapFactory = Xpetra::MapFactory; - using MapUtils = Xpetra::MapUtils; - - RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const GO gNumElementsPerBlock = 29; - Array gidsOne; - - RCP map1 = MapFactory::Build(lib, gNumElementsPerBlock, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map1.is_null()); - TEST_EQUALITY_CONST(map1->getGlobalNumElements(), gNumElementsPerBlock); - - ArrayView myGIDs1 = map1->getLocalElementList(); - Array myGIDs2; - for (const auto& gid1 : myGIDs1) - myGIDs2.push_back(gid1 + gNumElementsPerBlock); - RCP map2 = MapFactory::Build(lib, gNumElementsPerBlock, myGIDs2, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map2.is_null()); - TEST_EQUALITY_CONST(map2->getGlobalNumElements(), gNumElementsPerBlock); - - std::vector> maps; - maps.push_back(map1); - maps.push_back(map2); - RCP fullMap = MapUtils::concatenateMaps(maps); - RCP mapExtractor = MapExtractorFactory::Build(fullMap, maps); - - TEST_ASSERT(!mapExtractor.is_null()); - - RCP blockMatrix = rcp(new BlockedCrsMatrix(mapExtractor, mapExtractor, 1)); - TEST_ASSERT(!blockMatrix.is_null()); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, ConstructFromBlockedVector, M, MA, Scalar, LO, GO, Node) { - using Teuchos::Array; - using Teuchos::ArrayView; - using Teuchos::RCP; - using Teuchos::rcp; - - using BlockedCrsMatrix = Xpetra::BlockedCrsMatrix; - using BlockedMap = Xpetra::BlockedMap; - using Map = Xpetra::Map; - using MapFactory = Xpetra::MapFactory; - using MapUtils = Xpetra::MapUtils; - - using STS = Teuchos::ScalarTraits; - typedef typename STS::magnitudeType MT; - - RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const GO gNumElementsPerBlock = 29; - Array gidsOne; - - RCP map1 = MapFactory::Build(lib, gNumElementsPerBlock, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map1.is_null()); - TEST_EQUALITY_CONST(map1->getGlobalNumElements(), gNumElementsPerBlock); - - ArrayView myGIDs1 = map1->getLocalElementList(); - Array myGIDs2; - for (const auto& gid1 : myGIDs1) - myGIDs2.push_back(gid1 + gNumElementsPerBlock); - RCP map2 = MapFactory::Build(lib, gNumElementsPerBlock, myGIDs2, Teuchos::ScalarTraits::zero(), comm); - - TEST_ASSERT(!map2.is_null()); - TEST_EQUALITY_CONST(map2->getGlobalNumElements(), gNumElementsPerBlock); - - std::vector> maps; - maps.push_back(map1); - maps.push_back(map2); - RCP fullMap = MapUtils::concatenateMaps(maps); - RCP blockedMap = rcp(new BlockedMap(fullMap, maps)); - - TEST_ASSERT(!blockedMap.is_null()); - TEST_EQUALITY(blockedMap->getNumMaps(), 2); - - const RCP> vec = Xpetra::VectorFactory::Build(blockedMap); - vec->randomize(); - - RCP> blockVec = - Teuchos::rcp_dynamic_cast>(vec); - TEST_ASSERT(!blockVec.is_null()); - - RCP> matrix = Xpetra::MatrixFactory::Build(vec.getConst()); - TEST_ASSERT(!matrix.is_null()); - - RCP> blockMatrix = - Teuchos::rcp_dynamic_cast>(matrix); - TEST_ASSERT(!blockMatrix.is_null()); - - const RCP> diagonal = Xpetra::VectorFactory::Build(blockedMap); - blockMatrix->getLocalDiagCopy(*diagonal); - TEST_ASSERT(!diagonal.is_null()); - - RCP> blockDiagonal = - Teuchos::rcp_dynamic_cast>(diagonal); - TEST_ASSERT(!blockDiagonal.is_null()); - - const MT tol = 1e-12; - - TEST_EQUALITY(gNumElementsPerBlock, blockMatrix->getMatrix(0, 0)->getGlobalNumEntries()); - TEST_FLOATING_EQUALITY(blockVec->getMultiVector(0)->getVector(0)->norm2(), blockDiagonal->getMultiVector(0)->getVector(0)->norm2(), tol); - TEST_FLOATING_EQUALITY(blockVec->getMultiVector(1)->getVector(0)->norm2(), blockDiagonal->getMultiVector(1)->getVector(0)->norm2(), tol); - TEST_EQUALITY(gNumElementsPerBlock, blockMatrix->getMatrix(1, 1)->getGlobalNumEntries()); - TEST_FLOATING_EQUALITY(blockVec->getMultiVector(0)->getVector(0)->norm2(), blockMatrix->getMatrix(0, 0)->getFrobeniusNorm(), tol); - TEST_FLOATING_EQUALITY(blockVec->getMultiVector(1)->getVector(0)->norm2(), blockMatrix->getMatrix(1, 1)->getFrobeniusNorm(), tol); - TEST_FLOATING_EQUALITY(blockVec->norm2(), blockDiagonal->norm2(), tol); - TEST_FLOATING_EQUALITY(blockVec->norm2(), blockMatrix->getFrobeniusNorm(), tol); -} - -// simple test for matrix-matrix multiplication for a 2x2 blocked matrix with a 2x1 blocked matrix -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedCrsMatrix, EpetraMatrixMatrixMult2x1, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_EPETRAEXT - using Teuchos::RCP; - using Teuchos::rcp; - - using BlockedCrsMatrix = Xpetra::BlockedCrsMatrix; - using CrsMatrix = Xpetra::CrsMatrix; - using CrsMatrixWrap = Xpetra::CrsMatrixWrap; - using MapExtractor = Xpetra::MapExtractor; - using MapExtractorFactory = Xpetra::MapExtractorFactory; - using Matrix = Xpetra::Matrix; - using Vector = Xpetra::Vector; - using VectorFactory = Xpetra::VectorFactory; - - RCP> comm = getDefaultComm(); - - // build maps - RCP rowMap1 = rcp(new Epetra_Map(24, 0, *Xpetra::toEpetra(comm))); - RCP rowMap2 = rcp(new Epetra_Map(12, 24, *Xpetra::toEpetra(comm))); - RCP domainMap1 = rcp(new Epetra_Map(8, 0, *Xpetra::toEpetra(comm))); - RCP domainMap2 = rcp(new Epetra_Map(4, 8, *Xpetra::toEpetra(comm))); - - std::vector> rowMaps; - rowMaps.push_back(rowMap1); - rowMaps.push_back(rowMap2); - std::vector> domainMaps; - domainMaps.push_back(domainMap1); - domainMaps.push_back(domainMap2); - - RCP fullRowMap = MergeMaps(rowMaps); - RCP fullDomainMap = MergeMaps(domainMaps); - - // read in matrices in matrix market format - Epetra_CrsMatrix* ptrA = 0; - Epetra_CrsMatrix* ptrP = 0; - EpetraExt::MatrixMarketFileToCrsMatrix("A.mat", *fullRowMap, *fullRowMap, *fullRowMap, ptrA); - EpetraExt::MatrixMarketFileToCrsMatrix("P.mat", *fullRowMap, *fullRowMap, *fullDomainMap, ptrP); - RCP epA = rcp(ptrA); - RCP epP = rcp(ptrP); - - // Transform Epetra stuff to Xpetra - - RCP> xFullRowMap = rcp(new Xpetra::EpetraMapT(fullRowMap)); - RCP> xFullDomainMap = rcp(new Xpetra::EpetraMapT(fullDomainMap)); - RCP> xRowMap1 = rcp(new Xpetra::EpetraMapT(rowMap1)); - RCP> xRowMap2 = rcp(new Xpetra::EpetraMapT(rowMap2)); - RCP> xDomainMap1 = rcp(new Xpetra::EpetraMapT(domainMap1)); - RCP> xDomainMap2 = rcp(new Xpetra::EpetraMapT(domainMap2)); - - // build map extractor objects - std::vector>> xRowMaps; - xRowMaps.push_back(xRowMap1); - xRowMaps.push_back(xRowMap2); - RCP rowMapExtractor = MapExtractorFactory::Build(xFullRowMap, xRowMaps); - - std::vector>> xDomainMaps; - xDomainMaps.push_back(xFullDomainMap); - RCP domainMapExtractor = MapExtractorFactory::Build(xFullDomainMap, xDomainMaps); - - // build blocked operators - - // build 2x2 blocked operator - RCP xCrsA = rcp(new Xpetra::EpetraCrsMatrixT(epA)); - RCP xA = rcp(new CrsMatrixWrap(xCrsA)); - Teuchos::RCP bA = - Xpetra::MatrixUtils::SplitMatrix(*xA, rowMapExtractor, rowMapExtractor); - - TEUCHOS_TEST_EQUALITY(bA->Rows(), 2, out, success); - TEUCHOS_TEST_EQUALITY(bA->Cols(), 2, out, success); - - // build 2x1 blocked operator - RCP xCrsP = rcp(new Xpetra::EpetraCrsMatrixT(epP)); - RCP xP = rcp(new CrsMatrixWrap(xCrsP)); - Teuchos::RCP bP = - Xpetra::MatrixUtils::SplitMatrix(*xP, rowMapExtractor, domainMapExtractor); - - TEUCHOS_TEST_EQUALITY(bP->Rows(), 2, out, success); - TEUCHOS_TEST_EQUALITY(bP->Cols(), 1, out, success); - - RCP bAbP = Xpetra::MatrixMatrix::TwoMatrixMultiplyBlock(*bA, false, *bP, false, out); - - TEUCHOS_TEST_EQUALITY(bAbP->Rows(), 2, out, success); - TEUCHOS_TEST_EQUALITY(bAbP->Cols(), 1, out, success); - - RCP xAP = Xpetra::MatrixMatrix::Multiply(*xA, false, *xP, false, out); - - // Test if blocked and merged MatVec deliver the same result - RCP oneVectorBlocked = VectorFactory::Build(bAbP->getDomainMap(), true); - RCP resVectorBlocked = VectorFactory::Build(bAbP->getRangeMap(), true); - oneVectorBlocked->putScalar(Teuchos::ScalarTraits::one()); - bAbP->apply(*oneVectorBlocked, *resVectorBlocked); - TEUCHOS_TEST_COMPARE(resVectorBlocked->norm2(), >, 1.0e-16, out, success); - - RCP oneVector = VectorFactory::Build(xAP->getDomainMap(), true); - RCP resVector = VectorFactory::Build(xAP->getRangeMap(), true); - oneVector->putScalar(Teuchos::ScalarTraits::one()); - xAP->apply(*oneVector, *resVector); - TEUCHOS_TEST_COMPARE(resVector->norm2(), >, 1.0e-16, out, success); - - resVectorBlocked->update(1.0, *resVector, -1.0); - TEUCHOS_TEST_COMPARE(resVectorBlocked->normInf(), <, 1.0e-16, out, success); -#endif -} - -// -// INSTANTIATIONS -// -#ifdef HAVE_XPETRA_TPETRA - -#define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::TpetraMap M##LO##GO##N; \ - typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; - -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - -#define XP_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, SplitMatrix, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperator, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperator2, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorThyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperator2Thyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorApply, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorApply2, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorApplyThyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorApplyThyraSmall, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReorderBlockOperatorApply2Thyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, Apply, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, getLocalDiagCopy, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, leftScale, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, rightScale, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, deepCopy, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, transformThyra2XpetraGIDs, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, Merge, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, MatrixMatrixAdd, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, MatrixMatrixMultDiag, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, MatrixMatrixMult, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, BlockedOperatorApply, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ConstructFromBlockedMap, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ConstructFromMapExtractor, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ConstructFromBlockedVector, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -// List of tests which run only with Tpetra -#define XP_TPETRA_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, CreateBlockedDiagonalOp, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, CreateBlockedDiagonalOpThyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -// List of tests which run only with Epetra -#define XP_EPETRA_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, ReadWriteBlockedMatrix, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedCrsMatrix, EpetraMatrixMatrixMult2x1, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -#if defined(HAVE_XPETRA_TPETRA) - -#include -#include - -TPETRA_ETI_MANGLING_TYPEDEFS() -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MATRIX_INSTANT) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MATRIX_INSTANT) - -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double, int, int, EpetraNode) -XP_MATRIX_INSTANT(double, int, int, EpetraNode) -#endif -// EpetraExt routines are not working with 64 bit -/*#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double,int,LongLong,EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double,int,LongLong,EpetraNode) -#endif*/ - -#endif - -} // namespace XpetraBlockMatrixTests diff --git a/packages/xpetra/test/BlockedCrsMatrix/BlockedMatrixTestHelpers.hpp b/packages/xpetra/test/BlockedCrsMatrix/BlockedMatrixTestHelpers.hpp deleted file mode 100644 index faeb5a31ccd3..000000000000 --- a/packages/xpetra/test/BlockedCrsMatrix/BlockedMatrixTestHelpers.hpp +++ /dev/null @@ -1,246 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace XpetraBlockMatrixTests { - -////////////////////////////////////////////////////////////////////////// -// EPETRA helper functions -Teuchos::RCP SplitMap(const Epetra_Map& Amap, const Epetra_Map& Agiven) { - const Epetra_Comm& Comm = Amap.Comm(); - const Epetra_Map& Ag = Agiven; - - int count = 0; - std::vector myaugids(Amap.NumMyElements()); - for (int i = 0; i < Amap.NumMyElements(); ++i) { - const int gid = Amap.GID(i); - if (Ag.MyGID(gid)) continue; - myaugids[count] = gid; - ++count; - } - myaugids.resize(count); - int gcount; - Comm.SumAll(&count, &gcount, 1); - Teuchos::RCP Aunknown = Teuchos::rcp(new Epetra_Map(gcount, count, &myaugids[0], 0, Comm)); - - return Aunknown; -} - -// Xpetra version of SplitMap -template -Teuchos::RCP > SplitMap(const Xpetra::Map& Amap, const Xpetra::Map& Agiven) { - Teuchos::RCP > comm = Amap.getComm(); - - GlobalOrdinal count = 0; - Teuchos::Array myaugids(Amap.getLocalNumElements()); - for (size_t i = 0; i < Amap.getLocalNumElements(); ++i) { - const GlobalOrdinal gid = Amap.getGlobalElement(i); - if (Agiven.isNodeGlobalElement(gid)) continue; - myaugids[Teuchos::as(count)] = gid; - ++count; - } - myaugids.resize(count); - GlobalOrdinal gcount; - Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, 1, &count, &gcount); - return Teuchos::rcp(new MapType(gcount, myaugids(), 0, comm)); -} - -Teuchos::RCP CreateMap(const std::set& gids, const Epetra_Comm& comm) { - std::vector mapvec; - mapvec.reserve(gids.size()); - mapvec.assign(gids.begin(), gids.end()); - Teuchos::RCP map = - Teuchos::rcp(new Epetra_Map(-1, - mapvec.size(), - &mapvec[0], - 0, - comm)); - mapvec.clear(); - return map; -} - -// Xpetra version of CreateMap -template -Teuchos::RCP > CreateMap(const std::set& gids, const Teuchos::Comm& comm) { - Teuchos::Array mapvec; - mapvec.reserve(gids.size()); - mapvec.assign(gids.begin(), gids.end()); - GlobalOrdinal count = Teuchos::as(mapvec.size()); - GlobalOrdinal gcount; - Teuchos::reduceAll(comm, Teuchos::REDUCE_SUM, count, Teuchos::outArg(gcount)); - - Teuchos::RCP > map = - Teuchos::rcp(new MapType(gcount, - mapvec(), - 0, - Teuchos::rcpFromRef(comm))); - mapvec.clear(); - return map; -} - -template -Teuchos::RCP > CreateBlockDiagonalExampleMatrix(int noBlocks, const Teuchos::Comm& comm) { - typedef Xpetra::Map Map; - typedef Xpetra::CrsMatrix CrsMatrix; - typedef Xpetra::CrsMatrixFactory CrsMatrixFactory; - typedef Xpetra::MapExtractor MapExtractor; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrix; - typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; - - GlobalOrdinal nOverallDOFGidsPerProc = Teuchos::as(Teuchos::ScalarTraits::pow(2, noBlocks - 2)) * 10; - - GlobalOrdinal procOffset = comm.getRank() * nOverallDOFGidsPerProc; - - std::set myDOFGids; - for (GlobalOrdinal i = 0; i < nOverallDOFGidsPerProc; i++) - myDOFGids.insert(i + procOffset); - - Teuchos::RCP fullmap = CreateMap(myDOFGids, comm); - - std::vector > maps(noBlocks, Teuchos::null); - GlobalOrdinal nPartGIDs = nOverallDOFGidsPerProc; - Teuchos::RCP remainingpartmap = fullmap; - for (int it = 0; it < noBlocks; it++) { - if (it == noBlocks - 1) { - maps[0] = remainingpartmap; - break; - } - // collect first half of GIDs - nPartGIDs = nPartGIDs / 2; - std::set myHalfGIDs; - for (GlobalOrdinal j = 0; j < nPartGIDs; j++) - myHalfGIDs.insert(j + procOffset); - - Teuchos::RCP halfmap = CreateMap(myHalfGIDs, comm); - - Teuchos::RCP secondmap = SplitMap(*remainingpartmap, *halfmap); - remainingpartmap = halfmap; - - maps[noBlocks - 1 - it] = secondmap; - } - - // create diagonal blocks - std::vector > blocks(noBlocks, Teuchos::null); - for (int it = 0; it < noBlocks; it++) { - // std::cout << it << " " << maps[it]->getMinAllGlobalIndex() << " - " << maps[it]->getMaxAllGlobalIndex() << std::endl; - blocks[it] = CrsMatrixFactory::Build(maps[it], 1); - - LocalOrdinal NumMyElements = maps[it]->getLocalNumElements(); - Teuchos::ArrayView MyGlobalElements = maps[it]->getLocalElementList(); - - for (LocalOrdinal i = 0; i < NumMyElements; i++) - blocks[it]->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i]), - Teuchos::tuple(it + 1)); - blocks[it]->fillComplete(); - } - - // create map extractor - Teuchos::RCP rgMapExtractor = Teuchos::rcp(new MapExtractor(fullmap, maps, false)); - Teuchos::RCP doMapExtractor = Teuchos::rcp(new MapExtractor(fullmap, maps, false)); - - // build blocked operator - Teuchos::RCP bop = Teuchos::rcp(new BlockedCrsMatrix(rgMapExtractor, doMapExtractor, 1)); - - for (int it = 0; it < noBlocks; it++) { - Teuchos::RCP csrwrap = - Teuchos::rcp(new CrsMatrixWrap(blocks[it])); - bop->setMatrix(Teuchos::as(it), Teuchos::as(it), csrwrap); - } - bop->fillComplete(); - return bop; -} - -template -Teuchos::RCP > CreateBlockDiagonalExampleMatrixThyra(int noBlocks, const Teuchos::Comm& comm) { - typedef Xpetra::Map Map; - typedef Xpetra::MapFactory MapFactory; - typedef Xpetra::CrsMatrix CrsMatrix; - typedef Xpetra::CrsMatrixFactory CrsMatrixFactory; - typedef Xpetra::MapExtractor MapExtractor; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrix; - typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; - - std::vector > maps(noBlocks, Teuchos::null); - - MapType tm(1, 0, Teuchos::rcpFromRef(comm)); - Xpetra::UnderlyingLib lib = tm.lib(); - - maps[0] = MapFactory::Build(lib, comm.getSize() * 5, 5, 0, Teuchos::rcpFromRef(comm)); - for (int it = 1; it < noBlocks; it++) { - GlobalOrdinal localDofs = Teuchos::as(Teuchos::ScalarTraits::pow(2, it - 1) * 5); - maps[it] = MapFactory::Build(lib, comm.getSize() * localDofs, localDofs, 0, Teuchos::rcpFromRef(comm)); - } - - // create diagonal blocks - std::vector > blocks(noBlocks, Teuchos::null); - for (int it = 0; it < noBlocks; it++) { - // std::cout << it << " " << maps[it]->getMinAllGlobalIndex() << " - " << maps[it]->getMaxAllGlobalIndex() << std::endl; - blocks[it] = CrsMatrixFactory::Build(maps[it], 1); - - LocalOrdinal NumMyElements = maps[it]->getLocalNumElements(); - Teuchos::ArrayView MyGlobalElements = maps[it]->getLocalElementList(); - - for (LocalOrdinal i = 0; i < NumMyElements; i++) - blocks[it]->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i]), - Teuchos::tuple(it + 1)); - blocks[it]->fillComplete(); - } - - // create map extractor - // To generate the Thyra style map extractor we do not need a full map but only the - // information about the Map details (i.e. lib and indexBase). We can extract this - // information from maps[0] - Teuchos::RCP rgMapExtractor = - Teuchos::rcp(new MapExtractor(maps[0], maps, true)); - Teuchos::RCP doMapExtractor = - Teuchos::rcp(new MapExtractor(maps[0], maps, true)); - // build blocked operator - Teuchos::RCP bop = Teuchos::rcp(new BlockedCrsMatrix(rgMapExtractor, doMapExtractor, 1)); - - for (int it = 0; it < noBlocks; it++) { - Teuchos::RCP csrwrap = Teuchos::rcp(new CrsMatrixWrap(blocks[it])); - bop->setMatrix(Teuchos::as(it), Teuchos::as(it), csrwrap); - } - bop->fillComplete(); - return bop; -} - -Teuchos::RCP MergeMaps(const std::vector >& maps) { - if (maps.size() == 0) - std::cout << "no maps to merge" << std::endl; - for (unsigned i = 0; i < maps.size(); ++i) { - if (maps[i] == Teuchos::null) - std::cout << "can not merge extractor with null maps" << std::endl; - if (maps[i]->UniqueGIDs() == false) - std::cout << "map " << i << " not unique" << std::endl; - } - std::set mapentries; - for (unsigned i = 0; i < maps.size(); ++i) { - const Epetra_Map& map = *maps[i]; - std::copy(map.MyGlobalElements(), - map.MyGlobalElements() + map.NumMyElements(), - std::inserter(mapentries, mapentries.begin())); - } - return CreateMap(mapentries, maps[0]->Comm()); -} - -} // end namespace XpetraBlockMatrixTests diff --git a/packages/xpetra/test/BlockedCrsMatrix/ThyraBlockedOperator_UnitTests.cpp b/packages/xpetra/test/BlockedCrsMatrix/ThyraBlockedOperator_UnitTests.cpp deleted file mode 100644 index 946adcc601f8..000000000000 --- a/packages/xpetra/test/BlockedCrsMatrix/ThyraBlockedOperator_UnitTests.cpp +++ /dev/null @@ -1,1065 +0,0 @@ -// @HEADER -// ***************************************************************************** -// Xpetra: A linear algebra interface package -// -// Copyright 2012 NTESS and the Xpetra contributors. -// SPDX-License-Identifier: BSD-3-Clause -// ***************************************************************************** -// @HEADER - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_MPI -#include "Epetra_MpiComm.h" -#include "mpi.h" -#endif -#include "Epetra_SerialComm.h" - -#include - -#ifdef HAVE_XPETRA_EPETRAEXT -// EpetraExt -#include "EpetraExt_CrsMatrixIn.h" -#include "EpetraExt_VectorIn.h" -#include "EpetraExt_VectorOut.h" -#include "EpetraExt_MatrixMatrix.h" -#include "EpetraExt_RowMatrixOut.h" -#endif - -#include "BlockedMatrixTestHelpers.hpp" // handling of Epetra block matrices (SplitMap etc...) - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_XPETRA_THYRA -#include -#include "Thyra_DefaultSpmdVectorSpace.hpp" -#include "Thyra_DefaultProductVectorSpace.hpp" -#include "Thyra_DefaultProductMultiVector.hpp" -#include "Thyra_DefaultBlockedLinearOp.hpp" -#include "Thyra_MultiVectorStdOps.hpp" -#endif -#include - -namespace XpetraBlockMatrixTests { - -using Xpetra::DefaultPlatform; - -using Xpetra::viewLabel_t; - -bool testMpi = true; - -Teuchos::RCP> getDefaultComm() { - if (testMpi) { - return DefaultPlatform::getDefaultPlatform().getComm(); - } - return rcp(new Teuchos::SerialComm()); -} - -///////////////////////////////////////////////////// - -TEUCHOS_STATIC_SETUP() { - Teuchos::CommandLineProcessor &clp = Teuchos::UnitTestRepository::getCLP(); - clp.addOutputSetupOptions(true); - clp.setOption( - "test-mpi", "test-serial", &testMpi, - "Test MPI (if available) or force test of serial. In a serial build," - " this option is ignored and a serial comm is always used."); -} - -// -// UNIT TESTS -// - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ThyraVectorSpace2XpetraMap_Tpetra, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - Teuchos::RCP> comm = Teuchos::DefaultComm::getComm(); - - // TPetra version -#ifdef HAVE_XPETRA_TPETRA - { - Teuchos::RCP> map = Xpetra::MapFactory::Build(Xpetra::UseTpetra, 1000, 0, comm); - TEST_EQUALITY(Teuchos::is_null(map), false); - Teuchos::RCP> tMap = Xpetra::toTpetra(map); - TEST_EQUALITY(Teuchos::is_null(tMap), false); - - // transform to Thyra... - Teuchos::RCP> thyraVectorSpace = Thyra::createVectorSpace(tMap); - TEST_EQUALITY(Teuchos::is_null(thyraVectorSpace), false); - - // transform back to Xpetra... - Teuchos::RCP> xMap = Xpetra::ThyraUtils::toXpetra(thyraVectorSpace, comm); - - TEST_EQUALITY(Teuchos::is_null(xMap), false); - - TEST_EQUALITY(xMap->isCompatible(*map), true); - TEST_EQUALITY(xMap->isSameAs(*map), true); - } -#endif -#endif -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ThyraVectorSpace2XpetraMap_Epetra, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - Teuchos::RCP> comm = Teuchos::DefaultComm::getComm(); - - // Epetra version -#ifdef HAVE_XPETRA_EPETRA - { - Teuchos::RCP> map = Xpetra::MapFactory::Build(Xpetra::UseEpetra, 1000, 0, comm); - TEST_EQUALITY(Teuchos::is_null(map), false); - const Epetra_Map ret = Xpetra::toEpetra(map); - Teuchos::RCP eMap = Teuchos::rcp(&ret, false); - TEST_EQUALITY(Teuchos::is_null(eMap), false); - - // transform to Thyra... - Teuchos::RCP> thyraVectorSpace = Thyra::create_VectorSpace(eMap); - TEST_EQUALITY(Teuchos::is_null(thyraVectorSpace), false); - - // transform back to Xpetra... - Teuchos::RCP> xMap = Xpetra::ThyraUtils::toXpetra(thyraVectorSpace, comm); - - TEST_EQUALITY(Teuchos::is_null(xMap), false); - - TEST_EQUALITY(xMap->isCompatible(*map), true); - TEST_EQUALITY(xMap->isSameAs(*map), true); - } -#endif -#endif -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ThyraShrinkMaps, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - Teuchos::RCP> comm = Teuchos::DefaultComm::getComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::MapUtils MapUtilsClass; - - // generate non-overlapping map - Teuchos::Array myGIDs; - for (int i = 0; i < 10; i++) { - myGIDs.push_back(comm->getRank() * 100 + i * 3); - } - const Teuchos::RCP map = MapFactoryClass::Build(lib, Teuchos::OrdinalTraits::invalid(), myGIDs(), 0, comm); - - const Teuchos::RCP thMap = MapUtilsClass::shrinkMapGIDs(*map, *map); - - TEST_EQUALITY(thMap->getGlobalNumElements(), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(thMap->getLocalNumElements(), 10); - TEST_EQUALITY(thMap->getMinLocalIndex(), 0); - TEST_EQUALITY(thMap->getMaxLocalIndex(), 9); - TEST_EQUALITY(thMap->getMinGlobalIndex(), comm->getRank() * 10); - TEST_EQUALITY(thMap->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(thMap->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(thMap->getMaxAllGlobalIndex(), comm->getSize() * 10 - 1); - // TEST_EQUALITY(thMap->isContiguous(), true); - - // generate overlapping map - Teuchos::Array myovlGIDs; - if (comm->getRank() > 0) { - myovlGIDs.push_back((comm->getRank() - 1) * 100 + 21); - myovlGIDs.push_back((comm->getRank() - 1) * 100 + 24); - myovlGIDs.push_back((comm->getRank() - 1) * 100 + 27); - } - for (int i = 0; i < 10; i++) { - myovlGIDs.push_back(comm->getRank() * 100 + i * 3); - } - - const Teuchos::RCP map2 = MapFactoryClass::Build(lib, Teuchos::OrdinalTraits::invalid(), myovlGIDs(), 0, comm); - - const Teuchos::RCP thMap2 = MapUtilsClass::shrinkMapGIDs(*map2, *map); - - TEST_EQUALITY(thMap2->getMinGlobalIndex(), std::max(0, comm->getRank() * 10 - 3)); - TEST_EQUALITY(thMap2->getMaxGlobalIndex(), comm->getRank() * 10 + 9); - TEST_EQUALITY(thMap2->getLocalNumElements(), (comm->getRank() > 0) ? 13 : 10); - TEST_EQUALITY(thMap2->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(thMap2->getMaxAllGlobalIndex(), comm->getSize() * 10 - 1); - TEST_EQUALITY(thMap2->getGlobalNumElements(), Teuchos::as(comm->getSize() * 13 - 3)); -#endif -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ThyraOperator2XpetraCrsMat, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - Teuchos::RCP> comm = Teuchos::DefaultComm::getComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - typedef Xpetra::MapFactory MapFactoryClass; - - // generate the matrix - LO nEle = 63; - const Teuchos::RCP> map = MapFactoryClass::Build(lib, nEle, 0, comm); - - Teuchos::RCP> matrix = - Xpetra::CrsMatrixFactory::Build(map, 10); - - LO NumMyElements = map->getLocalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - for (LO i = 0; i < NumMyElements; ++i) { - matrix->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i]), - Teuchos::tuple(1.0)); - } - - matrix->fillComplete(); - - // create a Thyra operator from Xpetra::CrsMatrix - Teuchos::RCP> thyraOp = - Xpetra::ThyraUtils::toThyra(matrix); - - // transform Thyra operator 2 Xpetra::CrsMatrix - Teuchos::RCP> xMat = - Xpetra::ThyraUtils::toXpetra(thyraOp); - Teuchos::RCP> xCrsMat = - Teuchos::rcp_dynamic_cast>(xMat)->getCrsMatrix(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(xCrsMat)); - - TEST_EQUALITY(xCrsMat->getFrobeniusNorm(), matrix->getFrobeniusNorm()); - TEST_EQUALITY(xCrsMat->getGlobalNumRows(), matrix->getGlobalNumRows()); - TEST_EQUALITY(xCrsMat->getGlobalNumCols(), matrix->getGlobalNumCols()); - TEST_EQUALITY(xCrsMat->getLocalNumRows(), matrix->getLocalNumRows()); - TEST_EQUALITY(xCrsMat->getGlobalNumEntries(), matrix->getGlobalNumEntries()); - TEST_EQUALITY(xCrsMat->getLocalNumEntries(), matrix->getLocalNumEntries()); - -#endif -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ThyraBlockedOperator2XpetraBlockedCrsMat, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - typedef Xpetra::Map MapClass; - typedef Xpetra::StridedMap StridedMapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::StridedMapFactory StridedMapFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const Teuchos::RCP pointmap = MapFactoryClass::Build(lib, 12, 0, comm); - - // generate local maps for loading matrices - Teuchos::Array velgidvec; // global strided maps - Teuchos::Array pregidvec; - Teuchos::Array fullgidvec; // full global map - for (LO i = 0; i < Teuchos::as(pointmap->getLocalNumElements()); i++) { - // loop over all local ids in pointmap - - // get corresponding global id - GO gid = pointmap->getGlobalElement(i); - - // store global strided gids - velgidvec.push_back(3 * gid); - velgidvec.push_back(3 * gid + 1); - pregidvec.push_back(3 * gid + 2); - - // gid for full map - fullgidvec.push_back(3 * gid); - fullgidvec.push_back(3 * gid + 1); - fullgidvec.push_back(3 * gid + 2); - } - - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - const Teuchos::RCP velmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - velgidvec(), - 0, - stridingInfo, - comm, 0); - const Teuchos::RCP premap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - pregidvec(), - 0, - stridingInfo, - comm, 1); - const Teuchos::RCP fullmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - fullgidvec(), - 0, - stridingInfo, - comm, -1); - - std::string tname = typeid(Scalar).name(); - if (tname.find("complex") != std::string::npos) { - std::cout << "Skip test for scalar=" << tname << std::endl; - return; - } - - Teuchos::RCP A = Xpetra::IO::Read("A.mat", fullmap->getMap()); - - std::vector> xmaps; - xmaps.push_back(velmap); - xmaps.push_back(premap); - - Teuchos::RCP map_extractor = MapExtractorFactoryClass::Build(fullmap, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*A, map_extractor, map_extractor); - - bOp->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(bOp)); - - // create Thyra operator - Teuchos::RCP> thOp = - Xpetra::ThyraUtils::toThyra(bOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thOp)); - - Teuchos::RCP> thbOp = - Teuchos::rcp_dynamic_cast>(thOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thbOp)); - - Teuchos::RCP> productRange = thbOp->productRange(); - Teuchos::RCP> productDomain = thbOp->productDomain(); - - TEST_EQUALITY(productRange->numBlocks(), 2); - TEST_EQUALITY(productDomain->numBlocks(), 2); - TEST_EQUALITY(Teuchos::as(productRange->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(0)->dim()), velmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(0)->dim()), velmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(1)->dim()), premap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(1)->dim()), premap->getGlobalNumElements()); -#endif // end HAVE_XPETRA_THYRA -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, XpetraBlockedCrsMatConstructor, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - - typedef Xpetra::Map MapClass; - typedef Xpetra::StridedMap StridedMapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::StridedMapFactory StridedMapFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Xpetra::Matrix MatrixClass; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - const Teuchos::RCP pointmap = MapFactoryClass::Build(lib, 12, 0, comm); - - // generate local maps for loading matrices - Teuchos::Array velgidvec; // global strided maps - Teuchos::Array pregidvec; - Teuchos::Array fullgidvec; // full global map - for (LO i = 0; i < Teuchos::as(pointmap->getLocalNumElements()); i++) { - // loop over all local ids in pointmap - - // get corresponding global id - GO gid = pointmap->getGlobalElement(i); - - // store global strided gids - velgidvec.push_back(3 * gid); - velgidvec.push_back(3 * gid + 1); - pregidvec.push_back(3 * gid + 2); - - // gid for full map - fullgidvec.push_back(3 * gid); - fullgidvec.push_back(3 * gid + 1); - fullgidvec.push_back(3 * gid + 2); - } - - std::vector stridingInfo; - stridingInfo.push_back(2); - stridingInfo.push_back(1); - - const Teuchos::RCP velmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - velgidvec(), - 0, - stridingInfo, - comm, 0); - const Teuchos::RCP premap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - pregidvec(), - 0, - stridingInfo, - comm, 1); - const Teuchos::RCP fullmap = StridedMapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - fullgidvec(), - 0, - stridingInfo, - comm, -1); - - std::string tname = typeid(Scalar).name(); - if (tname.find("complex") != std::string::npos) { - std::cout << "Skip test for scalar=" << tname << std::endl; - return; - } - - Teuchos::RCP A = Xpetra::IO::Read("A.mat", fullmap->getMap()); - - std::vector> xmaps; - xmaps.push_back(velmap); - xmaps.push_back(premap); - - Teuchos::RCP map_extractor = MapExtractorFactoryClass::Build(fullmap, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*A, map_extractor, map_extractor); - - bOp->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(bOp)); - TEST_EQUALITY(bOp->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bOp->getDomainMapExtractor()->getThyraMode(), false); - - // create Thyra operator - Teuchos::RCP> thOp = - Xpetra::ThyraUtils::toThyra(bOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thOp)); - - Teuchos::RCP> thbOp = - Teuchos::rcp_dynamic_cast>(thOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thbOp)); - - Teuchos::RCP> productRange = thbOp->productRange(); - Teuchos::RCP> productDomain = thbOp->productDomain(); - - TEST_EQUALITY(productRange->numBlocks(), 2); - TEST_EQUALITY(productDomain->numBlocks(), 2); - TEST_EQUALITY(Teuchos::as(productRange->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(0)->dim()), velmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(0)->dim()), velmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(1)->dim()), premap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(1)->dim()), premap->getGlobalNumElements()); - - // construct a Xpetra::BlockedCrsMatrix object - Teuchos::RCP> bOp2 = - Teuchos::rcp(new Xpetra::BlockedCrsMatrix(thbOp, comm)); - - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(bOp2)); - TEST_EQUALITY(bOp2->getGlobalNumRows(), bOp->getGlobalNumRows()); - TEST_EQUALITY(bOp2->getGlobalNumCols(), bOp->getGlobalNumCols()); - TEST_EQUALITY(bOp2->getLocalNumRows(), bOp->getLocalNumRows()); - TEST_EQUALITY(bOp2->getGlobalNumEntries(), bOp->getGlobalNumEntries()); - TEST_EQUALITY(bOp2->getLocalNumEntries(), bOp->getLocalNumEntries()); - TEST_EQUALITY(bOp2->isFillComplete(), bOp->isFillComplete()); - TEST_EQUALITY(bOp2->getRangeMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bOp2->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bOp2->getDomainMap()->isCompatible(*bOp->getDomainMap()), true); - TEST_EQUALITY(bOp2->getRangeMap()->isCompatible(*bOp->getRangeMap()), true); - TEST_EQUALITY(bOp2->getDomainMap(0)->isCompatible(*bOp->getDomainMap(0)), true); - TEST_EQUALITY(bOp2->getRangeMap(0)->isCompatible(*bOp->getRangeMap(0)), true); - TEST_EQUALITY(bOp2->getDomainMap(1)->isCompatible(*bOp->getDomainMap(1)), true); - TEST_EQUALITY(bOp2->getRangeMap(1)->isCompatible(*bOp->getRangeMap(1)), true); - TEST_EQUALITY(bOp2->getDomainMap()->isSameAs(*bOp->getDomainMap()), true); - TEST_EQUALITY(bOp2->getRangeMap()->isSameAs(*bOp->getRangeMap()), true); - TEST_EQUALITY(bOp2->getDomainMap(0)->isSameAs(*bOp->getDomainMap(0)), true); - TEST_EQUALITY(bOp2->getRangeMap(0)->isSameAs(*bOp->getRangeMap(0)), true); - TEST_EQUALITY(bOp2->getDomainMap(1)->isSameAs(*bOp->getDomainMap(1)), true); - TEST_EQUALITY(bOp2->getRangeMap(1)->isSameAs(*bOp->getRangeMap(1)), true); - -#endif // end HAVE_XPETRA_THYRA -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, SplitMatrixForThyra, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - // generate problem - GO nEle = 63; - const Teuchos::RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - LO NumMyElements = map->getLocalNumElements(); - GO NumGlobalElements = map->getGlobalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - Teuchos::RCP> A = - Xpetra::CrsMatrixFactory::Build(map, 3); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == true || A->isFillActive() == false, std::runtime_error, ""); - - for (LO i = 0; i < NumMyElements; i++) { - if (MyGlobalElements[i] == 0) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(Teuchos::as(i) * STS::one(), -1.0)); - } else if (MyGlobalElements[i] == NumGlobalElements - 1) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i]), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one())); - } else { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one(), -1.0)); - } - } - - A->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == false || A->isFillActive() == true, std::runtime_error, ""); - - Teuchos::RCP> mat = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(A)); - - Teuchos::Array gids1; - Teuchos::Array gids2; - for (LO i = 0; i < NumMyElements; i++) { - if (i % 3 < 2) - gids1.push_back(map->getGlobalElement(i)); - else - gids2.push_back(map->getGlobalElement(i)); - } - - const Teuchos::RCP map1 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids1.view(0, gids1.size()), - 0, - comm); - const Teuchos::RCP map2 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids2.view(0, gids2.size()), - 0, - comm); - - std::vector> xmaps; - xmaps.push_back(map1); - xmaps.push_back(map2); - - Teuchos::RCP map_extractor = MapExtractorFactoryClass::Build(map, xmaps); - - Teuchos::RCP> bOp = - Xpetra::MatrixUtils::SplitMatrix(*mat, map_extractor, map_extractor, Teuchos::null, true); - - // build gloabl vector with one entries - Teuchos::RCP ones_A = VectorFactoryClass::Build(map, true); - Teuchos::RCP exp = VectorFactoryClass::Build(map, true); - Teuchos::RCP ones_bOp = VectorFactoryClass::Build(bOp->getRangeMap(), true); - Teuchos::RCP res = VectorFactoryClass::Build(bOp->getRangeMap(), true); - ones_A->putScalar(STS::one()); - ones_bOp->putScalar(STS::one()); - - A->apply(*ones_A, *exp); - bOp->apply(*ones_bOp, *res); - - TEST_EQUALITY(res->norm1(), exp->norm1()); - TEST_EQUALITY(res->normInf(), exp->normInf()); - TEST_EQUALITY(bOp->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bOp->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bOp->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bOp->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bOp->getDomainMap(0)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bOp->getDomainMap(1)->getMinAllGlobalIndex(), 0); -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, NestedBlockOperator2ThyraBlockedCrsMat, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 6 [3 2] ]"); - - Teuchos::RCP brop = - Teuchos::rcp_dynamic_cast(buildReorderedBlockedCrsMatrix(brm, bop)); - - Teuchos::RCP fullmap = brop->getRowMap(); - - TEST_EQUALITY(brop->Rows(), 2); - TEST_EQUALITY(brop->Cols(), 2); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - Teuchos::RCP ones_A = VectorFactoryClass::Build(fullmap, true); - ones_A->putScalar(STS::one()); - - Teuchos::RCP exp = VectorFactoryClass::Build(fullmap, true); - exp->putScalar(STS::zero()); - -#ifdef HAVE_XPETRA_THYRA - // create Thyra operator - Teuchos::RCP> thOp = - Xpetra::ThyraUtils::toThyra(Teuchos::rcp_const_cast(brop)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thOp)); - - Teuchos::RCP> thbOp = - Teuchos::rcp_dynamic_cast>(thOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thbOp)); - - Teuchos::RCP> productRange = thbOp->productRange(); - Teuchos::RCP> productDomain = thbOp->productDomain(); - - TEST_EQUALITY(productRange->numBlocks(), 2); - TEST_EQUALITY(productDomain->numBlocks(), 2); - TEST_EQUALITY(Teuchos::as(productRange->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 160)); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 160)); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 30)); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 30)); - - Teuchos::RCP> thbOp11 = - Teuchos::rcp_dynamic_cast>(thbOp->getBlock(1, 1)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thbOp11)); - - Teuchos::RCP> productRange11 = thbOp11->productRange(); - Teuchos::RCP> productDomain11 = thbOp11->productDomain(); - TEST_EQUALITY(productRange11->numBlocks(), 2); - TEST_EQUALITY(productDomain11->numBlocks(), 2); - TEST_EQUALITY(Teuchos::as(productRange11->dim()), Teuchos::as(comm->getSize() * 30)); - TEST_EQUALITY(Teuchos::as(productDomain11->dim()), Teuchos::as(comm->getSize() * 30)); - TEST_EQUALITY(Teuchos::as(productRange11->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(Teuchos::as(productDomain11->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(Teuchos::as(productRange11->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(Teuchos::as(productDomain11->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 10)); - -#if 0 - // create Thyra product vector space - Teuchos::RCP > vs1 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(0,true)); - Teuchos::RCP > vs2 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(1,true)); - Teuchos::RCP > vs3 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(2,true)); - - Teuchos::Array > > vecSpacesInner(2); - Teuchos::Array > > vecSpacesOuter(2); - - vecSpacesInner[0] = vs2; - vecSpacesInner[1] = vs3; - - Teuchos::RCP > psInner = - Thyra::productVectorSpace(vecSpacesInner()); - - vecSpacesOuter[0] = vs1; - vecSpacesOuter[1] = psInner; - - Teuchos::RCP > ps = - Thyra::productVectorSpace(vecSpacesOuter()); - - Teuchos::RCP > X = Thyra::createMembers(ps,1); - - Thyra::assign(X.ptr(), Teuchos::as(0.0)); - - Xpetra::ThyraUtils::updateThyra(ones_A, brop->getDomainMapExtractor(), Teuchos::rcp_dynamic_cast >(X)); - - Teuchos::RCP > B = Thyra::createMembers(ps,1); - Thyra::assign(B.ptr(), Teuchos::as(0.0)); - - thbOp->apply( Thyra::NOTRANS, *X, B.ptr(), STS::one(), STS::zero()); - - Teuchos::RCP > xres = - Xpetra::ThyraUtils::toXpetra(B, comm); - - Teuchos::ArrayRCP xdata = xres->getData(0); - bool bCheck = true; - for(int i=0; igetLocalLength(); i++) { - if (i>=0 && i< 160) { if(xdata[i] != (Scalar) 7.0){ std::cout << i << " " << xdata[i] << std::endl; bCheck = false; }} - if (i>=160 && i< 180) { if(xdata[i] != (Scalar) 4.0){std::cout << i << " " << xdata[i] << std::endl; bCheck = false; }} - if (i>=180 && i< 190) { if(xdata[i] != (Scalar) 3.0){std::cout << i << " " << xdata[i] << std::endl; bCheck = false; }} - } - TEST_EQUALITY(bCheck, true); - - brop->apply(*ones_A, *exp); - exp->update(-STS::one(),*xres,STS::one()); - TEST_EQUALITY(exp->norm1(), STS::zero()); -#endif // not working (no nested Thyra operators!) -#endif // HAVE_XPETRA_THYRA -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ReorderBlockOperator2ThyraBlockedCrsMat, M, MA, Scalar, LO, GO, Node) { - typedef Xpetra::Map MapClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::BlockedCrsMatrix BlockedCrsMatrixClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - int noBlocks = 8; - Teuchos::RCP bop = XpetraBlockMatrixTests::CreateBlockDiagonalExampleMatrixThyra(noBlocks, *comm); - - Teuchos::RCP brm = Xpetra::blockedReorderFromString("[ 6 3 2]"); - - Teuchos::RCP brop = - Teuchos::rcp_dynamic_cast(buildReorderedBlockedCrsMatrix(brm, bop)); - - Teuchos::RCP fullmap = brop->getRowMap(); - - TEST_EQUALITY(brop->Rows(), 3); - TEST_EQUALITY(brop->Cols(), 3); - TEST_EQUALITY(brop->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(brop->getDomainMapExtractor()->getThyraMode(), true); - - Teuchos::RCP ones_A = VectorFactoryClass::Build(fullmap, true); - ones_A->putScalar(STS::one()); - - Teuchos::RCP exp = VectorFactoryClass::Build(fullmap, true); - exp->putScalar(STS::zero()); - -#ifdef HAVE_XPETRA_THYRA - // create Thyra operator - Teuchos::RCP> thOp = - Xpetra::ThyraUtils::toThyra(Teuchos::rcp_const_cast(brop)); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thOp)); - - Teuchos::RCP> thbOp = - Teuchos::rcp_dynamic_cast>(thOp); - TEUCHOS_TEST_FOR_EXCEPT(Teuchos::is_null(thbOp)); - - Teuchos::RCP> productRange = thbOp->productRange(); - Teuchos::RCP> productDomain = thbOp->productDomain(); - - TEST_EQUALITY(productRange->numBlocks(), 3); - TEST_EQUALITY(productDomain->numBlocks(), 3); - TEST_EQUALITY(Teuchos::as(productRange->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productDomain->dim()), fullmap->getGlobalNumElements()); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 160)); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(0)->dim()), Teuchos::as(comm->getSize() * 160)); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(1)->dim()), Teuchos::as(comm->getSize() * 20)); - TEST_EQUALITY(Teuchos::as(productRange->getBlock(2)->dim()), Teuchos::as(comm->getSize() * 10)); - TEST_EQUALITY(Teuchos::as(productDomain->getBlock(2)->dim()), Teuchos::as(comm->getSize() * 10)); - - // create Thyra product vector space - Teuchos::RCP> vs1 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(0, true)); - Teuchos::RCP> vs2 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(1, true)); - Teuchos::RCP> vs3 = - Xpetra::ThyraUtils::toThyra(brop->getRangeMapExtractor()->getMap(2, true)); - - Teuchos::Array>> vecSpaces(3); - vecSpaces[0] = vs1; - vecSpaces[1] = vs2; - vecSpaces[2] = vs3; - - Teuchos::RCP> ps = - Thyra::productVectorSpace(vecSpaces()); - - Teuchos::RCP> X = Thyra::createMembers(ps, 1); - - Thyra::assign(X.ptr(), Teuchos::as(0.0)); - - Xpetra::ThyraUtils::updateThyra(ones_A, brop->getDomainMapExtractor(), Teuchos::rcp_dynamic_cast>(X)); - - Teuchos::RCP> B = Thyra::createMembers(ps, 1); - Thyra::assign(B.ptr(), Teuchos::as(0.0)); - - thbOp->apply(Thyra::NOTRANS, *X, B.ptr(), STS::one(), STS::zero()); - - Teuchos::RCP> xres = - Xpetra::ThyraUtils::toXpetra(B, comm); - - Teuchos::RCP> xresb = - Teuchos::rcp_dynamic_cast>(xres); - TEST_EQUALITY(xresb.is_null(), false); - - Teuchos::RCP> xresmerged = xresb->Merge(); - - Teuchos::ArrayRCP xdata = xresmerged->getData(0); - bool bCheck = true; - for (int i = 0; i < Teuchos::as(xresmerged->getLocalLength()); i++) { - if (i >= 0 && i < 160) { - if (xdata[i] != (Scalar)7.0) { - std::cout << i << " " << xdata[i] << std::endl; - bCheck = false; - } - } - if (i >= 160 && i < 180) { - if (xdata[i] != (Scalar)4.0) { - std::cout << i << " " << xdata[i] << std::endl; - bCheck = false; - } - } - if (i >= 180 && i < 190) { - if (xdata[i] != (Scalar)3.0) { - std::cout << i << " " << xdata[i] << std::endl; - bCheck = false; - } - } - } - TEST_EQUALITY(bCheck, true); - - brop->apply(*ones_A, *exp); - exp->update(-STS::one(), *xresmerged, STS::one()); - TEST_EQUALITY(exp->norm1(), STS::zero()); -#endif // HAVE_XPETRA_THYRA -} - -TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedOperator, ReadWriteMatrixMatrixMarket, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_THYRA - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::Vector VectorClass; - typedef Xpetra::VectorFactory VectorFactoryClass; - typedef Xpetra::MapExtractor MapExtractorClass; - typedef Xpetra::MapExtractorFactory MapExtractorFactoryClass; - typedef Teuchos::ScalarTraits STS; - - // get a comm and node - Teuchos::RCP> comm = getDefaultComm(); - - M testMap(1, 0, comm); - Xpetra::UnderlyingLib lib = testMap.lib(); - - // generate problem - GO nEle = 63; - const Teuchos::RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - LO NumMyElements = map->getLocalNumElements(); - GO NumGlobalElements = map->getGlobalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - Teuchos::RCP> A = - Xpetra::CrsMatrixFactory::Build(map, 3); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == true || A->isFillActive() == false, std::runtime_error, ""); - - for (LO i = 0; i < NumMyElements; i++) { - if (MyGlobalElements[i] == 0) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(Teuchos::as(i) * STS::one(), -1.0)); - } else if (MyGlobalElements[i] == NumGlobalElements - 1) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i]), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one())); - } else { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i] - 1, MyGlobalElements[i], MyGlobalElements[i] + 1), - Teuchos::tuple(-1.0, Teuchos::as(i) * STS::one(), -1.0)); - } - } - - A->fillComplete(); - TEUCHOS_TEST_FOR_EXCEPTION(A->isFillComplete() == false || A->isFillActive() == true, std::runtime_error, ""); - - Teuchos::RCP> mat = - Teuchos::rcp(new Xpetra::CrsMatrixWrap(A)); - - Teuchos::Array gids1; - Teuchos::Array gids2; - for (LO i = 0; i < NumMyElements; i++) { - if (i % 3 < 2) - gids1.push_back(map->getGlobalElement(i)); - else - gids2.push_back(map->getGlobalElement(i)); - } - - const Teuchos::RCP map1 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids1.view(0, gids1.size()), - 0, - comm); - const Teuchos::RCP map2 = MapFactoryClass::Build(lib, - Teuchos::OrdinalTraits::invalid(), - gids2.view(0, gids2.size()), - 0, - comm); - - std::vector> xmaps; - xmaps.push_back(map1); - xmaps.push_back(map2); - - Teuchos::RCP map_extractor = MapExtractorFactoryClass::Build(map, xmaps); - - Teuchos::RCP> bMat = - Xpetra::MatrixUtils::SplitMatrix(*mat, map_extractor, map_extractor, Teuchos::null, true); - - // Write matrices out, read fine A back in, and check that the read was ok - // by using a matvec with a random vector. - // JJH: 22-Feb-2016 Append scalar type to file name. The theory is that for dashboard - // tests with multiple Scalar instantiations of this test, a test with Scalar type - // A could try to read in the results of the test with Scalar type B, simply because - // the test with type B overwrote A's output matrix file. A better solution would be - // to write to a file stream, but this would involve writing new interfaces to Epetra's - // file I/O capabilities. - std::string tname = "MATRIX"; - tname = tname + typeid(Scalar).name(); - tname = tname + typeid(LO).name(); - tname = tname + typeid(GO).name(); -#ifdef HAVE_MUELU_KOKKOS - std::string nn = Tpetra::KokkosCompat::KokkosDeviceWrapperNode::name(); - nn.erase(std::remove(nn.begin(), nn.end(), '/'), nn.end()); - tname = tname + nn; -#endif - tname = "_" + tname; - - const bool alwaysWriteMaps = true; - Xpetra::IO::WriteBlockedCrsMatrix(tname, *bMat, alwaysWriteMaps); - Teuchos::RCP> bMat2 = Xpetra::IO::ReadBlockedCrsMatrix(tname, lib, comm); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getGlobalNumEntries(), bMat2->getMatrix(0, 0)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getGlobalNumEntries(), bMat2->getMatrix(0, 1)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getGlobalNumEntries(), bMat2->getMatrix(1, 0)->getGlobalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getGlobalNumEntries(), bMat2->getMatrix(1, 1)->getGlobalNumEntries()); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getLocalNumEntries(), bMat2->getMatrix(0, 0)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getLocalNumEntries(), bMat2->getMatrix(0, 1)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getLocalNumEntries(), bMat2->getMatrix(1, 0)->getLocalNumEntries()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getLocalNumEntries(), bMat2->getMatrix(1, 1)->getLocalNumEntries()); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getFrobeniusNorm(), bMat2->getMatrix(0, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getFrobeniusNorm(), bMat2->getMatrix(0, 1)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getFrobeniusNorm(), bMat2->getMatrix(1, 0)->getFrobeniusNorm()); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getFrobeniusNorm(), bMat2->getMatrix(1, 1)->getFrobeniusNorm()); - - TEST_EQUALITY(bMat->getRangeMapExtractor()->getMap(0)->isSameAs(*(bMat2->getRangeMapExtractor()->getMap(0))), true); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getMap(0)->isSameAs(*(bMat2->getDomainMapExtractor()->getMap(0))), true); - - TEST_EQUALITY(bMat->getRangeMapExtractor()->getFullMap()->isSameAs(*(bMat2->getRangeMapExtractor()->getFullMap())), true); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getFullMap()->isSameAs(*(bMat2->getDomainMapExtractor()->getFullMap())), true); - - // these tests are false with Tpetra? TODO check me: why only in Tpetra? - // bMat2 is always in Xpetra mode so far. This is, since the Read routine and Write routine for the MapExtractor do not really - // consider the Thyra mode so far. - // TEST_EQUALITY(bMat->getRangeMapExtractor()->getMap(1)->isSameAs(*(bMat2->getRangeMapExtractor()->getMap(1))),true); - // TEST_EQUALITY(bMat->getDomainMapExtractor()->getMap(1)->isSameAs(*(bMat2->getDomainMapExtractor()->getMap(1))),true); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getRowMap()->isSameAs(*(bMat2->getMatrix(0, 0)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getRowMap()->isSameAs(*(bMat2->getMatrix(0, 1)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(1, 0)->getRowMap()->isSameAs(*(bMat2->getMatrix(1, 0)->getRowMap())), true); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getRowMap()->isSameAs(*(bMat2->getMatrix(1, 1)->getRowMap())), true); - - TEST_EQUALITY(bMat->getMatrix(0, 0)->getColMap()->isSameAs(*(bMat2->getMatrix(0, 0)->getColMap())), true); - TEST_EQUALITY(bMat->getMatrix(0, 1)->getColMap()->isSameAs(*(bMat2->getMatrix(0, 1)->getColMap())), true); - // the following test fails with Teptra. Why? - // TEST_EQUALITY(bMat->getMatrix(1,0)->getColMap()->isSameAs(*(bMat2->getMatrix(1,0)->getColMap())),true); - TEST_EQUALITY(bMat->getMatrix(1, 1)->getColMap()->isSameAs(*(bMat2->getMatrix(1, 1)->getColMap())), true); - - // build gloabl vector with one entries - Teuchos::RCP ones_A = VectorFactoryClass::Build(bMat->getRangeMap(), true); - Teuchos::RCP exp = VectorFactoryClass::Build(bMat->getRangeMap(), true); - Teuchos::RCP ones_bOp = VectorFactoryClass::Build(bMat2->getRangeMap(), true); - Teuchos::RCP res = VectorFactoryClass::Build(bMat2->getRangeMap(), true); - ones_A->putScalar(STS::one()); - ones_bOp->putScalar(STS::one()); - - bMat->apply(*ones_A, *exp); - bMat2->apply(*ones_bOp, *res); - - TEST_EQUALITY(res->norm2(), exp->norm2()); - TEST_EQUALITY(res->normInf(), exp->normInf()); - TEST_EQUALITY(bMat->getRangeMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bMat->getDomainMapExtractor()->getThyraMode(), true); - TEST_EQUALITY(bMat->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat->getDomainMap(0)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat->getDomainMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat2->getRangeMapExtractor()->getThyraMode(), false); // thyra mode is not correctly transferred!! - TEST_EQUALITY(bMat2->getDomainMapExtractor()->getThyraMode(), false); - TEST_EQUALITY(bMat2->getRangeMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat2->getRangeMap(1)->getMinAllGlobalIndex(), 0); - TEST_EQUALITY(bMat2->getDomainMap(0)->getMinAllGlobalIndex(), 0); - TEST_INEQUALITY(bMat2->getDomainMap(1)->getMinAllGlobalIndex(), 0); -#endif -} -// -// INSTANTIATIONS -// -#ifdef HAVE_XPETRA_TPETRA - -#define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::TpetraMap M##LO##GO##N; \ - typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; - -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - -// List of tests which run both with Epetra and Tpetra -#define XP_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ThyraOperator2XpetraCrsMat, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ThyraShrinkMaps, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, SplitMatrixForThyra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ReadWriteMatrixMatrixMarket, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, XpetraBlockedCrsMatConstructor, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ThyraBlockedOperator2XpetraBlockedCrsMat, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, NestedBlockOperator2ThyraBlockedCrsMat, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ReorderBlockOperator2ThyraBlockedCrsMat, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -// List of tests which run only with Tpetra -#define XP_TPETRA_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ThyraVectorSpace2XpetraMap_Tpetra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -// List of tests which run only with Epetra -#define XP_EPETRA_MATRIX_INSTANT(S, LO, GO, N) \ - TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedOperator, ThyraVectorSpace2XpetraMap_Epetra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) - -#if defined(HAVE_XPETRA_TPETRA) - -#include -#include - -TPETRA_ETI_MANGLING_TYPEDEFS() -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MATRIX_INSTANT) -TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MATRIX_INSTANT) - -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_MATRIX_INSTANT(double, int, int, EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double, int, int, EpetraNode) -#endif -// EpetraExt routines are not working with 64 bit -/*#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double,int,LongLong,EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double,int,LongLong,EpetraNode) -#endif*/ - -#endif - -} // namespace XpetraBlockMatrixTests diff --git a/packages/xpetra/test/BlockedMultiVector/BlockedMultiVector_UnitTests.cpp b/packages/xpetra/test/BlockedMultiVector/BlockedMultiVector_UnitTests.cpp index f89174f8d8e4..e0cde4ba7042 100644 --- a/packages/xpetra/test/BlockedMultiVector/BlockedMultiVector_UnitTests.cpp +++ b/packages/xpetra/test/BlockedMultiVector/BlockedMultiVector_UnitTests.cpp @@ -1370,22 +1370,11 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedMultiVector, BlockedVectorDeepCopy, M, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraMultiVector MV##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraMultiVectorT MV##S##LO##GO##N; - -#endif - #define XP_BLOCKEDMULTIVECTOR_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedMultiVector, Constructor, M##LO##GO##N, MV##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(BlockedMultiVector, Constructor2, M##LO##GO##N, MV##S##LO##GO##N, S, LO, GO, N) \ @@ -1416,8 +1405,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(BlockedMultiVector, BlockedVectorDeepCopy, M, // List of tests which run only with Epetra #define XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -1426,25 +1413,4 @@ TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_BLOCKEDMULTIVECTOR_INSTANT) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_BLOCKEDMULTIVECTOR_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, int, EpetraNode) -XP_BLOCKEDMULTIVECTOR_INSTANT(double, int, int, EpetraNode) -#endif -// EpetraExt routines are not working with 64 bit -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace XpetraBlockMatrixTests diff --git a/packages/xpetra/test/BlockedMultiVector/ThyraBlockedMultiVector_UnitTests.cpp b/packages/xpetra/test/BlockedMultiVector/ThyraBlockedMultiVector_UnitTests.cpp index 8fa0ecf38a79..2047240c56bd 100644 --- a/packages/xpetra/test/BlockedMultiVector/ThyraBlockedMultiVector_UnitTests.cpp +++ b/packages/xpetra/test/BlockedMultiVector/ThyraBlockedMultiVector_UnitTests.cpp @@ -675,22 +675,11 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedMultiVector, BlockedVectorDeepCopy // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraMultiVector MV##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraMultiVectorT MV##S##LO##GO##N; - -#endif - #define XP_BLOCKEDMULTIVECTOR_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedMultiVector, Constructor, M##LO##GO##N, MV##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(ThyraBlockedMultiVector, ConstructorNested, M##LO##GO##N, MV##S##LO##GO##N, S, LO, GO, N) \ @@ -708,8 +697,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(ThyraBlockedMultiVector, BlockedVectorDeepCopy // List of tests which run only with Epetra #define XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -718,25 +705,4 @@ TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_BLOCKEDMULTIVECTOR_INSTANT) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_BLOCKEDMULTIVECTOR_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, int, EpetraNode) -XP_BLOCKEDMULTIVECTOR_INSTANT(double, int, int, EpetraNode) -#endif -// EpetraExt routines are not working with 64 bit -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -XP_EPETRA_BLOCKEDMULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace XpetraBlockMatrixTests diff --git a/packages/xpetra/test/CrsMatrix/CrsMatrixUtils_UnitTests.cpp b/packages/xpetra/test/CrsMatrix/CrsMatrixUtils_UnitTests.cpp index 9da397ed0b4a..ef15aa9dbcbe 100644 --- a/packages/xpetra/test/CrsMatrix/CrsMatrixUtils_UnitTests.cpp +++ b/packages/xpetra/test/CrsMatrix/CrsMatrixUtils_UnitTests.cpp @@ -207,28 +207,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrixUtils, sortAndMergeCrsEntriesEpetra, TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(CrsMatrixUtils, sortCrsEntriesEpetra, SC, LO, GO, NO) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(CrsMatrixUtils, sortAndMergeCrsEntriesEpetra, SC, LO, GO, NO) -#if defined(HAVE_XPETRA_TPETRA) - #include #include TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(UNIT_TEST_GROUP_ORDINAL_TPETRAONLY) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -UNIT_TEST_GROUP_ORDINAL_EPETRAONLY(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -UNIT_TEST_GROUP_ORDINAL_EPETRAONLY(double, int, LongLong, EpetraNode) -#endif - -#endif - } // End of namespace diff --git a/packages/xpetra/test/CrsMatrix/CrsMatrix_UnitTests.cpp b/packages/xpetra/test/CrsMatrix/CrsMatrix_UnitTests.cpp index 50085bd01915..ebd835eae3ac 100644 --- a/packages/xpetra/test/CrsMatrix/CrsMatrix_UnitTests.cpp +++ b/packages/xpetra/test/CrsMatrix/CrsMatrix_UnitTests.cpp @@ -284,9 +284,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, leftScale, M, Scalar, LO, GO, Node) A->leftScale(*s); -#ifdef HAVE_XPETRA_TPETRA Kokkos::fence(); -#endif for (size_t i = 0; i < static_cast(NumMyElements); i++) { if (MyGlobalElements[i] == 0) { @@ -376,9 +374,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, rightScale, M, Scalar, LO, GO, Node A->rightScale(*s); -#ifdef HAVE_XPETRA_TPETRA Kokkos::fence(); -#endif for (size_t i = 0; i < static_cast(NumMyElements); i++) { if (MyGlobalElements[i] == 0) { @@ -484,108 +480,13 @@ TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, replaceDiagonal, M, Scalar, LO, GO, } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, Constructor_Epetra, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_EPETRA - - // get a comm and node - RCP > comm = getDefaultComm(); - - { - typedef Xpetra::EpetraMapT mm; - TEST_NOTHROW(mm(10, 0, comm)); - typedef Xpetra::EpetraCrsMatrixT mx; - TEST_NOTHROW(mx(Teuchos::rcp(new mm(10, 0, comm)), 0)); - } - -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_PTHREAD) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraCrsMatrixT mx; - TEST_THROW(mx(Teuchos::null, 0), Xpetra::Exceptions::RuntimeError); - } -#endif -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_CUDA) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraCrsMatrixT mx; - TEST_THROW(mx(Teuchos::null, 0), Xpetra::Exceptions::RuntimeError); - } -#endif -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_HIP) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraCrsMatrixT mx; - TEST_THROW(mx(Teuchos::null, 0), Xpetra::Exceptions::RuntimeError); - } -#endif - -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, Epetra_ReplaceLocalValues, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_EPETRA - - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - - // get a comm and node - RCP > comm = getDefaultComm(); - - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // generate problem - LO nEle = 63; - const RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - RCP > matrix = - Xpetra::CrsMatrixFactory::Build(map, 10); - - LO NumMyElements = map->getLocalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - for (LO i = 0; i < NumMyElements; ++i) { - matrix->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i]), - Teuchos::tuple(1.0)); - } - - matrix->fillComplete(); - matrix->resumeFill(); - - Teuchos::Array indout(1, 0); - Teuchos::Array valout(1, 5.0); - matrix->replaceLocalValues(0, indout.view(0, indout.size()), valout.view(0, valout.size())); - matrix->fillComplete(); - - RCP > vec = - Xpetra::VectorFactory::Build(map); - - vec->putScalar(1.0); - - RCP > vec_sol = - Xpetra::VectorFactory::Build(matrix->getRangeMap()); - - vec_sol->putScalar(0.0); - - matrix->apply(*vec, *vec_sol, Teuchos::NO_TRANS, 1.0, 0.0); - - RCP > vectest = - Xpetra::VectorFactory::Build(map); - vectest->putScalar(1.0); - Teuchos::ArrayRCP vectestData = vectest->getDataNonConst(0); - vectestData[0] = 5.0; - - vec_sol->update(-1.0, *vectest, 1.0); - - TEUCHOS_TEST_COMPARE(vec_sol->norm2(), <, 1e-16, out, success); -#endif } // just a copy of the Epetra_ReplaceLocalValues test for Tpetra TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, Tpetra_ReplaceLocalValues, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_TPETRA using std::endl; using Teuchos::outArg; using Teuchos::REDUCE_MIN; @@ -812,11 +713,9 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, Tpetra_ReplaceLocalValues, Scalar, reduceAll(*comm, REDUCE_MIN, lclSuccess, outArg(gblSuccess)); success = success && (gblSuccess == 1); TEST_EQUALITY_CONST(gblSuccess, 1); -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, TpetraDeepCopy, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::Map MapClass; typedef Xpetra::MapFactory MapFactoryClass; typedef Teuchos::ScalarTraits STS; @@ -1162,59 +1061,9 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, TpetraDeepCopy, Scalar, LO, GO, Nod s += Teuchos::ScalarTraits::magnitude(rdata[i] - rdatacopy[i]); } TEUCHOS_TEST_COMPARE(s, <, 1e-16, out, success); -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, EpetraDeepCopy, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_EPETRA - - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - - // get a comm and node - RCP > comm = getDefaultComm(); - - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // generate problem - LO nEle = 63; - const RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - - RCP > A = - Xpetra::CrsMatrixFactory::Build(map, 10); - - LO NumMyElements = map->getLocalNumElements(); - Teuchos::ArrayView MyGlobalElements = map->getLocalElementList(); - - for (LO i = 0; i < NumMyElements; ++i) { - A->insertGlobalValues(MyGlobalElements[i], - Teuchos::tuple(MyGlobalElements[i]), - Teuchos::tuple(1.0)); - } - - A->fillComplete(); - - RCP > v = Xpetra::VectorFactory::Build(map); - v->setSeed(8675309); - v->randomize(true); - - RCP > r = Xpetra::VectorFactory::Build(A->getRangeMap()); - RCP > rcopy = Xpetra::VectorFactory::Build(A->getRangeMap()); - - A->apply(*v, *r, Teuchos::NO_TRANS, 1.0, 0.0); - - RCP > Acopy(new Xpetra::EpetraCrsMatrixT(*(Teuchos::rcp_static_cast >(A)))); - A = Teuchos::null; - - Acopy->apply(*v, *rcopy, Teuchos::NO_TRANS, 1.0, 0.0); - - Teuchos::ArrayRCP rdata = r->getDataNonConst(0), rdatacopy = rcopy->getDataNonConst(0); - Scalar s = Teuchos::ScalarTraits::zero(); - for (LO i = 0; i < NumMyElements; i++) { - s += Teuchos::ScalarTraits::magnitude(rdata[i] - rdatacopy[i]); - } - TEUCHOS_TEST_COMPARE(s, <, 1e-16, out, success); -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, GetLocalMatrix, M, Scalar, LO, GO, Node) { @@ -1331,7 +1180,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, GetLocalMatrix, M, Scalar, LO, GO, } TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, ConstructMatrixKokkos, M, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_TPETRA // Note: get Kokkos interface for Epetra is only available if Tpetra is also enabled! std::cout << "Run ConstructMatrixKokkos test" << std::endl; // Kokkos::initialize(); typedef Xpetra::Map MapClass; @@ -1539,11 +1387,9 @@ TEUCHOS_UNIT_TEST_TEMPLATE_5_DECL(CrsMatrix, ConstructMatrixKokkos, M, Scalar, L } } // Kokkos::finalize(); -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, TpetraGraphAndValuesConstructor, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::Map MapClass; typedef Xpetra::MapFactory MapFactoryClass; typedef Teuchos::ScalarTraits STS; @@ -1674,27 +1520,15 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, TpetraGraphAndValuesConstructor, Sc TEST_EQUALITY(norms[0], STM::zero()); } -#endif } // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA - #define XPETRA_TPETRA_TYPES(SC, LO, GO, Node) \ typedef typename Xpetra::TpetraMap M##LO##GO##Node; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(SC, LO, GO, Node) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##Node; - -#endif - // for common tests (Epetra and Tpetra...) #define UNIT_TEST_GROUP_ORDINAL(SC, LO, GO, Node) \ TEUCHOS_UNIT_TEST_TEMPLATE_5_INSTANT(CrsMatrix, Constructor_Vector, M##LO##GO##Node, SC, LO, GO, Node) \ @@ -1718,8 +1552,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(CrsMatrix, TpetraGraphAndValuesConstructor, Sc TEUCHOS_UNIT_TEST_TEMPLATE_5_INSTANT(CrsMatrix, GetLocalMatrix, M##LO##GO##Node, SC, LO, GO, Node) \ TEUCHOS_UNIT_TEST_TEMPLATE_5_INSTANT(CrsMatrix, ConstructMatrixKokkos, M##LO##GO##Node, SC, LO, GO, Node) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -1729,22 +1561,4 @@ TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(UNIT_TEST_GROUP_ORDINAL) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(UNIT_TEST_GROUP_ORDINAL_TPETRAONLY) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(UNIT_TEST_GROUP_ORDINAL_KOKKOS) -#endif - -#if defined(HAVE_XPETRA_EPETRA) -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -UNIT_TEST_GROUP_ORDINAL_EPETRAONLY(double, int, int, EpetraNode) -UNIT_TEST_GROUP_ORDINAL_KOKKOS(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -UNIT_TEST_GROUP_ORDINAL_EPETRAONLY(double, int, LongLong, EpetraNode) -UNIT_TEST_GROUP_ORDINAL_KOKKOS(double, int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/IO/IO_UnitTests.cpp b/packages/xpetra/test/IO/IO_UnitTests.cpp index ba592fb62187..ca80cab51243 100644 --- a/packages/xpetra/test/IO/IO_UnitTests.cpp +++ b/packages/xpetra/test/IO/IO_UnitTests.cpp @@ -87,29 +87,16 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(IO, BinaryMissingRows, M, MA, Scalar, LO, GO, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - // list of all tests which run both with Epetra and Tpetra #define XP_IO_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(IO, MMMissingRows, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(IO, BinaryMissingRows, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -117,22 +104,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_IO_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_IO_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_IO_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace diff --git a/packages/xpetra/test/Map/MapFactory_UnitTests.cpp b/packages/xpetra/test/Map/MapFactory_UnitTests.cpp index dfe2d26d4bcf..0a2a81b96d51 100644 --- a/packages/xpetra/test/Map/MapFactory_UnitTests.cpp +++ b/packages/xpetra/test/Map/MapFactory_UnitTests.cpp @@ -20,14 +20,8 @@ #include "Xpetra_Map.hpp" #include "Xpetra_MapFactory.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" #include "Tpetra_Details_Behavior.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif namespace { @@ -209,20 +203,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(MapFactory, TransformNumDofsPerNodeWithOffset, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; - -#endif - // List of tests (which run both on Epetra and Tpetra) #define XP_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(MapFactory, ContigUniformMapFact, M##LO##GO##N, LO, GO, N) \ @@ -231,8 +215,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(MapFactory, TransformNumDofsPerNodeWithOffset, TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(MapFactory, TransformNumDofsPerNode, M##LO##GO##N, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(MapFactory, TransformNumDofsPerNodeWithOffset, M##LO##GO##N, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -241,21 +223,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_LGN(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_LGN(XP_MAP_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(int, int, EpetraNode) -XP_MAP_INSTANT(int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(int, LongLong, EpetraNode) -XP_MAP_INSTANT(int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/Map/Map_UnitTests.cpp b/packages/xpetra/test/Map/Map_UnitTests.cpp index f173894825b4..706bc87cf948 100644 --- a/packages/xpetra/test/Map/Map_UnitTests.cpp +++ b/packages/xpetra/test/Map/Map_UnitTests.cpp @@ -17,14 +17,8 @@ #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_DefaultPlatform.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" #include "Tpetra_Details_Behavior.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif // FINISH: add testing of operator==, operator!=, operator=, copy construct // put these into test_same_as and test_is_compatible @@ -32,11 +26,7 @@ namespace { bool mapDebugChecksEnabled() { -#ifdef HAVE_XPETRA_TPETRA return Tpetra::Details::Behavior::debug("Map"); -#else - return false; -#endif // HAVE_XPETRA_TPETRA } bool testMpi = true; @@ -106,7 +96,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, validConstructor2, M, LO, GO, N) { } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, validConstructor3, M, LO, GO, N) { -#ifdef HAVE_XPETRA_TPETRA // create Kokkos templates typedef typename N::device_type device_type; typedef typename device_type::execution_space execution_space; @@ -305,7 +294,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, validConstructor3, M, LO, GO, N) { reduceAll(*comm, Teuchos::REDUCE_SUM, success ? 0 : 1, Teuchos::outArg(globalSuccess_int)); TEST_EQUALITY_CONST(globalSuccess_int, 0); } -#endif } // This test exercises Tpetra's debug-mode checks. @@ -505,7 +493,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, compatabilityTests, M, LO, GO, N) { } TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, localMap, M, LO, GO, N) { -#ifdef HAVE_XPETRA_TPETRA // Note: get Kokkos interface for Epetra is only available if Tpetra is also enabled! typedef typename N::device_type device_type; typedef typename device_type::execution_space execution_space; typedef Kokkos::RangePolicy range_type; @@ -601,7 +588,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, localMap, M, LO, GO, N) { TEST_EQUALITY(globalElement, elementList[i]); } } -#endif } //// @@ -690,20 +676,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, ContigUniformMap, M, LO, GO, N) { // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; - -#endif - // List of tests (which run both on Epetra and Tpetra) #define XP_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(Map, invalidConstructor1, M##LO##GO##N, LO, GO, N) \ @@ -719,8 +695,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, ContigUniformMap, M, LO, GO, N) { #define XPT_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(Map, validConstructor3, M##LO##GO##N, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -730,21 +704,4 @@ TPETRA_INSTANTIATE_LGN(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_LGN(XP_MAP_INSTANT) TPETRA_INSTANTIATE_LGN(XPT_MAP_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(int, int, EpetraNode) -XP_MAP_INSTANT(int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(int, LongLong, EpetraNode) -XP_MAP_INSTANT(int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/Map/Map_UnitTests2.cpp b/packages/xpetra/test/Map/Map_UnitTests2.cpp index 7894b35f7e28..562a1bae8789 100644 --- a/packages/xpetra/test/Map/Map_UnitTests2.cpp +++ b/packages/xpetra/test/Map/Map_UnitTests2.cpp @@ -12,12 +12,7 @@ #include "Xpetra_DefaultPlatform.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif // This file regroups tests that are specific to Xpetra. @@ -91,26 +86,14 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Map, getRemoteIndexList, M, LO, GO, N) { // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; - -#endif - // List of tests (which run both on Epetra and Tpetra) #define XP_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(Map, getRemoteIndexList, M##LO##GO##N, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -119,21 +102,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_LGN(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_LGN(XP_MAP_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(int, int, EpetraNode) -XP_MAP_INSTANT(int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(int, LongLong, EpetraNode) -XP_MAP_INSTANT(int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/Map/StridedMapFactory_UnitTests.cpp b/packages/xpetra/test/Map/StridedMapFactory_UnitTests.cpp index e248824c61bb..de0a712d4ec1 100644 --- a/packages/xpetra/test/Map/StridedMapFactory_UnitTests.cpp +++ b/packages/xpetra/test/Map/StridedMapFactory_UnitTests.cpp @@ -14,13 +14,7 @@ #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_DefaultPlatform.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif #include "Xpetra_StridedMapFactory.hpp" #include "Xpetra_StridedMap.hpp" @@ -171,27 +165,15 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(StridedMapFactory, CreateStridedMap2, M, LO, G // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; - -#endif - // List of tests (which run both on Epetra and Tpetra) #define XP_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(StridedMapFactory, CreateStridedMap1, M##LO##GO##N, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(StridedMapFactory, CreateStridedMap2, M##LO##GO##N, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -200,21 +182,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_LGN(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_LGN(XP_MAP_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(int, int, EpetraNode) -XP_MAP_INSTANT(int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(int, LongLong, EpetraNode) -XP_MAP_INSTANT(int, LongLong, EpetraNode) -#endif -#endif - } // end namespace diff --git a/packages/xpetra/test/Map/StridedMap_UnitTests.cpp b/packages/xpetra/test/Map/StridedMap_UnitTests.cpp index 6258d424d6c0..ff0717047c1d 100644 --- a/packages/xpetra/test/Map/StridedMap_UnitTests.cpp +++ b/packages/xpetra/test/Map/StridedMap_UnitTests.cpp @@ -16,13 +16,7 @@ #include "Xpetra_DefaultPlatform.hpp" #include "Xpetra_StridedMap.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMap.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#endif namespace { @@ -437,20 +431,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(StridedMap, StridedPartConstructorOffsetPlusIn // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; - -#endif - // List of tests (which run both on Epetra and Tpetra) #define XP_MAP_INSTANT(LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(StridedMap, Constructor1, M##LO##GO##N, LO, GO, N) \ @@ -462,8 +446,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(StridedMap, StridedPartConstructorOffsetPlusIn TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(StridedMap, StridedPartConstructorWithOffset, M##LO##GO##N, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_4_INSTANT(StridedMap, StridedPartConstructorOffsetPlusIndexBase, M##LO##GO##N, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -472,21 +454,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_LGN(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_LGN(XP_MAP_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(int, int, EpetraNode) -XP_MAP_INSTANT(int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(int, LongLong, EpetraNode) -XP_MAP_INSTANT(int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/MapExtractor/MapExtractorFactory_UnitTests.cpp b/packages/xpetra/test/MapExtractor/MapExtractorFactory_UnitTests.cpp index 4ce9f25a1f31..17954cf5aeb3 100644 --- a/packages/xpetra/test/MapExtractor/MapExtractorFactory_UnitTests.cpp +++ b/packages/xpetra/test/MapExtractor/MapExtractorFactory_UnitTests.cpp @@ -22,14 +22,8 @@ #include // #include -#ifdef HAVE_XPETRA_TPETRA #include #include -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include -#endif namespace XpetraMapExtractorFactoryTests { @@ -168,28 +162,15 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MapExtractorFactory, ConstructFromBlockedMap, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - #define XP_MAPEXTRACTORACTORY_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(MapExtractorFactory, ConstructFromFullAndPartialMaps, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(MapExtractorFactory, ConstructFromBlockedMap, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -197,22 +178,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MAPEXTRACTORACTORY_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_MAPEXTRACTORACTORY_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_MAPEXTRACTORACTORY_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace XpetraMapExtractorFactoryTests diff --git a/packages/xpetra/test/Matrix/Matrix_UnitTests.cpp b/packages/xpetra/test/Matrix/Matrix_UnitTests.cpp index 42eabaaae53e..d2fb54749caf 100644 --- a/packages/xpetra/test/Matrix/Matrix_UnitTests.cpp +++ b/packages/xpetra/test/Matrix/Matrix_UnitTests.cpp @@ -20,12 +20,7 @@ #include "Xpetra_MatrixFactory2.hpp" #include "Xpetra_MultiVectorFactory.hpp" #include "Xpetra_CrsMatrixWrap.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraCrsMatrix.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif namespace { using Xpetra::viewLabel_t; @@ -57,7 +52,6 @@ Teuchos::RCP > getDefaultComm() { //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, ViewSwitching, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; Teuchos::RCP > comm = getDefaultComm(); @@ -103,7 +97,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, ViewSwitching, M, MA, Scalar, LO, GO, op.fillComplete(); } -#endif } //// @@ -112,7 +105,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, StridedMaps_Tpetra, M, MA, Scalar, LO, const size_t numLocal = 10; const size_t INVALID = Teuchos::OrdinalTraits::invalid(); // TODO: global_size_t instead of size_t -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; Teuchos::RCP > map = Xpetra::MapFactory::createContigMapWithNode(Xpetra::UseTpetra, INVALID, numLocal, comm); @@ -132,36 +124,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, StridedMaps_Tpetra, M, MA, Scalar, LO, int blkSize = op.GetFixedBlockSize(); TEST_EQUALITY_CONST(blkSize, 2); } -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, StridedMaps_Epetra, M, MA, Scalar, LO, GO, Node) { -#ifdef HAVE_XPETRA_EPETRA - Teuchos::RCP > comm = getDefaultComm(); - const size_t numLocal = 10; - const size_t INVALID = Teuchos::OrdinalTraits::invalid(); - - typedef Xpetra::CrsMatrixWrap EpCrsMatrix; - - Teuchos::RCP > epmap = Xpetra::MapFactory::createContigMap(Xpetra::UseEpetra, INVALID, numLocal, comm); - { - Xpetra::EpetraCrsMatrixT t = Xpetra::EpetraCrsMatrixT(epmap, numLocal); - - // Test of constructor - EpCrsMatrix op(epmap, 1); - op.fillComplete(); - - TEST_EQUALITY_CONST(op.GetCurrentViewLabel(), op.GetDefaultViewLabel()); - TEST_EQUALITY_CONST(op.GetCurrentViewLabel(), op.SwitchToView(op.GetCurrentViewLabel())); - - op.SetFixedBlockSize(2); - TEST_EQUALITY(op.IsView("stridedMaps"), true); - TEST_EQUALITY(op.IsView("StridedMaps"), false); - int blkSize = op.GetFixedBlockSize(); - TEST_EQUALITY_CONST(blkSize, 2); - } -#endif } //// @@ -170,7 +136,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BuildCopy_StridedMaps_Tpetra, M, MA, S const size_t numLocal = 10; const size_t INVALID = Teuchos::OrdinalTraits::invalid(); // TODO: global_size_t instead of size_t -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; Teuchos::RCP > map = Xpetra::MapFactory::createContigMapWithNode(Xpetra::UseTpetra, INVALID, numLocal, comm); @@ -186,7 +151,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BuildCopy_StridedMaps_Tpetra, M, MA, S int blkSize = t->GetFixedBlockSize(); TEST_EQUALITY_CONST(blkSize, 2); } -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BlockDiagonalUtils_Tpetra, M, MA, Scalar, LO, GO, Node) { @@ -199,7 +163,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BlockDiagonalUtils_Tpetra, M, MA, Scal using Teuchos::rcp_const_cast; Scalar SC_one = Teuchos::ScalarTraits::one(); -#ifdef HAVE_XPETRA_TPETRA using MV = Xpetra::MultiVector; typedef Xpetra::CrsMatrixWrap CrsMatrixWrap; RCP > map = @@ -234,28 +197,16 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BlockDiagonalUtils_Tpetra, M, MA, Scal Xpetra::MatrixUtils::inverseScaleBlockDiagonal(*diag5c, false, *toScale5); } -#endif } // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - // List of tests which run only with Tpetra #define XP_TPETRA_MATRIX_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(Matrix, StridedMaps_Tpetra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ @@ -273,8 +224,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Matrix, BlockDiagonalUtils_Tpetra, M, MA, Scal // list of all tests which run both with Epetra and Tpetra //#define XP_MATRIX_INSTANT(S,LO,GO,N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -287,24 +236,4 @@ TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MATRIX_INSTANT) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MATRIX_INSTANT_NO_COMPLEX) #endif -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -// XP_MATRIX_INSTANT(double,int,int,EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -// XP_MATRIX_INSTANT(double,int,LongLong,EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace diff --git a/packages/xpetra/test/MatrixMatrix/MatrixMatrix_UnitTests.cpp b/packages/xpetra/test/MatrixMatrix/MatrixMatrix_UnitTests.cpp index 493cb07e1be7..95d1191d3ec4 100644 --- a/packages/xpetra/test/MatrixMatrix/MatrixMatrix_UnitTests.cpp +++ b/packages/xpetra/test/MatrixMatrix/MatrixMatrix_UnitTests.cpp @@ -16,15 +16,6 @@ #include -#ifdef HAVE_XPETRA_EPETRAEXT -// EpetraExt -#include "EpetraExt_CrsMatrixIn.h" -#include "EpetraExt_VectorIn.h" -#include "EpetraExt_VectorOut.h" -#include "EpetraExt_MatrixMatrix.h" -#include "EpetraExt_RowMatrixOut.h" -#endif - #include #include @@ -32,16 +23,11 @@ #include #include #include -#ifdef HAVE_XPETRA_TPETRA #include #include #include #include #include -#endif -#ifdef HAVE_XPETRA_EPETRA -#include -#endif #include #include #include @@ -82,14 +68,12 @@ using Xpetra::viewLabel_t; bool testMpi = true; double errorTolSlack = 1e+1; -#if (defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT)) || (defined(HAVE_XPETRA_TPETRA)) RCP > getDefaultComm() { if (testMpi) { return DefaultPlatform::getDefaultPlatform().getComm(); } return rcp(new Teuchos::SerialComm()); } -#endif ///////////////////////////////////////////////////// @@ -111,220 +95,9 @@ TEUCHOS_STATIC_SETUP() { /// unit test for matrix-matrix multiplication (both for Epetra and Tpetra) TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, Multiply_Epetra, M, MA, Scalar, LO, GO, Node) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::CrsMatrix CrsMatrixClass; - typedef Xpetra::Matrix MatrixClass; - typedef Xpetra::CrsMatrixWrap CrsMatrixWrapClass; - - // Teuchos::RCP fos = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout)); - // yAB->describe(*fos, Teuchos::VERB_EXTREME); - - { // Epetra test - // get a comm and node - RCP > comm = getDefaultComm(); - - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // generate problem - LO nEle = 6; - const RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - // TODO get rid of this... - //#ifndef XPETRA_TEST_USE_LONGLONG_GO - const RCP > XepMap = Teuchos::rcp_dynamic_cast >(map); - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const Teuchos::RCP epMap = Teuchos::rcpFromRef(XepMap->getEpetra_Map()); - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix *ptrA = 0; - Epetra_CrsMatrix *ptrB = 0; - Epetra_CrsMatrix *ptrAB = 0; - Epetra_CrsMatrix *ptrAtB = 0; - Epetra_CrsMatrix *ptrABt = 0; - Epetra_CrsMatrix *ptrAtBt = 0; - EpetraExt::MatrixMarketFileToCrsMatrix("A.mat", *epMap, *epMap, *epMap, ptrA); - EpetraExt::MatrixMarketFileToCrsMatrix("B.mat", *epMap, *epMap, *epMap, ptrB); - EpetraExt::MatrixMarketFileToCrsMatrix("AB.mat", *epMap, *epMap, *epMap, ptrAB); - EpetraExt::MatrixMarketFileToCrsMatrix("AtB.mat", *epMap, *epMap, *epMap, ptrAtB); - EpetraExt::MatrixMarketFileToCrsMatrix("ABt.mat", *epMap, *epMap, *epMap, ptrABt); - EpetraExt::MatrixMarketFileToCrsMatrix("AtBt.mat", *epMap, *epMap, *epMap, ptrAtBt); - TEUCHOS_TEST_FOR_EXCEPTION(ptrA == NULL || ptrB == NULL || ptrAB == NULL || ptrAtB == NULL || ptrABt == NULL || ptrAtBt == NULL, std::logic_error, "Could not open one or more matrix files"); - RCP epA = Teuchos::rcp(ptrA); - RCP epB = Teuchos::rcp(ptrB); - RCP epAB = Teuchos::rcp(ptrAB); - RCP epAtB = Teuchos::rcp(ptrAtB); - RCP epABt = Teuchos::rcp(ptrABt); - RCP epAtBt = Teuchos::rcp(ptrAtBt); - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - Teuchos::RCP xAmat = Teuchos::rcp(new MA(epA)); - Teuchos::RCP xBmat = Teuchos::rcp(new MA(epB)); - Teuchos::RCP xABmat = Teuchos::rcp(new MA(epAB)); - Teuchos::RCP xAtBmat = Teuchos::rcp(new MA(epAtB)); - Teuchos::RCP xABtmat = Teuchos::rcp(new MA(epABt)); - Teuchos::RCP xAtBtmat = Teuchos::rcp(new MA(epAtBt)); - - Teuchos::RCP xA = Teuchos::rcp(new CrsMatrixWrapClass(xAmat)); - Teuchos::RCP xB = Teuchos::rcp(new CrsMatrixWrapClass(xBmat)); - Teuchos::RCP xAB = Teuchos::rcp(new CrsMatrixWrapClass(xABmat)); - Teuchos::RCP xAtB = Teuchos::rcp(new CrsMatrixWrapClass(xAtBmat)); - Teuchos::RCP xABt = Teuchos::rcp(new CrsMatrixWrapClass(xABtmat)); - Teuchos::RCP xAtBt = Teuchos::rcp(new CrsMatrixWrapClass(xAtBtmat)); - - Teuchos::RCP yAB = Teuchos::rcp(new CrsMatrixWrapClass(map, 6)); - - // Teuchos::RCP fos = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout)); - // yAB->describe(*fos,Teuchos::VERB_EXTREME); - - // Xpetra::MatrixMatrix::Multiply ( - Xpetra::MatrixMatrix::Multiply( - *xA, - false, - *xB, - false, - *yAB); - // Xpetra::MatrixMatrix::Add(*xAB,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAB->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - true, - *xB, - false, - *yAB); - // Xpetra::MatrixMatrix::Add(*xAtB,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAtB->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - false, - *xB, - true, - *yAB); - // Xpetra::MatrixMatrix::Add (*xABt,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xABt->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - true, - *xB, - true, - *yAB); - // Xpetra::MatrixMatrix::Add (*xAtBt,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAtBt->getFrobeniusNorm(), out, success); - } // end Epetra test -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, Multiply_Epetra64, M, MA, Scalar, LO, GO, Node) { -#if defined(HAVE_XPETRA_EPETRA) && defined(HAVE_XPETRA_EPETRAEXT) - typedef Xpetra::Map MapClass; - typedef Xpetra::MapFactory MapFactoryClass; - typedef Xpetra::CrsMatrix CrsMatrixClass; - typedef Xpetra::Matrix MatrixClass; - typedef Xpetra::CrsMatrixWrap CrsMatrixWrapClass; - - // Teuchos::RCP fos = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout)); - // yAB->describe(*fos, Teuchos::VERB_EXTREME); - - { // Epetra test - // get a comm and node - RCP > comm = getDefaultComm(); - - Xpetra::UnderlyingLib lib = Xpetra::UseEpetra; - - // generate problem - LO nEle = 6; - const RCP map = MapFactoryClass::Build(lib, nEle, 0, comm); - const RCP > XepMap = Teuchos::rcp_dynamic_cast >(map); - /////////////////////////////////////// transform Xpetra::Map objects to Epetra - // this is needed for AztecOO - const Teuchos::RCP epMap = Teuchos::rcpFromRef(XepMap->getEpetra_Map()); - /////////////////////////////////////// import problem matrix and RHS from files (-> Epetra) - - // read in problem - Epetra_CrsMatrix *ptrA = 0; - Epetra_CrsMatrix *ptrB = 0; - Epetra_CrsMatrix *ptrAB = 0; - Epetra_CrsMatrix *ptrAtB = 0; - Epetra_CrsMatrix *ptrABt = 0; - Epetra_CrsMatrix *ptrAtBt = 0; - EpetraExt::MatrixMarketFileToCrsMatrix64("A.mat", *epMap, *epMap, *epMap, ptrA); - EpetraExt::MatrixMarketFileToCrsMatrix64("B.mat", *epMap, *epMap, *epMap, ptrB); - EpetraExt::MatrixMarketFileToCrsMatrix64("AB.mat", *epMap, *epMap, *epMap, ptrAB); - EpetraExt::MatrixMarketFileToCrsMatrix64("AtB.mat", *epMap, *epMap, *epMap, ptrAtB); - EpetraExt::MatrixMarketFileToCrsMatrix64("ABt.mat", *epMap, *epMap, *epMap, ptrABt); - EpetraExt::MatrixMarketFileToCrsMatrix64("AtBt.mat", *epMap, *epMap, *epMap, ptrAtBt); - TEUCHOS_TEST_FOR_EXCEPTION(ptrA == NULL || ptrB == NULL || ptrAB == NULL || ptrAtB == NULL || ptrABt == NULL || ptrAtBt == NULL, std::logic_error, "Could not open one or more matrix files"); - RCP epA = Teuchos::rcp(ptrA); - RCP epB = Teuchos::rcp(ptrB); - RCP epAB = Teuchos::rcp(ptrAB); - RCP epAtB = Teuchos::rcp(ptrAtB); - RCP epABt = Teuchos::rcp(ptrABt); - RCP epAtBt = Teuchos::rcp(ptrAtBt); - - /////////////////////////////////////// transform Epetra objects to Xpetra (needed for MueLu) - - // build Xpetra objects from Epetra_CrsMatrix objects - Teuchos::RCP xAmat = Teuchos::rcp(new MA(epA)); - Teuchos::RCP xBmat = Teuchos::rcp(new MA(epB)); - Teuchos::RCP xABmat = Teuchos::rcp(new MA(epAB)); - Teuchos::RCP xAtBmat = Teuchos::rcp(new MA(epAtB)); - Teuchos::RCP xABtmat = Teuchos::rcp(new MA(epABt)); - Teuchos::RCP xAtBtmat = Teuchos::rcp(new MA(epAtBt)); - - Teuchos::RCP xA = Teuchos::rcp(new CrsMatrixWrapClass(xAmat)); - Teuchos::RCP xB = Teuchos::rcp(new CrsMatrixWrapClass(xBmat)); - Teuchos::RCP xAB = Teuchos::rcp(new CrsMatrixWrapClass(xABmat)); - Teuchos::RCP xAtB = Teuchos::rcp(new CrsMatrixWrapClass(xAtBmat)); - Teuchos::RCP xABt = Teuchos::rcp(new CrsMatrixWrapClass(xABtmat)); - Teuchos::RCP xAtBt = Teuchos::rcp(new CrsMatrixWrapClass(xAtBtmat)); - - Teuchos::RCP yAB = Teuchos::rcp(new CrsMatrixWrapClass(map, 6)); - - // Xpetra::MatrixMatrix::Multiply ( - Xpetra::MatrixMatrix::Multiply( - *xA, - false, - *xB, - false, - *yAB); - // Xpetra::MatrixMatrix::Add(*xAB,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAB->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - true, - *xB, - false, - *yAB); - // Xpetra::MatrixMatrix::Add(*xAtB,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAtB->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - false, - *xB, - true, - *yAB); - // Xpetra::MatrixMatrix::Add (*xABt,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xABt->getFrobeniusNorm(), out, success); - - Xpetra::MatrixMatrix::Multiply( - *xA, - true, - *xB, - true, - *yAB); - // Xpetra::MatrixMatrix::Add (*xAtBt,false,1.0,*yAB,-1.0); - TEUCHOS_TEST_EQUALITY(yAB->getFrobeniusNorm(), xAtBt->getFrobeniusNorm(), out, success); - } // end Epetra test -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, Multiply_Tpetra, M, MA, Scalar, LO, GO, Node) { @@ -332,7 +105,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, Multiply_Tpetra, M, MA, Scalar, // The matrix reader does not work with complex scalars. Skip all tests then. return; #endif -#ifdef HAVE_XPETRA_TPETRA typedef Xpetra::Map MapClass; typedef Xpetra::MapFactory MapFactoryClass; typedef Xpetra::CrsMatrix CrsMatrixClass; @@ -418,7 +190,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, Multiply_Tpetra, M, MA, Scalar, TEUCHOS_TEST_EQUALITY(xAtBt->getFrobeniusNorm(), yAtBt->getFrobeniusNorm(), out, success); TEUCHOS_TEST_EQUALITY(xAtBt->getLocalNumEntries(), yAtBt->getLocalNumEntries(), out, success); } // end Tpetra test -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, BlockCrs, M, MB, Scalar, LO, GO, Node) { @@ -426,7 +197,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, BlockCrs, M, MB, Scalar, LO, GO, // The matrix reader does not work with complex scalars. Skip all tests then. return; #endif -#ifdef HAVE_XPETRA_TPETRA typedef Tpetra::BlockCrsMatrix BCM; typedef Tpetra::CrsGraph graph_type; typedef Tpetra::Map map_type; @@ -463,29 +233,17 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, BlockCrs, M, MB, Scalar, LO, GO, TEUCHOS_TEST_EQUALITY(helpers::isTpetraBlockCrs(mat), true, out, success); TEUCHOS_TEST_EQUALITY(helpers::isTpetraCrs(mat), false, out, success); -#endif } // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; \ typedef typename Xpetra::TpetraBlockCrsMatrix MB##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - // List of tests which run only with Tpetra #define XP_TPETRA_MATRIX_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(MatrixMatrix, Multiply_Tpetra, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) \ @@ -499,8 +257,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixMatrix, BlockCrs, M, MB, Scalar, LO, GO, #define XP_EPETRA64_MATRIX_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(MatrixMatrix, Multiply_Epetra64, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -508,22 +264,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MATRIX_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_EPETRA_MATRIX_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_EPETRA64_MATRIX_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // end namespace diff --git a/packages/xpetra/test/MatrixUtils/MatrixUtils_UnitTests.cpp b/packages/xpetra/test/MatrixUtils/MatrixUtils_UnitTests.cpp index 851a609a260e..b7bbe4165b4d 100644 --- a/packages/xpetra/test/MatrixUtils/MatrixUtils_UnitTests.cpp +++ b/packages/xpetra/test/MatrixUtils/MatrixUtils_UnitTests.cpp @@ -17,12 +17,7 @@ #include "Xpetra_MapFactory.hpp" #include "Xpetra_MatrixUtils.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraCrsMatrix.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraCrsMatrix.hpp" -#endif namespace { using Xpetra::viewLabel_t; @@ -111,28 +106,15 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MatrixUtils, SwitchMatrixToStridedMaps, M, MA, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraCrsMatrix MA##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraCrsMatrixT MA##S##LO##GO##N; - -#endif - // list of all tests which run both with Epetra and Tpetra #define XP_MATRIX_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_6_INSTANT(MatrixUtils, SwitchMatrixToStridedMaps, M##LO##GO##N, MA##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -140,22 +122,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MATRIX_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_MATRIX_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_MATRIX_INSTANT(double, int, LongLong, EpetraNode) -#endif - -#endif - } // namespace diff --git a/packages/xpetra/test/MultiVector/MultiVector_UnitTests.cpp b/packages/xpetra/test/MultiVector/MultiVector_UnitTests.cpp index fe414b164166..7736fd3f7a82 100644 --- a/packages/xpetra/test/MultiVector/MultiVector_UnitTests.cpp +++ b/packages/xpetra/test/MultiVector/MultiVector_UnitTests.cpp @@ -18,18 +18,11 @@ #include #include -#ifdef HAVE_XPETRA_TPETRA #include "Tpetra_Core.hpp" #include "Tpetra_Map.hpp" #include "Xpetra_TpetraMultiVector.hpp" #include "Xpetra_TpetraVector.hpp" #include "Tpetra_Details_Behavior.hpp" -#endif -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMap.hpp" -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraVector.hpp" -#endif // HAVE_XPETRA_EPETRA #include "Xpetra_MapFactory.hpp" #include "Xpetra_MultiVectorFactory.hpp" // taw: include MultiVectorFactory before VectorFactory (for BlockedMultiVector definition) @@ -97,10 +90,8 @@ using Xpetra::GloballyDistributed; // using Tpetra::createContigMapWithNode; // using Tpetra::createLocalMapWithNode; -#ifdef HAVE_XPETRA_TPETRA using Xpetra::useTpetra::createContigMapWithNode; using Xpetra::useTpetra::createLocalMapWithNode; -#endif bool testMpi = true; double errorTolSlack = 1.0e+2; @@ -419,28 +410,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, AssignmentDeepCopies, M, MV, V, S //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, NonMemberConstructorsEpetra, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_EPETRA - // typedef typename ScalarTraits::magnitudeType Magnitude; - const global_size_t INVALID = OrdinalTraits::invalid(); - RCP > comm = getDefaultComm(); - EXTRACT_LIB(comm, M) // returns mylib - - // create a Map - const size_t numLocal = 13; - const size_t numVecs = 7; - RCP > map = - Xpetra::UnitTestHelpers::createContigMapWithNode(mylib, INVALID, numLocal, comm); - // Xpetra::MapFactory::Build(Xpetra::UseEpetra, INVALID, numLocal, 0, comm); - if (mylib == Xpetra::UseEpetra) { - RCP > emap = Teuchos::rcp_dynamic_cast >(map); - RCP mvec = Teuchos::rcp(new Epetra_MultiVector(emap->getEpetra_Map(), numVecs)); - RCP vec = Teuchos::rcp(new Epetra_Vector(emap->getEpetra_Map())); - RCP xmv = Teuchos::rcp_dynamic_cast(Xpetra::toXpetra(mvec)); - // RCP xv = Teuchos::rcp_dynamic_cast(Xpetra::toXpetra(vec)); // there is no toXpetra for Vectors! - TEST_EQUALITY(xmv->getNumVectors(), numVecs); - // TEST_EQUALITY_CONST(xv->getNumVectors(), 1); - } -#endif } //// @@ -456,7 +425,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, NonMemberConstructorsTpetra, M, M RCP > map = Xpetra::UnitTestHelpers::createContigMapWithNode(mylib, INVALID, numLocal, comm); -#ifdef HAVE_XPETRA_TPETRA if (mylib == Xpetra::UseTpetra) { RCP > tmap = Teuchos::rcp_dynamic_cast >(map); RCP > mvec = Tpetra::createMultiVector(tmap->getTpetra_Map(), numVecs); @@ -468,7 +436,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, NonMemberConstructorsTpetra, M, M TEST_EQUALITY(xmv->getNumVectors(), numVecs); TEST_EQUALITY_CONST(xv->getNumVectors(), 1); } -#endif } //// @@ -490,9 +457,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, basic, M, MV, V, Scalar, LocalOrd TEST_EQUALITY(mvec.getGlobalLength(), numRanks * numLocal); // Norms are not computed by Epetra_IntMultiVector so far -#ifdef HAVE_XPETRA_EPETRA - if (!std::is_same_v) -#endif { if (!(std::is_same_v || std::is_same_v)) { out << "Running the norm tests!" << std::endl; @@ -553,7 +517,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstNumVecs, M, MV, V, Scalar //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstLDA, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA // numlocal > LDA // ergo, the arrayview doesn't contain enough data to specify the entries // also, if bounds checking is enabled, check that bad bounds are caught @@ -579,12 +542,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstLDA, M, MV, V, Scalar, Lo #endif // LDA < numLocal throws an exception anytime TEST_THROW(MV mvec(map, values(0, 4), 1, numVecs), std::runtime_error); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, NonContigView, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA if (ScalarTraits::isOrdinal) return; typedef typename ScalarTraits::magnitudeType Mag; @@ -775,12 +736,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, NonContigView, M, MV, V, Scalar, TEST_FLOATING_EQUALITY(nrmOrigC[exView2[j]], nrmOrigC_aft[exView2[j]], tol); } } -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Describable, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA const LocalOrdinal INVALID = OrdinalTraits::invalid(); RCP > comm = getDefaultComm(); const int myImageID = comm->getRank(); @@ -829,12 +788,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Describable, M, MV, V, Scalar, Lo mvecA.describe(out, VERB_EXTREME); comm->barrier(); comm->barrier(); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, BadMultiply, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA const global_size_t INVALID = OrdinalTraits::invalid(); RCP > comm = getDefaultComm(); #ifdef XPETRA_NOT_IMPLEMENTED @@ -904,12 +861,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, BadMultiply, MV, V, Scalar, Local TEST_THROW(mv3nx2.multiply(NO_TRANS, NO_TRANS, S1, mv3nx2, mv2x3, S0), std::runtime_error); // (3n x 2) x (2 x 3) doesn't fit 3nx2 #endif } -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, Multiply, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA using Teuchos::View; // typedef typename ScalarTraits::magnitudeType Mag; @@ -1065,12 +1020,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, Multiply, MV, V, Scalar, LocalOrd TEST_COMPARE_FLOATING_ARRAYS(tmpView, check3, M0); } #endif -#endif // HAVE_XPETRA_TPETRA } //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, ElementWiseMultiply, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA using Teuchos::View; typedef typename ScalarTraits::magnitudeType Mag; @@ -1101,7 +1054,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, ElementWiseMultiply, M, MV, V, Sc tmpView = C.get1dView(); TEST_COMPARE_FLOATING_ARRAYS(tmpView(0, 6), check2, M0); } -#endif // HAVE_XPETRA_TPETRA } //// @@ -1153,7 +1105,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstAA, M, MV, V, Scalar, Loc mv21(map2,1), mv22(map2,2); Array dots(2); -#ifdef HAVE_XPETRA_TPETRA if(mylib==Xpetra::UseTpetra) { // incompatible maps TEST_THROW(mv12.dot(mv21,dots()),std::runtime_error); @@ -1164,12 +1115,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstAA, M, MV, V, Scalar, Loc TEST_THROW(mv22.dot(mv22,dots(0,1)),std::runtime_error); #endif } -#endif } { V v1(map1), v2(map2); -#ifdef HAVE_XPETRA_TPETRA if (mylib == Xpetra::UseTpetra) { // incompatible maps TEST_THROW(v1.dot(v2),std::runtime_error); @@ -1179,7 +1128,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstAA, M, MV, V, Scalar, Loc #ifdef TEUCHOS_DEBUG TEST_THROW(v1.dot(v2,dots()),std::runtime_error); TEST_THROW(v2.dot(v1,dots()),std::runtime_error); -#endif #endif } } @@ -1188,7 +1136,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, BadConstAA, M, MV, V, Scalar, Loc //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, OrthoDot, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -1254,12 +1201,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, OrthoDot, MV, V, Scalar, LocalOrd std::fill(ans.begin(), ans.end(), as(2 * numImages)); TEST_COMPARE_FLOATING_ARRAYS(norms1, ans, M0); TEST_COMPARE_FLOATING_ARRAYS(norms2, ans, M0); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CopyView, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -1477,12 +1422,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CopyView, MV, V, Scalar, LocalOrd TEST_COMPARE_FLOATING_ARRAYS(norms, zeros, M0); } } -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, OffsetView, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA // typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -1637,12 +1580,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, OffsetView, MV, V, Scalar, LocalO } } #endif -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, ZeroScaleUpdate, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -1720,14 +1661,12 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, ZeroScaleUpdate, MV, V, Scalar, L C.norm2(norms); //TODO:FAILED TEST_COMPARE_FLOATING_ARRAYS(norms,zeros,M0); }*/ -#endif // HAVE_XPETRA_TPETRA } //// #if 0 // TAW fix me TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL( MultiVector, ScaleAndAssign, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node ) { -#ifdef HAVE_XPETRA_TPETRA using std::endl; typedef Teuchos::ScalarTraits STS; typedef typename STS::magnitudeType Mag; @@ -1908,13 +1847,11 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, ZeroScaleUpdate, MV, V, Scalar, L A.norm2 (Anrms_aft ()); TEST_COMPARE_FLOATING_ARRAYS( Anrms (), Anrms_aft (), tol); } -#endif // HAVE_XPETRA_TPETRA } #endif // fix me! //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, ZeroScaleUpdate, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); const Mag M0 = ScalarTraits::zero(); @@ -1994,12 +1931,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, ZeroScaleUpdate, MV, V, Scalar, LocalO // TODO FAILED: TEST_EQUALITY(norm,M0); // TODO FAILED: TEST_EQUALITY(norm,norms[0]); } -#endif // HAVE_XPETRA_TPETRA } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CopyConst, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -2066,12 +2001,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CopyConst, MV, V, Scalar, LocalOr // TEST_COMPARE_FLOATING_ARRAYS(ncopy1,ones,M0); // TEST_COMPARE_FLOATING_ARRAYS(ncopy2,twos,M0); } -#endif // HAVE_XPETRA_TPETRA } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, CopyConst, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Magnitude; const global_size_t INVALID = OrdinalTraits::invalid(); RCP > comm = getDefaultComm(); @@ -2102,12 +2035,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, CopyConst, MV, V, Scalar, LocalOrdinal // TODO FAILED: TEST_EQUALITY(norig, as(0)); // TODO FAILED: TEST_EQUALITY(ncopy1,as(1)); // TODO FAILED: TEST_EQUALITY(ncopy2,as(2)); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, Indexing, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef ScalarTraits SCT; typedef typename SCT::magnitudeType Magnitude; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -2135,12 +2066,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(Vector, Indexing, MV, V, Scalar, LocalOrdinal, v1.update(-1.0, v2, 1.0); err = v1.norm2(); TEST_EQUALITY_CONST(err, SCT::zero()); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, SingleVecNormalize, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA // this documents a usage case in Anasazi::SVQBOrthoManager, which was failing // error turned out to be a neglected return in both implementations of update(), // after passing the buck to scale() in the case of alpha==0 or beta==0 or gamma=0 @@ -2190,12 +2119,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, SingleVecNormalize, MV, V, Scalar mv.norm2(norms()); // should be all one now Array ones(numVectors, M1); // TODO FAILED: TEST_COMPARE_FLOATING_ARRAYS(norms,ones,ScalarTraits::eps()*as(10.)); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountDot, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Magnitude; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -2229,12 +2156,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountDot, MV, V, Scalar, LocalOrd // check the answers TEST_COMPARE_FLOATING_ARRAYS(dots1, dots2, M0); TEST_COMPARE_FLOATING_ARRAYS(dots1, answer, M0); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountDotNonTrivLDA, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA // same as CountDot, but the A,LDA has a non-trivial LDA (i.e., LDA != myLen) typedef typename ScalarTraits::magnitudeType Magnitude; @@ -2277,12 +2202,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountDotNonTrivLDA, MV, V, Scalar // check the answers TEST_COMPARE_FLOATING_ARRAYS(dots1, dots2, M0); TEST_COMPARE_FLOATING_ARRAYS(dots1, answer, M0); -#endif // HAVE_XPETRA_TPETRA } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountNorm1, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType MT; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -2327,12 +2250,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountNorm1, MV, V, Scalar, LocalO // TODO FAILED: TEST_EQUALITY( mvec.getVector(j)->meanValue(), answer[j] ); } } -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountNormInf, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType MT; const global_size_t INVALID = OrdinalTraits::invalid(); @@ -2362,12 +2283,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, CountNormInf, MV, V, Scalar, Loca mvec.normInf(norms()); // check the answers TEST_COMPARE_FLOATING_ARRAYS(norms, answer, M0); -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, Norm2, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType MT; const global_size_t INVALID = OrdinalTraits::invalid(); const MT M0 = ScalarTraits::zero(); @@ -2393,12 +2312,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, Norm2, MV, V, Scalar, LocalOrdina TEST_ARRAY_ELE_EQUALITY(normsZero, i, M0); } success &= local_success; -#endif } //// TODO this code should be generalized TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, BadCombinations, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename ScalarTraits::magnitudeType Mag; const global_size_t INVALID = OrdinalTraits::invalid(); RCP > comm = getDefaultComm(); @@ -2444,49 +2361,13 @@ TEUCHOS_UNIT_TEST_TEMPLATE_6_DECL(MultiVector, BadCombinations, MV, V, Scalar, L TEST_THROW(m1n2.reciprocal(m1n1), std::runtime_error); // reciprocal TEST_THROW(m1n2.reciprocal(m2n2), std::runtime_error); } -#endif } TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Constructor_Epetra, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_EPETRA - RCP > comm = getDefaultComm(); - - { - TEST_NOTHROW(M(10, 0, comm)); - TEST_NOTHROW(MV(Teuchos::rcp(new M(10, 0, comm)), 3)); - } - -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_PTHREAD) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraMultiVectorT mx; - TEST_THROW(mx(Teuchos::null, 3), Xpetra::Exceptions::RuntimeError); - } -#endif -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_CUDA) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraMultiVectorT mx; - TEST_THROW(mx(Teuchos::null, 3), Xpetra::Exceptions::RuntimeError); - } -#endif -#if defined(HAVE_XPETRA_TPETRA) && defined(HAVE_TPETRA_INST_HIP) - { - typedef Xpetra::EpetraMapT mm; - TEST_THROW(mm(10, 0, comm), Xpetra::Exceptions::RuntimeError); - typedef Xpetra::EpetraMultiVectorT mx; - TEST_THROW(mx(Teuchos::null, 3), Xpetra::Exceptions::RuntimeError); - } -#endif - -#endif } //// TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Typedefs, M, MV, V, Scalar, LocalOrdinal, GlobalOrdinal, Node) { -#ifdef HAVE_XPETRA_TPETRA typedef typename MV::scalar_type scalar_type; typedef typename MV::local_ordinal_type local_ordinal_type; typedef typename MV::global_ordinal_type global_ordinal_type; @@ -2495,34 +2376,17 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Typedefs, M, MV, V, Scalar, Local TEST_EQUALITY_CONST((std::is_same_v) == true, true); TEST_EQUALITY_CONST((std::is_same_v) == true, true); TEST_EQUALITY_CONST((std::is_same_v) == true, true); -#endif } // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraMultiVector MV##S##LO##GO##N; \ typedef typename Xpetra::TpetraVector V##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_NO_ORDINAL_SCALAR_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraMultiVectorT MV##S##LO##GO##N; \ - typedef typename Xpetra::EpetraVectorT V##S##LO##GO##N; - -#define XPETRA_EPETRA_ORDINAL_SCALAR_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraIntMultiVectorT MV##S##LO##GO##N; \ - typedef typename Xpetra::EpetraIntVectorT V##S##LO##GO##N; - -#endif - // List of tests which run only with Tpetra #define XP_TPETRA_MULTIVECTOR_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, BadConstLDA, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) \ @@ -2566,7 +2430,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, Typedefs, M, MV, V, Scalar, Local TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, Typedefs, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) // can we relax the INT INT? -#if defined(HAVE_XPETRA_TPETRA) #include #include @@ -2579,27 +2442,4 @@ TPETRA_INSTANTIATE_SLGN(XP_MULTIVECTOR_INSTANT) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MULTIVECTOR_NO_ORDINAL_INSTANT) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_TPETRA_MULTIVECTOR_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_NO_ORDINAL_SCALAR_TYPES(double, int, int, EpetraNode) -XPETRA_EPETRA_ORDINAL_SCALAR_TYPES(int, int, int, EpetraNode) -XP_MULTIVECTOR_NO_ORDINAL_INSTANT(double, int, int, EpetraNode) -XP_MULTIVECTOR_INSTANT(int, int, int, EpetraNode) -XP_EPETRA_MULTIVECTOR_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_NO_ORDINAL_SCALAR_TYPES(double, int, LongLong, EpetraNode) -XPETRA_EPETRA_ORDINAL_SCALAR_TYPES(int, int, LongLong, EpetraNode) -XP_MULTIVECTOR_INSTANT(int, int, LongLong, EpetraNode) -XP_MULTIVECTOR_NO_ORDINAL_INSTANT(double, int, LongLong, EpetraNode) -XP_EPETRA_MULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -#endif -#endif - } // namespace diff --git a/packages/xpetra/test/MultiVector/MultiVector_UnitTestsThyraSpecific.cpp b/packages/xpetra/test/MultiVector/MultiVector_UnitTestsThyraSpecific.cpp index 9bc328da9ae5..2aa75b1c6619 100644 --- a/packages/xpetra/test/MultiVector/MultiVector_UnitTestsThyraSpecific.cpp +++ b/packages/xpetra/test/MultiVector/MultiVector_UnitTestsThyraSpecific.cpp @@ -24,15 +24,8 @@ #include "Xpetra_ThyraUtils.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMultiVector.hpp" #include "Xpetra_TpetraVector.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraVector.hpp" -#endif #include "Thyra_DetachedMultiVectorView.hpp" #include "Thyra_DefaultProductVectorSpace.hpp" @@ -304,51 +297,22 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, CreateProductMV, M, MV, V, Scalar // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraMultiVector MV##S##LO##GO##N; \ typedef typename Xpetra::TpetraVector V##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraMultiVectorT MV##S##LO##GO##N; \ - typedef typename Xpetra::EpetraVectorT V##S##LO##GO##N; - -#endif - // list of all tests which run both with Epetra and Tpetra #define XP_THYRAMULTIVECTOR_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(Map, Create, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, Create, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, CreateProductMV, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) #include #include TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_THYRAMULTIVECTOR_INSTANT) -#endif - -#ifdef HAVE_XPETRA_EPETRA -typedef Xpetra::EpetraNode EpetraNode; - -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_THYRAMULTIVECTOR_INSTANT(double, int, int, EpetraNode) -#endif - -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -// Thyra has support for Epetra only but not for Epetra64 -// EEE(double,int,LongLong,Xpetra::EpetraNode) -// XP_THYRAMULTIVECTOR_INSTANT(double,int,LongLong,Xpetra::EpetraNode) -#endif -#endif // HAVE_TPETRA_SERIAL } // namespace diff --git a/packages/xpetra/test/MultiVector/MultiVector_UnitTestsXpetraSpecific.cpp b/packages/xpetra/test/MultiVector/MultiVector_UnitTestsXpetraSpecific.cpp index fa783ec7ce55..d30df9c2a250 100644 --- a/packages/xpetra/test/MultiVector/MultiVector_UnitTestsXpetraSpecific.cpp +++ b/packages/xpetra/test/MultiVector/MultiVector_UnitTestsXpetraSpecific.cpp @@ -21,15 +21,8 @@ #include "Xpetra_MultiVectorFactory.hpp" #include "Xpetra_MapExtractor.hpp" -#ifdef HAVE_XPETRA_TPETRA #include "Xpetra_TpetraMultiVector.hpp" #include "Xpetra_TpetraVector.hpp" -#endif - -#ifdef HAVE_XPETRA_EPETRA -#include "Xpetra_EpetraMultiVector.hpp" -#include "Xpetra_EpetraVector.hpp" -#endif namespace { @@ -160,31 +153,17 @@ TEUCHOS_UNIT_TEST_TEMPLATE_7_DECL(MultiVector, XpetraSpecific_GetHostLocalView, // // INSTANTIATIONS // -#ifdef HAVE_XPETRA_TPETRA #define XPETRA_TPETRA_TYPES(S, LO, GO, N) \ typedef typename Xpetra::TpetraMap M##LO##GO##N; \ typedef typename Xpetra::TpetraMultiVector MV##S##LO##GO##N; \ typedef typename Xpetra::TpetraVector V##S##LO##GO##N; -#endif - -#ifdef HAVE_XPETRA_EPETRA - -#define XPETRA_EPETRA_TYPES(S, LO, GO, N) \ - typedef typename Xpetra::EpetraMapT M##LO##GO##N; \ - typedef typename Xpetra::EpetraMultiVectorT MV##S##LO##GO##N; \ - typedef typename Xpetra::EpetraVectorT V##S##LO##GO##N; - -#endif - // List of tests which run only with Tpetra #define XP_MULTIVECTOR_INSTANT(S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, XpetraSpecific_GetHostLocalView, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) \ TEUCHOS_UNIT_TEST_TEMPLATE_7_INSTANT(MultiVector, XpetraSpecific_GetVector, M##LO##GO##N, MV##S##LO##GO##N, V##S##LO##GO##N, S, LO, GO, N) -#if defined(HAVE_XPETRA_TPETRA) - #include #include @@ -193,21 +172,4 @@ TPETRA_ETI_MANGLING_TYPEDEFS() TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XPETRA_TPETRA_TYPES) TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(XP_MULTIVECTOR_INSTANT) -#endif - -#if defined(HAVE_XPETRA_EPETRA) - -#include "Xpetra_Map.hpp" // defines EpetraNode -typedef Xpetra::EpetraNode EpetraNode; -#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES -XPETRA_EPETRA_TYPES(double, int, int, EpetraNode) -XP_MULTIVECTOR_INSTANT(double, int, int, EpetraNode) -#endif -#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES -typedef long long LongLong; -XPETRA_EPETRA_TYPES(double, int, LongLong, EpetraNode) -XP_MULTIVECTOR_INSTANT(double, int, LongLong, EpetraNode) -#endif -#endif - } // namespace