Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
outflow.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 OUTFLOW_H
24#define OUTFLOW_H
25
26#include <vector>
27#include "../definitions.h"
28#include "../readparameters.h"
31
32namespace SBC {
33
36 std::array<bool, 6> facesToSkipVlasov;
38 std::array<uint, 6> faceVlasovScheme;
40 std::vector<std::string> faceToReapplyUponRestartList;
41
44 };
45
55 public:
56 Outflow();
57 virtual ~Outflow();
58
59 static void addParameters();
60 virtual void getParameters() override;
61
62 virtual void initSysBoundary(
63 creal& t,
64 Project &project
65 ) override;
66 virtual void applyInitialState(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
69 fsgrids::bgbspan bgb, Project& project) override;
70 virtual void updateState(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
73 fsgrids::bgbspan bgb, creal t) override;
77 const std::array<Real, 3>& gridSpacing,
78 const std::array<fsgrid::FsSize_t, 3>& globalCoordinates,
79 const fsgrid::FsStencil& stencil, cuint component) override;
81 const fsgrid::FsStencil& stencil, cuint component) override;
83 const fsgrid::FsStencil& stencil, cuint component) override;
84 virtual void
86 const fsgrid::FsStencil& stencil, cuint component) override;
87 virtual void
89 fsgrids::dmomentsspan dmoments,
90 const fsgrid::FsStencil& stencil, cuint RKCase, cuint component) override;
92 const fsgrid::FsStencil& stencil, cuint component) override;
93 virtual void vlasovBoundaryCondition(
94 dccrg::Dccrg<SpatialCell,dccrg::Cartesian_Geometry>& mpiGrid,
95 const CellID& cellID,
96 const uint popID,
97 const bool calculate_V_moments
98 ) override;
99 virtual void setupL2OutflowAtRestart(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid) override;
100
101 virtual void getFaces(bool* faces) override;
102 virtual std::string getName() const override;
103 virtual uint getIndex() const override;
104
105 protected:
111 std::vector<std::string> faceList;
113 std::vector<std::string> faceNoFieldsList;
114 std::vector<OutflowSpeciesParameters> speciesParams;
115
118
124 }; // class Outflow
125} // namespace SBC
126
127#endif
std::vector< std::string > faceList
Definition outflow.h:111
virtual void initSysBoundary(creal &t, Project &project) override
Definition outflow.cpp:152
virtual void fieldSolverBoundaryCondDerivatives(fsgrids::dperbspan dperb, fsgrids::dmomentsspan dmoments, const fsgrid::FsStencil &stencil, cuint RKCase, cuint component) override
Definition outflow.cpp:283
virtual std::string getName() const override
Definition outflow.cpp:426
virtual void getParameters() override
Definition outflow.cpp:75
virtual void fieldSolverBoundaryCondGradPeElectricField(fsgrids::egradpespan EGradPe, const fsgrid::FsStencil &stencil, cuint component) override
Definition outflow.cpp:277
virtual void vlasovBoundaryCondition(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const uint popID, const bool calculate_V_moments) override
Definition outflow.cpp:299
virtual void setupL2OutflowAtRestart(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) override
Definition outflow.cpp:329
virtual Real fieldSolverBoundaryCondMagneticField(fsgrids::perbspan b, fsgrids::constbgbspan bgb, fsgrids::consttechnicalspan technical, const std::array< Real, 3 > &gridSpacing, const std::array< fsgrid::FsSize_t, 3 > &globalCoordinates, const fsgrid::FsStencil &stencil, cuint component) override
Definition outflow.cpp:235
virtual ~Outflow()
Definition outflow.cpp:50
virtual void fieldSolverBoundaryCondHallElectricField(fsgrids::ehallspan ehall, const fsgrid::FsStencil &stencil, cuint component) override
Definition outflow.cpp:249
static void addParameters()
Definition outflow.cpp:52
std::vector< OutflowSpeciesParameters > speciesParams
Definition outflow.h:114
bool facesToSkipFields[6]
Definition outflow.h:107
virtual void updateState(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, creal t) override
Definition outflow.cpp:230
bool facesToReapply[6]
Definition outflow.h:109
virtual void fieldSolverBoundaryCondElectricField(fsgrids::efieldspan e, const fsgrid::FsStencil &stencil, cuint component) override
Definition outflow.cpp:244
std::vector< std::string > faceNoFieldsList
Definition outflow.h:113
virtual uint getIndex() const override
Definition outflow.cpp:427
virtual void applyInitialState(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, Project &project) override
Definition outflow.cpp:190
virtual void fieldSolverBoundaryCondBVOLDerivatives(fsgrids::volspan vols, const fsgrid::FsStencil &stencil, cuint component) override
Definition outflow.cpp:289
Real quenchFactor
Definition outflow.h:117
virtual void getFaces(bool *faces) override
Definition outflow.cpp:420
const uint32_t cuint
Definition definitions.h:50
float Real
Definition definitions.h:41
uint64_t CellID
Definition definitions.h:54
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< const std::array< Real, bgbfield::N_BGB > > constbgbspan
Definition common.h:445
std::span< std::array< Real, fsgrids::egradpe::N_EGRADPE > > egradpespan
Definition common.h:440
std::span< std::array< Real, fsgrids::dmoments::N_DMOMENTS > > dmomentsspan
Definition common.h:448
std::span< technical > technicalspan
Definition common.h:452
std::span< std::array< Real, bgbfield::N_BGB > > bgbspan
Definition common.h:444
std::span< std::array< Real, fsgrids::dperb::N_DPERB > > dperbspan
Definition common.h:442
std::span< const technical > consttechnicalspan
Definition common.h:453
std::span< std::array< Real, fsgrids::efield::N_EFIELD > > efieldspan
Definition common.h:436
std::span< std::array< Real, fsgrids::volfields::N_VOL > > volspan
Definition common.h:450
std::span< std::array< Real, fsgrids::ehall::N_EHALL > > ehallspan
Definition common.h:438
std::vector< std::string > faceToReapplyUponRestartList
Definition outflow.h:40
std::array< uint, 6 > faceVlasovScheme
Definition outflow.h:38
std::array< bool, 6 > facesToSkipVlasov
Definition outflow.h:36