dolfinx.cpp.fem

FEM module

Functions

apply_lifting(*args, **kwargs)

Overloaded function.

assemble_matrix(*args, **kwargs)

Overloaded function.

assemble_scalar(*args, **kwargs)

Overloaded function.

assemble_vector(*args, **kwargs)

Overloaded function.

build_dofmap(comm, topology, layout)

Build and dofmap on a mesh.

create_dofmap(comm, dofmap, topology, element)

Create DofMap object from a pointer to ufcx_dofmap.

create_element_dof_layout(dofmap, cell_type, ...)

Create ElementDofLayout object from a ufc dofmap.

create_expression_complex128(expression, ...)

Create Form from a pointer to ufc_form.

create_expression_complex64(expression, ...)

Create Form from a pointer to ufc_form.

create_expression_float32(expression, ...)

Create Form from a pointer to ufc_form.

create_expression_float64(expression, ...)

Create Form from a pointer to ufc_form.

create_form_complex128(form, spaces, ...)

Create Form from a pointer to ufcx_form.

create_form_complex64(form, spaces, ...)

Create Form from a pointer to ufcx_form.

create_form_float32(form, spaces, ...)

Create Form from a pointer to ufcx_form.

create_form_float64(form, spaces, ...)

Create Form from a pointer to ufcx_form.

create_sparsity_pattern(topology, dofmaps, types)

Create a sparsity pattern.

insert_diagonal(*args, **kwargs)

Overloaded function.

interpolation_coords(element, V, cells)

locate_dofs_geometrical(*args, **kwargs)

Overloaded function.

locate_dofs_topological(*args, **kwargs)

Overloaded function.

pack_coefficients(*args, **kwargs)

Overloaded function.

pack_constants(*args, **kwargs)

Overloaded function.

set_bc(*args, **kwargs)

Overloaded function.

transpose_dofmap(arg0, arg1)

Build the index to (cell, local index) map from a dofmap ((cell, local index ) -> index).

Classes

Constant_complex128(self, c)

Value constant with respect to integration domain

Constant_complex64(self, c)

Value constant with respect to integration domain

Constant_float32(self, c)

Value constant with respect to integration domain

Constant_float64(self, c)

Value constant with respect to integration domain

CoordinateElement(self, celltype, degree)

Coordinate map element

DirichletBC_complex128(*args, **kwargs)

Object for representing Dirichlet (essential) boundary conditions

DirichletBC_complex64(*args, **kwargs)

Object for representing Dirichlet (essential) boundary conditions

DirichletBC_float32(*args, **kwargs)

Object for representing Dirichlet (essential) boundary conditions

DirichletBC_float64(*args, **kwargs)

Object for representing Dirichlet (essential) boundary conditions

DofMap(self, element_dof_layout, index_map, ...)

DofMap object

ElementDofLayout(self, block_size, ...)

Object describing the layout of dofs on a cell

Expression_complex128(self, coefficients, ...)

An Expression

Expression_complex64(self, coefficients, ...)

An Expression

Expression_float32(self, coefficients, ...)

An Expression

Expression_float64(self, coefficients, ...)

An Expression

FiniteElement(self, ufcx_element)

Finite element object

Form_complex128(*args, **kwargs)

Variational form object

Form_complex64(*args, **kwargs)

Variational form object

Form_float32(*args, **kwargs)

Variational form object

Form_float64(*args, **kwargs)

Variational form object

FunctionSpace(self, mesh, element, dofmap)

Function_complex128(*args, **kwargs)

A finite element function

Function_complex64(*args, **kwargs)

A finite element function

Function_float32(*args, **kwargs)

A finite element function

Function_float64(*args, **kwargs)

A finite element function

IntegralType(self, value)

Members:

class dolfinx.cpp.fem.Constant_complex128(self: dolfinx.cpp.fem.Constant_complex128, c: numpy.ndarray[numpy.complex128])

Bases: pybind11_object

Value constant with respect to integration domain

Create a constant from a value array

property dtype
property value
class dolfinx.cpp.fem.Constant_complex64(self: dolfinx.cpp.fem.Constant_complex64, c: numpy.ndarray[numpy.complex64])

Bases: pybind11_object

Value constant with respect to integration domain

Create a constant from a value array

property dtype
property value
class dolfinx.cpp.fem.Constant_float32(self: dolfinx.cpp.fem.Constant_float32, c: numpy.ndarray[numpy.float32])

Bases: pybind11_object

Value constant with respect to integration domain

Create a constant from a value array

property dtype
property value
class dolfinx.cpp.fem.Constant_float64(self: dolfinx.cpp.fem.Constant_float64, c: numpy.ndarray[numpy.float64])

Bases: pybind11_object

Value constant with respect to integration domain

Create a constant from a value array

property dtype
property value
class dolfinx.cpp.fem.CoordinateElement(self: dolfinx.cpp.fem.CoordinateElement, celltype: dolfinx.cpp.mesh.CellType, degree: int)

Bases: pybind11_object

Coordinate map element

create_dof_layout(self: dolfinx.cpp.fem.CoordinateElement) dolfinx.cpp.fem.ElementDofLayout
property degree
pull_back(self: dolfinx.cpp.fem.CoordinateElement, x: numpy.ndarray[numpy.float64], cell_geometry: numpy.ndarray[numpy.float64]) numpy.ndarray[numpy.float64]
push_forward(self: dolfinx.cpp.fem.CoordinateElement, X: numpy.ndarray[numpy.float64], cell_geometry: numpy.ndarray[numpy.float64]) numpy.ndarray[numpy.float64]
class dolfinx.cpp.fem.DirichletBC_complex128(*args, **kwargs)

