Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
adjoint_pnpn_res_fctry.f90
1
36submodule(adjoint_pnpn_residual) adjoint_pnpn_res_fctry
37 use neko_config, only : neko_bcknd_device, neko_bcknd_sx
42 use utils, only: neko_error
43 implicit none
44
45contains
46
51 module subroutine adjoint_pnpn_prs_res_factory(object)
52 class(adjoint_pnpn_prs_res_t), allocatable, intent(inout) :: object
53
54 if (allocated(object)) then
55 deallocate(object)
56 end if
57
58
59 if (neko_bcknd_sx .eq. 1) then
60 call neko_error("not implemented")
61 else if (neko_bcknd_device .eq. 1) then
62 allocate(adjoint_pnpn_prs_res_device_t::object)
63 else
64 allocate(adjoint_pnpn_prs_res_cpu_t::object)
65 end if
66
67 end subroutine adjoint_pnpn_prs_res_factory
68
73 module subroutine adjoint_pnpn_vel_res_factory(object)
74 class(adjoint_pnpn_vel_res_t), allocatable, intent(inout) :: object
75
76 if (allocated(object)) then
77 deallocate(object)
78 end if
79
80 if (neko_bcknd_sx .eq. 1) then
81 call neko_error("not implemented")
82 else if (neko_bcknd_device .eq. 1) then
83 allocate(adjoint_pnpn_vel_res_device_t::object)
84 else
85 allocate(adjoint_pnpn_vel_res_cpu_t::object)
86 end if
87
88 end subroutine adjoint_pnpn_vel_res_factory
89
90end submodule adjoint_pnpn_res_fctry
Residuals in the Pn-Pn formulation (CPU version)
Residuals in the Pn-Pn formulation (device backend)