dolfinx.cpp.la#

Linear algebra module

Classes

BlockMode(*values)

InsertMode(*values)

MatrixCSR_complex128(self, p[, block_mode])

MatrixCSR_complex64(self, p[, block_mode])

MatrixCSR_float32(self, p[, block_mode])

MatrixCSR_float64(self, p[, block_mode])

MatrixCSR_int32(self, p[, block_mode])

MatrixCSR_int64(self, p[, block_mode])

MatrixCSR_int8(self, p[, block_mode])

Norm(*values)

SparsityPattern()

SuperLUDistMatrix_complex128(self, A)

SuperLUDistMatrix_float32(self, A)

SuperLUDistMatrix_float64(self, A)

SuperLUDistSolver_complex128(self, A)

SuperLUDistSolver_float32(self, A)

SuperLUDistSolver_float64(self, A)

Vector_complex128()

Vector_complex64()

Vector_float32()

Vector_float64()

Vector_int32()

Vector_int64()

Vector_int8()

class dolfinx.cpp.la.BlockMode(*values)#

Bases: Enum

compact = 0#
expanded = 1#
class dolfinx.cpp.la.InsertMode(*values)#

Bases: Enum

add = 0#
insert = 1#
class dolfinx.cpp.la.MatrixCSR_complex128(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=complex128, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=complex128]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_complex128, arg1: dolfinx.cpp.la.Vector_complex128, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_complex128, /) dolfinx.cpp.la.MatrixCSR_complex128
multT(self, arg0: dolfinx.cpp.la.Vector_complex128, arg1: dolfinx.cpp.la.Vector_complex128, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=complex128, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=complex128]#
transpose(self) dolfinx.cpp.la.MatrixCSR_complex128#
class dolfinx.cpp.la.MatrixCSR_complex64(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=complex64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=complex64]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_complex64, arg1: dolfinx.cpp.la.Vector_complex64, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_complex64, /) dolfinx.cpp.la.MatrixCSR_complex64
multT(self, arg0: dolfinx.cpp.la.Vector_complex64, arg1: dolfinx.cpp.la.Vector_complex64, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=complex64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=complex64]#
transpose(self) dolfinx.cpp.la.MatrixCSR_complex64#
class dolfinx.cpp.la.MatrixCSR_float32(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=float32, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=float32]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_float32, arg1: dolfinx.cpp.la.Vector_float32, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_float32, /) dolfinx.cpp.la.MatrixCSR_float32
multT(self, arg0: dolfinx.cpp.la.Vector_float32, arg1: dolfinx.cpp.la.Vector_float32, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=float32, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=float32]#
transpose(self) dolfinx.cpp.la.MatrixCSR_float32#
class dolfinx.cpp.la.MatrixCSR_float64(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=float64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=float64]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_float64, arg1: dolfinx.cpp.la.Vector_float64, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_float64, /) dolfinx.cpp.la.MatrixCSR_float64
multT(self, arg0: dolfinx.cpp.la.Vector_float64, arg1: dolfinx.cpp.la.Vector_float64, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=float64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=float64]#
transpose(self) dolfinx.cpp.la.MatrixCSR_float64#
class dolfinx.cpp.la.MatrixCSR_int32(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=int32]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_int32, arg1: dolfinx.cpp.la.Vector_int32, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_int32, /) dolfinx.cpp.la.MatrixCSR_int32
multT(self, arg0: dolfinx.cpp.la.Vector_int32, arg1: dolfinx.cpp.la.Vector_int32, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=int32]#
transpose(self) dolfinx.cpp.la.MatrixCSR_int32#
class dolfinx.cpp.la.MatrixCSR_int64(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=int64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=int64]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_int64, arg1: dolfinx.cpp.la.Vector_int64, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_int64, /) dolfinx.cpp.la.MatrixCSR_int64
multT(self, arg0: dolfinx.cpp.la.Vector_int64, arg1: dolfinx.cpp.la.Vector_int64, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=int64, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=int64]#
transpose(self) dolfinx.cpp.la.MatrixCSR_int64#
class dolfinx.cpp.la.MatrixCSR_int8(self, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode = BlockMode.compact)#

Bases: object

