-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alternative approach for case support.
- Loading branch information
Showing
4 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module m_case_tgv | ||
use iso_fortran_env, only: stderr => error_unit | ||
use mpi | ||
|
||
use m_allocator, only: allocator_t, field_t | ||
use m_base_backend, only: base_backend_t | ||
use m_common, only: dp | ||
use m_mesh, only: mesh_t | ||
use m_solver, only: solver_t, init | ||
use m_tdsops, only: tdsops_t, dirps_t | ||
use m_time_integrator, only: time_intg_t | ||
use m_vector_calculus, only: vector_calculus_t | ||
|
||
implicit none | ||
|
||
type, extends(solver_t) :: case_tgv_t | ||
contains | ||
procedure :: post_transeq => post_transeq_tgv | ||
end type case_tgv_t | ||
|
||
interface case_tgv_t | ||
module procedure case_tgv_init | ||
end interface case_tgv_t | ||
|
||
contains | ||
|
||
|
||
function case_tgv_init(backend, mesh, host_allocator) result(solver) | ||
implicit none | ||
|
||
class(base_backend_t), target, intent(inout) :: backend | ||
type(mesh_t), target, intent(inout) :: mesh | ||
type(allocator_t), target, intent(inout) :: host_allocator | ||
type(case_tgv_t) :: solver | ||
|
||
solver%solver_t = init(backend, mesh, host_allocator) | ||
end function case_tgv_init | ||
|
||
subroutine post_transeq_tgv(self, du, dv, dw) | ||
implicit none | ||
|
||
class(case_tgv_t) :: self | ||
class(field_t), intent(inout) :: du, dv, dw | ||
|
||
! first call the parent class | ||
call self%solver_t%post_transeq(du, dv, dw) | ||
|
||
print *, 'post_transeq for the tgv case' | ||
end subroutine post_transeq_tgv | ||
|
||
end module m_case_tgv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters