35 #include <lifev/core/array/VectorBlockStructure.hpp> 63 ASSERT ( mapVector.nbMap() > 0 ,
"Map vector empty, impossible to construct a VectorBlockMonolithicEpetra!" );
65 M_blockSize[0] = mapVector.mapSize ( 0 );
66 M_blockFirstIndex[0] = 0;
68 M_totalSize = M_blockSize[0];
70 for ( UInt i ( 1 ); i < mapVector.nbMap(); ++i )
72 M_blockSize[i] = mapVector.mapSize ( i );
73 M_blockFirstIndex[i] = M_totalSize;
75 M_totalSize += M_blockSize[i];
97 M_blockSize = blockSizes;
99 M_blockFirstIndex.resize ( M_blockSize.size() );
103 for ( UInt i ( 0 ); i < M_blockSize.size(); ++i )
105 M_blockFirstIndex[i] = M_totalSize;
106 M_totalSize += M_blockSize[i];
114 ASSERT ( mapVector.nbMap() > 0 ,
"Map vector empty, impossible to set the block structure" );
116 M_blockSize.resize ( mapVector.nbMap() );
117 M_blockFirstIndex.resize ( mapVector.nbMap() );
121 for ( UInt i ( 0 ); i < mapVector.nbMap(); ++i )
123 M_blockSize[i] = mapVector.mapSize ( i );
124 M_blockFirstIndex[i] = M_totalSize;
125 M_totalSize += M_blockSize[i];
134 M_blockSize.resize ( size );
135 M_blockFirstIndex.resize ( size );
139 for (
UInt i ( 0 ); i < size; ++i )
141 M_blockSize[i] = blockStructure.M_blockSize[i];
142 M_blockFirstIndex[i] = blockStructure.M_blockFirstIndex[i];
VectorBlockStructure(const mapVector_Type &mapVector)
Construction with a map.
VectorBlockStructure(const map_Type &map)
Constructor with the monolithic map.
VectorBlockStructure - class representing the structure of a vector.
MapEpetra map_Type
Type of the map to be used.
void updateInverseJacobian(const UInt &iQuadPt)
void setBlockStructure(const VectorBlockStructure &blockStructure)
void setBlockStructure(const std::vector< UInt > &blockSizes)
VectorBlockStructure(const VectorBlockStructure &blockStructure)
Copy constructor.
MapVector< map_Type > mapVector_Type
Type of the MapVector to be used with this class.
void setBlockStructure(const mapVector_Type &mapVector)
Reset the block structure using the blocks of a vector of map.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
VectorBlockStructure()
Default constructor.