Replies: 1 comment
|
This is the prototype I came up with for creating a I'd really appreciate any feedback, as I'm not a C++ developer and I'm still getting familiar with AMReX's internals. Once I've finished implementing and validating the fine mask, I plan to submit a pull request. I'd also appreciate any suggestions on how best to test the code. subroutine amrex_imultifab_build_fine_mask (msk, cba, cdm, fba, rr, crse_value, fine_value)
type(amrex_imultifab), intent(inout) :: msk
type(amrex_boxarray), intent(in) :: cba
type(amrex_distromap), intent(in) :: cdm
type(amrex_boxarray), intent(in) :: fba
integer, intent(in) :: rr
integer, intent(in) :: crse_value
integer, intent(in) :: fine_value
call amrex_imultifab_destroy(msk)
msk%owner = .true.
msk%nc = 1
msk%ng(1:ndims) = 0
msk%ba = cba
msk%dm = cdm
call amrex_fi_new_fine_imultifab(msk%p, msk%ba%p, msk%dm%p, fba%p, rr, crse_value, fine_value)
end subroutine amrex_imultifab_build_fine_mask void amrex_fi_new_fine_imultifab (iMultiFab*& msk, const BoxArray*& cba, const DistributionMapping*& cdm, const BoxArray*& fba, int rr, int crse_value, int fine_value)
{
msk = new iMultiFab(makeFineMask(*cba, *cdm, *fba, IntVect{AMREX_D_DECL(rr,rr,rr)}, crse_value, fine_value));
cba = &(msk->boxArray());
cdm = &(msk->DistributionMap());
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Would it be possible to expose the Fine Mask, Point Mask, and Overlap Mask creation routines through the Fortran interface?
At the moment, only the Owner Mask is available. Having the other mask functionality available from Fortran as well would be very helpful.
All reactions