Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
advection_adjoint.f90
Go to the documentation of this file.
1
! Copyright (c) 2021-2024, The Neko Authors
2
! All rights reserved.
3
!
4
! Redistribution and use in source and binary forms, with or without
5
! modification, are permitted provided that the following conditions
6
! are met:
7
!
8
! * Redistributions of source code must retain the above copyright
9
! notice, this list of conditions and the following disclaimer.
10
!
11
! * Redistributions in binary form must reproduce the above
12
! copyright notice, this list of conditions and the following
13
! disclaimer in the documentation and/or other materials provided
14
! with the distribution.
15
!
16
! * Neither the name of the authors nor the names of its
17
! contributors may be used to endorse or promote products derived
18
! from this software without specific prior written permission.
19
!
20
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23
! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26
! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30
! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
! POSSIBILITY OF SUCH DAMAGE.
32
!
34
module
advection_adjoint
35
use
num_types,
only
: rp
36
use
space,
only
: space_t
37
use
field,
only
: field_t
38
use
coefs,
only
: coef_t
39
implicit none
40
private
41
43
type
,
public
,
abstract
::
advection_adjoint_t
44
contains
45
procedure
(
compute_adv_lin
), pass(this),
deferred
:: compute_linear
46
procedure
(
compute_adv_lin
), pass(this),
deferred
:: compute_adjoint
47
! TODO
48
! procedure(compute_scalar_adv_lin), pass(this), deferred :: compute_scalar
49
procedure
(
advection_adjoint_free
), pass(this),
deferred
:: free
50
end type
advection_adjoint_t
51
52
! ========================================================================== !
53
! Linearized advection operator interface
54
55
abstract
interface
56
67
subroutine
compute_adv_lin
(this, vx, vy, vz, vxb, vyb, vzb, fx, fy, fz, &
68
Xh, coef, n)
69
import
::
advection_adjoint_t
70
import
:: coef_t
71
import
:: space_t
72
import
:: field_t
73
import
:: rp
74
class
(
advection_adjoint_t
),
intent(inout)
:: this
75
type
(space_t),
intent(inout)
:: Xh
76
type
(coef_t),
intent(inout)
:: coef
77
type
(field_t),
intent(inout)
:: vx, vy, vz
78
type
(field_t),
intent(inout)
:: vxb, vyb, vzb
79
type
(field_t),
intent(inout)
:: fx, fy, fz
80
integer
,
intent(in)
:: n
81
end subroutine
compute_adv_lin
82
end interface
83
84
abstract
interface
85
95
subroutine
compute_scalar_adv_lin
(this, vx, vy, vz, s, fs, Xh, coef, n)
96
import
::
advection_adjoint_t
97
import
:: coef_t
98
import
:: space_t
99
import
:: field_t
100
import
:: rp
101
class
(
advection_adjoint_t
),
intent(inout)
:: this
102
type
(field_t),
intent(inout)
:: vx, vy, vz
103
type
(field_t),
intent(inout)
:: s
104
type
(field_t),
intent(inout)
:: fs
105
type
(space_t),
intent(inout)
:: Xh
106
type
(coef_t),
intent(inout)
:: coef
107
integer
,
intent(in)
:: n
108
end subroutine
compute_scalar_adv_lin
109
end interface
110
111
abstract
interface
112
113
subroutine
advection_adjoint_free
(this)
114
import
::
advection_adjoint_t
115
class
(
advection_adjoint_t
),
intent(inout)
:: this
116
end subroutine
advection_adjoint_free
117
end interface
118
119
end module
advection_adjoint
advection_adjoint::advection_adjoint_free
Destructor.
Definition
advection_adjoint.f90:113
advection_adjoint::compute_adv_lin
Add advection operator to the right-hand-side for a fluld.
Definition
advection_adjoint.f90:67
advection_adjoint::compute_scalar_adv_lin
Add advection operator to the right-hand-side for a scalar.
Definition
advection_adjoint.f90:95
advection_adjoint
Subroutines to add advection terms to the RHS of a transport equation.
Definition
advection_adjoint.f90:34
advection_adjoint::advection_adjoint_t
Base abstract type for computing the advection operator.
Definition
advection_adjoint.f90:43
sources
adjoint
advection_adjoint.f90
Generated by
1.9.8