Skip to content

Conversation

@dpgrote
Copy link
Member

@dpgrote dpgrote commented Dec 3, 2025

For the implicit solver, the values in the guard cells need to be consistent for the various grid operations.

@dpgrote dpgrote added component: boundary PML, embedded boundaries, et al. component: implicit solvers Anything related to implicit solvers labels Dec 3, 2025
Comment on lines 378 to 385
if (evolve_scheme == EvolveScheme::ThetaImplicitEM ||
evolve_scheme == EvolveScheme::SemiImplicitEM ||
evolve_scheme == EvolveScheme::StrangImplicitSpectralEM) {
// For these implicit schemes, the number of ghost cells
// needs to be consistent for EB, J, and the field gather
ng_FieldGather = ng_alloc_EB;
}

Copy link
Contributor

@JustinRayAngus JustinRayAngus Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about combining this block with lines 325-331 and move them to after line 389? It would keep the implicit alterations to fewer blocks.

if (evolve_scheme == EvolveScheme::ThetaImplicitEM ||
    evolve_scheme == EvolveScheme::SemiImplicitEM ||
    evolve_scheme == EvolveScheme::StrangImplicitSpectralEM) {
    // For these implicit schemes, the number of ghost cells
    // for EB gather must be consistent with those for J.
    ng_alloc_EB.max( ng_alloc_J );
    ng_FieldGather.max( ng_alloc_J );
}

@JustinRayAngus JustinRayAngus enabled auto-merge (squash) December 4, 2025 04:04
@JustinRayAngus JustinRayAngus merged commit 72be352 into BLAST-WarpX:development Dec 4, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: boundary PML, embedded boundaries, et al. component: implicit solvers Anything related to implicit solvers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants