A routine to dump global informations into the mesh header in lua format
Provide a version string, for the file format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_global_type), | intent(in) | :: | me |
global type to be dumped |
||
logical, | intent(in), | optional | :: | root_only |
root dump global mesh when true and all process dump its own mesh when false |
subroutine dump_tem_global( me, root_only) ! -------------------------------------------------------------------- ! !> global type to be dumped type(tem_global_type), intent(in) :: me !> root dump global mesh when true and !! all process dump its own mesh when false logical, intent(in), optional :: root_only ! -------------------------------------------------------------------- ! character(len=300) :: headname integer :: version integer :: i type(aot_out_type) :: conf ! aotus lua state to write output integer :: locroot logical :: root_out ! -------------------------------------------------------------------- ! if(present(root_only)) then root_out = root_only else root_out = .true. endif if (root_out) then locroot = 0 else locroot = me%myPart end if version = 1 !! Provide a version string, for the file format headname = trim(me%dirname)//'header.lua' if (me%mypart == locroot) then ! Write the header only on the root process ! open up the mesh header lua file to dump the stuff using aotus library call aot_out_open( conf, headname ) !write header version call aot_out_val( put_conf = conf, & & vname = 'version', & & val = version ) !write mesh label/name call aot_out_val( put_conf = conf, & & vname = 'label', & & val = trim(me%label) ) !comments about the mesh call aot_out_val( put_conf = conf, & & vname = 'comment', & & val = trim(me%comment) ) !write bounding box information in tha table call aot_out_open_table( conf, 'boundingbox' ) !create another table for origin call aot_out_open_table( conf, 'origin' ) !write three values of origin do i = 1,3 call aot_out_val( conf, me%Origin(i) ) end do call aot_out_close_table(conf) !write bounding box length call aot_out_val( put_conf = conf, & & vname = 'length', & & val = me%BoundingCubeLength ) call aot_out_close_table(conf) call aot_out_val( put_conf = conf, & & vname = 'nElems', & & val = me%nElems ) call aot_out_val( put_conf = conf, & & vname = 'minLevel', & & val = me%minLevel ) call aot_out_val( put_conf = conf, & & vname = 'maxLevel', & & val = me%maxLevel ) call aot_out_val( put_conf = conf, & & vname = 'nProperties', & & val = me%nProperties ) ! write effective boundary call aot_out_open_table( conf, 'effBoundingbox' ) !create another table for origin call aot_out_open_table( conf, 'origin' ) !write three values of origin do i = 1,3 call aot_out_val( conf, me%effOrigin(i) ) end do call aot_out_close_table(conf) ! close origin table !create another table for origin call aot_out_open_table( conf, 'effLength' ) !write three values of origin do i = 1,3 call aot_out_val( conf, me%effLength(i) ) end do call aot_out_close_table(conf) ! close length table call aot_out_close_table(conf) ! close effBoundingBox table ! dump property head call dump_tem_prophead( me = me%Property, & & conf = conf ) ! close the mesh header file call aot_out_close(conf) end if end subroutine dump_tem_global