|
9 | 9 | ) |
10 | 10 | from devito.symbolics.unevaluation import Mul |
11 | 11 | from devito.types.basic import AbstractFunction |
| 12 | +from devito.types.misc import PostIncrementIndex |
12 | 13 | from devito.types import Dimension, Temp, TempArray |
13 | 14 | from devito.tools import filter_ordered |
14 | 15 | from devito.passes.iet.linearization import linearize_accesses |
@@ -694,7 +695,6 @@ def _create_count_bc_body(self, body): |
694 | 695 | dmda = sobjs['callbackdm'] |
695 | 696 | ctx = objs['dummyctx'] |
696 | 697 |
|
697 | | - |
698 | 698 | body = self.time_dependence.uxreplace_time(body) |
699 | 699 |
|
700 | 700 | fields = get_user_struct_fields(body) |
@@ -785,10 +785,13 @@ def _create_set_point_bc_body(self, body): |
785 | 785 |
|
786 | 786 | comm = sobjs['comm'] |
787 | 787 | is_create_general = petsc_call( |
788 | | - 'ISCreateGeneral', [comm, sobjs['numBC'], sobjs['bcPointsArr'], 'PETSC_OWN_POINTER'] |
| 788 | + 'ISCreateGeneral', [comm, sobjs['numBC'], sobjs['bcPointsArr'], 'PETSC_OWN_POINTER', Byref(sobjs['bcPointsIS'])] |
789 | 789 | ) |
790 | 790 |
|
791 | | - body = body._rebuild(body=body.body + (is_create_general,)) |
| 791 | + malloc = petsc_call( |
| 792 | + 'PetscMalloc1', [1, sobjs['bcPoints']] |
| 793 | + ) |
| 794 | + body = body._rebuild(body=body.body + (is_create_general,malloc)) |
792 | 795 |
|
793 | 796 | stacks = ( |
794 | 797 | dm_get_local_info, |
@@ -1300,7 +1303,7 @@ def zero_vector(vec): |
1300 | 1303 | def get_user_struct_fields(iet): |
1301 | 1304 | fields = [f.function for f in FindSymbols('basics').visit(iet)] |
1302 | 1305 | from devito.types.basic import LocalType |
1303 | | - avoid = (Temp, TempArray, LocalType) |
| 1306 | + avoid = (Temp, TempArray, LocalType, PostIncrementIndex) |
1304 | 1307 | fields = [f for f in fields if not isinstance(f.function, avoid)] |
1305 | 1308 | fields = [ |
1306 | 1309 | f for f in fields if not (f.is_Dimension and not (f.is_Time or f.is_Modulo)) |
|
0 commit comments