We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75b5ec7 commit 0c1b1e5Copy full SHA for 0c1b1e5
1 file changed
devito/petsc/iet/builder.py
@@ -71,13 +71,16 @@ def _setup(self):
71
v for v, dim in zip(target.shape_allocated, target.dimensions) if dim.is_Space
72
)
73
# TODO: Check - VecCreateSeqWithArray
74
- local_x = petsc_call('VecCreateMPIWithArray',
75
- [sobjs['comm'], 1, local_size, 'PETSC_DECIDE',
+ # local_x = petsc_call('VecCreateMPIWithArray',
+ # [sobjs['comm'], 1, local_size, 'PETSC_DECIDE',
76
+ # field_from_ptr, Byref(sobjs['xlocal'])])
77
+ local_x = petsc_call('VecCreateSeqWithArray',
78
+ ['PETSC_COMM_SELF', 1, local_size,
79
field_from_ptr, Byref(sobjs['xlocal'])])
80
81
# TODO: potentially also need to set the DM and local/global map to xlocal
82
- get_local_size = petsc_call('VecGetSize',
83
+ get_local_size = petsc_call('VecGetLocalSize',
84
[sobjs['xlocal'], Byref(sobjs['localsize'])])
85
86
global_b = petsc_call('DMCreateGlobalVector',
0 commit comments