add(self, arg0: ndarray[dtype=int8, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
property bs#

(self) -> list[int]

property data#

(self) -> numpy.ndarray[dtype=int8]

property dtype#

(self) -> str

index_map(self, arg: int, /) dolfinx.cpp.common.IndexMap#
property indices#

(self) -> numpy.ndarray[dtype=int32, writable=False]

property indptr#

(self) -> numpy.ndarray[dtype=int64, writable=False]

mult(self, arg0: dolfinx.cpp.la.Vector_int8, arg1: dolfinx.cpp.la.Vector_int8, /) None#
mult(self, arg: dolfinx.cpp.la.MatrixCSR_int8, /) dolfinx.cpp.la.MatrixCSR_int8
multT(self, arg0: dolfinx.cpp.la.Vector_int8, arg1: dolfinx.cpp.la.Vector_int8, /) None#
scatter_rev_begin(self) None#
scatter_rev_end(self) None#
scatter_reverse(self) None#
set(self, arg0: ndarray[dtype=int8, shape=(*), order='C', writable=False], arg1: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg2: ndarray[dtype=int32, shape=(*), order='C', writable=False], arg3: int, /) None#
squared_norm(self) float#
to_dense(self) numpy.ndarray[dtype=int8]#
transpose(self) dolfinx.cpp.la.MatrixCSR_int8#
class dolfinx.cpp.la.Norm(*values)#

Bases: Enum

frobenius = 3#
l1 = 0#
l2 = 1#
linf = 2#
class dolfinx.cpp.la.SparsityPattern(self, comm: MPICommWrapper, maps: collections.abc.Sequence[dolfinx.cpp.common.IndexMap], bs: collections.abc.Sequence[int])#
class dolfinx.cpp.la.SparsityPattern(self, comm: MPICommWrapper, patterns: collections.abc.Sequence[collections.abc.Sequence[dolfinx.cpp.la.SparsityPattern]], maps: collections.abc.Sequence[collections.abc.Sequence[tuple[std::reference_wrapper<dolfinx::common::IndexMap const>, int]]], bs: collections.abc.Sequence[collections.abc.Sequence[int]])

Bases: object

finalize(self) None#
property graph#

(self) -> tuple[numpy.ndarray[dtype=int32, writable=False], numpy.ndarray[dtype=int64, writable=False]]

index_map(self, dim: int) dolfinx.cpp.common.IndexMap#
insert(self, rows: ndarray[dtype=int32, shape=(*), order='C', writable=False], cols: ndarray[dtype=int32, shape=(*), order='C', writable=False]) None#
insert(self, row: int, col: int) None
insert_diagonal(self, rows: ndarray[dtype=int32, shape=(*), order='C', writable=False]) None#
property num_nonzeros#

(self) -> int

class dolfinx.cpp.la.SuperLUDistMatrix_complex128(self, A: dolfinx.cpp.la.MatrixCSR_complex128)#

Bases: object

property dtype#

(self) -> str

class dolfinx.cpp.la.SuperLUDistMatrix_float32(self, A: dolfinx.cpp.la.MatrixCSR_float32)#

Bases: object

property dtype#

(self) -> str

class dolfinx.cpp.la.SuperLUDistMatrix_float64(self, A: dolfinx.cpp.la.MatrixCSR_float64)#

Bases: object

property dtype#

(self) -> str

class dolfinx.cpp.la.SuperLUDistSolver_complex128(self, A: dolfinx.cpp.la.SuperLUDistMatrix_complex128)#

Bases: object

set_A(self, arg: dolfinx.cpp.la.SuperLUDistMatrix_complex128, /) None#
set_option(self, arg0: str, arg1: str, /) None#
solve(self, arg0: dolfinx.cpp.la.Vector_complex128, arg1: dolfinx.cpp.la.Vector_complex128, /) int#
class dolfinx.cpp.la.SuperLUDistSolver_float32(self, A: dolfinx.cpp.la.SuperLUDistMatrix_float32)#

Bases: object

set_A(self, arg: dolfinx.cpp.la.SuperLUDistMatrix_float32, /) None#
set_option(self, arg0: str, arg1: str, /) None#
solve(self, arg0: dolfinx.cpp.la.Vector_float32, arg1: dolfinx.cpp.la.Vector_float32, /) int#
class dolfinx.cpp.la.SuperLUDistSolver_float64(self, A: dolfinx.cpp.la.SuperLUDistMatrix_float64)#

Bases: object

set_A(self, arg: dolfinx.cpp.la.SuperLUDistMatrix_float64, /) None#
set_option(self, arg0: str, arg1: str, /) None#
solve(self, arg0: dolfinx.cpp.la.Vector_float64, arg1: dolfinx.cpp.la.Vector_float64, /) int#
class dolfinx.cpp.la.Vector_complex128(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_complex128(self, vec: dolfinx.cpp.la.Vector_complex128)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=complex128]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_complex64(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_complex64(self, vec: dolfinx.cpp.la.Vector_complex64)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=complex64]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_float32(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_float32(self, vec: dolfinx.cpp.la.Vector_float32)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=float32]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_float64(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_float64(self, vec: dolfinx.cpp.la.Vector_float64)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=float64]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_int32(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_int32(self, vec: dolfinx.cpp.la.Vector_int32)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=int32]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_int64(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_int64(self, vec: dolfinx.cpp.la.Vector_int64)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=int64]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#
class dolfinx.cpp.la.Vector_int8(self, map: dolfinx.cpp.common.IndexMap, bs: int)#
class dolfinx.cpp.la.Vector_int8(self, vec: dolfinx.cpp.la.Vector_int8)

Bases: object

property array#

(self) -> numpy.ndarray[dtype=int8]

property bs#

(self) -> int

property dtype#

(self) -> str

property index_map#

(self) -> dolfinx.cpp.common.IndexMap

scatter_forward(self) None#
scatter_reverse(self, mode: dolfinx.cpp.la.InsertMode) None#