MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / __init__

Method __init__

python/dolfinx/la/__init__.py:48–70  ·  view source on GitHub ↗

Create a distributed vector. Args: x: C++ Vector object. Note: This initialiser is intended for internal library use only. User code should call :func:`vector` to create a vector object.

(
        self,
        x: (
            _cpp.la.Vector_float32
            | _cpp.la.Vector_float64
            | _cpp.la.Vector_complex64
            | _cpp.la.Vector_complex128
            | _cpp.la.Vector_int8
            | _cpp.la.Vector_int32
            | _cpp.la.Vector_int64
        ),
    )

Source from the content-addressed store, hash-verified

46 )
47
48 def __init__(
49 self,
50 x: (
51 _cpp.la.Vector_float32
52 | _cpp.la.Vector_float64
53 | _cpp.la.Vector_complex64
54 | _cpp.la.Vector_complex128
55 | _cpp.la.Vector_int8
56 | _cpp.la.Vector_int32
57 | _cpp.la.Vector_int64
58 ),
59 ):
60 """Create a distributed vector.
61
62 Args:
63 x: C++ Vector object.
64
65 Note:
66 This initialiser is intended for internal library use only.
67 User code should call :func:`vector` to create a vector object.
68 """
69 self._cpp_object = x
70 self._petsc_x = None
71
72 def __del__(self):
73 """Delete the PETSc vector if it was created."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected