/*! * \brief Sum a value into existing value at the local row index. The * local index must exist on process. */ static void sumIntoLocalValue( vector_type& vector, local_ordinal_type local_row, const scalar_type& value ) { MCLS_REQUIRE( vector.getMap()->isNodeLocalElement( local_row ) ); vector.sumIntoLocalValue( local_row, value ); }
/*! * \brief Sum a value into existing value at the global row index. The * global index must exist on process. */ static void sumIntoGlobalValue( vector_type& vector, global_ordinal_type global_row, const scalar_type& value ) { MCLS_REQUIRE( vector.getMap()->isNodeGlobalElement( global_row ) ); vector.sumIntoGlobalValue( global_row, value ); }
/*! * \brief Get the communicator. */ static Teuchos::RCP<const Teuchos::Comm<int> > getComm( const vector_type& vector ) { return vector.getMap()->getComm(); }
/*! * \brief Create a reference-counted pointer to a new empty vector with * the same parallel distribution as the given vector. */ static Teuchos::RCP<vector_type> clone( const vector_type& vector ) { return Tpetra::createVector<Scalar,LO,GO>( vector.getMap() ); }
/*! * \brief Given a global row on-process, provide the local ordinal. */ static local_ordinal_type getLocalRow( const vector_type& vector, const global_ordinal_type& global_row ) { return vector.getMap()->getLocalElement( global_row ); }
/*! * \brief Given a local row on-process, provide the global ordinal. */ static global_ordinal_type getGlobalRow( const vector_type& vector, const local_ordinal_type& local_row ) { return vector.getMap()->getGlobalElement( local_row ); }
/*! * \brief Determine whether or not a given local row is on-process. */ static bool isLocalRow( const vector_type& vector, const local_ordinal_type& local_row ) { return vector.getMap()->isNodeLocalElement( local_row ); }
/*! * \brief Determine whether or not a given global row is on-process. */ static bool isGlobalRow( const vector_type& vector, const global_ordinal_type& global_row ) { return vector.getMap()->isNodeGlobalElement( global_row ); }