Skip to content

Commit

Permalink
fypp depndency and memtest for autodiff
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed Apr 8, 2024
1 parent cba008d commit a2af77a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.12", "ninja", "numpy", "cython"]
requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.12", "ninja", "numpy", "cython","fypp"]
30 changes: 30 additions & 0 deletions tests/memtest.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ program memtest
call test_custom_binary_diffusion(pcs)
call test_update_vertical_grid(pcs)
call test_press_temp_edd(pcs)
call test_autodiff(pcs)

contains

Expand Down Expand Up @@ -308,5 +309,34 @@ subroutine test_press_temp_edd(pc)
endif

end subroutine

subroutine test_autodiff(pc)
type(Atmosphere), intent(inout) :: pc

character(:), allocatable :: err
real(dp) :: tn

pc%var%autodiff = .true.
pc%var%atol = 1.0e-20_dp

call pc%initialize_stepper(pc%var%usol_init, err)
if (allocated(err)) then
print*,trim(err)
stop 1
endif

tn = pc%step(err)
if (allocated(err)) then
print*,trim(err)
stop 1
endif

call pc%destroy_stepper(err)
if (allocated(err)) then
print*,trim(err)
stop 1
endif

end subroutine

end program

0 comments on commit a2af77a

Please sign in to comment.