fraktalist: refactoring in progress
This commit is contained in:
9
Fraktalism/mods/Makefile
Normal file
9
Fraktalism/mods/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# compiling fraktalism's modules
|
||||
#
|
||||
|
||||
GFOPT = -Wall -Wextra -time -g
|
||||
|
||||
points3d.o: points3d.f90 Makefile
|
||||
gfortran $(GFOPT) -c $<
|
||||
|
||||
11
Fraktalism/mods/README.md
Normal file
11
Fraktalism/mods/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Modules
|
||||
|
||||
|
||||
Premier point : trouver les bonnes options de gfortran pour
|
||||
définir l'emplacement des `.mod`.
|
||||
|
||||
Deuxième point : construire un Makefile cohérent d'un bout à l'autre,
|
||||
avec un script de build bien robuste.
|
||||
|
||||
Troisième point : Faire la [documentation](documentation.md)
|
||||
|
||||
9
Fraktalism/mods/documention.md
Normal file
9
Fraktalism/mods/documention.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# La doc (enfin !)
|
||||
|
||||
## Points 3d
|
||||
|
||||
|
||||
## Portable Net Map
|
||||
|
||||
.pgm
|
||||
|
||||
33
Fraktalism/mods/points3d.f90
Normal file
33
Fraktalism/mods/points3d.f90
Normal file
@@ -0,0 +1,33 @@
|
||||
module points3d
|
||||
|
||||
implicit none
|
||||
!-----------------------------------------------------
|
||||
type t_point3d
|
||||
double precision :: x, y, z
|
||||
integer :: seq
|
||||
end type t_point3d
|
||||
|
||||
!-----------------------------------------------------
|
||||
contains
|
||||
|
||||
|
||||
subroutine list_points3d(array, start, length)
|
||||
type(t_point3d), dimension(:), intent(in) :: array
|
||||
integer, intent(in) :: start, length
|
||||
integer :: sz, i
|
||||
|
||||
sz = ubound(array, 1)
|
||||
if ((start+length) .GT. sz) then
|
||||
STOP ' : OUT OF BOUND'
|
||||
endif
|
||||
|
||||
! send oi to stdout.
|
||||
do i = start, start+length
|
||||
print *, array(i)%x, array(i)%y, array(i)%z, array(i)%seq
|
||||
enddo
|
||||
|
||||
end subroutine list_points3d
|
||||
|
||||
!-----------------------------------------------------
|
||||
|
||||
end module points3d
|
||||
Reference in New Issue
Block a user