MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
SubcellTri.f90
Go to the documentation of this file.
2 
3  use subcellmodule, only: subcelltype
4  implicit none
5 
6  private
7  public :: subcelltritype
8  public :: create_subcell_tri
9 
10  type, extends(subcelltype) :: subcelltritype
11  private
12  double precision, public :: x0, y0, x1, y1, x2, y2 !< subcell corner coordinates
13  double precision, public :: v0x, v0y, v1x, v1y, v2x, v2y !< subcell corner velocities
14  double precision, public :: ztop, zbot !< subcell top and bottom elevations
15  double precision, public :: dz !< subcell thickness
16  double precision, public :: vztop, vzbot !< subcell top and bottom velocities
17  contains
18  procedure, public :: destroy => destroy_subcell_tri !< destructor for the subcell
19  procedure, public :: init => init_subcell_tri !< initializes the triangular subcell
20  end type subcelltritype
21 
22 contains
23 
24  !> @brief Create a new triangular subcell
25  subroutine create_subcell_tri(subcell)
26  type(subcelltritype), pointer :: subcell
27  allocate (subcell)
28  allocate (subcell%type)
29  subcell%type = 'subcelltri'
30  end subroutine create_subcell_tri
31 
32  !> @brief Destructor for a triangular subcell
33  subroutine destroy_subcell_tri(this)
34  class(subcelltritype), intent(inout) :: this
35  deallocate (this%type)
36  end subroutine destroy_subcell_tri
37 
38  !> @brief Initialize a triangular subcell
39  subroutine init_subcell_tri(this)
40  class(subcelltritype), intent(inout) :: this
41  end subroutine init_subcell_tri
42 
43 end module subcelltrimodule
subroutine init_subcell_tri(this)
Initialize a triangular subcell.
Definition: SubcellTri.f90:40
subroutine destroy_subcell_tri(this)
Destructor for a triangular subcell.
Definition: SubcellTri.f90:34
subroutine, public create_subcell_tri(subcell)
Create a new triangular subcell.
Definition: SubcellTri.f90:26
A subcell of a cell.
Definition: Subcell.f90:9