Bases: pybind11_object

Object for representing Dirichlet (essential) boundary conditions

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.DirichletBC_complex128, g: numpy.ndarray[numpy.complex128], dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  2. __init__(self: dolfinx.cpp.fem.DirichletBC_complex128, g: dolfinx::fem::Constant<std::complex<double> >, dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  3. __init__(self: dolfinx.cpp.fem.DirichletBC_complex128, g: dolfinx::fem::Function<std::complex<double> >, dofs: numpy.ndarray[numpy.int32]) -> None

  4. __init__(self: dolfinx.cpp.fem.DirichletBC_complex128, g: dolfinx::fem::Function<std::complex<double> >, dofs: List[numpy.ndarray[numpy.int32][2]], V: dolfinx::fem::FunctionSpace) -> None

dof_indices(self: dolfinx.cpp.fem.DirichletBC_complex128) Tuple[numpy.ndarray[numpy.int32], int]
property dtype
property function_space
property value
class dolfinx.cpp.fem.DirichletBC_complex64(*args, **kwargs)

Bases: pybind11_object

Object for representing Dirichlet (essential) boundary conditions

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.DirichletBC_complex64, g: numpy.ndarray[numpy.complex64], dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  2. __init__(self: dolfinx.cpp.fem.DirichletBC_complex64, g: dolfinx::fem::Constant<std::complex<float> >, dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  3. __init__(self: dolfinx.cpp.fem.DirichletBC_complex64, g: dolfinx::fem::Function<std::complex<float> >, dofs: numpy.ndarray[numpy.int32]) -> None

  4. __init__(self: dolfinx.cpp.fem.DirichletBC_complex64, g: dolfinx::fem::Function<std::complex<float> >, dofs: List[numpy.ndarray[numpy.int32][2]], V: dolfinx::fem::FunctionSpace) -> None

dof_indices(self: dolfinx.cpp.fem.DirichletBC_complex64) Tuple[numpy.ndarray[numpy.int32], int]
property dtype
property function_space
property value
class dolfinx.cpp.fem.DirichletBC_float32(*args, **kwargs)

Bases: pybind11_object

Object for representing Dirichlet (essential) boundary conditions

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.DirichletBC_float32, g: numpy.ndarray[numpy.float32], dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  2. __init__(self: dolfinx.cpp.fem.DirichletBC_float32, g: dolfinx::fem::Constant<float>, dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  3. __init__(self: dolfinx.cpp.fem.DirichletBC_float32, g: dolfinx::fem::Function<float>, dofs: numpy.ndarray[numpy.int32]) -> None

  4. __init__(self: dolfinx.cpp.fem.DirichletBC_float32, g: dolfinx::fem::Function<float>, dofs: List[numpy.ndarray[numpy.int32][2]], V: dolfinx::fem::FunctionSpace) -> None

dof_indices(self: dolfinx.cpp.fem.DirichletBC_float32) Tuple[numpy.ndarray[numpy.int32], int]
property dtype
property function_space
property value
class dolfinx.cpp.fem.DirichletBC_float64(*args, **kwargs)

Bases: pybind11_object

Object for representing Dirichlet (essential) boundary conditions

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.DirichletBC_float64, g: numpy.ndarray[numpy.float64], dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  2. __init__(self: dolfinx.cpp.fem.DirichletBC_float64, g: dolfinx::fem::Constant<double>, dofs: numpy.ndarray[numpy.int32], V: dolfinx::fem::FunctionSpace) -> None

  3. __init__(self: dolfinx.cpp.fem.DirichletBC_float64, g: dolfinx::fem::Function<double>, dofs: numpy.ndarray[numpy.int32]) -> None

  4. __init__(self: dolfinx.cpp.fem.DirichletBC_float64, g: dolfinx::fem::Function<double>, dofs: List[numpy.ndarray[numpy.int32][2]], V: dolfinx::fem::FunctionSpace) -> None

dof_indices(self: dolfinx.cpp.fem.DirichletBC_float64) Tuple[numpy.ndarray[numpy.int32], int]
property dtype
property function_space
property value
class dolfinx.cpp.fem.DofMap(self: dolfinx.cpp.fem.DofMap, element_dof_layout: dolfinx.cpp.fem.ElementDofLayout, index_map: dolfinx.cpp.common.IndexMap, index_map_bs: int, dofmap: dolfinx.cpp.graph.AdjacencyList_int32, bs: int)

Bases: pybind11_object

DofMap object

property bs
cell_dofs(self: dolfinx.cpp.fem.DofMap, cell: int) numpy.ndarray[numpy.int32]
property dof_layout
property index_map
property index_map_bs
list(self: dolfinx.cpp.fem.DofMap) dolfinx.cpp.graph.AdjacencyList_int32
class dolfinx.cpp.fem.ElementDofLayout(self: dolfinx.cpp.fem.ElementDofLayout, block_size: int, endity_dofs: List[List[List[int]]], entity_closure_dofs: List[List[List[int]]], parent_map: List[int], sub_layouts: List[dolfinx.cpp.fem.ElementDofLayout])

Bases: pybind11_object

Object describing the layout of dofs on a cell

property block_size
entity_closure_dofs(self: dolfinx.cpp.fem.ElementDofLayout, dim: int, entity_index: int) List[int]
entity_dofs(self: dolfinx.cpp.fem.ElementDofLayout, dim: int, entity_index: int) List[int]
property num_dofs
num_entity_closure_dofs(self: dolfinx.cpp.fem.ElementDofLayout, dim: int) int
num_entity_dofs(self: dolfinx.cpp.fem.ElementDofLayout, dim: int) int
class dolfinx.cpp.fem.Expression_complex128(self: dolfinx.cpp.fem.Expression_complex128, coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], X: numpy.ndarray[numpy.float64], fn: int, value_shape: List[int], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace)

Bases: pybind11_object

An Expression

X(self: dolfinx.cpp.fem.Expression_complex128) numpy.ndarray[numpy.float64]
property dtype
eval(self: dolfinx.cpp.fem.Expression_complex128, active_cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.complex128]) None
property mesh
property value_shape
property value_size
class dolfinx.cpp.fem.Expression_complex64(self: dolfinx.cpp.fem.Expression_complex64, coefficients: List[dolfinx.cpp.fem.Function_complex64], constants: List[dolfinx.cpp.fem.Constant_complex64], X: numpy.ndarray[numpy.float64], fn: int, value_shape: List[int], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace)

Bases: pybind11_object

An Expression

X(self: dolfinx.cpp.fem.Expression_complex64) numpy.ndarray[numpy.float64]
property dtype
eval(self: dolfinx.cpp.fem.Expression_complex64, active_cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.complex64]) None
property mesh
property value_shape
property value_size
class dolfinx.cpp.fem.Expression_float32(self: dolfinx.cpp.fem.Expression_float32, coefficients: List[dolfinx.cpp.fem.Function_float32], constants: List[dolfinx.cpp.fem.Constant_float32], X: numpy.ndarray[numpy.float64], fn: int, value_shape: List[int], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace)

