ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
actuatorRegion_b.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 reverse (adjoint) mode (with options noisize i4 dr8 r8):
12 ! gradient of useful results: *vol actuatorregions.vollocal
13 ! with respect to varying inputs: *vol actuatorregions.vollocal
14 ! rw status of diff variables: *vol:incr actuatorregions.vollocal:in-out
15 ! plus diff mem management of: vol:in
16  subroutine computeactuatorregionvolume_b(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  do iii=actuatorregions(iregion)%blkptr(nn),actuatorregions(iregion)%&
25 & blkptr(nn-1)+1,-1
26  i = actuatorregions(iregion)%cellids(1, iii)
27  j = actuatorregions(iregion)%cellids(2, iii)
28  k = actuatorregions(iregion)%cellids(3, iii)
29  vold(i, j, k) = vold(i, j, k) + actuatorregionsd(iregion)%vollocal
30  end do
31  end subroutine computeactuatorregionvolume_b
32 
33  subroutine computeactuatorregionvolume(nn, iregion)
34  use blockpointers, only : ndom, vol
35  implicit none
36 ! inputs
37  integer(kind=inttype), intent(in) :: nn, iregion
38 ! working
39  integer(kind=inttype) :: iii
40  integer(kind=inttype) :: i, j, k
41 ! loop over the region for this block
42  do iii=actuatorregions(iregion)%blkptr(nn-1)+1,actuatorregions(&
43 & iregion)%blkptr(nn)
44  i = actuatorregions(iregion)%cellids(1, iii)
45  j = actuatorregions(iregion)%cellids(2, iii)
46  k = actuatorregions(iregion)%cellids(3, iii)
47 ! sum the volume of each cell within the region on this proc
48  actuatorregions(iregion)%vollocal = actuatorregions(iregion)%&
49 & vollocal + vol(i, j, k)
50  end do
51  end subroutine computeactuatorregionvolume
52 ! ----------------------------------------------------------------------
53 ! |
54 ! no tapenade routine below this line |
55 ! |
56 ! ----------------------------------------------------------------------
57 
58 end module actuatorregion_b
59 
subroutine computeactuatorregionvolume(nn, iregion)
subroutine computeactuatorregionvolume_b(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