dolfinx.cpp.la

Linear algebra module

Functions

inner_product(*args, **kwargs)

Overloaded function.

is_orthonormal(*args, **kwargs)

Overloaded function.

orthonormalize(*args, **kwargs)

Overloaded function.

Classes

BlockMode(self, value)

Members:

InsertMode(self, value)

Members:

MatrixCSR_complex128(self, p, block_mode)

MatrixCSR_complex64(self, p, block_mode)

MatrixCSR_float32(self, p, block_mode)

MatrixCSR_float64(self, p, block_mode)

Norm(self, value)

Members:

SparsityPattern(*args, **kwargs)

Overloaded function.

Vector_complex128(*args, **kwargs)

Overloaded function.

Vector_complex64(*args, **kwargs)

Overloaded function.

Vector_float32(*args, **kwargs)

Overloaded function.

Vector_float64(*args, **kwargs)

Overloaded function.

class dolfinx.cpp.la.BlockMode(self: dolfinx.cpp.la.BlockMode, value: int)

Bases: pybind11_object

Members:

compact

expanded

compact = <BlockMode.compact: 0>
expanded = <BlockMode.expanded: 1>
property name
property value
class dolfinx.cpp.la.InsertMode(self: dolfinx.cpp.la.InsertMode, value: int)

Bases: pybind11_object

Members:

add

insert

add = <InsertMode.add: 0>
insert = <InsertMode.insert: 1>
property name
property value
class dolfinx.cpp.la.MatrixCSR_complex128(self: dolfinx.cpp.la.MatrixCSR_complex128, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode)

Bases: pybind11_object

add(self: dolfinx.cpp.la.MatrixCSR_complex128, arg0: List[complex], arg1: List[int], arg2: List[int], arg3: int) None
property bs
property data
property dtype
index_map(self: dolfinx.cpp.la.MatrixCSR_complex128, arg0: int) dolfinx.cpp.common.IndexMap
property indices
property indptr
scatter_rev_begin(self: dolfinx.cpp.la.MatrixCSR_complex128) None
scatter_rev_end(self: dolfinx.cpp.la.MatrixCSR_complex128) None
scatter_reverse(self: dolfinx.cpp.la.MatrixCSR_complex128) None
set(self: dolfinx.cpp.la.MatrixCSR_complex128, arg0: List[complex], arg1: List[int], arg2: List[int], arg3: int) None
set_value(self: dolfinx.cpp.la.MatrixCSR_complex128, x: complex) None
squared_norm(self: dolfinx.cpp.la.MatrixCSR_complex128) float
to_dense(self: dolfinx.cpp.la.MatrixCSR_complex128) numpy.ndarray[numpy.complex128]
class dolfinx.cpp.la.MatrixCSR_complex64(self: dolfinx.cpp.la.MatrixCSR_complex64, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode)

Bases: pybind11_object

add(self: dolfinx.cpp.la.MatrixCSR_complex64, arg0: List[complex], arg1: List[int], arg2: List[int], arg3: int) None
property bs
property data
property dtype
index_map(self: dolfinx.cpp.la.MatrixCSR_complex64, arg0: int) dolfinx.cpp.common.IndexMap
property indices
property indptr
scatter_rev_begin(self: dolfinx.cpp.la.MatrixCSR_complex64) None
scatter_rev_end(self: dolfinx.cpp.la.MatrixCSR_complex64) None
scatter_reverse(self: dolfinx.cpp.la.MatrixCSR_complex64) None
set(self: dolfinx.cpp.la.MatrixCSR_complex64, arg0: List[complex], arg1: List[int], arg2: List[int], arg3: int) None
set_value(self: dolfinx.cpp.la.MatrixCSR_complex64, x: complex) None
squared_norm(self: dolfinx.cpp.la.MatrixCSR_complex64) float
to_dense(self: dolfinx.cpp.la.MatrixCSR_complex64) numpy.ndarray[numpy.complex64]
class dolfinx.cpp.la.MatrixCSR_float32(self: dolfinx.cpp.la.MatrixCSR_float32, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode)

Bases: pybind11_object

