Skip to content

Commit

Permalink
more tweaks to issame functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dunhamsj committed Sep 29, 2024
1 parent 4ccc80c commit 9594f74
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Src/F_Interfaces/Base/AMReX_boxarray_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ pure integer function amrex_fi_boxarray_intersects_box (ba, lo, hi) bind(c)
type(c_ptr), value, intent(in) :: ba
integer, intent(in) :: lo(*), hi(*)
end function amrex_fi_boxarray_intersects_box

pure logical function amrex_fi_boxarray_issame (baa, bab) bind(c)
import
implicit none
type(c_ptr), value, intent(in) :: baa, bab
end function amrex_fi_boxarray_issame
end interface

contains
Expand Down
2 changes: 1 addition & 1 deletion Src/F_Interfaces/Base/AMReX_distromap_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ extern "C" {

bool amrex_fi_distromap_issame (const DistributionMapping& dma, const DistributionMapping& dmb)
{
return dma==dmb;
return dma == dmb;
}
}
11 changes: 8 additions & 3 deletions Src/F_Interfaces/Base/AMReX_distromap_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ subroutine amrex_fi_print_distromap (dm) bind(c)
implicit none
type(c_ptr), value :: dm
end subroutine amrex_fi_print_distromap

pure logical function amrex_fi_distromap_issame (dma, dmb) bind(c)
import
implicit none
type(c_ptr), value :: dma, dmb
end function amrex_fi_distromap_issame
end interface

contains
Expand Down Expand Up @@ -160,10 +166,9 @@ subroutine amrex_distromap_print (dm)
end subroutine amrex_distromap_print

pure function amrex_distromap_issame (dma, dmb) result(r)
type(amrex_distromap), intent(in) :: dma
type(amrex_distromap), intent(in) :: dmb
type(amrex_distromap), intent(in) :: dma, dmb
logical :: r
r = amrex_fi_distromap_issame(dma%p, dmb%p)
end function amrex_distromap_issame
end function amrex_distromap_issame

end module amrex_distromap_module

0 comments on commit 9594f74

Please sign in to comment.