Skip to content

Test getEBFluxes in CellEB2#5347

Open
eebasso wants to merge 12 commits intoAMReX-Codes:developmentfrom
eebasso:celleb2-ebflux-regtest
Open

Test getEBFluxes in CellEB2#5347
eebasso wants to merge 12 commits intoAMReX-Codes:developmentfrom
eebasso:celleb2-ebflux-regtest

Conversation

@eebasso
Copy link
Copy Markdown
Contributor

@eebasso eebasso commented Apr 18, 2026

Modify the CellEB2 test to also check the output of getEBFluxes and compare with the exact theoretical flux.

@eebasso eebasso changed the title Regression test for getEBFluxes Test getEBFluxes in CellEB2 Apr 18, 2026
{
phi_ex_arr(i,j,k) = 0.0;
phi_eb_arr(i,j,k) = 0.0;
feb_ex_arr(i,j,k) = 0.0;
Copy link
Copy Markdown
Member

@WeiqunZhang WeiqunZhang Apr 18, 2026

Choose a reason for hiding this comment

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

Need to do this for FabType::regular too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What I was talking about is this branch, not about regular cells in else branch.

            } else if (FabType::regular == fabtyp) {
                amrex::ParallelFor(nbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
                {
                    mytest_set_phi_reg(i,j,k,phi_ex_arr,rhs_arr,
                                       AMREX_D_DECL(bx_arr,by_arr,bz_arr),
                                       dx, lprob_type, bx);
                });

It never touches feb_ex_arr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BTW, you can remove this comment // feb_ex_arr(i,j,k) = 0.0;.

Copy link
Copy Markdown
Contributor Author

@eebasso eebasso Apr 22, 2026

Choose a reason for hiding this comment

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

Okay, should be done now. Would using fluxeb_exact.setVal(0.0) at the same place where fluxeb_sol.setVal(0.0) occurs be appropriate? I noticed that this was not done for phiexact

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.

2 participants