Bases: pybind11_object

An Expression

X(self: dolfinx.cpp.fem.Expression_float32) numpy.ndarray[numpy.float64]
property dtype
eval(self: dolfinx.cpp.fem.Expression_float32, active_cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.float32]) None
property mesh
property value_shape
property value_size
class dolfinx.cpp.fem.Expression_float64(self: dolfinx.cpp.fem.Expression_float64, coefficients: List[dolfinx.cpp.fem.Function_float64], constants: List[dolfinx.cpp.fem.Constant_float64], X: numpy.ndarray[numpy.float64], fn: int, value_shape: List[int], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace)

Bases: pybind11_object

An Expression

X(self: dolfinx.cpp.fem.Expression_float64) numpy.ndarray[numpy.float64]
property dtype
eval(self: dolfinx.cpp.fem.Expression_float64, active_cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.float64]) None
property mesh
property value_shape
property value_size
class dolfinx.cpp.fem.FiniteElement(self: dolfinx.cpp.fem.FiniteElement, ufcx_element: int)

Bases: pybind11_object

Finite element object

apply_dof_transformation(self: dolfinx.cpp.fem.FiniteElement, x: numpy.ndarray[numpy.float64], cell_permutation: int, dim: int) None
property basix_element
property interpolation_ident
interpolation_points(self: dolfinx.cpp.fem.FiniteElement) numpy.ndarray[numpy.float64]
property needs_dof_transformations
property num_sub_elements
signature(self: dolfinx.cpp.fem.FiniteElement) str
property space_dimension
property value_shape
class dolfinx.cpp.fem.Form_complex128(*args, **kwargs)

Bases: pybind11_object

Variational form object

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Form_complex128, spaces: List[dolfinx::fem::FunctionSpace], integrals: Dict[dolfinx::fem::IntegralType, Tuple[List[Tuple[int, object]], dolfinx.cpp.mesh.MeshTags_int32]], coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], need_permutation_data: bool, mesh: dolfinx.cpp.mesh.Mesh = None) -> None

  2. __init__(self: dolfinx.cpp.fem.Form_complex128, form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) -> None

Create a Form from a pointer to a ufcx_form

property coefficients
domains(self: dolfinx.cpp.fem.Form_complex128, type: dolfinx::fem::IntegralType, i: int) numpy.ndarray[numpy.int32]
property dtype
property function_spaces
integral_ids(self: dolfinx.cpp.fem.Form_complex128, arg0: dolfinx::fem::IntegralType) List[int]
property integral_types
property mesh
property needs_facet_permutations
property rank
class dolfinx.cpp.fem.Form_complex64(*args, **kwargs)

Bases: pybind11_object

Variational form object

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Form_complex64, spaces: List[dolfinx::fem::FunctionSpace], integrals: Dict[dolfinx::fem::IntegralType, Tuple[List[Tuple[int, object]], dolfinx.cpp.mesh.MeshTags_int32]], coefficients: List[dolfinx.cpp.fem.Function_complex64], constants: List[dolfinx.cpp.fem.Constant_complex64], need_permutation_data: bool, mesh: dolfinx.cpp.mesh.Mesh = None) -> None

  2. __init__(self: dolfinx.cpp.fem.Form_complex64, form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_complex64], constants: List[dolfinx.cpp.fem.Constant_complex64], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) -> None

Create a Form from a pointer to a ufcx_form

