Bases: dolfin.cpp.la.GenericTensor
This class defines a common interface for vectors.
Replace all entries in the vector by their absolute values
Overloaded versions
add(block, num_rows, rows)
Add block of values using global indices
add(block, rows)
Add block of values using global indices
add(block, m, rows)
Add block of values using global indices
Overloaded versions
add_local(block, num_rows, rows)
Add block of values using local indices
add_local(block, rows)
Add block of values using local indices
add_local(block, m, rows)
Add block of values using local indices
add_local(values)
Add values to each entry on local process
Return a numpy array representation of the local part of a Vector
Add multiple of given vector (AXPY operation)
Return copy of vector
Overloaded versions
gather(x, indices)
Gather entries into local vector x
gather(x, indices)
Gather entries into x
Gather all entries into x on process 0
Overloaded versions
get_local(block, num_rows, rows)
Get block of values using local indices
get_local(block, m, rows)
Get block of values using local indices (values must all live on the local process, ghost are accessible)
get_local(values)
Get all values on local process
Overloaded versions
init(tensor_layout)
Initialize zero tensor using sparsity pattern
init(comm, N)
Initialize vector to global size N
init(comm, range)
Initialize vector with given local ownership range
init(comm, range, local_to_global_map, ghost_indices)
Initialise vector with given ownership range and with ghost values
Return inner product with given vector
Overloaded versions
local_range(dim)
Return local ownership range
local_range()
Return local ownership range of a vector
Return local size of vector
Return maximum value of vector
Return minimum value of vector
Return norm of vector
Determine whether global vector index is owned by this process
Overloaded versions
set_local(block, num_rows, rows)
Set block of values using local indices
set_local(block, m, rows)
Set block of values using local indices
set_local(values)
Set all values on local process
Overloaded versions
size(dim)
Return size of given dimension
size()
Return global size of vector
Overloaded versions
sum()
Return sum of vector
sum(rows)
Return sum of selected rows in vector. Repeated entries are only summed once.
The membership flag