FE-Project
Loading...
Searching...
No Matches
scale_model_mesh_manager.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> FElib / model framework / mesh manager
3!!
4!! @par Description
5!! A module for managing mesh used in models
6!!
7!! @author Yuta Kawai, Team SCALE
8!!
9!<
10!-------------------------------------------------------------------------------
11#include "scaleFElib.h"
13 !-----------------------------------------------------------------------------
14 !
15 !++ Used modules
16 !
17 use scale_precision
18 use scale_io
19 use scale_prc, only: &
20 prc_abort
21
22 use scale_mesh_base, only: meshbase
27
28 use scale_sparsemat, only: sparsemat
29
33
35
36 !-----------------------------------------------------------------------------
37 implicit none
38 private
39
40 !-----------------------------------------------------------------------------
41 !
42 !++ Public type & procedures
43 !
44
45 type, extends(modelmeshbase1d), public :: modelmesh1d
46 contains
47 procedure, public :: modelmesh1d_init
48 procedure, public :: modelmesh1d_final
49 end type modelmesh1d
50
51 type, extends(modelmeshbase2d), public :: modelmesh2d
52 contains
53 procedure, public :: modelmesh2d_init
54 procedure, public :: modelmesh2d_final
55 end type modelmesh2d
56
57 type, abstract, extends(modelmeshbase3d), public :: modelmesh3d
58 contains
59 procedure, public :: modelmesh3d_init
60 procedure, public :: modelmesh3d_final
61 procedure(modelmesh3d_create_communicator), public, deferred :: create_communicator
62 end type modelmesh3d
63
64 interface
65 subroutine modelmesh3d_create_communicator( this, sfield_num, hvfield_num, htensorfield_num, &
66 var_manager, field_list, commid, &
67 field_list_is, field_list_ie )
68 import modelmesh3d
69 import meshbase3d
70 import modelvarmanager
71 import meshfield3d
72 class(modelmesh3d), target, intent(inout) :: this
73 integer, intent(in) :: sfield_num
74 integer, intent(in) :: hvfield_num
75 integer, intent(in) :: htensorfield_num
76 class(modelvarmanager), intent(inout) :: var_manager
77 class(meshfield3d), intent(in) :: field_list(:)
78 integer, intent(out) :: commid
79 integer, intent(in), optional :: field_list_is
80 integer, intent(in), optional :: field_list_ie
82 end interface
83
84 ! Cascade
85 public :: modelmeshbase
86
87 !-----------------------------------------------------------------------------
88 !
89 !++ Public parameters & variables
90 !
91
92 !-----------------------------------------------------------------------------
93 !
94 !++ Private procedures & variables
95 !
96 !------------------
97
98contains
99
100 !* 1D *************************************************************
101
102!OCL SERIAL
103 subroutine modelmesh1d_init( this, mesh )
104 implicit none
105 class(modelmesh1d), target, intent(inout) :: this
106 class(meshbase1d), target, intent(in) :: mesh
107 !-----------------------------------------------------
108
109 call this%ModelMeshBase1D_Init(mesh)
110
111 return
112 end subroutine modelmesh1d_init
113
114!OCL SERIAL
115 subroutine modelmesh1d_final( this )
116 implicit none
117 class(modelmesh1d), target, intent(inout) :: this
118
119 !-----------------------------------------------------
120
121 call this%ModelMeshBase1D_Final()
122
123 return
124 end subroutine modelmesh1d_final
125
126 !* 2D *************************************************************
127
128!OCL SERIAL
129 subroutine modelmesh2d_init( this, mesh )
130 implicit none
131 class(modelmesh2d), target, intent(inout) :: this
132 class(meshbase2d), target, intent(in) :: mesh
133 !-----------------------------------------------------
134
135 call this%ModelMeshBase2D_Init(mesh)
136
137 return
138 end subroutine modelmesh2d_init
139
140!OCL SERIAL
141 subroutine modelmesh2d_final( this )
142 implicit none
143 class(modelmesh2d), target, intent(inout) :: this
144 !-----------------------------------------------------
145
146 call this%ModelMeshBase2D_Final()
147
148 return
149 end subroutine modelmesh2d_final
150
151 !* 3D *************************************************************
152
153!OCL SERIAL
154 subroutine modelmesh3d_init( this, mesh )
155 implicit none
156 class(modelmesh3d), target, intent(inout) :: this
157 class(meshbase3d), target, intent(in) :: mesh
158 !-----------------------------------------------------
159
160 this%ptr_mesh => mesh
161 call this%ModelMeshBase3D_Init(mesh)
162
163 return
164 end subroutine modelmesh3d_init
165
166!OCL SERIAL
167 subroutine modelmesh3d_final( this )
168 implicit none
169 class(modelmesh3d), target, intent(inout) :: this
170 !-----------------------------------------------------
171
172 nullify( this%ptr_mesh )
173 call this%ModelMeshBase3D_Final()
174
175 return
176 end subroutine modelmesh3d_final
177
module FElib / Mesh / Base 1D
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
module FElib / Mesh / Base
module FElib / Data / base
FElib / model framework / mesh manager.
FElib / model framework / mesh manager (base)
FElib / model framework / variable manager.
Module common / sparsemat.
Derived type to manage a computational mesh (base type for 1D domain)
Derived type to manage a computational mesh (base type for 2D domain)
Derived type to manage a computational mesh (base type for 3D domain)
Base type to manage a computational mesh.
Derived type representing a field with 3D mesh.
Derived type to manage 1D mesh and spatial operators.
Derived type to manage 2D mesh and spatial operators.
Derived type to manage 3D mesh and spatial operators.
Derived type to manage model mesh and spatial operators (base type)
Derived type to manage a sparse matrix.