-
-
Save astrofrog/47ee268a8e71dc6760ec3e0e1b4beca7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module core_lib | |
use lib_version | |
end module core_lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module grid_geometry_specific | |
use core_lib | |
use type_photon | |
use type_grid_cell | |
use type_grid | |
implicit none | |
save | |
type(grid_cell) :: cell | |
end module grid_geometry_specific |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module lib_version | |
type version | |
character(len=10) :: string | |
end type version | |
interface operator(==) | |
module procedure equal | |
end interface operator(==) | |
contains | |
logical function equal(a, b) | |
implicit none | |
type(version),intent(in) :: a, b | |
equal = a%string == b%string | |
end function equal | |
end module lib_version | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ifort lib_version.f90 core_lib.f90 type_grid_cartesian_3d.f90 type_cell_id_3d.f90 grid_geometry_cartesian_3d.f90 test.f90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program test | |
end program test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type_grid_cell | |
use type_grid | |
implicit none | |
private | |
public :: grid_cell | |
type grid_cell | |
integer :: i1 | |
end type grid_cell | |
public :: operator(.eq.) | |
interface operator(.eq.) | |
module procedure equal | |
end interface operator(.eq.) | |
contains | |
logical function equal(a,b) | |
implicit none | |
type(grid_cell), intent(in) :: a,b | |
equal = a%i1 == b%i1 | |
end function equal | |
end module type_grid_cell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type_grid | |
use core_lib | |
implicit none | |
save | |
private | |
end module type_grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type_photon | |
use core_lib | |
use type_grid_cell | |
implicit none | |
save | |
private | |
public :: photon | |
type photon | |
type(grid_cell) :: icell | |
end type photon | |
end module type_photon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment