Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
430bfcf
FEAT: Store nLons, nLats, nAlts; use armidillo cubes for storage
aaronjridley Dec 28, 2020
b62401a
FEAT: Use amidillo cubes for storage and math.
aaronjridley Dec 28, 2020
bd45517
FEAT: Move armidillo include files to /opt/local/include
aaronjridley Dec 28, 2020
48bdbc4
FEAT: Use armidillo cube for storage and math; store nLons, nLats, nA…
aaronjridley Dec 28, 2020
744656f
FEAT: Store number of ghostcells in grid info.
aaronjridley Dec 28, 2020
3d32733
FEAT: Change the compile command to -I/opt/local/include
aaronjridley Dec 28, 2020
de0efe9
FEAT: Apply armidillo cube library to conduction+
aaronjridley Dec 29, 2020
f96accd
FEAT: EUV heating now with armidillo cubes. Preparing for chemistry.
aaronjridley Dec 30, 2020
f3dbd81
BUG: index to iAlt mixup.
aaronjridley Dec 31, 2020
5124908
FEAT: Chemistry implemented in amadillo cubes.
aaronjridley Dec 31, 2020
e65b78c
FEAT: Finish armidillo cubes in neutrals and ions.
aaronjridley Dec 31, 2020
594a94a
DOC: Add some comments and clean code a bit.
aaronjridley Dec 31, 2020
807db01
FEAT: Output armadillo cube vars instead of float* vars.
aaronjridley Jan 1, 2021
5563039
FEAT: Move more grid stuff to armadillo cubes.
aaronjridley Jan 1, 2021
e5805a3
FEAT: Implement magnetic field in armidillo cubes
aaronjridley Jan 1, 2021
4a67379
DEPREC: Remove rest of the 1d c-native arrays.
aaronjridley Jan 1, 2021
9e2369e
DEPREC: Removed some 1-d stuff that was commented out.
aaronjridley Jan 1, 2021
e2653ca
DEPREC: Remove function for 1d stuff.
aaronjridley Jan 1, 2021
3fc52de
FEAT: dAlt default changed to 5 km, just to stretch grid.
aaronjridley Jan 1, 2021
f90e755
STY: Delinting of code.
aaronjridley Jan 11, 2021
8175048
STY: delinting code!
aaronjridley Jan 11, 2021
5bd0263
STY: Delinting of the code.
aaronjridley Jan 11, 2021
f21c56c
DOC: Added a comment for why there are two versions of FLAGS
aaronjridley Jan 11, 2021
72603d0
FEAT: Chemisty from Richards [2011].
aaronjridley Jan 19, 2021
0b71c8b
BUG: long -> int64_t
aaronjridley Jan 25, 2021
4accd11
BUG: Solvers were named _new now that is removed.
aaronjridley Jan 25, 2021
22200ba
STY: Remove cout statement.
aaronjridley Jan 25, 2021
335d4ea
BUG: took length of outstring instead of instring. Oops.
aaronjridley Jan 25, 2021
320b672
DOC: add comment (per mole)
aaronjridley Feb 3, 2021
767b787
STY: change ifndef statement.
aaronjridley Feb 3, 2021
e9a5685
DOC: added more descriptors of the variable types.
aaronjridley Feb 3, 2021
29d9704
STY: remove aether from ifdef statements.
aaronjridley Feb 3, 2021
9054e60
Merge branch 'armadillo' of https://github.com/AetherModel/Aether int…
aaronjridley Feb 3, 2021
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
2 changes: 1 addition & 1 deletion edu/examples/arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
is each to use these 3d arrys.

Here is how I compiled the code (clearly, I installed it in /usr/local):
g++ arm.cpp -o arm.exe -std=c++11 -O2 -larmadillo -I/usr/local/include -L/usr/local/lib
g++ arm.cpp -o arm.exe -std=c++11 -O2 -larmadillo -I/usr/local/include

*/

Expand Down
28 changes: 14 additions & 14 deletions include/advance.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// (c) 2020, the Aether Development Team (see doc/dev_team.md for members)
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
// Full license can be found in License.md

#ifndef AETHER_INCLUDE_ADVANCE_H_
#define AETHER_INCLUDE_ADVANCE_H_
#ifndef INCLUDE_ADVANCE_H_
#define INCLUDE_ADVANCE_H_

#include "../include/times.h"
#include "../include/inputs.h"
Expand All @@ -12,15 +12,15 @@
#include "../include/planets.h"
#include "../include/ions.h"

int advance( Planets &planet,
Grid &gGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Chemistry &chemistry,
Indices &indices,
Inputs &args,
Report &report);
int advance(Planets &planet,
Grid &gGrid,
Times &time,
Euv &euv,
Neutrals &neutrals,
Ions &ions,
Chemistry &chemistry,
Indices &indices,
Inputs &args,
Report &report);

#endif // AETHER_INCLUDE_ADVANCE_H_
#endif // INCLUDE_ADVANCE_H_
43 changes: 23 additions & 20 deletions include/bfield.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// (c) 2020, the Aether Development Team (see doc/dev_team.md for members)
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
// Full license can be found in License.md

#ifndef AETHER_INCLUDE_BFIELD_H_
#define AETHER_INCLUDE_BFIELD_H_
#ifndef INCLUDE_BFIELD_H_
#define INCLUDE_BFIELD_H_

#include "../include/planets.h"
#include "../include/inputs.h"
#include "../include/report.h"

