2D AMRCLAW
Data Types | Functions/Subroutines | Variables
regions_module Module Reference

Data Types

type  region_type
 

Functions/Subroutines

subroutine set_regions (fname)
 

Variables

logical, private module_setup
 
integer num_regions
 
type(region_type), dimension(:), allocatable regions
 

Function/Subroutine Documentation

◆ set_regions()

subroutine regions_module::set_regions ( character(len=*), intent(in), optional  fname)

Definition at line 25 of file regions_module.f90.

References module_setup, num_regions, opendatafile(), amr_module::parmunit, and regions.

Referenced by amr2().

25 
26  use amr_module
27 
28  implicit none
29 
30  ! Function Arguments
31  character(len=*), optional, intent(in) :: fname
32 
33  ! Locals
34  integer, parameter :: unit = 7
35  integer :: i
36 
37  if (.not. module_setup) then
38 
39  write(parmunit,*) ' '
40  write(parmunit,*) '--------------------------------------------'
41  write(parmunit,*) 'REGIONS:'
42  write(parmunit,*) '-----------'
43 
44  if (present(fname)) then
45  call opendatafile(unit,fname)
46  else
47  call opendatafile(unit,'regions.data')
48  endif
49 
50  read(unit,"(i2)") num_regions
51  if (num_regions == 0) then
52  write(parmunit,*) ' No regions specified for refinement'
53 
54  else
55  ! Refinement region data
56  allocate(regions(num_regions))
57  do i=1,num_regions
58  read(unit,*) regions(i)%min_level, regions(i)%max_level, &
59  regions(i)%t_low, regions(i)%t_hi, &
60  regions(i)%x_low, regions(i)%x_hi, &
61  regions(i)%y_low, regions(i)%y_hi
62  enddo
63  endif
64  close(unit)
65 
66  module_setup = .true.
67  end if
68 
type(region_type), dimension(:), allocatable regions
integer, parameter parmunit
Definition: amr_module.f90:287
subroutine opendatafile(iunit, fname)
Definition: opendatafile.f:3
logical, private module_setup
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ module_setup

logical, private regions_module::module_setup
private

Definition at line 17 of file regions_module.f90.

Referenced by set_regions().

17  logical, private :: module_setup
logical, private module_setup

◆ num_regions

integer regions_module::num_regions

Definition at line 19 of file regions_module.f90.

Referenced by flagregions(), flagregions2(), and set_regions().

19  integer :: num_regions

◆ regions

type(region_type), dimension(:), allocatable regions_module::regions

Definition at line 20 of file regions_module.f90.

Referenced by flagregions(), flagregions2(), and set_regions().

20  type(region_type), allocatable :: regions(:)
type(region_type), dimension(:), allocatable regions