ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
actuatorRegion_d.f90
Go to the documentation of this file.
1 ! generated by tapenade (inria, ecuador team)
2 ! tapenade 3.16 (develop) - 22 aug 2023 15:51
3 !
5  use constants
8  implicit none
9 
10 contains
11 ! differentiation of computeactuatorregionvolume in forward (tangent) mode (with options i4 dr8 r8):
12 ! variations of useful results: actuatorregions.vollocal
13 ! with respect to varying inputs: *vol actuatorregions.vollocal
14 ! rw status of diff variables: *vol:in actuatorregions.vollocal:in-out
15 ! plus diff mem management of: vol:in
16  subroutine computeactuatorregionvolume_d(nn, iregion)
17  use blockpointers, only : ndom, vol, vold
18  implicit none
19 ! inputs
20  integer(kind=inttype), intent(in) :: nn, iregion
21 ! working
22  integer(kind=inttype) :: iii
23  integer(kind=inttype) :: i, j, k
24 ! loop over the region for this block
25  do iii=actuatorregions(iregion)%blkptr(nn-1)+1,actuatorregions(&
26 & iregion)%blkptr(nn)
27  i = actuatorregions(iregion)%cellids(1, iii)
28  j = actuatorregions(iregion)%cellids(2, iii)
29  k = actuatorregions(iregion)%cellids(3, iii)
30 ! sum the volume of each cell within the region on this proc
31  actuatorregionsd(iregion)%vollocal = actuatorregionsd(iregion)%&
32 & vollocal + vold(i, j, k)
33  actuatorregions(iregion)%vollocal = actuatorregions(iregion)%&
34 & vollocal + vol(i, j, k)
35  end do
36  end subroutine computeactuatorregionvolume_d
37 
38  subroutine computeactuatorregionvolume(nn, iregion)
39  use blockpointers, only : ndom, vol
40  implicit none
41 ! inputs
42  integer(kind=inttype), intent(in) :: nn, iregion
43 ! working
44  integer(kind=inttype) :: iii
45  integer(kind=inttype) :: i, j, k
46 ! loop over the region for this block
47  do iii=actuatorregions(iregion)%blkptr(nn-1)+1,actuatorregions(&
48 & iregion)%blkptr(nn)
49  i = actuatorregions(iregion)%cellids(1, iii)
50  j = actuatorregions(iregion)%cellids(2, iii)
51  k = actuatorregions(iregion)%cellids(3, iii)
52 ! sum the volume of each cell within the region on this proc
53  actuatorregions(iregion)%vollocal = actuatorregions(iregion)%&
54 & vollocal + vol(i, j, k)
55  end do
56  end subroutine computeactuatorregionvolume
57 ! ----------------------------------------------------------------------
58 ! |
59 ! no tapenade routine below this line |
60 ! |
61 ! ----------------------------------------------------------------------
62 
63 end module actuatorregion_d
64 
subroutine computeactuatorregionvolume_d(nn, iregion)
subroutine computeactuatorregionvolume(nn, iregion)
type(actuatorregiontype), dimension(nactuatorregionsmax), target actuatorregions
type(actuatorregiontype), dimension(nactuatorregionsmax), target actuatorregionsd
real(kind=realtype), dimension(:, :, :), pointer vold
real(kind=realtype), dimension(:, :, :), pointer vol