property coefficients
domains(self: dolfinx.cpp.fem.Form_complex64, type: dolfinx::fem::IntegralType, i: int) numpy.ndarray[numpy.int32]
property dtype
property function_spaces
integral_ids(self: dolfinx.cpp.fem.Form_complex64, arg0: dolfinx::fem::IntegralType) List[int]
property integral_types
property mesh
property needs_facet_permutations
property rank
class dolfinx.cpp.fem.Form_float32(*args, **kwargs)

Bases: pybind11_object

Variational form object

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Form_float32, spaces: List[dolfinx::fem::FunctionSpace], integrals: Dict[dolfinx::fem::IntegralType, Tuple[List[Tuple[int, object]], dolfinx.cpp.mesh.MeshTags_int32]], coefficients: List[dolfinx.cpp.fem.Function_float32], constants: List[dolfinx.cpp.fem.Constant_float32], need_permutation_data: bool, mesh: dolfinx.cpp.mesh.Mesh = None) -> None

  2. __init__(self: dolfinx.cpp.fem.Form_float32, form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_float32], constants: List[dolfinx.cpp.fem.Constant_float32], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) -> None

Create a Form from a pointer to a ufcx_form

property coefficients
domains(self: dolfinx.cpp.fem.Form_float32, type: dolfinx::fem::IntegralType, i: int) numpy.ndarray[numpy.int32]
property dtype
property function_spaces
integral_ids(self: dolfinx.cpp.fem.Form_float32, arg0: dolfinx::fem::IntegralType) List[int]
property integral_types
property mesh
property needs_facet_permutations
property rank
class dolfinx.cpp.fem.Form_float64(*args, **kwargs)

Bases: pybind11_object

Variational form object

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Form_float64, spaces: List[dolfinx::fem::FunctionSpace], integrals: Dict[dolfinx::fem::IntegralType, Tuple[List[Tuple[int, object]], dolfinx.cpp.mesh.MeshTags_int32]], coefficients: List[dolfinx.cpp.fem.Function_float64], constants: List[dolfinx.cpp.fem.Constant_float64], need_permutation_data: bool, mesh: dolfinx.cpp.mesh.Mesh = None) -> None

  2. __init__(self: dolfinx.cpp.fem.Form_float64, form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_float64], constants: List[dolfinx.cpp.fem.Constant_float64], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) -> None

Create a Form from a pointer to a ufcx_form

property coefficients
domains(self: dolfinx.cpp.fem.Form_float64, type: dolfinx::fem::IntegralType, i: int) numpy.ndarray[numpy.int32]
property dtype
property function_spaces
integral_ids(self: dolfinx.cpp.fem.Form_float64, arg0: dolfinx::fem::IntegralType) List[int]
property integral_types
property mesh
property needs_facet_permutations
property rank
class dolfinx.cpp.fem.FunctionSpace(self: dolfinx.cpp.fem.FunctionSpace, mesh: dolfinx.cpp.mesh.Mesh, element: dolfinx.cpp.fem.FiniteElement, dofmap: dolfinx.cpp.fem.DofMap)

Bases: pybind11_object

collapse(self: dolfinx.cpp.fem.FunctionSpace) Tuple[dolfinx.cpp.fem.FunctionSpace, List[int]]
component(self: dolfinx.cpp.fem.FunctionSpace) List[int]
contains(self: dolfinx.cpp.fem.FunctionSpace, V: dolfinx.cpp.fem.FunctionSpace) bool
property dofmap
property element
property mesh
sub(self: dolfinx.cpp.fem.FunctionSpace, component: List[int]) dolfinx.cpp.fem.FunctionSpace
tabulate_dof_coordinates(self: dolfinx.cpp.fem.FunctionSpace) numpy.ndarray[numpy.float64]
class dolfinx.cpp.fem.Function_complex128(*args, **kwargs)

Bases: pybind11_object

A finite element function

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Function_complex128, arg0: dolfinx::fem::FunctionSpace) -> None

Create a function on the given function space

  1. __init__(self: dolfinx.cpp.fem.Function_complex128, arg0: dolfinx::fem::FunctionSpace, arg1: dolfinx::la::Vector<std::complex<double>, std::allocator<std::complex<double> > >) -> None

collapse(self: dolfinx.cpp.fem.Function_complex128) dolfinx.cpp.fem.Function_complex128

Collapse sub-function view

eval(self: dolfinx.cpp.fem.Function_complex128, x: numpy.ndarray[numpy.float64], cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.complex128]) None

Evaluate Function

property function_space
interpolate(*args, **kwargs)

