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

Function test_create_vector

python/test/unit/la/test_matrix_vector.py:121–129  ·  view source on GitHub ↗

Test creation of a distributed vector.

(dtype)

Source from the content-addressed store, hash-verified

119 ],
120)
121def test_create_vector(dtype):
122 """Test creation of a distributed vector."""
123 mesh = create_unit_square(MPI.COMM_WORLD, 5, 5)
124 im = mesh.topology.index_map(0)
125
126 for bs in range(1, 4):
127 x = la.vector(im, bs=bs, dtype=dtype)
128 assert x.array.dtype == dtype
129 assert x.array.size == bs * (im.size_local + im.num_ghosts)
130
131
132def xfail_norm_of_integral_type_vector(dtype):

Callers

nothing calls this directly

Calls 3

create_unit_squareFunction · 0.90
vectorMethod · 0.80
index_mapMethod · 0.45

Tested by

no test coverage detected