add(self: dolfinx.cpp.la.MatrixCSR_float32, arg0: List[float], arg1: List[int], arg2: List[int], arg3: int) None
property bs
property data
property dtype
index_map(self: dolfinx.cpp.la.MatrixCSR_float32, arg0: int) dolfinx.cpp.common.IndexMap
property indices
property indptr
scatter_rev_begin(self: dolfinx.cpp.la.MatrixCSR_float32) None
scatter_rev_end(self: dolfinx.cpp.la.MatrixCSR_float32) None
scatter_reverse(self: dolfinx.cpp.la.MatrixCSR_float32) None
set(self: dolfinx.cpp.la.MatrixCSR_float32, arg0: List[float], arg1: List[int], arg2: List[int], arg3: int) None
set_value(self: dolfinx.cpp.la.MatrixCSR_float32, x: float) None
squared_norm(self: dolfinx.cpp.la.MatrixCSR_float32) float
to_dense(self: dolfinx.cpp.la.MatrixCSR_float32) numpy.ndarray[numpy.float32]
class dolfinx.cpp.la.MatrixCSR_float64(self: dolfinx.cpp.la.MatrixCSR_float64, p: dolfinx.cpp.la.SparsityPattern, block_mode: dolfinx.cpp.la.BlockMode)

Bases: pybind11_object

add(self: dolfinx.cpp.la.MatrixCSR_float64, arg0: List[float], arg1: List[int], arg2: List[int], arg3: int) None
property bs
property data
property dtype
index_map(self: dolfinx.cpp.la.MatrixCSR_float64, arg0: int) dolfinx.cpp.common.IndexMap
property indices
property indptr
scatter_rev_begin(self: dolfinx.cpp.la.MatrixCSR_float64) None
scatter_rev_end(self: dolfinx.cpp.la.MatrixCSR_float64) None
scatter_reverse(self: dolfinx.cpp.la.MatrixCSR_float64) None
set(self: dolfinx.cpp.la.MatrixCSR_float64, arg0: List[float], arg1: List[int], arg2: List[int], arg3: int) None
set_value(self: dolfinx.cpp.la.MatrixCSR_float64, x: float) None
squared_norm(self: dolfinx.cpp.la.MatrixCSR_float64) float
to_dense(self: dolfinx.cpp.la.MatrixCSR_float64) numpy.ndarray[numpy.float64]
class dolfinx.cpp.la.Norm(self: dolfinx.cpp.la.Norm, value: int)

Bases: pybind11_object

Members:

l1

l2

linf

frobenius

frobenius = <Norm.frobenius: 3>
l1 = <Norm.l1: 0>
l2 = <Norm.l2: 1>
linf = <Norm.linf: 2>
property name
property value
class dolfinx.cpp.la.SparsityPattern(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: dolfinx.cpp.la.SparsityPattern, comm: MPICommWrapper, maps: Annotated[List[dolfinx.cpp.common.IndexMap], FixedSize(2)], bs: Annotated[List[int], FixedSize(2)]) -> None

  2. __init__(self: dolfinx.cpp.la.SparsityPattern, comm: MPICommWrapper, patterns: List[List[dolfinx.cpp.la.SparsityPattern]], maps: Annotated[List[List[Tuple[dolfinx.cpp.common.IndexMap, int]]], FixedSize(2)], bs: Annotated[List[List[int]], FixedSize(2)]) -> None

column_index_map(self: dolfinx.cpp.la.SparsityPattern) dolfinx.cpp.common.IndexMap
finalize(self: dolfinx.cpp.la.SparsityPattern) None
property graph
index_map(self: dolfinx.cpp.la.SparsityPattern, dim: int) dolfinx.cpp.common.IndexMap
insert(self: dolfinx.cpp.la.SparsityPattern, rows: numpy.ndarray[numpy.int32], cols: numpy.ndarray[numpy.int32]) None
insert_diagonal(self: dolfinx.cpp.la.SparsityPattern, rows: numpy.ndarray[numpy.int32]) None
property num_nonzeros
class dolfinx.cpp.la.Vector_complex128(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: dolfinx.cpp.la.Vector_complex128, map: dolfinx.cpp.common.IndexMap, bs: int) -> None

  2. __init__(self: dolfinx.cpp.la.Vector_complex128, vec: dolfinx.cpp.la.Vector_complex128) -> None

