Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
projects::Magnetosphere Class Reference

#include <Magnetosphere.h>

Inheritance diagram for projects::Magnetosphere:
Collaboration diagram for projects::Magnetosphere:

Public Member Functions

 Magnetosphere ()
virtual ~Magnetosphere ()
virtual bool initialize (void) override
virtual void getParameters (void) override
virtual void setProjectBField (fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
virtual Realf fillPhaseSpace (spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
virtual Realf probePhaseSpace (spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
bool refineSpatialCells (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) const override
bool forceRefinement (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, int n) const override
Real geometryRadius (Real x, Real y, Real z) const
virtual void calcCellParameters (spatial_cell::SpatialCell *cell, creal &t) override
virtual std::vector< std::array< Real, 3 > > getV0 (creal x, creal y, creal z, const uint popID) const override
 Return a vector containing the velocity coordinate of the centre of each ion population in the distribution.
Public Member Functions inherited from projects::Project
 Project ()
virtual ~Project ()
virtual Real getCorrectNumberDensity (spatial_cell::SpatialCell *cell, const uint popID) const
virtual void hook (cuint &stage, const dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::perbspan perb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) const
bool initialized ()
virtual void setupBeforeSetCell (const std::vector< CellID > &cells)
void setCell (spatial_cell::SpatialCell *cell)
 Set the perturbed fields and distribution of a cell according to the default simulation settings. This is used for the NOT_SYSBOUNDARY cells and some other system boundary conditions (e.g. Outflow).
virtual bool canRefine (spatial_cell::SpatialCell *cell) const
virtual bool shouldRefineCell (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID id, Real r_max2) const
virtual bool shouldUnrefineCell (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID id, Real r_max2) const
virtual bool refineSpatialCells (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) const
virtual uint64_t adaptRefinement (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) const
 Adapts refinement by one level according to the project. Returns true if any cells were refined, false if not.
virtual bool forceRefinement (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, int n) const
 Refine/unrefine spatial cells one level to the static criteria in the config.
virtual bool filterRefined (dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) const
 Boxcar filters spatial cells that were recently refined.

Static Public Member Functions

static void addParameters (void)
Static Public Member Functions inherited from projects::Project
static void addParameters ()

Public Attributes

std::array< Real, 3 > constBgB
bool noDipoleInSW
Real ionosphereRadius
uint ionosphereGeometry
Real center [3]
Real dipoleScalingFactor
Real dipoleMirrorLocationX
uint dipoleType
Real refine_L4radius
Real refine_L4nosexmin
Real refine_L3radius
Real refine_L3nosexmin
Real refine_L3tailheight
Real refine_L3tailwidth
Real refine_L3tailxmin
Real refine_L3tailxmax
Real refine_L2radius
Real refine_L2tailthick
Real refine_L1radius
Real refine_L1tailthick
Real dipoleTiltPhi
Real dipoleTiltTheta
Real dipoleXFull
Real dipoleXZero
Real dipoleInflowB [3]
Real dipoleXOffset
Real dipoleYOffset
Real dipoleZOffset
Real zeroOutComponents [3]
std::vector< MagnetosphereSpeciesParametersspeciesParams

Additional Inherited Members

Protected Member Functions inherited from projects::Project
void setVelocitySpace (const uint popID, spatial_cell::SpatialCell *cell) const
 Sets the distribution function in a cell.
void printPopulations ()
virtual bool rescalesDensity (const uint popID) const
void rescaleDensity (spatial_cell::SpatialCell *cell, const uint popID) const
Real getRandomNumber (std::default_random_engine &randGen) const
void setRandomSeed (uint64_t seedModifier, std::default_random_engine &randGen) const
void setRandomCellSeed (spatial_cell::SpatialCell *cell, std::default_random_engine &randGen) const

Detailed Description

Definition at line 43 of file Magnetosphere.h.

Constructor & Destructor Documentation

◆ Magnetosphere()

projects::Magnetosphere::Magnetosphere ( )

Definition at line 45 of file Magnetosphere.cpp.

◆ ~Magnetosphere()

projects::Magnetosphere::~Magnetosphere ( )
virtual

Definition at line 46 of file Magnetosphere.cpp.

Member Function Documentation

◆ addParameters()

void projects::Magnetosphere::addParameters ( void )
static

Definition at line 48 of file Magnetosphere.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcCellParameters()

void projects::Magnetosphere::calcCellParameters ( spatial_cell::SpatialCell * cell,
creal & t )
overridevirtual

Calculate potentially needed parameters for the given spatial cell at the given time.

Currently this function is only called during initialization.

The following array indices contain the coordinates of the "lower left corner" of the cell: CellParams::XCRD, CellParams::YCRD, and CellParams::ZCRD. The cell size is given in the following array indices: CellParams::DX, CellParams::DY, and CellParams::DZ.

Parameters
cellPointer to the spatial cell to be handled.
tThe current value of time. This is passed as a convenience. If you need more detailed information of the state of the simulation, you can read it from Parameters.

Print a warning message to stderr and abort, one should not use the base class functions.

Reimplemented from projects::Project.

Definition at line 284 of file Magnetosphere.cpp.

◆ fillPhaseSpace()

Realf projects::Magnetosphere::fillPhaseSpace ( spatial_cell::SpatialCell * cell,
const uint popID,
const uint nRequested ) const
overridevirtual

Calculates the distribution function contents for the spatial cell and population in question NOTE: This function is called inside parallel region so it must be declared as const. This function will contain a loop over nRequested velocity blocks, with the block GlobalIDs provided in the GIDlist buffer, storing phase-space densities in the bufferData buffer.

Parameters
popIDParticle species ID.
Returns
The total stored number density of the cell for this population The physical unit of this quantity is 1/m^3.

Implements projects::Project.

Definition at line 478 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ forceRefinement()

bool projects::Magnetosphere::forceRefinement ( dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
int n ) const
override

Definition at line 739 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ geometryRadius()

Real projects::Magnetosphere::geometryRadius ( Real x,
Real y,
Real z ) const

Definition at line 286 of file Magnetosphere.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParameters()

void projects::Magnetosphere::getParameters ( void )
overridevirtual

Get the value that was read in.

Read inner boundary parameters from either ionospheric or copysphere sysboundary condition

Read inner boundary parameters from either ionospheric or copysphere sysboundary condition

Reimplemented from projects::Project.

Definition at line 106 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ getV0()

vector< std::array< Real, 3 > > projects::Magnetosphere::getV0 ( creal x,
creal y,
creal z,
const uint popID ) const
overridevirtual

Return a vector containing the velocity coordinate of the centre of each ion population in the distribution.

This function is used by findBlocksToInitialize() to start the search of the extent of the distribution along each axis. The extension to a vector allows to have more than one population in each spatial cell.

See also
findBlocksToInitialize

Implements projects::TriAxisSearch.

Definition at line 587 of file Magnetosphere.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

bool projects::Magnetosphere::initialize ( void )
overridevirtual

Initialize project. Can be used, e.g., to read in parameters from the input file.

Initialize the Project. Velocity mesh and particle population parameters are read from the configuration file, and corresponding internal variables are created here. NOTE: Each project must call this function!

Returns
If true, particle species and velocity meshes were created successfully.

Reimplemented from projects::Project.

Definition at line 280 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ probePhaseSpace()

Realf projects::Magnetosphere::probePhaseSpace ( spatial_cell::SpatialCell * cell,
const uint popID,
Real vx_in,
Real vy_in,
Real vz_in ) const
overridevirtual

Implements projects::TriAxisSearch.

Definition at line 549 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ refineSpatialCells()

bool projects::Magnetosphere::refineSpatialCells ( dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid) const
override

Definition at line 616 of file Magnetosphere.cpp.

Here is the call graph for this function:

◆ setProjectBField()

void projects::Magnetosphere::setProjectBField ( fsgrids::perbspan perb,
fsgrids::bgbspan bgb,
fsgrids::technicalspan technical,
FieldSolverGrid & fsgrid )
overridevirtual

Set the background and perturbed magnetic fields for this project.

Parameters
perBGridGrid on which values of the perturbed field can be set if needed.
BgBGridGrid on which values for the background field can be set if needed, e.g. using the background field functions.
technicalTechnical fsgrid, available if some of its data is necessary.
See also
setBackgroundField, setBackgroundFieldToZero

Print a warning message to stderr and abort, one should not use the base class functions.

Reimplemented from projects::Project.

Definition at line 313 of file Magnetosphere.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ center

Real projects::Magnetosphere::center[3]

Definition at line 72 of file Magnetosphere.h.

◆ constBgB

std::array<Real, 3> projects::Magnetosphere::constBgB

Definition at line 68 of file Magnetosphere.h.

◆ dipoleInflowB

Real projects::Magnetosphere::dipoleInflowB[3]

Definition at line 96 of file Magnetosphere.h.

◆ dipoleMirrorLocationX

Real projects::Magnetosphere::dipoleMirrorLocationX

Definition at line 74 of file Magnetosphere.h.

◆ dipoleScalingFactor

Real projects::Magnetosphere::dipoleScalingFactor

Definition at line 73 of file Magnetosphere.h.

◆ dipoleTiltPhi

Real projects::Magnetosphere::dipoleTiltPhi

Definition at line 92 of file Magnetosphere.h.

◆ dipoleTiltTheta

Real projects::Magnetosphere::dipoleTiltTheta

Definition at line 93 of file Magnetosphere.h.

◆ dipoleType

uint projects::Magnetosphere::dipoleType

Definition at line 75 of file Magnetosphere.h.

◆ dipoleXFull

Real projects::Magnetosphere::dipoleXFull

Definition at line 94 of file Magnetosphere.h.

◆ dipoleXOffset

Real projects::Magnetosphere::dipoleXOffset

Definition at line 100 of file Magnetosphere.h.

◆ dipoleXZero

Real projects::Magnetosphere::dipoleXZero

Definition at line 95 of file Magnetosphere.h.

◆ dipoleYOffset

Real projects::Magnetosphere::dipoleYOffset

Definition at line 101 of file Magnetosphere.h.

◆ dipoleZOffset

Real projects::Magnetosphere::dipoleZOffset

Definition at line 102 of file Magnetosphere.h.

◆ ionosphereGeometry

uint projects::Magnetosphere::ionosphereGeometry

Definition at line 71 of file Magnetosphere.h.

◆ ionosphereRadius

Real projects::Magnetosphere::ionosphereRadius

Definition at line 70 of file Magnetosphere.h.

◆ noDipoleInSW

bool projects::Magnetosphere::noDipoleInSW

Definition at line 69 of file Magnetosphere.h.

◆ refine_L1radius

Real projects::Magnetosphere::refine_L1radius

Definition at line 89 of file Magnetosphere.h.

◆ refine_L1tailthick

Real projects::Magnetosphere::refine_L1tailthick

Definition at line 90 of file Magnetosphere.h.

◆ refine_L2radius

Real projects::Magnetosphere::refine_L2radius

Definition at line 87 of file Magnetosphere.h.

◆ refine_L2tailthick

Real projects::Magnetosphere::refine_L2tailthick

Definition at line 88 of file Magnetosphere.h.

◆ refine_L3nosexmin

Real projects::Magnetosphere::refine_L3nosexmin

Definition at line 81 of file Magnetosphere.h.

◆ refine_L3radius

Real projects::Magnetosphere::refine_L3radius

Definition at line 80 of file Magnetosphere.h.

◆ refine_L3tailheight

Real projects::Magnetosphere::refine_L3tailheight

Definition at line 82 of file Magnetosphere.h.

◆ refine_L3tailwidth

Real projects::Magnetosphere::refine_L3tailwidth

Definition at line 83 of file Magnetosphere.h.

◆ refine_L3tailxmax

Real projects::Magnetosphere::refine_L3tailxmax

Definition at line 85 of file Magnetosphere.h.

◆ refine_L3tailxmin

Real projects::Magnetosphere::refine_L3tailxmin

Definition at line 84 of file Magnetosphere.h.

◆ refine_L4nosexmin

Real projects::Magnetosphere::refine_L4nosexmin

Definition at line 78 of file Magnetosphere.h.

◆ refine_L4radius

Real projects::Magnetosphere::refine_L4radius

Definition at line 77 of file Magnetosphere.h.

◆ speciesParams

std::vector<MagnetosphereSpeciesParameters> projects::Magnetosphere::speciesParams

Definition at line 106 of file Magnetosphere.h.

◆ zeroOutComponents

Real projects::Magnetosphere::zeroOutComponents[3]

Definition at line 104 of file Magnetosphere.h.


The documentation for this class was generated from the following files: