diff --git a/afivo/src/m_af_output.f90 b/afivo/src/m_af_output.f90 index eab5e814..31517e9b 100644 --- a/afivo/src/m_af_output.f90 +++ b/afivo/src/m_af_output.f90 @@ -31,7 +31,6 @@ end subroutine subr_other_data public :: af_write_numpy #if NDIM > 1 public :: af_write_plane - public :: af_write_fc_plane #endif public :: af_write_silo public :: af_write_line @@ -550,97 +549,6 @@ subroutine af_write_plane(tree, filename, ivs, r_min, r_max, n_pixels) end do close(my_unit) end subroutine af_write_plane - - !> Write data in a plane (2D) to a VTK ASCII file. In 3D, r_min and r_max - !> should have one identical coordinate (i.e., they differ in two - !> coordinates). -subroutine af_write_fc_plane(tree, filename, iv, r_min, r_max, n_pixels) - use m_af_interp, only: af_interp1_fc - type(af_t), intent(in) :: tree !< Tree to write out - character(len=*), intent(in) :: filename !< Filename for the vtk file - integer, intent(in) :: iv !< Variables to write - real(dp), intent(in) :: r_min(NDIM) !< Minimum coordinate of plane - real(dp), intent(in) :: r_max(NDIM) !< Maximum coordinate of plane - integer, intent(in) :: n_pixels(2) !< Number of pixels in the plane - - integer, parameter :: my_unit = 100 - character(len=100) :: fmt_string - character(len=400) :: fname - integer :: i, j, n_cc, dim_unused, n_points(3) - real(dp) :: r(NDIM), dvec(3) - real(dp) :: v1(NDIM), v2(NDIM) - real(dp), allocatable :: pixel_data(:, :, :) - logical :: success - -#if NDIM == 2 - n_cc = 2 - dvec(1:2) = r_max(1:2) - r_min(1:2) - dvec(3) = 0 - dim_unused = 3 - n_points = [n_pixels(1), n_pixels(2), 1] - v1 = [dvec(1), 0.0_dp] / (n_pixels(1) - 1) - v2 = [0.0_dp, dvec(2)] / (n_pixels(2) - 1) -#elif NDIM == 3 - n_cc = 3 - dvec = r_max - r_min - dim_unused = minloc(abs(dvec), 1) - - select case (dim_unused) - case (1) - v1 = [0.0_dp, dvec(2), 0.0_dp] / (n_pixels(1) - 1) - v2 = [0.0_dp, 0.0_dp, dvec(3)] / (n_pixels(2) - 1) - n_points = [1, n_pixels(1), n_pixels(2)] - case (2) - v1 = [dvec(1), 0.0_dp, 0.0_dp] / (n_pixels(1) - 1) - v2 = [0.0_dp, 0.0_dp, dvec(3)] / (n_pixels(2) - 1) - n_points = [n_pixels(1), 1, n_pixels(2)] - case (3) - v1 = [dvec(1), 0.0_dp, 0.0_dp] / (n_pixels(1) - 1) - v2 = [0.0_dp, dvec(2), 0.0_dp] / (n_pixels(2) - 1) - n_points = [n_pixels(1), n_pixels(2), 1] - end select -#endif - - allocate(pixel_data(n_cc, n_pixels(1), n_pixels(2))) - - !$omp parallel do private(i, r) - do j = 1, n_pixels(2) - do i = 1, n_pixels(1) - r = r_min + (i-1) * v1 + (j-1) * v2 - pixel_data(:, i, j) = af_interp1_fc(tree, r, iv, success) - if (.not. success) error stop "af_write_fc_plane: interpolation error" - end do - end do - !$omp end parallel do - - ! Construct format string. Write one row at a time - write(fmt_string, '(A,I0,A)') '(', n_pixels(1), 'E20.8)' - - ! Construct file name - fname = trim(filename) // ".vtk" - - open(my_unit, file=trim(fname), action="write") - write(my_unit, '(A)') "# vtk DataFile Version 2.0" - write(my_unit, '(A)') trim(filename) - write(my_unit, '(A)') "ASCII" - write(my_unit, '(A)') "DATASET STRUCTURED_POINTS" - write(my_unit, '(A,3I10)') "DIMENSIONS ", n_points -#if NDIM == 2 - write(my_unit, '(A,3E20.8)') "ORIGIN ", [r_min(1), r_min(2), 0.0_dp] - write(my_unit, '(A,3E20.8)') "SPACING ", & - [v1(1) + v2(1), v1(2) + v2(2), 0.0_dp] -#elif NDIM == 3 - write(my_unit, '(A,3E20.8)') "ORIGIN ", r_min - write(my_unit, '(A,3E20.8)') "SPACING ", v1 + v2 -#endif - write(my_unit, '(A,2I0)') "POINT_DATA ", product(n_points) - do i = 1, n_cc - write(my_unit, '(A)') "SCALARS " - write(my_unit, '(A)') "LOOKUP_TABLE default" - write(my_unit, trim(fmt_string)) pixel_data(i, :, :) - end do - close(my_unit) - end subroutine af_write_fc_plane #endif !> Write the cell centered data of a tree to a vtk unstructured file. Only the diff --git a/programs/comparison_air_2d/standard_outfc.cfg b/programs/comparison_air_2d/standard_outfc.cfg deleted file mode 100644 index 02a93588..00000000 --- a/programs/comparison_air_2d/standard_outfc.cfg +++ /dev/null @@ -1,101 +0,0 @@ - ############################################## - ### Configuration file ### - ############################################## - - # For additional scripts and configuration files see: - # https://zenodo.org/record/5139749 - - # Refine if alpha*dx is larger than this value: - refine_adx = 1.0 # For quicker testing - # refine_adx = 0.50E+00 - - # The grid spacing will always be larger than this value: - refine_min_dx = 0.00E-07 - - plasma_region_enabled = t - plasma_region_rmax = 25e-3 1e100 - end_streamer_length = 8.5e-2 - use_end_streamer_length = t - - refine_max_dx = 2e-3 - derefine_dx = 2e-4 - refine_electrode_dx = 2.5e-5 - - field_given_by = field_table voltage_time.txt - - # Add electrode with the following settings - use_electrode = T - - # Whether the electrode is grounded or at the applied voltage: - field_electrode_grounded = F - - # Electrode relative start position (for standard rod electrode): - field_rod_r0 = 0.0 0.9 - - # Electrode relative end position (for standard rod electrode): - field_rod_r1 = 0.0 0.909 - - field_rod_r2 = 0.0 1.0 - - # Electrode radius (in m, for standard rod electrode): - field_rod_radius = 0.5E-03 - - field_tip_radius = 0.05e-03 - - field_electrode_type = rod_cone_top - - cylindrical = T - - # The desired endtime in seconds of the simulation: - end_time = 300e-9 - - # The name of the simulation: - output%name = output/standard_fcout - - # The length of the (square) domain: - domain_len = 10e-2 10e-2 - - # Whether the domain is periodic (per dimension): - periodic = F F - -[gas] - # The gas pressure (bar): - pressure = 1.0000E-01 - - # The gas temperature (Kelvin): - temperature = 3.0000E+02 - - # The background ion and electron density in 1/m^3: - background_density = 1.0E+11 - - # The timestep for writing output: - output%dt = 2.00E-09 - - # The maximum timestep: - dt_max = 0.1000E-09 - - photoi%eta = 0.075 - - [photoi] - # Whether photoionization is enabled: - enabled = t - - # Input file with transport data: - input_data%file = ../../transport_data/air_light_example_v0.txt - input_data%old_style = f - - [fc_plane] - # Use this many pixels for plane data: - npixels = 1500 90 - - # Relative position of plane maximum coordinate: - rmax = 1.5000E-01 9.0000E-01 - - # Relative position of plane minimum coordinate: - rmin = 0.0000E+00 0.0000E+00 - - # Names of variable to write in a plane: - varname = 'field' - - # Write uniform output in a plane: - write = T diff --git a/src/m_output.f90 b/src/m_output.f90 index 9fd4d72f..a0d0b39b 100644 --- a/src/m_output.f90 +++ b/src/m_output.f90 @@ -75,21 +75,6 @@ module m_output ! Relative position of plane maximum coordinate real(dp), public, protected :: plane_rmax(NDIM) = 1.0_dp - ! Write uniform output in a plane - logical, public, protected :: fc_plane_write = .false. - - ! Which variable to include in plane - integer, allocatable, public, protected :: fc_plane_ivar - - ! Use this many points for plane data - integer, public, protected :: fc_plane_npixels(2) = [64, 64] - - ! Relative position of plane minimum coordinate - real(dp), public, protected :: fc_plane_rmin(NDIM) = 0.0_dp - - ! Relative position of plane maximum coordinate - real(dp), public, protected :: fc_plane_rmax(NDIM) = 1.0_dp - ! Output electric field maxima and their locations logical, public, protected :: field_maxima_write = .false. @@ -144,7 +129,6 @@ subroutine output_initialize(tree, cfg) type(af_t), intent(inout) :: tree type(CFG_t), intent(inout) :: cfg character(len=name_len), allocatable :: varname(:) - character(len=name_len) :: fc_varname character(len=af_nlen) :: empty_names(0) integer :: n, i character(len=string_len) :: td_file @@ -234,8 +218,6 @@ subroutine output_initialize(tree, cfg) call CFG_add_get(cfg, "plane%write", plane_write, & "Write uniform output in a plane") - call CFG_add_get(cfg, "fc_plane%write", fc_plane_write, & - "Write uniform fc output in a plane") if (plane_write) then call CFG_add(cfg, "plane%varname", ["e"], & @@ -259,22 +241,6 @@ subroutine output_initialize(tree, cfg) "Relative position of plane maximum coordinate") end if - if (fc_plane_write) then - call CFG_add(cfg, "fc_plane%varname", ["field"], & - "Names of variable to write in a plane", dynamic_size=.true.) - call CFG_get(cfg, "fc_plane%varname", fc_varname) - - fc_plane_ivar = af_find_fc_variable(tree, trim(fc_varname)) - - call CFG_add_get(cfg, "fc_plane%npixels", fc_plane_npixels, & - "Use this many pixels for plane data") - call CFG_add_get(cfg, "fc_plane%rmin", fc_plane_rmin(1:NDIM), & - "Relative position of plane minimum coordinate") - call CFG_add_get(cfg, "fc_plane%rmax", fc_plane_rmax(1:NDIM), & - "Relative position of plane maximum coordinate") - end if - - call CFG_add_get(cfg, "field_maxima%write", field_maxima_write, & "Output electric field maxima and their locations") call CFG_add_get(cfg, "field_maxima%threshold", field_maxima_threshold, & @@ -420,15 +386,6 @@ end subroutine write_sim_data plane_rmax * ST_domain_len + ST_domain_origin, & plane_npixels) end if - - if (fc_plane_write) then - write(fname, "(A,I6.6)") trim(output_name) // & - "_fc_plane_", output_cnt - call af_write_fc_plane(tree, fname, fc_plane_ivar, & - fc_plane_rmin * ST_domain_len + ST_domain_origin, & - fc_plane_rmax * ST_domain_len + ST_domain_origin, & - fc_plane_npixels) - end if #endif if (lineout_write) then