Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
Dispersion.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 DISPERSION_H
24#define DISPERSION_H
25
26#include <stdlib.h>
27
28#include "../../definitions.h"
29#include "../project.h"
30
31namespace projects {
32
43
44 class Dispersion: public Project {
45 public:
46 Dispersion();
47 virtual ~Dispersion();
48
49 virtual bool initialize(void) override;
50 static void addParameters(void);
51 virtual void getParameters(void) override;
52 virtual void setProjectBField(
55 ) override;
56 virtual void hook(
57 cuint& stage,
58 const dccrg::Dccrg<spatial_cell::SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
60 ) const override;
61 virtual Realf fillPhaseSpace(
62 spatial_cell::SpatialCell* cell, const uint popID,
63 const uint nRequested
64 ) const override;
65 virtual void calcCellParameters(spatial_cell::SpatialCell* cell, creal& t) override;
66
74 std::vector<DispersionSpeciesParameters> speciesParams;
75 uint seed;
76
77 static Real rndRho, rndVel[3];
78 #pragma omp threadprivate(rndRho,rndVel)
79 } ; // class Dispersion
80} // namespace projects
81
82#endif
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
static void addParameters(void)
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
virtual bool initialize(void) override
static Real rndVel[3]
Definition Dispersion.h:77
static Real rndRho
Definition Dispersion.h:77
virtual void getParameters(void) override
std::vector< DispersionSpeciesParameters > speciesParams
Definition Dispersion.h:74
const uint32_t cuint
Definition definitions.h:50
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
Definition common.h:560