Commits

Anonymous committed 660e4ef Merge

merge

  • Participants
  • Parent commits 7b31019, 8b51d0f

Comments (0)

Files changed (5)

src/pflotran/output_common.F90

 !!
 !! date: 10/29/12
 ! ************************************************************************** !
-subroutine OutputXMFHeader(fid,nmax,xmf_vert_len,ngvert,filename)
+subroutine OutputXMFHeader(fid,time,nmax,xmf_vert_len,ngvert,filename)
 
   implicit none
 
   PetscInt :: fid, vert_count
+  PetscReal :: time
   PetscInt :: nmax,xmf_vert_len,ngvert
   character(len=MAXSTRINGLENGTH) :: filename
 
   string="    <Grid Name=""Mesh"">"
   write(fid,'(a)') trim(string)
 
+  write(string2,'(es13.5)') time
+  string="      <Time Value = """ // trim(adjustl(string2)) // """ />"
+  write(fid,'(a)') trim(string)
+
   write(string2,*) nmax
   string="      <Topology Type=""Mixed"" NumberOfElements=""" // &
     trim(adjustl(string2)) // """ >"

src/pflotran/output_hdf5.F90

     open(unit=OUTPUT_UNIT,file=xmf_filename,action="write")
     !call OutputXMFHeader(OUTPUT_UNIT,realization_base,filename)
     call OutputXMFHeader(OUTPUT_UNIT, &
+                         option%time/output_option%tconv, &
                          grid%nmax, &
                          realization_base%output_option%xmf_vert_len, &
                          grid%unstructured_grid%num_vertices_global,filename)

src/pflotran/output_surface.F90

     call printMsg(option)
     open(unit=OUTPUT_UNIT,file=xmf_filename,action="write")
     call OutputXMFHeader(OUTPUT_UNIT, &
+                         option%time/output_option%tconv, &
                          surf_grid%nmax, &
                          surf_realization%output_option%surf_xmf_vert_len, &
                          subsurf_grid%unstructured_grid%num_vertices_global,filename)

src/pflotran/output_vtk.F90

   use Option_module
   use Field_module
   use Patch_module
+  use String_module
   
   use Reaction_Aux_module
   use Variables_module
                                 cur_variable%isubvar)
     call DiscretizationGlobalToNatural(discretization,global_vec, &
                                         natural_vec,ONEDOF)
+    word=trim(cur_variable%name)
+    call StringSwapChar(word," ","_")
     if (cur_variable%iformat == 0) then
       call WriteVTKDataSetFromVec(OUTPUT_UNIT,realization_base, &
-        cur_variable%name,natural_vec,VTK_REAL)
+        word,natural_vec,VTK_REAL)
     else
       call WriteVTKDataSetFromVec(OUTPUT_UNIT,realization_base, &
-        cur_variable%name,natural_vec,VTK_INTEGER)
+        word,natural_vec,VTK_INTEGER)
     endif
     cur_variable => cur_variable%next
   enddo

src/pflotran/string.F90

             StringStartsWith, &
             StringAdjustl, &
             StringNull, &
-            StringFindEntryInList
+            StringFindEntryInList, &
+            StringSwapChar
   
   interface StringCompare
     module procedure StringCompare1
   
 end function StringFindEntryInList
 
+! ************************************************************************** !
+!
+! StringSwapChar: Swaps a character from a string
+!
+! author: Glenn Hammond
+! date: 02/04/13
+!
+! ************************************************************************** !
+subroutine StringSwapChar(string,char_in,char_out)
+ 
+  implicit none
+ 
+  character(len=*) :: string
+  character(len=1) :: char_in
+  character(len=1) :: char_out
+ 
+  PetscInt :: i
+ 
+  do i=1, len_trim(string)
+   if (string(i:i) == char_in(1:1)) string(i:i) = char_out(1:1)
+  enddo
+ 
+end subroutine StringSwapChar
+
 end module String_module