本文整理汇总了C++中MapVector::totalMap方法的典型用法代码示例。如果您正苦于以下问题:C++ MapVector::totalMap方法的具体用法?C++ MapVector::totalMap怎么用?C++ MapVector::totalMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapVector
的用法示例。
在下文中一共展示了MapVector::totalMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: myMap
MatrixBlockMonolithicEpetra<DataType>::MatrixBlockMonolithicEpetra ( const MapVector<MapEpetra>& vector, int numEntries)
:
MatrixEpetra<DataType> (vector.totalMap() )
//MatrixEpetra<DataType>( typename MatrixEpetra<DataType>::matrix_ptrtype())
{
ASSERT ( vector.nbMap() > 0 , "Map vector empty, impossible to construct a MatrixBlockMonolithicEpetra!");
MapEpetra myMap (vector.map (0) );
M_blockNumRows.push_back (vector.mapSize (0) );
M_blockNumColumns.push_back (vector.mapSize (0) );
M_blockFirstRows.push_back (0);
M_blockFirstColumns.push_back (0);
UInt totalRows (vector.mapSize (0) );
UInt totalColumns (vector.mapSize (0) );
for (UInt i (1); i < vector.nbMap(); ++i)
{
myMap += vector.map (i);
M_blockNumRows.push_back (vector.mapSize (i) );
M_blockNumColumns.push_back (vector.mapSize (i) );
M_blockFirstRows.push_back (totalRows);
M_blockFirstColumns.push_back (totalColumns);
totalRows += vector.mapSize (i);
totalColumns += vector.mapSize (i);
}
this->mapPtr().reset (new MapEpetra (myMap) );
this->matrixPtr().reset ( new typename MatrixEpetra<DataType>::matrix_type ( Copy, *myMap.map ( Unique ), numEntries, false) );
}
示例2: myMap
MatrixEpetraStructured<DataType>::MatrixEpetraStructured ( const MapVector<MapEpetra>& vector, int numEntries, bool ignoreNonLocalValues ) :
MatrixEpetra<DataType> ( typename MatrixEpetra<DataType>::matrix_ptrtype() ), M_blockStructure ( vector )
{
ASSERT ( vector.nbMap() > 0 , "Map vector empty, impossible to construct a MatrixBlockMonolithicEpetra!" );
MapEpetra myMap ( vector.totalMap() );
this->mapPtr().reset ( new MapEpetra ( myMap ) );
this->matrixPtr().reset ( new typename MatrixEpetra<DataType>::matrix_type ( Copy, *myMap.map ( Unique ), numEntries, ignoreNonLocalValues ) );
}