-
Notifications
You must be signed in to change notification settings - Fork 14
/
QUADTREE_BASED.f90
73 lines (57 loc) · 2.74 KB
/
QUADTREE_BASED.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
! QUADTREE_BASED.f90
!
! FUNCTIONS:
! QUADTREE_BASED - Entry point of console application.
!
!*************************************************************************************************
!
! PROGRAM: QUADTREE_BASED
!
! PURPOSE: Entry point for the console application.
!
!*************************************************************************************************
!=================================================================================================
!> CARTESIAN QUADTREE ADAPTIVE MESH REFINEMENT LIBRARY
!> AUTHOR: VAN-DAT THANG
!> E-MAIL: [email protected]
!> E-MAIL: [email protected]
!> SOURCE CODE LINK: https://github.com/dattv/QTAdaptive
!=================================================================================================
program QUADTREE_BASED
use MODULE_PRECISION
use MODULE_NODECOORD
use MODULE_CONSTANTS
use MODULE_GENERICMETHOD
use MODULE_MAKEGRID
use MODULE_QUADTREE
use MODULE_INITIALCONDITION
use MODULE_AMR
use MODULE_OUTPUT
implicit none
! Variables
integer(ip) :: nelm
integer(ip) :: NQ
type(quadtree), dimension(:), allocatable, target :: tree
type(quadtree), pointer :: p
! Body of QUADTREE_BASED
nelm = 900; NQ = 6
call make_grid_2d(nelm, (/zero, one/), (/zero, one/), NQ, tree)
call initial_2D_simle_check_grid(nelm, tree)
! ===> TEST ADAPTIVE MESH REFINEMENT METHOD <==================================================
call AMR_whole_domain(1, nelm, tree)
! ===> END TEST ADAPTIVE MESH REFINEMENT METHOD <==============================================
! ===> PRINT OUT INITIAL CONDITION <===========================================================
call output_2d("INITIAL.TEC", nelm, tree)
! ===> END PRINT OUT INITIAL CONDITION <=======================================================
! ===> CHANGE CFD DATA ALITTLE TO CHECK ARM FEATURE <==========================================
call loop_on_quadtree_array(1, nelm, tree, initial_2d_02_simple)
call update_back_whole_domain(1, nelm, tree)
! ===> END <===================================================================================
! ===> TEST AMR <==============================================================================
call AMR_whole_domain(1, nelm, tree)
! ===> END <===================================================================================
! ===> PRINT OUT NEW GRID <====================================================================
call output_2d("AMR_MESH.TEC", nelm, tree)
! ===> END PRINT OUT <=========================================================================
print *, 'Hello World'
end program QUADTREE_BASED