Overloaded function.

  1. interpolate(self: dolfinx.cpp.fem.Function_complex128, f: numpy.ndarray[numpy.complex128], cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an expression function

  1. interpolate(self: dolfinx.cpp.fem.Function_complex128, u: dolfinx.cpp.fem.Function_complex128, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate a finite element function

  1. interpolate(self: dolfinx.cpp.fem.Function_complex128, expr: dolfinx::fem::Expression<std::complex<double> >, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an Expression on a set of cells

interpolate_ptr(self: dolfinx.cpp.fem.Function_complex128, f_ptr: int, cells: numpy.ndarray[numpy.int32]) None

Interpolate using a pointer to an expression with a C signature

property name
sub(self: dolfinx.cpp.fem.Function_complex128, arg0: int) dolfinx.cpp.fem.Function_complex128

Return sub-function (view into parent Function

property x

Return the vector associated with the finite element Function

class dolfinx.cpp.fem.Function_complex64(*args, **kwargs)

Bases: pybind11_object

A finite element function

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Function_complex64, arg0: dolfinx::fem::FunctionSpace) -> None

Create a function on the given function space

  1. __init__(self: dolfinx.cpp.fem.Function_complex64, arg0: dolfinx::fem::FunctionSpace, arg1: dolfinx::la::Vector<std::complex<float>, std::allocator<std::complex<float> > >) -> None

collapse(self: dolfinx.cpp.fem.Function_complex64) dolfinx.cpp.fem.Function_complex64

Collapse sub-function view

eval(self: dolfinx.cpp.fem.Function_complex64, x: numpy.ndarray[numpy.float64], cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.complex64]) None

Evaluate Function

property function_space
interpolate(*args, **kwargs)

Overloaded function.

  1. interpolate(self: dolfinx.cpp.fem.Function_complex64, f: numpy.ndarray[numpy.complex64], cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an expression function

  1. interpolate(self: dolfinx.cpp.fem.Function_complex64, u: dolfinx.cpp.fem.Function_complex64, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate a finite element function

  1. interpolate(self: dolfinx.cpp.fem.Function_complex64, expr: dolfinx::fem::Expression<std::complex<float> >, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an Expression on a set of cells

interpolate_ptr(self: dolfinx.cpp.fem.Function_complex64, f_ptr: int, cells: numpy.ndarray[numpy.int32]) None

Interpolate using a pointer to an expression with a C signature

property name
sub(self: dolfinx.cpp.fem.Function_complex64, arg0: int) dolfinx.cpp.fem.Function_complex64

Return sub-function (view into parent Function

property x

Return the vector associated with the finite element Function

class dolfinx.cpp.fem.Function_float32(*args, **kwargs)

Bases: pybind11_object

A finite element function

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Function_float32, arg0: dolfinx::fem::FunctionSpace) -> None

Create a function on the given function space

  1. __init__(self: dolfinx.cpp.fem.Function_float32, arg0: dolfinx::fem::FunctionSpace, arg1: dolfinx::la::Vector<float, std::allocator<float> >) -> None

collapse(self: dolfinx.cpp.fem.Function_float32) dolfinx.cpp.fem.Function_float32

Collapse sub-function view

eval(self: dolfinx.cpp.fem.Function_float32, x: numpy.ndarray[numpy.float64], cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.float32]) None

Evaluate Function

property function_space
interpolate(*args, **kwargs)

Overloaded function.

  1. interpolate(self: dolfinx.cpp.fem.Function_float32, f: numpy.ndarray[numpy.float32], cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an expression function

  1. interpolate(self: dolfinx.cpp.fem.Function_float32, u: dolfinx.cpp.fem.Function_float32, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate a finite element function

  1. interpolate(self: dolfinx.cpp.fem.Function_float32, expr: dolfinx::fem::Expression<float>, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an Expression on a set of cells

interpolate_ptr(self: dolfinx.cpp.fem.Function_float32, f_ptr: int, cells: numpy.ndarray[numpy.int32]) None

Interpolate using a pointer to an expression with a C signature

property name
sub(self: dolfinx.cpp.fem.Function_float32, arg0: int) dolfinx.cpp.fem.Function_float32

Return sub-function (view into parent Function

property x

Return the vector associated with the finite element Function

class dolfinx.cpp.fem.Function_float64(*args, **kwargs)

Bases: pybind11_object

A finite element function

Overloaded function.

  1. __init__(self: dolfinx.cpp.fem.Function_float64, arg0: dolfinx::fem::FunctionSpace) -> None

Create a function on the given function space

  1. __init__(self: dolfinx.cpp.fem.Function_float64, arg0: dolfinx::fem::FunctionSpace, arg1: dolfinx::la::Vector<double, std::allocator<double> >) -> None

collapse(self: dolfinx.cpp.fem.Function_float64) dolfinx.cpp.fem.Function_float64

Collapse sub-function view

eval(self: dolfinx.cpp.fem.Function_float64, x: numpy.ndarray[numpy.float64], cells: numpy.ndarray[numpy.int32], values: numpy.ndarray[numpy.float64]) None

Evaluate Function

property function_space
interpolate(*args, **kwargs)

Overloaded function.

  1. interpolate(self: dolfinx.cpp.fem.Function_float64, f: numpy.ndarray[numpy.float64], cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an expression function

  1. interpolate(self: dolfinx.cpp.fem.Function_float64, u: dolfinx.cpp.fem.Function_float64, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate a finite element function

  1. interpolate(self: dolfinx.cpp.fem.Function_float64, expr: dolfinx::fem::Expression<double>, cells: numpy.ndarray[numpy.int32]) -> None

Interpolate an Expression on a set of cells

interpolate_ptr(self: dolfinx.cpp.fem.Function_float64, f_ptr: int, cells: numpy.ndarray[numpy.int32]) None

Interpolate using a pointer to an expression with a C signature

property name
sub(self: dolfinx.cpp.fem.Function_float64, arg0: int) dolfinx.cpp.fem.Function_float64

Return sub-function (view into parent Function

property x

Return the vector associated with the finite element Function

class dolfinx.cpp.fem.IntegralType(self: dolfinx.cpp.fem.IntegralType, value: int)

Bases: pybind11_object

Members:

cell

exterior_facet

interior_facet

vertex

cell = <IntegralType.cell: 0>
exterior_facet = <IntegralType.exterior_facet: 1>
interior_facet = <IntegralType.interior_facet: 2>
property name
property value
vertex = <IntegralType.vertex: 3>
dolfinx.cpp.fem.apply_lifting(*args, **kwargs)

Overloaded function.

  1. apply_lifting(b: numpy.ndarray[numpy.float64], a: List[dolfinx::fem::Form<double>], constants: List[numpy.ndarray[numpy.float64]], coeffs: List[Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float64]]], bcs1: List[List[dolfinx::fem::DirichletBC<double>]], x0: List[numpy.ndarray[numpy.float64]], scale: float) -> None

Modify vector for lifted boundary conditions

  1. apply_lifting(b: numpy.ndarray[numpy.float32], a: List[dolfinx::fem::Form<float>], constants: List[numpy.ndarray[numpy.float32]], coeffs: List[Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float32]]], bcs1: List[List[dolfinx::fem::DirichletBC<float>]], x0: List[numpy.ndarray[numpy.float32]], scale: float) -> None

Modify vector for lifted boundary conditions

  1. apply_lifting(b: numpy.ndarray[numpy.complex128], a: List[dolfinx::fem::Form<std::complex<double> >], constants: List[numpy.ndarray[numpy.complex128]], coeffs: List[Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex128]]], bcs1: List[List[dolfinx::fem::DirichletBC<std::complex<double> >]], x0: List[numpy.ndarray[numpy.complex128]], scale: float) -> None

Modify vector for lifted boundary conditions

  1. apply_lifting(b: numpy.ndarray[numpy.complex64], a: List[dolfinx::fem::Form<std::complex<float> >], constants: List[numpy.ndarray[numpy.complex64]], coeffs: List[Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex64]]], bcs1: List[List[dolfinx::fem::DirichletBC<std::complex<float> >]], x0: List[numpy.ndarray[numpy.complex64]], scale: float) -> None

Modify vector for lifted boundary conditions

dolfinx.cpp.fem.assemble_matrix(*args, **kwargs)

Overloaded function.

  1. assemble_matrix(A: dolfinx::la::MatrixCSR<double, std::allocator<double> >, a: dolfinx::fem::Form<double>, constants: numpy.ndarray[numpy.float64], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float64]], bcs: List[dolfinx::fem::DirichletBC<double>]) -> None

Experimental.

  1. assemble_matrix(fin: Callable[[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32], numpy.ndarray[numpy.float64]], int], form: dolfinx::fem::Form<double>, bcs: List[dolfinx::fem::DirichletBC<double>]) -> None

