|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include <ionosphere.h>
Classes | |
| struct | Element |
| struct | Node |
| struct | AtmosphericLayer |
Public Types | |
| enum | IonosphereSolverGaugeFixing { None , Pole , Integral , Equator } |
| enum | IonosphereIonizationModel { Rees1963 , Rees1989 , SergienkoIvanov , Robinson2020 , Juusola2025 , FixedSigma } |
Public Member Functions | |
| Real | lookupProductionValue (int heightindex, Real energy_keV, Real temperature_keV) |
| void | setDipoleField (const FieldFunction &dipole) |
| void | setConstantBackgroundField (const std::array< Real, 3 > B) |
| void | readAtmosphericModelFile (const char *filename) |
| void | storeNodeB () |
| void | offset_FAC () |
| void | normalizeRadius (Node &n, Real R) |
| void | updateConnectivity () |
| void | updateIonosphereCommunicator (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) |
| void | initializeTetrahedron () |
| void | initializeOctahedron () |
| void | initializeIcosahedron () |
| void | initializeSphericalFibonacci (int n) |
| void | initializeGridFromFile (std::string path) |
| int32_t | findElementNeighbour (uint32_t e, int n1, int n2) |
| uint32_t | findNodeAtCoordinates (std::array< Real, 3 > x) |
| void | subdivideElement (uint32_t e) |
| void | stitchRefinementInterfaces () |
| void | calculatePrecipitation () |
| void | calculateConductivityTensor (const Real F10_7, const Real recombAlpha, const Real backgroundIonisation, const bool refillTensorAtRestart=false) |
| Real | interpolateUpmappedPotential (const std::array< Real, 3 > &x) |
| void | addMatrixDependency (uint node1, uint node2, Real coeff, bool transposed=false) |
| void | addAllMatrixDependencies (uint nodeIndex) |
| void | initSolver (bool zeroOut=true) |
| iSolverReal | Atimes (uint nodeIndex, int parameter, bool transpose=false) |
| Real | Asolve (uint nodeIndex, int parameter, bool transpose=false) |
| void | solve (int &iteration, int &nRestarts, Real &residual, Real &minPotentialN, Real &maxPotentialN, Real &minPotentialS, Real &maxPotentialS) |
| void | solveInternal (int &iteration, int &nRestarts, Real &residual, Real &minPotentialN, Real &maxPotentialN, Real &minPotentialS, Real &maxPotentialS) |
| void | mapDownBoundaryData (fsgrids::perbspan perb, fsgrids::constdperbspan dperb, fsgrids::momentsspan moments, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) |
| Real | elementArea (uint32_t elementIndex) |
| std::array< Real, 3 > | mappedElementArea (uint32_t elementIndex) |
| Eigen::Vector3d | elementBarycentre (uint32_t el) |
| Eigen::Vector3d | elementCircumcentre (uint el) |
| Eigen::Vector3d | elementNormal (uint32_t el) |
| Eigen::Vector3d | commonEdgeMidpoint (uint32_t el1, uint32_t el2) |
| Real | dualPolygonArea (uint gridNode) |
| Real | areaInDualPolygon (uint gridNode, uint gridElem) |
| Real | nodeNeighbourArea (uint32_t nodeIndex) |
| std::tuple< Eigen::Vector3d, Eigen::Vector3d > | connectingSegmentLengths (uint32_t el1, uint32_t el2) |
| std::array< Real, 3 > | computeGradT (const std::array< Real, 3 > &a, const std::array< Real, 3 > &b, const std::array< Real, 3 > &c) |
| std::array< Real, 9 > | sigmaAverage (uint elementIndex) |
| double | elementIntegral (uint elementIndex, int i, int j, bool transpose=false) |
Public Attributes | |
| std::vector< Element > | elements |
| std::vector< Eigen::Vector3d > | elementCurlFreeCurrent |
| std::vector< Eigen::Vector3d > | elementDivFreeCurrent |
| std::vector< Node > | nodes |
| std::array< AtmosphericLayer, numAtmosphereLevels > | atmosphere |
| enum SBC::SphericalTriGrid::IonosphereSolverGaugeFixing | gaugeFixing |
| enum SBC::SphericalTriGrid::IonosphereIonizationModel | ionizationModel |
| std::array< std::array< std::array< Real, productionNumTemperatures >, productionNumAccEnergies >, numAtmosphereLevels > | productionTable |
| MPI_Comm | communicator = MPI_COMM_NULL |
| int | rank = -1 |
| int | writingRank |
| bool | isCouplingInwards = true |
| bool | isCouplingOutwards = true |
| FieldFunction | dipoleField |
| std::array< Real, 3 > | BGB |
| std::map< std::array< Real, 3 >, std::array< std::pair< int, Real >, 3 > > | vlasovGridCoupling |
Static Public Attributes | |
| static constexpr int | numAtmosphereLevels = 20 |
Definition at line 76 of file ionosphere.h.
| Enumerator | |
|---|---|
| Rees1963 | |
| Rees1989 | |
| SergienkoIvanov | |
| Robinson2020 | |
| Juusola2025 | |
| FixedSigma | |
Definition at line 160 of file ionosphere.h.
| Enumerator | |
|---|---|
| None | |
| Pole | |
| Integral | |
| Equator | |
Definition at line 153 of file ionosphere.h.
| void SBC::SphericalTriGrid::addAllMatrixDependencies | ( | uint | nodeIndex | ) |
Definition at line 2285 of file ionosphere.cpp.


