Skip to content

Commit

Permalink
reference sphere links, models build.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbosler committed Feb 20, 2014
1 parent 0c79ba1 commit 51aaf54
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 14 deletions.
35 changes: 25 additions & 10 deletions BVESingleGaussianVortex.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ program BVEGaussVort
use VTKOutputModule
use BVESetupModule
use BVEDirectSumModule
use ReferenceSphereModule

implicit none

Expand Down Expand Up @@ -64,6 +65,8 @@ program BVEGaussVort
! remeshing variables
!
integer(kint) :: remeshInterval, remeshCounter, resetAlpha
type(ReferenceSphere) :: refSphere
logical(klog), save :: refSphereReady = .FALSE.
!
! User input
!
Expand Down Expand Up @@ -239,16 +242,28 @@ program BVEGaussVort
!
! build new mesh
!
call LagrangianRemesh(sphere, SetSingleGaussianVortexOnMesh, gaussVort, vortRefine, &
SetCosineBellTracerOnMesh, cosBell, tracerRefine, &
flowMapRefine)
call SetInitialLatitudeTracerOnMesh(sphere,2)

if ( mod(remeshCounter,resetAlpha) == 0 ) then
call ResetLagrangianParameter(sphere)
call LogMessage(exeLog,TRACE_LOGGING_LEVEL,logkey,'RESET LAGRANGIAN PARAMETER')
if (remeshCounter <= 1 ) then
call LagrangianRemesh(sphere, SetSingleGaussianVortexOnMesh, gaussVort, vortRefine, &
SetCosineBellTracerOnMesh, cosBell, tracerRefine, &
flowMapRefine)
call SetInitialLatitudeTracerOnMesh(sphere,2)
elseif ( mod(remeshCounter,resetAlpha) == 0 ) then
if ( refSphereReady ) then
call Delete(refSphere)
refSphereReady = .FALSE.
endif
call New(refSphere,sphere)
refSphereReady = .TRUE.

call ResetLagrangianParameter(sphere)
call LagrangianRemesh(sphere,refSphere,vortRefine,tracerRefine,flowMapRefine)
call ResetLagrangianParameter(sphere)

call LogMessage(exeLog,TRACE_LOGGING_LEVEL,logkey,'RESET LAGRANGIAN PARAMETER')

else
call LagrangianRemesh(sphere,refSphere,vortRefine,tracerRefine,flowMapRefine)
endif

!
! create new associated objects
!
Expand Down Expand Up @@ -290,7 +305,7 @@ program BVEGaussVort
write(logstring,'(A, F8.2,A)') 'elapsed time = ', (MPI_WTIME() - wallClock)/60.0, ' minutes.'
call LogMessage(exelog,TRACE_LOGGING_LEVEL,'PROGRAM COMPLETE : ',trim(logstring))


if ( refSphereReady ) call Delete(refSphere)
call Delete(bveRK4)
if ( procRank == 0 ) call Delete(vtkOut)
call Delete(vortRefine)
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ testCase1MPI.exe: TestCase1.o $(ADVECTION_OBJS)
$(FF) $(FF_FLAGS) -o $@ $^ `mpif90 -showme:link` $(MKL_COMPILE)
solidBodyRotationMPI.exe: BVESolidBodyRotation.o $(BVE_OBJS)
$(FF) $(FF_FLAGS) -o $@ $^ `mpif90 -showme:link` $(MKL_COMPILE)
singleGaussianVortexMPI.exe: BVESingleGaussianVortex.o $(BVE_OBJS)
$(FF) $(FF_FLAGS) -o $@ $^ `mpif90 -showme:link` $(MKL_COMPILE)
singleGaussianVortexMPI.exe: BVESingleGaussianVortex.o $(BVE_OBJS) ReferenceSphere.o
$(FF) $(FF_FLAGS) -o $@ $^ `mpif90 -showme:link` $(MKL_COMPILE)

#############################################################
## LPPM MODEL OBJECT FILES
#############################################################
TestCase1.o: TestCase1.f90 $(ADVECTION_OBJS)
BVESolidBodyRotation.o: BVESolidBodyRotation.f90 $(BVE_OBJS)
BVESingleGaussianVortex.o: BVESingleGaussianVortex.f90 $(BVE_OBJS)
BVESingleGaussianVortex.o: BVESingleGaussianVortex.f90 $(BVE_OBJS) ReferenceSphere.o

#############################################################
## UNIT TEST EXECUTABLES
Expand Down
12 changes: 11 additions & 1 deletion ReferenceSphere.f90
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,17 @@ subroutine LagrangianRemeshPrivate(aMesh, reference, vortRefine, tracerRefine, f
enddo ! while keepgoing
deallocate(refineFlag)
endif ! AMR

!
! replace old mesh with new mesh
!
call Copy(aMesh,newMesh)

!
! clean up
!
call Delete(newMesh)
call Delete(delTri)
call Delete(lagSource)
end subroutine
!
!----------------
Expand Down
2 changes: 2 additions & 0 deletions RefineRemesh2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ module RefineRemeshModule
public InitialRefinement
public NULL_REFINE, TRACER_REFINE, RELVORT_REFINE, FLOWMAP_REFINE
public SetRelativeTracerTols, SetRelativeVorticityTols, SetRelativeFlowMapTol
public FlagPanelsForCirculationRefinement, FlagPanelsForFlowMapRefinement, FlagPanelsAtRefinementBoundaries
public FlagPanelsForRelVortVariationRefinement, FlagPanelsForTracerMaxRefinement, FlagPanelsForTracerVariationRefinement

!
!----------------
Expand Down

0 comments on commit 51aaf54

Please sign in to comment.