Experimental assembly with Python insertion function. This will be slow. Use for testing only.

  1. assemble_matrix(A: dolfinx::la::MatrixCSR<float, std::allocator<float> >, a: dolfinx::fem::Form<float>, constants: numpy.ndarray[numpy.float32], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float32]], bcs: List[dolfinx::fem::DirichletBC<float>]) -> None

Experimental.

  1. assemble_matrix(fin: Callable[[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32], numpy.ndarray[numpy.float32]], int], form: dolfinx::fem::Form<float>, bcs: List[dolfinx::fem::DirichletBC<float>]) -> None

Experimental assembly with Python insertion function. This will be slow. Use for testing only.

  1. assemble_matrix(A: dolfinx::la::MatrixCSR<std::complex<double>, std::allocator<std::complex<double> > >, a: dolfinx::fem::Form<std::complex<double> >, constants: numpy.ndarray[numpy.complex128], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex128]], bcs: List[dolfinx::fem::DirichletBC<std::complex<double> >]) -> None

Experimental.

  1. assemble_matrix(fin: Callable[[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32], numpy.ndarray[numpy.complex128]], int], form: dolfinx::fem::Form<std::complex<double> >, bcs: List[dolfinx::fem::DirichletBC<std::complex<double> >]) -> None

Experimental assembly with Python insertion function. This will be slow. Use for testing only.

  1. assemble_matrix(A: dolfinx::la::MatrixCSR<std::complex<float>, std::allocator<std::complex<float> > >, a: dolfinx::fem::Form<std::complex<float> >, constants: numpy.ndarray[numpy.complex64], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex64]], bcs: List[dolfinx::fem::DirichletBC<std::complex<float> >]) -> None

Experimental.

  1. assemble_matrix(fin: Callable[[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32], numpy.ndarray[numpy.complex64]], int], form: dolfinx::fem::Form<std::complex<float> >, bcs: List[dolfinx::fem::DirichletBC<std::complex<float> >]) -> None

Experimental assembly with Python insertion function. This will be slow. Use for testing only.

dolfinx.cpp.fem.assemble_scalar(*args, **kwargs)

Overloaded function.

  1. assemble_scalar(M: dolfinx::fem::Form<double>, constants: numpy.ndarray[numpy.float64], coefficients: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float64]]) -> float

Assemble functional over mesh with provided constants and coefficients

  1. assemble_scalar(M: dolfinx::fem::Form<float>, constants: numpy.ndarray[numpy.float32], coefficients: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float32]]) -> float

Assemble functional over mesh with provided constants and coefficients

  1. assemble_scalar(M: dolfinx::fem::Form<std::complex<double> >, constants: numpy.ndarray[numpy.complex128], coefficients: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex128]]) -> complex