| void SBC::SphericalTriGrid::addMatrixDependency | ( | uint | node1, |
| uint | node2, | ||
| Real | coeff, | ||
| bool | transposed = false ) |
Add matrix value for the solver
Definition at line 2204 of file ionosphere.cpp.

|
inline |
Definition at line 457 of file ionosphere.h.


| Real SBC::SphericalTriGrid::Asolve | ( | uint | nodeIndex, |
| int | parameter, | ||
| bool | transpose = false ) |
Evaluate own parameter value
Definition at line 2519 of file ionosphere.cpp.

| iSolverReal SBC::SphericalTriGrid::Atimes | ( | uint | nodeIndex, |
| int | parameter, | ||
| bool | transpose = false ) |
Evaluate neighbour nodes' coupled parameter
Definition at line 2500 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::calculateConductivityTensor | ( | const Real | F10_7, |
| const Real | recombAlpha, | ||
| const Real | backgroundIonisation, | ||
| const bool | refillTensorAtRestart = false ) |
Update sigma tensor, if last argument is true, just refill the tensor from SIGMAH, SIGMAP and SIGMAPARALLEL from restart data
Definition at line 1160 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::calculatePrecipitation | ( | ) |
Estimate precipitation flux
Definition at line 1136 of file ionosphere.cpp.


|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 243 of file ionosphere.h.


|
inline |
|
inline |
| Real SBC::SphericalTriGrid::elementIntegral | ( | uint | elementIndex, |
| int | i, | ||
| int | j, | ||
| bool | transpose = false ) |
Definition at line 2150 of file ionosphere.cpp.


|
inline |
Definition at line 361 of file ionosphere.h.


| int32_t SBC::SphericalTriGrid::findElementNeighbour | ( | uint32_t | e, |
| int | n1, | ||
| int | n2 ) |
| uint32_t SBC::SphericalTriGrid::findNodeAtCoordinates | ( | std::array< Real, 3 > | x | ) |
Find the mesh node closest to the given coordinate
Definition at line 640 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initializeGridFromFile | ( | std::string | path | ) |
Initialize grid from an OBJ or VTK file
Definition at line 380 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initializeIcosahedron | ( | ) |
Initialize grid as a base icosahedron
Definition at line 238 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initializeOctahedron | ( | ) |
Initialize grid as a base octahedron
Definition at line 201 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initializeSphericalFibonacci | ( | int | n | ) |
Initialize grid as a spherical fibonacci lattice
Definition at line 279 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initializeTetrahedron | ( | ) |
Initialize grid as a base tetrahedron
Definition at line 167 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::initSolver | ( | bool | zeroOut = true | ) |
Initialize the CG solver
Definition at line 2443 of file ionosphere.cpp.


Calculate upmapped potential at the given point
Definition at line 1854 of file ionosphere.cpp.

| Real SBC::SphericalTriGrid::lookupProductionValue | ( | int | heightindex, |
| Real | energy_keV, | ||
| Real | temperature_keV ) |
Definition at line 1088 of file ionosphere.cpp.


| void SBC::SphericalTriGrid::mapDownBoundaryData | ( | fsgrids::perbspan | perb, |
| fsgrids::constdperbspan | dperb, | ||
| fsgrids::momentsspan | moments, | ||
| fsgrids::technicalspan | technical, | ||
| FieldSolverGrid & | fsgrid ) |
|
inline |
|
inline |
Scale all coordinates onto sphere with radius R
Definition at line 141 of file ionosphere.cpp.


| void SBC::SphericalTriGrid::offset_FAC | ( | ) |
Offset field aligned currents to get overall zero current
Definition at line 105 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::readAtmosphericModelFile | ( | const char * | filename | ) |
Store the value of the magnetic field at the node.
Definition at line 892 of file ionosphere.cpp.

|
inline |
Definition at line 187 of file ionosphere.h.
|
inline |
Definition at line 184 of file ionosphere.h.
| std::array< Real, 9 > SBC::SphericalTriGrid::sigmaAverage | ( | uint | elementIndex | ) |
| void SBC::SphericalTriGrid::solveInternal | ( | int & | iteration, |
| int & | nRestarts, | ||
| Real & | residual, | ||
| Real & | minPotentialN, | ||
| Real & | maxPotentialN, | ||
| Real & | minPotentialS, | ||
| Real & | maxPotentialS ) |
Definition at line 2627 of file ionosphere.cpp.


| void SBC::SphericalTriGrid::stitchRefinementInterfaces | ( | ) |
Make sure there are no t-junctions in the mesh by splitting neighbours
Definition at line 2333 of file ionosphere.cpp.
| void SBC::SphericalTriGrid::storeNodeB | ( | ) |
Definition at line 1078 of file ionosphere.cpp.
| void SBC::SphericalTriGrid::subdivideElement | ( | uint32_t | e | ) |
Subdivide mesh within element e
Definition at line 706 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::updateConnectivity | ( | ) |
Re-link elements and nodes
Definition at line 151 of file ionosphere.cpp.

| void SBC::SphericalTriGrid::updateIonosphereCommunicator | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| fsgrids::technicalspan | technical, | ||
| FieldSolverGrid & | fsgrid ) |
(Re-)create the subcommunicator for ionosphere-internal communication
Definition at line 1814 of file ionosphere.cpp.
| std::array<AtmosphericLayer, numAtmosphereLevels> SBC::SphericalTriGrid::atmosphere |
Definition at line 151 of file ionosphere.h.
| std::array<Real, 3> SBC::SphericalTriGrid::BGB |
Uniform background field
Definition at line 179 of file ionosphere.h.
| MPI_Comm SBC::SphericalTriGrid::communicator = MPI_COMM_NULL |
The communicator internally used to solve the ionosphere potential
Definition at line 173 of file ionosphere.h.
| FieldFunction SBC::SphericalTriGrid::dipoleField |
Simulation background field model to trace connections with
Definition at line 178 of file ionosphere.h.
| std::vector<Eigen::Vector3d> SBC::SphericalTriGrid::elementCurlFreeCurrent |
Definition at line 85 of file ionosphere.h.
| std::vector<Eigen::Vector3d> SBC::SphericalTriGrid::elementDivFreeCurrent |
Definition at line 86 of file ionosphere.h.
| std::vector<Element> SBC::SphericalTriGrid::elements |
Definition at line 84 of file ionosphere.h.
| enum SBC::SphericalTriGrid::IonosphereSolverGaugeFixing SBC::SphericalTriGrid::gaugeFixing |
| enum SBC::SphericalTriGrid::IonosphereIonizationModel SBC::SphericalTriGrid::ionizationModel |
| bool SBC::SphericalTriGrid::isCouplingInwards = true |
True for any rank that actually couples fsgrid information into the ionosphere
Definition at line 176 of file ionosphere.h.
| bool SBC::SphericalTriGrid::isCouplingOutwards = true |
True for any rank that actually couples ionosphere potential information out to the vlasov grid
Definition at line 177 of file ionosphere.h.
| std::vector<Node> SBC::SphericalTriGrid::nodes |
Definition at line 137 of file ionosphere.h.
|
staticconstexpr |
Definition at line 140 of file ionosphere.h.
| std::array< std::array< std::array< Real, productionNumTemperatures >, productionNumAccEnergies >, numAtmosphereLevels > SBC::SphericalTriGrid::productionTable |
Definition at line 170 of file ionosphere.h.
| int SBC::SphericalTriGrid::rank = -1 |
Own rank in the ionosphere communicator
Definition at line 174 of file ionosphere.h.
| std::map< std::array<Real, 3>, std::array< std::pair<int, Real>, 3> > SBC::SphericalTriGrid::vlasovGridCoupling |
Grid coupling information, caching how vlasovGrid coordinate couple to ionosphere data
Definition at line 182 of file ionosphere.h.
| int SBC::SphericalTriGrid::writingRank |
Rank in the MPI_COMM_WORLD communicator that does ionosphere I/O
Definition at line 175 of file ionosphere.h.