Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Major restructuring of the fragmentation model. I know call it Fraggl…
Browse files Browse the repository at this point in the history
…e and it is fully object oriented.
  • Loading branch information
daminton committed Sep 2, 2021
1 parent 9b5b3c3 commit 0a30daf
Show file tree
Hide file tree
Showing 22 changed files with 2,124 additions and 1,778 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
#******************************************************************************

SWIFTEST_MODULES = swiftest_globals.f90 \
swiftest_operators.f90 \
lambda_function.f90\
swiftest_classes.f90 \
swiftest_operators.f90 \
fraggle_classes.f90 \
whm_classes.f90 \
rmvs_classes.f90 \
helio_classes.f90 \
Expand Down Expand Up @@ -91,7 +92,7 @@ lib:
ln -s $(SWIFTEST_HOME)/Makefile.Defines .; \
ln -s $(SWIFTEST_HOME)/Makefile .; \
make libdir
cd $(SWIFTEST_HOME)/src/fragmentation; \
cd $(SWIFTEST_HOME)/src/fraggle; \
rm -f Makefile.Defines Makefile; \
ln -s $(SWIFTEST_HOME)/Makefile.Defines .; \
ln -s $(SWIFTEST_HOME)/Makefile .; \
Expand Down Expand Up @@ -193,7 +194,7 @@ clean:
cd $(SWIFTEST_HOME)/src/modules; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/discard; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/drift; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/fragmentation; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/fraggle; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/gr; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/helio; rm -f Makefile.Defines Makefile *.gc*
cd $(SWIFTEST_HOME)/src/io; rm -f Makefile.Defines Makefile *.gc*
Expand Down
4 changes: 2 additions & 2 deletions Makefile.Defines
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ GWARNINGS = -Wall -Warray-bounds -Wimplicit-interface -Wextra -Warray-temporari
GPRODUCTION = -O3 -ffree-line-length-none $(GPAR)

#FFLAGS = $(IDEBUG) $(HEAPARR) $(SIMDVEC) $(PAR)
FFLAGS = $(IPRODUCTION) -g -traceback $(OPTREPORT)
FFLAGS = $(IPRODUCTION) $(OPTREPORT)
FORTRAN = ifort
#AR = xiar

#FORTRAN = gfortran
#FFLAGS = $(GDEBUG) $(GMEM) $(GPAR)
#FFLAGS = $(GPRODUCTION) -g -fcheck=all -Wall -fbacktrace
#FFLAGS = $(GPRODUCTION) -g -fbacktrace #-fcheck=all #-Wall
AR = ar

# DO NOT include in CFLAGS the "-c" option to compile object only
Expand Down
525 changes: 525 additions & 0 deletions src/fraggle/fraggle_generate.f90

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions src/fraggle/fraggle_placeholder.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
submodule(fraggle_classes) s_fraggle_placeholder
use swiftest

contains

!> The following interfaces are placeholders intended to satisfy the required abstract methods given by the parent class
module subroutine fraggle_placeholder_accel(self, system, param, t, lbeg)
implicit none
class(fraggle_fragments), intent(inout) :: self !! Fraggle fragment system object
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
real(DP), intent(in) :: t !! Current simulation time
logical, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step
write(*,*) "The type-bound procedure 'accel' is not defined for type fraggle_fragments"
return
end subroutine fraggle_placeholder_accel

module subroutine fraggle_placeholder_kick(self, system, param, t, dt, lbeg)
implicit none
class(fraggle_fragments), intent(inout) :: self !! Fraggle fragment system object
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system objec
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
real(DP), intent(in) :: t !! Current time
real(DP), intent(in) :: dt !! Stepsize
logical, intent(in) :: lbeg !! Logical flag indicating whether this is the beginning of the half step or not.

write(*,*) "The type-bound procedure 'kick' is not defined for type fraggle_fragments"
return
end subroutine fraggle_placeholder_kick

module subroutine fraggle_placeholder_step(self, system, param, t, dt)
implicit none
class(fraggle_fragments), intent(inout) :: self !! Swiftest body object
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest system object
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
real(DP), intent(in) :: t !! Simulation time
real(DP), intent(in) :: dt !! Current stepsize

write(*,*) "The type-bound procedure 'step' is not defined for type fraggle_fragments"
return
end subroutine fraggle_placeholder_step


end submodule s_fraggle_placeholder
Loading

0 comments on commit 0a30daf

Please sign in to comment.