diff options
Diffstat (limited to 'src/driver/setup.cc')
-rw-r--r-- | src/driver/setup.cc | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/src/driver/setup.cc b/src/driver/setup.cc index 86ca722..87fcd86 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -8,6 +8,7 @@ /// /// decode_method - decode the method parameter /// decode_verbose_level - decode the verbose_level parameter +/// decode_file_format - decode the file_format parameter /// decode_Jacobian_method - decode the Jacobian_method parameter /// decode_geometry_method - decode the geometry_method parameter /// @@ -32,14 +33,14 @@ #include "../jtutil/linear_map.hh" using jtutil::error_exit; -#include "../util/coords.hh" -#include "../util/grid.hh" -#include "../util/fd_grid.hh" -#include "../util/patch.hh" -#include "../util/patch_edge.hh" -#include "../util/patch_interp.hh" -#include "../util/ghost_zone.hh" -#include "../util/patch_system.hh" +#include "../patch/coords.hh" +#include "../patch/grid.hh" +#include "../patch/fd_grid.hh" +#include "../patch/patch.hh" +#include "../patch/patch_edge.hh" +#include "../patch/patch_interp.hh" +#include "../patch/ghost_zone.hh" +#include "../patch/patch_system.hh" #include "../elliptic/Jacobian.hh" @@ -59,6 +60,8 @@ enum method decode_method(const char method_string[]); enum verbose_level decode_verbose_level(const char verbose_level_string[]); +enum file_format + decode_file_format(const char file_format_string[]); enum Jacobian_method decode_Jacobian_method(const char Jacobian_method_string[]); enum geometry_method @@ -122,6 +125,14 @@ state.surface_integral_method const struct verbose_info& verbose_info = state.verbose_info; struct IO_info& IO_info = state.IO_info; +IO_info.output_initial_guess = (output_initial_guess != 0); +IO_info.output_h_and_H_at_each_Newton_iteration + = (output_h_and_H_at_each_Newton_iteration != 0); +IO_info.output_h = (output_h != 0); +IO_info.output_H = (output_H_of_h != 0); +IO_info.file_format = decode_file_format(file_format); +IO_info.ASCII_file_name_extension = ASCII_file_name_extension; +IO_info.HDF5_file_name_extension = HDF5_file_name_extension; IO_info.h_base_file_name = h_base_file_name; IO_info.H_base_file_name = H_of_h_base_file_name; IO_info.Jacobian_base_file_name = Jacobian_base_file_name; @@ -135,8 +146,6 @@ Jac_info.perturbation_amplitude = Jacobian_perturbation_amplitude; struct solver_info& solver_info = state.solver_info; solver_info.max_Newton_iterations = max_Newton_iterations; -solver_info.output_h_and_H_at_each_Newton_iteration - = (output_h_and_H_at_each_Newton_iteration != 0); solver_info.max_Delta_h_over_h = max_Delta_h_over_h; solver_info.H_norm_for_convergence = H_norm_for_convergence; solver_info.Delta_h_norm_for_convergence = Delta_h_norm_for_convergence; @@ -339,6 +348,26 @@ else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING, //****************************************************************************** // +// This function decodes the file_format parameter (string) into an +// internal enum for future use. +// +namespace { +enum file_format + decode_file_format(const char file_format_string[]) +{ +if (STRING_EQUAL(file_format_string, "ASCII")) + then return file_format__ASCII; +else if (STRING_EQUAL(file_format_string, "HDF5")) + then return file_format__HDF5; +else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING, +"decode_file_format(): unknown file_format_string=\"%s\"!", + file_format_string); /*NOTREACHED*/ +} + } + +//****************************************************************************** + +// // This function decodes the Jacobian_method parameter (string) into // an internal enum for future use. // |