FE-Project
Loading...
Searching...
No Matches
scale_localmesh_1d.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module FElib / Mesh / Local 1D
3!!
4!! @par Description
5!! Module to manage 1D local mesh for element-based methods
6!!
7!! @author Yuta Kawai, Team SCALE
8!<
9#include "scaleFElib.h"
11
12 !-----------------------------------------------------------------------------
13 !
14 !++ used modules
15 !
16 use scale_precision
17 use scale_localmesh_base, only: &
20
21 !-----------------------------------------------------------------------------
22 implicit none
23 private
24
25 !-----------------------------------------------------------------------------
26 !
27 !++ Public type & procedure
28 !
29 !> Derived type representing a local mesh for 1D domain
30 type, extends(localmeshbase), public :: localmesh1d
31 type(elementbase1d), pointer :: refelem1d !< Pointer to the reference element for 1D
32 real(rp) :: xmin !< Minimum x-coordinate of the local mesh
33 real(rp) :: xmax !< Maximum x-coordinate of the local mesh
34 end type localmesh1d
35
37
38 !-----------------------------------------------------------------------------
39 !
40 !++ Public parameters & variables
41 !
42
43 !-----------------------------------------------------------------------------
44 !
45 !++ Private procedure
46 !
47
48 !-----------------------------------------------------------------------------
49 !
50 !++ Private parameters & variables
51 !
52
53contains
54 !> Initialize an object to manage a local mesh for 1D domain
55!OCL SERIAL
56 subroutine localmesh1d_init( this, &
57 lcdomID, refElem, myrank )
58
59 implicit none
60
61 type(localmesh1d), intent(inout) :: this
62 integer, intent(in) :: lcdomid
63 class(elementbase1d), intent(in), target :: refelem
64 integer, intent(in), optional :: myrank
65 !-------------------------------------------------
66
67 this%refElem1D => refelem
68 call localmeshbase_init(this, lcdomid, refelem, 1, myrank)
69 !$acc enter data copyin(this)
70 return
71 end subroutine localmesh1d_init
72
73 !> Finalize an object to manage a local mesh for 1D domain
74!OCL SERIAL
75 subroutine localmesh1d_final( this, is_generated )
76 implicit none
77
78 type(localmesh1d), intent(inout) :: this
79 logical, intent(in) :: is_generated
80 !-------------------------------------------------
81
82 call localmeshbase_final( this, is_generated )
83 !$acc exit data delete(this)
84 return
85 end subroutine localmesh1d_final
86
87end module scale_localmesh_1d
module FElib / Element / Base
module FElib / Mesh / Local 1D
subroutine, public localmesh1d_final(this, is_generated)
Finalize an object to manage a local mesh for 1D domain.
subroutine, public localmesh1d_init(this, lcdomid, refelem, myrank)
Initialize an object to manage a local mesh for 1D domain.
module FElib / Mesh / Local, Base
subroutine, public localmeshbase_final(this, is_generated)
Finalize an object to manage a local computational mesh.
subroutine, public localmeshbase_init(this, lcdomid, refelem, ndim, myrank)
Setup an object to manage a local computational mesh.
Derived type representing a 1D reference element.
Derived type representing an arbitrary finite element.
Derived type representing a local mesh for 1D domain.
Derived type to manage a local computational domain (base type)