Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
be2a6b1
get to work with cubesphere
aaronjridley Sep 17, 2025
4d467bc
BUG: need to write restart files for grid
aaronjridley Sep 17, 2025
bf98af9
BUG: dont have every processor write
aaronjridley Sep 17, 2025
63ef60d
allow control of perturbing restarts
aaronjridley Sep 17, 2025
c9a3dde
allow control of perturbing restarts
aaronjridley Sep 17, 2025
2371fb2
FEAT: update to latest code
aaronjridley Sep 17, 2025
e3f6a07
STY: fewer couts
aaronjridley Sep 17, 2025
02feed7
FEAT: write y,m,d,h,m,s,ms to restart file
aaronjridley Sep 18, 2025
a029418
FEAT: write current indices for restarting
aaronjridley Sep 18, 2025
a5cf9e1
FEAT: read indices for restart
aaronjridley Sep 18, 2025
ae6f79b
FEAT: if restart process changes indices, reperturb
aaronjridley Sep 18, 2025
320946e
FEAT: if restart process changes indices, reperturb
aaronjridley Sep 18, 2025
7cc4d92
FEAT: add perturbations to test
aaronjridley Sep 18, 2025
f24c149
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
e4965bb
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
1cd92cb
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
ce96914
FEAT: added sphere6 as a shape
aaronjridley Sep 24, 2025
f6bf829
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
827d175
FEAT: prep for physical cell only calcs
aaronjridley Sep 24, 2025
60c8086
FEAT: prep for physical cell only calcs
aaronjridley Sep 24, 2025
653650c
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
52b7783
BUG: should be FLOAT
aaronjridley Sep 24, 2025
4e08694
set geo grid before init_grid
aaronjridley Sep 24, 2025
f89490e
BUG: scale the density to real altitude
aaronjridley Sep 24, 2025
910c4e8
BUG: get the correct grid settings
aaronjridley Sep 24, 2025
6368921
BUG: need the altitude of the lower BC from planet
aaronjridley Sep 24, 2025
39b2cc5
FEAT: define grid shapes and type in constants
aaronjridley Sep 24, 2025
a6f2488
FEAT: define grid shapes and type in constants
aaronjridley Sep 24, 2025
ccced60
STY: more precise output
aaronjridley Sep 24, 2025
449ed72
STY: more precise output
aaronjridley Sep 24, 2025
1ed1318
moved to constants
aaronjridley Sep 24, 2025
43c1eed
changed sphere6
aaronjridley Sep 24, 2025
879b87a
use gridshape instead of booleans
aaronjridley Sep 24, 2025
3ad2843
set lower alt bc and report stuff
aaronjridley Sep 24, 2025
1eb2a6b
clean up and use gridshape
aaronjridley Sep 24, 2025
167ce81
use constants for shapes
aaronjridley Sep 24, 2025
1464c85
FEAT: output lats and lons verbose=1
aaronjridley Sep 24, 2025
a3196bb
FEAT: use gridshape
aaronjridley Sep 24, 2025
35afea5
FEAT: check of latrange is set correctly for dipole
aaronjridley Sep 24, 2025
bd3093c
BUG: quadtree wrong for ion geo grid
aaronjridley Sep 24, 2025
c6ad5e4
define radius
aaronjridley Sep 24, 2025
326b61a
BUG: report error if shape not found
aaronjridley Sep 24, 2025
aa7405d
BUG: works with sphere6 type now
aaronjridley Sep 24, 2025
3f5d6f7
FEAT: test all combos of grid shapes
aaronjridley Sep 24, 2025
dfcc27d
DOC: added more comments
aaronjridley Nov 26, 2025
ce0ab93
updated file
aaronjridley Nov 26, 2025
a0ee54e
STY: astyle, yo
aaronjridley Nov 26, 2025
2cd37a5
BUG: need default to run on 1 processor
aaronjridley Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions include/advance.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@


bool advance(Planets &planet,
Grid &gGrid,
Grid &mGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Neutrals &neutralsMag,
Ions &ions,
Ions &ionsMag,
Chemistry &chemistry,
Chemistry &chemistryMag,
Electrodynamics &electrodynamics,
Electrodynamics &electrodynamicsMag,
Indices &indices,
Logfile &logfile,
Logfile &logfileMag);
Grid &gGrid,
Grid &mGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Neutrals &neutralsMag,
Ions &ions,
Ions &ionsMag,
Chemistry &chemistry,
Chemistry &chemistryMag,
Electrodynamics &electrodynamics,
Electrodynamics &electrodynamicsMag,
Indices &indices,
Logfile &logfile,
Logfile &logfileMag);

#endif // INCLUDE_ADVANCE_H_
20 changes: 10 additions & 10 deletions include/aurora.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
**/

void read_aurora(Neutrals &neutrals,
Ions &ions);
Ions &ions);

arma_vec calculate_fang(float eflux, // in ergs/cm2/s
float avee, // in keV
float Ebin, // eV
arma_vec rhoH,
std::vector<float> Ci,
float dE, // eV
arma_vec H,
bool DoDebug);
float avee, // in keV
float Ebin, // eV
arma_vec rhoH,
std::vector<float> Ci,
float dE, // eV
arma_vec H,
bool DoDebug);

