Skip to content

Commit

Permalink
Tracking seems to work but needs testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Michael Blevins committed Dec 13, 2022
1 parent 9830f7d commit a6249f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OPTREPORT = -qopt-report=5
IPRODUCTION = -g -traceback -no-wrap-margin -assume byterecl -O3 -qopt-prefetch=0 -sox $(PAR) $(SIMDVEC) $(HEAPARR)
#IDEBUG = -O0 -g -traceback -debug all -nogen-interfaces -assume byterecl -m64 -heap-arrays -FR -no-pie -no-ftz -fpe-all=0 -mp1 -fp-model strict -fpe0 -align all -pad -ip -prec-div -prec-sqrt -assume protect-parens -CB -no-wrap-margin -init=snan,arrays
IDEBUG = -O0 -g -traceback -debug all -nogen-interfaces -assume byterecl -m64 -heap-arrays -FR -no-pie -no-ftz -fpe-all=0 -mp1 -fp-model strict -fpe0 -align all -pad -ip -prec-sqrt -assume protect-parens -CB -no-wrap-margin -init=snan,arrays
AM_FCFLAGS = $(IDEBUG)
AM_FCFLAGS = $(IPRODUCTION)
#ifort debug flags

#gfortran optimized flags
Expand Down
1 change: 1 addition & 0 deletions src/regolith/regolith_melt_glass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ subroutine regolith_melt_glass(user,crater,domain,age,age_resolution,ebh,rm,erad
melt = volm1 - volv1
newlayer%meltfrac = melt/(vst-volv1)
allocate(newlayer%meltdist((domain%rcnum)))
newlayer%meltdist(:) = 0.0_SP
if(domain%currentqmc) then
newlayer%meltdist(domain%nqmc) = newlayer%meltfrac
end if
Expand Down
8 changes: 6 additions & 2 deletions src/regolith/regolith_mix.f90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ subroutine regolith_mix(surfi,mixing_depth,domain)
type(regodatatype) :: newlayer
!type(regolisttype),pointer :: poppedlist,poppedlist_top
type(regodatatype),dimension(:),allocatable :: poppedarray
integer(I4B) :: i, N
integer(I4B) :: i, j, N

!===============================================
! Add up all layers' info until a desired depth
Expand All @@ -43,6 +43,7 @@ subroutine regolith_mix(surfi,mixing_depth,domain)
newlayer%meltfrac = 0.0_DP
newlayer%age(:) = 0.0_DP
allocate(newlayer%meltdist(domain%rcnum))
newlayer%meltdist(:) = 0.0_SP

!poppedlist => poppedlist_top
!do while(associated(poppedlist%next))
Expand All @@ -53,7 +54,10 @@ subroutine regolith_mix(surfi,mixing_depth,domain)
newlayer%meltfrac = newlayer%meltfrac + poppedarray(i)%thickness * poppedarray(i)%meltfrac
newlayer%age(:) = newlayer%age(:) + poppedarray(i)%age(:)
newlayer%meltdist(:) = newlayer%meltdist(:) + poppedarray(i)%thickness * poppedarray(i)%meltdist(:)
!poppedlist => poppedlist%next
! do j = 1,domain%rcnum !testing a loop here since the array operation resulted in a segfault
! newlayer%meltdist(j) = newlayer%meltdist(j) + poppedarray(i)%thickness * poppedarray(i)%meltdist(j)
! end do
! !poppedlist => poppedlist%next
end do

! Get average values of composition and melt fraction
Expand Down

0 comments on commit a6249f2

Please sign in to comment.