Vector¶
-
class
dolfin.cpp.la.
Vector
(*args)¶ Bases:
dolfin.cpp.la.GenericVector
This class provides the default DOLFIN vector class, based on the default DOLFIN linear algebra backend.
Create a
Vector
from aGenericVector
.Parameters: GenericVector & x (const) – -
add_local
()¶ Add block of values using local indices.
Parameters: - double * block (const) –
- m (std::size_t) –
- dolfin::la_index * rows (const) –
Return type: void
-
gather
()¶ Gather entries (given by global indices) into local vector x
Parameters: - & x (GenericVector) –
- std::vector< dolfin::la_index > & indices (const) –
Return type: void
-
get_local
()¶ Get block of values using local indices (values must all live on the local process)
Parameters: - * block (double) –
- m (std::size_t) –
- dolfin::la_index * rows (const) –
Return type: void
-
init
()¶ Initialize vector with given ownership range and with ghost values
Parameters: - std::size_t, std::size_t > range (std::pair<) –
- std::vector< std::size_t > & local_to_global_map (const) –
- std::vector< la_index > & ghost_indices (const) –
Return type: void
-
set_local
()¶ Set
block of values using local indices.Parameters: - double * block (const) –
- m (std::size_t) –
- dolfin::la_index * rows (const) –
Return type: void
Return concrete shared ptr instance / unwrap (const version)
Return type: std::shared_ptr< const LinearAlgebraObject >
-
sum
()¶ Return sum of values of vector.
Return type: double
-
thisown
¶ The membership flag
-