Skip to content

Commit

Permalink
sal
Browse files Browse the repository at this point in the history
  • Loading branch information
pbosler committed Apr 4, 2014
1 parent 2662c4e commit dd6a809
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 73 deletions.
14 changes: 7 additions & 7 deletions BVESingleGaussianVortex.f90
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ program BVEGaussVort
!
! build new mesh
!
if (remeshCounter <= 1 ) then
if (remeshCounter < resetAlpha ) then
call LagrangianRemesh(sphere, SetSingleGaussianVortexOnMesh, gaussVort, vortRefine, &
SetCosineBellTracerOnMesh, cosBell, tracerRefine, &
flowMapRefine)
Expand Down Expand Up @@ -317,9 +317,9 @@ program BVEGaussVort
! advance timestep
!
call BVERK4Timestep(bveRK4, sphere, dt, procRank, numProcs)
if ( timeJ == 0 ) totalKE(0) = sphere%totalKE
totalKE(timeJ+1) = sphere%totalKE

if ( timeJ == 0 ) totalKE(0) = sphere%totalE
totalKE(timeJ+1) = sphere%totalE
totalEns(timeJ+1) = TotalEnstrophy(sphere)
massIntegral(timeJ+1) = TotalMass(sphere,1)

Expand Down Expand Up @@ -350,10 +350,10 @@ program BVEGaussVort
write(WRITE_UNIT_1,'(3A24)') 'totalMass', 'totalKE', 'totalEns'
do j = 0, timesteps
write(WRITE_UNIT_1,'(E24.8,E24.8, E24.8)') massIntegral(j), totalKE(j), totalEns(j)
enddo
enddo
endif
close(WRITE_UNIT_1)

call New(writer,WRITE_UNIT_2,summaryFile)
call StartSection(writer,'JOB SUMMARY :',' SINGLE GAUSSIAN VORTEX')
call Write(writer,'tfinal = ',tfinal)
Expand All @@ -372,7 +372,7 @@ program BVEGaussVort
else
call Write(writer,'uniformMesh, initNest = ', initNest)
endif

call Delete(writer)
endif
! TO DO : output final data
Expand Down
2 changes: 1 addition & 1 deletion Edges.f90
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ subroutine LogEdgesStats(self,aLog,message)
lmax = maxval(self%length0(1:self%N))
lmin = lmax
do j=1,self%N
if ( .NOT. self%hasChildren(j)l .AND. self%length(j) < lmin) lmin = self%length0(j)
if ( .NOT. self%hasChildren(j) .AND. self%length(j) < lmin) lmin = self%length0(j)
enddo

key = 'Max init length = '
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ else ifeq ($(MACHINE),'TANK')
#--------------#
# TANK DESKTOP #
FF=ifort
#FF_FLAGS=-g -traceback -warn all -debug extended -check bounds -check pointers -check uninit -traceback
FF_FLAGS=-O2 -warn all -opt-report 1
FF_FLAGS=-g -traceback -warn all -debug extended -check bounds -check pointers -check uninit -traceback
#FF_FLAGS=-O2 -warn all -opt-report 1
VTK_INCLUDE=/usr/local/include/vtk-5.10
VTK_LIB_DIR=/usr/local/lib/vtk-5.10
VTK_LIBS=-lvtkCommon -lvtkGraphics -lvtkRendering -lvtkViews -lvtkWidgets -lvtkImaging -lvtkHybrid -lvtkIO -lvtkFiltering
Expand Down
14 changes: 7 additions & 7 deletions RH4Wave.namelist
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
& sphereDefine
panelKind = 4
initNest = 5
AMR = 0
AMR = 2
refinementLimit = 4
circMaxTol = 0.08
vortVarTol = 0.4
lagVarTol = 1.0
circMaxTol = 1.2
vortVarTol = 1.2
lagVarTol = 1.2
/

& vorticityDefine
Expand All @@ -14,15 +14,15 @@
/

& timeStepping
tfinal = 14.0 ! days (test case 6 tfinal = 14)
dt = 0.01 ! days
tfinal = 4.0 ! days (test case 6 tfinal = 14)
dt = 0.002 ! days
remeshInterval = 10 ! timesteps
resetAlpha = 4 ! remeshings
/

