Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
MultiPeak.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 MULTIPEAK_H
24#define MULTIPEAK_H
25
26#include <vector>
27
28#include "../../definitions.h"
30
31namespace projects {
34 std::vector<Real> rho;
35 std::vector<Real> Tx;
36 std::vector<Real> Ty;
37 std::vector<Real> Tz;
38 std::vector<Real> Vx;
39 std::vector<Real> Vy;
40 std::vector<Real> Vz;
41 std::vector<Real> rhoPertAbsAmp;
42
43 // Test whether parameters have been set up for all peaks
44 bool isConsistent() {
45 return rho.size() == Tx.size() &&
46 Tx.size() == Ty.size() &&
47 Ty.size() == Tz.size() &&
48 Tz.size() == Vx.size() &&
49 Vx.size() == Vy.size() &&
50 Vy.size() == Vz.size() &&
51 Vz.size() == rhoPertAbsAmp.size() &&
52 rhoPertAbsAmp.size() == rho.size() &&
53 rho.size() == numberOfPeaks;
54 }
55 };
56 class MultiPeak: public TriAxisSearch {
57 public:
58 MultiPeak();
59 virtual ~MultiPeak();
60
61 virtual bool initialize(void) override;
62 static void addParameters(void);
63 virtual void getParameters(void) override;
64 virtual void setProjectBField(
68 ) override;
69
70 std::vector<MultiPeakSpeciesParameters> speciesParams;
71
73 const uint popID,
74 const uint nRequested) const override;
76 const uint popID,
77 Real vx_in, Real vy_in, Real vz_in
78 ) const override;
79
80 virtual void calcCellParameters(spatial_cell::SpatialCell* cell, creal& t) override;
81 virtual std::vector<std::array<Real, 3>> getV0(creal x, creal y, creal z, const uint popID) const override;
82
83 uint seed;
84
85 static Real rhoRnd; //static as it has to be threadprivate
86 #pragma omp threadprivate(rhoRnd)
97
102
103 }; // class MultiPeak
104} // namespace projects
105
106#endif
107
static DensityModel densityModel
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...
static void addParameters(void)
Definition MultiPeak.cpp:52
static Real rhoRnd
Definition MultiPeak.h:85
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
std::vector< MultiPeakSpeciesParameters > speciesParams
Definition MultiPeak.h:70
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
virtual bool initialize(void) override
Definition MultiPeak.cpp:48
virtual Realf probePhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
virtual void getParameters(void) override
Definition MultiPeak.cpp:82
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
std::vector< Real > rhoPertAbsAmp
Definition MultiPeak.h:41