Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pFoF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roy Fabrice
pFoF
Commits
41362c10
Commit
41362c10
authored
5 years ago
by
Roy Fabrice
Browse files
Options
Downloads
Patches
Plain Diff
add write procedure
parent
40f840bc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
amr2cube/src/cell_m.f90
+52
-0
52 additions, 0 deletions
amr2cube/src/cell_m.f90
with
52 additions
and
0 deletions
amr2cube/src/cell_m.f90
+
52
−
0
View file @
41362c10
...
...
@@ -57,6 +57,7 @@ module cell_m
procedure
::
Is_eq
procedure
::
Is_sup
procedure
::
Print
=>
Print_cell
procedure
::
Write
=>
Write_hdf5_cell
end
type
cell_t
contains
...
...
@@ -260,4 +261,55 @@ contains
end
subroutine
Print_cell
!------------------------------------------------------------------------------------------------------------------------------------
subroutine
Write_hdf5_cell
(
this
,
hdf5_id
)
use
char_utils_m
,
only
:
Int_to_char12
,
Int_to_char5
use
fortran_hdf5_constants_m
use
fortran_hdf5_manage_groups_m
use
fortran_hdf5_write_attribute_m
use
fortran_hdf5_write_data_m
use
hdf5
class
(
cell_t
(
*
,
*
)),
intent
(
in
)
::
this
integer
(
kind
=
hid_t
),
intent
(
in
)
::
hdf5_id
character
(
len
=
H5_STR_LEN
)
::
attr_name
character
(
len
=
H5_STR_LEN
)
::
groupname
integer
(
kind
=
hid_t
)
::
cell_gr_id
integer
::
idim
#ifdef DEBUG
write
(
ERROR_UNIT
,
'(a,i0)'
)
'Write_hdf5_cell begins on process'
,
mpi_process
%
rank
#endif
attr_name
=
'identity'
call
Hdf5_Write_data
(
hdf5_id
,
attr_name
,
this
%
identity
)
attr_name
=
'level'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
this
%
level
)
attr_name
=
'position'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
3
,
this
%
position
)
attr_name
=
'velocity field'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
3
,
this
%
velocity_field
)
attr_name
=
'density'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
this
%
density
)
attr_name
=
'thermal pressure'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
this
%
thermal_pressure
)
if
(
this
%
n_non_thermal_pressures
/
=
0
)
then
attr_name
=
'non thermal pressures'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
this
%
n_non_thermal_pressures
,
this
%
non_thermal_pressures
)
end
if
if
(
this
%
n_passive_scalars
/
=
0
)
then
attr_name
=
'passive scalars'
call
Hdf5_Write_attr
(
hdf5_id
,
attr_name
,
this
%
n_passive_scalars
,
this
%
passive_scalars
)
end
if
#ifdef DEBUG
write
(
ERROR_UNIT
,
'(a,i0)'
)
'Write_hdf5_cell ends on process'
,
mpi_process
%
rank
#endif
end
subroutine
Write_hdf5_cell
end
module
cell_m
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment