-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from AetherModel/develop
Develop
- Loading branch information
Showing
16 changed files
with
997 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members) | ||
// Full license can be found in License.md | ||
|
||
#ifndef INCLUDE_DIPOLE_H_ | ||
#define INCLUDE_DIPOLE_H_ | ||
|
||
#include "aether.h" | ||
#include <memory> | ||
|
||
/************************************************* | ||
* \brief A namespace with all (1-root) dipole grid logic. | ||
*************************************************/ | ||
namespace Dipole { | ||
|
||
/// The normalized origins of each face of the cube (i.e. corner) | ||
static const arma_mat ORIGINS = { | ||
{ 0.0, -0.5, 0.0} | ||
}; | ||
|
||
/// Normalized right steps in cube | ||
static const arma_mat RIGHTS = { | ||
{2.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized up steps in cube | ||
static const arma_mat UPS = { | ||
{0.0, 1.0, 0.0} | ||
}; | ||
|
||
}; | ||
|
||
/************************************************* | ||
* \brief A namespace with all (2-root) dipole grid logic. | ||
*************************************************/ | ||
namespace Dipole2 { | ||
|
||
/// The normalized origins of each face of the cube (i.e. corner) | ||
static const arma_mat ORIGINS = { | ||
{ 0.0, -0.5, 0.0}, | ||
{ 0.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized right steps in cube | ||
static const arma_mat RIGHTS = { | ||
{2.0, 0.0, 0.0}, | ||
{2.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized up steps in cube | ||
static const arma_mat UPS = { | ||
{0.0, 0.5, 0.0}, | ||
{0.0, 0.5, 0.0} | ||
}; | ||
|
||
}; | ||
|
||
/************************************************* | ||
* \brief A namespace with all (4-root) dipole grid logic. | ||
*************************************************/ | ||
namespace Dipole4 { | ||
|
||
/// The normalized origins of each face of the cube (i.e. corner) | ||
static const arma_mat ORIGINS = { | ||
{ 0.0, -0.5, 0.0}, | ||
{ 1.0, -0.5, 0.0}, | ||
{ 1.0, 0.0, 0.0}, | ||
{ 0.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized right steps in cube | ||
static const arma_mat RIGHTS = { | ||
{1.0, 0.0, 0.0}, | ||
{1.0, 0.0, 0.0}, | ||
{1.0, 0.0, 0.0}, | ||
{1.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized up steps in cube | ||
static const arma_mat UPS = { | ||
{0.0, 0.5, 0.0}, | ||
{0.0, 0.5, 0.0}, | ||
{0.0, 0.5, 0.0}, | ||
{0.0, 0.5, 0.0} | ||
}; | ||
|
||
}; | ||
|
||
|
||
/************************************************* | ||
* \brief A namespace with all (6-root) dipole grid logic. | ||
* This is the same as the Sphere6 | ||
*************************************************/ | ||
|
||
namespace Dipole6 { | ||
|
||
/// The normalized origins of each face of the cube (i.e. corner) | ||
static const arma_mat ORIGINS = { | ||
{ 0.0, -0.5, 0.0}, | ||
{2.0/3.0, -0.5, 0.0}, | ||
{4.0/3.0, -0.5, 0.0}, | ||
{ 0.0, 0.0, 0.0}, | ||
{2.0/3.0, 0.0, 0.0}, | ||
{4.0/3.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized right steps in cube | ||
static const arma_mat RIGHTS = { | ||
{ 2.0/3.0, 0.0, 0.0}, | ||
{ 2.0/3.0, 0.0, 0.0}, | ||
{ 2.0/3.0, 0.0, 0.0}, | ||
{ 2.0/3.0, 0.0, 0.0}, | ||
{ 2.0/3.0, 0.0, 0.0}, | ||
{ 2.0/3.0, 0.0, 0.0} | ||
}; | ||
|
||
/// Normalized right steps in cube | ||
static const arma_mat UPS = { | ||
{ 0.0, 0.5, 0.0}, | ||
{ 0.0, 0.5, 0.0}, | ||
{ 0.0, 0.5, 0.0}, | ||
{ 0.0, 0.5, 0.0}, | ||
{ 0.0, 0.5, 0.0}, | ||
{ 0.0, 0.5, 0.0} | ||
}; | ||
|
||
} | ||
|
||
|
||
#endif // INCLUDE_DIPOLE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members) | ||
// Full license can be found in License.md | ||
|
||
|
||
#ifndef INCLUDE_INIT_MAG_GRID_H_ | ||
#define INCLUDE_INIT_MAG_GRID_H_ | ||
|
||
#include "aether.h" | ||
#include "planets.h" | ||
#include "grid.h" | ||
|
||
bool init_dipole_grid(Grid &mGrid, Planets planet); | ||
|
||
// Analytic solution to get from q,p dipole coords to r,theta | ||
// q coordinate along b-field line | ||
// p l-shell | ||
// return (r,theta) | ||
std::pair<precision_t, precision_t> qp_to_r_theta(precision_t q, precision_t p); | ||
|
||
// Take limits & specs of field line, fill it with points. | ||
// std:: tuple <arma_mat, arma_mat, arma_vec> Grid::fill_field_lines (arma_vec lShells, | ||
// int64_t nAlts, | ||
// int64_t nLats, | ||
// precision_t Gamma); | ||
|
||
|
||
// convert mag to geographic | ||
std::vector <arma_cube> mag_to_geo(arma_cube magLon, | ||
arma_cube magLat, | ||
arma_cube magAlt, | ||
Planets planet); | ||
|
||
|
||
#endif // INCLUDE_INIT_GEO_GRID_H_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.