57 ASSERT ( mapVector.nbMap() > 0 ,
"Map vector empty, impossible to construct a VectorBlockMonolithicEpetra!");
61 M_blockSize[0] = mapVector.mapSize (0);
62 M_blockFirstIndex[0] = 0;
64 UInt totalSize (M_blockSize[0]);
66 for (UInt i (1); i < mapVector.nbMap(); ++i)
68 myMap += mapVector.map (i);
69 M_blockSize[i] = mapVector.mapSize (i);
70 M_blockFirstIndex[i] = totalSize;
72 totalSize += M_blockSize[i];
108 M_blockSize = blockSizes;
110 M_blockFirstIndex.resize (M_blockSize.size() );
112 UInt currentSize (0);
113 for (UInt i (0); i < M_blockSize.size(); ++i)
115 M_blockFirstIndex[i] = currentSize;
116 currentSize += M_blockSize[i];
124 ASSERT ( mapVector.nbMap() > 0 ,
"Map vector empty, impossible to set the block structure");
126 M_blockSize.resize (mapVector.nbMap() );
127 M_blockFirstIndex.resize (mapVector.nbMap() );
131 for (UInt i (0); i < mapVector.nbMap(); ++i)
133 M_blockSize[i] = mapVector.mapSize (i);
134 M_blockFirstIndex[i] = totalSize;
136 totalSize += M_blockSize[i];
139 ASSERT (
static_cast<Int>(totalSize) ==
this->size(),
" Incompatible block structure (global size does not match) ");
150 ASSERT ( index < M_blockFirstIndex.size(),
"Invalid block index");
151 ASSERT ( index < M_blockSize.size(),
"Invalid block index");
153 blockView.setup ( M_blockFirstIndex[index], M_blockSize[index],
this);
160 ASSERT ( index < M_blockFirstIndex.size(),
"Invalid block index");
161 ASSERT ( index < M_blockSize.size(),
"Invalid block index");
165 mbv->setup ( M_blockFirstIndex[index], M_blockSize[index],
this);
VectorEpetra - The Epetra Vector format Wrapper.
VectorBlockMonolithicEpetra - class of block vector.
VectorBlockMonolithicEpetra(const mapVector_type &mapVector, const mapType_type &mapType=Unique)
Construction with a vector of map.
VectorBlockMonolithicEpetra(const VectorBlockMonolithicEpetra &vector, const mapType_type &mapType)
Copy constructor with a specified map type (Repeated/Unique)
std::shared_ptr< block_type > block_ptrType
Pointer on the view.
MapEpetraType mapType_type
Type of the map (Unique/Repeated)
void setBlockStructure(const mapVector_type &mapVector)
Reset the block structure using the blocks of a vector of map.
VectorEpetra(const MapEpetra &map, const MapEpetraType &mapType=Unique, const combineMode_Type combineMode=Add)
Constructor - Using Maps.
void updateInverseJacobian(const UInt &iQuadPt)
VectorBlockMonolithicEpetra(const map_Type &map, const mapType_type &mapType=Unique)
Constructor with the monolithic map.
VectorBlockMonolithicEpetra(const VectorBlockMonolithicEpetra &vector, const mapType_type &mapType, const combine_type &combineMode)
Copy constructor with specified map type and combine mode.
void setBlockStructure(const std::vector< UInt > &blockSizes)
VectorBlockMonolithicEpetraView block_type
Type of the view.
VectorEpetra(const MapEpetraType &mapType=Unique, const combineMode_Type combineMode=Add)
Empty Constructor.
Epetra_CombineMode combine_type
Combine mode.
VectorBlockMonolithicEpetra(const VectorBlockMonolithicEpetra &vector)
Copy constructor.
block_ptrType block(const UInt &index)
Getter for the block index.
void blockView(const UInt &index, block_type &blockView)
Getter for the block index.
MapVector< map_Type > mapVector_type
Type of the MapVector to be used with this class.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
MapEpetra map_Type
Type of the map to be used.