From e828b4e9b431d602e1aa401b7f2f5c8ef94dac4d Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Wed, 17 Jun 2020 10:20:31 -0400 Subject: [PATCH] Cleanup --- include/solver.hpp | 70 ------------------------------------------- src/solver_impl.hpp | 12 -------- src/solver_inputs.hpp | 32 -------------------- 3 files changed, 114 deletions(-) delete mode 100644 include/solver.hpp delete mode 100644 src/solver_impl.hpp delete mode 100644 src/solver_inputs.hpp diff --git a/include/solver.hpp b/include/solver.hpp deleted file mode 100644 index de49c86..0000000 --- a/include/solver.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef SOLVER_H_ -#define SOLVER_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace solver { - -using NumberArray = std::vector; -using StringArray = std::vector; -using Array = std::variant; -using InputInfo = std::map; - -std::optional parse_inputs(std::string); - -struct GeometryAxis { - double low; - double high; - bool periodic; -}; -struct GeometrySettings { - std::array axes; - std::string csg_filename; -}; - -struct MeshAxis { - unsigned int fluid_max_tile_size; - unsigned int max_grid_size; - unsigned int n_cell; - unsigned int particle_max_grid_size; - unsigned int particle_max_tile_size; -}; - -struct MeshSettings { - int blocking_factor; - double small_volfrac; - std::array axes; -}; -struct TimeSettings { - bool fixed_dt; - double cfl; - double dt_max; - double dt_min; - double tcoll_ratio; - double tstop; - unsigned int max_step; -}; -struct SolverSettings { - GeometrySettings geometry; - MeshSettings mesh; - TimeSettings time; -}; - -struct InputsMessage { - std::string message; -}; -std::pair> - make_solver(solver::InputInfo); -std::string serialize(solver::SolverSettings); - -} // namespace solver - -#endif diff --git a/src/solver_impl.hpp b/src/solver_impl.hpp deleted file mode 100644 index f854566..0000000 --- a/src/solver_impl.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#include - -namespace solver { -std::pair> - make_geometry(solver::InputInfo); -std::pair> - make_mesh(solver::InputInfo); -std::pair> - make_time(solver::InputInfo); -void add_missing_msg(std::string key, std::vector &, Array); -void add_msg(std::string key, std::vector &, Array); -} // namespace solver diff --git a/src/solver_inputs.hpp b/src/solver_inputs.hpp deleted file mode 100644 index 7129f67..0000000 --- a/src/solver_inputs.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef INPUTS_H_ -#define INPUTS_H_ - -// Geometry -static const std::string DT_MAX("mfix.dt_max"); -static const std::string DT_MIN("mfix.dt_min"); -static const std::string PERIODIC("geometry.is_periodic"); -static const std::string PROB_HI("geometry.prob_hi"); -static const std::string PROB_LO("geometry.prob_lo"); -static const std::string CSG_FILENAME("mfix.geometry_filename"); - -// Mesh -static const std::string BLOCKING_FACTOR("amr.blocking_factor"); -static const std::string FABARRAY_TILE_SZ("fabarray.mfiter_tile_size"); -static const std::string GRID_SIZE_X("amr.max_grid_size_x"); -static const std::string GRID_SIZE_Y("amr.max_grid_size_y"); -static const std::string GRID_SIZE_Z("amr.max_grid_size_z"); -static const std::string N_CELL("amr.n_cell"); -static const std::string PARTICLE_GRID_SIZE_X("particles.max_grid_size_x"); -static const std::string PARTICLE_GRID_SIZE_Y("particles.max_grid_size_y"); -static const std::string PARTICLE_GRID_SIZE_Z("particles.max_grid_size_z"); -static const std::string PARTICLE_TILE_SZ("particles.tile_size"); -static const std::string SMALL_VOLFRAC("eb2.small_volfrac"); - -// Time -static const std::string CFL("mfix.cfl"); -static const std::string FIXED_DT("mfix.fixed_dt"); -static const std::string MAXSTEP("mfix.max_step"); -static const std::string TCOLL_RATIO("mfix.tcoll_ratio"); -static const std::string TSTOP("mfix.stop_time"); - -#endif -- GitLab