[cig-commits] [commit] master: actually dumping the strain now in strain_only mode (42a3c74)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Oct 13 09:07:29 PDT 2014


Repository : https://github.com/geodynamics/axisem

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/ca4b3002407f17f95bbf7013f7622a43ceb4db35...7a0ed4115e0445ccb0219c894eedf4bf157d8689

>---------------------------------------------------------------

commit 42a3c74a73de9be9fa7481f3b4520206b50b3ac0
Author: martinvandriel <martin at vandriel.de>
Date:   Mon Oct 13 15:44:41 2014 +0200

    actually dumping the strain now in strain_only mode
    
    some remaining problems with the fluid


>---------------------------------------------------------------

42a3c74a73de9be9fa7481f3b4520206b50b3ac0
 SOLVER/meshes_io.F90      | 16 ++++++++++++++++
 SOLVER/nc_routines.F90    | 23 +++++++++++++++++++++++
 SOLVER/time_evol_wave.F90 |  7 ++++++-
 SOLVER/wavefields_io.f90  | 17 +++++++++++++++--
 4 files changed, 60 insertions(+), 3 deletions(-)

diff --git a/SOLVER/meshes_io.F90 b/SOLVER/meshes_io.F90
index f83bd1c..ab7e618 100644
--- a/SOLVER/meshes_io.F90
+++ b/SOLVER/meshes_io.F90
@@ -570,6 +570,22 @@ subroutine build_kwf_grid()
               endif
               mapping_ijel_ikwf(ipol,jpol,iel) = mapping(idest)
           enddo
+
+          ! add gll points on the axis
+          if (axis_solid(iel)) then
+              ipol = 0
+
+              ipt = (iel-1)*(npol+1)**2 + jpol*(npol+1) + ipol + 1
+              idest = igloc_solid(ipt) + nglob_fluid
+              
+              if (.not. check(idest)) then
+                  ct = ct + 1
+                  check(idest) = .true.
+                  mapping(idest) = ct
+                  kwf_mask(ipol,jpol,iel) = .true.
+              endif
+              mapping_ijel_ikwf(ipol,jpol,iel) = mapping(idest)
+          endif
       enddo
   enddo
 
diff --git a/SOLVER/nc_routines.F90 b/SOLVER/nc_routines.F90
index d446dcd..6f46ee9 100644
--- a/SOLVER/nc_routines.F90
+++ b/SOLVER/nc_routines.F90
@@ -1094,6 +1094,29 @@ subroutine nc_define_outputfile(nrec, rec_names, rec_th, rec_th_req, rec_ph, rec
 
               if (nstrain <= dumpstepsnap) dumpstepsnap = nstrain
 
+              if (lpr) then
+                  call dump_mesh_data_xdmf(trim(nc_fnam), 'strain_dsus.xdmf', 'Snapshots/strain_dsus',  &
+                                           npts_sol_global + npts_flu_global, & 
+                                           nstrain)
+                  call dump_mesh_data_xdmf(trim(nc_fnam), 'strain_dsuz.xdmf', 'Snapshots/strain_dsuz',  &
+                                           npts_sol_global + npts_flu_global, & 
+                                           nstrain)
+                  call dump_mesh_data_xdmf(trim(nc_fnam), 'strain_dpup.xdmf', 'Snapshots/strain_dpup',  &
+                                           npts_sol_global + npts_flu_global, & 
+                                           nstrain)
+                  call dump_mesh_data_xdmf(trim(nc_fnam), 'straintrace.xdmf', 'Snapshots/straintrace',  &
+                                           npts_sol_global + npts_flu_global, & 
+                                           nstrain)
+                  if (src_type(1) /= 'monopole') then 
+                     call dump_mesh_data_xdmf(trim(nc_fnam), 'strain_dsup.xdmf', 'Snapshots/strain_dsup',  &
+                                              npts_sol_global + npts_flu_global, & 
+                                              nstrain)
+                     call dump_mesh_data_xdmf(trim(nc_fnam), 'strain_dzup.xdmf', 'Snapshots/strain_dzup',  &
+                                              npts_sol_global + npts_flu_global, & 
+                                              nstrain)
+                  endif
+              end if
+
            case ('displ_velo')
               write(6,*) 'ERROR: not yet implemented with netcdf'
               stop 2
diff --git a/SOLVER/time_evol_wave.F90 b/SOLVER/time_evol_wave.F90
index fd7df7d..55d5acb 100644
--- a/SOLVER/time_evol_wave.F90
+++ b/SOLVER/time_evol_wave.F90
@@ -1140,6 +1140,11 @@ subroutine dump_stuff(iter, iseismo, istrain, isnap,     &
           ! time derivatives, if needed).
              call dump_disp_global(disp, chi, istrain)       ! displacement globally
 
+        case ('strain_only')
+          ! Compute strain tensor on-the-fly here and dump the 6 components.
+          ! Also compute corresponding fields in the fluid.
+            call compute_strain(disp, chi, istrain)    ! strain globally
+
         case ('displ_velo')
           ! Only dump the 3-comp displacement and velocity fields in solid 
           ! and potential & its derivative in fluid.
@@ -1148,7 +1153,7 @@ subroutine dump_stuff(iter, iseismo, istrain, isnap,     &
              call dump_disp(disp, chi, istrain)       ! displacement in solid, chi in fluid
              call dump_velo_dchi(velo, dchi, istrain) ! velocity in solid, dchi in fluid
 
-        case ('fullfields') ! Hardcoded choice
+        case ('fullfields')
           ! Compute strain tensor on-the-fly here and dump the 6 components.
           ! Also compute corresponding fields in the fluid.
           ! Maximal permanent storage, maximal run-time memory, maximal CPU time, 
diff --git a/SOLVER/wavefields_io.f90 b/SOLVER/wavefields_io.f90
index 93f01bc..25eac1c 100644
--- a/SOLVER/wavefields_io.f90
+++ b/SOLVER/wavefields_io.f90
@@ -784,12 +784,25 @@ subroutine dump_field_1d(f, filename, appisnap, n)
         call eradicate_src_elem_values(floc)
  
    if (use_netcdf) then
+       
        if (n==nel_solid) then
-           call nc_dump_field_solid(pack(floc(ibeg:iend,ibeg:iend,:), .true.), &
+          if (dump_type == 'strain_only') then
+             if (npoint_solid_kwf > 0) &
+                call nc_dump_field_solid(kwf_mapping_sol(floc), filename(2:))
+          else
+             call nc_dump_field_solid(pack(floc(ibeg:iend,ibeg:iend,:), .true.), &
                                     filename(2:))
+          endif
+       
        elseif (n==nel_fluid) then
-           call nc_dump_field_fluid(pack(floc(ibeg:iend,ibeg:iend,:), .true.), &
+          if (dump_type == 'strain_only') then
+             if (npoint_fluid_kwf > 0) &
+                call nc_dump_field_fluid(kwf_mapping_sol(floc), filename(2:))
+          else
+             call nc_dump_field_fluid(pack(floc(ibeg:iend,ibeg:iend,:), .true.), &
                                     filename(2:))
+          endif
+       
        else
            write(6,*) 'Neither solid nor fluid. What''s wrong here?'
            stop 2



More information about the CIG-COMMITS mailing list