本文整理汇总了C++中vector_type::getMap方法的典型用法代码示例。如果您正苦于以下问题:C++ vector_type::getMap方法的具体用法?C++ vector_type::getMap怎么用?C++ vector_type::getMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vector_type
的用法示例。
在下文中一共展示了vector_type::getMap方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sumIntoLocalValue
/*!
* \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 );
}
示例2: sumIntoGlobalValue
/*!
* \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 );
}
示例3: getComm
/*!
* \brief Get the communicator.
*/
static Teuchos::RCP<const Teuchos::Comm<int> >
getComm( const vector_type& vector )
{
return vector.getMap()->getComm();
}
示例4: clone
/*!
* \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() );
}
示例5: getLocalRow
/*!
* \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 );
}
示例6: getGlobalRow
/*!
* \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 );
}
示例7: isLocalRow
/*!
* \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 );
}
示例8: isGlobalRow
/*!
* \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 );
}