16 #if !defined(KRATOS_PARTITIONED_VECTOR_H_INCLUDED )
17 #define KRATOS_PARTITIONED_VECTOR_H_INCLUDED
58 template<
class TVectorType>
85 template<
class TSizesVectorType>
87 : mVectors(PartitionSizes.
size()), mPartitionsIndices(PartitionSizes.
size())
122 mVectors=
v.mVectors;
123 mPartitionsIndices=
v.mPartitionsIndices;
133 template<
class TSizesVectorType>
134 void resize(TSizesVectorType
const& PartitionSizes)
136 mVectors.resize(PartitionSizes.size());
137 mPartitionsIndices.resize(PartitionSizes.size() + 1);
139 mPartitionsIndices[0] = 0;
143 mVectors[
i].resize(PartitionSizes[
i]);
144 mPartitionsIndices[
i+1] = PartitionSizes[
i] + mPartitionsIndices[
i];
153 mVectors.swap (
v.mVectors);
154 mPartitionsIndices.swap (
v.mPartitionsIndices);
168 return mPartitionsIndices.back();
194 return mPartitionsIndices[
i];
double value_type
Definition: array_1d.h:75
Short class definition.
Definition: partitioned_vector.h:60
void swap(partitioned_vector &v)
Definition: partitioned_vector.h:149
std::vector< size_type > PartitionsIndicesVectorType
Definition: partitioned_vector.h:74
size_type size() const
Definition: partitioned_vector.h:166
KRATOS_CLASS_POINTER_DEFINITION(partitioned_vector)
Pointer definition of partitioned_vector.
TVectorType VectorType
Definition: partitioned_vector.h:69
const_reference operator[](size_type i) const
Definition: partitioned_vector.h:109
partitioned_vector & operator=(const partitioned_vector &v)
Definition: partitioned_vector.h:120
const VectorsContainerType & data() const
Definition: partitioned_vector.h:171
std::vector< VectorType > VectorsContainerType
Definition: partitioned_vector.h:73
const VectorType & partition(size_type i) const
Definition: partitioned_vector.h:182
partitioned_vector()
Default constructor.
Definition: partitioned_vector.h:81
VectorsContainerType & data()
Definition: partitioned_vector.h:176
const VectorType & partition_index(size_type i) const
Definition: partitioned_vector.h:192
VectorType::value_type value_type
Definition: partitioned_vector.h:70
std::size_t size_type
Definition: partitioned_vector.h:68
value_type & reference
Definition: partitioned_vector.h:71
value_type const & const_reference
Definition: partitioned_vector.h:72
VectorType & partition(size_type i)
Definition: partitioned_vector.h:187
void resize(TSizesVectorType const &PartitionSizes)
Definition: partitioned_vector.h:134
partitioned_vector(TSizesVectorType const &PartitionSizes)
Definition: partitioned_vector.h:86
const_reference operator()(size_type i) const
Definition: partitioned_vector.h:99
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
v
Definition: generate_convection_diffusion_explicit_element.py:114
integer i
Definition: TensorModule.f:17