& fileIO
outputDir = '/Users/pbosler/Desktop/modelData/'
jobPrefix = 'rhWave_1dayTest_'
jobPrefix = 'rhWave_resetAlphaTest_'
frameOut = 4
nLon = 360
outputContours = 0
Expand Down
52 changes: 26 additions & 26 deletions ReferenceSphere.f90
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
call FlagPanelsForTracerVariationRefinement(refineFlag,newMesh,tracerRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'InitRefine : ',logString)
write(logString,formatString) 'tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineVort) then
limit = max(limit,vortRefine%limit)
Expand All @@ -267,19 +267,19 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
call FlagPanelsForRelVortVariationRefinement(refineFlag,newMesh,vortRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'InitRefine : ',logString)
write(logString,formatString) 'relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineFlowMap ) then
limit = max(limit,flowMapRefine%limit)
counter1 = count(refineFlag)
call FlagPanelsForFlowMapRefinement(refineFlag,newMesh,flowMapRefine,startIndex)
counter1 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif

refineCount = count(refineFlag)
Expand All @@ -289,10 +289,10 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
! exit if refinement is not needed, or insufficient memory
!
if ( refineCount == 0 ) then
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh : ',' no refinement necessary.')
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,'LagRemesh : no refinement necessary.')
keepGoing = .FALSE.
elseif ( spaceLeft/4 < refineCount ) then
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh : ','insufficient memory for AMR.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh : insufficient memory for AMR.')
keepGoing = .FALSE.
else
keepGoing = .TRUE.
Expand All @@ -304,7 +304,7 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
amrLoopCounter = amrLoopCounter + 1

write(logString,'(A,I3,A,I8,A)') 'AMR loop ',amrLoopCounter,' : refining ',refineCount,' panels.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
!
! divide flagged panels
!
Expand Down Expand Up @@ -368,7 +368,7 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
!
if ( amrLoopCounter >= limit ) then
keepGoing = .FALSE.
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh WARNING :',' refinement limit reached.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh WARNING : refinement limit reached.')
endif

!
Expand All @@ -383,10 +383,10 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
call FlagPanelsForTracerVariationRefinement(refineFlag,newMesh,tracerRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineVort) then
limit = max(limit,vortRefine%limit)
Expand All @@ -396,19 +396,19 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
call FlagPanelsForRelVortVariationRefinement(refineFlag,newMesh,vortRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineFlowMap ) then
limit = max(limit,flowMapRefine%limit)
counter1 = count(refineFlag)
call FlagPanelsForFlowMapRefinement(refineFlag,newMesh,flowMapRefine,startIndex)
counter1 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif

refineCount = count(refineFlag)
Expand All @@ -418,10 +418,10 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
! exit if refinement is not needed, or insufficient memory
!
if ( refineCount == 0 ) then
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh : ','refinement comverged.')
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,'LagRemesh : refinement comverged.')
keepGoing = .FALSE.
elseif ( spaceLeft/4 < refineCount ) then
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh : WARNING ','insufficient memory to continue AMR.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh : WARNING insufficient memory to continue AMR.')
keepGoing = .FALSE.
else
keepGoing = .TRUE.
Expand Down
55 changes: 28 additions & 27 deletions RefineRemesh2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ subroutine InitialRefinement(aMesh, refineTracer, updateTracerOnMesh, tracerDef,
counter1 = count(refineFlag)
call FlagPanelsForCirculationRefinement(refineFlag,aMesh,refineRelVort,startIndex)
counter1 = count(refineFlag) - counter1
counter2 = count(refineFlag)
call FlagPanelsForRelVortVariationRefinement(refineFlag,aMesh,refineRelVort,startIndex)
counter2 = count(refineFlag) - counter2
write(formatString,'(A)') '(A,I8,A)'
Expand Down Expand Up @@ -455,10 +456,10 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
call FlagPanelsForTracerVariationRefinement(refineFlag,newMesh,tracerRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'InitRefine : ',logString)
write(logString,formatString) 'tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineVort) then
limit = max(limit,vortRefine%limit)
Expand All @@ -468,19 +469,19 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
call FlagPanelsForRelVortVariationRefinement(refineFlag,newMesh,vortRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'InitRefine : ',logString)
write(logString,formatString) 'relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineFlowMap ) then
limit = max(limit,flowMapRefine%limit)
counter1 = count(refineFlag)
call FlagPanelsForFlowMapRefinement(refineFlag,newMesh,flowMapRefine,startIndex)
counter1 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif

refineCount = count(refineFlag)
Expand All @@ -490,10 +491,10 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
! exit if refinement is not needed, or insufficient memory
!
if ( refineCount == 0 ) then
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh : ',' no refinement necessary.')
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,'LagRemesh : no refinement necessary.')
keepGoing = .FALSE.
elseif ( spaceLeft/4 < refineCount ) then
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh : ','insufficient memory for AMR.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh : insufficient memory for AMR.')
keepGoing = .FALSE.
else
keepGoing = .TRUE.
Expand All @@ -504,8 +505,8 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
do while (keepGoing)
amrLoopCounter = amrLoopCounter + 1

