Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
vectordipole.hpp
Go to the documentation of this file.
1/*
2 * This file is part of Vlasiator.
3 * Copyright 2010-2016 Finnish Meteorological Institute
4 * Copyright 2017-2019 University of Helsinki
5 *
6 * For details of usage, see the COPYING file and read the "Rules of the Road"
7 * at http://www.physics.helsinki.fi/vlasiator/
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23/*
24Background magnetic field class of Vlasiator.
25*/
26
27#ifndef VECTORDIPOLE_HPP
28#define VECTORDIPOLE_HPP
29#include "fieldfunction.hpp"
30
31
32
34private:
35 bool initialized = false;
36 double q[3]; // Dipole moment; set to (0,0,moment) for z-aligned
37 double center[3]; // Coordinates where the dipole sits; set to (0,0,0)
38 double xlimit[2]; // X-coodrinate extents of full and zero dipole
39 double IMF[3]; // IMF value to scale to, starting at xlimit[0] and finishing at xlimit[1]
40public:
41
43 void initialize(const double moment,const double center_x, const double center_y, const double center_z, const double tilt_angle_phi, const double tilt_angle_theta, const double xlimit_f, const double xlimit_z, const double IMF_Bx, const double IMF_By, const double IMF_Bz);
44 double operator()(double x, double y, double z, coordinate component, unsigned int derivative=0, coordinate dcomponent=X) const;
45};
46
47#endif
48
double xlimit[2]
void initialize(const double moment, const double center_x, const double center_y, const double center_z, const double tilt_angle_phi, const double tilt_angle_theta, const double xlimit_f, const double xlimit_z, const double IMF_Bx, const double IMF_By, const double IMF_Bz)
double operator()(double x, double y, double z, coordinate component, unsigned int derivative=0, coordinate dcomponent=X) const
double center[3]
double IMF[3]
coordinate
Definition functions.hpp:28
@ X
Definition functions.hpp:28