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, var_manager, field_list, commid )
66 import modelmesh3d
67 import meshbase3d
68 import modelvarmanager
69 import meshfield3d
70 class(modelmesh3d), target, intent(inout) :: this
71 integer, intent(in) :: sfield_num
72 integer, intent(in) :: hvfield_num
73 integer, intent(in) :: htensorfield_num
74 class(modelvarmanager), intent(inout) :: var_manager
75 class(meshfield3d), intent(in) :: field_list(:)
76 integer, intent(out) :: commid
78 end interface
79
80 ! Cascade
81 public :: modelmeshbase
82
83 !-----------------------------------------------------------------------------
84 !
85 !++ Public parameters & variables
86 !
87
88 !-----------------------------------------------------------------------------
89 !
90 !++ Private procedures & variables
91 !
92 !------------------
93
94contains
95
96 !* 1D *************************************************************
97
98!OCL SERIAL
99 subroutine modelmesh1d_init( this, mesh )
100 implicit none
101 class(modelmesh1d), target, intent(inout) :: this
102 class(meshbase1d), target, intent(in) :: mesh
103 !-----------------------------------------------------
104
105 call this%ModelMeshBase1D_Init(mesh)
106
107 return
108 end subroutine modelmesh1d_init
109
110!OCL SERIAL
111 subroutine modelmesh1d_final( this )
112 implicit none
113 class(modelmesh1d), target, intent(inout) :: this
114
115 !-----------------------------------------------------
116
117 call this%ModelMeshBase1D_Final()
118
119 return
120 end subroutine modelmesh1d_final
121
122 !* 2D *************************************************************
123
124!OCL SERIAL
125 subroutine modelmesh2d_init( this, mesh )
126 implicit none
127 class(modelmesh2d), target, intent(inout) :: this
128 class(meshbase2d), target, intent(in) :: mesh
129 !-----------------------------------------------------
130
131 call this%ModelMeshBase2D_Init(mesh)
132
133 return
134 end subroutine modelmesh2d_init
135
136!OCL SERIAL
137 subroutine modelmesh2d_final( this )
138 implicit none
139 class(modelmesh2d), target, intent(inout) :: this
140 !-----------------------------------------------------
141
142 call this%ModelMeshBase2D_Final()
143
144 return
145 end subroutine modelmesh2d_final
146
147 !* 3D *************************************************************
148
149!OCL SERIAL
150 subroutine modelmesh3d_init( this, mesh )
151 implicit none
152 class(modelmesh3d), target, intent(inout) :: this
153 class(meshbase3d), target, intent(in) :: mesh
154 !-----------------------------------------------------
155
156 this%ptr_mesh => mesh
157 call this%ModelMeshBase3D_Init(mesh)
158
159 return
160 end subroutine modelmesh3d_init
161
162!OCL SERIAL
163 subroutine modelmesh3d_final( this )
164 implicit none
165 class(modelmesh3d), target, intent(inout) :: this
166 !-----------------------------------------------------
167
168 nullify( this%ptr_mesh )
169 call this%ModelMeshBase3D_Final()
170
171 return
172 end subroutine modelmesh3d_final
173
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 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.