Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
Magnetosphere.h
Go to the documentation of this file.
1/*
2 * This file is part of Vlasiator.
3 * Copyright 2010-2016 Finnish Meteorological Institute
4 *
5 * For details of usage, see the COPYING file and read the "Rules of the Road"
6 * at http://www.physics.helsinki.fi/vlasiator/
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#ifndef MAGNETOSPHERE_H
24#define MAGNETOSPHERE_H
25
26#include "../../definitions.h"
29
30namespace projects {
31
42
44 public:
46 virtual ~Magnetosphere();
47
48 virtual bool initialize(void) override;
49 static void addParameters(void);
50 virtual void getParameters(void) override;
51 virtual void setProjectBField(fsgrids::perbspan perb,
53 fsgrids::technicalspan technical, FieldSolverGrid& fsgrid) override;
54
55 virtual Realf fillPhaseSpace(spatial_cell::SpatialCell* cell, const uint popID,
56 const uint nRequested) const override;
57 virtual Realf probePhaseSpace(spatial_cell::SpatialCell* cell, const uint popID, Real vx_in, Real vy_in,
58 Real vz_in) const override;
59
60 bool
61 refineSpatialCells(dccrg::Dccrg<spatial_cell::SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid) const override;
62 bool forceRefinement(dccrg::Dccrg<spatial_cell::SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
63 int n) const override;
64 Real geometryRadius(Real x, Real y, Real z) const;
65 virtual void calcCellParameters(spatial_cell::SpatialCell* cell, creal& t) override;
66 virtual std::vector<std::array<Real, 3>> getV0(creal x, creal y, creal z, const uint popID) const override;
67
68 std::array<Real, 3> constBgB;
76
79
86
91
97
98 //GG 28.5.26: Adding first-pass of dipole offset code. Assuming SI units + guessing what the params will be named in cfg
99 //No reason the offsets can't be a vector I don't think, but leaving separate for now as it already exists like this.
103
104 Real zeroOutComponents[3]; //0->x,1->y,2->z
105
106 std::vector<MagnetosphereSpeciesParameters> speciesParams;
107 }; // class Magnetosphere
108} // namespace projects
109
110#endif
111
virtual void getParameters(void) override
std::vector< MagnetosphereSpeciesParameters > speciesParams
virtual Realf probePhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
bool forceRefinement(dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, int n) const override
std::array< Real, 3 > constBgB
static void addParameters(void)
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
Real geometryRadius(Real x, Real y, Real z) const
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 distri...
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
virtual bool initialize(void) override
bool refineSpatialCells(dccrg::Dccrg< spatial_cell::SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) const override
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
float Real
Definition definitions.h:41
float Realf
Definition definitions.h:33
fsgrid::FsGrid< FS_STENCIL_WIDTH > FieldSolverGrid
Definition definitions.h:78
const float creal
Definition definitions.h:42
std::span< std::array< Real, fsgrids::bfield::N_BFIELD > > perbspan
Definition common.h:434
std::span< technical > technicalspan
Definition common.h:452
std::span< std::array< Real, bgbfield::N_BGB > > bgbspan
Definition common.h:444