Skip to content

[microfix] add a condition for cdim to be 3 to write the shift in GK field 3x2v #970

Merged
manauref merged 1 commit intomainfrom
hotfix-ensure-cdim3-for-write-twistshift
Mar 12, 2026
Merged

[microfix] add a condition for cdim to be 3 to write the shift in GK field 3x2v #970
manauref merged 1 commit intomainfrom
hotfix-ensure-cdim3-for-write-twistshift

Conversation

@Antoinehoff
Copy link
Collaborator

The 2x2v GK regression test are segfaulting since the merge of the write twist-shift function because if cdim==2, the bc_sheath updater is not allocated so gk_field_2x3x_write_twistshift is looking for unallocated arrays.

This PR just add condition for cdim==3. We could also remove the condition and make gk_field_2x3x_write_twistshift to be deactivated but since it is called only at the initial state I think that this would be an overkill.

@Antoinehoff Antoinehoff changed the title add a condition for cdim to be 3 to write the shift [microfix] add a condition for cdim to be 3 to write the shift in GK field 3x2v Mar 10, 2026
@Antoinehoff Antoinehoff requested a review from manauref March 10, 2026 08:27
@Maxwell-Rosen
Copy link
Collaborator

It sounds like there should be a separate 2x and 3x updater. Putting this if statement makes me think this function should be renamed. There is also an if statement for cdim==3, so this might be preferred to go inside there.

@manauref
Copy link
Collaborator

which regression test specifically?

i've been running rt_gk_sheath_2x2v_p1 without problems

@manauref manauref merged commit 80a6897 into main Mar 12, 2026
1 check passed
@manauref manauref deleted the hotfix-ensure-cdim3-for-write-twistshift branch March 12, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants