diff --git a/bmad/code/write_bmad_lattice_file.f90 b/bmad/code/write_bmad_lattice_file.f90 index 43a0154ce8..e796f990d3 100644 --- a/bmad/code/write_bmad_lattice_file.f90 +++ b/bmad/code/write_bmad_lattice_file.f90 @@ -838,7 +838,7 @@ subroutine write_bmad_lattice_file (bmad_file, lat, err, output_form, orbit0) if (has_attribute (ele, 'APERTURE_TYPE') .and. (ele%aperture_type /= ele_dflt%aperture_type)) & line = trim(line) // ', aperture_type = ' // aperture_type_name(ele%aperture_type) - if (has_attribute (ele, 'SYMPLECTIFY') .and. ele%symplectify) line = trim(line) // ', symplectify' + if (has_attribute (ele, 'SYMPLECTIFY') .and. ele%symplectify) line = trim(line) // ', symplectify = T' if (has_attribute (ele, 'FIELD_MASTER') .and. (ele%field_master .neqv. ele_dflt%field_master)) & write (line, '(2a, l1)') trim(line), ', field_master = ', ele%field_master @@ -1802,13 +1802,12 @@ subroutine write_this_gen_grad_map_map (gg_map, ele, iu9, line) gg => gg_map%gg(ig) write (iu9, '(2x, a)') 'curve = {' write (iu9, '(4x, a, i0, a)') 'm = ', gg%m, ',' - write (iu9, '(4x, 3a)') 'type = ', trim(expression_op_name(gg%sincos)), ',' + write (iu9, '(4x, 3a)') 'kind = ', trim(expression_op_name(gg%sincos)), ',' write (iu9, '(4x, a)') 'derivs = {' n = gg%n_deriv_max write (fmt, '(a, i0, a)') '(f13.5, a, ', n+1, 'es20.12, a)' - print *, fmt do iz = gg_map%iz0, gg_map%iz1-1 write (iu9, fmt) iz*gg_map%dz, ':', gg%deriv(iz,0:n), ',' enddo diff --git a/bmad/doc/attributes.tex b/bmad/doc/attributes.tex index 794a27ca11..b10aeef334 100644 --- a/bmad/doc/attributes.tex +++ b/bmad/doc/attributes.tex @@ -2677,7 +2677,7 @@ \subsection{Gen_Grad_Map} dz = , ! Distance between sampled field points. curve = \{ ! Generalized gradient curve m = , ! Azimuthal m value - type = ! Type of curve: sin or cos. + kind = ! Type of curve: sin or cos. derivs = \{ : ... , : ..., @@ -2704,7 +2704,7 @@ \subsection{Gen_Grad_Map} See Sec.~\sref{s:fieldmap.com} for an explanation of the attributes that are common with other field map types. In general there will be multiple \vn{curve} instances. A given \vn{curve} instance -specifies one generalized gradient with a given azimuthal \vn{m} value and a \vn{type} which +specifies one generalized gradient with a given azimuthal \vn{m} value and a \vn{kind} which specifies if the generalized gradient is \vn{sin}-like or \vn{cos}-like. Each \vn{curve} has a table of derivatives given by the \vn{derivs} component. Each row in the derivative table starts with the z-position of the derivatives \vn{}, \vn{}, \vn{z2}, ... etc. The z-positions must be in diff --git a/bmad/doc/cover-page.tex b/bmad/doc/cover-page.tex index 68746a8cb6..805af1f076 100644 --- a/bmad/doc/cover-page.tex +++ b/bmad/doc/cover-page.tex @@ -3,7 +3,7 @@ \begin{flushright} \large - Revision: September 11, 2023 \\ + Revision: September 13, 2023 \\ \end{flushright} \pdfbookmark[0]{Preamble}{Preamble} diff --git a/bmad/modules/expression_mod.f90 b/bmad/modules/expression_mod.f90 index 47a74cb924..6e61cae0ef 100644 --- a/bmad/modules/expression_mod.f90 +++ b/bmad/modules/expression_mod.f90 @@ -450,14 +450,18 @@ subroutine push_numeric_or_var (word, err, op, i_op, stack, n_stack, var_type) else call pushit_stack (stack, n_stack, var_type) - stack(n_stack)%name = word ! "my_species" in "mass_of(my_species)" is considered a variable and not a species_const if (var_type == species_const$) then + stack(n_stack)%name = word stack(n_stack)%value = species_id(word) if (species_id(word) == invalid$) stack(n_stack)%type = variable$ + elseif (var_type == variable$) then + stack(n_stack)%name = upcase(word) + else + stack(n_stack)%name = word endif - select case (word) + select case (downcase(word)) case ('twopi'); stack(n_stack) = expression_atom_struct(word, constant$, twopi) case ('fourpi'); stack(n_stack) = expression_atom_struct(word, constant$, fourpi) case ('pi'); stack(n_stack) = expression_atom_struct(word, constant$, pi) diff --git a/regression_tests/bookkeeper_test/output.correct b/regression_tests/bookkeeper_test/output.correct index 96f085b9af..e64375e85a 100644 --- a/regression_tests/bookkeeper_test/output.correct +++ b/regression_tests/bookkeeper_test/output.correct @@ -96,7 +96,7 @@ "ele32" ABS 0 33 1 0 0 0 0 "ele33" ABS 0 34 3 0 37 1 0 "ele34" ABS 0 37 1 0 0 0 0 -"Hybrid" ABS 1e-12 5.036E-14 +"Hybrid" ABS 1e-12 5.038E-14 "ON_OFF_SAVE" ABS 0 0.100 0.300 0.400 0.200 "Q1#1[L]" ABS 0 1.5000 "Q1\Q4[L]" ABS 0 0.5000 @@ -138,7 +138,7 @@ "GR4[COMMAND]" ABS 0 8.0000 "GRN[A]" ABS 0 0.0100 "GRN[B]" ABS 0 2.0000 -"GRN[string]" STR "(tan(a)+b)*(0.1/c_light)^(a+0.2)-a-(1+2)" +"GRN[string]" STR "(tan(A)+B)*(0.1/c_light)^(A+0.2)-A-(1+2)" "Next-1" ABS 0 0 "Next-2" ABS 0 1 "Next-3" ABS 0 2 diff --git a/regression_tests/scripts/svn_regression.py b/regression_tests/scripts/svn_regression.py index c7e685779b..3b0786a134 100755 --- a/regression_tests/scripts/svn_regression.py +++ b/regression_tests/scripts/svn_regression.py @@ -10,16 +10,16 @@ "https://accserv.classe.cornell.edu/svn/trunk/src/open_spacecharge" : "50675", "https://accserv.classe.cornell.edu/svn/packages/PGPLOT" : "55094", # Change from 50204 "https://accserv.classe.cornell.edu/svn/packages/fftw" : "54912", # Change from 54142 - "https://accserv.classe.cornell.edu/svn/packages/fgsl" : "54914", # Change from 54143 + "https://accserv.classe.cornell.edu/svn/packages/fgsl" : "55230", # Change from 54914 "https://accserv.classe.cornell.edu/svn/packages/gnu_utilities_src" : "51479", - "https://accserv.classe.cornell.edu/svn/packages/gsl" : "54913", # Change from 53177 + "https://accserv.classe.cornell.edu/svn/packages/gsl" : "55228", # Change from 54913 "https://accserv.classe.cornell.edu/svn/packages/hdf5" : "55115", # Change from 54917 "https://accserv.classe.cornell.edu/svn/packages/lapack" : "54915", # Change from 53213 "https://accserv.classe.cornell.edu/svn/packages/lapack95" : "53051", "https://accserv.classe.cornell.edu/svn/packages/openmpi" : "51988", "https://accserv.classe.cornell.edu/svn/packages/plplot" : "55075", # Change from 54925 "https://accserv.classe.cornell.edu/svn/packages/xraylib" : "54916", # Change from 53181 - "https://accserv.classe.cornell.edu/svn/trunk/util" : "55177", # Change from 55117 + "https://accserv.classe.cornell.edu/svn/trunk/util" : "55221", # Change from 55177 "https://accserv.classe.cornell.edu/svn/trunk/build_system" : "54615", } diff --git a/tao/code/tao_command.f90 b/tao/code/tao_command.f90 index fd04f31e72..f9586cc40e 100644 --- a/tao/code/tao_command.f90 +++ b/tao/code/tao_command.f90 @@ -31,6 +31,7 @@ subroutine tao_command (command_line, err_flag, err_is_fatal) type (tao_universe_struct), pointer :: u type (lat_struct), pointer :: lat +type (tao_plot_struct), pointer :: plt integer i, j, n, iu, ios, n_word, n_eq, stat integer ix, ix_line, ix_cmd, which @@ -57,7 +58,7 @@ subroutine tao_command (command_line, err_flag, err_is_fatal) 'output '] logical quit_tao, err, err_is_fatal, silent, gang, abort, err_flag, ok -logical include_wall, update, exact, include_this, lord_set, listing +logical include_wall, update, exact, include_this, lord_set, listing, found ! blank line => nothing to do @@ -831,8 +832,22 @@ subroutine tao_command (command_line, err_flag, err_is_fatal) return endif + if (s%global%plot_on) then + found = .false. + do i = 1, size(s%plot_page%region) + if (.not. s%plot_page%region(i)%visible) cycle + plt => s%plot_page%region(i)%plot + if (.not. allocated(plt%graph)) cycle + do j = 1, size(plt%graph) + if (plt%graph(j)%type == 'key_table') found = .true. + enddo + enddo + if (.not. found) call out_io(s_blank$, r_name, '[Note: Use the "place" command in line mode if you want to see the key_table.]') + endif + s%com%single_mode = .true. - call out_io (s_blank$, r_name, 'Entering Single Mode...') + call out_io (s_blank$, r_name, 'Entering Single Mode. Waiting for your input...') + return !-------------------------------- diff --git a/tao/version/tao_version_mod.f90 b/tao/version/tao_version_mod.f90 index 0b17baeef6..c186082928 100644 --- a/tao/version/tao_version_mod.f90 +++ b/tao/version/tao_version_mod.f90 @@ -6,5 +6,5 @@ !- module tao_version_mod -character(*), parameter :: tao_version_date = "2023/09/18_23:06:36" +character(*), parameter :: tao_version_date = "2023/09/21_11:20:54" end module diff --git a/util_programs/generalized_gradient_fit/DOC b/util_programs/generalized_gradient_fit/DOC index 9b07c5591b..c79b94233a 100644 --- a/util_programs/generalized_gradient_fit/DOC +++ b/util_programs/generalized_gradient_fit/DOC @@ -281,7 +281,7 @@ are. The name of this file is given by the out_file parameter with a ".deriv_at_ attached. The data blocks in this file might look like: # m = 3 -# type = sin +# kind = sin # Iz z_pos Deriv * r_max^(m+d-1) * (d+m) * m! / ((d/2)! * (d/2+m)!) 10 0.0200 3.07486025E-01 1.07290432E+00 -2.07656736E-01 -2.59055645E-01 11 0.0220 3.32020880E-01 9.37495727E-01 -3.12597302E-01 -2.10447354E-01 diff --git a/util_programs/generalized_gradient_fit/gg_fit_mod.f90 b/util_programs/generalized_gradient_fit/gg_fit_mod.f90 index 0b9fbf16fc..d1ebc49e88 100644 --- a/util_programs/generalized_gradient_fit/gg_fit_mod.f90 +++ b/util_programs/generalized_gradient_fit/gg_fit_mod.f90 @@ -856,7 +856,7 @@ subroutine write_gg_info() write (1, *) endif write (1, '(a, i2)') '# m =', gg%m - write (1, '(2a)') '# type = ', sincos_name(gg%sincos) + write (1, '(2a)') '# kind = ', sincos_name(gg%sincos) write (1, '(a, i2)') '# Iz z_pos Init_RMS RMS/RMS0 Derivs...' write (1, '(a, i2)') '# Iz z_pos Derivs' @@ -886,7 +886,7 @@ subroutine write_gg_info() write (1, *) endif write (1, '(a, i2)') '# m =', gg%m - write (1, '(2a)') '# type = ', sincos_name(gg%sincos) + write (1, '(2a)') '# kind = ', sincos_name(gg%sincos) write (1, '(a, i2)') '# Iz z_pos Deriv * r_max^(m+d-1) * (d+m) * m! / ((d/2)! * (d/2+m)!)' do iz = iz_min, iz_max @@ -916,7 +916,7 @@ subroutine write_gg_info() write (1, *) endif write (1, '(a, i2)') '# m =', gg%m - write (1, '(2a)') '# type = ', sincos_name(gg%sincos) + write (1, '(2a)') '# kind = ', sincos_name(gg%sincos) write (1, '(a, i2)') '# Iz z_pos Deriv - left_extrapolated_deriv' do iz = iz_min+1, iz_max @@ -948,7 +948,7 @@ subroutine write_gg_info() write (1, *) endif write (1, '(a, i2)') '# m =', gg%m - write (1, '(2a)') '# type = ', sincos_name(gg%sincos) + write (1, '(2a)') '# kind = ', sincos_name(gg%sincos) write (1, '(a, i2)') '# Iz z_pos Deriv - right_extrapolated_deriv' do iz = iz_min, iz_max-1