FE-Project
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
scale_file_base_meshfield Module Reference

module FElib / File / Base More...

Data Types

type  file_base_meshfield
 

Functions/Subroutines

subroutine file_base_meshfield_init (this, var_num, mesh1d, mesh2d, meshcubedsphere2d, mesh3d, meshcubedsphere3d, force_uniform_grid)
 

Detailed Description

module FElib / File / Base

Description
A base module for outputting data with MeshField type
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ file_base_meshfield_init()

subroutine scale_file_base_meshfield::file_base_meshfield_init ( class(file_base_meshfield), intent(inout) this,
integer, intent(in) var_num,
class(meshbase1d), intent(in), optional, target mesh1d,
class(meshrectdom2d), intent(in), optional, target mesh2d,
class(meshcubedspheredom2d), intent(in), optional, target meshcubedsphere2d,
class(meshcubedom3d), intent(in), optional, target mesh3d,
class(meshcubedspheredom3d), intent(in), optional, target meshcubedsphere3d,
logical, intent(in), optional force_uniform_grid )

Definition at line 133 of file scale_file_base_meshfield.F90.

139
140 use scale_file_common_meshfield, only: &
142
143 implicit none
144
145 class(FILE_base_meshfield), intent(inout) :: this
146 integer, intent(in) :: var_num
147 class(MeshBase1D), target, optional, intent(in) :: mesh1D
148 class(MeshRectDom2D), target, optional, intent(in) :: mesh2D
149 class(MeshCubedSphereDom2D), target, optional, intent(in) :: meshCubedSphere2D
150 class(MeshCubeDom3D), target, optional, intent(in) :: mesh3D
151 class(MeshCubedSphereDom3D), target, optional, intent(in) :: meshCubedSphere3D
152 logical, intent(in), optional :: force_uniform_grid
153
154 logical :: check_specify_mesh
155 !--------------------------------------------------
156
157 this%fid = -1
158
159 allocate( this%vars_ncid(var_num) )
160 this%vars_ncid(:) = -1
161
162 !-
163 check_specify_mesh = .false.
164 nullify( this%mesh1D, this%mesh2D, this%mesh3D )
165 nullify( this%meshCS2D, this%meshCS3D )
166
167 if (present(mesh1d)) then
168 this%mesh1D => mesh1d
169 check_specify_mesh = .true.
170
171 allocate( this%dimsinfo(mf1d_dtype_num) )
172 call file_common_meshfield_get_dims( mesh1d, this%dimsinfo(:) )
173 end if
174 if (present(mesh2d)) then
175 this%mesh2D => mesh2d
176 check_specify_mesh = .true.
177
178 allocate( this%dimsinfo(mf2d_dtype_num) )
179 call file_common_meshfield_get_dims( mesh2d, this%dimsinfo(:) )
180 end if
181 if (present(meshcubedsphere2d)) then
182 this%meshCS2D => meshcubedsphere2d
183 check_specify_mesh = .true.
184
185 allocate( this%dimsinfo(mf2d_dtype_num) )
186 call file_common_meshfield_get_dims( meshcubedsphere2d, this%dimsinfo(:) )
187 end if
188 if (present(mesh3d)) then
189 this%mesh3D => mesh3d
190 check_specify_mesh = .true.
191
192 allocate( this%dimsinfo(mf3d_dtype_num) )
193 call file_common_meshfield_get_dims( mesh3d, this%dimsinfo(:) )
194 end if
195 if (present(meshcubedsphere3d)) then
196 this%meshCS3D => meshcubedsphere3d
197 check_specify_mesh = .true.
198
199 allocate( this%dimsinfo(mf3d_dtype_num) )
200 call file_common_meshfield_get_dims( meshcubedsphere3d, this%dimsinfo(:) )
201 end if
202
203 if ( present(force_uniform_grid) ) then
204 this%force_uniform_grid = force_uniform_grid
205 else
206 this%force_uniform_grid = .false.
207 end if
208
209 if (.not. check_specify_mesh) then
210 log_error("FILE_base_meshfield_Init",*) 'Specify a mesh among mesh1D, 2D, and 3D. Check!'
211 call prc_abort
212 end if
213
214 !-
215 this%File_axes_written = .false.
216 this%write_buf_amount = 0
217
218 return

References scale_file_common_meshfield::file_common_meshfield_put_field1d_cartesbuf(), scale_file_common_meshfield::file_common_meshfield_put_field2d_cartesbuf(), scale_file_common_meshfield::file_common_meshfield_put_field2d_cubedsphere_cartesbuf(), scale_file_common_meshfield::file_common_meshfield_put_field3d_cartesbuf(), scale_file_common_meshfield::file_common_meshfield_put_field3d_cubedsphere_cartesbuf(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field1d(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field1d_local(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field2d(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field2d_cubedsphere(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field2d_local(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field3d(), scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field3d_cubedsphere(), and scale_file_common_meshfield::file_common_meshfield_set_cartesbuf_field3d_local().