DOLFINx
0.1.0
DOLFINx C++ interface
|
9 #include <dolfinx/common/IndexMap.h>
22 Vector(
const std::shared_ptr<const common::IndexMap>&
map,
int bs)
26 const std::int32_t local_size
27 =
bs * (
map->size_local() +
map->num_ghosts());
28 _x.resize(local_size);
47 std::shared_ptr<const common::IndexMap>
map()
const {
return _map; }
50 constexpr
int bs()
const {
return _bs; }
53 const std::vector<T>&
array()
const {
return _x; }
60 std::shared_ptr<const common::IndexMap> _map;
const std::vector< T > & array() const
Get local part of the vector (const version)
Definition: Vector.h:53
Linear algebra interface.
Definition: sparsitybuild.h:14
Vector(const std::shared_ptr< const common::IndexMap > &map, int bs)
Create vector.
Definition: Vector.h:22
Distributed vector.
Definition: Vector.h:18
std::vector< T > & mutable_array()
Get local part of the vector.
Definition: Vector.h:56
constexpr int bs() const
Get block size.
Definition: Vector.h:50
~Vector()=default
Destructor.
std::shared_ptr< const common::IndexMap > map() const
Get IndexMap.
Definition: Vector.h:47