struct bfield_info_type {
float b[3];
Expand All @@ -11,25 +15,24 @@ struct bfield_info_type {
};

bfield_info_type get_bfield(float lon,
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);

bfield_info_type get_dipole(float lon,
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);

bfield_info_type get_dipole(float lon,
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);

#endif // AETHER_INCLUDE_EUV_H_
float lat,
float alt,
Planets planet,
Inputs input,
Report &report);

#endif // INCLUDE_EUV_H_
46 changes: 17 additions & 29 deletions include/calc_chemistry.h
Original file line number Diff line number Diff line change
@@ -1,61 +1,49 @@
// (c) 2020, the Aether Development Team (see doc/dev_team.md for members)
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
// Full license can be found in License.md

#ifndef AETHER_INCLUDE_CALC_CHEMISTRY_H_
#define AETHER_INCLUDE_CALC_CHEMISTRY_H_
#ifndef INCLUDE_CALC_CHEMISTRY_H_
#define INCLUDE_CALC_CHEMISTRY_H_

#include <vector>
#include <string>
#include "../include/ions.h"
#include "../include/neutrals.h"
#include "../include/times.h"
#include "../include/grid.h"
#include "../include/report.h"

class Chemistry {

public:

Chemistry(Inputs args, Report report);

struct reaction_type {

struct reaction_type {
// Reactions:
// loss1 + loss2 + loss3 -> source1 + source2 + source3

std::vector<std::string> sources_names;
std::vector<std::string> losses_names;

std::vector<int> sources_ids;
std::vector<int> sources_IsNeutrals;

std::vector<int> losses_ids;
std::vector<int> losses_IsNeutrals;

float rate;

};

std::vector<reaction_type> reactions;

struct sources_and_losses_type {

struct sources_and_losses_type {
float neutral_sources[nSpecies];
float neutral_losses[nSpecies];
float ion_sources[nIons];
float ion_losses[nIons];

float heat_neutrals;
float heat_ions;
float heat_electrons;

};

void calc_chemistry(Neutrals &neutrals,
Ions &ions,
Times time,
Grid grid,
Report report);

void calc_chemical_sources(float neutral_density,
float ion_density,
float Tn,
float Ti,
float Te,
sources_and_losses_type &sources_and_losses;
Report report);


#endif // AETHER_INCLUDE_CALC_CHEMISTRY_H_
#endif // INCLUDE_CALC_CHEMISTRY_H_
26 changes: 13 additions & 13 deletions include/calc_euv.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// (c) 2020, the Aether Development Team (see doc/dev_team.md for members)
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
// Full license can be found in License.md

#ifndef AETHER_INCLUDE_CALC_EUV_H_
#define AETHER_INCLUDE_CALC_EUV_H_
#ifndef INCLUDE_CALC_EUV_H_
#define INCLUDE_CALC_EUV_H_

#include <vector>
#include <string>
Expand All @@ -20,14 +20,14 @@
//
// -------------------------------------------------------------------------

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

#endif // AETHER_INCLUDE_CALC_EUV_H_
#endif // INCLUDE_CALC_EUV_H_
80 changes: 34 additions & 46 deletions include/chemistry.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// (c) 2020, the Aether Development Team (see doc/dev_team.md for members)
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
// Full license can be found in License.md

#ifndef AETHER_INCLUDE_CHEMISTRY_H_
#define AETHER_INCLUDE_CHEMISTRY_H_
#ifndef INCLUDE_CHEMISTRY_H_
#define INCLUDE_CHEMISTRY_H_

#include <vector>
#include <string>
Expand All @@ -13,55 +13,47 @@
#include "../include/inputs.h"
#include "../include/report.h"


class Chemistry {

public:

struct reaction_type {

// Reactions:
// loss1 + loss2 + loss3 -> source1 + source2 + source3

std::vector<std::string> sources_names;
std::vector<std::string> losses_names;

std::vector<int> sources_ids;
std::vector<int> sources_IsNeutral;

std::vector<int> losses_ids;
std::vector<int> losses_IsNeutral;

int nSources;
int nLosses;

float energy;
float rate;
float branching_ratio;

};

std::vector<reaction_type> reactions;
long nReactions;
int64_t nReactions;

Chemistry(Neutrals neutrals,
Ions ions,
Inputs args,
Report &report);
Ions ions,
Inputs args,
Report &report);


void calc_chemistry(Neutrals &neutrals,
Ions &ions,
Times time,
Grid grid,
Report &report);

void calc_chemical_sources(float *neutral_density,
float *ion_density,
float Tn,
float Ti,
float Te,
Report &report);
Ions &ions,
Times time,
Grid grid,
Report &report);

void calc_chemical_sources(Neutrals &neutrals,
Ions &ions,
Report &report);

private:

Expand All @@ -71,36 +63,32 @@ class Chemistry {
float neutral_losses[nSpecies];
float ion_sources[nIons];
float ion_losses[nIons];

float heat_neutrals;
float heat_ions;
float heat_electrons;

};

sources_and_losses_type sources_and_losses;

int read_chemistry_file(Neutrals neutrals,
Ions ions,
Inputs args,
Report &report);
Ions ions,
Inputs args,
Report &report);

reaction_type interpret_reaction_line(Neutrals neutrals,
Ions ions,
std::vector<std::string> line,
Report &report);
Ions ions,
std::vector<std::string> line,
Report &report);

void find_species_id(std::string name,
Neutrals neutrals,
Ions ions,
int &id_,
int &IsNeutral,
Report &report);
Neutrals neutrals,
Ions ions,
int &id_,
int &IsNeutral,
Report &report);

void display_reaction(reaction_type reaction);



};

#endif // AETHER_INCLUDE_CHEMISTRY_H_
#endif // INCLUDE_CHEMISTRY_H_
Loading