write(logString,'(A,I3,A,I8,A)') 'AMR loop ',amrLoopCounter,' : refining ',refineCount,' panels.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,'(A,I3,A,I8,A)') 'LagRemesh loop ',amrLoopCounter,' : refining ',refineCount,' panels.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
!
! divide flagged panels
!
Expand Down Expand Up @@ -549,7 +550,7 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
!
if ( amrLoopCounter >= limit ) then
keepGoing = .FALSE.
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh WARNING :',' refinement limit reached.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh WARNING : refinement limit reached.')
endif

!
Expand All @@ -564,10 +565,10 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
call FlagPanelsForTracerVariationRefinement(refineFlag,newMesh,tracerRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR :tracerMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : tracerVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineVort) then
limit = max(limit,vortRefine%limit)
Expand All @@ -577,19 +578,19 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
call FlagPanelsForRelVortVariationRefinement(refineFlag,newMesh,vortRefine,startIndex)
counter2 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : circMax criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
write(logString,formatString) 'LagRemesh AMR : relVortVar criterion triggered ', counter2, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif
if ( refineFlowMap ) then
limit = max(limit,flowMapRefine%limit)
counter1 = count(refineFlag)
call FlagPanelsForFlowMapRefinement(refineFlag,newMesh,flowMapRefine,startIndex)
counter1 = count(refineFlag) - counter1
write(formatString,'(A)') '(A,I8,A)'
write(logString,formatString) 'flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh AMR : ',logString)
write(logString,formatString) 'LagRemesh AMR : flowMap variation criterion triggered ', counter1, ' times.'
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,logString)
endif

refineCount = count(refineFlag)
Expand All @@ -599,10 +600,10 @@ subroutine LagrangianRemeshPrivate(aMesh, setVorticity, vortDef, vortRefine, &
! exit if refinement is not needed, or insufficient memory
!
if ( refineCount == 0 ) then
call LogMessage(log,TRACE_LOGGING_LEVEL,'LagRemesh : ','refinement comverged.')
call LogMessage(log,TRACE_LOGGING_LEVEL,logkey,'LagRemesh : refinement comverged.')
keepGoing = .FALSE.
elseif ( spaceLeft/4 < refineCount ) then
call LogMessage(log,WARNING_LOGGING_LEVEL,'LagRemesh : WARNING ','insufficient memory to continue AMR.')
call LogMessage(log,WARNING_LOGGING_LEVEL,logkey,'LagRemesh : WARNING insufficient memory to continue AMR.')
keepGoing = .FALSE.
else
keepGoing = .TRUE.
Expand Down
6 changes: 3 additions & 3 deletions gaussianVortex.namelist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
& sphereDefine
panelKind = 4
AMR = 0
AMR = 3
initNest = 5
tracerMaxTol = 100000.0
tracerVarTol = 100000.0
Expand All @@ -19,8 +19,8 @@

& timeStepping
tfinal = 1.0 ! days
dt = 0.01 ! days
remeshInterval = 20 ! timesteps
dt = 0.002 ! days
remeshInterval = 5 ! timesteps
resetAlpha = 2 ! remeshings
/

Expand Down

0 comments on commit dd6a809

Please sign in to comment.