property array
property bs
property dtype
property index_map
norm(self: dolfinx.cpp.la.Vector_complex128, type: dolfinx.cpp.la.Norm = <Norm.l2: 1>) float
scatter_forward(self: dolfinx.cpp.la.Vector_complex128) None
scatter_reverse(self: dolfinx.cpp.la.Vector_complex128, mode: dolfinx.cpp.la.InsertMode) None
class dolfinx.cpp.la.Vector_complex64(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: dolfinx.cpp.la.Vector_complex64, map: dolfinx.cpp.common.IndexMap, bs: int) -> None

  2. __init__(self: dolfinx.cpp.la.Vector_complex64, vec: dolfinx.cpp.la.Vector_complex64) -> None

property array
property bs
property dtype
property index_map
norm(self: dolfinx.cpp.la.Vector_complex64, type: dolfinx.cpp.la.Norm = <Norm.l2: 1>) float
scatter_forward(self: dolfinx.cpp.la.Vector_complex64) None
scatter_reverse(self: dolfinx.cpp.la.Vector_complex64, mode: dolfinx.cpp.la.InsertMode) None
class dolfinx.cpp.la.Vector_float32(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: dolfinx.cpp.la.Vector_float32, map: dolfinx.cpp.common.IndexMap, bs: int) -> None

  2. __init__(self: dolfinx.cpp.la.Vector_float32, vec: dolfinx.cpp.la.Vector_float32) -> None

property array
property bs
property dtype
property index_map
norm(self: dolfinx.cpp.la.Vector_float32, type: dolfinx.cpp.la.Norm = <Norm.l2: 1>) float
scatter_forward(self: dolfinx.cpp.la.Vector_float32) None
scatter_reverse(self: dolfinx.cpp.la.Vector_float32, mode: dolfinx.cpp.la.InsertMode) None
class dolfinx.cpp.la.Vector_float64(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: dolfinx.cpp.la.Vector_float64, map: dolfinx.cpp.common.IndexMap, bs: int) -> None

  2. __init__(self: dolfinx.cpp.la.Vector_float64, vec: dolfinx.cpp.la.Vector_float64) -> None

property array
property bs
property dtype
property index_map
norm(self: dolfinx.cpp.la.Vector_float64, type: dolfinx.cpp.la.Norm = <Norm.l2: 1>) float
scatter_forward(self: dolfinx.cpp.la.Vector_float64) None
scatter_reverse(self: dolfinx.cpp.la.Vector_float64, mode: dolfinx.cpp.la.InsertMode) None
dolfinx.cpp.la.inner_product(*args, **kwargs)

Overloaded function.

  1. inner_product(x: dolfinx.cpp.la.Vector_float32, y: dolfinx.cpp.la.Vector_float32) -> float

  2. inner_product(x: dolfinx.cpp.la.Vector_float64, y: dolfinx.cpp.la.Vector_float64) -> float

  3. inner_product(x: dolfinx.cpp.la.Vector_complex64, y: dolfinx.cpp.la.Vector_complex64) -> complex

  4. inner_product(x: dolfinx.cpp.la.Vector_complex128, y: dolfinx.cpp.la.Vector_complex128) -> complex

dolfinx.cpp.la.is_orthonormal(*args, **kwargs)

Overloaded function.

  1. is_orthonormal(basis: List[dolfinx.cpp.la.Vector_float32]) -> bool

  2. is_orthonormal(basis: List[dolfinx.cpp.la.Vector_float64]) -> bool

  3. is_orthonormal(basis: List[dolfinx.cpp.la.Vector_complex64]) -> bool

  4. is_orthonormal(basis: List[dolfinx.cpp.la.Vector_complex128]) -> bool

dolfinx.cpp.la.orthonormalize(*args, **kwargs)

Overloaded function.

  1. orthonormalize(basis: List[dolfinx.cpp.la.Vector_float32]) -> None

  2. orthonormalize(basis: List[dolfinx.cpp.la.Vector_float64]) -> None

  3. orthonormalize(basis: List[dolfinx.cpp.la.Vector_complex64]) -> None

  4. orthonormalize(basis: List[dolfinx.cpp.la.Vector_complex128]) -> None