/**********************************************************************
* brief Read in a file containing information about splitting ionization
Expand All @@ -32,7 +32,7 @@ arma_vec calculate_fang(float eflux, // in ergs/cm2/s
**/

void calc_aurora(Grid grid,
Neutrals &neutrals,
Ions &ions);
Neutrals &neutrals,
Ions &ions);

#endif // INCLUDE_AURORA_H_
6 changes: 3 additions & 3 deletions include/bfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ struct bfield_info_type {
};

arma_vec get_magnetic_pole(int IsNorth,
Planets planet);
Planets planet);

bfield_info_type get_bfield(precision_t lon,
precision_t lat,
precision_t alt,
bool DoDebug,
bool DoDebug,
Planets planet);

bfield_info_type get_dipole(precision_t lon,
precision_t lat,
precision_t alt,
bool DoDebug,
bool DoDebug,
Planets planet);

#endif // INCLUDE_BFIELD_H_
16 changes: 8 additions & 8 deletions include/calc_euv.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
// -------------------------------------------------------------------------

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

void calc_ionization_heating(Euv euv,
Neutrals &neutrals,
Ions &ions);
Neutrals &neutrals,
Ions &ions);


#endif // INCLUDE_CALC_EUV_H_
6 changes: 3 additions & 3 deletions include/calc_grid_derived.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <vector>

// ----------------------------------------------------------------------------
//
//
// ----------------------------------------------------------------------------

std::vector<precision_t> calc_bin_edges(std::vector<precision_t> centers);
Expand All @@ -19,8 +19,8 @@ arma_vec calc_bin_widths(arma_vec centers);
// ----------------------------------------------------------------------------
// A helper function for mapping grids
// ----------------------------------------------------------------------------
bool grid_match(Grid gGrid,
Grid mGrid,
bool grid_match(Grid gGrid,
Grid mGrid,
Quadtree gQuadtree,
Quadtree mQuadtree);

Expand Down
12 changes: 6 additions & 6 deletions include/chemistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Chemistry {
/// type of formula to use for reaction rate:
int type;
/// name of the reaction
std::string name;
std::string name;

};

Expand All @@ -93,12 +93,12 @@ class Chemistry {
Ions &ions);

private:
bool search(std::string name,
json &headers,
bool search(std::string name,
json &headers,
std::vector<std::string> &error);

bool check_chemistry_file(json &headers,
std::vector<std::vector<std::string>> csv,
bool check_chemistry_file(json &headers,
std::vector<std::vector<std::string>> csv,
Report &report);

int read_chemistry_file(Neutrals neutrals,
Expand All @@ -107,7 +107,7 @@ class Chemistry {
reaction_type interpret_reaction_line(const Neutrals &neutrals,
const Ions &ions,
const std::vector<std::string> &line,
const json &headers);
const json &headers);

void find_species_id(const std::string &name,
const Neutrals &neutrals,
Expand Down
2 changes: 1 addition & 1 deletion include/collisions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
#include "ions.h"

void calc_ion_neutral_coll_freq(Neutrals &neutrals,
Ions &ions);
Ions &ions);

#endif // INCLUDE_COLLISIONS_H_
20 changes: 16 additions & 4 deletions include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

#include <vector>

// -------------------------------------------------------------------------
// Define some constants for the code so that all functions understand
// stuff
// These are not physical constants, but are useful references
// -------------------------------------------------------------------------

const int iSphere_ = 1;
const int iCubesphere_ = 2;
const int iDipole_ = 3;
const std::string neutralType_ = "neuGrid";
const std::string ionType_ = "ionGrid";

// -------------------------------------------------------------------------
// Physical Constants
// - Naming standards:
Expand Down Expand Up @@ -65,7 +77,7 @@ const double cJULIAN2000 = 2451545.0;
// -------------------------------------------------------------------------

const precision_t cPI = 3.141592653589793;
const precision_t cTWOPI = 2*cPI;
const precision_t cTWOPI = 2 * cPI;

// -------------------------------------------------------------------------
// Conversion Constants:
Expand All @@ -75,8 +87,8 @@ const precision_t cTWOPI = 2*cPI;
// - Names are all UPPER CASE otherwise
// -------------------------------------------------------------------------

const precision_t cDtoR = cPI/180.0;
const precision_t cRtoD = 180.0/cPI;
const precision_t cDtoR = cPI / 180.0;
const precision_t cRtoD = 180.0 / cPI;

// -------------------------------------------------------------------------
// converting time between seconds and other units of time:
Expand All @@ -99,7 +111,7 @@ const double cMtoS = 60.0;
const double cStoM = 1.0 / cMtoS;

// MilliSeconds <-> Seconds:
const double cMStoS = 1.0/1000.0;
const double cMStoS = 1.0 / 1000.0;
const double cStoMS = 1000.0;

// -------------------------------------------------------------------------
Expand Down
Loading
Loading