Skip to content

Commit

Permalink
Merge pull request #143 from AetherModel/develop
Browse files Browse the repository at this point in the history
Update so I can debug
  • Loading branch information
aaronjridley authored Nov 17, 2023
2 parents a0e5dbf + 3f931fe commit 68b19d1
Show file tree
Hide file tree
Showing 42 changed files with 1,903 additions and 850 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ elseif(TEST_COORD)
elseif(TEST_EXCHANGE)
add_executable(aether ${SRC_FILES} ${MSIS_FILES} ${IE_FILES} ${MAIN_DIR}/main_test_exchange.cpp)
set(USE_DOUBLE_PRECISION True)
elseif(TEST_GRADIENT)
add_executable(aether ${SRC_FILES} ${MSIS_FILES} ${MAIN_DIR}/main_test_gradient.cpp)
else()
add_executable(aether ${SRC_FILES} ${MSIS_FILES} ${IE_FILES} ${MAIN_DIR}/main.cpp)
endif()
Expand Down
20 changes: 10 additions & 10 deletions include/advance.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
**/


int advance(Planets &planet,
Grid &gGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Chemistry &chemistry,
Electrodynamics &electrodynamics,
Indices &indices,
Logfile &logfile);
bool advance(Planets &planet,
Grid &gGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Chemistry &chemistry,
Electrodynamics &electrodynamics,
Indices &indices,
Logfile &logfile);

#endif // INCLUDE_ADVANCE_H_
14 changes: 7 additions & 7 deletions include/calc_euv.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
//
// -------------------------------------------------------------------------

int calc_euv(Planets planet,
Grid grid,
Times time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Indices indices);
bool calc_euv(Planets planet,
Grid grid,
Times time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Indices indices);

void calc_ionization_heating(Euv euv,
Neutrals &neutrals,
Expand Down
11 changes: 6 additions & 5 deletions include/electrodynamics.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ class Electrodynamics {
\param ions Going to set the potential and aurora
**/

int update(Planets planet,
Grid gGrid,
Times time,
Indices &indices,
Ions &ions);
bool update(Planets planet,
Grid gGrid,
Times time,
Indices &indices,
Ions &ions);


/**************************************************************
\brief used in main.cpp to ensure electrodynamics times and
Expand Down
11 changes: 5 additions & 6 deletions include/euv.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,28 @@ class Euv {
\param time The times within the model (dt is needed)
\param indices Need the F107 and F107a
**/
int euvac(Times time, Indices indices);
bool euvac(Times time, Indices indices);

/**********************************************************************
\brief Compute the EUV spectrum given F107 and F107a
\param time The times within the model (dt is needed)
\param indices Need the F107 and F107a
**/
int solomon_hfg(Times time, Indices indices);
bool solomon_hfg(Times time, Indices indices);

/**********************************************************************
\brief Compute the EUV spectrum given F107 and F107a (new version)
\param time The times within the model (dt is needed)
\param indices Need the F107 and F107a
**/
int neuvac(Times time, Indices indices);
bool neuvac(Times time, Indices indices);

/**********************************************************************
\brief Scale the EUV spectrum given the star - planet distance
\param planet needed to compute the star - planet distance
\param time Needed to compute orbital position around star
**/
int scale_from_1au(Planets planet, Times time);
void scale_from_1au(Planets planet, Times time);

/**********************************************************************
\brief Pairs rows in the EUV CSV file with neutral and ions
Expand All @@ -142,8 +142,7 @@ class Euv {
\param neutrals Needs names of the neutrals, stores lines in Neutrals
\param ions Needs names of the ions
**/
bool pair_euv(Neutrals &neutrals,
Ions ions);
bool pair_euv(Neutrals &neutrals, Ions ions);

/**********************************************************************
\brief Check to see if internal state of class is ok
Expand Down
1 change: 1 addition & 0 deletions include/inputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class Inputs {

std::string get_settings_str(std::string key1);
std::string get_settings_str(std::string key1, std::string key2);
int get_settings(std::string key1, std::string key2);
bool check_settings(std::string key1, std::string key2);
bool check_settings(std::string key1);
std::string check_settings_str(std::string key1, std::string key2);
Expand Down
15 changes: 4 additions & 11 deletions include/neutrals.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ class Neutrals {
\param time contains information about the current time
\param indices used to help set initial conditions
**/
int initial_conditions(Grid grid,
Times time,
Indices indices);
bool initial_conditions(Grid grid,
Times time,
Indices indices);

/**********************************************************************
\brief temporary function to set neutral densities with in the model
Expand Down Expand Up @@ -339,15 +339,8 @@ class Neutrals {
\param grid The grid to define the neutrals on
**/
precision_t calc_dt(Grid grid);

/**********************************************************************
\brief Calculate dt (cell size / cMax) in each direction, and take min
\param dt returns the neutral time-step
\param grid The grid to define the neutrals on
This function is for cubesphere dt calculation only
**/
precision_t calc_dt_cubesphere(Grid grid);

/**********************************************************************
\brief Calculate the chapman integrals for the individual species
\param grid The grid to define the neutrals on
Expand Down
18 changes: 9 additions & 9 deletions include/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ class OutputContainer {
/**********************************************************************
\brief write a file with the information in the container
**/
void write();
bool write();

/**********************************************************************
\brief write a json header file with the information in the container
**/
int write_container_header();
bool write_container_header();

/**********************************************************************
\brief write a binary file with the information in the container
**/
int write_container_binary();
bool write_container_binary();

/**********************************************************************
\brief write a netcdf file with the information in the container
**/
int write_container_netcdf();
bool write_container_netcdf();

/**********************************************************************
\brief read from a file an load into the container
Expand Down Expand Up @@ -222,11 +222,11 @@ class OutputContainer {
\param planet information about the planet
**/

int output(const Neutrals &neutrals,
const Ions &ions,
const Grid &grid,
Times time,
const Planets &planet);
bool output(const Neutrals &neutrals,
const Ions &ions,
const Grid &grid,
Times time,
const Planets &planet);

void output_binary_3d(std::ofstream &binary,
arma_cube value);
Expand Down
1 change: 1 addition & 0 deletions include/solvers.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ arma_cube calc_gradient_lon(arma_cube value, Grid grid);
arma_cube calc_gradient_lat(arma_cube value, Grid grid);
arma_cube calc_gradient_alt(arma_cube value, Grid grid);
std::vector<arma_cube> calc_gradient_vector(arma_cube value_scgc, Grid grid);
std::vector<arma_cube> calc_gradient_cubesphere(arma_cube value, Grid grid);
arma_cube calc_gradient_alt_4th(arma_cube value, Grid grid);

// interpolation in 1D
Expand Down
7 changes: 7 additions & 0 deletions include/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ struct mat_2x2{
arma_mat A22;
};

// -----------------------------------------------------------------------------
// add cMember into a string just before last period
// -----------------------------------------------------------------------------

std::string add_cmember(std::string inString);


// ----------------------------------------------------------------------
// Display an armadillo vector
// ----------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions include/transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include "aether.h"
using namespace arma;

std::string mklower(std::string inString);
std::string mkupper(std::string inString);

void copy_cube_to_array(arma_cube cube_in,
float *array_out);
void copy_mat_to_array(arma_mat mat_in,
Expand Down
Loading

0 comments on commit 68b19d1

Please sign in to comment.