Assemble functional over mesh with provided constants and coefficients

  1. assemble_scalar(M: dolfinx::fem::Form<std::complex<float> >, constants: numpy.ndarray[numpy.complex64], coefficients: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex64]]) -> complex

Assemble functional over mesh with provided constants and coefficients

dolfinx.cpp.fem.assemble_vector(*args, **kwargs)

Overloaded function.

  1. assemble_vector(b: numpy.ndarray[numpy.float64], L: dolfinx::fem::Form<double>, constants: numpy.ndarray[numpy.float64], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float64]]) -> None

Assemble linear form into an existing vector with pre-packed constants and coefficients

  1. assemble_vector(b: numpy.ndarray[numpy.float32], L: dolfinx::fem::Form<float>, constants: numpy.ndarray[numpy.float32], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float32]]) -> None

Assemble linear form into an existing vector with pre-packed constants and coefficients

  1. assemble_vector(b: numpy.ndarray[numpy.complex128], L: dolfinx::fem::Form<std::complex<double> >, constants: numpy.ndarray[numpy.complex128], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex128]]) -> None

Assemble linear form into an existing vector with pre-packed constants and coefficients

  1. assemble_vector(b: numpy.ndarray[numpy.complex64], L: dolfinx::fem::Form<std::complex<float> >, constants: numpy.ndarray[numpy.complex64], coeffs: Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex64]]) -> None

Assemble linear form into an existing vector with pre-packed constants and coefficients

dolfinx.cpp.fem.build_dofmap(comm: MPICommWrapper, topology: dolfinx.cpp.mesh.Topology, layout: dolfinx::fem::ElementDofLayout) Tuple[dolfinx.cpp.common.IndexMap, int, dolfinx.cpp.graph.AdjacencyList_int32]

Build and dofmap on a mesh.

dolfinx.cpp.fem.create_dofmap(comm: MPICommWrapper, dofmap: int, topology: dolfinx.cpp.mesh.Topology, element: dolfinx::fem::FiniteElement) dolfinx::fem::DofMap

Create DofMap object from a pointer to ufcx_dofmap.

dolfinx.cpp.fem.create_element_dof_layout(dofmap: int, cell_type: dolfinx.cpp.mesh.CellType, parent_map: List[int]) dolfinx::fem::ElementDofLayout

Create ElementDofLayout object from a ufc dofmap.

dolfinx.cpp.fem.create_expression_complex128(expression: int, coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace) dolfinx.cpp.fem.Expression_complex128

Create Form from a pointer to ufc_form.

dolfinx.cpp.fem.create_expression_complex64(expression: int, coefficients: List[dolfinx.cpp.fem.Function_complex64], constants: List[dolfinx.cpp.fem.Constant_complex64], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace) dolfinx.cpp.fem.Expression_complex64

Create Form from a pointer to ufc_form.

dolfinx.cpp.fem.create_expression_float32(expression: int, coefficients: List[dolfinx.cpp.fem.Function_float32], constants: List[dolfinx.cpp.fem.Constant_float32], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace) dolfinx.cpp.fem.Expression_float32

Create Form from a pointer to ufc_form.

dolfinx.cpp.fem.create_expression_float64(expression: int, coefficients: List[dolfinx.cpp.fem.Function_float64], constants: List[dolfinx.cpp.fem.Constant_float64], mesh: dolfinx.cpp.mesh.Mesh, argument_function_space: dolfinx::fem::FunctionSpace) dolfinx.cpp.fem.Expression_float64

Create Form from a pointer to ufc_form.

dolfinx.cpp.fem.create_form_complex128(form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) dolfinx.cpp.fem.Form_complex128

Create Form from a pointer to ufcx_form.

dolfinx.cpp.fem.create_form_complex64(form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_complex64], constants: List[dolfinx.cpp.fem.Constant_complex64], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) dolfinx.cpp.fem.Form_complex64

Create Form from a pointer to ufcx_form.

dolfinx.cpp.fem.create_form_float32(form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_float32], constants: List[dolfinx.cpp.fem.Constant_float32], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) dolfinx.cpp.fem.Form_float32

Create Form from a pointer to ufcx_form.

dolfinx.cpp.fem.create_form_float64(form: int, spaces: List[dolfinx::fem::FunctionSpace], coefficients: List[dolfinx.cpp.fem.Function_float64], constants: List[dolfinx.cpp.fem.Constant_float64], subdomains: Dict[dolfinx::fem::IntegralType, dolfinx.cpp.mesh.MeshTags_int32], mesh: dolfinx.cpp.mesh.Mesh) dolfinx.cpp.fem.Form_float64

Create Form from a pointer to ufcx_form.

dolfinx.cpp.fem.create_sparsity_pattern(topology: dolfinx.cpp.mesh.Topology, dofmaps: List[dolfinx::fem::DofMap], types: Set[dolfinx::fem::IntegralType]) dolfinx::la::SparsityPattern

Create a sparsity pattern.

dolfinx.cpp.fem.insert_diagonal(*args, **kwargs)

Overloaded function.

  1. insert_diagonal(A: dolfinx::la::MatrixCSR<double, std::allocator<double> >, V: dolfinx::fem::FunctionSpace, bcs: List[dolfinx::fem::DirichletBC<double>], diagonal: float) -> None

