Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
donotcompute.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 DONOTCOMPUTE_H
24#define DONOTCOMPUTE_H
25
26#include <vector>
27#include "../definitions.h"
28#include "../readparameters.h"
31
32using namespace projects;
33
34namespace SBC {
40 public:
42 virtual ~DoNotCompute();
43
44 static void addParameters();
45 virtual void getParameters() override;
46
47 void initSysBoundary(creal& t, Project& project) override;
48 void assignSysBoundary(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
49 fsgrids::technicalspan technical, FieldSolverGrid& fsgrid) override;
50 void applyInitialState(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
53 fsgrids::bgbspan bgb, Project& project) override;
54 void updateState(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>& mpiGrid,
57 fsgrids::bgbspan bgb, creal t) override;
58 void getFaces(bool* faces) override;
59 std::string getName() const override;
60 uint getIndex() const override;
61
62 // Explicit warning functions to inform the user if a doNotCompute cell gets computed
65 fsgrids::consttechnicalspan, const std::array<Real, 3>&,
66 const std::array<fsgrid::FsSize_t, 3>&, const fsgrid::FsStencil&,
67 cuint) override {
68 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondMagneticField called!" << std::endl;
69 return 0.;
70 }
72 const fsgrid::FsStencil&, cuint) override {
73 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondElectricField called!" << std::endl;
74 }
76 const fsgrid::FsStencil&, cuint) override {
77 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondHallElectricField called!" << std::endl;
78 }
80 const fsgrid::FsStencil&, cuint) override {
81 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondGradPeElectricField called!" << std::endl;
82 }
85 const fsgrid::FsStencil&, cuint, cuint) override {
86 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondDerivatives called!" << std::endl;
87 }
89 const fsgrid::FsStencil&, cuint) override {
90 std::cerr << "ERROR: DoNotCompute::fieldSolverBoundaryCondBVOLDerivatives called!" << std::endl;
91 }
92 void vlasovBoundaryCondition(dccrg::Dccrg<SpatialCell, dccrg::Cartesian_Geometry>&, const CellID&, const uint,
93 const bool) override {
94 std::cerr << "ERROR: DoNotCompute::vlasovBoundaryCondition called!" << std::endl;
95 }
96 };
97}
98
99#endif
void initSysBoundary(creal &t, Project &project) override
virtual ~DoNotCompute()
Real fieldSolverBoundaryCondMagneticField(fsgrids::perbspan, fsgrids::constbgbspan, fsgrids::consttechnicalspan, const std::array< Real, 3 > &, const std::array< fsgrid::FsSize_t, 3 > &, const fsgrid::FsStencil &, cuint) override
void updateState(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, creal t) override
void getFaces(bool *faces) override
void fieldSolverBoundaryCondHallElectricField(fsgrids::ehallspan, const fsgrid::FsStencil &, cuint) override
uint getIndex() const override
virtual void getParameters() override
void fieldSolverBoundaryCondElectricField(fsgrids::efieldspan, const fsgrid::FsStencil &, cuint) override
void applyInitialState(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, Project &project) override
void fieldSolverBoundaryCondBVOLDerivatives(fsgrids::volspan, const fsgrid::FsStencil &, cuint) override
void fieldSolverBoundaryCondGradPeElectricField(fsgrids::egradpespan, const fsgrid::FsStencil &, cuint) override
static void addParameters()
void assignSysBoundary(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
std::string getName() const override
void vlasovBoundaryCondition(dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &, const CellID &, const uint, const bool) override
void fieldSolverBoundaryCondDerivatives(fsgrids::dperbspan, fsgrids::dmomentsspan, const fsgrid::FsStencil &, cuint, cuint) override
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