Experimental.

  1. insert_diagonal(A: dolfinx::la::MatrixCSR<float, std::allocator<float> >, V: dolfinx::fem::FunctionSpace, bcs: List[dolfinx::fem::DirichletBC<float>], diagonal: float) -> None

Experimental.

  1. insert_diagonal(A: dolfinx::la::MatrixCSR<std::complex<double>, std::allocator<std::complex<double> > >, V: dolfinx::fem::FunctionSpace, bcs: List[dolfinx::fem::DirichletBC<std::complex<double> >], diagonal: complex) -> None

Experimental.

  1. insert_diagonal(A: dolfinx::la::MatrixCSR<std::complex<float>, std::allocator<std::complex<float> > >, V: dolfinx::fem::FunctionSpace, bcs: List[dolfinx::fem::DirichletBC<std::complex<float> >], diagonal: complex) -> None

Experimental.

dolfinx.cpp.fem.interpolation_coords(element: dolfinx.cpp.fem.FiniteElement, V: dolfinx.cpp.mesh.Mesh, cells: numpy.ndarray[numpy.int32]) numpy.ndarray[numpy.float64]
dolfinx.cpp.fem.locate_dofs_geometrical(*args, **kwargs)

Overloaded function.

  1. locate_dofs_geometrical(V: List[dolfinx::fem::FunctionSpace], marker: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) -> List[numpy.ndarray[2]]

  2. locate_dofs_geometrical(V: dolfinx::fem::FunctionSpace, marker: Callable[[numpy.ndarray[numpy.float64]], numpy.ndarray[bool]]) -> numpy.ndarray[numpy.int32]

dolfinx.cpp.fem.locate_dofs_topological(*args, **kwargs)

Overloaded function.

  1. locate_dofs_topological(V: List[dolfinx::fem::FunctionSpace], dim: int, entities: numpy.ndarray[numpy.int32], remote: bool = True) -> List[numpy.ndarray[2]]

  2. locate_dofs_topological(V: dolfinx::fem::FunctionSpace, dim: int, entities: numpy.ndarray[numpy.int32], remote: bool = True) -> numpy.ndarray[numpy.int32]

dolfinx.cpp.fem.pack_coefficients(*args, **kwargs)

Overloaded function.

  1. pack_coefficients(form: dolfinx::fem::Form<double>) -> Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float64]]

Pack coefficients for a Form.

  1. pack_coefficients(form: dolfinx::fem::Form<float>) -> Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.float32]]

Pack coefficients for a Form.

  1. pack_coefficients(form: dolfinx::fem::Form<std::complex<double> >) -> Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex128]]

Pack coefficients for a Form.

  1. pack_coefficients(form: dolfinx::fem::Form<std::complex<float> >) -> Dict[Tuple[dolfinx::fem::IntegralType, int], numpy.ndarray[numpy.complex64]]

Pack coefficients for a Form.

dolfinx.cpp.fem.pack_constants(*args, **kwargs)

Overloaded function.

  1. pack_constants(form: dolfinx::fem::Form<double>) -> numpy.ndarray[numpy.float64]

Pack constants for a Form.

  1. pack_constants(e: dolfinx::fem::Expression<double>) -> numpy.ndarray[numpy.float64]

Pack constants for an Expression.

  1. pack_constants(form: dolfinx::fem::Form<float>) -> numpy.ndarray[numpy.float32]

Pack constants for a Form.

  1. pack_constants(e: dolfinx::fem::Expression<float>) -> numpy.ndarray[numpy.float32]

Pack constants for an Expression.

  1. pack_constants(form: dolfinx::fem::Form<std::complex<double> >) -> numpy.ndarray[numpy.complex128]

Pack constants for a Form.

  1. pack_constants(e: dolfinx::fem::Expression<std::complex<double> >) -> numpy.ndarray[numpy.complex128]

Pack constants for an Expression.

  1. pack_constants(form: dolfinx::fem::Form<std::complex<float> >) -> numpy.ndarray[numpy.complex64]

Pack constants for a Form.

  1. pack_constants(e: dolfinx::fem::Expression<std::complex<float> >) -> numpy.ndarray[numpy.complex64]

Pack constants for an Expression.

dolfinx.cpp.fem.set_bc(*args, **kwargs)

Overloaded function.

  1. set_bc(b: numpy.ndarray[numpy.float64], bcs: List[dolfinx::fem::DirichletBC<double>], x0: numpy.ndarray[numpy.float64] = None, scale: float = 1.0) -> None

  2. set_bc(b: numpy.ndarray[numpy.float32], bcs: List[dolfinx::fem::DirichletBC<float>], x0: numpy.ndarray[numpy.float32] = None, scale: float = 1.0) -> None

  3. set_bc(b: numpy.ndarray[numpy.complex128], bcs: List[dolfinx::fem::DirichletBC<std::complex<double> >], x0: numpy.ndarray[numpy.complex128] = None, scale: float = 1.0) -> None

  4. set_bc(b: numpy.ndarray[numpy.complex64], bcs: List[dolfinx::fem::DirichletBC<std::complex<float> >], x0: numpy.ndarray[numpy.complex64] = None, scale: float = 1.0) -> None

dolfinx.cpp.fem.transpose_dofmap(arg0: dolfinx.cpp.graph.AdjacencyList_int32, arg1: int) dolfinx.cpp.graph.AdjacencyList_int32

Build the index to (cell, local index) map from a dofmap ((cell, local index ) -> index).